@holistics/cli-core 2.5.9 → 2.5.10

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 (2) hide show
  1. package/dist/commands.js +531 -499
  2. package/package.json +1 -1
package/dist/commands.js CHANGED
@@ -11773,7 +11773,7 @@ var require_src3 = __commonJS(function(exports2, module2) {
11773
11773
  }
11774
11774
  });
11775
11775
 
11776
- // ../../node_modules/.pnpm/follow-redirects@1.16.1/node_modules/follow-redirects/debug.js
11776
+ // ../../node_modules/.pnpm/follow-redirects@1.16.3/node_modules/follow-redirects/debug.js
11777
11777
  var require_debug = __commonJS(function(exports2, module2) {
11778
11778
  var debug;
11779
11779
  module2.exports = function() {
@@ -11789,7 +11789,7 @@ var require_debug = __commonJS(function(exports2, module2) {
11789
11789
  };
11790
11790
  });
11791
11791
 
11792
- // ../../node_modules/.pnpm/follow-redirects@1.16.1/node_modules/follow-redirects/index.js
11792
+ // ../../node_modules/.pnpm/follow-redirects@1.16.3/node_modules/follow-redirects/index.js
11793
11793
  var require_follow_redirects = __commonJS(function(exports2, module2) {
11794
11794
  var url = __require("url");
11795
11795
  var URL2 = url.URL;
@@ -12008,7 +12008,7 @@ var require_follow_redirects = __commonJS(function(exports2, module2) {
12008
12008
  options2.headers[headerList[i]] = headerList[i + 1];
12009
12009
  }
12010
12010
  }
12011
- if (!isArray(options2.sensitiveHeaders)) {
12011
+ if (!Array.isArray(options2.sensitiveHeaders)) {
12012
12012
  options2.sensitiveHeaders = [];
12013
12013
  }
12014
12014
  if (options2.host) {
@@ -12255,9 +12255,6 @@ var require_follow_redirects = __commonJS(function(exports2, module2) {
12255
12255
  var dot = subdomain.length - domain.length - 1;
12256
12256
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
12257
12257
  }
12258
- function isArray(value) {
12259
- return value instanceof Array;
12260
- }
12261
12258
  function isString(value) {
12262
12259
  return typeof value === "string" || value instanceof String;
12263
12260
  }
@@ -12271,7 +12268,7 @@ var require_follow_redirects = __commonJS(function(exports2, module2) {
12271
12268
  return URL2 && value instanceof URL2;
12272
12269
  }
12273
12270
  function escapeRegex(regex) {
12274
- return regex.replace(/[[\]\\/()*+?.^$|]/g, "\\$&");
12271
+ return regex.replace(/[\^$\\.*+?()[\]{}|]/g, "\\$&");
12275
12272
  }
12276
12273
  module2.exports = wrap({ http, https });
12277
12274
  module2.exports.wrap = wrap;
@@ -24041,7 +24038,7 @@ __export(exports_utils, {
24041
24038
  origin: () => origin
24042
24039
  });
24043
24040
 
24044
- // ../../node_modules/.pnpm/@holistics+aml@9.5.0/node_modules/@holistics/aml/dist/aml.es.js
24041
+ // ../../node_modules/.pnpm/@holistics+aml@9.5.1/node_modules/@holistics/aml/dist/aml.es.js
24045
24042
  var exports_aml_es = {};
24046
24043
  __export(exports_aml_es, {
24047
24044
  AmlList: () => lt,
@@ -24092,15 +24089,15 @@ __export(exports_aml_es, {
24092
24089
  formatType: () => U,
24093
24090
  hasErrorDiagnostics: () => it,
24094
24091
  isElementSymbol: () => Ao,
24095
- isPropertyAccessExpression: () => Je,
24096
- lookupSymbol: () => Jt,
24092
+ isPropertyAccessExpression: () => Xe,
24093
+ lookupSymbol: () => Xt,
24097
24094
  refCustomModules: () => KR,
24098
24095
  send: () => R,
24099
24096
  toServiceDiagnostics: () => Qf,
24100
24097
  uniqDiagnostics: () => yi
24101
24098
  });
24102
24099
  // package.json
24103
- var version = "2.5.9";
24100
+ var version = "2.5.10";
24104
24101
 
24105
24102
  // ../../node_modules/.pnpm/commander@15.0.0/node_modules/commander/lib/error.js
24106
24103
  class CommanderError extends Error {
@@ -42936,7 +42933,7 @@ var import_fast_glob = __toESM(require_out4(), 1);
42936
42933
  import fs12 from "fs";
42937
42934
  import path8 from "path";
42938
42935
 
42939
- // ../../node_modules/.pnpm/@holistics+aml@9.5.0/node_modules/@holistics/aml/dist/vfsPath-CxxIp9T7.mjs
42936
+ // ../../node_modules/.pnpm/@holistics+aml@9.5.1/node_modules/@holistics/aml/dist/vfsPath-CxxIp9T7.mjs
42940
42937
  var s = {
42941
42938
  globalModuleName: "::",
42942
42939
  languageExtension: "aml"
@@ -42986,12 +42983,12 @@ class r {
42986
42983
  }
42987
42984
  }
42988
42985
 
42989
- // ../../node_modules/.pnpm/@holistics+aml@9.5.0/node_modules/@holistics/aml/dist/aml.es.js
42990
- var ud = "9.5.0";
42986
+ // ../../node_modules/.pnpm/@holistics+aml@9.5.1/node_modules/@holistics/aml/dist/aml.es.js
42987
+ var ud = "9.5.1";
42991
42988
  var Ql = typeof global == "object" && global && global.Object === Object && global;
42992
42989
  var pd = typeof self == "object" && self && self.Object === Object && self;
42993
- var Zt = Ql || pd || Function("return this")();
42994
- var xt = Zt.Symbol;
42990
+ var en = Ql || pd || Function("return this")();
42991
+ var xt = en.Symbol;
42995
42992
  var Jl = Object.prototype;
42996
42993
  var fd = Jl.hasOwnProperty;
42997
42994
  var dd = Jl.toString;
@@ -43058,7 +43055,7 @@ function tu(t) {
43058
43055
  var e = Er(t);
43059
43056
  return e == vd || e == bd || e == wd || e == Sd;
43060
43057
  }
43061
- var Rs = Zt["__core-js_shared__"];
43058
+ var Rs = en["__core-js_shared__"];
43062
43059
  var xc = function() {
43063
43060
  var t = /[^.]+$/.exec(Rs && Rs.keys && Rs.keys.IE_PROTO || "");
43064
43061
  return t ? "Symbol(src)_1." + t : "";
@@ -43099,7 +43096,7 @@ function Yn(t, e) {
43099
43096
  var n = Fd(t, e);
43100
43097
  return Nd(n) ? n : undefined;
43101
43098
  }
43102
- var Zs = Yn(Zt, "WeakMap");
43099
+ var Zs = Yn(en, "WeakMap");
43103
43100
  var Ic = Object.create;
43104
43101
  var Ld = /* @__PURE__ */ function() {
43105
43102
  function t() {}
@@ -43220,7 +43217,7 @@ function th() {
43220
43217
  var ou = typeof exports_aml_es == "object" && exports_aml_es && !exports_aml_es.nodeType && exports_aml_es;
43221
43218
  var Oc = ou && typeof module_aml_es == "object" && module_aml_es && !module_aml_es.nodeType && module_aml_es;
43222
43219
  var nh = Oc && Oc.exports === ou;
43223
- var Rc = nh ? Zt.Buffer : undefined;
43220
+ var Rc = nh ? en.Buffer : undefined;
43224
43221
  var rh = Rc ? Rc.isBuffer : undefined;
43225
43222
  var Mi = rh || th;
43226
43223
  var ih = "[object Arguments]";
@@ -43408,7 +43405,7 @@ yn.prototype.delete = nm;
43408
43405
  yn.prototype.get = rm;
43409
43406
  yn.prototype.has = im;
43410
43407
  yn.prototype.set = sm;
43411
- var Qr = Yn(Zt, "Map");
43408
+ var Qr = Yn(en, "Map");
43412
43409
  function am() {
43413
43410
  this.size = 0, this.__data__ = {
43414
43411
  hash: new Ln,
@@ -43624,7 +43621,7 @@ function Zm(t, e) {
43624
43621
  var Su = typeof exports_aml_es == "object" && exports_aml_es && !exports_aml_es.nodeType && exports_aml_es;
43625
43622
  var Dc = Su && typeof module_aml_es == "object" && module_aml_es && !module_aml_es.nodeType && module_aml_es;
43626
43623
  var ey = Dc && Dc.exports === Su;
43627
- var Cc = ey ? Zt.Buffer : undefined;
43624
+ var Cc = ey ? en.Buffer : undefined;
43628
43625
  var Nc = Cc ? Cc.allocUnsafe : undefined;
43629
43626
  function ty(t, e) {
43630
43627
  if (e)
@@ -43672,9 +43669,9 @@ function na(t) {
43672
43669
  function cy(t) {
43673
43670
  return Au(t, eo, Iu);
43674
43671
  }
43675
- var ra = Yn(Zt, "DataView");
43676
- var ia = Yn(Zt, "Promise");
43677
- var cr = Yn(Zt, "Set");
43672
+ var ra = Yn(en, "DataView");
43673
+ var ia = Yn(en, "Promise");
43674
+ var cr = Yn(en, "Set");
43678
43675
  var Lc = "[object Map]";
43679
43676
  var ly = "[object Object]";
43680
43677
  var Bc = "[object Promise]";
@@ -43710,7 +43707,7 @@ function gy(t) {
43710
43707
  var e = t.length, n = new t.constructor(e);
43711
43708
  return e && typeof t[0] == "string" && yy.call(t, "index") && (n.index = t.index, n.input = t.input), n;
43712
43709
  }
43713
- var Di = Zt.Uint8Array;
43710
+ var Di = en.Uint8Array;
43714
43711
  function so(t) {
43715
43712
  var e = new t.constructor(t.byteLength);
43716
43713
  return new Di(e).set(new Di(t)), e;
@@ -44863,7 +44860,7 @@ class at extends fo {
44863
44860
  }
44864
44861
  var yt = /* @__PURE__ */ ((t) => (t.Public = "Public", t.Private = "Private", t))(yt || {});
44865
44862
 
44866
- class Ue {
44863
+ class Ge {
44867
44864
  constructor(e) {
44868
44865
  e ? this.table = e : this.table = /* @__PURE__ */ new Map;
44869
44866
  }
@@ -44890,7 +44887,7 @@ class Ue {
44890
44887
  "Private"
44891
44888
  ], r2) {
44892
44889
  const i = ut(this.table, e.table, (s2) => n.includes(s2.accessModifier), r2);
44893
- return e instanceof Pt && n.includes("Private") ? new Pt(e.file, i, e.unresolvedModules) : new Ue(i);
44890
+ return e instanceof Pt && n.includes("Private") ? new Pt(e.file, i, e.unresolvedModules) : new Ge(i);
44894
44891
  }
44895
44892
  }
44896
44893
 
@@ -44934,13 +44931,13 @@ class Pt {
44934
44931
  ], r2) {
44935
44932
  const i = ut(this.table, e.table, (s2) => n.includes(s2.accessModifier), r2);
44936
44933
  if (n.includes("Private")) {
44937
- if (e instanceof Ue || e instanceof vr)
44934
+ if (e instanceof Ge || e instanceof vr)
44938
44935
  return new Pt(this.file, i, this.unresolvedModules);
44939
44936
  if (e instanceof Pt)
44940
44937
  return new Pt(this.file, i, this.unresolvedModules.concat(e.unresolvedModules));
44941
44938
  throw new Error("Unreachable");
44942
44939
  }
44943
- return new Ue(i);
44940
+ return new Ge(i);
44944
44941
  }
44945
44942
  }
44946
44943
 
@@ -45030,7 +45027,7 @@ function we(t, e) {
45030
45027
  const i = { ...r2.size ? nr(n, r2, /* @__PURE__ */ new Map) : n };
45031
45028
  return i.typeArguments = e, i;
45032
45029
  }
45033
- function an(t) {
45030
+ function on(t) {
45034
45031
  return {
45035
45032
  kind: T.TypeVariable,
45036
45033
  name: t
@@ -45132,8 +45129,8 @@ function MT(t, e = le(t, N.Any), n, r2 = le(t, N.Any)) {
45132
45129
  const p = /* @__PURE__ */ new Map;
45133
45130
  return p.set("__call__", { type: a, symbol: s2 }), p.set("get", { type: u, symbol: l }), br(p, t, "Dict", n);
45134
45131
  }
45135
- function fs10(t, e = an("V"), n) {
45136
- const r2 = an("K"), i = e.kind === T.TypeVariable ? e : an("V"), s2 = MT(t, e, n, r2);
45132
+ function fs10(t, e = on("V"), n) {
45133
+ const r2 = on("K"), i = e.kind === T.TypeVariable ? e : on("V"), s2 = MT(t, e, n, r2);
45137
45134
  return we(s2, [r2, i]);
45138
45135
  }
45139
45136
  function DT(t, e = le(t, N.Any), n) {
@@ -45155,25 +45152,25 @@ function DT(t, e = le(t, N.Any), n) {
45155
45152
  const f = /* @__PURE__ */ new Map;
45156
45153
  return f.set("__call__", { type: s2, symbol: i }), f.set("get", { type: p, symbol: u }), f.set("length", { type: o, symbol: a }), br(f, t, "List", n);
45157
45154
  }
45158
- function Zr(t, e = an("T"), n) {
45159
- const r2 = DT(t, e, n), i = e.kind === T.TypeVariable ? e : an("T");
45155
+ function Zr(t, e = on("T"), n) {
45156
+ const r2 = DT(t, e, n), i = e.kind === T.TypeVariable ? e : on("T");
45160
45157
  return we(r2, [i]);
45161
45158
  }
45162
45159
  function CT(t, e) {
45163
- const n = br(/* @__PURE__ */ new Map, t, "Partial", e), r2 = an("U");
45160
+ const n = br(/* @__PURE__ */ new Map, t, "Partial", e), r2 = on("U");
45164
45161
  return we(n, [r2]);
45165
45162
  }
45166
45163
  function NT(t, e) {
45167
- const n = br(/* @__PURE__ */ new Map, t, "Slot", e), r2 = an("U");
45164
+ const n = br(/* @__PURE__ */ new Map, t, "Slot", e), r2 = on("U");
45168
45165
  return we(n, [r2]);
45169
45166
  }
45170
45167
  function FT(t, e) {
45171
- const n = br(/* @__PURE__ */ new Map, t, "AccessExpression", e), r2 = an("T");
45168
+ const n = br(/* @__PURE__ */ new Map, t, "AccessExpression", e), r2 = on("T");
45172
45169
  return we(n, [r2]);
45173
45170
  }
45174
45171
  function sa(t) {
45175
45172
  var e;
45176
- if (pn(t)) {
45173
+ if (fn(t)) {
45177
45174
  const n = (e = t.typeArguments) == null ? undefined : e[0];
45178
45175
  if (!n)
45179
45176
  throw new Error("Cannot get inner type of Slot");
@@ -45185,13 +45182,13 @@ function sa(t) {
45185
45182
  }
45186
45183
  return t;
45187
45184
  }
45188
- function ln(t, e) {
45189
- return pn(e) ? e : we(wr(ds(t)), [sa(e)]);
45185
+ function un(t, e) {
45186
+ return fn(e) ? e : we(wr(ds(t)), [sa(e)]);
45190
45187
  }
45191
45188
  function LT(t) {
45192
45189
  const e = O.createGeneratedSymbol("values", y.FunctionScopedVariable), n = we(fs10(t, le(t, N.Any)), [le(t, N.String), le(t, N.Any)]);
45193
45190
  e.generatedProps.type = n;
45194
- const r2 = ln(t, le(t, N.Any));
45191
+ const r2 = un(t, le(t, N.Any));
45195
45192
  return dt([{ symbol: e, type: n }], r2, t);
45196
45193
  }
45197
45194
  function le(t, e) {
@@ -45207,14 +45204,14 @@ function bt(t) {
45207
45204
  function Pn(t) {
45208
45205
  return le(t, N.Int);
45209
45206
  }
45210
- function Ze(t) {
45207
+ function et(t) {
45211
45208
  return le(t, N.String);
45212
45209
  }
45213
45210
  function ht(t) {
45214
45211
  return le(t, N.Boolean);
45215
45212
  }
45216
45213
  function ho(t, e) {
45217
- const n = /* @__PURE__ */ new Map, r2 = an("T"), i = br(n, t, "Heredoc", e);
45214
+ const n = /* @__PURE__ */ new Map, r2 = on("T"), i = br(n, t, "Heredoc", e);
45218
45215
  return we(i, [r2]);
45219
45216
  }
45220
45217
  function zu(t) {
@@ -45223,7 +45220,7 @@ function zu(t) {
45223
45220
  function X(t) {
45224
45221
  return le(t, N.Any);
45225
45222
  }
45226
- function je(t, e = "reported", n = X(t)) {
45223
+ function Ye(t, e = "reported", n = X(t)) {
45227
45224
  return { ...n, recovery: e };
45228
45225
  }
45229
45226
  function mi(t) {
@@ -45252,12 +45249,12 @@ function WT(t, e, n, r2) {
45252
45249
  var i;
45253
45250
  if (!t.has(e, n)) {
45254
45251
  const s2 = O.createGeneratedSymbol(n, y.ElementProperty);
45255
- s2.generatedProps.type = r2, s2.generatedProps.members = new Ue, t.set(n, s2);
45252
+ s2.generatedProps.type = r2, s2.generatedProps.members = new Ge, t.set(n, s2);
45256
45253
  }
45257
45254
  return (i = t.get(e, n)) == null ? undefined : i.symbol;
45258
45255
  }
45259
45256
  function qT(t, e) {
45260
- if (e === re.DictName && t instanceof $ && t.elementName instanceof I)
45257
+ if (e === ne.DictName && t instanceof $ && t.elementName instanceof I)
45261
45258
  return t.elementName.value.value;
45262
45259
  if (t.elementType instanceof I)
45263
45260
  return t.elementType.value.value;
@@ -45265,14 +45262,14 @@ function qT(t, e) {
45265
45262
  function VT(t, e, n, r2, i) {
45266
45263
  var o;
45267
45264
  const { ruleset: s2 } = i.parentType, { structure: a } = s2;
45268
- if (a === re.DictName || a === re.DictType) {
45265
+ if (a === ne.DictName || a === ne.DictType) {
45269
45266
  const c = WT(e, t, s2.name, i.parentType);
45270
45267
  if (!c)
45271
45268
  return;
45272
45269
  const l = qT(n, a);
45273
45270
  l && ((o = c.generatedProps) != null && o.members && c.generatedProps.members.set(l, r2), s2.isRuleOn(D.RootNamespace) && s2.isRuleOn(D.NameAs) && s2.isRuleOn(D.UniqueName) && !e.has(t, l) && e.set(l, r2));
45274
45271
  } else
45275
- a !== re.List && e.set(r2.name, r2);
45272
+ a !== ne.List && e.set(r2.name, r2);
45276
45273
  }
45277
45274
  function KT(t, e, n) {
45278
45275
  const r2 = t.symbol(n.id);
@@ -45282,10 +45279,10 @@ function KT(t, e, n) {
45282
45279
  if (s2.isErr())
45283
45280
  return;
45284
45281
  const a = s2.unwrap();
45285
- He(a) ? VT(t, e, n, i, a) : e.set(i.name, i);
45282
+ Ue(a) ? VT(t, e, n, i, a) : e.set(i.name, i);
45286
45283
  }
45287
45284
  function qu(t, e) {
45288
- const n = new Ue;
45285
+ const n = new Ge;
45289
45286
  if (e.body instanceof L)
45290
45287
  e.body.body.forEach((r2) => {
45291
45288
  !(r2 instanceof $) && !(r2 instanceof F) || KT(t, n, r2);
@@ -45296,7 +45293,7 @@ function qu(t, e) {
45296
45293
  const i = t.members(r2.unwrap().id);
45297
45294
  if (i.isOk()) {
45298
45295
  const s2 = i.unwrap();
45299
- return new Ue(s2.table);
45296
+ return new Ge(s2.table);
45300
45297
  }
45301
45298
  }
45302
45299
  }
@@ -45304,7 +45301,7 @@ function qu(t, e) {
45304
45301
  }
45305
45302
  function Vu(t) {
45306
45303
  const { ruleset: e } = t, { structure: n } = e;
45307
- if (n === re.DictType || n === re.DictName || n === re.List) {
45304
+ if (n === ne.DictType || n === ne.DictName || n === ne.List) {
45308
45305
  const r2 = t.type.members.get("__call__").type.returnType;
45309
45306
  if (!r2)
45310
45307
  throw new Error("Expected body type");
@@ -45425,7 +45422,7 @@ function Gu(t) {
45425
45422
  function Fn(t) {
45426
45423
  if (t instanceof I)
45427
45424
  return [t];
45428
- if (Je(t)) {
45425
+ if (Xe(t)) {
45429
45426
  const e = Fn(t.leftExpression), n = Fn(t.rightExpression);
45430
45427
  return e && n ? [...e, ...n] : undefined;
45431
45428
  }
@@ -45544,7 +45541,7 @@ function Yu(t) {
45544
45541
  }) : t instanceof Y && t.op.value === "|" ? [t.leftExpression.id, t.rightExpression.id] : t instanceof pt ? [t.expr.id] : t instanceof Me ? t.body.flatMap((n) => n instanceof F ? [n.body.id] : []) : [];
45545
45542
  }
45546
45543
  function JT(t) {
45547
- return new lr(new E(je(t, "unreported")), [], [], "cycle");
45544
+ return new lr(new E(Ye(t, "unreported")), [], [], "cycle");
45548
45545
  }
45549
45546
  function q(t, e) {
45550
45547
  if (t instanceof ce)
@@ -45603,10 +45600,10 @@ function XT(t, e) {
45603
45600
  return !(e instanceof ce) || t.statements.length !== e.statements.length ? false : t.statements.every((n, r2) => q(n, e.statements[r2]));
45604
45601
  }
45605
45602
  function ZT(t, e) {
45606
- return e instanceof be ? Ye(t.value, e.value) : false;
45603
+ return e instanceof be ? He(t.value, e.value) : false;
45607
45604
  }
45608
45605
  function eE(t, e) {
45609
- return e instanceof I ? Ye(t.value, e.value) : false;
45606
+ return e instanceof I ? He(t.value, e.value) : false;
45610
45607
  }
45611
45608
  function tE(t, e) {
45612
45609
  return e instanceof Te ? q(t.callee, e.callee) && q(t.args, e.args) : false;
@@ -45617,17 +45614,17 @@ function nE(t, e) {
45617
45614
  function rE(t, e) {
45618
45615
  if (!(e instanceof gt))
45619
45616
  return false;
45620
- const n = (i, s2) => i !== undefined && s2 !== undefined ? q(i, s2) : i === s2, r2 = (i, s2) => i !== undefined && s2 !== undefined ? Ye(i, s2) : i === s2;
45617
+ const n = (i, s2) => i !== undefined && s2 !== undefined ? q(i, s2) : i === s2, r2 = (i, s2) => i !== undefined && s2 !== undefined ? He(i, s2) : i === s2;
45621
45618
  return n(t.name, e.name) && r2(t.separatorColonToken, e.separatorColonToken) && n(t.typeReferenceExpression, e.typeReferenceExpression) && r2(t.equalSign, e.equalSign) && n(t.value, e.value);
45622
45619
  }
45623
45620
  function iE(t, e) {
45624
- return e instanceof kt ? Ye(t.op, e.op) && q(t.expression, e.expression) : false;
45621
+ return e instanceof kt ? He(t.op, e.op) && q(t.expression, e.expression) : false;
45625
45622
  }
45626
45623
  function sE(t, e) {
45627
- return e instanceof Y ? q(t.leftExpression, e.leftExpression) && Ye(t.op, e.op) && q(t.rightExpression, e.rightExpression) : false;
45624
+ return e instanceof Y ? q(t.leftExpression, e.leftExpression) && He(t.op, e.op) && q(t.rightExpression, e.rightExpression) : false;
45628
45625
  }
45629
45626
  function aE(t, e) {
45630
- return e instanceof zt ? q(t.expression, e.expression) && Ye(t.op, e.op) : false;
45627
+ return e instanceof zt ? q(t.expression, e.expression) && He(t.op, e.op) : false;
45631
45628
  }
45632
45629
  function oa(t, e) {
45633
45630
  if (!(e instanceof F))
@@ -45660,10 +45657,10 @@ function fE(t, e) {
45660
45657
  return e instanceof pt ? q(t.expr, e.expr) : false;
45661
45658
  }
45662
45659
  function dE(t, e) {
45663
- return e instanceof nt ? Ye(t.name, e.name) && Hu(t.content, e.content) : false;
45660
+ return e instanceof nt ? He(t.name, e.name) && Hu(t.content, e.content) : false;
45664
45661
  }
45665
45662
  function hE(t, e) {
45666
- return e instanceof Wt ? Ye(t.path, e.path) && (t.body ? e.body ? q(t.body, e.body) : false : true) && (t.moduleName ? e.moduleName ? q(t.moduleName, e.moduleName) : false : true) : false;
45663
+ return e instanceof Wt ? He(t.path, e.path) && (t.body ? e.body ? q(t.body, e.body) : false : true) && (t.moduleName ? e.moduleName ? q(t.moduleName, e.moduleName) : false : true) : false;
45667
45664
  }
45668
45665
  function mE(t, e) {
45669
45666
  return !(e instanceof Zn) || t.modules.length !== e.modules.length ? false : t.modules.every((n, r2) => q(n, e.modules[r2]));
@@ -45680,17 +45677,17 @@ function Hu(t, e) {
45680
45677
  function TE(t, e) {
45681
45678
  return e instanceof Ct && q(t.value, e.value);
45682
45679
  }
45683
- function Ye(t, e) {
45680
+ function He(t, e) {
45684
45681
  return il(t) && il(e) ? t.value === e.value : t.kind !== e.kind ? false : t.kind === d.NUMBER_LITERAL || t.kind === d.OPERATOR || t.kind === d.IDENTIFIER ? t.value === e.value : true;
45685
45682
  }
45686
45683
  function hs(t, e) {
45687
- return e instanceof Xn ? Ye(t.atSignToken, e.atSignToken) && q(t.name, e.name) && q(t.args, e.args) : false;
45684
+ return e instanceof Xn ? He(t.atSignToken, e.atSignToken) && q(t.name, e.name) && q(t.args, e.args) : false;
45688
45685
  }
45689
45686
  function _e(t, e, n) {
45690
- return t === e ? true : t instanceof lr ? e instanceof lr && t.owner === e.owner && _e(t.type, e.type) && jt(t.children, e.children, (r2, i) => r2.key === i.key) && jt(t.requirements, e.requirements, (r2, i) => r2.nodeId.key === i.nodeId.key && _e(r2.argument, i.argument)) : t instanceof Map ? Zc(t, e) : t instanceof Ue || t instanceof Pt || t instanceof vr ? EE(t, e) : t instanceof E ? SE(t, e) : t instanceof S ? xE(t, e) : Rp(t) ? false : Oo(t) ? ms(t, e) : Ro(t) ? fr(t, e) : GT(t) ? false : el(t) ? el(e) ? _e(t.symbol, e.symbol) && _e(t.type, e.type) : false : Ku(t) ? IE(t, e) : Array.isArray(t) ? Array.isArray(e) ? t.length === 0 ? e.length === 0 : Uu(t[0]) ? ei(t, e) : jt(t, e, (r2, i) => _e(r2, i)) : false : t instanceof r ? e instanceof r ? t.equals(e) : false : t instanceof yr ? la(t, e) : t instanceof ga ? e instanceof ga ? la(t.tree, e.tree) && Zc(t.rootsByTopLevelModule, e.rootsByTopLevelModule) : false : aa(t) ? aa(e) ? Xu(t, e) : false : Gu(t) ? bE(t, e) : t instanceof Ei ? zE(t, e) : t instanceof ri ? false : t instanceof Nt ? e instanceof Nt ? ei(t.diagnostics(), e.diagnostics()) : false : dk(t) || hk(t) ? false : (typeof t == "object" && (!n || !["interpretFileJson"].includes(n)) && (console.error("v1 does not implement Equal interface"), console.error(t)), t === e);
45687
+ return t === e ? true : t instanceof lr ? e instanceof lr && t.owner === e.owner && _e(t.type, e.type) && jt(t.children, e.children, (r2, i) => r2.key === i.key) && jt(t.requirements, e.requirements, (r2, i) => r2.nodeId.key === i.nodeId.key && _e(r2.argument, i.argument)) : t instanceof Map ? Zc(t, e) : t instanceof Ge || t instanceof Pt || t instanceof vr ? EE(t, e) : t instanceof E ? SE(t, e) : t instanceof S ? xE(t, e) : Rp(t) ? false : Oo(t) ? ms(t, e) : Ro(t) ? fr(t, e) : GT(t) ? false : el(t) ? el(e) ? _e(t.symbol, e.symbol) && _e(t.type, e.type) : false : Ku(t) ? IE(t, e) : Array.isArray(t) ? Array.isArray(e) ? t.length === 0 ? e.length === 0 : Uu(t[0]) ? ei(t, e) : jt(t, e, (r2, i) => _e(r2, i)) : false : t instanceof r ? e instanceof r ? t.equals(e) : false : t instanceof yr ? la(t, e) : t instanceof ga ? e instanceof ga ? la(t.tree, e.tree) && Zc(t.rootsByTopLevelModule, e.rootsByTopLevelModule) : false : aa(t) ? aa(e) ? Xu(t, e) : false : Gu(t) ? bE(t, e) : t instanceof Ei ? zE(t, e) : t instanceof ri ? false : t instanceof Nt ? e instanceof Nt ? ei(t.diagnostics(), e.diagnostics()) : false : dk(t) || hk(t) ? false : (typeof t == "object" && (!n || !["interpretFileJson"].includes(n)) && (console.error("v1 does not implement Equal interface"), console.error(t)), t === e);
45691
45688
  }
45692
45689
  function EE(t, e) {
45693
- if (t instanceof Ue)
45690
+ if (t instanceof Ge)
45694
45691
  return kE(t, e);
45695
45692
  if (t instanceof Pt)
45696
45693
  return wE(t, e);
@@ -45699,7 +45696,7 @@ function EE(t, e) {
45699
45696
  throw new Error("Unreachable");
45700
45697
  }
45701
45698
  function kE(t, e) {
45702
- return e instanceof Ue ? _e(t.table, e.table) : false;
45699
+ return e instanceof Ge ? _e(t.table, e.table) : false;
45703
45700
  }
45704
45701
  function wE(t, e) {
45705
45702
  return e instanceof Pt ? _e(t.file, e.file) && _e(t.table, e.table) && jt(t.unresolvedModules, e.unresolvedModules, (n, r2) => AE(n.node, r2.node) && n.includedFull === r2.includedFull) : false;
@@ -45865,7 +45862,7 @@ function qE(t, e) {
45865
45862
  function VE(t, e) {
45866
45863
  if (e.query.name === "interpretFile") {
45867
45864
  const n = t.ast(e.key.value).unwrap().transformedAst;
45868
- throw new et(w.createForNode(n.id, g.ModuleCircularDependencies, n.filePath.toString()));
45865
+ throw new tt(w.createForNode(n.id, g.ModuleCircularDependencies, n.filePath.toString()));
45869
45866
  }
45870
45867
  throw new Error("Circular dependency detected");
45871
45868
  }
@@ -45881,7 +45878,7 @@ function KE(t, e) {
45881
45878
  return new ot(r2.resolvedDiagnostics(n.db));
45882
45879
  }
45883
45880
 
45884
- class et extends Error {
45881
+ class tt extends Error {
45885
45882
  constructor(e) {
45886
45883
  super(e.message), Object.setPrototypeOf(this, new.target.prototype), Error.captureStackTrace && Error.captureStackTrace(this, this.constructor), this.diag = e;
45887
45884
  }
@@ -46123,12 +46120,12 @@ class St extends H {
46123
46120
  }
46124
46121
  var ua = R(Ke, "delegate");
46125
46122
 
46126
- class sn extends H {
46123
+ class an extends H {
46127
46124
  constructor() {
46128
46125
  super(), this.vTable = ua, this.data = null;
46129
46126
  }
46130
46127
  static get Instance() {
46131
- return sn._instance || (sn._instance = new sn), sn._instance;
46128
+ return an._instance || (an._instance = new an), an._instance;
46132
46129
  }
46133
46130
  }
46134
46131
  var pa = R(Ke, "delegate");
@@ -46276,7 +46273,7 @@ class Wn extends H {
46276
46273
  if (r2)
46277
46274
  return r2;
46278
46275
  }
46279
- throw new et(Re.create(g.AdhocError, `Identifier "${e}" not found in scope`));
46276
+ throw new tt(Re.create(g.AdhocError, `Identifier "${e}" not found in scope`));
46280
46277
  }
46281
46278
  findBinding(e) {
46282
46279
  return this.data.bindings.find((n) => n.data.name === e);
@@ -46342,13 +46339,13 @@ function Li(t, e) {
46342
46339
  const n = (r2 = t.typeArguments) == null ? undefined : r2[0];
46343
46340
  if (!n)
46344
46341
  throw new Error("Cannot get inner type of Slot");
46345
- return Xe(e, n);
46342
+ return Ze(e, n);
46346
46343
  }
46347
- function un(t) {
46348
- return t.kind === T.UnionType ? t.types.some((e) => un(e)) : pn(t);
46344
+ function pn(t) {
46345
+ return t.kind === T.UnionType ? t.types.some((e) => pn(e)) : fn(t);
46349
46346
  }
46350
46347
  function np(t, e) {
46351
- if (!pn(t))
46348
+ if (!fn(t))
46352
46349
  return false;
46353
46350
  const n = Li(t, e);
46354
46351
  return n.kind === T.ProductType && n.name === "TemplateString";
@@ -46357,7 +46354,7 @@ function ak(t, e) {
46357
46354
  if (!op(t))
46358
46355
  return false;
46359
46356
  const n = t.typeArguments;
46360
- return !n || n.length === 0 ? false : np(Xe(e, n[0]), e);
46357
+ return !n || n.length === 0 ? false : np(Ze(e, n[0]), e);
46361
46358
  }
46362
46359
  function rp(t) {
46363
46360
  let e = t.split(/\r?\n/);
@@ -46396,14 +46393,14 @@ function ko(t, e) {
46396
46393
  const r2 = t.type(n.value.id);
46397
46394
  if (r2.isOk()) {
46398
46395
  const i = r2.unwrap();
46399
- if (un(i) || ak(i, t))
46396
+ if (pn(i) || ak(i, t))
46400
46397
  return true;
46401
46398
  }
46402
46399
  }
46403
46400
  return false;
46404
46401
  }
46405
46402
  function ck(t, e) {
46406
- return e instanceof Be ? e.isNormalString() ? t.type(e.elements[0].id) : ko(t, e) ? new E(BT(t)) : new E(Ze(t)) : new S(m.WrongKind);
46403
+ return e instanceof Be ? e.isNormalString() ? t.type(e.elements[0].id) : ko(t, e) ? new E(BT(t)) : new E(et(t)) : new S(m.WrongKind);
46407
46404
  }
46408
46405
  function ip(t, e) {
46409
46406
  if (!(e instanceof Be))
@@ -46413,7 +46410,7 @@ function ip(t, e) {
46413
46410
  const n = [];
46414
46411
  return e.getEmbeddedExpressions().forEach((r2) => {
46415
46412
  n.push(w.createForNode(r2.value.id, g.ValueIsUsedAsType, r2.value.text()));
46416
- }), new E(je(t, "reported", Ze(t)), n);
46413
+ }), new E(Ye(t, "reported", et(t)), n);
46417
46414
  }
46418
46415
  function lk(t, e) {
46419
46416
  if (!(e instanceof Be))
@@ -46482,29 +46479,29 @@ function Bi(t) {
46482
46479
  function ve(t) {
46483
46480
  return Yt(t) && t.builtInGeneric === "Partial";
46484
46481
  }
46485
- function pn(t) {
46482
+ function fn(t) {
46486
46483
  return Yt(t) && t.builtInGeneric === "Slot";
46487
46484
  }
46488
46485
  function op(t) {
46489
46486
  return Yt(t) && t.builtInGeneric === "Heredoc";
46490
46487
  }
46491
- function tt(t) {
46488
+ function Je(t) {
46492
46489
  return t.kind === T.DynamicType;
46493
46490
  }
46494
- function He(t) {
46491
+ function Ue(t) {
46495
46492
  return t.kind === T.DynamicBodyType;
46496
46493
  }
46497
- function fn(t) {
46494
+ function dn(t) {
46498
46495
  return t.kind === T.PrimitiveType;
46499
46496
  }
46500
- function dn(t) {
46497
+ function hn(t) {
46501
46498
  return t.kind === T.LiteralType;
46502
46499
  }
46503
46500
  function Le(t) {
46504
- return fn(t) && t.primitiveTypeKind === N.Any;
46501
+ return dn(t) && t.primitiveTypeKind === N.Any;
46505
46502
  }
46506
46503
  function $i(t) {
46507
- return fn(t) && t.primitiveTypeKind === N.Kind;
46504
+ return dn(t) && t.primitiveTypeKind === N.Kind;
46508
46505
  }
46509
46506
  function cp(t) {
46510
46507
  return Yt(t) && t.builtInGeneric === "AccessExpression";
@@ -46569,7 +46566,7 @@ function Ek(t, e) {
46569
46566
  function Dt(t, e) {
46570
46567
  return e.members ? e.members : e.symbol ? t.typeMembers(e.symbol.id).unwrap() : /* @__PURE__ */ new Map;
46571
46568
  }
46572
- function hn(t, e) {
46569
+ function Qt(t, e) {
46573
46570
  return e.kind === T.ProductType ? Dt(t, e) : e.members;
46574
46571
  }
46575
46572
  function kk(t, e) {
@@ -46579,7 +46576,7 @@ function Sn(t) {
46579
46576
  return t.kind === T.AliasReference;
46580
46577
  }
46581
46578
  var wk = 256;
46582
- function Xe(t, e) {
46579
+ function Ze(t, e) {
46583
46580
  let n = e;
46584
46581
  for (let r2 = 0;r2 < wk && Sn(n); r2 += 1)
46585
46582
  n = t.typeFromTypeSymbol(n.target.id).unwrap();
@@ -46623,7 +46620,7 @@ function pp(t) {
46623
46620
  function xk(t, e) {
46624
46621
  if (t.builtInGeneric !== "AccessExpression")
46625
46622
  throw new Error("Expected AccessExpression type");
46626
- return Xe(e, t.typeArguments[0]);
46623
+ return Ze(e, t.typeArguments[0]);
46627
46624
  }
46628
46625
  function fp(t, e) {
46629
46626
  const n = e.asParameter();
@@ -46653,7 +46650,7 @@ function Ik(t, e) {
46653
46650
  return n.value ? t.type(n.value.node.id) : new E(ht(t));
46654
46651
  }
46655
46652
  function Ak(t) {
46656
- if (!tt(t))
46653
+ if (!Je(t))
46657
46654
  return false;
46658
46655
  const { ruleset: e } = t;
46659
46656
  return e.isRuleOn(D.RootNamespace);
@@ -46688,13 +46685,13 @@ class nl extends At {
46688
46685
 
46689
46686
  class _k extends At {
46690
46687
  constructor(e) {
46691
- super("elem_type_as", Ze(e));
46688
+ super("elem_type_as", et(e));
46692
46689
  }
46693
46690
  }
46694
46691
 
46695
46692
  class Ok extends At {
46696
46693
  constructor(e) {
46697
- super("elem_name_as", Ze(e));
46694
+ super("elem_name_as", et(e));
46698
46695
  }
46699
46696
  }
46700
46697
 
@@ -46712,7 +46709,7 @@ class Pk extends At {
46712
46709
 
46713
46710
  class Mk extends At {
46714
46711
  constructor(e) {
46715
- super("body_as", Ze(e));
46712
+ super("body_as", et(e));
46716
46713
  }
46717
46714
  }
46718
46715
 
@@ -46742,7 +46739,7 @@ class Fk extends At {
46742
46739
 
46743
46740
  class Lk extends At {
46744
46741
  constructor(e) {
46745
- super("doc", Ze(e));
46742
+ super("doc", et(e));
46746
46743
  }
46747
46744
  }
46748
46745
 
@@ -46751,7 +46748,7 @@ class Bk extends At {
46751
46748
  super("default", n), this.propName = e;
46752
46749
  }
46753
46750
  }
46754
- var re = /* @__PURE__ */ ((t) => (t.DictType = "DictType", t.DictName = "DictName", t.List = "List", t.Obj = "Obj", t.Static = "Static", t))(re || {});
46751
+ var ne = /* @__PURE__ */ ((t) => (t.DictType = "DictType", t.DictName = "DictName", t.List = "List", t.Obj = "Obj", t.Static = "Static", t))(ne || {});
46755
46752
  var Ee = class Ee {
46756
46753
  constructor(e, n, r2) {
46757
46754
  this.rules = /* @__PURE__ */ new Map, this.id = Ee.idCounter, Ee.idCounter += 1, this.name = e, this.rules = n, this.declarationId = r2.id;
@@ -46809,7 +46806,7 @@ var Ee = class Ee {
46809
46806
  if (!Ee.isRuleEnabled(e, n))
46810
46807
  return false;
46811
46808
  const r2 = e.get(n);
46812
- return fn(r2.valueType) && r2.valueType.primitiveTypeKind === N.Boolean ? r2.value : true;
46809
+ return dn(r2.valueType) && r2.valueType.primitiveTypeKind === N.Boolean ? r2.value : true;
46813
46810
  }
46814
46811
  static isRuleEnabled(e, n) {
46815
46812
  return e.has(n) && e.get(n).enabled;
@@ -46850,7 +46847,7 @@ var Ee = class Ee {
46850
46847
  if (!this.isRuleEnabled(e))
46851
46848
  return false;
46852
46849
  const n = this.rules.get(e);
46853
- return fn(n.valueType) && n.valueType.primitiveTypeKind === N.Boolean ? n.value : true;
46850
+ return dn(n.valueType) && n.valueType.primitiveTypeKind === N.Boolean ? n.value : true;
46854
46851
  }
46855
46852
  isRuleEnabled(e) {
46856
46853
  return this.rules.has(e) && this.rules.get(e).enabled;
@@ -47049,7 +47046,7 @@ function me(t, e, n, r2) {
47049
47046
  if (i.kind === "LiteralType")
47050
47047
  return qk(i, s2, n, r2);
47051
47048
  if (i.kind === "ProductType")
47052
- return ve(i) ? jk(i, s2, n, r2) : pn(i) ? Yk(i, s2, n, r2) : Vk(i, s2, n, r2);
47049
+ return ve(i) ? jk(i, s2, n, r2) : fn(i) ? Yk(i, s2, n, r2) : Vk(i, s2, n, r2);
47053
47050
  if (i.kind === "Signature")
47054
47051
  return Gk(i, s2, n, r2);
47055
47052
  if (i.kind === "DynamicType")
@@ -47065,12 +47062,12 @@ function zk(t, e, n, r2) {
47065
47062
  return ze();
47066
47063
  r2.assumedAliasPairs.add(i);
47067
47064
  try {
47068
- return me(Xe(n, t), Xe(n, e), n, r2);
47065
+ return me(Ze(n, t), Ze(n, e), n, r2);
47069
47066
  } finally {
47070
47067
  r2.assumedAliasPairs.delete(i);
47071
47068
  }
47072
47069
  }
47073
- return me(Xe(n, t), Xe(n, e), n, r2);
47070
+ return me(Ze(n, t), Ze(n, e), n, r2);
47074
47071
  }
47075
47072
  function Tp(t, e) {
47076
47073
  return t === "Number" && e === "Int" ? true : t === e;
@@ -47083,13 +47080,13 @@ function Wk(t, e, n, r2) {
47083
47080
  kind: "Ordinary",
47084
47081
  diags: [Re.create(g.UnexpectedThings, "block body")]
47085
47082
  };
47086
- const i = tt(e) && e.ruleset.structure === re.Static ? xr(e) : e;
47083
+ const i = Je(e) && e.ruleset.structure === ne.Static ? xr(e) : e;
47087
47084
  return i.kind === "PrimitiveType" || i.kind === "LiteralType" ? Tp(t.primitiveTypeKind, i.primitiveTypeKind) ? ze() : st(t, i, n) : i.kind === "UnionType" && i.types.every((s2) => Qe(me(t, s2, n, r2))) ? ze() : st(t, i, n);
47088
47085
  }
47089
47086
  function qk(t, e, n, r2) {
47090
47087
  if (Le(e))
47091
47088
  return ze();
47092
- const i = tt(e) && e.ruleset.structure === re.Static ? xr(e) : e;
47089
+ const i = Je(e) && e.ruleset.structure === ne.Static ? xr(e) : e;
47093
47090
  return (i.kind === "PrimitiveType" || i.kind === "LiteralType") && Tp(t.primitiveTypeKind, i.primitiveTypeKind) ? t.value === i.value ? ze() : st(t, i, n) : i.kind === "UnionType" && i.types.every((s2) => Qe(me(t, s2, n, r2))) ? ze() : st(t, i, n);
47094
47091
  }
47095
47092
  function Vk(t, e, n, r2) {
@@ -47103,7 +47100,7 @@ function Vk(t, e, n, r2) {
47103
47100
  kind: "Product",
47104
47101
  diags: st(t, e, n).diags
47105
47102
  };
47106
- const i = tt(e) && e.ruleset.structure === re.Static ? xr(e) : e;
47103
+ const i = Je(e) && e.ruleset.structure === ne.Static ? xr(e) : e;
47107
47104
  if (i.kind === "BlockType") {
47108
47105
  const s2 = ha(t, i, n, r2);
47109
47106
  return {
@@ -47165,7 +47162,7 @@ function Uk(t, e, n, { t1Name: r2 }, i) {
47165
47162
  function Gk(t, e, n, r2) {
47166
47163
  if (Le(e))
47167
47164
  return ze();
47168
- const i = tt(e) && e.ruleset.structure === re.Static ? xr(e) : e;
47165
+ const i = Je(e) && e.ruleset.structure === ne.Static ? xr(e) : e;
47169
47166
  if (i.kind === "UnionType")
47170
47167
  return i.types.every((a) => Qe(me(t, a, n, r2))) ? ze() : st(t, i, n);
47171
47168
  if (i.kind !== "Signature")
@@ -47192,7 +47189,7 @@ function Ep(t, e, n, r2) {
47192
47189
  matchedType: t.types[0],
47193
47190
  diags: []
47194
47191
  };
47195
- const i = tt(e) && e.ruleset.structure === re.Static ? xr(e) : e;
47192
+ const i = Je(e) && e.ruleset.structure === ne.Static ? xr(e) : e;
47196
47193
  if (i.kind === "UnionType") {
47197
47194
  const f = [];
47198
47195
  for (let h = 0;h < i.types.length; h += 1) {
@@ -47217,7 +47214,7 @@ function Ep(t, e, n, r2) {
47217
47214
  const h = zi(f, n);
47218
47215
  return h.ok && Bi(h.value) ? h.value : undefined;
47219
47216
  }
47220
- return He(f) ? f.type : f;
47217
+ return Ue(f) ? f.type : f;
47221
47218
  }), p = {
47222
47219
  ...t,
47223
47220
  types: u.filter((f) => f !== undefined)
@@ -47301,7 +47298,7 @@ function Yk(t, e, n, r2) {
47301
47298
  var l, u;
47302
47299
  if (Le(e))
47303
47300
  return ze();
47304
- const i = tt(e) && e.ruleset.structure === re.Static ? xr(e) : e;
47301
+ const i = Je(e) && e.ruleset.structure === ne.Static ? xr(e) : e;
47305
47302
  if (i.kind === "UnionType")
47306
47303
  return i.types.every((p) => Qe(me(t, p, n, r2))) ? ze() : st(t, i, n);
47307
47304
  const s2 = (l = t.typeArguments) == null ? undefined : l[0];
@@ -47310,10 +47307,10 @@ function Yk(t, e, n, r2) {
47310
47307
  kind: "Product",
47311
47308
  diags: [Re.create(g.MissingTypeArguments, "Slot", "1")]
47312
47309
  };
47313
- if (!pn(i)) {
47310
+ if (!fn(i)) {
47314
47311
  let p;
47315
- const f = Xe(n, s2);
47316
- return f.kind === "ProductType" && f.name === "TemplateString" ? p = me(Ze(n), i, n, r2) : p = me(s2, i, n, r2), it(p.diags) ? {
47312
+ const f = Ze(n, s2);
47313
+ return f.kind === "ProductType" && f.name === "TemplateString" ? p = me(et(n), i, n, r2) : p = me(s2, i, n, r2), it(p.diags) ? {
47317
47314
  kind: p.kind,
47318
47315
  diags: hr(t, i, n, p.diags)
47319
47316
  } : p;
@@ -47324,7 +47321,7 @@ function Yk(t, e, n, r2) {
47324
47321
  kind: "Product",
47325
47322
  diags: [Re.create(g.MissingTypeArguments, "Slot", "2")]
47326
47323
  };
47327
- const o = Xe(n, s2), c = Xe(n, a);
47324
+ const o = Ze(n, s2), c = Ze(n, a);
47328
47325
  return o.kind === "PrimitiveType" && o.primitiveTypeKind === "String" && c.kind === "ProductType" && c.name === "TemplateString" ? ze() : me(s2, a, n, r2);
47329
47326
  }
47330
47327
  function Hk(t, e) {
@@ -47365,10 +47362,10 @@ function Xk(t, e, n, r2, i) {
47365
47362
  return true;
47366
47363
  }
47367
47364
  function Zk(t, e, n, r2) {
47368
- return Le(e) ? ze() : tt(e) ? Qe(sp(t.ruleset, e.ruleset)) && Qe(me(t.type, e.type, n, r2)) ? ze() : {
47365
+ return Le(e) ? ze() : Je(e) ? Qe(sp(t.ruleset, e.ruleset)) && Qe(me(t.type, e.type, n, r2)) ? ze() : {
47369
47366
  kind: "Ordinary",
47370
47367
  diags: hr(t, e, n)
47371
- } : t.ruleset.structure === re.Static ? {
47368
+ } : t.ruleset.structure === ne.Static ? {
47372
47369
  kind: "Ordinary",
47373
47370
  diags: me(t.type, e, n, r2).diags
47374
47371
  } : st(t, e, n);
@@ -47412,7 +47409,7 @@ function ha(t, e, n, r2) {
47412
47409
  } else
47413
47410
  _r(c) || i.push(w.createForNode(c.id, g.UnexpectedThings, "element"));
47414
47411
  }), r2 != null && r2.propsOptional || Dt(n, t).forEach((c, l) => {
47415
- !tt(c.type) && c.symbol.kind !== y.BuiltInProperty && c.symbol.kind !== y.DefaultElementName && !s2.matchProps.has(l) && i.push(Re.create(g.MissingPropertyOnElement, l, U(t, { db: n })));
47412
+ !Je(c.type) && c.symbol.kind !== y.BuiltInProperty && c.symbol.kind !== y.DefaultElementName && !s2.matchProps.has(l) && i.push(Re.create(g.MissingPropertyOnElement, l, U(t, { db: n })));
47416
47413
  }), r2 != null && r2.propsOptional && (i = i.filter((c) => c.code !== 3003)), {
47417
47414
  diags: i,
47418
47415
  staticState: s2,
@@ -47441,7 +47438,7 @@ function rl(t, e, n, r2, i, s2) {
47441
47438
  throw new Error("Expected identifier");
47442
47439
  const { ruleset: a } = t.type, o = t.name, { structure: c } = a;
47443
47440
  let l;
47444
- if (c === re.DictName || c === re.DictType || c === re.List) {
47441
+ if (c === ne.DictName || c === ne.DictType || c === ne.List) {
47445
47442
  if (t.type.type.kind !== "ProductType")
47446
47443
  throw new Error("Expected product type");
47447
47444
  const p = Dt(r2, t.type.type);
@@ -47453,7 +47450,7 @@ function rl(t, e, n, r2, i, s2) {
47453
47450
  l = f.returnType;
47454
47451
  } else
47455
47452
  l = t.type.type;
47456
- He(l) && (l = l.type);
47453
+ Ue(l) && (l = l.type);
47457
47454
  const u = [];
47458
47455
  if (a.isRuleOn(D.NameAs) && e instanceof F)
47459
47456
  return [w.createForNode(e.elementType.id, g.ExpectedThings, "element's name")];
@@ -47505,22 +47502,22 @@ function gs(t, e) {
47505
47502
  function ma(t, e) {
47506
47503
  return t.map((n) => n instanceof w || n instanceof Z ? n : new w(e.id, n.message, n.category, n.code, n.children));
47507
47504
  }
47508
- function Ge(t, e, n) {
47505
+ function je(t, e, n) {
47509
47506
  return Qe(me(t, e, n));
47510
47507
  }
47511
47508
  function ni(t, e, n) {
47512
- const r2 = hn(n, e);
47509
+ const r2 = Qt(n, e);
47513
47510
  if (!r2)
47514
47511
  return;
47515
47512
  const i = r2.get(t);
47516
47513
  if (i)
47517
47514
  return { name: t, type: i.type, symbol: i.symbol };
47518
- const s2 = [...r2].find(([a, { type: o }]) => tt(o) && o.ruleset.isRuleOn(D.TypeAs));
47515
+ const s2 = [...r2].find(([a, { type: o }]) => Je(o) && o.ruleset.isRuleOn(D.TypeAs));
47519
47516
  return s2 ? { name: s2[0], type: s2[1].type, symbol: s2[1].symbol } : undefined;
47520
47517
  }
47521
47518
  function ya(t, e, n) {
47522
47519
  var r2, i, s2;
47523
- if (He(e))
47520
+ if (Ue(e))
47524
47521
  return ya(t, e.type, n);
47525
47522
  if (e.kind === "UnionType") {
47526
47523
  let a = [];
@@ -47529,12 +47526,12 @@ function ya(t, e, n) {
47529
47526
  c && a.push(c);
47530
47527
  }), a = po(a, Ht), a.length === 0 ? undefined : Bt(a);
47531
47528
  }
47532
- if (hn(n, e)) {
47529
+ if (Qt(n, e)) {
47533
47530
  const a = (r2 = ni(t, e, n)) == null ? undefined : r2.type;
47534
- if (a && tt(a)) {
47531
+ if (a && Je(a)) {
47535
47532
  const { ruleset: o } = a, { structure: c } = o;
47536
- if (c === re.DictType || c === re.DictName || c === re.List) {
47537
- const { returnType: l } = (s2 = (i = hn(n, a.type)) == null ? undefined : i.get("__call__")) == null ? undefined : s2.type;
47533
+ if (c === ne.DictType || c === ne.DictName || c === ne.List) {
47534
+ const { returnType: l } = (s2 = (i = Qt(n, a.type)) == null ? undefined : i.get("__call__")) == null ? undefined : s2.type;
47538
47535
  return l;
47539
47536
  }
47540
47537
  return a.type;
@@ -47774,7 +47771,7 @@ function lw(t) {
47774
47771
  function Ir(t) {
47775
47772
  return cw(t) ? yt.Private : yt.Public;
47776
47773
  }
47777
- function en(t) {
47774
+ function tn(t) {
47778
47775
  return t instanceof $ && t.elementType.value.kind === d.FUNC_KEYWORD;
47779
47776
  }
47780
47777
  function Ip(t) {
@@ -47789,7 +47786,7 @@ function Ap(t) {
47789
47786
  function Io(t) {
47790
47787
  return t instanceof $ && t.elementType.value.kind === d.TYPE_KEYWORD && t.body instanceof L;
47791
47788
  }
47792
- function Je(t) {
47789
+ function Xe(t) {
47793
47790
  return t instanceof Y && t.op.value === ".";
47794
47791
  }
47795
47792
  function uw(t) {
@@ -47802,7 +47799,7 @@ function _p(t) {
47802
47799
  var e;
47803
47800
  if (!((e = t.parent) != null && e.parent))
47804
47801
  throw new Error("Expected node parent");
47805
- return en(t.parent.parent) || Ip(t.parent.parent);
47802
+ return tn(t.parent.parent) || Ip(t.parent.parent);
47806
47803
  }
47807
47804
  function pw(t) {
47808
47805
  return t instanceof Wt;
@@ -47810,7 +47807,7 @@ function pw(t) {
47810
47807
  function Es(t) {
47811
47808
  return t instanceof pe && t.elementType.value.kind !== d.TYPE_KEYWORD && t.elementType.value.kind !== d.USE_KEYWORD;
47812
47809
  }
47813
- function on(t) {
47810
+ function cn(t) {
47814
47811
  return t instanceof $ && t.elementType.value.kind === d.USE_KEYWORD;
47815
47812
  }
47816
47813
  function _n(t) {
@@ -47913,7 +47910,7 @@ function ut(t, e, n, r2 = (i, s2, a, o) => {
47913
47910
  function fe(t) {
47914
47911
  return !(t.isErr() && t.err() === m.WrongKind);
47915
47912
  }
47916
- function Qt(t) {
47913
+ function Jt(t) {
47917
47914
  const e = t.document();
47918
47915
  return e != null && e.content.isNormalString() ? rp(e.content.elements[0].value.value) : "";
47919
47916
  }
@@ -48847,7 +48844,7 @@ function Iw(t, e) {
48847
48844
  }).join(", ");
48848
48845
  }
48849
48846
  function Aw(t, e) {
48850
- if (!Je(e))
48847
+ if (!Xe(e))
48851
48848
  throw new Error("Expected property access expression");
48852
48849
  const n = t.symbol(e.leftExpression.id);
48853
48850
  if (n.isErr())
@@ -48886,7 +48883,7 @@ function Ow(t, e) {
48886
48883
  i = s2(t, r2, i);
48887
48884
  return i;
48888
48885
  }
48889
- function Jt(t, e, n, r2) {
48886
+ function Xt(t, e, n, r2) {
48890
48887
  const i = n.scope(t.id), s2 = [];
48891
48888
  if (v(s2, i.diagnostics), i.isOk()) {
48892
48889
  const a = i.unwrap();
@@ -48895,7 +48892,7 @@ function Jt(t, e, n, r2) {
48895
48892
  if (!(t instanceof ce)) {
48896
48893
  if (!t.parent)
48897
48894
  throw new Error("Node parent is undefined");
48898
- const p = Jt(t.parent, e, n, r2);
48895
+ const p = Xt(t.parent, e, n, r2);
48899
48896
  return v(s2, p.diagnostics), p.isOk() ? new E(p.unwrap(), s2) : new S(p.err(), s2);
48900
48897
  }
48901
48898
  if (n.globalScope().has(n, e))
@@ -48911,7 +48908,7 @@ function Jt(t, e, n, r2) {
48911
48908
  }
48912
48909
  if (!t.parent)
48913
48910
  throw new Error("Node parent is undefined");
48914
- return Jt(t.parent, e, n, r2).chain((a) => new E(a, s2));
48911
+ return Xt(t.parent, e, n, r2).chain((a) => new E(a, s2));
48915
48912
  }
48916
48913
  function bi(t, e) {
48917
48914
  if (t.globalScope().has(t, e))
@@ -49112,12 +49109,12 @@ function qw(t, e, n) {
49112
49109
  return [...i.diagnostics];
49113
49110
  const s2 = t.type(n.id).unwrap();
49114
49111
  let a = n.leftExpression;
49115
- if (He(s2)) {
49112
+ if (Ue(s2)) {
49116
49113
  const l = s2.parentType, { ruleset: u } = l;
49117
49114
  if (u.isRuleOn(D.RootNamespace)) {
49118
49115
  const p = t.type(n.leftExpression.id).unwrap();
49119
- if (tt(p)) {
49120
- if (!Je(n.leftExpression))
49116
+ if (Je(p)) {
49117
+ if (!Xe(n.leftExpression))
49121
49118
  throw new Error("Expected property access expression");
49122
49119
  a = n.leftExpression.leftExpression;
49123
49120
  }
@@ -49144,7 +49141,7 @@ function Kw(t, e, n) {
49144
49141
  if (s2.value) {
49145
49142
  const a = dp(n, i);
49146
49143
  if (v(r2, a.diagnostics), cp(t.type))
49147
- if (!Je(s2.value.node))
49144
+ if (!Xe(s2.value.node))
49148
49145
  r2.push(w.createForNode(i.id, g.ExpectedThings, "property access expression"));
49149
49146
  else {
49150
49147
  const o = qw(n, t.type, s2.value.node);
@@ -49192,7 +49189,7 @@ function Do(t, e, n, r2) {
49192
49189
  case T.UnionType:
49193
49190
  return Yw(t, e, n, r2);
49194
49191
  default:
49195
- return tt(t) ? Do(t.type, e, n, r2) : undefined;
49192
+ return Je(t) ? Do(t.type, e, n, r2) : undefined;
49196
49193
  }
49197
49194
  }
49198
49195
  function Bp(t, e, n, r2) {
@@ -49308,7 +49305,7 @@ function tv(t, e) {
49308
49305
  var c;
49309
49306
  const { program: n } = t, r2 = t.nodeById(e);
49310
49307
  if (!r2)
49311
- return new lr(new E(je(t, "unreported")), [], [], "fallback");
49308
+ return new lr(new E(Ye(t, "unreported")), [], [], "fallback");
49312
49309
  let i = new S(m.WrongKind);
49313
49310
  for (const l of n.customModuleProviders.typeFromTypeExpression.replacing)
49314
49311
  if (i = l(t, r2), fe(i))
@@ -49322,7 +49319,7 @@ function tv(t, e) {
49322
49319
  const a = s2 && i.isOk() && ((c = rt(r2)) != null && c.typeParameter) && !mo(r2).length ? [QT(t, r2, i.unwrap())] : [], o = Yu(r2);
49323
49320
  for (const l of n.customModuleProviders.typeFromTypeExpression.extending)
49324
49321
  i = l(t, r2, i);
49325
- return i.isErr() && An(r2) && (i = new E(je(t), [w.createForNode(e, g.CannotResolveExpressionToType)])), new lr(i, a, o, s2 ? "builtin" : "fallback");
49322
+ return i.isErr() && An(r2) && (i = new E(Ye(t), [w.createForNode(e, g.CannotResolveExpressionToType)])), new lr(i, a, o, s2 ? "builtin" : "fallback");
49326
49323
  }
49327
49324
  function nv(t, e) {
49328
49325
  var s2, a;
@@ -49416,7 +49413,7 @@ function cv(t, e) {
49416
49413
  function ir(t, e) {
49417
49414
  var n;
49418
49415
  if (Sn(e))
49419
- return ir(t, Xe(t, e));
49416
+ return ir(t, Ze(t, e));
49420
49417
  if (e.kind === T.DynamicType || e.kind === T.DynamicBodyType)
49421
49418
  return ir(t, e.type);
49422
49419
  if (ve(e) && ((n = e.typeArguments) != null && n.length)) {
@@ -49425,7 +49422,7 @@ function ir(t, e) {
49425
49422
  return;
49426
49423
  const i = ir(t, r2);
49427
49424
  return new Map([
49428
- ...hn(t, e) ?? [],
49425
+ ...Qt(t, e) ?? [],
49429
49426
  ...[...i ?? []].filter(([, s2]) => s2.symbol.kind !== y.BuiltInProperty)
49430
49427
  ]);
49431
49428
  }
@@ -49438,7 +49435,7 @@ function ir(t, e) {
49438
49435
  type: f.generatedProps.type
49439
49436
  });
49440
49437
  }) : i;
49441
- }, /* @__PURE__ */ new Map) : hn(t, e);
49438
+ }, /* @__PURE__ */ new Map) : Qt(t, e);
49442
49439
  }
49443
49440
  function lv(t, e, n, r2 = false) {
49444
49441
  const i = ir(t, e);
@@ -49446,7 +49443,7 @@ function lv(t, e, n, r2 = false) {
49446
49443
  if (r2) {
49447
49444
  for (const s2 of i.values())
49448
49445
  if (Ak(s2.type)) {
49449
- const a = hn(t, s2.type.type);
49446
+ const a = Qt(t, s2.type.type);
49450
49447
  if (a != null && a.has(n))
49451
49448
  return a.get(n);
49452
49449
  }
@@ -49475,8 +49472,8 @@ function uv(t, e) {
49475
49472
  i = o(t, r2, i);
49476
49473
  return i;
49477
49474
  }
49478
- function tn(t, e) {
49479
- const n = ir(t, e), r2 = new Ue;
49475
+ function nn(t, e) {
49476
+ const n = ir(t, e), r2 = new Ge;
49480
49477
  return n == null || n.forEach((i, s2) => r2.set(s2, i.symbol)), n ? new E(r2) : new S(m.Error);
49481
49478
  }
49482
49479
  function pv(t, e) {
@@ -49575,7 +49572,7 @@ function mv(t, e, n, r2) {
49575
49572
  s2.add(c.paramIdx);
49576
49573
  let l;
49577
49574
  if (c.param.isRestParam) {
49578
- const u = Xe(t, pp(c.param.type));
49575
+ const u = Ze(t, pp(c.param.type));
49579
49576
  l = xn(u, a.type, a.node, g.MismatchedArgumentType, t, U(a.type, { db: t }), U(u, { db: t }));
49580
49577
  } else
49581
49578
  l = xn(c.param.type, a.type, a.node, g.MismatchedArgumentType, t, U(a.type, { db: t }), U(c.param.type, { db: t }));
@@ -49637,7 +49634,7 @@ function yv() {
49637
49634
  const r2 = {};
49638
49635
  for (const [s2, a] of e.members.entries())
49639
49636
  a instanceof Pe && ((i = a.rules) != null && i.root_namespace) || (r2[s2] = a.toJsStructure());
49640
- return e.type && !He(e.type) && (r2.__type__ = U(e.type)), e.setCachedJsObject(r2), r2;
49637
+ return e.type && !Ue(e.type) && (r2.__type__ = U(e.type)), e.setCachedJsObject(r2), r2;
49641
49638
  })), Fs = t;
49642
49639
  }
49643
49640
  return Fs;
@@ -49667,7 +49664,7 @@ function Wp(t, e, n) {
49667
49664
  throw new Error("Cannot resolve the access expression to a field reference");
49668
49665
  if ((e.leftExpression instanceof I || e.leftExpression instanceof Y) && e.rightExpression instanceof I) {
49669
49666
  const s2 = Wp(t, e.leftExpression, n), a = t.type(e.id).unwrap();
49670
- if (He(a)) {
49667
+ if (Ue(a)) {
49671
49668
  const { ruleset: o } = a.parentType;
49672
49669
  if (o.isRuleOn(D.RootNamespace) && Hn(s2) === o.name)
49673
49670
  return [...s2.slice(0, -1), e.rightExpression.value.value];
@@ -49677,13 +49674,13 @@ function Wp(t, e, n) {
49677
49674
  throw new Error("Cannot resolve the access expression to a field reference");
49678
49675
  }
49679
49676
  function Tv(t, e, n, r2, i, s2, a) {
49680
- if (t !== re.Static || !e.body)
49677
+ if (t !== ne.Static || !e.body)
49681
49678
  return;
49682
49679
  if (a && e.body instanceof L) {
49683
49680
  const l = ws(a.obj, a.path);
49684
49681
  if (l && !(l instanceof Ne)) {
49685
49682
  if (!l.type || l.type.kind !== T.ProductType)
49686
- throw new et(w.createForNode(e.id, g.AdhocError, "Cannot infer exact type for this prop. Please specify the type explicitly and declare the full structure"));
49683
+ throw new tt(w.createForNode(e.id, g.AdhocError, "Cannot infer exact type for this prop. Please specify the type explicitly and declare the full structure"));
49687
49684
  return {
49688
49685
  value: Vn(e.body, r2, i, l.type, { baseContext: a }, s2),
49689
49686
  metadata: /* @__PURE__ */ new Map,
@@ -49694,7 +49691,7 @@ function Tv(t, e, n, r2, i, s2, a) {
49694
49691
  if (e.body instanceof L) {
49695
49692
  const l = n.type;
49696
49693
  if (l.kind !== T.ProductType)
49697
- throw l.kind === T.UnionType ? new et(w.createForNode(e.body.id, g.AdhocError, "Cannot infer exact type for this prop. Please specify the type explicitly and declare the full structure")) : new Error("Expected product type");
49694
+ throw l.kind === T.UnionType ? new tt(w.createForNode(e.body.id, g.AdhocError, "Cannot infer exact type for this prop. Please specify the type explicitly and declare the full structure")) : new Error("Expected product type");
49698
49695
  return {
49699
49696
  value: Vn(e.body, r2, i, l, { baseContext: a }, s2),
49700
49697
  metadata: /* @__PURE__ */ new Map,
@@ -49770,16 +49767,16 @@ function xv(t, e, n, r2, i, s2) {
49770
49767
  let a = e.type;
49771
49768
  if (s2) {
49772
49769
  const o = e.parentType, { ruleset: c } = o, { structure: l } = c;
49773
- if (l !== re.List) {
49770
+ if (l !== ne.List) {
49774
49771
  const u = ws(s2.obj, s2.path);
49775
49772
  if (u != null && u.type)
49776
49773
  a = u.type;
49777
49774
  else if (u && !(u instanceof Ne))
49778
- throw new et(w.createForNode(t.id, g.AdhocError, "Cannot infer exact type for this prop. Please specify the type explicitly and declare the full structure"));
49775
+ throw new tt(w.createForNode(t.id, g.AdhocError, "Cannot infer exact type for this prop. Please specify the type explicitly and declare the full structure"));
49779
49776
  }
49780
49777
  }
49781
49778
  if (a.kind !== T.ProductType)
49782
- throw new et(w.createForNode(t.id, g.AdhocError, "Cannot infer exact type for this prop. Please specify the type explicitly and declare the full structure"));
49779
+ throw new tt(w.createForNode(t.id, g.AdhocError, "Cannot infer exact type for this prop. Please specify the type explicitly and declare the full structure"));
49783
49780
  return Vn(t.body, n, r2, a, { baseContext: s2 }, i);
49784
49781
  }
49785
49782
  function Iv(t, e, n, r2, i) {
@@ -49922,7 +49919,7 @@ function Mv(t, e, n) {
49922
49919
  if (!(r2 != null && r2.type))
49923
49920
  return false;
49924
49921
  const i = e.type(t.id).unwrap();
49925
- return Ge(r2.type, i, e.db);
49922
+ return je(r2.type, i, e.db);
49926
49923
  }
49927
49924
  function Bo(t, e) {
49928
49925
  const n = Qn(t, e.db);
@@ -49938,7 +49935,7 @@ function Dv(t, e, n, r2 = false) {
49938
49935
  const i = /* @__PURE__ */ new Map;
49939
49936
  let s2;
49940
49937
  return Dt(n.db, t).forEach((a, o) => {
49941
- if (tt(a.type)) {
49938
+ if (Je(a.type)) {
49942
49939
  if (i.set(o, Ne.Instance), !r2 && a.type.ruleset.isRuleEnabled(D.Default)) {
49943
49940
  const c = a.type.ruleset.getRule(D.Default), l = n.nodeById(c.declarationId).asAmlTypeOption(), u = n.interpretNode(l.value.node, e).returnVal;
49944
49941
  i.set(o, u);
@@ -49964,10 +49961,10 @@ function Nv(t, e, n, r2, i, s2) {
49964
49961
  if (o != null && o.type)
49965
49962
  a = o.type;
49966
49963
  else if (o && !(o instanceof Ne))
49967
- throw new et(w.createForNode(t.id, g.AdhocError, "Cannot infer exact type for this prop. Please specify the type explicitly and declare the full structure"));
49964
+ throw new tt(w.createForNode(t.id, g.AdhocError, "Cannot infer exact type for this prop. Please specify the type explicitly and declare the full structure"));
49968
49965
  }
49969
49966
  if (a.kind !== T.ProductType)
49970
- throw new et(w.createForNode(t.id, g.AdhocError, "Cannot infer exact type for this prop. Please specify the type explicitly and declare the full structure"));
49967
+ throw new tt(w.createForNode(t.id, g.AdhocError, "Cannot infer exact type for this prop. Please specify the type explicitly and declare the full structure"));
49971
49968
  return Vn(t.body, n, r2, a, { baseContext: s2 }, i);
49972
49969
  }
49973
49970
  function Vn(t, e, n, r2, i, s2 = false) {
@@ -49979,19 +49976,19 @@ function Vn(t, e, n, r2, i, s2 = false) {
49979
49976
  if (_r(u))
49980
49977
  return;
49981
49978
  const p = n.symbol(u.id).unwrap(), f = n.specificType(p.id).unwrap();
49982
- if (He(f)) {
49979
+ if (Ue(f)) {
49983
49980
  if (!(u instanceof F) && !(u instanceof $))
49984
49981
  throw new Error("Unreachable");
49985
49982
  if (!(u.elementType instanceof I))
49986
49983
  throw new Error("Expected identifier");
49987
- const h = G2.create(Qt(u)), { parentType: k } = f, { ruleset: b } = k, { structure: x } = b;
49988
- if (x === re.List) {
49984
+ const h = G2.create(Jt(u)), { parentType: k } = f, { ruleset: b } = k, { structure: x } = b;
49985
+ if (x === ne.List) {
49989
49986
  const A = Bs(o, b, x), M = Si(k, f, u, e, n, s2, h, a ? { obj: a.obj, path: a.path.concat(b.name) } : undefined);
49990
49987
  R(A, "push", M), o.set(b.name, A);
49991
- } else if (x === re.DictType) {
49988
+ } else if (x === ne.DictType) {
49992
49989
  const A = Bs(o, b, x), M = Si(k, f, u, e, n, s2, h, a ? { obj: a.obj, path: a.path.concat([b.name, u.elementType.value.value]) } : undefined);
49993
49990
  A.members.set(u.elementType.value.value, M), o.set(b.name, A);
49994
- } else if (x === re.DictName) {
49991
+ } else if (x === ne.DictName) {
49995
49992
  if (!(u instanceof $) || !(u.elementName instanceof I))
49996
49993
  throw new Error("Unreachable");
49997
49994
  const A = Bs(o, b, x), M = Si(k, f, u, e, n, s2, h, a ? { obj: a.obj, path: a.path.concat([b.name, u.elementName.value.value]) } : undefined);
@@ -50011,14 +50008,14 @@ function Vn(t, e, n, r2, i, s2 = false) {
50011
50008
  h = A, M && Ar(u.body) && (k = true);
50012
50009
  }
50013
50010
  u.decorators && (h = Dr(n, u.decorators, u, h, e));
50014
- const b = G2.create(Qt(u)), x = Kp(h, /* @__PURE__ */ new Map([["__doc__", b]]), undefined, { nodeId: u.id, shouldMerge: k });
50011
+ const b = G2.create(Jt(u)), x = Kp(h, /* @__PURE__ */ new Map([["__doc__", b]]), undefined, { nodeId: u.id, shouldMerge: k });
50015
50012
  o.set(u.elementType.value.value, x);
50016
50013
  }
50017
50014
  }), c ? new H(o, yv(), r2) : new H(o, undefined, r2);
50018
50015
  }
50019
50016
  function Fv(t, e) {
50020
50017
  const { structure: n } = e;
50021
- if (![re.List, re.DictType, re.DictName].includes(n))
50018
+ if (![ne.List, ne.DictType, ne.DictName].includes(n))
50022
50019
  return;
50023
50020
  const r2 = hw(t);
50024
50021
  if (r2 !== undefined)
@@ -50041,7 +50038,7 @@ function Si(t, e, n, r2, i, s2, a, o) {
50041
50038
  return i.options.childIdxForDynamicProp && Lv(n, h, t.ruleset), h;
50042
50039
  }
50043
50040
  function Bs(t, e, n, r2) {
50044
- return t.get(e.name) && $e(t.get(e.name)) instanceof Ne && (n === re.List ? t.set(e.name, new lt([], true)) : n === re.DictType ? t.set(e.name, new zn) : n === re.DictName && t.set(e.name, new zn(undefined, undefined))), t.get(e.name);
50041
+ return t.get(e.name) && $e(t.get(e.name)) instanceof Ne && (n === ne.List ? t.set(e.name, new lt([], true)) : n === ne.DictType ? t.set(e.name, new zn) : n === ne.DictName && t.set(e.name, new zn(undefined, undefined))), t.get(e.name);
50045
50042
  }
50046
50043
  function Bv(t, e, n, r2, i, s2, a = false) {
50047
50044
  const { ruleset: o } = t, { structure: c } = o, l = Tv(c, n, e, r2, i, a, s2);
@@ -50058,7 +50055,7 @@ function Bv(t, e, n, r2, i, s2, a = false) {
50058
50055
  }
50059
50056
  return Iv(h, u, p, e, { shouldMerge: f });
50060
50057
  }
50061
- function rn(t) {
50058
+ function sn(t) {
50062
50059
  return new W((...e) => {
50063
50060
  throw new Error("Built-in constructors shouldn't be called directly");
50064
50061
  });
@@ -50090,7 +50087,7 @@ var al = false;
50090
50087
  function jp(t) {
50091
50088
  var r2;
50092
50089
  const e = t instanceof Pe ? t : undefined, n = e == null ? undefined : e.type;
50093
- if (n && !He(n)) {
50090
+ if (n && !Ue(n)) {
50094
50091
  const i = n;
50095
50092
  if (!gi(i) && i.kind === T.ProductType) {
50096
50093
  const s2 = [];
@@ -50098,7 +50095,7 @@ function jp(t) {
50098
50095
  throw new Error(`Internal: type '${i.name}' reached the runtime without its members`);
50099
50096
  i.members.forEach((c, l) => {
50100
50097
  var u;
50101
- ((u = c == null ? undefined : c.symbol) == null ? undefined : u.kind) === y.TypeProperty && (tt(c.type) || s2.push(l));
50098
+ ((u = c == null ? undefined : c.symbol) == null ? undefined : u.kind) === y.TypeProperty && (Je(c.type) || s2.push(l));
50102
50099
  });
50103
50100
  const a = t.members, o = [];
50104
50101
  if (s2.forEach((c) => {
@@ -50106,7 +50103,7 @@ function jp(t) {
50106
50103
  l && !(l instanceof Ne) || o.push(c);
50107
50104
  }), o.length) {
50108
50105
  const c = o.join(", "), l = t instanceof Pe ? (r2 = t.hiddenMetadata) == null ? undefined : r2.nodeId : undefined;
50109
- throw l ? new et(w.createForNode(l, g.MissingPropertiesForExtend, c)) : new et(Re.create(g.MissingPropertiesForExtend, c));
50106
+ throw l ? new tt(w.createForNode(l, g.MissingPropertiesForExtend, c)) : new tt(Re.create(g.MissingPropertiesForExtend, c));
50110
50107
  }
50111
50108
  }
50112
50109
  }
@@ -50124,7 +50121,7 @@ function qv() {
50124
50121
  const n = {};
50125
50122
  for (const [r2, i] of t.members.entries())
50126
50123
  n[r2] = i.toJsStructure();
50127
- return t.type && !He(t.type) && !(t.type.kind === T.ProductType && !t.type.name) && (n.__type__ = U(t.type)), t.setCachedJsObject(n), n;
50124
+ return t.type && !Ue(t.type) && !(t.type.kind === T.ProductType && !t.type.name) && (n.__type__ = U(t.type)), t.setCachedJsObject(n), n;
50128
50125
  })), R(Ke, "addMethod", Gp, new W((t, e) => {
50129
50126
  let n = e;
50130
50127
  if (e.data && e.data.isRawBlockObject) {
@@ -50187,7 +50184,7 @@ function qv() {
50187
50184
  }
50188
50185
  }
50189
50186
  function ol(t) {
50190
- return pw(t) ? 0 : Io(t) ? 1 : en(t) ? 2 : Ap(t) ? 3 : 4;
50187
+ return pw(t) ? 0 : Io(t) ? 1 : tn(t) ? 2 : Ap(t) ? 3 : 4;
50191
50188
  }
50192
50189
  function Vv(t, e) {
50193
50190
  if (!(e instanceof ce))
@@ -50219,7 +50216,7 @@ function Kv(t, e) {
50219
50216
  function Uv(t, e) {
50220
50217
  return e instanceof ce ? $o(e, e.statements, t) : new S(m.WrongKind);
50221
50218
  }
50222
- function $o(t, e, n, r2 = new Ue) {
50219
+ function $o(t, e, n, r2 = new Ge) {
50223
50220
  const i = [];
50224
50221
  return e.filter((a) => Ti(a) && !(a instanceof L)).forEach((a) => {
50225
50222
  const o = n.mergeableInnerScope(a.id);
@@ -50255,7 +50252,7 @@ function jv(t, e, n) {
50255
50252
  return m.WrongKind;
50256
50253
  const r2 = [...t.statements], i = r2.length > 0 ? r2[r2.length - 1] : null;
50257
50254
  r2.sort((a, o) => ol(a) - ol(o));
50258
- let s2 = sn.Instance;
50255
+ let s2 = an.Instance;
50259
50256
  return r2.forEach((a) => {
50260
50257
  const o = n.program.interpretNode(a, e);
50261
50258
  i && a.id.key === i.id.key && (s2 = o.returnVal);
@@ -50287,7 +50284,7 @@ function Jv(t, e, n) {
50287
50284
  if (!(t instanceof L))
50288
50285
  return m.WrongKind;
50289
50286
  const r2 = e.createLocal();
50290
- let i = sn.Instance;
50287
+ let i = an.Instance;
50291
50288
  return t.body.forEach((s2) => {
50292
50289
  i = n.program.interpretNode(s2, e).returnVal;
50293
50290
  }), new ie(r2, i);
@@ -50391,7 +50388,7 @@ function lb(t, e) {
50391
50388
  return t.typecheck(e.body.id).concat(r2);
50392
50389
  }
50393
50390
  function ub(t, e) {
50394
- return e.kind !== y.BlockScopedVariable ? new S(m.WrongKind) : t.specificType(e.id).chain((n) => tn(t, n));
50391
+ return e.kind !== y.BlockScopedVariable ? new S(m.WrongKind) : t.specificType(e.id).chain((n) => nn(t, n));
50395
50392
  }
50396
50393
  function pb(t, e, n) {
50397
50394
  var s2;
@@ -50400,7 +50397,7 @@ function pb(t, e, n) {
50400
50397
  if (!t.body)
50401
50398
  throw new Error("Expected node body");
50402
50399
  let r2 = n.program.interpretNode(t.body, e).returnVal;
50403
- r2.members.set("__doc__", G2.create(Qt(t)));
50400
+ r2.members.set("__doc__", G2.create(Jt(t)));
50404
50401
  const i = n.symbol(t.id).unwrap();
50405
50402
  return t.decorators && (r2 = Dr(n.program, t.decorators, t, r2, e)), r2 = Co(n, r2, t.elementName.value.value, e, r.create(t.id.filepath)), e.data.bindings.push(new De({
50406
50403
  name: t.elementName.value.value,
@@ -50429,7 +50426,7 @@ function db(t, e) {
50429
50426
  return e.kind !== y.BuiltInType ? new S(m.WrongKind) : new E(e.type(t));
50430
50427
  }
50431
50428
  function hb(t, e) {
50432
- return e.kind !== y.BuiltInType ? new S(m.WrongKind) : t.specificType(e.id).chain((n) => tn(t, n));
50429
+ return e.kind !== y.BuiltInType ? new S(m.WrongKind) : t.specificType(e.id).chain((n) => nn(t, n));
50433
50430
  }
50434
50431
  var mb = {
50435
50432
  name: "BuiltInType",
@@ -50450,7 +50447,7 @@ function yb(t, e) {
50450
50447
  return new E(i);
50451
50448
  }
50452
50449
  function gb(t, e) {
50453
- return Sr(e) ? t.specificType(e.id).chain((n) => tn(t, n)) : new S(m.WrongKind);
50450
+ return Sr(e) ? t.specificType(e.id).chain((n) => nn(t, n)) : new S(m.WrongKind);
50454
50451
  }
50455
50452
  var Tb = {
50456
50453
  name: "CompoundSymbol",
@@ -50517,10 +50514,10 @@ function bb(t, e) {
50517
50514
  const n = t.nodeById(e.declarationId);
50518
50515
  if (!(n instanceof $) && !(n instanceof F))
50519
50516
  throw new Error("Expected symbol declaration");
50520
- const r2 = [], i = qu(t, n), s2 = t.specificType(e.id).chain((o) => tn(t, o));
50517
+ const r2 = [], i = qu(t, n), s2 = t.specificType(e.id).chain((o) => nn(t, o));
50521
50518
  v(r2, s2.diagnostics);
50522
50519
  const a = ut(s2.unwrap().table, i.table);
50523
- return new E(new Ue(a), r2);
50520
+ return new E(new Ge(a), r2);
50524
50521
  }
50525
50522
  function Sb(t, e, n) {
50526
50523
  if (!Ao(t))
@@ -50533,7 +50530,7 @@ function Sb(t, e, n) {
50533
50530
  o && (r2 = o);
50534
50531
  }
50535
50532
  let i;
50536
- r2 instanceof W && r2.partialType && t.body instanceof L ? i = Fo(n, t.body, e, r2.partialType) : i = R(r2, "__call__", e, t.body, { elementName: t.elementName.value.value, filepath: r.create(t.id.filepath) }), i.members.set("__doc__", G2.create(Qt(t)));
50533
+ r2 instanceof W && r2.partialType && t.body instanceof L ? i = Fo(n, t.body, e, r2.partialType) : i = R(r2, "__call__", e, t.body, { elementName: t.elementName.value.value, filepath: r.create(t.id.filepath) }), i.members.set("__doc__", G2.create(Jt(t)));
50537
50534
  const s2 = n.symbol(t.elementName.id).unwrap();
50538
50535
  t.decorators && (i = Dr(n.program, t.decorators, t, i, e)), i = Co(n, i, t.elementName.value.value, e, r.create(t.id.filepath));
50539
50536
  const a = new De({
@@ -50615,7 +50612,7 @@ function Rb(t, e) {
50615
50612
  if (!(n instanceof F) && !(n instanceof $))
50616
50613
  throw new Error("Expected node");
50617
50614
  return t.typeOfSymbol(e.id).chain((r2) => {
50618
- let i = He(r2) ? r2.type : r2, s2 = i;
50615
+ let i = Ue(r2) ? r2.type : r2, s2 = i;
50619
50616
  const a = [];
50620
50617
  if (n.body instanceof L)
50621
50618
  s2 = $n(n.body);
@@ -50635,7 +50632,7 @@ function Rb(t, e) {
50635
50632
  throw new Error("Expected union type");
50636
50633
  Qe(o) && o.matchedType && (i = o.matchedType);
50637
50634
  }
50638
- return ve(i) && n.body instanceof L && (i = wr(i), i.raw = $n(n.body)), He(r2) ? new E(_i(i, r2.parentType, r2.symbol)) : new E(i, a);
50635
+ return ve(i) && n.body instanceof L && (i = wr(i), i.raw = $n(n.body)), Ue(r2) ? new E(_i(i, r2.parentType, r2.symbol)) : new E(i, a);
50639
50636
  });
50640
50637
  }
50641
50638
  function Qp(t, e, n) {
@@ -50650,10 +50647,10 @@ function Mb(t, e) {
50650
50647
  const n = t.nodeById(e.declarationId);
50651
50648
  if (!(n instanceof F) && !(n instanceof $))
50652
50649
  throw new Error("Expected node");
50653
- const r2 = [], i = qu(t, n), s2 = t.specificType(e.id).chain((o) => tn(t, o));
50650
+ const r2 = [], i = qu(t, n), s2 = t.specificType(e.id).chain((o) => nn(t, o));
50654
50651
  v(r2, s2.diagnostics);
50655
50652
  const a = ut(s2.unwrap().table, i.table);
50656
- return new E(new Ue(a), r2);
50653
+ return new E(new Ge(a), r2);
50657
50654
  }
50658
50655
  var Db = {
50659
50656
  name: "ElementProperty",
@@ -50669,7 +50666,7 @@ var Db = {
50669
50666
  }
50670
50667
  };
50671
50668
  function si(t, e) {
50672
- if (dn(e))
50669
+ if (hn(e))
50673
50670
  switch (e.primitiveTypeKind) {
50674
50671
  case N.Any:
50675
50672
  return X(t);
@@ -50684,7 +50681,7 @@ function si(t, e) {
50684
50681
  case N.Number:
50685
50682
  return bt(t);
50686
50683
  case N.String:
50687
- return Ze(t);
50684
+ return et(t);
50688
50685
  case N.Void:
50689
50686
  return mi(t);
50690
50687
  default:
@@ -50701,13 +50698,13 @@ function si(t, e) {
50701
50698
  return e;
50702
50699
  }
50703
50700
  function Gi(t, e) {
50704
- if (dn(e))
50701
+ if (hn(e))
50705
50702
  return si(t, e);
50706
50703
  if (e.kind === T.ProductType && e.name === "TemplateString")
50707
- return Ze(t);
50708
- if (pn(e)) {
50704
+ return et(t);
50705
+ if (fn(e)) {
50709
50706
  const n = Li(e, t), r2 = Gi(t, n);
50710
- return ln(t, r2);
50707
+ return un(t, r2);
50711
50708
  }
50712
50709
  if (gi(e)) {
50713
50710
  const n = e.types.map((r2) => Gi(t, r2));
@@ -50716,7 +50713,7 @@ function Gi(t, e) {
50716
50713
  return e;
50717
50714
  }
50718
50715
  function Jp(t) {
50719
- return !en(t) || !t.decorators || t.decorators.length === 0 ? false : t.decorators.some((e) => {
50716
+ return !tn(t) || !t.decorators || t.decorators.length === 0 ? false : t.decorators.some((e) => {
50720
50717
  if (e.name.value.value !== "tag" || !e.args || e.args.args.length === 0 || !e.args.args[0].value)
50721
50718
  return false;
50722
50719
  const n = e.args.args[0].value;
@@ -50729,7 +50726,7 @@ function Jp(t) {
50729
50726
  }
50730
50727
  function Cb(t, e) {
50731
50728
  var i;
50732
- if (!en(e))
50729
+ if (!tn(e))
50733
50730
  return new S(m.WrongKind);
50734
50731
  if ((i = e.parent) != null && i.parent && xo(e.parent.parent))
50735
50732
  return new S(m.WrongKind);
@@ -50738,10 +50735,10 @@ function Cb(t, e) {
50738
50735
  return e.elementName instanceof Y ? r2.push(w.createForNode(e.elementName.id, g.ExpectedThings, "identifier")) : n = O.createSymbol(e.elementName.value.value, y.Function, e.id), new E(n, r2);
50739
50736
  }
50740
50737
  function Nb(t, e) {
50741
- return en(e) ? t.symbol(e.id).chain((n) => new E([{ symbol: n, nodeId: e.elementName.id }, { symbol: n, nodeId: e.id }])) : new S(m.WrongKind);
50738
+ return tn(e) ? t.symbol(e.id).chain((n) => new E([{ symbol: n, nodeId: e.elementName.id }, { symbol: n, nodeId: e.id }])) : new S(m.WrongKind);
50742
50739
  }
50743
50740
  function Fb(t, e) {
50744
- return e.parent && en(e.parent) ? t.allSymbolsFromContext(e.parent.id).chain((n) => {
50741
+ return e.parent && tn(e.parent) ? t.allSymbolsFromContext(e.parent.id).chain((n) => {
50745
50742
  var i;
50746
50743
  const r2 = (i = Rn(n, e)) == null ? undefined : i.symbol;
50747
50744
  return r2 ? new E(r2) : new S(m.Error);
@@ -50818,7 +50815,7 @@ function Wb(t, e) {
50818
50815
  return new S(m.WrongKind);
50819
50816
  if (!(e.body instanceof L))
50820
50817
  return new S(m.WrongKind);
50821
- let n = new Ue;
50818
+ let n = new Ge;
50822
50819
  const r2 = [];
50823
50820
  if (e.params) {
50824
50821
  const s2 = Vb(e.params, t, n);
@@ -50828,9 +50825,9 @@ function Wb(t, e) {
50828
50825
  return v(r2, i.diagnostics), n = i.unwrap(), new E(n, r2);
50829
50826
  }
50830
50827
  function qb(t) {
50831
- return en(t) || Ip(t);
50828
+ return tn(t) || Ip(t);
50832
50829
  }
50833
- function Vb(t, e, n = new Ue) {
50830
+ function Vb(t, e, n = new Ge) {
50834
50831
  const r2 = [];
50835
50832
  return t.args.forEach((i) => {
50836
50833
  const s2 = e.symbol(i.id);
@@ -50840,11 +50837,11 @@ function Vb(t, e, n = new Ue) {
50840
50837
  }), new E(n, r2);
50841
50838
  }
50842
50839
  function Kb(t, e) {
50843
- return e.kind !== y.Function ? new S(m.WrongKind) : t.specificType(e.id).chain((n) => tn(t, n));
50840
+ return e.kind !== y.Function ? new S(m.WrongKind) : t.specificType(e.id).chain((n) => nn(t, n));
50844
50841
  }
50845
50842
  function Ub(t, e) {
50846
50843
  var o;
50847
- if (!en(e) || (o = e.parent) != null && o.parent && xo(e.parent.parent))
50844
+ if (!tn(e) || (o = e.parent) != null && o.parent && xo(e.parent.parent))
50848
50845
  return m.WrongKind;
50849
50846
  const n = Gb(e, t), r2 = jb(e, t), i = Yb(e, t), s2 = Hb(e, t), a = [];
50850
50847
  return v(a, r2), v(a, i), v(a, n), v(a, s2), e.returnType && v(a, t.validateTypeArguments(e.returnType.typeExpr.id)), a;
@@ -50899,7 +50896,7 @@ function Xb(t, e, n) {
50899
50896
  throw new Error(`JsFunc ${t.elementName.value.value} not found`);
50900
50897
  r2 = o;
50901
50898
  } else
50902
- r2 = new ek(t.params.args, t.body, e, n.program), r2.members.set("__doc__", G2.create(Qt(t))), t.decorators && (r2 = Dr(n.program, t.decorators, t, r2, e));
50899
+ r2 = new ek(t.params.args, t.body, e, n.program), r2.members.set("__doc__", G2.create(Jt(t))), t.decorators && (r2 = Dr(n.program, t.decorators, t, r2, e));
50903
50900
  const i = n.symbol(t.elementName.id).unwrap(), s2 = new De({
50904
50901
  name: t.elementName.value.value,
50905
50902
  symbol: i,
@@ -50954,7 +50951,7 @@ function rS(t, e) {
50954
50951
  return fp(t, n);
50955
50952
  }
50956
50953
  function iS(t, e) {
50957
- return e.kind !== y.FunctionScopedVariable ? new S(m.WrongKind) : t.specificType(e.id).chain((n) => tn(t, n));
50954
+ return e.kind !== y.FunctionScopedVariable ? new S(m.WrongKind) : t.specificType(e.id).chain((n) => nn(t, n));
50958
50955
  }
50959
50956
  function sS(t, e) {
50960
50957
  return vs(e) ? t.symbol(e.id).chain((n) => t.specificType(n.id)).diagnostics : m.WrongKind;
@@ -50971,7 +50968,7 @@ var aS = {
50971
50968
  }
50972
50969
  };
50973
50970
  function oS(t, e, n) {
50974
- return Je(e) ? (e.leftExpression instanceof I ? Jt(On(e), e.leftExpression.value.value, t, e.leftExpression) : t.symbol(e.leftExpression.id)).chain((r2) => t.members(r2.id).chain((i) => new E({ moduleSymbol: r2, moduleMembers: i }))).chain(({ moduleMembers: r2, moduleSymbol: i }) => r2.has(t, n) ? new E(r2.get(t, n).symbol) : new S(m.Error, [w.createForNode(e.rightExpression.id, g.ModuleNoMember, i.name, n)])) : new S(m.WrongKind);
50971
+ return Xe(e) ? (e.leftExpression instanceof I ? Xt(On(e), e.leftExpression.value.value, t, e.leftExpression) : t.symbol(e.leftExpression.id)).chain((r2) => t.members(r2.id).chain((i) => new E({ moduleSymbol: r2, moduleMembers: i }))).chain(({ moduleMembers: r2, moduleSymbol: i }) => r2.has(t, n) ? new E(r2.get(t, n).symbol) : new S(m.Error, [w.createForNode(e.rightExpression.id, g.ModuleNoMember, i.name, n)])) : new S(m.WrongKind);
50975
50972
  }
50976
50973
  function cS(t, e, n) {
50977
50974
  if (e.isOk()) {
@@ -50995,12 +50992,12 @@ function lS(t, e, n, r2) {
50995
50992
  });
50996
50993
  }
50997
50994
  function uS(t, e) {
50998
- if (!Je(e))
50995
+ if (!Xe(e))
50999
50996
  return new S(m.WrongKind);
51000
50997
  if (e.rightExpression.flags === Rr.HasError)
51001
50998
  return new S(m.WrongKind);
51002
50999
  if (e.rightExpression instanceof I) {
51003
- const n = e.rightExpression.value.value, r2 = e.leftExpression instanceof I ? Jt(On(e), e.leftExpression.value.value, t, e.leftExpression) : undefined, i = r2 || t.symbol(e.leftExpression.id), s2 = cS(t, i, n);
51000
+ const n = e.rightExpression.value.value, r2 = e.leftExpression instanceof I ? Xt(On(e), e.leftExpression.value.value, t, e.leftExpression) : undefined, i = r2 || t.symbol(e.leftExpression.id), s2 = cS(t, i, n);
51004
51001
  if (s2)
51005
51002
  return new E(s2);
51006
51003
  if (i.isOk()) {
@@ -51013,17 +51010,17 @@ function uS(t, e) {
51013
51010
  return new S(m.Error, [w.createForNode(e.rightExpression.id, g.ExpectedThings, "identifier")]);
51014
51011
  }
51015
51012
  function pS(t, e) {
51016
- return Je(e) ? t.symbol(e.id).chain((n) => new E([{ symbol: n, nodeId: e.rightExpression.id }, { symbol: n, nodeId: e.id }])) : new S(m.WrongKind);
51013
+ return Xe(e) ? t.symbol(e.id).chain((n) => new E([{ symbol: n, nodeId: e.rightExpression.id }, { symbol: n, nodeId: e.id }])) : new S(m.WrongKind);
51017
51014
  }
51018
51015
  function fS(t, e) {
51019
- return e.parent && Je(e.parent) ? t.allSymbolsFromContext(e.parent.id).chain((n) => {
51016
+ return e.parent && Xe(e.parent) ? t.allSymbolsFromContext(e.parent.id).chain((n) => {
51020
51017
  var i;
51021
51018
  const r2 = (i = Rn(n, e)) == null ? undefined : i.symbol;
51022
51019
  return r2 ? new E(r2) : new S(m.Error);
51023
51020
  }) : new S(m.WrongKind);
51024
51021
  }
51025
51022
  function dS(t, e) {
51026
- if (!Je(e))
51023
+ if (!Xe(e))
51027
51024
  return new S(m.WrongKind);
51028
51025
  if (e.rightExpression.flags === Rr.HasError)
51029
51026
  return new S(m.WrongKind);
@@ -51031,7 +51028,7 @@ function dS(t, e) {
51031
51028
  return n.isOk() ? n.chain((r2) => t.specificType(r2.id)) : new E(X(t), n.diagnostics);
51032
51029
  }
51033
51030
  function hS(t, e) {
51034
- if (!Je(e))
51031
+ if (!Xe(e))
51035
51032
  return m.WrongKind;
51036
51033
  if (e.rightExpression.flags === Rr.HasError)
51037
51034
  return [];
@@ -51039,7 +51036,7 @@ function hS(t, e) {
51039
51036
  return n.isOk() && $i(n.unwrap()) ? [...n.diagnostics, ...t.typeFromTypeExpression(e.id).diagnostics, ...t.validateTypeArguments(e.id)] : r2 != null && r2.typeParameter && t.symbol(e.id).isOk() ? [...n.diagnostics, w.createForNode(e.id, g.ValueIsUsedAsType, r2.value.value)] : n.diagnostics;
51040
51037
  }
51041
51038
  function mS(t, e, n) {
51042
- if (!Je(t))
51039
+ if (!Xe(t))
51043
51040
  return m.WrongKind;
51044
51041
  const r2 = Aw(n, t);
51045
51042
  if (r2) {
@@ -51081,11 +51078,11 @@ function gS(t, e) {
51081
51078
  const i = ji(t, e);
51082
51079
  v(n, i.diagnostics);
51083
51080
  const s2 = i.unwrap(), a = [];
51084
- i.diagnostics.length && a.push(je(e));
51081
+ i.diagnostics.length && a.push(Ye(e));
51085
51082
  for (const o of s2) {
51086
51083
  const c = e.typeFromTypeExpression(o.id);
51087
51084
  if (v(n, c.diagnostics), c.isErr())
51088
- return new E(je(e, "unreported"), n);
51085
+ return new E(Ye(e, "unreported"), n);
51089
51086
  a.push(c.unwrap());
51090
51087
  }
51091
51088
  return r2 = Bt(a), new E(r2, n);
@@ -51185,18 +51182,18 @@ function SS(t, e) {
51185
51182
  if (!(i instanceof pe))
51186
51183
  throw new Error("Expected equality declaration");
51187
51184
  if (ef(t, e))
51188
- return new E({ ...je(t), aliasSymbol: e });
51185
+ return new E({ ...Ye(t), aliasSymbol: e });
51189
51186
  if (!i.body)
51190
- r2 = je(t), n.push(w.createForNode(i.id, g.ExpectedThings, "type's body"));
51187
+ r2 = Ye(t), n.push(w.createForNode(i.id, g.ExpectedThings, "type's body"));
51191
51188
  else if (zo(i.body)) {
51192
51189
  const s2 = t.typeFromTypeExpression(i.body.id);
51193
51190
  v(n, s2.diagnostics), r2 = wr(s2.unwrap()), r2.aliasSymbol = e;
51194
51191
  } else
51195
- r2 = je(t), n.push(w.createForNode(i.id, g.InvalidTypeBody));
51192
+ r2 = Ye(t), n.push(w.createForNode(i.id, g.InvalidTypeBody));
51196
51193
  return new E(r2, n);
51197
51194
  }
51198
51195
  function xS(t, e) {
51199
- return e.kind !== y.TypeAlias ? new S(m.WrongKind) : t.specificType(e.id).chain((n) => tn(t, n));
51196
+ return e.kind !== y.TypeAlias ? new S(m.WrongKind) : t.specificType(e.id).chain((n) => nn(t, n));
51200
51197
  }
51201
51198
  function IS(t, e) {
51202
51199
  if (!(e instanceof pe && e.elementType.value.kind === d.TYPE_KEYWORD))
@@ -51219,7 +51216,7 @@ function AS2(t, e, n) {
51219
51216
  f.set("name", G2.create(u.name)), f.set("constructor", p), l && f.set("isPartial", ae.True), R(i, "push", new H(f));
51220
51217
  }
51221
51218
  }
51222
- }), i.members.set("__doc__", G2.create(Qt(t)));
51219
+ }), i.members.set("__doc__", G2.create(Jt(t)));
51223
51220
  const s2 = n.symbol(t.elementName.id).unwrap();
51224
51221
  return e.data.bindings.push(new De({
51225
51222
  name: t.elementName.value.value,
@@ -51261,10 +51258,10 @@ function PS(t, e) {
51261
51258
  const n = t.nodeById(e.declarationId);
51262
51259
  if (!(n instanceof $))
51263
51260
  throw new Error("Expected element declaration");
51264
- return n.body instanceof L ? new E($u(e)) : new E(je(t), [w.createForNode(n.id, g.ExpectedThings, "type's body")]);
51261
+ return n.body instanceof L ? new E($u(e)) : new E(Ye(t), [w.createForNode(n.id, g.ExpectedThings, "type's body")]);
51265
51262
  }
51266
51263
  function MS(t, e) {
51267
- return e.kind !== y.Type ? new S(m.WrongKind) : t.specificType(e.id).chain((n) => tn(t, n));
51264
+ return e.kind !== y.Type ? new S(m.WrongKind) : t.specificType(e.id).chain((n) => nn(t, n));
51268
51265
  }
51269
51266
  function DS(t, e) {
51270
51267
  if (!(e instanceof $ && e.elementType.value.kind === d.TYPE_KEYWORD))
@@ -51285,7 +51282,7 @@ function CS(t, e, n) {
51285
51282
  if (r2.kind !== T.ProductType)
51286
51283
  throw new Error("Expected product type");
51287
51284
  const i = Up(r2, n.program);
51288
- i.members.set("__doc__", G2.create(Qt(t)));
51285
+ i.members.set("__doc__", G2.create(Jt(t)));
51289
51286
  const s2 = n.symbol(t.elementName.id).unwrap();
51290
51287
  return e.data.bindings.push(new De({
51291
51288
  name: t.elementName.value.value,
@@ -51366,7 +51363,7 @@ function BS(t, e) {
51366
51363
  return;
51367
51364
  }
51368
51365
  const o = a.unwrap(), c = O.createGeneratedSymbol(o.toString(), y.DefaultElementName, i.id);
51369
- c.generatedProps.type = Ze(e), r2.set(o.toString(), { type: Ze(e), symbol: c });
51366
+ c.generatedProps.type = et(e), r2.set(o.toString(), { type: et(e), symbol: c });
51370
51367
  }), new E(r2, n);
51371
51368
  }
51372
51369
  function Wo(t, e, n) {
@@ -51380,7 +51377,7 @@ function Wo(t, e, n) {
51380
51377
  const { elementSymbol: l, elementType: u } = c.unwrap(), p = o instanceof F ? o.elementType : o.callee;
51381
51378
  if (!(p instanceof I))
51382
51379
  return;
51383
- if (tt(u)) {
51380
+ if (Je(u)) {
51384
51381
  const { ruleset: f } = u;
51385
51382
  f.isRuleOn(D.TypeAs) && (s2 ? r2.push(w.createForNode(f.getRule(D.TypeAs).declarationId, g.UnexpectedThings, "'elem_type_as' option. 'elem_type_as' is already set for another property")) : s2 = true);
51386
51383
  }
@@ -51413,16 +51410,16 @@ function WS(t, e) {
51413
51410
  function qS(t, e, n) {
51414
51411
  return da.create(t, e)._chain((r2) => VS(t, r2, e, n)._chain((i) => new E({ ruleset: r2, bodyType: i })))._chain(({ ruleset: r2, bodyType: i }) => {
51415
51412
  const { structure: s2 } = r2;
51416
- if (s2 === re.DictName || s2 === re.DictType) {
51413
+ if (s2 === ne.DictName || s2 === ne.DictType) {
51417
51414
  const c = _i(i, undefined, n), l = we(fs10(e, c, n), [
51418
- Ze(e),
51415
+ et(e),
51419
51416
  X(e)
51420
51417
  ]), u = O.createGeneratedSymbol("*", y.TypeProperty);
51421
51418
  u.generatedProps.type = c;
51422
51419
  const p = Cs(r2, l, n);
51423
51420
  return l.members.set("*", { type: c, symbol: u }), c.parentType = p, new E(p);
51424
51421
  }
51425
- if (s2 === re.List) {
51422
+ if (s2 === ne.List) {
51426
51423
  const c = _i(i, undefined, n), l = Zr(e, c, n), u = we(l, [X(e)]), p = Cs(r2, u, n);
51427
51424
  return c.parentType = p, new E(p);
51428
51425
  }
@@ -51470,7 +51467,7 @@ function jS(t, e) {
51470
51467
  return e.kind !== y.TypeProperty ? new S(m.WrongKind) : WS(e, t);
51471
51468
  }
51472
51469
  function YS(t, e) {
51473
- return e.kind !== y.TypeProperty ? new S(m.WrongKind) : t.specificType(e.id).chain((n) => tn(t, n));
51470
+ return e.kind !== y.TypeProperty ? new S(m.WrongKind) : t.specificType(e.id).chain((n) => nn(t, n));
51474
51471
  }
51475
51472
  function HS(t, e) {
51476
51473
  if (!_n(e))
@@ -51503,7 +51500,7 @@ function JS(t, e) {
51503
51500
  if (!e.parent)
51504
51501
  throw new Error("Node parent is undefined");
51505
51502
  const n = t.identifierSymbol(e.id);
51506
- return n.isOk() ? n : Jt(On(e), e.value.value, t, e);
51503
+ return n.isOk() ? n : Xt(On(e), e.value.value, t, e);
51507
51504
  }
51508
51505
  function XS(t, e) {
51509
51506
  if (!(e instanceof I) || ow(e))
@@ -51515,7 +51512,7 @@ function XS(t, e) {
51515
51512
  if (v(r2, n.diagnostics), e.value.value === "create_slot" && e.typeParameter) {
51516
51513
  const { diags: i, paramTypes: s2 } = Ea(t, e.typeParameter);
51517
51514
  if (v(r2, i), s2.length) {
51518
- const a = ln(t, s2[0]), o = wr(n.unwrap());
51515
+ const a = un(t, s2[0]), o = wr(n.unwrap());
51519
51516
  return o.returnType = a, new E(o, r2);
51520
51517
  }
51521
51518
  return r2.push(w.createForNode(e.id, g.GenericTypeNeedTypeArgument, U(n.unwrap(), { db: t }), 1)), new E(n.unwrap(), r2);
@@ -51537,7 +51534,7 @@ function ZS(t, e) {
51537
51534
  return v(n, o.diagnostics), e.typeParameter && !$i(o.unwrap()) && n.push(w.createForNode(e.id, g.ValueIsUsedAsType, e.value.value)), $i(o.unwrap()) && (v(n, t.typeFromTypeExpression(e.id).diagnostics), v(n, t.validateTypeArguments(e.id))), n;
51538
51535
  }
51539
51536
  function e0(t, e, n) {
51540
- return e.id.filepath !== n.id.filepath || en(e) || xo(e) ? false : (e instanceof pe || e instanceof $) && e.body && dw(e.body, n) ? true : e.span().start > n.span().start;
51537
+ return e.id.filepath !== n.id.filepath || tn(e) || xo(e) ? false : (e instanceof pe || e instanceof $) && e.body && dw(e.body, n) ? true : e.span().start > n.span().start;
51541
51538
  }
51542
51539
  function t0(t, e) {
51543
51540
  var r2;
@@ -51545,7 +51542,7 @@ function t0(t, e) {
51545
51542
  return;
51546
51543
  const n = Or(t, e);
51547
51544
  if (!(n.isErr() || n.unwrap().kind !== y.TypeAlias))
51548
- return (r2 = rt(e)) != null && r2.typeParameter ? je(t) : PT(n.unwrap());
51545
+ return (r2 = rt(e)) != null && r2.typeParameter ? Ye(t) : PT(n.unwrap());
51549
51546
  }
51550
51547
  function n0(t, e) {
51551
51548
  var l, u;
@@ -51557,7 +51554,7 @@ function n0(t, e) {
51557
51554
  const p = [w.createForNode(e.id, g.CannotResolveExpressionToType)];
51558
51555
  return r2.forEach((f) => {
51559
51556
  v(p, Ea(t, f.typeParameter).diags);
51560
- }), new E(je(t), p);
51557
+ }), new E(Ye(t), p);
51561
51558
  }
51562
51559
  const i = t0(t, e);
51563
51560
  if (i)
@@ -51565,16 +51562,16 @@ function n0(t, e) {
51565
51562
  const s2 = t.symbol(e.id), a = s2.chain((p) => t.typeFromTypeSymbol(p.id));
51566
51563
  if (a.isErr()) {
51567
51564
  if (t.symbol(e.id).isOk())
51568
- return new E(je(t), [w.createForNode(e.id, g.ValueIsUsedAsType, n.value.value)]);
51565
+ return new E(Ye(t), [w.createForNode(e.id, g.ValueIsUsedAsType, n.value.value)]);
51569
51566
  const p = s2.diagnostics;
51570
- return !(e instanceof I) && p.some((f) => f.code === g.NonExistentProperty.code) ? new E(je(t), [w.createForNode(e.id, g.CannotResolveExpressionToType)]) : new E(je(t), !(e instanceof I) && p.length ? p.map((f) => {
51567
+ return !(e instanceof I) && p.some((f) => f.code === g.NonExistentProperty.code) ? new E(Ye(t), [w.createForNode(e.id, g.CannotResolveExpressionToType)]) : new E(Ye(t), !(e instanceof I) && p.length ? p.map((f) => {
51571
51568
  const h = f instanceof w ? t.nodeById(f.nodeId) : undefined;
51572
51569
  return f.code === g.NonExistentName.code && h instanceof I ? w.createForNode(h.id, g.NonExistentType, h.value.value) : f;
51573
51570
  }) : [w.createForNode(e.id, g.NonExistentType, n.value.value)]);
51574
51571
  }
51575
51572
  const o = a.unwrap();
51576
51573
  if (!up(o))
51577
- return n.typeParameter ? new E(je(t), a.diagnostics) : a;
51574
+ return n.typeParameter ? new E(Ye(t), a.diagnostics) : a;
51578
51575
  const c = [...a.diagnostics];
51579
51576
  if (n.typeParameter) {
51580
51577
  const { diags: p, paramTypes: f } = Ea(t, n.typeParameter);
@@ -51583,14 +51580,14 @@ function n0(t, e) {
51583
51580
  return new E(h, c);
51584
51581
  }
51585
51582
  }
51586
- return c.push(w.createForNode(e.id, g.GenericTypeNeedTypeArgument, U(o, { db: t }), ((u = o == null ? undefined : o.typeArguments) == null ? undefined : u.length) ?? "")), new E(je(t), c);
51583
+ return c.push(w.createForNode(e.id, g.GenericTypeNeedTypeArgument, U(o, { db: t }), ((u = o == null ? undefined : o.typeArguments) == null ? undefined : u.length) ?? "")), new E(Ye(t), c);
51587
51584
  }
51588
51585
  function r0(t, e, n) {
51589
51586
  if (!(t instanceof I))
51590
51587
  return m.WrongKind;
51591
51588
  const r2 = n.symbol(t.id);
51592
51589
  if (r2.isErr())
51593
- throw new et(w.createForNode(t.id, g.NonExistentName, t.value.value));
51590
+ throw new tt(w.createForNode(t.id, g.NonExistentName, t.value.value));
51594
51591
  const i = r2.unwrap(), s2 = n.typeFromTypeExpression(t.id);
51595
51592
  if (s2.isOk() && ve(s2.unwrap()) && i.kind !== y.TypeAlias)
51596
51593
  return new ie(e, Bo(s2.unwrap(), n.program));
@@ -51602,7 +51599,7 @@ function r0(t, e, n) {
51602
51599
  const c = n.interpretFile(o), l = c.env();
51603
51600
  if (!l) {
51604
51601
  const u = c.diagnostics().find((p) => p.category === se.Error);
51605
- throw u ? new et(u) : new Error(`Expected '${o.toString()}' to be interpreted`);
51602
+ throw u ? new tt(u) : new Error(`Expected '${o.toString()}' to be interpreted`);
51606
51603
  }
51607
51604
  return new ie(l, l.find(t.value.value));
51608
51605
  }
@@ -51728,14 +51725,14 @@ function cl(t, e) {
51728
51725
  throw t instanceof w ? t : t instanceof Re ? new w(e, t.message, t.category, t.code) : t;
51729
51726
  }
51730
51727
  function ll(t, e) {
51731
- return e.kind === T.Signature && un(e.returnType) && (t.type = e.returnType), t;
51728
+ return e.kind === T.Signature && pn(e.returnType) && (t.type = e.returnType), t;
51732
51729
  }
51733
51730
  function h0(t, e) {
51734
51731
  if (!(e instanceof Te))
51735
51732
  return new S(m.WrongKind);
51736
51733
  let n = X(t);
51737
51734
  const r2 = t.callSiteResolution(e.id);
51738
- return r2.isOk() && (n = Xe(t, r2.unwrap().signature.returnType)), new E(n, r2.diagnostics);
51735
+ return r2.isOk() && (n = Ze(t, r2.unwrap().signature.returnType)), new E(n, r2.diagnostics);
51739
51736
  }
51740
51737
  function m0(t, e) {
51741
51738
  if (!(e instanceof Te))
@@ -51772,7 +51769,7 @@ function y0(t, e, n) {
51772
51769
  return m.WrongKind;
51773
51770
  const r2 = n.type(t.callee.id);
51774
51771
  if (r2.isErr())
51775
- throw new et(w.createForNode(t.id, g.AdhocError, "Cannot evaluate this expression"));
51772
+ throw new tt(w.createForNode(t.id, g.AdhocError, "Cannot evaluate this expression"));
51776
51773
  const i = r2.unwrap();
51777
51774
  if (Le(i)) {
51778
51775
  const l = t.args.args.map((p) => {
@@ -51831,7 +51828,7 @@ function w0(t, e) {
51831
51828
  let i;
51832
51829
  if (ko(t, e.content)) {
51833
51830
  const s2 = we(n, [r2]);
51834
- i = ln(t, s2);
51831
+ i = un(t, s2);
51835
51832
  } else
51836
51833
  i = we(n, [r2]);
51837
51834
  return new E(i);
@@ -51843,7 +51840,7 @@ function v0(t, e) {
51843
51840
  let i;
51844
51841
  if (ko(t, e.content)) {
51845
51842
  const a = we(n, [r2]);
51846
- i = ln(t, a);
51843
+ i = un(t, a);
51847
51844
  } else
51848
51845
  i = we(n, [r2]);
51849
51846
  const s2 = wo(t, e.content, true);
@@ -51868,7 +51865,7 @@ var x0 = {
51868
51865
  }
51869
51866
  };
51870
51867
  function I0(t, e) {
51871
- return !!(t.type && un(t.type) || e.type && un(e.type));
51868
+ return !!(t.type && pn(t.type) || e.type && pn(e.type));
51872
51869
  }
51873
51870
  function A0(t, e) {
51874
51871
  if (!(e instanceof Y))
@@ -51886,7 +51883,7 @@ function A0(t, e) {
51886
51883
  const s2 = i.unwrap(), a = t.type(e.rightExpression.id);
51887
51884
  v(n, a.diagnostics);
51888
51885
  const o = a.unwrap();
51889
- sf(s2, o) || Ge(s2, o, t) || Ge(o, s2, t) ? r2 = ft(t, s2, o, ht(t)) : n.push(w.createForNode(e.id, g.OperatorCannotAppliedForTypes, e.op.value, U(s2, { db: t }), U(o, { db: t })));
51886
+ sf(s2, o) || je(s2, o, t) || je(o, s2, t) ? r2 = ft(t, s2, o, ht(t)) : n.push(w.createForNode(e.id, g.OperatorCannotAppliedForTypes, e.op.value, U(s2, { db: t }), U(o, { db: t })));
51890
51887
  break;
51891
51888
  }
51892
51889
  case "<":
@@ -51902,7 +51899,7 @@ function A0(t, e) {
51902
51899
  r2 = ft(t, s2, o, ht(t));
51903
51900
  break;
51904
51901
  }
51905
- Ge(bt(t), s2, t) && Ge(bt(t), o, t) ? r2 = ft(t, s2, o, ht(t)) : n.push(w.createForNode(e.id, g.OperatorCannotAppliedForTypes, e.op.value, U(s2, { db: t }), U(o, { db: t })));
51902
+ je(bt(t), s2, t) && je(bt(t), o, t) ? r2 = ft(t, s2, o, ht(t)) : n.push(w.createForNode(e.id, g.OperatorCannotAppliedForTypes, e.op.value, U(s2, { db: t }), U(o, { db: t })));
51906
51903
  break;
51907
51904
  }
51908
51905
  case "+": {
@@ -51915,7 +51912,7 @@ function A0(t, e) {
51915
51912
  r2 = ft(t, s2, o, X(t));
51916
51913
  break;
51917
51914
  }
51918
- Ge(Pn(t), s2, t) && Ge(Pn(t), o, t) ? r2 = ft(t, s2, o, Pn(t)) : Ge(bt(t), s2, t) && Ge(bt(t), o, t) ? r2 = ft(t, s2, o, bt(t)) : Ge(Ze(t), s2, t) && Ge(Ze(t), o, t) ? r2 = ft(t, s2, o, Ze(t)) : n.push(w.createForNode(e.id, g.OperatorCannotAppliedForTypes, e.op.value, U(s2, { db: t }), U(o, { db: t })));
51915
+ je(Pn(t), s2, t) && je(Pn(t), o, t) ? r2 = ft(t, s2, o, Pn(t)) : je(bt(t), s2, t) && je(bt(t), o, t) ? r2 = ft(t, s2, o, bt(t)) : je(et(t), s2, t) && je(et(t), o, t) ? r2 = ft(t, s2, o, et(t)) : n.push(w.createForNode(e.id, g.OperatorCannotAppliedForTypes, e.op.value, U(s2, { db: t }), U(o, { db: t })));
51919
51916
  break;
51920
51917
  }
51921
51918
  case "-":
@@ -51929,7 +51926,7 @@ function A0(t, e) {
51929
51926
  r2 = ft(t, s2, o, X(t));
51930
51927
  break;
51931
51928
  }
51932
- Ge(Pn(t), s2, t) && Ge(Pn(t), o, t) ? r2 = ft(t, s2, o, Pn(t)) : Ge(bt(t), s2, t) && Ge(bt(t), o, t) ? r2 = ft(t, s2, o, bt(t)) : n.push(w.createForNode(e.id, g.OperatorCannotAppliedForTypes, e.op.value, U(s2, { db: t }), U(o, { db: t })));
51929
+ je(Pn(t), s2, t) && je(Pn(t), o, t) ? r2 = ft(t, s2, o, Pn(t)) : je(bt(t), s2, t) && je(bt(t), o, t) ? r2 = ft(t, s2, o, bt(t)) : n.push(w.createForNode(e.id, g.OperatorCannotAppliedForTypes, e.op.value, U(s2, { db: t }), U(o, { db: t })));
51933
51930
  break;
51934
51931
  }
51935
51932
  case "/": {
@@ -51942,7 +51939,7 @@ function A0(t, e) {
51942
51939
  r2 = ft(t, s2, o, X(t));
51943
51940
  break;
51944
51941
  }
51945
- Ge(bt(t), s2, t) && Ge(bt(t), o, t) ? r2 = ft(t, s2, o, bt(t)) : n.push(w.createForNode(e.id, g.OperatorCannotAppliedForTypes, e.op.value, U(s2, { db: t }), U(o, { db: t })));
51942
+ je(bt(t), s2, t) && je(bt(t), o, t) ? r2 = ft(t, s2, o, bt(t)) : n.push(w.createForNode(e.id, g.OperatorCannotAppliedForTypes, e.op.value, U(s2, { db: t }), U(o, { db: t })));
51946
51943
  break;
51947
51944
  }
51948
51945
  case ".": {
@@ -51970,14 +51967,14 @@ function rf(t, e) {
51970
51967
  return sf(t, e) && t.primitiveTypeKind === N.Boolean;
51971
51968
  }
51972
51969
  function _0(t, e, n) {
51973
- const r2 = pn(t) ? Li(t, n) : t, i = pn(e) ? Li(e, n) : e;
51970
+ const r2 = fn(t) ? Li(t, n) : t, i = fn(e) ? Li(e, n) : e;
51974
51971
  return rf(r2, i);
51975
51972
  }
51976
51973
  function sf(t, e) {
51977
- return (dn(t) || fn(t)) && (dn(e) || fn(e)) && t.primitiveTypeKind === e.primitiveTypeKind;
51974
+ return (hn(t) || dn(t)) && (hn(e) || dn(e)) && t.primitiveTypeKind === e.primitiveTypeKind;
51978
51975
  }
51979
51976
  function ft(t, e, n, r2) {
51980
- return un(e) || un(n) ? ln(t, r2) : r2;
51977
+ return pn(e) || pn(n) ? un(t, r2) : r2;
51981
51978
  }
51982
51979
  function O0(t, e) {
51983
51980
  return e instanceof Y ? t.type(e.id).diagnostics.concat(t.typecheck(e.leftExpression.id)).concat(t.typecheck(e.rightExpression.id)) : m.WrongKind;
@@ -52058,7 +52055,7 @@ var z0 = {
52058
52055
  }
52059
52056
  };
52060
52057
  function W0(t, e) {
52061
- return !fn(t) && !dn(t) ? false : e === "!" ? t.primitiveTypeKind === N.Boolean : t.primitiveTypeKind === N.Any || t.primitiveTypeKind === N.Number || t.primitiveTypeKind === N.Int;
52058
+ return !dn(t) && !hn(t) ? false : e === "!" ? t.primitiveTypeKind === N.Boolean : t.primitiveTypeKind === N.Any || t.primitiveTypeKind === N.Number || t.primitiveTypeKind === N.Int;
52062
52059
  }
52063
52060
  function q0(t, e) {
52064
52061
  if (!(e instanceof kt))
@@ -52073,11 +52070,11 @@ function q0(t, e) {
52073
52070
  switch (e.op.value) {
52074
52071
  case "+":
52075
52072
  case "-": {
52076
- fn(s2) ? r2 = le(t, s2.primitiveTypeKind) : dn(s2) && (r2 = Nn(s2.primitiveTypeKind, t, e.op.value === "-" ? -s2.value : s2.value));
52073
+ dn(s2) ? r2 = le(t, s2.primitiveTypeKind) : hn(s2) && (r2 = Nn(s2.primitiveTypeKind, t, e.op.value === "-" ? -s2.value : s2.value));
52077
52074
  break;
52078
52075
  }
52079
52076
  case "!": {
52080
- fn(s2) ? r2 = le(t, s2.primitiveTypeKind) : dn(s2) && (r2 = Nn(s2.primitiveTypeKind, t, !s2.value));
52077
+ dn(s2) ? r2 = le(t, s2.primitiveTypeKind) : hn(s2) && (r2 = Nn(s2.primitiveTypeKind, t, !s2.value));
52081
52078
  break;
52082
52079
  }
52083
52080
  default:
@@ -52160,7 +52157,7 @@ function J0(t, e) {
52160
52157
  const n = t.nodeById(e);
52161
52158
  if (!n)
52162
52159
  return new S(m.WrongKind);
52163
- if (!(n instanceof I) && !Je(n))
52160
+ if (!(n instanceof I) && !Xe(n))
52164
52161
  return new S(m.WrongKind);
52165
52162
  if (n instanceof I) {
52166
52163
  const r2 = r.create(n.id.filepath), i = t.moduleIdOfFile(r2), s2 = gr(t, () => ks(t, i, n.value.value));
@@ -52179,7 +52176,7 @@ function J0(t, e) {
52179
52176
  }) : new S(m.Error, [w.createForNode(n.rightExpression.id, g.UnexpectedThings, "expression")]);
52180
52177
  }
52181
52178
  function X0(t, e) {
52182
- if (!on(e))
52179
+ if (!cn(e))
52183
52180
  return new S(m.WrongKind);
52184
52181
  if (e.body instanceof L) {
52185
52182
  const n = [], r2 = [];
@@ -52201,34 +52198,34 @@ function X0(t, e) {
52201
52198
  function Z0(t, e) {
52202
52199
  var r2, i, s2;
52203
52200
  let n;
52204
- return (r2 = e.parent) != null && r2.parent && on(e.parent.parent) ? n = e.parent.parent : (s2 = (i = e.parent) == null ? undefined : i.parent) != null && s2.parent && on(e.parent.parent.parent) && (n = e.parent.parent.parent), n ? t.allSymbolsFromContext(n.id).chain((a) => {
52201
+ return (r2 = e.parent) != null && r2.parent && cn(e.parent.parent) ? n = e.parent.parent : (s2 = (i = e.parent) == null ? undefined : i.parent) != null && s2.parent && cn(e.parent.parent.parent) && (n = e.parent.parent.parent), n ? t.allSymbolsFromContext(n.id).chain((a) => {
52205
52202
  var c;
52206
52203
  const o = (c = Rn(a, e)) == null ? undefined : c.symbol;
52207
52204
  return o ? new E(o) : new S(m.Error);
52208
52205
  }) : new S(m.WrongKind);
52209
52206
  }
52210
52207
  function ex(t, e) {
52211
- return on(e) ? e.body ? e.body instanceof L ? t.allSymbolsFromContext(e.id).chain((n) => {
52208
+ return cn(e) ? e.body ? e.body instanceof L ? t.allSymbolsFromContext(e.id).chain((n) => {
52212
52209
  var s2;
52213
52210
  const r2 = new Pt((s2 = t.astFromNode(e.id)) == null ? undefined : s2.filePath, undefined, [{ node: e.elementName, includedFull: false }]), i = [];
52214
52211
  return n.forEach(({ symbol: a, nodeId: o }) => {
52215
52212
  const c = t.nodeById(o);
52216
52213
  c.parent instanceof F && c.parent.elementType.id.key === c.id.key || (r2.has(t, a.name) ? i.push(w.createForNode(c.id, g.DuplicatedName, a.name)) : r2.set(a.name, a, yt.Private));
52217
52214
  }), new E(r2, i);
52218
- }) : new S(m.Error) : e.elementName instanceof I || Je(e.elementName) ? new E(new Pt(t.astFromNode(e.id).filePath, undefined, [{ node: e.elementName, includedFull: true }])) : new S(m.Error, [w.createForNode(e.elementName.id, g.InvalidThings, "syntax")]) : new S(m.WrongKind);
52215
+ }) : new S(m.Error) : e.elementName instanceof I || Xe(e.elementName) ? new E(new Pt(t.astFromNode(e.id).filePath, undefined, [{ node: e.elementName, includedFull: true }])) : new S(m.Error, [w.createForNode(e.elementName.id, g.InvalidThings, "syntax")]) : new S(m.WrongKind);
52219
52216
  }
52220
52217
  function tx(t, e) {
52221
52218
  var o, c, l, u, p;
52222
52219
  if (e.kind !== y.ModuleItem && e.kind !== y.ModuleItemAlias)
52223
52220
  return new S(m.WrongKind);
52224
52221
  if (e.kind === y.ModuleItem) {
52225
- const f = t.nodeById(e.declarationId), h = on(f.parent.parent) ? (o = f.parent) == null ? undefined : o.parent : (l = (c = f == null ? undefined : f.parent) == null ? undefined : c.parent) == null ? undefined : l.parent;
52226
- if (!h || !on(h))
52222
+ const f = t.nodeById(e.declarationId), h = cn(f.parent.parent) ? (o = f.parent) == null ? undefined : o.parent : (l = (c = f == null ? undefined : f.parent) == null ? undefined : c.parent) == null ? undefined : l.parent;
52223
+ if (!h || !cn(h))
52227
52224
  throw new Error("Expected use declaration");
52228
52225
  return gr(t, () => t.symbolOfModulePath(h.elementName.id).chain((b) => t.members(b.id).chain((x) => new E({ moduleSymbol: b, members: x }))).chain(({ moduleSymbol: b, members: x }) => x.has(t, e.name) ? new E(x.get(t, e.name).symbol) : new S(m.Error, [w.createForNode(f.id, g.ModuleNoMember, b.name, e.name)])));
52229
52226
  }
52230
52227
  const n = t.nodeById(e.declarationId), i = (n == null ? undefined : n.parent).elementType, s2 = (p = (u = i == null ? undefined : i.parent) == null ? undefined : u.parent) == null ? undefined : p.parent;
52231
- if (!s2 || !on(s2))
52228
+ if (!s2 || !cn(s2))
52232
52229
  throw new Error("Expected use declaration");
52233
52230
  return gr(t, () => t.symbolOfModulePath(s2.elementName.id).chain((f) => t.members(f.id).chain((h) => new E({ moduleSymbol: f, members: h }))).chain(({ moduleSymbol: f, members: h }) => h.has(t, i.value.value) ? new E(h.get(t, i.value.value).symbol) : new S(m.Error, [w.createForNode(i.id, g.ModuleNoMember, f.name, i.value.value)])));
52234
52231
  }
@@ -52242,7 +52239,7 @@ function rx(t, e) {
52242
52239
  return e.kind !== y.ModuleItem && e.kind !== y.ModuleItemAlias ? new S(m.WrongKind) : t.symbolReference(e.id).chain((n) => t.typeFromTypeSymbol(n.id));
52243
52240
  }
52244
52241
  function ix(t, e) {
52245
- return on(e) ? !e.body || e.body instanceof L && e.body.body.length === 0 ? t.symbolOfModulePath(e.elementName.id).diagnostics : t.allSymbolsFromContext(e.id).chain((n) => {
52242
+ return cn(e) ? !e.body || e.body instanceof L && e.body.body.length === 0 ? t.symbolOfModulePath(e.elementName.id).diagnostics : t.allSymbolsFromContext(e.id).chain((n) => {
52246
52243
  const r2 = [];
52247
52244
  n.forEach(({ symbol: a }) => {
52248
52245
  v(r2, t.specificType(a.id).diagnostics);
@@ -52258,7 +52255,7 @@ function sx(t, e) {
52258
52255
  return e.kind !== y.ModuleItem && e.kind !== y.ModuleItemAlias ? new S(m.WrongKind) : t.symbolReference(e.id).chain((n) => t.members(n.id));
52259
52256
  }
52260
52257
  function ax(t, e, n) {
52261
- if (!on(t))
52258
+ if (!cn(t))
52262
52259
  return m.WrongKind;
52263
52260
  if (t.body) {
52264
52261
  if (t.body instanceof L) {
@@ -52291,7 +52288,7 @@ function ax(t, e, n) {
52291
52288
  });
52292
52289
  }
52293
52290
  }
52294
- return new ie(e, sn.Instance);
52291
+ return new ie(e, an.Instance);
52295
52292
  }
52296
52293
  function pl(t, e, n) {
52297
52294
  const r2 = n.symbol(t.id).chain((i) => n.symbolReference(i.id)).unwrap();
@@ -52326,23 +52323,23 @@ function of(t, e, n = false) {
52326
52323
  const r2 = e.body.length > 0 ? e.body[e.body.length - 1] : null;
52327
52324
  if (r2) {
52328
52325
  const i = t.type(r2.id);
52329
- return n ? new E(ln(t, Gi(t, i.unwrap())), i.diagnostics) : i;
52326
+ return n ? new E(un(t, Gi(t, i.unwrap())), i.diagnostics) : i;
52330
52327
  }
52331
52328
  return new E(mi(t));
52332
52329
  }
52333
52330
  function cx(t, e, n = false) {
52334
52331
  if (e instanceof L || !e) {
52335
52332
  const i = of(t, e);
52336
- return n ? new E(ln(t, Gi(t, i.unwrap())), i.diagnostics) : i;
52333
+ return n ? new E(un(t, Gi(t, i.unwrap())), i.diagnostics) : i;
52337
52334
  }
52338
52335
  const r2 = t.type(e.id);
52339
- return n ? new E(ln(t, r2.unwrap()), r2.diagnostics) : r2;
52336
+ return n ? new E(un(t, r2.unwrap()), r2.diagnostics) : r2;
52340
52337
  }
52341
52338
  function lx(t, e) {
52342
52339
  if (!e.condition)
52343
52340
  return false;
52344
52341
  const n = t.type(e.condition.id).unwrap();
52345
- return un(n);
52342
+ return pn(n);
52346
52343
  }
52347
52344
  function ux(t, e) {
52348
52345
  if (!(e instanceof $t))
@@ -52372,7 +52369,7 @@ function fx(t, e, n) {
52372
52369
  if (!t.thenBranch)
52373
52370
  throw new Error("Expected node body");
52374
52371
  const r2 = n.program.interpretNode(t.condition, e).returnVal;
52375
- if (r2.type && un(r2.type)) {
52372
+ if (r2.type && pn(r2.type)) {
52376
52373
  const s2 = n.program.interpretNode(t.thenBranch, e).returnVal, a = /* @__PURE__ */ new Map;
52377
52374
  if (a.set("condition", r2), a.set("then", s2), t.elseBranch) {
52378
52375
  const o = n.program.interpretNode(t.elseBranch, e).returnVal;
@@ -52380,7 +52377,7 @@ function fx(t, e, n) {
52380
52377
  }
52381
52378
  return new ie(e, new H(a, undefined, $T(n)));
52382
52379
  }
52383
- return r2.data ? n.program.interpretNode(t.thenBranch, e) : t.elseBranch ? n.program.interpretNode(t.elseBranch, e) : new ie(e, sn.Instance);
52380
+ return r2.data ? n.program.interpretNode(t.thenBranch, e) : t.elseBranch ? n.program.interpretNode(t.elseBranch, e) : new ie(e, an.Instance);
52384
52381
  }
52385
52382
  var dx = {
52386
52383
  name: "IfExpression",
@@ -52453,7 +52450,7 @@ function kx(t, e, n) {
52453
52450
  o && (i = o);
52454
52451
  }
52455
52452
  let s2 = R(i, "__call__", e, t.body, { elementName: r2.name, filepath: r.create(t.id.filepath) });
52456
- s2.members.set("__doc__", G2.create(Qt(t))), s2 = Co(n, s2, r2.name, e, r.create(t.id.filepath));
52453
+ s2.members.set("__doc__", G2.create(Jt(t))), s2 = Co(n, s2, r2.name, e, r.create(t.id.filepath));
52457
52454
  const a = new De({
52458
52455
  name: r2.name,
52459
52456
  symbol: r2,
@@ -53908,14 +53905,14 @@ function Xx(t, e) {
53908
53905
  else
53909
53906
  break;
53910
53907
  }
53911
- const ne = J.length > 0 ? [M, V] : undefined;
53908
+ const re = J.length > 0 ? [M, V] : undefined;
53912
53909
  f.push({
53913
53910
  id: `m${f.length}`,
53914
53911
  macroName: x.macroName,
53915
53912
  originalNode: x.originalCall,
53916
53913
  originalRange: x.range.original,
53917
53914
  transformedNodes: J,
53918
- transformedRange: ne,
53915
+ transformedRange: re,
53919
53916
  parent: p[0],
53920
53917
  insertionIndex: C
53921
53918
  });
@@ -55270,8 +55267,8 @@ function EI() {
55270
55267
  get() {
55271
55268
  const { level: C } = this;
55272
55269
  return function(...J) {
55273
- const ne = k(t.color[a[C]][B](...J), t.color.close, this._styler);
55274
- return b(this, ne, this._isEmpty);
55270
+ const re = k(t.color[a[C]][B](...J), t.color.close, this._styler);
55271
+ return b(this, re, this._isEmpty);
55275
55272
  };
55276
55273
  }
55277
55274
  };
@@ -55280,8 +55277,8 @@ function EI() {
55280
55277
  o[C] = {
55281
55278
  get() {
55282
55279
  const { level: J } = this;
55283
- return function(...ne) {
55284
- const ee = k(t.bgColor[a[J]][B](...ne), t.bgColor.close, this._styler);
55280
+ return function(...re) {
55281
+ const ee = k(t.bgColor[a[J]][B](...re), t.bgColor.close, this._styler);
55285
55282
  return b(this, ee, this._isEmpty);
55286
55283
  };
55287
55284
  }
@@ -55299,39 +55296,39 @@ function EI() {
55299
55296
  }
55300
55297
  }
55301
55298
  }), k = (B, C, J) => {
55302
- let ne, ee;
55303
- return J === undefined ? (ne = B, ee = C) : (ne = J.openAll + B, ee = C + J.closeAll), {
55299
+ let re, ee;
55300
+ return J === undefined ? (re = B, ee = C) : (re = J.openAll + B, ee = C + J.closeAll), {
55304
55301
  open: B,
55305
55302
  close: C,
55306
- openAll: ne,
55303
+ openAll: re,
55307
55304
  closeAll: ee,
55308
55305
  parent: J
55309
55306
  };
55310
55307
  }, b = (B, C, J) => {
55311
- const ne = (...ee) => s2(ee[0]) && s2(ee[0].raw) ? x(ne, M(ne, ...ee)) : x(ne, ee.length === 1 ? "" + ee[0] : ee.join(" "));
55312
- return Object.setPrototypeOf(ne, h), ne._generator = B, ne._styler = C, ne._isEmpty = J, ne;
55308
+ const re = (...ee) => s2(ee[0]) && s2(ee[0].raw) ? x(re, M(re, ...ee)) : x(re, ee.length === 1 ? "" + ee[0] : ee.join(" "));
55309
+ return Object.setPrototypeOf(re, h), re._generator = B, re._styler = C, re._isEmpty = J, re;
55313
55310
  }, x = (B, C) => {
55314
55311
  if (B.level <= 0 || !C)
55315
55312
  return B._isEmpty ? "" : C;
55316
55313
  let J = B._styler;
55317
55314
  if (J === undefined)
55318
55315
  return C;
55319
- const { openAll: ne, closeAll: ee } = J;
55316
+ const { openAll: re, closeAll: ee } = J;
55320
55317
  if (C.indexOf("\x1B") !== -1)
55321
55318
  for (;J !== undefined; )
55322
55319
  C = r2(C, J.close, J.open), J = J.parent;
55323
55320
  const ge = C.indexOf(`
55324
55321
  `);
55325
- return ge !== -1 && (C = i(C, ee, ne, ge)), ne + C + ee;
55322
+ return ge !== -1 && (C = i(C, ee, re, ge)), re + C + ee;
55326
55323
  };
55327
55324
  let A;
55328
55325
  const M = (B, ...C) => {
55329
55326
  const [J] = C;
55330
55327
  if (!s2(J) || !s2(J.raw))
55331
55328
  return C.join(" ");
55332
- const ne = C.slice(1), ee = [J.raw[0]];
55329
+ const re = C.slice(1), ee = [J.raw[0]];
55333
55330
  for (let ge = 1;ge < J.length; ge++)
55334
- ee.push(String(ne[ge - 1]).replace(/[{}\\]/g, "\\$&"), String(J.raw[ge]));
55331
+ ee.push(String(re[ge - 1]).replace(/[{}\\]/g, "\\$&"), String(J.raw[ge]));
55335
55332
  return A === undefined && (A = TI()), A(B, ee.join(""));
55336
55333
  };
55337
55334
  Object.defineProperties(p.prototype, o);
@@ -55653,7 +55650,7 @@ function VI(t, e) {
55653
55650
  n.push(s2.file);
55654
55651
  const o = t.ast(s2.file).unwrap().transformedAst, c = /* @__PURE__ */ new Set;
55655
55652
  j(o, (l) => {
55656
- if (l.id.kind !== Fp.Syntax && (Je(l) || l instanceof I || ki(l))) {
55653
+ if (l.id.kind !== Fp.Syntax && (Xe(l) || l instanceof I || ki(l))) {
55657
55654
  if (l.parent && c.has(l.parent.id.id)) {
55658
55655
  c.add(l.id.id);
55659
55656
  return;
@@ -56369,7 +56366,7 @@ var jI = {
56369
56366
  },
56370
56367
  deserializeResult: (t, e) => {
56371
56368
  const n = e.diagnostics.map((i) => t.deserializeValue(i, P.Diagnostic)), r2 = xf(t, e.value.table);
56372
- return new E(new Ue(r2), n);
56369
+ return new E(new Ge(r2), n);
56373
56370
  }
56374
56371
  };
56375
56372
  function vf(t, e) {
@@ -56624,7 +56621,7 @@ class aA {
56624
56621
  $type_ref: U(r2, { db: this.program.db }),
56625
56622
  ast: this.options.includeAst ? e : undefined
56626
56623
  };
56627
- return ((s2 = e.body) == null ? undefined : s2.kind) === _.Block ? i.body = this.serializeElementBody(e.body.body) : e.body && (i.value = this.serializeExpression(e.body)), e.decorators && (i.__decorators__ = this.serializeDecorators(e.decorators)), i.name = n.name, {
56624
+ return ((s2 = e.body) == null ? undefined : s2.kind) === _.Block ? i.body = this.serializeElementBody(e.body.body, r2) : e.body && (i.value = this.serializeExpression(e.body)), e.decorators && (i.__decorators__ = this.serializeDecorators(e.decorators)), i.name = n.name, {
56628
56625
  name: n.name,
56629
56626
  node: i
56630
56627
  };
@@ -56636,32 +56633,40 @@ class aA {
56636
56633
  ast: this.options.includeAst ? e : undefined
56637
56634
  }, i = this.program.typeOfSymbol(n.id).unwrap();
56638
56635
  let s2;
56639
- if (He(i)) {
56636
+ if (Ue(i)) {
56640
56637
  const { ruleset: o } = i.parentType;
56641
- o.structure === re.DictType ? s2 = e.elementType.value.value : o.structure === re.DictName ? s2 = e.elementName.value.value : s2 = n.name;
56638
+ o.structure === ne.DictType ? s2 = e.elementType.value.value : o.structure === ne.DictName ? s2 = e.elementName.value.value : s2 = n.name;
56642
56639
  } else
56643
56640
  s2 = n.name;
56644
- return ((a = e.body) == null ? undefined : a.kind) === _.Block ? r2.body = this.serializeElementBody(e.body.body) : e.body && (r2.value = this.serializeExpression(e.body)), e.decorators && (r2.__decorators__ = this.serializeDecorators(e.decorators)), r2.name = s2, {
56641
+ return ((a = e.body) == null ? undefined : a.kind) === _.Block ? r2.body = this.serializeElementBody(e.body.body, i) : e.body && (r2.value = this.serializeExpression(e.body)), e.decorators && (r2.__decorators__ = this.serializeDecorators(e.decorators)), r2.name = s2, {
56645
56642
  name: s2,
56646
56643
  node: r2
56647
56644
  };
56648
56645
  }
56649
- serializeElementBody(e) {
56650
- const n = {};
56651
- return e.forEach((r2) => {
56652
- const i = this.program.symbol(r2.id);
56653
- if (i.isOk()) {
56654
- const s2 = i.unwrap();
56655
- if (s2.kind === y.ElementProperty) {
56656
- const a = this.program.typeOfSymbol(s2.id).unwrap(), o = this.serializeElementProperty(r2, s2);
56657
- if (He(a)) {
56658
- const { ruleset: c } = a.parentType, { structure: l } = c;
56659
- l === re.DictType || l === re.DictName ? (n[c.name] === undefined && (n[c.name] = { kind: "DynamicElementDictPlaceholder", body: {} }), n[c.name].body[o.name] = o.node) : l === re.List ? (n[c.name] === undefined && (n[c.name] = { kind: "DynamicElementListPlaceholder", value: [] }), n[c.name].value.push(o.node)) : n[o.name] = o.node;
56646
+ serializeElementBody(e, n) {
56647
+ var s2;
56648
+ const r2 = {};
56649
+ e.forEach((a) => {
56650
+ const o = this.program.symbol(a.id);
56651
+ if (o.isOk()) {
56652
+ const c = o.unwrap();
56653
+ if (c.kind === y.ElementProperty) {
56654
+ const l = this.program.typeOfSymbol(c.id).unwrap(), u = this.serializeElementProperty(a, c);
56655
+ if (Ue(l)) {
56656
+ const { ruleset: p } = l.parentType, { structure: f } = p;
56657
+ f === ne.DictType || f === ne.DictName ? (r2[p.name] === undefined && (r2[p.name] = { kind: "DynamicElementDictPlaceholder", body: {} }), r2[p.name].body[u.name] = u.node) : f === ne.List ? (r2[p.name] === undefined && (r2[p.name] = { kind: "DynamicElementListPlaceholder", value: [] }), r2[p.name].value.push(u.node)) : r2[u.name] = u.node;
56660
56658
  } else
56661
- n[o.name] = o.node;
56659
+ r2[u.name] = u.node;
56662
56660
  }
56663
56661
  }
56664
- }), n;
56662
+ });
56663
+ const i = Ue(n) ? n.type : n;
56664
+ return (s2 = Qt(this.program.db, i)) == null || s2.forEach((a) => {
56665
+ if (Je(a.type)) {
56666
+ const { ruleset: o } = a.type;
56667
+ (o.structure === ne.DictType || o.structure === ne.DictName) && r2[o.name] === undefined && (r2[o.name] = { kind: "DynamicElementDictPlaceholder", body: {} });
56668
+ }
56669
+ }), r2;
56665
56670
  }
56666
56671
  serializeLiteralElementExpression(e) {
56667
56672
  const n = this.program.symbol(e.id);
@@ -56986,7 +56991,7 @@ function Rl(t, e) {
56986
56991
  let o;
56987
56992
  t.body && e.body && (o = q(t.body, e.body) ? t.body : e.body);
56988
56993
  let c;
56989
- t.colonSeparator && e.colonSeparator && (c = Ye(t.colonSeparator, e.colonSeparator) ? t.colonSeparator : e.colonSeparator);
56994
+ t.colonSeparator && e.colonSeparator && (c = He(t.colonSeparator, e.colonSeparator) ? t.colonSeparator : e.colonSeparator);
56990
56995
  let l;
56991
56996
  if (!t.decorators && !e.decorators)
56992
56997
  l = undefined;
@@ -57016,7 +57021,7 @@ function Pl(t, e) {
57016
57021
  t.returnType && e.returnType && (i = q(t.returnType, e.returnType) ? t.returnType : e.returnType);
57017
57022
  const s2 = q(t.body, e.body) ? t.body : e.body;
57018
57023
  let a;
57019
- t.colonSeparator && e.colonSeparator && (a = Ye(t.colonSeparator, e.colonSeparator) ? t.colonSeparator : e.colonSeparator);
57024
+ t.colonSeparator && e.colonSeparator && (a = He(t.colonSeparator, e.colonSeparator) ? t.colonSeparator : e.colonSeparator);
57020
57025
  let o;
57021
57026
  if (!t.decorators && !e.decorators)
57022
57027
  o = undefined;
@@ -57043,21 +57048,21 @@ function SA(t, e) {
57043
57048
  let r2;
57044
57049
  t.value && e.value && (r2 = q(t.value, e.value) ? t.value : e.value);
57045
57050
  let i;
57046
- t.separatorColonToken && e.separatorColonToken && (i = Ye(t.separatorColonToken, e.separatorColonToken) ? t.separatorColonToken : e.separatorColonToken);
57051
+ t.separatorColonToken && e.separatorColonToken && (i = He(t.separatorColonToken, e.separatorColonToken) ? t.separatorColonToken : e.separatorColonToken);
57047
57052
  let s2;
57048
57053
  t.typeReferenceExpression && e.typeReferenceExpression && (s2 = q(t.typeReferenceExpression, e.typeReferenceExpression) ? t.typeReferenceExpression : e.typeReferenceExpression);
57049
57054
  let a;
57050
- return t.equalSign && e.equalSign && (a = Ye(t.equalSign, e.equalSign) ? t.equalSign : e.equalSign), new gt(r2, n, i, s2, a);
57055
+ return t.equalSign && e.equalSign && (a = He(t.equalSign, e.equalSign) ? t.equalSign : e.equalSign), new gt(r2, n, i, s2, a);
57051
57056
  }
57052
57057
  function Qi(t, e) {
57053
57058
  return t instanceof Y && e instanceof Y ? AA(t, e) : t instanceof I && e instanceof I ? Go(t, e) : t instanceof Te && e instanceof Te ? _A(t, e) : t instanceof be && e instanceof be ? xA(t, e) : e;
57054
57059
  }
57055
57060
  function xA(t, e) {
57056
- const n = Ye(t.value, e.value) ? t.value : e.value;
57061
+ const n = He(t.value, e.value) ? t.value : e.value;
57057
57062
  return n.leadingTrivia = t.value.leadingTrivia, n.trailingTrivia = t.value.trailingTrivia, new be(n);
57058
57063
  }
57059
57064
  function Go(t, e) {
57060
- const n = Ye(t.value, e.value) ? t.value : e.value;
57065
+ const n = He(t.value, e.value) ? t.value : e.value;
57061
57066
  n.leadingTrivia = t.value.leadingTrivia, n.trailingTrivia = t.value.trailingTrivia;
57062
57067
  const r2 = e.typeParameter && t.typeParameter ? IA(t.typeParameter, e.typeParameter) : undefined;
57063
57068
  return new I(n, r2);
@@ -57066,7 +57071,7 @@ function IA(t, e) {
57066
57071
  return new Pr(t.openToken, e.expressions.map((n, r2) => r2 < t.expressions.length ? Qi(t.expressions[r2], n) : n), t.closeToken, t.commaSeparatorList);
57067
57072
  }
57068
57073
  function AA(t, e) {
57069
- const n = Qi(t.leftExpression, e.leftExpression), r2 = Ye(t.op, e.op) ? t.op : e.op;
57074
+ const n = Qi(t.leftExpression, e.leftExpression), r2 = He(t.op, e.op) ? t.op : e.op;
57070
57075
  r2.leadingTrivia = t.op.leadingTrivia, r2.trailingTrivia = t.op.trailingTrivia;
57071
57076
  const i = Qi(t.rightExpression, e.rightExpression);
57072
57077
  return new Y(n, r2, i);
@@ -57079,7 +57084,7 @@ function Cf(t, e) {
57079
57084
  return new _t(e.args.map((n, r2) => r2 < t.args.length ? SA(t.args[r2], n) : n), t.openParenToken, t.closeParenToken, t.commaSeparatorList);
57080
57085
  }
57081
57086
  function jo(t, e) {
57082
- const n = Ye(t.atSignToken, e.atSignToken) ? t.atSignToken : e.atSignToken, r2 = Go(t.name, e.name), i = Cf(t.args, e.args);
57087
+ const n = He(t.atSignToken, e.atSignToken) ? t.atSignToken : e.atSignToken, r2 = Go(t.name, e.name), i = Cf(t.args, e.args);
57083
57088
  return new Xn(n, r2, i);
57084
57089
  }
57085
57090
  var zr = (t) => new Error(`Editing generated nodes from ${t} is not supported; edit the macro arguments or Markdown resources instead.`);
@@ -57807,7 +57812,7 @@ class PA {
57807
57812
  }), this.db.setBuiltInTypes(n), this.db.setBaseTypeMembers(r2), n;
57808
57813
  }
57809
57814
  bootstrapGlobalScope() {
57810
- const e = new Ue, n = O.createGeneratedSymbol("Number", y.BuiltInType);
57815
+ const e = new Ge, n = O.createGeneratedSymbol("Number", y.BuiltInType);
57811
57816
  e.set("Number", n);
57812
57817
  const r2 = O.createGeneratedSymbol("Int", y.BuiltInType);
57813
57818
  e.set("Int", r2);
@@ -57839,7 +57844,7 @@ class PA {
57839
57844
  return e.set("AccessExpression", x), this.db.setGlobalScope(e), e;
57840
57845
  }
57841
57846
  bootstrapEnv() {
57842
- var k, b, x, A, M, V, B, C, J, ne, ee, ge, he;
57847
+ var k, b, x, A, M, V, B, C, J, re, ee, ge, he;
57843
57848
  this.globalEnv = Wn.rootEnv();
57844
57849
  const e = (k = this.db.globalScope().get(this.db, "Number")) == null ? undefined : k.symbol;
57845
57850
  if (!e)
@@ -57868,7 +57873,7 @@ class PA {
57868
57873
  const l = (J = this.db.globalScope().get(this.db, "List")) == null ? undefined : J.symbol;
57869
57874
  if (!l)
57870
57875
  throw new Error("Expected symbol");
57871
- const u = (ne = this.db.globalScope().get(this.db, "Dict")) == null ? undefined : ne.symbol;
57876
+ const u = (re = this.db.globalScope().get(this.db, "Dict")) == null ? undefined : re.symbol;
57872
57877
  if (!u)
57873
57878
  throw new Error("Expected symbol");
57874
57879
  const p = (ee = this.db.globalScope().get(this.db, "Partial")) == null ? undefined : ee.symbol;
@@ -57884,42 +57889,42 @@ class PA {
57884
57889
  name: "Number",
57885
57890
  symbol: e,
57886
57891
  type: e.type(this.db),
57887
- value: rn()
57892
+ value: sn()
57888
57893
  })), this.globalEnv.data.bindings.push(new De({
57889
57894
  name: "Int",
57890
57895
  symbol: n,
57891
57896
  type: n.type(this.db),
57892
- value: rn()
57897
+ value: sn()
57893
57898
  })), this.globalEnv.data.bindings.push(new De({
57894
57899
  name: "String",
57895
57900
  symbol: r2,
57896
57901
  type: r2.type(this.db),
57897
- value: rn()
57902
+ value: sn()
57898
57903
  })), this.globalEnv.data.bindings.push(new De({
57899
57904
  name: "Boolean",
57900
57905
  symbol: i,
57901
57906
  type: i.type(this.db),
57902
- value: rn()
57907
+ value: sn()
57903
57908
  })), this.globalEnv.data.bindings.push(new De({
57904
57909
  name: "Heredoc",
57905
57910
  symbol: s2,
57906
57911
  type: s2.type(this.db),
57907
- value: rn()
57912
+ value: sn()
57908
57913
  })), this.globalEnv.data.bindings.push(new De({
57909
57914
  name: "Any",
57910
57915
  symbol: o,
57911
57916
  type: o.type(this.db),
57912
- value: rn()
57917
+ value: sn()
57913
57918
  })), this.globalEnv.data.bindings.push(new De({
57914
57919
  name: "Void",
57915
57920
  symbol: a,
57916
57921
  type: a.type(this.db),
57917
- value: rn()
57922
+ value: sn()
57918
57923
  })), this.globalEnv.data.bindings.push(new De({
57919
57924
  name: "Module",
57920
57925
  symbol: c,
57921
57926
  type: c.type(this.db),
57922
- value: rn()
57927
+ value: sn()
57923
57928
  })), this.globalEnv.data.bindings.push(new De({
57924
57929
  name: "List",
57925
57930
  symbol: l,
@@ -57944,7 +57949,7 @@ class PA {
57944
57949
  name: "AccessExpression",
57945
57950
  symbol: h,
57946
57951
  type: h.type(this.db),
57947
- value: rn()
57952
+ value: sn()
57948
57953
  }));
57949
57954
  }
57950
57955
  bootstrapDefinition() {
@@ -58105,7 +58110,7 @@ class PA {
58105
58110
  } catch (n) {
58106
58111
  if (n instanceof Re)
58107
58112
  return new ri(new Nt([n]));
58108
- if (n instanceof et)
58113
+ if (n instanceof tt)
58109
58114
  return new ri(new Nt([]), new ot([n.diag]));
58110
58115
  throw n;
58111
58116
  }
@@ -58114,7 +58119,7 @@ class PA {
58114
58119
  try {
58115
58120
  return this.db.interpretFileJson(e);
58116
58121
  } catch (n) {
58117
- if (n instanceof et)
58122
+ if (n instanceof tt)
58118
58123
  return new ot([n.diag instanceof w ? n.diag.resolve(this.db) : n.diag]);
58119
58124
  throw n;
58120
58125
  }
@@ -58544,11 +58549,11 @@ var x_ = (t) => {
58544
58549
  return e;
58545
58550
  };
58546
58551
  var Cl = (t, e) => t instanceof de ? t.span().start <= e && e <= t.span().end : t.offset && t.end() ? t.offset <= e && e <= t.end() : false;
58547
- var Xt = (t, e) => {
58552
+ var Zt = (t, e) => {
58548
58553
  let n;
58549
- return t instanceof Array ? (n = t.find((r2) => Cl(r2, e)), n && (n = Xt(n, e) || n)) : j(t, (r2) => {
58554
+ return t instanceof Array ? (n = t.find((r2) => Cl(r2, e)), n && (n = Zt(n, e) || n)) : j(t, (r2) => {
58550
58555
  if (!n && Cl(r2, e)) {
58551
- const i = Xt(r2, e);
58556
+ const i = Zt(r2, e);
58552
58557
  i ? n = i : n = r2;
58553
58558
  }
58554
58559
  }), n;
@@ -58647,7 +58652,7 @@ var P_ = (t, e) => {
58647
58652
  if (i.kind === T.UnionType ? (r2 = i.origin) != null && r2.symbol ? s2 = i.origin.symbol : s2 = i.aliasSymbol : s2 = i.symbol, s2 instanceof O && (s2 != null && s2.declarationId)) {
58648
58653
  const a = t.nodeById(s2.declarationId);
58649
58654
  if (a instanceof $ || a instanceof pe || a instanceof F) {
58650
- const o = Qt(a);
58655
+ const o = Jt(a);
58651
58656
  if (o.length)
58652
58657
  return o;
58653
58658
  }
@@ -58659,7 +58664,7 @@ var qa = (t, e) => {
58659
58664
  if (e instanceof O && e.declarationId) {
58660
58665
  const n = t.nodeById(e.declarationId);
58661
58666
  if (n instanceof $ || n instanceof pe || n instanceof F) {
58662
- const r2 = Qt(n);
58667
+ const r2 = Jt(n);
58663
58668
  if (r2.length)
58664
58669
  return r2;
58665
58670
  }
@@ -58671,14 +58676,14 @@ var qa = (t, e) => {
58671
58676
  }
58672
58677
  return P_(t, e);
58673
58678
  };
58674
- var nn = /* @__PURE__ */ ((t) => (t.Function = "Function", t.Variable = "Variable", t.Method = "Method", t.Property = "Property", t.Param = "Param", t.Trait = "Trait", t.Type = "Type", t.Module = "Module", t.TypeAlias = "Type", t.BuiltInType = "Buit-in Type", t.None = "None", t.Self = "Self", t.ElemName = "ElemName", t.ElemType = "ElemType", t))(nn || {});
58679
+ var rn = /* @__PURE__ */ ((t) => (t.Function = "Function", t.Variable = "Variable", t.Method = "Method", t.Property = "Property", t.Param = "Param", t.Trait = "Trait", t.Type = "Type", t.Module = "Module", t.TypeAlias = "Type", t.BuiltInType = "Buit-in Type", t.None = "None", t.Self = "Self", t.ElemName = "ElemName", t.ElemType = "ElemType", t))(rn || {});
58675
58680
  var Gn = "any";
58676
58681
  var Bf = (t) => {
58677
58682
  var e;
58678
58683
  return ((e = t.symbol) == null ? undefined : e.name) || Gn;
58679
58684
  };
58680
58685
  var $f = (t, e, n = /* @__PURE__ */ new Set) => {
58681
- let r2 = `${nn.Param} ${t.name}: `;
58686
+ let r2 = `${rn.Param} ${t.name}: `;
58682
58687
  return r2 += En(t, e, (i) => {
58683
58688
  var s2;
58684
58689
  return (s2 = i.symbol) != null && s2.name ? i.symbol.name : Tt(i, e, n);
@@ -58694,10 +58699,10 @@ var zf = (t, e, n = /* @__PURE__ */ new Set) => {
58694
58699
  return `(${r2}) => ${i}`;
58695
58700
  };
58696
58701
  var C_ = (t, e) => En(t, e, (n) => zf(n, e));
58697
- var xi = (t, e) => `${nn.Function} ${t.name}: ${C_(t, e)}`;
58702
+ var xi = (t, e) => `${rn.Function} ${t.name}: ${C_(t, e)}`;
58698
58703
  var N_ = () => "built-in type";
58699
58704
  var F_ = (t) => N_();
58700
- var L_ = (t) => `${nn.Type} ${t.name}: ${F_()}`;
58705
+ var L_ = (t) => `${rn.Type} ${t.name}: ${F_()}`;
58701
58706
  var Wf = (t) => typeof t.value == "string" ? `"${t.value}"` : `${t.value}`;
58702
58707
  var B_ = (t, e, n = /* @__PURE__ */ new Set) => t.types.map((r2) => {
58703
58708
  var i;
@@ -58705,15 +58710,15 @@ var B_ = (t, e, n = /* @__PURE__ */ new Set) => t.types.map((r2) => {
58705
58710
  }).join(" | ");
58706
58711
  var $_ = (t, e) => En(t, e, (n) => Tt(n, e), Gn);
58707
58712
  var z_ = (t, e) => {
58708
- let n = `${nn.Type} ${t.name}: `;
58713
+ let n = `${rn.Type} ${t.name}: `;
58709
58714
  return n += $_(t, e), n;
58710
58715
  };
58711
58716
  var W_ = (t, e) => {
58712
- let n = `${nn.Variable} ${t.name}: `;
58717
+ let n = `${rn.Variable} ${t.name}: `;
58713
58718
  return n += En(t, e, Tt), n;
58714
58719
  };
58715
58720
  var q_ = (t, e) => En(t, e, (n) => Tt(n, e));
58716
- var V_ = (t, e) => `${nn.Property} ${t.name}: ${q_(t, e)}`;
58721
+ var V_ = (t, e) => `${rn.Property} ${t.name}: ${q_(t, e)}`;
58717
58722
  function Qo(t) {
58718
58723
  return t.name && t.symbol && "nodeId" in t.symbol.id ? t.symbol.id.key : t;
58719
58724
  }
@@ -58736,7 +58741,7 @@ var K_ = (t, e, n = "", r2 = /* @__PURE__ */ new Set) => {
58736
58741
  let s2 = `${i.name}`, { type: a } = t;
58737
58742
  if (a.kind === T.DynamicType) {
58738
58743
  const { ruleset: o } = a;
58739
- a = Xo(a), He(a) && (a = a.type);
58744
+ a = Xo(a), Ue(a) && (a = a.type);
58740
58745
  const c = o.getRule(D.Optional), l = o.getRule(D.Default);
58741
58746
  (c && c.enabled || l && l.enabled) && (s2 += " (optional)");
58742
58747
  }
@@ -58744,10 +58749,10 @@ var K_ = (t, e, n = "", r2 = /* @__PURE__ */ new Set) => {
58744
58749
  };
58745
58750
  var U_ = (t, e) => En(t, e, (n) => Tt(n, e));
58746
58751
  var G_ = (t, e) => En(t, e, (n) => {
58747
- let r2 = `${nn.Property} ${t.name}`, i = n;
58752
+ let r2 = `${rn.Property} ${t.name}`, i = n;
58748
58753
  if (n.kind === T.DynamicType) {
58749
58754
  const { ruleset: s2 } = n;
58750
- i = Xo(n), He(i) && (i = i.type);
58755
+ i = Xo(n), Ue(i) && (i = i.type);
58751
58756
  const a = s2.getRule(D.Optional);
58752
58757
  a && a.enabled && (r2 += " (optional)");
58753
58758
  }
@@ -58783,7 +58788,7 @@ ${o}
58783
58788
  };
58784
58789
  var j_ = (t, e) => En(t, e, (n) => In(n, e));
58785
58790
  var Y_ = (t, e) => {
58786
- let n = `${nn.Type} `;
58791
+ let n = `${rn.Type} `;
58787
58792
  return n += j_(t, e), n;
58788
58793
  };
58789
58794
  var qf = (t, e, n = "") => {
@@ -58837,7 +58842,7 @@ var J_ = (t, e) => En(t, e, (n) => {
58837
58842
  return (i = n.symbol) != null && i.name ? r2 += `${n.symbol.name} ` : n.kind === T.UnionType && ((a = (s2 = n.origin) == null ? undefined : s2.symbol) != null && a.name ? r2 += `${n.origin.symbol.name} ` : (o = n.aliasSymbol) != null && o.name && (r2 += `${n.aliasSymbol.name} `)), r2 += Q_(t, e), r2;
58838
58843
  });
58839
58844
  var X_ = (t, e) => {
58840
- let n = `${nn.Variable} ${t.name}: `;
58845
+ let n = `${rn.Variable} ${t.name}: `;
58841
58846
  return n += J_(t, e), n;
58842
58847
  };
58843
58848
  var Z_ = (t, e, n = /* @__PURE__ */ new Set) => {
@@ -58916,7 +58921,7 @@ var rO = (t, e) => {
58916
58921
  return null;
58917
58922
  };
58918
58923
  var Uf = (t, e, n = /* @__PURE__ */ new Set) => {
58919
- const { type: r2, ruleset: i } = e, s2 = hn(t.db, r2);
58924
+ const { type: r2, ruleset: i } = e, s2 = Qt(t.db, r2);
58920
58925
  if (s2 && s2.has("__call__")) {
58921
58926
  const a = s2.get("__call__");
58922
58927
  if (a) {
@@ -58982,7 +58987,7 @@ var aO = (t, e) => {
58982
58987
  var s2;
58983
58988
  let n = "sql";
58984
58989
  const r2 = (s2 = e.typeArguments) == null ? undefined : s2[0];
58985
- let i = r2 && Xe(t.db, r2);
58990
+ let i = r2 && Ze(t.db, r2);
58986
58991
  return (i == null ? undefined : i.kind) === T.UnionType && (i = i.types[0]), i && i.kind === T.LiteralType && i.primitiveTypeKind === N.String && (n = i.value), `@\${i:${n}} \${i:};;`;
58987
58992
  };
58988
58993
  var ur = (t, e, n = /* @__PURE__ */ new Set) => e.name === "Heredoc" ? aO(t, e) : Zo(e) ? oO(t, e, n) : ec(t, e, true, "", n);
@@ -58991,9 +58996,9 @@ var oO = (t, e, n = /* @__PURE__ */ new Set) => {
58991
58996
  const r2 = Jo(e, n);
58992
58997
  if (!r2)
58993
58998
  return "${i:}";
58994
- let i = Xe(t.db, pp(e));
58999
+ let i = Ze(t.db, pp(e));
58995
59000
  if (i.kind === T.UnionType) {
58996
- const c = i.types.map((l) => Xe(t.db, l));
59001
+ const c = i.types.map((l) => Ze(t.db, l));
58997
59002
  i = c.find((l) => l.kind === T.ProductType) ?? c[0];
58998
59003
  }
58999
59004
  let s2;
@@ -59094,7 +59099,7 @@ var dO = (t, e, n) => {
59094
59099
  return uo(o, "name");
59095
59100
  };
59096
59101
  var Ka = (t, e, n, r2 = true) => {
59097
- const i = t.ast(r.create(e)).unwrap().originalAst, s2 = Xt(i, n) ?? i, o = dO(s2, t, e).filter((l) => fO(t, l, e, n)), c = _s(o);
59102
+ const i = t.ast(r.create(e)).unwrap().originalAst, s2 = Zt(i, n) ?? i, o = dO(s2, t, e).filter((l) => fO(t, l, e, n)), c = _s(o);
59098
59103
  return r2 ? c.concat(tc(t, o)) : c;
59099
59104
  };
59100
59105
  var Wl = (t, e, n, r2 = true) => Ka(t, e, n, r2).filter((i) => i.kind === Et.Type);
@@ -59111,7 +59116,7 @@ var hO = (t, e, n) => {
59111
59116
  default:
59112
59117
  return [];
59113
59118
  }
59114
- }, s2 = t.ast(r.create(e)), a = s2.isOk() ? s2.unwrap().originalAst : null, o = a ? Xt(a, n) : null, c = r2(o), l = c ? t.symbol(c.id) : null, u = l != null && l.isOk() ? l.unwrap() : null, p = u ? t.specificType(u.id) : null, f = p != null && p.isOk() ? p.unwrap() : null;
59119
+ }, s2 = t.ast(r.create(e)), a = s2.isOk() ? s2.unwrap().originalAst : null, o = a ? Zt(a, n) : null, c = r2(o), l = c ? t.symbol(c.id) : null, u = l != null && l.isOk() ? l.unwrap() : null, p = u ? t.specificType(u.id) : null, f = p != null && p.isOk() ? p.unwrap() : null;
59115
59120
  return i(f).map(({ value: k }) => Cr(`${k}`, `${k}`, Et.Value, `${k}`));
59116
59121
  };
59117
59122
  var Xi = (t, e) => {
@@ -59121,15 +59126,15 @@ var Xi = (t, e) => {
59121
59126
  return Ua(t, e);
59122
59127
  if (e.kind === T.DynamicType) {
59123
59128
  let r2 = Vu(e);
59124
- if (He(r2) && (r2 = e.type), r2.kind === T.UnionType)
59129
+ if (Ue(r2) && (r2 = e.type), r2.kind === T.UnionType)
59125
59130
  return Ua(t, r2);
59126
- const i = hn(t, r2);
59131
+ const i = Qt(t, r2);
59127
59132
  if (i)
59128
59133
  return Array.from(i.values());
59129
59134
  }
59130
59135
  if (e.kind === T.DynamicBodyType)
59131
59136
  return Xi(t, e.type);
59132
- const n = hn(t, e);
59137
+ const n = Qt(t, e);
59133
59138
  return n ? Array.from(n.values()) : [];
59134
59139
  };
59135
59140
  var Ua = (t, e) => {
@@ -59202,7 +59207,7 @@ var Yf = (t) => {
59202
59207
  }
59203
59208
  };
59204
59209
  var Kl = (t, e, n, r2 = true) => {
59205
- const i = t.ast(r.create(e)), s2 = i.isOk() ? i.unwrap().originalAst : null, a = s2 ? Xt(s2, n) : null, o = a ? Yo(a) && Ho(a) : null, c = o ? Ga(t, o.leftExpression) : [], l = _s(c);
59210
+ const i = t.ast(r.create(e)), s2 = i.isOk() ? i.unwrap().originalAst : null, a = s2 ? Zt(s2, n) : null, o = a ? Yo(a) && Ho(a) : null, c = o ? Ga(t, o.leftExpression) : [], l = _s(c);
59206
59211
  return r2 ? l.concat(tc(t, c)) : l;
59207
59212
  };
59208
59213
  var Ga = (t, e) => {
@@ -59220,7 +59225,7 @@ var Qs = (t, e, n) => {
59220
59225
  var vO = (t, e, n) => {
59221
59226
  if (!t)
59222
59227
  return [];
59223
- const r2 = Xt(t, e);
59228
+ const r2 = Zt(t, e);
59224
59229
  if (r2 && Yo(r2)) {
59225
59230
  const i = Ho(r2);
59226
59231
  if (i)
@@ -59229,7 +59234,7 @@ var vO = (t, e, n) => {
59229
59234
  return Ga(n, t.elementName);
59230
59235
  };
59231
59236
  var Ul = (t, e, n) => {
59232
- const r2 = t.ast(r.create(e)).unwrap().originalAst, i = r2 ? Xt(r2, n) : null, s2 = i ? Yf(i) : null, a = vO(s2, n, t);
59237
+ const r2 = t.ast(r.create(e)).unwrap().originalAst, i = r2 ? Zt(r2, n) : null, s2 = i ? Yf(i) : null, a = vO(s2, n, t);
59233
59238
  return _s(a);
59234
59239
  };
59235
59240
  var bO = (t, e, n, r2 = "") => {
@@ -59260,7 +59265,7 @@ var bO = (t, e, n, r2 = "") => {
59260
59265
  ];
59261
59266
  if (TO(s2))
59262
59267
  return Qs(t);
59263
- const a = Xt(t.ast(r.create(e)).unwrap().originalAst, n);
59268
+ const a = Zt(t.ast(r.create(e)).unwrap().originalAst, n);
59264
59269
  if (a) {
59265
59270
  if (Yf(a))
59266
59271
  return Ul(t, e, n);
@@ -59389,7 +59394,7 @@ function _O(t, e, n) {
59389
59394
  return r2 && i ? nc(r2, i, n) : false;
59390
59395
  }
59391
59396
  var OO = (t, e, n, r2, i) => {
59392
- const { transformedAst: s2 } = t.ast(r.create(e)).unwrap(), a = Xt(s2, r2);
59397
+ const { transformedAst: s2 } = t.ast(r.create(e)).unwrap(), a = Zt(s2, r2);
59393
59398
  if (a instanceof I) {
59394
59399
  const o = n.map((f) => {
59395
59400
  const { transformedAst: h } = t.ast(r.create(f)).unwrap();
@@ -59491,7 +59496,7 @@ function jl(t, e, n) {
59491
59496
  };
59492
59497
  }
59493
59498
  function Zi(t, e) {
59494
- const n = dn(t) ? t.primitiveTypeKind : U(t, { db: e.db }), r2 = dn(t) ? t.value : undefined;
59499
+ const n = hn(t) ? t.primitiveTypeKind : U(t, { db: e.db }), r2 = hn(t) ? t.value : undefined;
59495
59500
  if (t.symbol && t.symbol instanceof O && t.symbol.declarationId) {
59496
59501
  const i = r.create(t.symbol.declarationId.filepath);
59497
59502
  if (i) {
@@ -59558,7 +59563,7 @@ class zR {
59558
59563
  }
59559
59564
  getNodeByOffset(e, n) {
59560
59565
  const { originalAst: r2 } = this.program.ast(r.create(e)).unwrap();
59561
- return Xt(r2, n);
59566
+ return Zt(r2, n);
59562
59567
  }
59563
59568
  getHoverInformation(e, n) {
59564
59569
  let r2 = this.getNodeByOffset(e, n);
@@ -59783,9 +59788,9 @@ class zR {
59783
59788
  const J = o();
59784
59789
  if (J.isErr())
59785
59790
  return;
59786
- const ne = (x = J.env()) == null ? undefined : x.data.bindings.find((he) => he.data.name === k), ee = f.elementType.value.value, ge = f.elementName.value.value;
59787
- if ((A = ne == null ? undefined : ne.data.value) != null && A.members.get(ee) && $e(ne.data.value.members.get(ee)) instanceof zn) {
59788
- const he = (M = ne.data.value.members.get(ee)) == null ? undefined : M.members.get(ge), qt = he && l(he);
59791
+ const re = (x = J.env()) == null ? undefined : x.data.bindings.find((he) => he.data.name === k), ee = f.elementType.value.value, ge = f.elementName.value.value;
59792
+ if ((A = re == null ? undefined : re.data.value) != null && A.members.get(ee) && $e(re.data.value.members.get(ee)) instanceof zn) {
59793
+ const he = (M = re.data.value.members.get(ee)) == null ? undefined : M.members.get(ge), qt = he && l(he);
59789
59794
  qt && c(k, [ee, ge], qt, he);
59790
59795
  }
59791
59796
  } else if (f instanceof F && f.elementType instanceof I) {
@@ -59794,7 +59799,7 @@ class zR {
59794
59799
  const J = o();
59795
59800
  if (J.isErr())
59796
59801
  return;
59797
- const ne = (B = J.env()) == null ? undefined : B.data.bindings.find((he) => he.data.name === k), ee = (C = ne == null ? undefined : ne.data.value) == null ? undefined : C.members.get(f.elementType.value.value), ge = ee && l(ee);
59802
+ const re = (B = J.env()) == null ? undefined : B.data.bindings.find((he) => he.data.name === k), ee = (C = re == null ? undefined : re.data.value) == null ? undefined : C.members.get(f.elementType.value.value), ge = ee && l(ee);
59798
59803
  ge && c(k, [f.elementType.value.value], ge, ee);
59799
59804
  }
59800
59805
  }, p = (f) => {
@@ -60030,7 +60035,7 @@ var zO = {
60030
60035
  name: "template",
60031
60036
  provider: (t, e, n, r2, i, s2, a, o) => {
60032
60037
  let c = n;
60033
- return en(e) ? c = $O(t, c, e, r2, i, s2, a, o) : c = td(t, n, e, i, s2, a, o), c;
60038
+ return tn(e) ? c = $O(t, c, e, r2, i, s2, a, o) : c = td(t, n, e, i, s2, a, o), c;
60034
60039
  },
60035
60040
  signature: {
60036
60041
  params: [
@@ -60069,7 +60074,7 @@ function rd(t, e) {
60069
60074
  return t === "::" ? `__tag__::${n}` : `${t}::__tag__::${n}`;
60070
60075
  }
60071
60076
  function qO(t, e, n, r2) {
60072
- const i = e.moduleIdOfFile(e.astFromNode(n.id).filePath), s2 = rd(i.key, t.data), a = Jt(n.parent, s2, e.db, n.parent);
60077
+ const i = e.moduleIdOfFile(e.astFromNode(n.id).filePath), s2 = rd(i.key, t.data), a = Xt(n.parent, s2, e.db, n.parent);
60073
60078
  if (a.isOk()) {
60074
60079
  const o = a.unwrap();
60075
60080
  if (o instanceof O && o.declarationId)
@@ -60143,7 +60148,7 @@ function YO(t, e) {
60143
60148
  type: p,
60144
60149
  symbol: O.createGeneratedSymbol("expr", y.FunctionScopedVariable)
60145
60150
  }
60146
- ], Ze(t), t), b = dt([
60151
+ ], et(t), t), b = dt([
60147
60152
  {
60148
60153
  type: o,
60149
60154
  symbol: O.createGeneratedSymbol("dataset", y.FunctionScopedVariable)
@@ -60182,7 +60187,7 @@ function JO(t, e) {
60182
60187
  }
60183
60188
  function XO(t, e) {
60184
60189
  var a;
60185
- const n = e instanceof I ? Jt(On(e), e.value.value, t, e) : t.symbol(e.id);
60190
+ const n = e instanceof I ? Xt(On(e), e.value.value, t, e) : t.symbol(e.id);
60186
60191
  if (n.isErr())
60187
60192
  return n.err() === m.WrongKind ? [w.createForNode(e.id, g.ExpectedThings, "dataset")] : [...n.diagnostics];
60188
60193
  const r2 = n.unwrap(), i = t.specificType(r2.id);
@@ -60240,12 +60245,12 @@ function eR(t, e, n, r2) {
60240
60245
  let i = e;
60241
60246
  const s2 = [], a = [];
60242
60247
  let o = false;
60243
- for (;Je(i); ) {
60248
+ for (;Xe(i); ) {
60244
60249
  if (i.rightExpression instanceof I)
60245
60250
  s2.unshift(i.rightExpression.value.value), a.unshift(i.rightExpression);
60246
60251
  else
60247
60252
  return [w.createForNode(i.rightExpression.id, g.ExpectedThings, "identifier in property access")];
60248
- const l = i.leftExpression instanceof I ? Jt(On(i), i.leftExpression.value.value, t, i.leftExpression).chain((u) => t.specificType(u.id)) : t.type(i.leftExpression.id);
60253
+ const l = i.leftExpression instanceof I ? Xt(On(i), i.leftExpression.value.value, t, i.leftExpression).chain((u) => t.specificType(u.id)) : t.type(i.leftExpression.id);
60249
60254
  if (l.isOk()) {
60250
60255
  const u = l.unwrap();
60251
60256
  if (n(u)) {
@@ -60272,7 +60277,7 @@ function tR(t, e, n, r2, i) {
60272
60277
  }
60273
60278
  function nR(t, e) {
60274
60279
  var i;
60275
- const n = e instanceof I ? Jt(On(e), e.value.value, t, e) : t.symbol(e.id);
60280
+ const n = e instanceof I ? Xt(On(e), e.value.value, t, e) : t.symbol(e.id);
60276
60281
  if (n.isErr())
60277
60282
  return [...n.diagnostics];
60278
60283
  const r2 = n.unwrap();
@@ -60298,7 +60303,7 @@ function nR(t, e) {
60298
60303
  }
60299
60304
  function rR(t, e) {
60300
60305
  var a;
60301
- const n = e instanceof I ? Jt(On(e), e.value.value, t, e) : t.symbol(e.id);
60306
+ const n = e instanceof I ? Xt(On(e), e.value.value, t, e) : t.symbol(e.id);
60302
60307
  if (n.isErr())
60303
60308
  return n.err() === m.WrongKind ? [w.createForNode(e.id, g.ExpectedThings, "dataset")] : [...n.diagnostics];
60304
60309
  const r2 = n.unwrap(), i = t.specificType(r2.id);
@@ -60342,7 +60347,7 @@ function sR(t, e) {
60342
60347
  };
60343
60348
  }
60344
60349
  function ic(t, e, n, r2, i) {
60345
- if (!Je(e))
60350
+ if (!Xe(e))
60346
60351
  return [w.createForNode(e.id, g.ExpectedThings, `${i}'s field access expression`)];
60347
60352
  const s2 = eR(t, e, n, i);
60348
60353
  if (Array.isArray(s2))
@@ -60404,7 +60409,7 @@ function Hl(t, e, n, r2) {
60404
60409
  }
60405
60410
  function cR(t, e) {
60406
60411
  var c, l;
60407
- if (!Je(e))
60412
+ if (!Xe(e))
60408
60413
  return new S(m.WrongKind);
60409
60414
  if (e.rightExpression.flags === Rr.HasError)
60410
60415
  return new S(m.WrongKind);
@@ -60470,7 +60475,7 @@ function pR(t, e, n) {
60470
60475
  if ("modelNode" in i) {
60471
60476
  const { modelNode: l, parts: u } = i, p = n.program.interpretNode(l, e).returnVal, f = (c = uR(p)) == null ? undefined : c.replaceAll("::", ".");
60472
60477
  if (!f)
60473
- throw new et(w.createForNode(l.id, g.AdhocError, "Cannot resolve field ref of an anonymous model"));
60478
+ throw new tt(w.createForNode(l.id, g.AdhocError, "Cannot resolve field ref of an anonymous model"));
60474
60479
  const h = /* @__PURE__ */ new Map([
60475
60480
  ["model", G2.create(f)],
60476
60481
  ["field", G2.create(u[u.length - 1])],
@@ -60564,7 +60569,7 @@ function on2(n) {
60564
60569
  var dr2 = { exports: {} };
60565
60570
  var sn2 = dr2.exports;
60566
60571
  var Ae2;
60567
- function cn() {
60572
+ function cn2() {
60568
60573
  return Ae2 || (Ae2 = 1, function(n, i) {
60569
60574
  (function(u, f) {
60570
60575
  n.exports = f();
@@ -61202,7 +61207,7 @@ function cn() {
61202
61207
  });
61203
61208
  }(dr2)), dr2.exports;
61204
61209
  }
61205
- var S2 = cn();
61210
+ var S2 = cn2();
61206
61211
  var wr2;
61207
61212
  var ze2;
61208
61213
  function qe2() {
@@ -61241,7 +61246,7 @@ function Ce2() {
61241
61246
  }
61242
61247
  var xr2;
61243
61248
  var Ne2;
61244
- function ln2() {
61249
+ function ln() {
61245
61250
  if (Ne2)
61246
61251
  return xr2;
61247
61252
  Ne2 = 1;
@@ -61275,7 +61280,7 @@ function At2() {
61275
61280
  if ($e2)
61276
61281
  return jr2;
61277
61282
  $e2 = 1;
61278
- var n = Ce2(), i = ln2(), u = hn2(), f = "[object Null]", c = "[object Undefined]", e = n ? n.toStringTag : undefined;
61283
+ var n = Ce2(), i = ln(), u = hn2(), f = "[object Null]", c = "[object Undefined]", e = n ? n.toStringTag : undefined;
61279
61284
  function s(v) {
61280
61285
  return v == null ? v === undefined ? c : f : e && (e in Object(v)) ? i(v) : u(v);
61281
61286
  }
@@ -61612,11 +61617,11 @@ function In2() {
61612
61617
  }
61613
61618
  return Yr2 = i, Yr2;
61614
61619
  }
61615
- var re2;
61620
+ var re;
61616
61621
  var _t2;
61617
61622
  function Mn2() {
61618
61623
  if (_t2)
61619
- return re2;
61624
+ return re;
61620
61625
  _t2 = 1;
61621
61626
  var n = On2(), i = Rn2(), u = Tn2(), f = Pn2(), c = In2();
61622
61627
  function e(s) {
@@ -61626,7 +61631,7 @@ function Mn2() {
61626
61631
  this.set(_[0], _[1]);
61627
61632
  }
61628
61633
  }
61629
- return e.prototype.clear = n, e.prototype.delete = i, e.prototype.get = u, e.prototype.has = f, e.prototype.set = c, re2 = e, re2;
61634
+ return e.prototype.clear = n, e.prototype.delete = i, e.prototype.get = u, e.prototype.has = f, e.prototype.set = c, re = e, re;
61630
61635
  }
61631
61636
  var ee;
61632
61637
  var mt2;
@@ -61653,17 +61658,17 @@ function Dn2() {
61653
61658
  }
61654
61659
  return te2 = f, te2;
61655
61660
  }
61656
- var ne;
61661
+ var ne2;
61657
61662
  var bt2;
61658
61663
  function Gn2() {
61659
61664
  if (bt2)
61660
- return ne;
61665
+ return ne2;
61661
61666
  bt2 = 1;
61662
61667
  function n(i) {
61663
61668
  var u = typeof i;
61664
61669
  return u == "string" || u == "number" || u == "symbol" || u == "boolean" ? i !== "__proto__" : i === null;
61665
61670
  }
61666
- return ne = n, ne;
61671
+ return ne2 = n, ne2;
61667
61672
  }
61668
61673
  var ae2;
61669
61674
  var qt;
@@ -72099,7 +72104,7 @@ var dk2 = {
72099
72104
  }
72100
72105
  }
72101
72106
  };
72102
- var ln3 = 43;
72107
+ var ln2 = 43;
72103
72108
  var Pt3 = 45;
72104
72109
  var cr2 = 110;
72105
72110
  var Gn3 = true;
@@ -72107,7 +72112,7 @@ var pk2 = false;
72107
72112
  function ur2(e, t) {
72108
72113
  let n = this.tokenStart + e;
72109
72114
  const o = this.charCodeAt(n);
72110
- for ((o === ln3 || o === Pt3) && (t && this.error("Number sign is not allowed"), n++);n < this.tokenEnd; n++)
72115
+ for ((o === ln2 || o === Pt3) && (t && this.error("Number sign is not allowed"), n++);n < this.tokenEnd; n++)
72111
72116
  at3(this.charCodeAt(n)) || this.error("Integer is expected", n);
72112
72117
  }
72113
72118
  function vo2(e) {
@@ -72132,15 +72137,15 @@ function Ms2() {
72132
72137
  for (;n === Ke3 || n === st3; )
72133
72138
  n = this.lookupType(++e);
72134
72139
  if (n !== ee2)
72135
- if (this.isDelim(ln3, e) || this.isDelim(Pt3, e)) {
72136
- t = this.isDelim(ln3, e) ? ln3 : Pt3;
72140
+ if (this.isDelim(ln2, e) || this.isDelim(Pt3, e)) {
72141
+ t = this.isDelim(ln2, e) ? ln2 : Pt3;
72137
72142
  do
72138
72143
  n = this.lookupType(++e);
72139
72144
  while (n === Ke3 || n === st3);
72140
72145
  n !== ee2 && (this.skip(e), vo2.call(this, Gn3));
72141
72146
  } else
72142
72147
  return null;
72143
- return e > 0 && this.skip(e), t === 0 && (n = this.charCodeAt(this.tokenStart), n !== ln3 && n !== Pt3 && this.error("Number sign is expected")), vo2.call(this, t !== 0), t === Pt3 ? "-" + this.consume(ee2) : this.consume(ee2);
72148
+ return e > 0 && this.skip(e), t === 0 && (n = this.charCodeAt(this.tokenStart), n !== ln2 && n !== Pt3 && this.error("Number sign is expected")), vo2.call(this, t !== 0), t === Pt3 ? "-" + this.consume(ee2) : this.consume(ee2);
72144
72149
  }
72145
72150
  var mk2 = "AnPlusB";
72146
72151
  var hk2 = {
@@ -72163,9 +72168,9 @@ function xf2() {
72163
72168
  default:
72164
72169
  wn2.call(this, 2, Pt3), ur2.call(this, 3, Gn3), this.next(), n = this.substrToCursor(e + 2);
72165
72170
  }
72166
- else if (this.tokenType === L2 || this.isDelim(ln3) && this.lookupType(1) === L2) {
72171
+ else if (this.tokenType === L2 || this.isDelim(ln2) && this.lookupType(1) === L2) {
72167
72172
  let o = 0;
72168
- switch (t = "1", this.isDelim(ln3) && (o = 1, this.next()), wn2.call(this, 0, cr2), this.tokenEnd - this.tokenStart) {
72173
+ switch (t = "1", this.isDelim(ln2) && (o = 1, this.next()), wn2.call(this, 0, cr2), this.tokenEnd - this.tokenStart) {
72169
72174
  case 1:
72170
72175
  this.next(), n = Ms2.call(this);
72171
72176
  break;
@@ -72176,14 +72181,14 @@ function xf2() {
72176
72181
  wn2.call(this, 1, Pt3), ur2.call(this, 2, Gn3), this.next(), n = this.substrToCursor(e + o + 1);
72177
72182
  }
72178
72183
  } else if (this.tokenType === he2) {
72179
- const o = this.charCodeAt(this.tokenStart), i = o === ln3 || o === Pt3;
72184
+ const o = this.charCodeAt(this.tokenStart), i = o === ln2 || o === Pt3;
72180
72185
  let r3 = this.tokenStart + i;
72181
72186
  for (;r3 < this.tokenEnd && at3(this.charCodeAt(r3)); r3++)
72182
72187
  ;
72183
72188
  r3 === this.tokenStart + i && this.error("Integer is expected", this.tokenStart + i), wn2.call(this, r3 - this.tokenStart, cr2), t = this.substring(e, r3), r3 + 1 === this.tokenEnd ? (this.next(), n = Ms2.call(this)) : (wn2.call(this, r3 - this.tokenStart + 1, Pt3), r3 + 2 === this.tokenEnd ? (this.next(), this.skipSC(), vo2.call(this, Gn3), n = "-" + this.consume(ee2)) : (ur2.call(this, r3 - this.tokenStart + 2, Gn3), this.next(), n = this.substrToCursor(r3 + 1)));
72184
72189
  } else
72185
72190
  this.error();
72186
- return t !== null && t.charCodeAt(0) === ln3 && (t = t.substr(1)), n !== null && n.charCodeAt(0) === ln3 && (n = n.substr(1)), {
72191
+ return t !== null && t.charCodeAt(0) === ln2 && (t = t.substr(1)), n !== null && n.charCodeAt(0) === ln2 && (n = n.substr(1)), {
72187
72192
  type: "AnPlusB",
72188
72193
  loc: this.getLocation(e, this.tokenStart),
72189
72194
  a: t,
@@ -77625,14 +77630,14 @@ var tt3;
77625
77630
  (function(e) {
77626
77631
  e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity";
77627
77632
  })(tt3 || (tt3 = {}));
77628
- var cn2;
77633
+ var cn3;
77629
77634
  (function(e) {
77630
77635
  e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
77631
- })(cn2 || (cn2 = {}));
77636
+ })(cn3 || (cn3 = {}));
77632
77637
 
77633
77638
  class dD {
77634
77639
  constructor(t, n, o) {
77635
- this.decodeTree = t, this.emitCodePoint = n, this.errors = o, this.state = tt3.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = cn2.Strict, this.runConsumed = 0;
77640
+ this.decodeTree = t, this.emitCodePoint = n, this.errors = o, this.state = tt3.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = cn3.Strict, this.runConsumed = 0;
77636
77641
  }
77637
77642
  startEntity(t) {
77638
77643
  this.decodeMode = t, this.state = tt3.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1, this.runConsumed = 0;
@@ -77681,7 +77686,7 @@ class dD {
77681
77686
  return (o = this.errors) === null || o === undefined || o.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
77682
77687
  if (t === Ge2.SEMI)
77683
77688
  this.consumed += 1;
77684
- else if (this.decodeMode === cn2.Strict)
77689
+ else if (this.decodeMode === cn3.Strict)
77685
77690
  return 0;
77686
77691
  return this.emitCodePoint(rD(this.result), this.consumed), this.errors && (t !== Ge2.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
77687
77692
  }
@@ -77713,11 +77718,11 @@ class dD {
77713
77718
  if (a === Ge2.SEMI && r3 !== 0 && (i & bt3.FLAG13) !== 0)
77714
77719
  return this.emitNamedEntityData(this.treeIndex, r3, this.consumed + this.excess);
77715
77720
  if (this.treeIndex = pD(o, i, this.treeIndex + Math.max(1, r3), a), this.treeIndex < 0)
77716
- return this.result === 0 || this.decodeMode === cn2.Attribute && (r3 === 0 || uD(a)) ? 0 : this.emitNotTerminatedNamedEntity();
77721
+ return this.result === 0 || this.decodeMode === cn3.Attribute && (r3 === 0 || uD(a)) ? 0 : this.emitNotTerminatedNamedEntity();
77717
77722
  if (i = o[this.treeIndex], r3 = (i & bt3.VALUE_LENGTH) >> 14, r3 !== 0) {
77718
77723
  if (a === Ge2.SEMI)
77719
77724
  return this.emitNamedEntityData(this.treeIndex, r3, this.consumed + this.excess);
77720
- this.decodeMode !== cn2.Strict && (i & bt3.FLAG13) === 0 && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
77725
+ this.decodeMode !== cn3.Strict && (i & bt3.FLAG13) === 0 && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
77721
77726
  }
77722
77727
  n++, this.excess++;
77723
77728
  }
@@ -77736,7 +77741,7 @@ class dD {
77736
77741
  var t;
77737
77742
  switch (this.state) {
77738
77743
  case tt3.NamedEntity:
77739
- return this.result !== 0 && (this.decodeMode !== cn2.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
77744
+ return this.result !== 0 && (this.decodeMode !== cn3.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
77740
77745
  case tt3.NumericDecimal:
77741
77746
  return this.emitNumericEntity(0, 2);
77742
77747
  case tt3.NumericHex:
@@ -77965,7 +77970,7 @@ class hD {
77965
77970
  }
77966
77971
  }
77967
77972
  startEntity() {
77968
- this.baseState = this.state, this.state = F2.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? cn2.Strict : this.baseState === F2.Text || this.baseState === F2.InSpecialTag ? cn2.Legacy : cn2.Attribute);
77973
+ this.baseState = this.state, this.state = F2.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? cn3.Strict : this.baseState === F2.Text || this.baseState === F2.InSpecialTag ? cn3.Legacy : cn3.Attribute);
77969
77974
  }
77970
77975
  stateInEntity() {
77971
77976
  const t = this.index - this.offset, n = this.entityDecoder.write(this.buffer, t);
@@ -81556,7 +81561,7 @@ var DM = (e, t) => {
81556
81561
  var FM = (e, t, n) => {
81557
81562
  const o = e.split(".");
81558
81563
  if (o.length === 1) {
81559
- const s = Jt(t, e, n, t);
81564
+ const s = Xt(t, e, n, t);
81560
81565
  if (s.isErr())
81561
81566
  return;
81562
81567
  const c = s.unwrap();
@@ -81566,7 +81571,7 @@ var FM = (e, t, n) => {
81566
81571
  }
81567
81572
  return;
81568
81573
  }
81569
- const i = o[0], r3 = Jt(t, i, n, t);
81574
+ const i = o[0], r3 = Xt(t, i, n, t);
81570
81575
  if (r3.isErr())
81571
81576
  return;
81572
81577
  const a = r3.unwrap();
@@ -81654,7 +81659,7 @@ var NM = {
81654
81659
  }
81655
81660
  };
81656
81661
  function Xl2(e, t, n, o) {
81657
- const i = Jt(e, o, n, e);
81662
+ const i = Xt(e, o, n, e);
81658
81663
  if (i.isOk()) {
81659
81664
  const r3 = i.unwrap();
81660
81665
  let a;
@@ -103540,7 +103545,7 @@ var TypeClass = /* @__PURE__ */ function(e) {
103540
103545
  return e.SCALAR = "scalar", e.FIELD = "field", e.ROW = "row", e.TABLE = "table", e.RELATIONSHIP = "relationship", e.ARRAY = "array", e.GROUPING_SET = "grouping_set", e.FUNCTION = "function", e.UNION = "union", e.TYPE_PARAMETER = "type_parameter", e.TYPE_CLASS = "type_class", e.USER_ATTRIBUTE = "user_attribute", e.MODULE = "module", e.ERROR_ANY = "error_any", e.NULL = "null", e;
103541
103546
  }({});
103542
103547
  var ErrorCode = /* @__PURE__ */ function(e) {
103543
- return e[e.UNEXPECTED_ERROR = 0] = "UNEXPECTED_ERROR", e[e.SYNTAX_ERROR = 1] = "SYNTAX_ERROR", e[e.INVALID_EXPRESSION_0 = 100] = "INVALID_EXPRESSION_0", e[e.RELATIONSHIP_NOT_FOUND_0 = 101] = "RELATIONSHIP_NOT_FOUND_0", e[e.MODEL_0_NOT_FOUND = 102] = "MODEL_0_NOT_FOUND", e[e.FIELD_0_NOT_FOUND_IN_MODEL_1 = 103] = "FIELD_0_NOT_FOUND_IN_MODEL_1", e[e.FANOUT_ON_0_FROM_1 = 104] = "FANOUT_ON_0_FROM_1", e[e.MODEL_IN_AQL_FIELD_NOT_FOUND = 105] = "MODEL_IN_AQL_FIELD_NOT_FOUND", e[e.RELATIONSHIP_PATH_NOT_FOUND_FROM_0_TO_1 = 106] = "RELATIONSHIP_PATH_NOT_FOUND_FROM_0_TO_1", e[e.INVALID_ARITY_EXPECT_0_FOR_FUNCTION_1_GOT_2 = 200] = "INVALID_ARITY_EXPECT_0_FOR_FUNCTION_1_GOT_2", e[e.INVALID_ARGUMENT_TYPE = 201] = "INVALID_ARGUMENT_TYPE", e[e.UNKNOWN_IDENTIFIER_0 = 202] = "UNKNOWN_IDENTIFIER_0", e[e.UNSUPPORTED_OPERATOR_0_FOR_TYPE_1 = 203] = "UNSUPPORTED_OPERATOR_0_FOR_TYPE_1", e[e.EXPECTED_0_FOUND_1 = 204] = "EXPECTED_0_FOUND_1", e[e.NAMED_EXPRESSION_EXPECT_A_FIELD_OR_SCALAR_VALUE_FOUND_0 = 205] = "NAMED_EXPRESSION_EXPECT_A_FIELD_OR_SCALAR_VALUE_FOUND_0", e[e.EXPECTED_SCALAR_LIKE_TYPE_FOUND_0 = 206] = "EXPECTED_SCALAR_LIKE_TYPE_FOUND_0", e[e.NO_MATCHING_SIGNATURE_FOR_FUNCTION_0 = 207] = "NO_MATCHING_SIGNATURE_FOR_FUNCTION_0", e[e.INVALID_MEASURE_DEFINITION_FOR_FIELD_0_IN_MODEL_1 = 208] = "INVALID_MEASURE_DEFINITION_FOR_FIELD_0_IN_MODEL_1", e[e.DIMENSIONALIZE_NOT_ALLOWED_DUE_TO_0 = 209] = "DIMENSIONALIZE_NOT_ALLOWED_DUE_TO_0", e[e.CANNOT_REFERENCE_AQL_FIELD_0_FROM_SQL = 210] = "CANNOT_REFERENCE_AQL_FIELD_0_FROM_SQL", e[e.RIGHT_SIDE_OF_PIPE_MUST_BE_A_FUNCTION = 211] = "RIGHT_SIDE_OF_PIPE_MUST_BE_A_FUNCTION", e[e.INVALID_METRIC_DEFINITION_0_IN_DATASET_1 = 212] = "INVALID_METRIC_DEFINITION_0_IN_DATASET_1", e[e.MEMBER_0_NOT_FOUND_IN_MODULE_1 = 213] = "MEMBER_0_NOT_FOUND_IN_MODULE_1", e[e.INVALID_BIZ_CAL_FUNCTION_0 = 214] = "INVALID_BIZ_CAL_FUNCTION_0", e[e.USER_ATTRIBUTE_0_NOT_FOUND = 215] = "USER_ATTRIBUTE_0_NOT_FOUND", e[e.INVALID_USAGE_OF_USER_ATTRIBUTE_0_MUTIPLE_VALUES = 216] = "INVALID_USAGE_OF_USER_ATTRIBUTE_0_MUTIPLE_VALUES", e[e.TABLE_LITERAL_ROWS_MUST_HAVE_SAME_NUMBER_OF_COLUMNS = 217] = "TABLE_LITERAL_ROWS_MUST_HAVE_SAME_NUMBER_OF_COLUMNS", e[e.INVALID_ROW_LEVEL_PERMISSION = 218] = "INVALID_ROW_LEVEL_PERMISSION", e[e.PERMISSION_RULE_VIOLATION_ERROR = 219] = "PERMISSION_RULE_VIOLATION_ERROR", e[e.UNSUPPORTED_BEHAVIOR_0 = 220] = "UNSUPPORTED_BEHAVIOR_0", e[e.POTENTIAL_DB_RUNTIME_ERROR_0 = 221] = "POTENTIAL_DB_RUNTIME_ERROR_0", e[e.AMBIGUOUS_RELATIONSHIP_0 = 222] = "AMBIGUOUS_RELATIONSHIP_0", e[e.QUERY_PARAM_UNSUPPORTED_OPERATOR = 223] = "QUERY_PARAM_UNSUPPORTED_OPERATOR", e[e.QUERY_PARAM_INVALID_PARAM_INPUT = 224] = "QUERY_PARAM_INVALID_PARAM_INPUT", e[e.ROW_MUST_CONTAIN_DIMENSIONS_ONLY_0 = 225] = "ROW_MUST_CONTAIN_DIMENSIONS_ONLY_0", e[e.ROW_COLUMNS_MUST_BE_SUBSET_OF_TABLE_COLUMNS = 226] = "ROW_COLUMNS_MUST_BE_SUBSET_OF_TABLE_COLUMNS", e[e.CANNOT_MATCH_ROW_WITH_LITERAL_TABLE_0 = 227] = "CANNOT_MATCH_ROW_WITH_LITERAL_TABLE_0", e[e.INVALID_FIELD_DECLARATION = 228] = "INVALID_FIELD_DECLARATION", e[e.CANNOT_REDECLARE_FIELD = 229] = "CANNOT_REDECLARE_FIELD", e[e.ADHOC_FIELD_UNSUPPORTED_FIELD_TYPE = 230] = "ADHOC_FIELD_UNSUPPORTED_FIELD_TYPE", e[e.CANNOT_RUN_WINDOW_FUNCTION_IN_THIS_CONTEXT_0 = 231] = "CANNOT_RUN_WINDOW_FUNCTION_IN_THIS_CONTEXT_0", e[e.INVALID_WINDOW_FRAME_0 = 232] = "INVALID_WINDOW_FRAME_0", e[e.CYLIC_FIELD_DEPENDENCY_DETECTED_0 = 233] = "CYLIC_FIELD_DEPENDENCY_DETECTED_0", e[e.INVALID_SHORTHAND_AGGREGATION_0 = 234] = "INVALID_SHORTHAND_AGGREGATION_0", e[e.UNSUPPORTED_DATE_UNIT_0 = 235] = "UNSUPPORTED_DATE_UNIT_0", e[e.INVALID_CONDITIONAL_EXPRESSION_IN_0 = 236] = "INVALID_CONDITIONAL_EXPRESSION_IN_0", e[e.UNKNOWN_FUNCTION_0 = 237] = "UNKNOWN_FUNCTION_0", e[e.CANNOT_MATCH_ROW_WITH_TABLE_0 = 238] = "CANNOT_MATCH_ROW_WITH_TABLE_0", e[e.DUPLICATE_FIELD_NAME_0 = 239] = "DUPLICATE_FIELD_NAME_0", e[e.FUNCTION_0_EXPECT_1_GOT_2 = 240] = "FUNCTION_0_EXPECT_1_GOT_2", e[e.NESTED_WINDOW_FUNCTION = 241] = "NESTED_WINDOW_FUNCTION", e[e.FIELD_0_NOT_FOUND_IN_SELECTED_FIELDS = 242] = "FIELD_0_NOT_FOUND_IN_SELECTED_FIELDS", e[e.REFERENCE_FIELD_0_NOT_GROUP_NOR_AGGREGATED = 243] = "REFERENCE_FIELD_0_NOT_GROUP_NOR_AGGREGATED", e[e.INVALID_TABLE_CONDITION_0 = 244] = "INVALID_TABLE_CONDITION_0", e[e.INVALID_DATETIME_LITERAL_0 = 245] = "INVALID_DATETIME_LITERAL_0", e[e.NO_PRIMARY_KEY_FOUND_FOR_MODEL_0_REASON_1 = 246] = "NO_PRIMARY_KEY_FOUND_FOR_MODEL_0_REASON_1", e[e.RECURSIVE_AQL_FUNCTION_0_CHAIN_1 = 247] = "RECURSIVE_AQL_FUNCTION_0_CHAIN_1", e[e.INVALID_RETURN_TYPE_FOR_FUNCTION_0_EXPECTED_1_GOT_2 = 248] = "INVALID_RETURN_TYPE_FOR_FUNCTION_0_EXPECTED_1_GOT_2", e[e.INVALID_REF_ARGUMENT_FOR_PARAM_0_EXPECTED_1_GOT_2 = 249] = "INVALID_REF_ARGUMENT_FOR_PARAM_0_EXPECTED_1_GOT_2", e[e.AQL_0_1_SHADOWS_BUILTIN = 250] = "AQL_0_1_SHADOWS_BUILTIN", e[e.RELATIONSHIP_FILTER_ON_0_READS_1 = 251] = "RELATIONSHIP_FILTER_ON_0_READS_1", e[e.RELATIONSHIP_MATCH_READS_0 = 252] = "RELATIONSHIP_MATCH_READS_0", e[e.RELATIONSHIP_MATCH_MISSES_0 = 253] = "RELATIONSHIP_MATCH_MISSES_0", e[e.AQL_NAME_0_DECLARED_AS_1_AND_2_IN_3 = 254] = "AQL_NAME_0_DECLARED_AS_1_AND_2_IN_3", e[e.OPERATOR_0_ON_PARAM_1 = 255] = "OPERATOR_0_ON_PARAM_1", e[e.SQL_PASSTHROUGH_FUNCTION_0_NOT_ALLOWED = 256] = "SQL_PASSTHROUGH_FUNCTION_0_NOT_ALLOWED", e[e.SHOULD_FOLLOW_GROUP_WITH_SELECT_OR_FILTER = 300] = "SHOULD_FOLLOW_GROUP_WITH_SELECT_OR_FILTER", e;
103548
+ return e[e.UNEXPECTED_ERROR = 0] = "UNEXPECTED_ERROR", e[e.SYNTAX_ERROR = 1] = "SYNTAX_ERROR", e[e.INVALID_EXPRESSION_0 = 100] = "INVALID_EXPRESSION_0", e[e.RELATIONSHIP_NOT_FOUND_0 = 101] = "RELATIONSHIP_NOT_FOUND_0", e[e.MODEL_0_NOT_FOUND = 102] = "MODEL_0_NOT_FOUND", e[e.FIELD_0_NOT_FOUND_IN_MODEL_1 = 103] = "FIELD_0_NOT_FOUND_IN_MODEL_1", e[e.FANOUT_ON_0_FROM_1 = 104] = "FANOUT_ON_0_FROM_1", e[e.MODEL_IN_AQL_FIELD_NOT_FOUND = 105] = "MODEL_IN_AQL_FIELD_NOT_FOUND", e[e.RELATIONSHIP_PATH_NOT_FOUND_FROM_0_TO_1 = 106] = "RELATIONSHIP_PATH_NOT_FOUND_FROM_0_TO_1", e[e.INVALID_ARITY_EXPECT_0_FOR_FUNCTION_1_GOT_2 = 200] = "INVALID_ARITY_EXPECT_0_FOR_FUNCTION_1_GOT_2", e[e.INVALID_ARGUMENT_TYPE = 201] = "INVALID_ARGUMENT_TYPE", e[e.UNKNOWN_IDENTIFIER_0 = 202] = "UNKNOWN_IDENTIFIER_0", e[e.UNSUPPORTED_OPERATOR_0_FOR_TYPE_1 = 203] = "UNSUPPORTED_OPERATOR_0_FOR_TYPE_1", e[e.EXPECTED_0_FOUND_1 = 204] = "EXPECTED_0_FOUND_1", e[e.NAMED_EXPRESSION_EXPECT_A_FIELD_OR_SCALAR_VALUE_FOUND_0 = 205] = "NAMED_EXPRESSION_EXPECT_A_FIELD_OR_SCALAR_VALUE_FOUND_0", e[e.EXPECTED_SCALAR_LIKE_TYPE_FOUND_0 = 206] = "EXPECTED_SCALAR_LIKE_TYPE_FOUND_0", e[e.NO_MATCHING_SIGNATURE_FOR_FUNCTION_0 = 207] = "NO_MATCHING_SIGNATURE_FOR_FUNCTION_0", e[e.INVALID_MEASURE_DEFINITION_FOR_FIELD_0_IN_MODEL_1 = 208] = "INVALID_MEASURE_DEFINITION_FOR_FIELD_0_IN_MODEL_1", e[e.DIMENSIONALIZE_NOT_ALLOWED_DUE_TO_0 = 209] = "DIMENSIONALIZE_NOT_ALLOWED_DUE_TO_0", e[e.CANNOT_REFERENCE_AQL_FIELD_0_FROM_SQL = 210] = "CANNOT_REFERENCE_AQL_FIELD_0_FROM_SQL", e[e.RIGHT_SIDE_OF_PIPE_MUST_BE_A_FUNCTION = 211] = "RIGHT_SIDE_OF_PIPE_MUST_BE_A_FUNCTION", e[e.INVALID_METRIC_DEFINITION_0_IN_DATASET_1 = 212] = "INVALID_METRIC_DEFINITION_0_IN_DATASET_1", e[e.MEMBER_0_NOT_FOUND_IN_MODULE_1 = 213] = "MEMBER_0_NOT_FOUND_IN_MODULE_1", e[e.INVALID_BIZ_CAL_FUNCTION_0 = 214] = "INVALID_BIZ_CAL_FUNCTION_0", e[e.USER_ATTRIBUTE_0_NOT_FOUND = 215] = "USER_ATTRIBUTE_0_NOT_FOUND", e[e.INVALID_USAGE_OF_USER_ATTRIBUTE_0_MUTIPLE_VALUES = 216] = "INVALID_USAGE_OF_USER_ATTRIBUTE_0_MUTIPLE_VALUES", e[e.TABLE_LITERAL_ROWS_MUST_HAVE_SAME_NUMBER_OF_COLUMNS = 217] = "TABLE_LITERAL_ROWS_MUST_HAVE_SAME_NUMBER_OF_COLUMNS", e[e.INVALID_ROW_LEVEL_PERMISSION = 218] = "INVALID_ROW_LEVEL_PERMISSION", e[e.PERMISSION_RULE_VIOLATION_ERROR = 219] = "PERMISSION_RULE_VIOLATION_ERROR", e[e.UNSUPPORTED_BEHAVIOR_0 = 220] = "UNSUPPORTED_BEHAVIOR_0", e[e.POTENTIAL_DB_RUNTIME_ERROR_0 = 221] = "POTENTIAL_DB_RUNTIME_ERROR_0", e[e.AMBIGUOUS_RELATIONSHIP_0 = 222] = "AMBIGUOUS_RELATIONSHIP_0", e[e.QUERY_PARAM_UNSUPPORTED_OPERATOR = 223] = "QUERY_PARAM_UNSUPPORTED_OPERATOR", e[e.QUERY_PARAM_INVALID_PARAM_INPUT = 224] = "QUERY_PARAM_INVALID_PARAM_INPUT", e[e.ROW_MUST_CONTAIN_DIMENSIONS_ONLY_0 = 225] = "ROW_MUST_CONTAIN_DIMENSIONS_ONLY_0", e[e.ROW_COLUMNS_MUST_BE_SUBSET_OF_TABLE_COLUMNS = 226] = "ROW_COLUMNS_MUST_BE_SUBSET_OF_TABLE_COLUMNS", e[e.CANNOT_MATCH_ROW_WITH_LITERAL_TABLE_0 = 227] = "CANNOT_MATCH_ROW_WITH_LITERAL_TABLE_0", e[e.INVALID_FIELD_DECLARATION = 228] = "INVALID_FIELD_DECLARATION", e[e.CANNOT_REDECLARE_FIELD = 229] = "CANNOT_REDECLARE_FIELD", e[e.ADHOC_FIELD_UNSUPPORTED_FIELD_TYPE = 230] = "ADHOC_FIELD_UNSUPPORTED_FIELD_TYPE", e[e.CANNOT_RUN_WINDOW_FUNCTION_IN_THIS_CONTEXT_0 = 231] = "CANNOT_RUN_WINDOW_FUNCTION_IN_THIS_CONTEXT_0", e[e.INVALID_WINDOW_FRAME_0 = 232] = "INVALID_WINDOW_FRAME_0", e[e.CYLIC_FIELD_DEPENDENCY_DETECTED_0 = 233] = "CYLIC_FIELD_DEPENDENCY_DETECTED_0", e[e.INVALID_SHORTHAND_AGGREGATION_0 = 234] = "INVALID_SHORTHAND_AGGREGATION_0", e[e.UNSUPPORTED_DATE_UNIT_0 = 235] = "UNSUPPORTED_DATE_UNIT_0", e[e.INVALID_CONDITIONAL_EXPRESSION_IN_0 = 236] = "INVALID_CONDITIONAL_EXPRESSION_IN_0", e[e.UNKNOWN_FUNCTION_0 = 237] = "UNKNOWN_FUNCTION_0", e[e.CANNOT_MATCH_ROW_WITH_TABLE_0 = 238] = "CANNOT_MATCH_ROW_WITH_TABLE_0", e[e.DUPLICATE_FIELD_NAME_0 = 239] = "DUPLICATE_FIELD_NAME_0", e[e.FUNCTION_0_EXPECT_1_GOT_2 = 240] = "FUNCTION_0_EXPECT_1_GOT_2", e[e.NESTED_WINDOW_FUNCTION = 241] = "NESTED_WINDOW_FUNCTION", e[e.FIELD_0_NOT_FOUND_IN_SELECTED_FIELDS = 242] = "FIELD_0_NOT_FOUND_IN_SELECTED_FIELDS", e[e.REFERENCE_FIELD_0_NOT_GROUP_NOR_AGGREGATED = 243] = "REFERENCE_FIELD_0_NOT_GROUP_NOR_AGGREGATED", e[e.INVALID_TABLE_CONDITION_0 = 244] = "INVALID_TABLE_CONDITION_0", e[e.INVALID_DATETIME_LITERAL_0 = 245] = "INVALID_DATETIME_LITERAL_0", e[e.NO_PRIMARY_KEY_FOUND_FOR_MODEL_0_REASON_1 = 246] = "NO_PRIMARY_KEY_FOUND_FOR_MODEL_0_REASON_1", e[e.RECURSIVE_AQL_FUNCTION_0_CHAIN_1 = 247] = "RECURSIVE_AQL_FUNCTION_0_CHAIN_1", e[e.INVALID_RETURN_TYPE_FOR_FUNCTION_0_EXPECTED_1_GOT_2 = 248] = "INVALID_RETURN_TYPE_FOR_FUNCTION_0_EXPECTED_1_GOT_2", e[e.INVALID_REF_ARGUMENT_FOR_PARAM_0_EXPECTED_1_GOT_2 = 249] = "INVALID_REF_ARGUMENT_FOR_PARAM_0_EXPECTED_1_GOT_2", e[e.AQL_0_1_SHADOWS_BUILTIN = 250] = "AQL_0_1_SHADOWS_BUILTIN", e[e.RELATIONSHIP_FILTER_ON_0_READS_1 = 251] = "RELATIONSHIP_FILTER_ON_0_READS_1", e[e.RELATIONSHIP_MATCH_READS_0 = 252] = "RELATIONSHIP_MATCH_READS_0", e[e.RELATIONSHIP_MATCH_MISSES_0 = 253] = "RELATIONSHIP_MATCH_MISSES_0", e[e.AQL_NAME_0_DECLARED_AS_1_AND_2_IN_3 = 254] = "AQL_NAME_0_DECLARED_AS_1_AND_2_IN_3", e[e.OPERATOR_0_ON_PARAM_1 = 255] = "OPERATOR_0_ON_PARAM_1", e[e.SQL_PASSTHROUGH_FUNCTION_0_NOT_ALLOWED = 256] = "SQL_PASSTHROUGH_FUNCTION_0_NOT_ALLOWED", e[e.INVALID_EXPLORE_DIMENSION = 257] = "INVALID_EXPLORE_DIMENSION", e[e.SHOULD_FOLLOW_GROUP_WITH_SELECT_OR_FILTER = 300] = "SHOULD_FOLLOW_GROUP_WITH_SELECT_OR_FILTER", e;
103544
103549
  }({});
103545
103550
  var isFieldTrace = (e) => e.type !== "udf";
103546
103551
  var isUdfTrace = (e) => e.type === "udf";
@@ -103765,6 +103770,9 @@ function isUserAttributeReference(e) {
103765
103770
  function isCalendarModelReference(e) {
103766
103771
  return isIdentifier(e) && e.value === "H.calendar" ? true : isDotExpression(e) && isIdentifier(e.left) && isIdentifier(e.right) && e.left.value === "H" && e.right.value === "calendar";
103767
103772
  }
103773
+ function isGroupingSet(e) {
103774
+ return e.kind === Kind.GROUPING_SET;
103775
+ }
103768
103776
  function isRow(e) {
103769
103777
  return e.kind === Kind.ROW;
103770
103778
  }
@@ -106389,6 +106397,7 @@ Complex conditions:
106389
106397
  [ErrorCode.AQL_NAME_0_DECLARED_AS_1_AND_2_IN_3]: "`{0}` is declared as both a {1} and a {2} in {3}.",
106390
106398
  [ErrorCode.RELATIONSHIP_FILTER_ON_0_READS_1]: "A relationship filter declared on `{0}` must read columns of that model only, but it reads `{1}`.",
106391
106399
  [ErrorCode.RELATIONSHIP_MATCH_READS_0]: "A relationship `match` must read the two models it relates, but it reads `{0}`.",
106400
+ [ErrorCode.INVALID_EXPLORE_DIMENSION]: "Invalid explore dimension. `dimensions` only accepts a dimension reference, or a date truncation of one. E.g. `orders.created_at`, `orders.created_at | month()`, `month(orders.created_at)`, `date_trunc(orders.created_at, 'month')`. To group by another expression, declare it outside the explore with `dimension orders.name = <expression>`, then reference it.",
106392
106401
  [ErrorCode.RELATIONSHIP_MATCH_MISSES_0]: "A relationship `match` must read columns of both models, but it never reads `{0}`."
106393
106402
  };
106394
106403
  function createError(e, t, n, r, i, a, s) {
@@ -107626,6 +107635,37 @@ function getFuncSignature(e) {
107626
107635
  args: n
107627
107636
  };
107628
107637
  }
107638
+ function isDimensionRef(e) {
107639
+ return isIdentifier(e) || isDotExpression(e);
107640
+ }
107641
+ function isExploreDimensionForm(e) {
107642
+ let t = isNamedExpression(e) ? e.expr : e;
107643
+ if (isDimensionRef(t))
107644
+ return true;
107645
+ if (!isFunctionCallLikeExpression(t) || isPipeExpression(t) && !isFunctionCall(t.right))
107646
+ return false;
107647
+ let { funcName: n, args: r } = getFuncSignature(t);
107648
+ return n === "date_trunc" ? r.length === 2 && isDimensionRef(r[0]) && isTextLiteral(r[1]) && isDateUnit(r[1].value) : isDateUnit(n) && r.length === 1 && isDimensionRef(r[0]);
107649
+ }
107650
+ function checkGroupMember(e, t) {
107651
+ !isBizCal(e) && !isExploreDimensionForm(e) && t(e);
107652
+ }
107653
+ function checkExploreDimension(e, t) {
107654
+ if (isFunctionCall(e)) {
107655
+ let n = functionCallName(e);
107656
+ if (n === "rollup") {
107657
+ for (let n of e.args)
107658
+ isGroupingSet(n) ? n.groupingSet.forEach((e) => checkGroupMember(e, t)) : checkGroupMember(n, t);
107659
+ return;
107660
+ }
107661
+ if (n === "grouping_sets") {
107662
+ for (let n of e.args)
107663
+ isGroupingSet(n) ? n.groupingSet.forEach((e) => checkGroupMember(e, t)) : t(n);
107664
+ return;
107665
+ }
107666
+ }
107667
+ checkGroupMember(e, t);
107668
+ }
107629
107669
  function validateAndGetGroupedField(e, t) {
107630
107670
  let n = e.currentIteration();
107631
107671
  if (!n)
@@ -109928,30 +109968,13 @@ var $param_input = (0, import_parsimmon_umd_min.lazy)(() => (0, import_parsimmon
109928
109968
  return createParamInput(n, r, i, a, t);
109929
109969
  }));
109930
109970
  var $named_expr = (0, import_parsimmon_umd_min.lazy)(() => (0, import_parsimmon_umd_min.seqObj)(["name", $identifier()], (0, import_parsimmon_umd_min.string)(":"), $_2, ["expr", $expression()]).thru(addSourceLocation).map(({ value: e, loc: t }) => createNamedExpression(e.name, e.expr, t)));
109931
- var $date_unit = (0, import_parsimmon_umd_min.alt)(...[...dateUnits, ...dateUnits.map(import_lodash2.upperCase)].map(import_parsimmon_umd_min.string));
109932
- var $date_unit_str = (0, import_parsimmon_umd_min.alt)((0, import_parsimmon_umd_min.seq)((0, import_parsimmon_umd_min.string)("'"), $date_unit, (0, import_parsimmon_umd_min.string)("'")).map((e) => e[1]), (0, import_parsimmon_umd_min.seq)((0, import_parsimmon_umd_min.string)('"'), $date_unit, (0, import_parsimmon_umd_min.string)('"')).map((e) => e[1])).thru(addSourceLocation).map(({ value: e, loc: t }) => createTextLiteral(e, t));
109933
- var $date_unit_identifier = $identifier($date_unit);
109934
- var $date_trunc = (0, import_parsimmon_umd_min.lazy)(() => (0, import_parsimmon_umd_min.seqObj)(["name", $identifier((0, import_parsimmon_umd_min.alt)((0, import_parsimmon_umd_min.string)("DATE_TRUNC"), (0, import_parsimmon_umd_min.string)("date_trunc")))], $lparen, ["args", (0, import_parsimmon_umd_min.seq)($dot_expression(), $_2, (0, import_parsimmon_umd_min.string)(","), $_2, $date_unit_str, (0, import_parsimmon_umd_min.string)(",").atMost(1)).map((e) => [e[0], e[4]])], $rparen).thru(addSourceLocation).map(({ value: e, loc: t }) => {
109935
- let { name: n, args: r } = e;
109936
- return createFunctionCallExpression(n, r, t);
109937
- }));
109938
- var $date_trunc_pipe = (0, import_parsimmon_umd_min.lazy)(() => (0, import_parsimmon_umd_min.seqObj)(["left", $dot_expression()], $_2, (0, import_parsimmon_umd_min.string)(Kind.BAR), $_2, ["right", (0, import_parsimmon_umd_min.seqObj)(["name", $identifier((0, import_parsimmon_umd_min.alt)((0, import_parsimmon_umd_min.string)("DATE_TRUNC"), (0, import_parsimmon_umd_min.string)("date_trunc")))], $lparen, ["args", (0, import_parsimmon_umd_min.seq)($date_unit_str, (0, import_parsimmon_umd_min.string)(",").atMost(1)).map((e) => [e[0]])], $rparen).thru(addSourceLocation).map(({ value: e, loc: t }) => {
109939
- let { name: n, args: r } = e;
109940
- return createFunctionCallExpression(n, r, t);
109941
- })]).thru(addSourceLocation).map(({ value: { left: e, right: t }, loc: n }) => createPipeExpression(e, t, n)));
109942
- var $short_hand_date_trunc = (0, import_parsimmon_umd_min.lazy)(() => (0, import_parsimmon_umd_min.seqObj)(["name", $date_unit_identifier], $lparen, ["args", (0, import_parsimmon_umd_min.seq)($dot_expression(), (0, import_parsimmon_umd_min.string)(",").atMost(1)).map((e) => [e[0]])], $rparen).thru(addSourceLocation).map(({ value: e, loc: t }) => {
109943
- let { name: n, args: r } = e;
109944
- return createFunctionCallExpression(n, r, t);
109945
- }));
109946
- var $short_hand_date_trunc_pipe = (0, import_parsimmon_umd_min.lazy)(() => (0, import_parsimmon_umd_min.seqObj)(["left", $dot_expression()], $_2, (0, import_parsimmon_umd_min.string)(Kind.BAR), $_2, ["right", (0, import_parsimmon_umd_min.seqObj)(["name", $date_unit_identifier], $lparen, $rparen).thru(addSourceLocation).map(({ value: { name: e }, loc: t }) => createFunctionCallExpression(e, [], t))])).thru(addSourceLocation).map(({ value: { left: e, right: t }, loc: n }) => createPipeExpression(e, t, n));
109947
- var $dimension_ref = (0, import_parsimmon_umd_min.alt)($date_trunc_pipe, $date_trunc, $short_hand_date_trunc_pipe, $short_hand_date_trunc, $dot_expression());
109948
- var $named_dimension_ref = (0, import_parsimmon_umd_min.seqObj)(["name", $identifier()], (0, import_parsimmon_umd_min.string)(":"), $_2, ["expr", $dimension_ref]).thru(addSourceLocation).map(({ value: e, loc: t }) => createNamedExpression(e.name, e.expr, t));
109949
109971
  var $biz_cal = (0, import_parsimmon_umd_min.lazy)(() => (0, import_parsimmon_umd_min.seqObj)(["name", (0, import_parsimmon_umd_min.seq)((0, import_parsimmon_umd_min.string)("["), $identifier(), (0, import_parsimmon_umd_min.string)("]")).map((e) => e[1])], (0, import_parsimmon_umd_min.string)(":"), $_2, ["expr", $expression()]).thru(addSourceLocation).map(({ value: e, loc: t }) => createBizCal(e.name, e.expr, t)));
109950
- var $dimensions_group = (0, import_parsimmon_umd_min.seqObj)((0, import_parsimmon_umd_min.string)("("), $_2, ["groupingSet", $sepByTrailingComma((0, import_parsimmon_umd_min.alt)($named_dimension_ref, $dimension_ref, $biz_cal))], $_2, (0, import_parsimmon_umd_min.string)(")")).thru(addSourceLocation).map(({ value: { groupingSet: e }, loc: t }) => createGroupingSet(e, t));
109951
- var $dimension_declaration = (0, import_parsimmon_umd_min.alt)($dimensions_group, (0, import_parsimmon_umd_min.alt)($named_dimension_ref, $dimension_ref, $biz_cal));
109952
- var $rollup = (0, import_parsimmon_umd_min.seqObj)(["name", $identifier((0, import_parsimmon_umd_min.string)("rollup"))], $lparen, ["args", $sepByTrailingComma($dimension_declaration)], $rparen).thru(addSourceLocation).map(({ value: { name: e, args: t }, loc: n }) => createFunctionCallExpression(e, t, n));
109953
- var $grouping_sets = (0, import_parsimmon_umd_min.seqObj)(["name", $identifier((0, import_parsimmon_umd_min.string)("grouping_sets"))], $lparen, ["args", $sepByTrailingComma($dimensions_group)], $rparen).thru(addSourceLocation).map(({ value: { name: e, args: t }, loc: n }) => createFunctionCallExpression(e, t, n));
109954
- var $dynamic_explore_dimension = (0, import_parsimmon_umd_min.alt)($rollup, $grouping_sets, $named_dimension_ref, $dimension_ref, $biz_cal);
109972
+ var $dimension_entry = (0, import_parsimmon_umd_min.lazy)(() => (0, import_parsimmon_umd_min.alt)($biz_cal, $expression()));
109973
+ var $dimensions_group = (0, import_parsimmon_umd_min.seqObj)((0, import_parsimmon_umd_min.string)("("), $_2, ["groupingSet", $sepByTrailingComma($dimension_entry)], $_2, (0, import_parsimmon_umd_min.string)(")")).thru(addSourceLocation).map(({ value: { groupingSet: e }, loc: t }) => createGroupingSet(e, t));
109974
+ var $dimension_declaration = (0, import_parsimmon_umd_min.alt)($dimensions_group, $dimension_entry);
109975
+ var $rollup = (0, import_parsimmon_umd_min.seqObj)(["name", $identifier((0, import_parsimmon_umd_min.string)("rollup"))], $_2, $lparen, ["args", $sepByTrailingComma($dimension_declaration)], $rparen).thru(addSourceLocation).map(({ value: { name: e, args: t }, loc: n }) => createFunctionCallExpression(e, t, n));
109976
+ var $grouping_sets = (0, import_parsimmon_umd_min.seqObj)(["name", $identifier((0, import_parsimmon_umd_min.string)("grouping_sets"))], $_2, $lparen, ["args", $sepByTrailingComma($dimensions_group)], $rparen).thru(addSourceLocation).map(({ value: { name: e, args: t }, loc: n }) => createFunctionCallExpression(e, t, n));
109977
+ var $dynamic_explore_dimension = (0, import_parsimmon_umd_min.alt)($rollup, $grouping_sets, $dimension_entry);
109955
109978
  var $dimensions_section = (0, import_parsimmon_umd_min.lazy)(() => (0, import_parsimmon_umd_min.seq)($identifier((0, import_parsimmon_umd_min.string)("dimensions")).trim($_2), $blkopen, $sepByTrailingComma($dynamic_explore_dimension), $_2, $blkclose).map((e) => [e[0], e[2]]));
109956
109979
  var $rows_section = (0, import_parsimmon_umd_min.lazy)(() => (0, import_parsimmon_umd_min.seq)($identifier((0, import_parsimmon_umd_min.string)("rows")), $_2, $blkopen, $sepByTrailingComma($dynamic_explore_dimension), $_2, $blkclose).map((e) => [e[0], e[3]]));
109957
109980
  var $columns_section = (0, import_parsimmon_umd_min.lazy)(() => (0, import_parsimmon_umd_min.seq)($identifier((0, import_parsimmon_umd_min.string)("columns")), $_2, $blkopen, $sepByTrailingComma($dynamic_explore_dimension), $_2, $blkclose).map((e) => [e[0], e[3]]));
@@ -116666,7 +116689,11 @@ function checkQueryLevelExpression(e, t, n) {
116666
116689
  groups: []
116667
116690
  };
116668
116691
  e.scope.newScope(l);
116669
- let u = import_lodash2.isArray(t.dimensions) ? t.dimensions : [...t.dimensions.rows, ...t.dimensions.columns];
116692
+ let u = import_lodash2.isArray(t.dimensions) ? t.dimensions : [...t.dimensions.rows, ...t.dimensions.columns], f = false, p = (t) => {
116693
+ f = true, e.addError(t, ErrorCode.INVALID_EXPLORE_DIMENSION);
116694
+ };
116695
+ if (u.forEach((e) => checkExploreDimension(e, p)), f)
116696
+ return;
116670
116697
  for (let t of u) {
116671
116698
  e.checkExpression(t, n | CheckFlags.SkipPathResolution);
116672
116699
  let c = e.getTypeFromNode(t);
@@ -116695,19 +116722,19 @@ function checkQueryLevelExpression(e, t, n) {
116695
116722
  r.push(n);
116696
116723
  }
116697
116724
  }
116698
- let f = collectNamedFieldsFromDynamicExplore(t), p = {
116725
+ let m = collectNamedFieldsFromDynamicExplore(t), S = {
116699
116726
  resultFieldFilters: [],
116700
116727
  bizCalFilters: [],
116701
116728
  others: [],
116702
- ...import_lodash2.groupBy(t.filters, (e) => isBizCalFilter(e) ? "bizCalFilters" : isInfixExpression(e) && isIdentifier(e.left) && f.has(e.left.value) ? "resultFieldFilters" : "others")
116729
+ ...import_lodash2.groupBy(t.filters, (e) => isBizCalFilter(e) ? "bizCalFilters" : isInfixExpression(e) && isIdentifier(e.left) && m.has(e.left.value) ? "resultFieldFilters" : "others")
116703
116730
  };
116704
116731
  t.relationships.forEach((t) => checkRelationship(e, t, n | CheckFlags.SkipPathResolution));
116705
- let m = t.relationships.map((t) => e.getTypeFromNode(t)).filter((e) => e.typeClass === TypeClass.RELATIONSHIP);
116706
- e.graphContext.newGraph(m.map(relTypeToRel), true), p.others.forEach((t) => e.checkExpression(t, n | CheckFlags.SkipPathResolution)), p.others.forEach((t) => {
116732
+ let w = t.relationships.map((t) => e.getTypeFromNode(t)).filter((e) => e.typeClass === TypeClass.RELATIONSHIP);
116733
+ e.graphContext.newGraph(w.map(relTypeToRel), true), S.others.forEach((t) => e.checkExpression(t, n | CheckFlags.SkipPathResolution)), S.others.forEach((t) => {
116707
116734
  let n = e.getTypeFromNode(t);
116708
116735
  isErrType(n) || validateFilterCondition(e, t, n);
116709
116736
  }), l.groups = i.map((e) => e.origin);
116710
- let S = [], w = t.measures.map((t, r) => {
116737
+ let E = [], k = t.measures.map((t, r) => {
116711
116738
  let i = () => {
116712
116739
  e.checkExpression(t, n);
116713
116740
  let r = e.getTypeFromNode(t);
@@ -116721,7 +116748,7 @@ function checkQueryLevelExpression(e, t, n) {
116721
116748
  };
116722
116749
  if (c) {
116723
116750
  let [t, n] = e.errorTryCatch(i);
116724
- return import_lodash2.isEmpty(n) || (S[r] = n), t;
116751
+ return import_lodash2.isEmpty(n) || (E[r] = n), t;
116725
116752
  }
116726
116753
  return i();
116727
116754
  });
@@ -116735,7 +116762,7 @@ function checkQueryLevelExpression(e, t, n) {
116735
116762
  }
116736
116763
  let i = convertToMeasureCondition(e, t, l.groups ?? []), a = e.measure_conditions.getTableCondition(i, []);
116737
116764
  e.checkExpression(a, n | CheckFlags.RecheckCheckedNode), e.measure_conditions.setMeasureCondition(t, i);
116738
- }), p.bizCalFilters.forEach((t) => e.checkExpression(t, n)), p.resultFieldFilters.forEach((t) => e.checkExpression(t, n)), t.params.forEach((t) => e.checkExpression(t, n | CheckFlags.SkipPathResolution)), t.sorts.forEach((t) => {
116765
+ }), S.bizCalFilters.forEach((t) => e.checkExpression(t, n)), S.resultFieldFilters.forEach((t) => e.checkExpression(t, n)), t.params.forEach((t) => e.checkExpression(t, n | CheckFlags.SkipPathResolution)), t.sorts.forEach((t) => {
116739
116766
  if (c) {
116740
116767
  let [r, i] = e.errorTryCatch(() => e.checkExpression(t[0], n));
116741
116768
  i && e.setNodeType(t[0], createFieldType$1(t[0].value, unknownType$1));
@@ -116743,16 +116770,16 @@ function checkQueryLevelExpression(e, t, n) {
116743
116770
  e.checkExpression(t[0], n);
116744
116771
  let r = e.getTypeFromNode(t[0]);
116745
116772
  isErrType(r) || isAssignable$1(e, r, fieldTypeClass$1) || e.addError(t[0], ErrorCode.EXPECTED_0_FOUND_1, fieldTypeClass$1, r);
116746
- }), e.scope.popScope(), e.graphContext.dropGraph(), import_lodash2.isEmpty(i) && import_lodash2.isEmpty(w)) {
116773
+ }), e.scope.popScope(), e.graphContext.dropGraph(), import_lodash2.isEmpty(i) && import_lodash2.isEmpty(k)) {
116747
116774
  e.addError(t, ErrorCode.INVALID_EXPRESSION_0, "Explore must have at least one dimension or measure.");
116748
116775
  return;
116749
116776
  }
116750
- let E = createTableType$1(createRowType$1([
116777
+ let N = createTableType$1(createRowType$1([
116751
116778
  ...i,
116752
- ...w,
116779
+ ...k,
116753
116780
  ...s
116754
116781
  ]), undefined);
116755
- E.errorsInMeasures = S, e.setNodeType(t, E);
116782
+ N.errorsInMeasures = E, e.setNodeType(t, N);
116756
116783
  }
116757
116784
  function l(t, n) {
116758
116785
  if (e.setNodeType(t, nullType$1), !isDotExpression(t.name)) {
@@ -129872,30 +129899,35 @@ function classifyDimensions(e, t, n) {
129872
129899
  E(e, t), N(e);
129873
129900
  };
129874
129901
  for (let { node: t, section: r } of i) {
129875
- let i = (e.exploreBizCals ??= []).length, a = asDimensionDecl(e, t, n), s = e.exploreBizCals.slice(i), l = new Set(s.flatMap((e) => bizCalDimRefs(e.expr).map((e) => e.ty.fieldName)));
129902
+ let i = false;
129903
+ if (checkExploreDimension(t, (t) => {
129904
+ i = true, e.dataset.diagnostics.push(createError(ErrorCode.INVALID_EXPLORE_DIMENSION, t.loc));
129905
+ }), i)
129906
+ continue;
129907
+ let a = (e.exploreBizCals ??= []).length, s = asDimensionDecl(e, t, n), l = e.exploreBizCals.slice(a), u = new Set(l.flatMap((e) => bizCalDimRefs(e.expr).map((e) => e.ty.fieldName)));
129876
129908
  if (t.kind === Kind.FUNCTION_CALL && functionCallName(t) === "rollup")
129877
- for (let e of s)
129909
+ for (let e of l)
129878
129910
  e.rollup = true;
129879
- S.push(a);
129880
- let u = r === "column" ? p : f;
129881
- for (let e of axisFieldDims(a))
129882
- u.push(e);
129883
- let { ty: w } = a;
129884
- if (a.kind === Kind.GROUPING_SET)
129885
- for (let e of a.groupingSet)
129911
+ S.push(s);
129912
+ let w = r === "column" ? p : f;
129913
+ for (let e of axisFieldDims(s))
129914
+ w.push(e);
129915
+ let { ty: k } = s;
129916
+ if (s.kind === Kind.GROUPING_SET)
129917
+ for (let e of s.groupingSet)
129886
129918
  e.kind === Kind.IDENTIFIER && isFieldType(e.ty) && (E(e.ty, r), m.push(e));
129887
- else if (isConstantArrayType(w)) {
129888
- for (let e of w.elementTypes)
129919
+ else if (isConstantArrayType(k)) {
129920
+ for (let e of k.elementTypes)
129889
129921
  if (isGroupingSetType(e)) {
129890
129922
  for (let t of e.groupingSet)
129891
- isFieldType(t) && (E(t, r), l.has(t.fieldName) || N(t));
129923
+ isFieldType(t) && (E(t, r), u.has(t.fieldName) || N(t));
129892
129924
  if (e.addRollupMarker)
129893
129925
  for (let t of e.groupingSet)
129894
129926
  isFieldType(t) && c.add(t.fieldName);
129895
129927
  }
129896
129928
  } else
129897
- isFieldType(w) && (w.subClass === "dimension" || w.subClass === "biz_cal") ? (I(w, r), m.push(a)) : isErrType(w) || e.dataset.diagnostics.push(createError(ErrorCode.EXPECTED_0_FOUND_1, t.loc, undefined, createFieldParameterType(scalarTypeClass), w));
129898
- for (let e of s)
129929
+ isFieldType(k) && (k.subClass === "dimension" || k.subClass === "biz_cal") ? (I(k, r), m.push(s)) : isErrType(k) || e.dataset.diagnostics.push(createError(ErrorCode.EXPECTED_0_FOUND_1, t.loc, undefined, createFieldParameterType(scalarTypeClass), k));
129930
+ for (let e of l)
129899
129931
  N(e.ty);
129900
129932
  }
129901
129933
  return {
@@ -147728,17 +147760,17 @@ function A(e, t) {
147728
147760
  operands: t
147729
147761
  };
147730
147762
  }
147731
- function ne2(e) {
147763
+ function ne3(e) {
147732
147764
  return typeof e == "string" ? `s:${e}` : `o:${JSON.stringify(e)}`;
147733
147765
  }
147734
147766
  function be3(e, t, n, r) {
147735
- let i = new Set(e.select.filter(n).map((e) => ne2(e.sql)));
147767
+ let i = new Set(e.select.filter(n).map((e) => ne3(e.sql)));
147736
147768
  if (i.size === 0)
147737
147769
  return e;
147738
- let a = e.select.map((e) => i.has(ne2(e.sql)) ? r(e) : e), s = (e.orderBy ?? []).map((e) => i.has(ne2(e.column.sql)) ? {
147770
+ let a = e.select.map((e) => i.has(ne3(e.sql)) ? r(e) : e), s = (e.orderBy ?? []).map((e) => i.has(ne3(e.column.sql)) ? {
147739
147771
  ...e,
147740
147772
  column: r(e.column)
147741
- } : e), c = e.groupBy?.map((e) => i.has(ne2(e.sql)) ? r(e) : e), l = e.union ? {
147773
+ } : e), c = e.groupBy?.map((e) => i.has(ne3(e.sql)) ? r(e) : e), l = e.union ? {
147742
147774
  ...e.union,
147743
147775
  sqlStructures: e.union.sqlStructures.map((e) => be3(e, t, n, r))
147744
147776
  } : e.union;
@@ -148439,7 +148471,7 @@ function ye3(e) {
148439
148471
  union: n
148440
148472
  });
148441
148473
  }
148442
- function ln4(e) {
148474
+ function ln3(e) {
148443
148475
  return (t, n) => e === "redshift" && !n.emulateFullJoinRedshift ? t : ye3(t);
148444
148476
  }
148445
148477
  function un3(e) {
@@ -148451,8 +148483,8 @@ var Br3 = /* @__PURE__ */ new Set([
148451
148483
  o.LTE,
148452
148484
  o.GTE
148453
148485
  ]);
148454
- function cn3(e) {
148455
- return Br3.has(e.operator) ? true : e.operands.some((e) => typeof e != "string" && cn3(e));
148486
+ function cn4(e) {
148487
+ return Br3.has(e.operator) ? true : e.operands.some((e) => typeof e != "string" && cn4(e));
148456
148488
  }
148457
148489
  var et3 = /(?=.*\$\{SOURCE\.([^}]+)\})(?=.*\$\{DEST\.([^}]+)\})/s;
148458
148490
  var Gr4 = /[<>]/;
@@ -148464,7 +148496,7 @@ function Vr4(e) {
148464
148496
  if (typeof t == "string")
148465
148497
  return et3.test(t) && Gr4.test(t);
148466
148498
  let n = un3(t);
148467
- return et3.test(n) && cn3(t);
148499
+ return et3.test(n) && cn4(t);
148468
148500
  });
148469
148501
  }
148470
148502
  function Tn4(e, t, n, r) {
@@ -148694,7 +148726,7 @@ var rt3 = {
148694
148726
  transformers: Zr4
148695
148727
  };
148696
148728
  var Kr4 = "wallclock";
148697
- function re3(e) {
148729
+ function re2(e) {
148698
148730
  return e.length > 0 && e !== Kr4;
148699
148731
  }
148700
148732
  function g3(e) {
@@ -148718,7 +148750,7 @@ var xr4 = /* @__PURE__ */ new Map([
148718
148750
  }],
148719
148751
  [o.DATETIME_TRUNC_TIMEZONE, ([e, t, n, r, i], a) => {
148720
148752
  let s = i ?? "default";
148721
- return re3(n) ? a.opSql(o.DATETIME_TRUNC, [
148753
+ return re2(n) ? a.opSql(o.DATETIME_TRUNC, [
148722
148754
  e,
148723
148755
  t,
148724
148756
  s,
@@ -148752,9 +148784,9 @@ var xr4 = /* @__PURE__ */ new Map([
148752
148784
  [o.NORMALIZE_DATETIME_VALUE, ([e]) => `TIMESTAMP('${e}')`],
148753
148785
  [o.CAST_DATETIME_TO_STRING, ([e, t], n) => {
148754
148786
  let r = "%Y-%m-%d %R:%E*S", i = n.opSql(o.CAST, [e, "datetime"]);
148755
- return re3(t) ? `FORMAT_TIMESTAMP('${r}', (${i}), '${t}')` : `FORMAT_TIMESTAMP('${r}', (${i}))`;
148787
+ return re2(t) ? `FORMAT_TIMESTAMP('${r}', (${i}), '${t}')` : `FORMAT_TIMESTAMP('${r}', (${i}))`;
148756
148788
  }],
148757
- [o.CAST_DATETIME_TO_DATE, ([e, t]) => re3(t) ? `DATE(${e}, '${t}')` : `DATE(${e})`],
148789
+ [o.CAST_DATETIME_TO_DATE, ([e, t]) => re2(t) ? `DATE(${e}, '${t}')` : `DATE(${e})`],
148758
148790
  [o.ADD_TIME_ZONE, ([e, t], n) => `TIMESTAMP(${n.opSql(o.CAST_DB_TYPE, [e, "DATETIME"])}, '${t}')`],
148759
148791
  [o.IMPLICIT_CAST_DB_TYPE, ([e, t], n) => n.opSql(o.CAST_DB_TYPE, [e, t])],
148760
148792
  [o.TO_WALLCLOCK, ([e, t, n, r], i) => `DATETIME(${r ? e : i.opSql(o.CAST, [e, "datetime"])}, '${t}')`],
@@ -148784,7 +148816,7 @@ var xr4 = /* @__PURE__ */ new Map([
148784
148816
  }],
148785
148817
  [o.DATETIME_FORMAT, ([e, t, n], r) => {
148786
148818
  let i = t.replace(/%q/g, "%Q"), a = r.opSql(o.NORMALIZE_TEXT_VALUE, [i]), s = r.opSql(o.CAST, [e, "datetime"]);
148787
- return re3(n) ? `FORMAT_TIMESTAMP(${a}, ${s}, '${n}')` : `FORMAT_TIMESTAMP(${a}, ${s})`;
148819
+ return re2(n) ? `FORMAT_TIMESTAMP(${a}, ${s}, '${n}')` : `FORMAT_TIMESTAMP(${a}, ${s})`;
148788
148820
  }],
148789
148821
  [o.DATE_FORMAT, ([e, t], n) => {
148790
148822
  let r = t.replace(/%q/g, "%Q");
@@ -149823,7 +149855,7 @@ function yo3(e) {
149823
149855
  throw new d3(`MySQL SQL generator does not support data type: ${e}`);
149824
149856
  }
149825
149857
  }
149826
- var wo3 = ln4("mysql");
149858
+ var wo3 = ln3("mysql");
149827
149859
  function Uo3(e, t) {
149828
149860
  return [
149829
149861
  q3,
@@ -150114,7 +150146,7 @@ function zo2(e) {
150114
150146
  throw new d3(`Redshift SQL generator does not support data type: ${e}`);
150115
150147
  }
150116
150148
  }
150117
- var Qo3 = ln4("redshift");
150149
+ var Qo3 = ln3("redshift");
150118
150150
  function jo2(e, t) {
150119
150151
  return [
150120
150152
  Qo3,
@@ -156398,14 +156430,14 @@ function Me3(e, t) {
156398
156430
  function A3(e, t) {
156399
156431
  return { operator: e, operands: t };
156400
156432
  }
156401
- function ne3(e) {
156433
+ function ne4(e) {
156402
156434
  return typeof e == "string" ? `s:${e}` : `o:${JSON.stringify(e)}`;
156403
156435
  }
156404
156436
  function be4(e, t, n, r) {
156405
- const s = new Set(e.select.filter(n).map((c) => ne3(c.sql)));
156437
+ const s = new Set(e.select.filter(n).map((c) => ne4(c.sql)));
156406
156438
  if (s.size === 0)
156407
156439
  return e;
156408
- const a = e.select.map((c) => s.has(ne3(c.sql)) ? r(c) : c), i = (e.orderBy ?? []).map((c) => s.has(ne3(c.column.sql)) ? { ...c, column: r(c.column) } : c), l = e.groupBy?.map((c) => s.has(ne3(c.sql)) ? r(c) : c), u = e.union ? {
156440
+ const a = e.select.map((c) => s.has(ne4(c.sql)) ? r(c) : c), i = (e.orderBy ?? []).map((c) => s.has(ne4(c.column.sql)) ? { ...c, column: r(c.column) } : c), l = e.groupBy?.map((c) => s.has(ne4(c.sql)) ? r(c) : c), u = e.union ? {
156409
156441
  ...e.union,
156410
156442
  sqlStructures: e.union.sqlStructures.map((c) => be4(c, t, n, r))
156411
156443
  } : e.union;
@@ -157052,7 +157084,7 @@ function ye4(e) {
157052
157084
  const t = (e.cte ?? []).map((r) => typeof r.subquery == "string" ? r : { ...r, subquery: ye4(r.subquery) }), n = e.union ? { ...e.union, sqlStructures: e.union.sqlStructures.map(ye4) } : e.union;
157053
157085
  return an4({ ...e, cte: t, union: n });
157054
157086
  }
157055
- function ln5(e) {
157087
+ function ln4(e) {
157056
157088
  return (t, n) => e === "redshift" && !n.emulateFullJoinRedshift ? t : ye4(t);
157057
157089
  }
157058
157090
  function un4(e) {
@@ -157064,8 +157096,8 @@ var Br4 = /* @__PURE__ */ new Set([
157064
157096
  o3.LTE,
157065
157097
  o3.GTE
157066
157098
  ]);
157067
- function cn4(e) {
157068
- return Br4.has(e.operator) ? true : e.operands.some((t) => typeof t != "string" && cn4(t));
157099
+ function cn5(e) {
157100
+ return Br4.has(e.operator) ? true : e.operands.some((t) => typeof t != "string" && cn5(t));
157069
157101
  }
157070
157102
  var et4 = /(?=.*\$\{SOURCE\.([^}]+)\})(?=.*\$\{DEST\.([^}]+)\})/s;
157071
157103
  var Gr5 = /[<>]/;
@@ -157077,7 +157109,7 @@ function Vr5(e) {
157077
157109
  if (typeof n == "string")
157078
157110
  return et4.test(n) && Gr5.test(n);
157079
157111
  const r = un4(n);
157080
- return et4.test(r) && cn4(n);
157112
+ return et4.test(r) && cn5(n);
157081
157113
  });
157082
157114
  }
157083
157115
  function Tn5(e, t, n, r) {
@@ -157283,7 +157315,7 @@ var rt4 = {
157283
157315
  transformers: Zr5
157284
157316
  };
157285
157317
  var Kr5 = "wallclock";
157286
- function re4(e) {
157318
+ function re3(e) {
157287
157319
  return e.length > 0 && e !== Kr5;
157288
157320
  }
157289
157321
  function g4(e) {
@@ -157314,7 +157346,7 @@ var xr5 = /* @__PURE__ */ new Map([
157314
157346
  }],
157315
157347
  [o3.DATETIME_TRUNC_TIMEZONE, ([e, t, n, r, s], a) => {
157316
157348
  const i = s ?? "default";
157317
- return re4(n) ? a.opSql(o3.DATETIME_TRUNC, [e, t, i, n]) : a.opSql(o3.DATETIME_TRUNC, [e, t, i]);
157349
+ return re3(n) ? a.opSql(o3.DATETIME_TRUNC, [e, t, i, n]) : a.opSql(o3.DATETIME_TRUNC, [e, t, i]);
157318
157350
  }],
157319
157351
  [o3.DATE_ADD, ([e, t, n], r) => {
157320
157352
  const s = r.opSql(o3.INTERVAL, [t, n]);
@@ -157335,11 +157367,11 @@ var xr5 = /* @__PURE__ */ new Map([
157335
157367
  [o3.NORMALIZE_DATETIME_VALUE, ([e]) => `TIMESTAMP('${e}')`],
157336
157368
  [o3.CAST_DATETIME_TO_STRING, ([e, t], n) => {
157337
157369
  const r = "%Y-%m-%d %R:%E*S", s = n.opSql(o3.CAST, [e, "datetime"]);
157338
- return re4(t) ? `FORMAT_TIMESTAMP('${r}', (${s}), '${t}')` : `FORMAT_TIMESTAMP('${r}', (${s}))`;
157370
+ return re3(t) ? `FORMAT_TIMESTAMP('${r}', (${s}), '${t}')` : `FORMAT_TIMESTAMP('${r}', (${s}))`;
157339
157371
  }],
157340
157372
  [
157341
157373
  o3.CAST_DATETIME_TO_DATE,
157342
- ([e, t]) => re4(t) ? `DATE(${e}, '${t}')` : `DATE(${e})`
157374
+ ([e, t]) => re3(t) ? `DATE(${e}, '${t}')` : `DATE(${e})`
157343
157375
  ],
157344
157376
  [o3.ADD_TIME_ZONE, ([e, t], n) => `TIMESTAMP(${n.opSql(o3.CAST_DB_TYPE, [e, "DATETIME"])}, '${t}')`],
157345
157377
  [
@@ -157368,7 +157400,7 @@ var xr5 = /* @__PURE__ */ new Map([
157368
157400
  }],
157369
157401
  [o3.DATETIME_FORMAT, ([e, t, n], r) => {
157370
157402
  const s = t.replace(/%q/g, "%Q"), a = r.opSql(o3.NORMALIZE_TEXT_VALUE, [s]), i = r.opSql(o3.CAST, [e, "datetime"]);
157371
- return re4(n) ? `FORMAT_TIMESTAMP(${a}, ${i}, '${n}')` : `FORMAT_TIMESTAMP(${a}, ${i})`;
157403
+ return re3(n) ? `FORMAT_TIMESTAMP(${a}, ${i}, '${n}')` : `FORMAT_TIMESTAMP(${a}, ${i})`;
157372
157404
  }],
157373
157405
  [o3.DATE_FORMAT, ([e, t], n) => {
157374
157406
  const r = t.replace(/%q/g, "%Q");
@@ -158406,7 +158438,7 @@ function yo4(e) {
158406
158438
  throw new d4(`MySQL SQL generator does not support data type: ${e}`);
158407
158439
  }
158408
158440
  }
158409
- var wo4 = ln5("mysql");
158441
+ var wo4 = ln4("mysql");
158410
158442
  function Uo4(e, t) {
158411
158443
  return [q4, wo4, h3, M3];
158412
158444
  }
@@ -158673,7 +158705,7 @@ function zo3(e) {
158673
158705
  throw new d4(`Redshift SQL generator does not support data type: ${e}`);
158674
158706
  }
158675
158707
  }
158676
- var Qo4 = ln5("redshift");
158708
+ var Qo4 = ln4("redshift");
158677
158709
  function jo3(e, t) {
158678
158710
  return [Qo4, b3, q4, h3, M3];
158679
158711
  }
@@ -161649,7 +161681,7 @@ function ee4(e) {
161649
161681
  }
161650
161682
  return n;
161651
161683
  }
161652
- function ne4(e) {
161684
+ function ne5(e) {
161653
161685
  const n = ee4(e), t = {
161654
161686
  read: [],
161655
161687
  write: [...Q3(n)]
@@ -161663,7 +161695,7 @@ function ne4(e) {
161663
161695
  };
161664
161696
  }
161665
161697
  function oe5(e, n) {
161666
- return [...Y5(...e).vulnerabilities, ...ne4(n).vulnerabilities];
161698
+ return [...Y5(...e).vulnerabilities, ...ne5(n).vulnerabilities];
161667
161699
  }
161668
161700
 
161669
161701
  // ../../node_modules/.pnpm/simple-git@4.0.2/node_modules/simple-git/dist/index.mjs
@@ -162011,7 +162043,7 @@ var qt6 = /* @__PURE__ */ new Set([
162011
162043
  ...L4(Object.values(zt7))
162012
162044
  ]);
162013
162045
  function on6(t, e) {
162014
- const { cleanMode: n, options: r, valid: s } = cn5(t);
162046
+ const { cleanMode: n, options: r, valid: s } = cn6(t);
162015
162047
  return n ? s.options ? (r.push(...e), r.some(hn6) ? b5(nn4) : an5(n, r)) : b5(sn5 + JSON.stringify(t)) : b5(rn5);
162016
162048
  }
162017
162049
  function an5(t, e) {
@@ -162026,10 +162058,10 @@ function an5(t, e) {
162026
162058
  function un5(t) {
162027
162059
  return Array.isArray(t) && t.every((e) => qt6.has(e));
162028
162060
  }
162029
- function cn5(t) {
162061
+ function cn6(t) {
162030
162062
  let e, n = [], r = { cleanMode: false, options: true };
162031
162063
  return t.replace(/[^a-z]i/g, "").split("").forEach((s) => {
162032
- fn5(s) ? (e = s, r.cleanMode = true) : r.options = r.options && ln6(n[n.length] = `-${s}`);
162064
+ fn5(s) ? (e = s, r.cleanMode = true) : r.options = r.options && ln5(n[n.length] = `-${s}`);
162033
162065
  }), {
162034
162066
  cleanMode: e,
162035
162067
  options: n,
@@ -162039,7 +162071,7 @@ function cn5(t) {
162039
162071
  function fn5(t) {
162040
162072
  return t === "f" || t === "n";
162041
162073
  }
162042
- function ln6(t) {
162074
+ function ln5(t) {
162043
162075
  return /^-[a-z]$/i.test(t) && qt6.has(t.charAt(1));
162044
162076
  }
162045
162077
  function hn6(t) {
@@ -162763,12 +162795,12 @@ function Zt5(t = R6.NONE) {
162763
162795
  }
162764
162796
  var te5 = "òòòòòò ";
162765
162797
  var ee5 = " òò";
162766
- var ne5 = " ò ";
162798
+ var ne6 = " ò ";
162767
162799
  var ur5 = ["hash", "date", "message", "refs", "author_name", "author_email"];
162768
162800
  function cr5(t, e) {
162769
162801
  return e.reduce((n, r, s) => (n[r] = t[s] || "", n), /* @__PURE__ */ Object.create({ diff: null }));
162770
162802
  }
162771
- function re5(t = ne5, e = ur5, n = R6.NONE) {
162803
+ function re4(t = ne6, e = ur5, n = R6.NONE) {
162772
162804
  const r = Zt5(n);
162773
162805
  return function(s) {
162774
162806
  const o = H6(s.trim(), false, te5).map(function(i) {
@@ -162809,7 +162841,7 @@ function hr5(t) {
162809
162841
  return Object.keys(t).reduce((e, n) => ((n in se5) || (e[n] = t[n]), e), {});
162810
162842
  }
162811
162843
  function oe6(t = {}, e = []) {
162812
- const n = d5(t.splitter, m3, ne5), r = lt5(t.format) ? t.format : {
162844
+ const n = d5(t.splitter, m3, ne6), r = lt5(t.format) ? t.format : {
162813
162845
  hash: "%H",
162814
162846
  date: t.strictDate === false ? "%ai" : "%aI",
162815
162847
  message: "%s",
@@ -162832,7 +162864,7 @@ function oe6(t = {}, e = []) {
162832
162864
  };
162833
162865
  }
162834
162866
  function mr5(t, e, n) {
162835
- const r = re5(t, e, pt7(n));
162867
+ const r = re4(t, e, pt7(n));
162836
162868
  return {
162837
162869
  commands: ["log", ...n],
162838
162870
  format: "utf-8",
@@ -163596,7 +163628,7 @@ function Os4(t) {
163596
163628
  return g5(["remote", "remove", t]);
163597
163629
  }
163598
163630
  function Cs5(t = {}, e) {
163599
- const n = oe6(t), r = ["stash", "list", ...n.commands, ...e], s = re5(n.splitter, n.fields, pt7(r));
163631
+ const n = oe6(t), r = ["stash", "list", ...n.commands, ...e], s = re4(n.splitter, n.fields, pt7(r));
163600
163632
  return dt6(r) || {
163601
163633
  commands: r,
163602
163634
  format: "utf-8",