@openc3/js-common 6.10.3 → 6.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/services.js CHANGED
@@ -316,8 +316,8 @@ function Re(n, e, t) {
316
316
  metaTokens: !0,
317
317
  dots: !1,
318
318
  indexes: !1
319
- }, !1, function(p, m) {
320
- return !l.isUndefined(m[p]);
319
+ }, !1, function(m, p) {
320
+ return !l.isUndefined(p[m]);
321
321
  });
322
322
  const s = t.metaTokens, r = t.visitor || a, o = t.dots, i = t.indexes, d = (t.Blob || typeof Blob < "u" && Blob) && l.isSpecCompliantForm(e);
323
323
  if (!l.isFunction(r))
@@ -332,39 +332,39 @@ function Re(n, e, t) {
332
332
  throw new _("Blob is not supported. Use a Buffer instead.");
333
333
  return l.isArrayBuffer(h) || l.isTypedArray(h) ? d && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
334
334
  }
335
- function a(h, p, m) {
335
+ function a(h, m, p) {
336
336
  let w = h;
337
- if (h && !m && typeof h == "object") {
338
- if (l.endsWith(p, "{}"))
339
- p = s ? p : p.slice(0, -2), h = JSON.stringify(h);
340
- else if (l.isArray(h) && Wn(h) || (l.isFileList(h) || l.endsWith(p, "[]")) && (w = l.toArray(h)))
341
- return p = $t(p), w.forEach(function(x, O) {
342
- !(l.isUndefined(x) || x === null) && e.append(
337
+ if (h && !p && typeof h == "object") {
338
+ if (l.endsWith(m, "{}"))
339
+ m = s ? m : m.slice(0, -2), h = JSON.stringify(h);
340
+ else if (l.isArray(h) && Wn(h) || (l.isFileList(h) || l.endsWith(m, "[]")) && (w = l.toArray(h)))
341
+ return m = $t(m), w.forEach(function(E, O) {
342
+ !(l.isUndefined(E) || E === null) && e.append(
343
343
  // eslint-disable-next-line no-nested-ternary
344
- i === !0 ? Ye([p], O, o) : i === null ? p : p + "[]",
345
- u(x)
344
+ i === !0 ? Ye([m], O, o) : i === null ? m : m + "[]",
345
+ u(E)
346
346
  );
347
347
  }), !1;
348
348
  }
349
- return Fe(h) ? !0 : (e.append(Ye(m, p, o), u(h)), !1);
349
+ return Fe(h) ? !0 : (e.append(Ye(p, m, o), u(h)), !1);
350
350
  }
351
351
  const f = [], g = Object.assign(Kn, {
352
352
  defaultVisitor: a,
353
353
  convertValue: u,
354
354
  isVisitable: Fe
355
355
  });
356
- function b(h, p) {
356
+ function b(h, m) {
357
357
  if (!l.isUndefined(h)) {
358
358
  if (f.indexOf(h) !== -1)
359
- throw Error("Circular reference detected in " + p.join("."));
360
- f.push(h), l.forEach(h, function(w, E) {
359
+ throw Error("Circular reference detected in " + m.join("."));
360
+ f.push(h), l.forEach(h, function(w, S) {
361
361
  (!(l.isUndefined(w) || w === null) && r.call(
362
362
  e,
363
363
  w,
364
- l.isString(E) ? E.trim() : E,
365
- p,
364
+ l.isString(S) ? S.trim() : S,
365
+ m,
366
366
  g
367
- )) === !0 && b(w, p ? p.concat(E) : [E]);
367
+ )) === !0 && b(w, m ? m.concat(S) : [S]);
368
368
  }), f.pop();
369
369
  }
370
370
  }
@@ -1030,57 +1030,57 @@ const Mt = (n) => {
1030
1030
  let o = r.data;
1031
1031
  const i = P.from(r.headers).normalize();
1032
1032
  let { responseType: c, onUploadProgress: d, onDownloadProgress: u } = r, a, f, g, b, h;
1033
- function p() {
1033
+ function m() {
1034
1034
  b && b(), h && h(), r.cancelToken && r.cancelToken.unsubscribe(a), r.signal && r.signal.removeEventListener("abort", a);
1035
1035
  }
1036
- let m = new XMLHttpRequest();
1037
- m.open(r.method.toUpperCase(), r.url, !0), m.timeout = r.timeout;
1036
+ let p = new XMLHttpRequest();
1037
+ p.open(r.method.toUpperCase(), r.url, !0), p.timeout = r.timeout;
1038
1038
  function w() {
1039
- if (!m)
1039
+ if (!p)
1040
1040
  return;
1041
- const x = P.from(
1042
- "getAllResponseHeaders" in m && m.getAllResponseHeaders()
1041
+ const E = P.from(
1042
+ "getAllResponseHeaders" in p && p.getAllResponseHeaders()
1043
1043
  ), C = {
1044
- data: !c || c === "text" || c === "json" ? m.responseText : m.response,
1045
- status: m.status,
1046
- statusText: m.statusText,
1047
- headers: x,
1044
+ data: !c || c === "text" || c === "json" ? p.responseText : p.response,
1045
+ status: p.status,
1046
+ statusText: p.statusText,
1047
+ headers: E,
1048
1048
  config: n,
1049
- request: m
1049
+ request: p
1050
1050
  };
1051
1051
  qt(function(T) {
1052
- t(T), p();
1052
+ t(T), m();
1053
1053
  }, function(T) {
1054
- s(T), p();
1055
- }, C), m = null;
1054
+ s(T), m();
1055
+ }, C), p = null;
1056
1056
  }
1057
- "onloadend" in m ? m.onloadend = w : m.onreadystatechange = function() {
1058
- !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(w);
1059
- }, m.onabort = function() {
1060
- m && (s(new _("Request aborted", _.ECONNABORTED, n, m)), m = null);
1061
- }, m.onerror = function(O) {
1062
- const C = O && O.message ? O.message : "Network Error", F = new _(C, _.ERR_NETWORK, n, m);
1063
- F.event = O || null, s(F), m = null;
1064
- }, m.ontimeout = function() {
1057
+ "onloadend" in p ? p.onloadend = w : p.onreadystatechange = function() {
1058
+ !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(w);
1059
+ }, p.onabort = function() {
1060
+ p && (s(new _("Request aborted", _.ECONNABORTED, n, p)), p = null);
1061
+ }, p.onerror = function(O) {
1062
+ const C = O && O.message ? O.message : "Network Error", F = new _(C, _.ERR_NETWORK, n, p);
1063
+ F.event = O || null, s(F), p = null;
1064
+ }, p.ontimeout = function() {
1065
1065
  let O = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
1066
1066
  const C = r.transitional || jt;
1067
1067
  r.timeoutErrorMessage && (O = r.timeoutErrorMessage), s(new _(
1068
1068
  O,
1069
1069
  C.clarifyTimeoutError ? _.ETIMEDOUT : _.ECONNABORTED,
1070
1070
  n,
1071
- m
1072
- )), m = null;
1073
- }, o === void 0 && i.setContentType(null), "setRequestHeader" in m && l.forEach(i.toJSON(), function(O, C) {
1074
- m.setRequestHeader(C, O);
1075
- }), l.isUndefined(r.withCredentials) || (m.withCredentials = !!r.withCredentials), c && c !== "json" && (m.responseType = r.responseType), u && ([g, h] = Se(u, !0), m.addEventListener("progress", g)), d && m.upload && ([f, b] = Se(d), m.upload.addEventListener("progress", f), m.upload.addEventListener("loadend", b)), (r.cancelToken || r.signal) && (a = (x) => {
1076
- m && (s(!x || x.type ? new ne(null, n, m) : x), m.abort(), m = null);
1071
+ p
1072
+ )), p = null;
1073
+ }, o === void 0 && i.setContentType(null), "setRequestHeader" in p && l.forEach(i.toJSON(), function(O, C) {
1074
+ p.setRequestHeader(C, O);
1075
+ }), l.isUndefined(r.withCredentials) || (p.withCredentials = !!r.withCredentials), c && c !== "json" && (p.responseType = r.responseType), u && ([g, h] = Se(u, !0), p.addEventListener("progress", g)), d && p.upload && ([f, b] = Se(d), p.upload.addEventListener("progress", f), p.upload.addEventListener("loadend", b)), (r.cancelToken || r.signal) && (a = (E) => {
1076
+ p && (s(!E || E.type ? new ne(null, n, p) : E), p.abort(), p = null);
1077
1077
  }, r.cancelToken && r.cancelToken.subscribe(a), r.signal && (r.signal.aborted ? a() : r.signal.addEventListener("abort", a)));
1078
- const E = ps(r.url);
1079
- if (E && k.protocols.indexOf(E) === -1) {
1080
- s(new _("Unsupported protocol " + E + ":", _.ERR_BAD_REQUEST, n));
1078
+ const S = ps(r.url);
1079
+ if (S && k.protocols.indexOf(S) === -1) {
1080
+ s(new _("Unsupported protocol " + S + ":", _.ERR_BAD_REQUEST, n));
1081
1081
  return;
1082
1082
  }
1083
- m.send(o || null);
1083
+ p.send(o || null);
1084
1084
  });
1085
1085
  }, xs = (n, e) => {
1086
1086
  const { length: t } = n = n ? n.filter(Boolean) : [];
@@ -1181,25 +1181,25 @@ const Mt = (n) => {
1181
1181
  const { fetch: e, Request: t, Response: s } = n, r = e ? pe(e) : typeof fetch == "function", o = pe(t), i = pe(s);
1182
1182
  if (!r)
1183
1183
  return !1;
1184
- const c = r && pe(at), d = r && (typeof lt == "function" ? /* @__PURE__ */ ((h) => (p) => h.encode(p))(new lt()) : async (h) => new Uint8Array(await new t(h).arrayBuffer())), u = o && c && ut(() => {
1184
+ const c = r && pe(at), d = r && (typeof lt == "function" ? /* @__PURE__ */ ((h) => (m) => h.encode(m))(new lt()) : async (h) => new Uint8Array(await new t(h).arrayBuffer())), u = o && c && ut(() => {
1185
1185
  let h = !1;
1186
- const p = new t(k.origin, {
1186
+ const m = new t(k.origin, {
1187
1187
  body: new at(),
1188
1188
  method: "POST",
1189
1189
  get duplex() {
1190
1190
  return h = !0, "half";
1191
1191
  }
1192
1192
  }).headers.has("Content-Type");
1193
- return h && !p;
1193
+ return h && !m;
1194
1194
  }), a = i && c && ut(() => l.isReadableStream(new s("").body)), f = {
1195
1195
  stream: a && ((h) => h.body)
1196
1196
  };
1197
1197
  r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((h) => {
1198
- !f[h] && (f[h] = (p, m) => {
1199
- let w = p && p[h];
1198
+ !f[h] && (f[h] = (m, p) => {
1199
+ let w = m && m[h];
1200
1200
  if (w)
1201
- return w.call(p);
1202
- throw new _(`Response type '${h}' is not supported`, _.ERR_NOT_SUPPORT, m);
1201
+ return w.call(m);
1202
+ throw new _(`Response type '${h}' is not supported`, _.ERR_NOT_SUPPORT, p);
1203
1203
  });
1204
1204
  });
1205
1205
  const g = async (h) => {
@@ -1216,17 +1216,17 @@ const Mt = (n) => {
1216
1216
  return h.byteLength;
1217
1217
  if (l.isURLSearchParams(h) && (h = h + ""), l.isString(h))
1218
1218
  return (await d(h)).byteLength;
1219
- }, b = async (h, p) => {
1220
- const m = l.toFiniteNumber(h.getContentLength());
1221
- return m ?? g(p);
1219
+ }, b = async (h, m) => {
1220
+ const p = l.toFiniteNumber(h.getContentLength());
1221
+ return p ?? g(m);
1222
1222
  };
1223
1223
  return async (h) => {
1224
1224
  let {
1225
- url: p,
1226
- method: m,
1225
+ url: m,
1226
+ method: p,
1227
1227
  data: w,
1228
- signal: E,
1229
- cancelToken: x,
1228
+ signal: S,
1229
+ cancelToken: E,
1230
1230
  timeout: O,
1231
1231
  onDownloadProgress: C,
1232
1232
  onUploadProgress: F,
@@ -1236,14 +1236,14 @@ const Mt = (n) => {
1236
1236
  fetchOptions: Z
1237
1237
  } = Mt(h), M = e || fetch;
1238
1238
  T = T ? (T + "").toLowerCase() : "text";
1239
- let j = xs([E, x && x.toAbortSignal()], O), U = null;
1239
+ let j = xs([S, E && E.toAbortSignal()], O), U = null;
1240
1240
  const I = j && j.unsubscribe && (() => {
1241
1241
  j.unsubscribe();
1242
1242
  });
1243
1243
  let de;
1244
1244
  try {
1245
- if (F && u && m !== "get" && m !== "head" && (de = await b(J, w)) !== 0) {
1246
- let L = new t(p, {
1245
+ if (F && u && p !== "get" && p !== "head" && (de = await b(J, w)) !== 0) {
1246
+ let L = new t(m, {
1247
1247
  method: "POST",
1248
1248
  body: w,
1249
1249
  duplex: "half"
@@ -1260,39 +1260,39 @@ const Mt = (n) => {
1260
1260
  const A = o && "credentials" in t.prototype, y = {
1261
1261
  ...Z,
1262
1262
  signal: j,
1263
- method: m.toUpperCase(),
1263
+ method: p.toUpperCase(),
1264
1264
  headers: J.normalize().toJSON(),
1265
1265
  body: w,
1266
1266
  duplex: "half",
1267
1267
  credentials: A ? v : void 0
1268
1268
  };
1269
- U = o && new t(p, y);
1270
- let S = await (o ? M(U, Z) : M(p, y));
1269
+ U = o && new t(m, y);
1270
+ let x = await (o ? M(U, Z) : M(m, y));
1271
1271
  const $ = a && (T === "stream" || T === "response");
1272
1272
  if (a && (C || $ && I)) {
1273
1273
  const L = {};
1274
1274
  ["status", "statusText", "headers"].forEach((Qe) => {
1275
- L[Qe] = S[Qe];
1275
+ L[Qe] = x[Qe];
1276
1276
  });
1277
- const V = l.toFiniteNumber(S.headers.get("content-length")), [ke, fe] = C && st(
1277
+ const V = l.toFiniteNumber(x.headers.get("content-length")), [ke, fe] = C && st(
1278
1278
  V,
1279
1279
  Se(rt(C), !0)
1280
1280
  ) || [];
1281
- S = new s(
1282
- ot(S.body, ct, ke, () => {
1281
+ x = new s(
1282
+ ot(x.body, ct, ke, () => {
1283
1283
  fe && fe(), I && I();
1284
1284
  }),
1285
1285
  L
1286
1286
  );
1287
1287
  }
1288
1288
  T = T || "text";
1289
- let z = await f[l.findKey(f, T) || "text"](S, h);
1289
+ let z = await f[l.findKey(f, T) || "text"](x, h);
1290
1290
  return !$ && I && I(), await new Promise((L, V) => {
1291
1291
  qt(L, V, {
1292
1292
  data: z,
1293
- headers: P.from(S.headers),
1294
- status: S.status,
1295
- statusText: S.statusText,
1293
+ headers: P.from(x.headers),
1294
+ status: x.status,
1295
+ statusText: x.statusText,
1296
1296
  config: h,
1297
1297
  request: U
1298
1298
  });
@@ -1507,12 +1507,12 @@ let G = class {
1507
1507
  ), t.headers = P.concat(i, o);
1508
1508
  const c = [];
1509
1509
  let d = !0;
1510
- this.interceptors.request.forEach(function(p) {
1511
- typeof p.runWhen == "function" && p.runWhen(t) === !1 || (d = d && p.synchronous, c.unshift(p.fulfilled, p.rejected));
1510
+ this.interceptors.request.forEach(function(m) {
1511
+ typeof m.runWhen == "function" && m.runWhen(t) === !1 || (d = d && m.synchronous, c.unshift(m.fulfilled, m.rejected));
1512
1512
  });
1513
1513
  const u = [];
1514
- this.interceptors.response.forEach(function(p) {
1515
- u.push(p.fulfilled, p.rejected);
1514
+ this.interceptors.response.forEach(function(m) {
1515
+ u.push(m.fulfilled, m.rejected);
1516
1516
  });
1517
1517
  let a, f = 0, g;
1518
1518
  if (!d) {
@@ -1524,11 +1524,11 @@ let G = class {
1524
1524
  g = c.length;
1525
1525
  let b = t;
1526
1526
  for (; f < g; ) {
1527
- const h = c[f++], p = c[f++];
1527
+ const h = c[f++], m = c[f++];
1528
1528
  try {
1529
1529
  b = h(b);
1530
- } catch (m) {
1531
- p.call(this, m);
1530
+ } catch (p) {
1531
+ m.call(this, p);
1532
1532
  break;
1533
1533
  }
1534
1534
  }
@@ -3146,11 +3146,11 @@ function Zs(n, e) {
3146
3146
  lazy: g,
3147
3147
  monitor: b,
3148
3148
  pingInterval: h,
3149
- reconnectStrategy: p,
3150
- maxMissingPings: m,
3149
+ reconnectStrategy: m,
3150
+ maxMissingPings: p,
3151
3151
  maxReconnectAttempts: w,
3152
- subprotocol: E,
3153
- tokenRefresher: x,
3152
+ subprotocol: S,
3153
+ tokenRefresher: E,
3154
3154
  historyTimestamp: O,
3155
3155
  protocolOptions: C,
3156
3156
  concurrentSubscribes: F,
@@ -3159,7 +3159,7 @@ function Zs(n, e) {
3159
3159
  auth: v
3160
3160
  } = e;
3161
3161
  if (u = u || new he(d), typeof t == "string") {
3162
- E = E || t;
3162
+ S = S || t;
3163
3163
  let j = t.substring(0, t.lastIndexOf("-")), U = t.substring(t.lastIndexOf("-") + 1);
3164
3164
  if (C = C || {}, j === "actioncable-v1")
3165
3165
  t = new Qt({ logger: u, ...C });
@@ -3190,13 +3190,13 @@ function Zs(n, e) {
3190
3190
  a = a || new Qs(n, {
3191
3191
  websocketImplementation: s,
3192
3192
  websocketOptions: o,
3193
- subprotocol: E,
3193
+ subprotocol: S,
3194
3194
  authStrategy: i,
3195
3195
  format: r
3196
- }), c && (a = new Gs([a, ...c], { logger: u })), v && v.token && a.setToken(v.token, v.param || "jid"), p = p || Zt(h), b !== !1 && (b = b || new Yt({
3196
+ }), c && (a = new Gs([a, ...c], { logger: u })), v && v.token && a.setToken(v.token, v.param || "jid"), m = m || Zt(h), b !== !1 && (b = b || new Yt({
3197
3197
  pingInterval: h,
3198
- reconnectStrategy: p,
3199
- maxMissingPings: m,
3198
+ reconnectStrategy: m,
3199
+ maxMissingPings: p,
3200
3200
  maxReconnectAttempts: w,
3201
3201
  logger: u
3202
3202
  }));
@@ -3210,9 +3210,9 @@ function Zs(n, e) {
3210
3210
  performFailures: T,
3211
3211
  transportConfigurator: J
3212
3212
  });
3213
- return b && (b.watch(M), M.monitor = b), x && Ys(M, async () => {
3213
+ return b && (b.watch(M), M.monitor = b), E && Ys(M, async () => {
3214
3214
  try {
3215
- await x(a);
3215
+ await E(a);
3216
3216
  } catch (j) {
3217
3217
  return u.error("Failed to refresh authentication token: " + j), !1;
3218
3218
  }
@@ -3438,53 +3438,75 @@ class bi {
3438
3438
  }), s;
3439
3439
  }
3440
3440
  parse_string(e, t, s, r, o) {
3441
- let i = !1;
3441
+ let i = !1, c = !1;
3442
3442
  this.line = "", this.keyword = null, this.parameters = [], this.filename = t;
3443
- let c = e.split(`
3444
- `), d = c.length;
3445
- for (let u = 0; u < d; u++) {
3446
- this.lineNumber = u + 1;
3447
- let a = c[u].trim();
3448
- if (a.length === 0) {
3449
- s && o(null, [], this.line, this.lineNumber);
3450
- continue;
3451
- }
3452
- if (i === !0) {
3453
- if (a[0] === "#")
3454
- continue;
3455
- a = a.substring(1, a.length);
3456
- }
3457
- let f = a.charAt(a.length - 1), g = !1;
3458
- switch (f) {
3459
- case "+":
3460
- g = !0;
3461
- // Deliberate fall through
3462
- case "\\":
3463
- let w = a.substring(0, a.length - 1).trim();
3464
- this.line += w.substring(0, w.length - 1), g && (this.line += `
3465
- `), i = !0;
3466
- continue;
3467
- case "&":
3468
- this.line += a.substring(0, a.length - 1);
3443
+ let d = e.split(`
3444
+ `), u = d.length;
3445
+ for (let a = 0; a < u; a++) {
3446
+ this.lineNumber = a + 1;
3447
+ let f = d[a];
3448
+ if (i)
3449
+ this.line = f;
3450
+ else {
3451
+ if (f = f.trim(), f.length === 0) {
3452
+ if (s) {
3453
+ let E = o(null, [], this.line, this.lineNumber);
3454
+ E === !0 && (i = !0), E === !1 && (i = !1);
3455
+ }
3469
3456
  continue;
3470
- default:
3471
- this.line += a;
3457
+ }
3458
+ if (c === !0) {
3459
+ if (f[0] === "#")
3460
+ continue;
3461
+ f = f.substring(1, f.length);
3462
+ }
3463
+ let w = f.charAt(f.length - 1), S = !1;
3464
+ switch (w) {
3465
+ case "+":
3466
+ S = !0;
3467
+ // Deliberate fall through
3468
+ case "\\":
3469
+ let E = f.substring(0, f.length - 1).trim();
3470
+ this.line += E.substring(0, E.length - 1), S && (this.line += `
3471
+ `), c = !0;
3472
+ continue;
3473
+ case "&":
3474
+ this.line += f.substring(0, f.length - 1);
3475
+ continue;
3476
+ default:
3477
+ this.line += f;
3478
+ }
3472
3479
  }
3473
- i = !1;
3474
- let b = /("([^\\"]|\\.)*")|('([^\\']|\\.)*')|\S+/g, h = this.scan_string(this.line, b), p = "";
3475
- if (h.length > 0 && (p = p + h[0]), p.length === 0 || p.charAt(0) === "#" ? this.keyword = null : this.keyword = p.toUpperCase(), this.parameters = [], this.keyword === null) {
3476
- s && o(this.keyword, this.parameters, this.line, this.lineNumber), this.line = "";
3480
+ c = !1;
3481
+ let g = /("([^\\"]|\\.)*")|('([^\\']|\\.)*')|\S+/g, b = this.scan_string(this.line, g), h = "";
3482
+ if (b.length > 0 && (h = h + b[0]), h.length === 0 || h.charAt(0) === "#" ? this.keyword = null : this.keyword = h.toUpperCase(), this.parameters = [], this.keyword === null) {
3483
+ if (s) {
3484
+ let w = o(
3485
+ this.keyword,
3486
+ this.parameters,
3487
+ this.line,
3488
+ this.lineNumber
3489
+ );
3490
+ w === !0 && (i = !0), w === !1 && (i = !1);
3491
+ }
3492
+ this.line = "";
3477
3493
  continue;
3478
3494
  }
3479
- let m = h.length;
3495
+ let m = b.length;
3480
3496
  if (m > 1)
3481
3497
  for (let w = 1; w < m; w++) {
3482
- let E = h[w];
3483
- if (E.length > 0 && E.charAt(0) === "#")
3498
+ let S = b[w];
3499
+ if (S.length > 0 && S.charAt(0) === "#")
3484
3500
  break;
3485
- r ? this.parameters.push(this.remove_quotes(E)) : this.parameters.push(E);
3501
+ r ? this.parameters.push(this.remove_quotes(S)) : this.parameters.push(S);
3486
3502
  }
3487
- o(this.keyword, this.parameters, this.line, this.lineNumber), this.line = "";
3503
+ let p = o(
3504
+ this.keyword,
3505
+ this.parameters,
3506
+ this.line,
3507
+ this.lineNumber
3508
+ );
3509
+ p === !0 && (i = !0), p === !1 && (i = !1), this.line = "";
3488
3510
  }
3489
3511
  }
3490
3512
  // parse_string
@@ -3608,20 +3630,20 @@ function Ar(n, e, t) {
3608
3630
  } : t, r = (s == null ? void 0 : s.parseNumber) ?? wr, o = (s == null ? void 0 : s.onDuplicateKey) ?? T;
3609
3631
  let i = 0;
3610
3632
  const c = a();
3611
- return w(c), x(), e ? Sr(c, e) : c;
3633
+ return w(c), E(), e ? Sr(c, e) : c;
3612
3634
  function d() {
3613
3635
  if (n.charCodeAt(i) === Nr) {
3614
3636
  i++, g();
3615
3637
  const y = {};
3616
- let S = !0;
3638
+ let x = !0;
3617
3639
  for (; i < n.length && n.charCodeAt(i) !== St; ) {
3618
- S ? S = !1 : (p(), g());
3640
+ x ? x = !1 : (m(), g());
3619
3641
  const $ = i, z = b();
3620
3642
  if (z === void 0) {
3621
3643
  F();
3622
3644
  return;
3623
3645
  }
3624
- g(), m();
3646
+ g(), p();
3625
3647
  const L = a();
3626
3648
  if (L === void 0) {
3627
3649
  j();
@@ -3645,11 +3667,11 @@ function Ar(n, e, t) {
3645
3667
  if (n.charCodeAt(i) === Pr) {
3646
3668
  i++, g();
3647
3669
  const y = [];
3648
- let S = !0;
3670
+ let x = !0;
3649
3671
  for (; i < n.length && n.charCodeAt(i) !== Et; ) {
3650
- S ? S = !1 : p();
3672
+ x ? x = !1 : m();
3651
3673
  const $ = a();
3652
- E($), y.push($);
3674
+ S($), y.push($);
3653
3675
  }
3654
3676
  return n.charCodeAt(i) !== Et && v(), i++, y;
3655
3677
  }
@@ -3659,9 +3681,9 @@ function Ar(n, e, t) {
3659
3681
  const y = b() ?? h() ?? d() ?? u() ?? f("true", !0) ?? f("false", !1) ?? f("null", null);
3660
3682
  return g(), y;
3661
3683
  }
3662
- function f(y, S) {
3684
+ function f(y, x) {
3663
3685
  if (n.slice(i, i + y.length) === y)
3664
- return i += y.length, S;
3686
+ return i += y.length, x;
3665
3687
  }
3666
3688
  function g() {
3667
3689
  for (; Rr(n.charCodeAt(i)); )
@@ -3673,8 +3695,8 @@ function Ar(n, e, t) {
3673
3695
  let y = "";
3674
3696
  for (; i < n.length && n.charCodeAt(i) !== Le; ) {
3675
3697
  if (n.charCodeAt(i) === kr) {
3676
- const S = n[i + 1], $ = Tr[S];
3677
- $ !== void 0 ? (y += $, i++) : S === "u" ? ge(n.charCodeAt(i + 2)) && ge(n.charCodeAt(i + 3)) && ge(n.charCodeAt(i + 4)) && ge(n.charCodeAt(i + 5)) ? (y += String.fromCharCode(Number.parseInt(n.slice(i + 2, i + 6), 16)), i += 5) : U(i) : M(i);
3698
+ const x = n[i + 1], $ = Tr[x];
3699
+ $ !== void 0 ? (y += $, i++) : x === "u" ? ge(n.charCodeAt(i + 2)) && ge(n.charCodeAt(i + 3)) && ge(n.charCodeAt(i + 4)) && ge(n.charCodeAt(i + 5)) ? (y += String.fromCharCode(Number.parseInt(n.slice(i + 2, i + 6), 16)), i += 5) : U(i) : M(i);
3678
3700
  } else
3679
3701
  Cr(n.charCodeAt(i)) ? y += n[i] : Z(n[i]);
3680
3702
  i++;
@@ -3698,12 +3720,12 @@ function Ar(n, e, t) {
3698
3720
  if (i > y)
3699
3721
  return r(n.slice(y, i));
3700
3722
  }
3701
- function p() {
3723
+ function m() {
3702
3724
  if (n.charCodeAt(i) !== Ur)
3703
3725
  throw new SyntaxError(`Comma ',' expected after value ${A()}`);
3704
3726
  i++;
3705
3727
  }
3706
- function m() {
3728
+ function p() {
3707
3729
  if (n.charCodeAt(i) !== qr)
3708
3730
  throw new SyntaxError(`Colon ':' expected after property name ${A()}`);
3709
3731
  i++;
@@ -3712,18 +3734,18 @@ function Ar(n, e, t) {
3712
3734
  if (y === void 0)
3713
3735
  throw new SyntaxError(`JSON value expected ${A()}`);
3714
3736
  }
3715
- function E(y) {
3737
+ function S(y) {
3716
3738
  if (y === void 0)
3717
3739
  throw new SyntaxError(`Array item expected ${A()}`);
3718
3740
  }
3719
- function x() {
3741
+ function E() {
3720
3742
  if (i < n.length)
3721
3743
  throw new SyntaxError(`Expected end of input ${A()}`);
3722
3744
  }
3723
3745
  function O(y) {
3724
3746
  if (!be(n.charCodeAt(i))) {
3725
- const S = n.slice(y, i);
3726
- throw new SyntaxError(`Invalid number '${S}', expecting a digit ${A()}`);
3747
+ const x = n.slice(y, i);
3748
+ throw new SyntaxError(`Invalid number '${x}', expecting a digit ${A()}`);
3727
3749
  }
3728
3750
  }
3729
3751
  function C() {
@@ -3735,10 +3757,10 @@ function Ar(n, e, t) {
3735
3757
  }
3736
3758
  function T(y) {
3737
3759
  let {
3738
- key: S,
3760
+ key: x,
3739
3761
  position: $
3740
3762
  } = y;
3741
- throw new SyntaxError(`Duplicate key '${S}' encountered at position ${$}`);
3763
+ throw new SyntaxError(`Duplicate key '${x}' encountered at position ${$}`);
3742
3764
  }
3743
3765
  function J() {
3744
3766
  throw new SyntaxError(`Quoted object key or end of object '}' expected ${A()}`);
@@ -3750,15 +3772,15 @@ function Ar(n, e, t) {
3750
3772
  throw new SyntaxError(`Invalid character '${y}' ${I()}`);
3751
3773
  }
3752
3774
  function M(y) {
3753
- const S = n.slice(y, y + 2);
3754
- throw new SyntaxError(`Invalid escape character '${S}' ${I()}`);
3775
+ const x = n.slice(y, y + 2);
3776
+ throw new SyntaxError(`Invalid escape character '${x}' ${I()}`);
3755
3777
  }
3756
3778
  function j() {
3757
3779
  throw new SyntaxError(`Object value expected after ':' ${I()}`);
3758
3780
  }
3759
3781
  function U(y) {
3760
- const S = n.slice(y, y + 6);
3761
- throw new SyntaxError(`Invalid unicode character '${S}' ${I()}`);
3782
+ const x = n.slice(y, y + 6);
3783
+ throw new SyntaxError(`Invalid unicode character '${x}' ${I()}`);
3762
3784
  }
3763
3785
  function I() {
3764
3786
  return `at position ${i}`;
@@ -3832,8 +3854,8 @@ function sn(n, e, t, s) {
3832
3854
  let b = r ? `[
3833
3855
  ` : "[";
3834
3856
  for (let h = 0; h < a.length; h++) {
3835
- const p = a[h];
3836
- r && (b += g), typeof p < "u" && typeof p != "function" ? b += i(p, g) : b += "null", h < a.length - 1 && (b += r ? `,
3857
+ const m = a[h];
3858
+ r && (b += g), typeof m < "u" && typeof m != "function" ? b += i(m, g) : b += "null", h < a.length - 1 && (b += r ? `,
3837
3859
  ` : ",");
3838
3860
  }
3839
3861
  return b += r ? `
@@ -3846,19 +3868,19 @@ ${f}]` : "]", b;
3846
3868
  if (g.length === 0)
3847
3869
  return "{}";
3848
3870
  const b = r ? f + r : void 0;
3849
- let h = !0, p = r ? `{
3871
+ let h = !0, m = r ? `{
3850
3872
  ` : "{";
3851
- for (const m of g) {
3852
- const w = a[m];
3853
- if (u(m, w)) {
3854
- h ? h = !1 : p += r ? `,
3873
+ for (const p of g) {
3874
+ const w = a[p];
3875
+ if (u(p, w)) {
3876
+ h ? h = !1 : m += r ? `,
3855
3877
  ` : ",";
3856
- const E = JSON.stringify(m);
3857
- p += r ? `${b + E}: ` : `${E}:`, p += i(w, b);
3878
+ const S = JSON.stringify(p);
3879
+ m += r ? `${b + S}: ` : `${S}:`, m += i(w, b);
3858
3880
  }
3859
3881
  }
3860
- return p += r ? `
3861
- ${f}}` : "}", p;
3882
+ return m += r ? `
3883
+ ${f}}` : "}", m;
3862
3884
  }
3863
3885
  function u(a, f) {
3864
3886
  return typeof f < "u" && typeof f != "function" && typeof f != "symbol";