@bahmni/services 0.0.1-dev.234 → 0.0.1-dev.236

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/index.js CHANGED
@@ -108,7 +108,7 @@ const Ui = (e, t, r, { allOwnKeys: n } = {}) => (At(
108
108
  });
109
109
  },
110
110
  { allOwnKeys: n }
111
- ), e), qi = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Mi = (e, t, r, n) => {
111
+ ), e), Mi = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), qi = (e, t, r, n) => {
112
112
  e.prototype = Object.create(t.prototype, n), Object.defineProperty(e.prototype, "constructor", {
113
113
  __proto__: null,
114
114
  value: e,
@@ -249,8 +249,8 @@ const ec = (e) => {
249
249
  merge: On,
250
250
  extend: Ui,
251
251
  trim: xi,
252
- stripBOM: qi,
253
- inherits: Mi,
252
+ stripBOM: Mi,
253
+ inherits: qi,
254
254
  toFlatObject: Fi,
255
255
  kindOf: kr,
256
256
  kindOfTest: Pe,
@@ -1069,15 +1069,15 @@ const Rr = (e, t, r = 3) => {
1069
1069
  }
1070
1070
  }
1071
1071
  );
1072
- function qc(e) {
1072
+ function Mc(e) {
1073
1073
  return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1074
1074
  }
1075
- function Mc(e, t) {
1075
+ function qc(e, t) {
1076
1076
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1077
1077
  }
1078
1078
  function _a(e, t, r) {
1079
- let n = !qc(t);
1080
- return e && (n || r === !1) ? Mc(e, t) : t;
1079
+ let n = !Mc(t);
1080
+ return e && (n || r === !1) ? qc(e, t) : t;
1081
1081
  }
1082
1082
  const cs = (e) => e instanceof we ? { ...e } : e;
1083
1083
  function Ke(e, t) {
@@ -1380,7 +1380,7 @@ function Wc(e) {
1380
1380
  }
1381
1381
  return o;
1382
1382
  }
1383
- const qn = "1.16.0", ls = 64 * 1024, { isFunction: Dt } = N, ds = (e, ...t) => {
1383
+ const Mn = "1.16.0", ls = 64 * 1024, { isFunction: Dt } = N, ds = (e, ...t) => {
1384
1384
  try {
1385
1385
  return !!e(...t);
1386
1386
  } catch {
@@ -1455,7 +1455,7 @@ const qn = "1.16.0", ls = 64 * 1024, { isFunction: Dt } = N, ds = (e, ...t) => {
1455
1455
  onDownloadProgress: I,
1456
1456
  onUploadProgress: x,
1457
1457
  responseType: F,
1458
- headers: M,
1458
+ headers: q,
1459
1459
  withCredentials: H = "same-origin",
1460
1460
  fetchOptions: G,
1461
1461
  maxContentLength: K,
@@ -1481,8 +1481,8 @@ const qn = "1.16.0", ls = 64 * 1024, { isFunction: Dt } = N, ds = (e, ...t) => {
1481
1481
  k
1482
1482
  );
1483
1483
  if (me && h !== "get" && h !== "head") {
1484
- const q = await f(M, w);
1485
- if (typeof q == "number" && isFinite(q) && q > te)
1484
+ const M = await f(q, w);
1485
+ if (typeof M == "number" && isFinite(M) && M > te)
1486
1486
  throw new B(
1487
1487
  "Request body larger than maxBodyLength limit",
1488
1488
  B.ERR_BAD_REQUEST,
@@ -1490,32 +1490,32 @@ const qn = "1.16.0", ls = 64 * 1024, { isFunction: Dt } = N, ds = (e, ...t) => {
1490
1490
  k
1491
1491
  );
1492
1492
  }
1493
- if (x && y && h !== "get" && h !== "head" && (L = await f(M, w)) !== 0) {
1494
- let q = new o(u, {
1493
+ if (x && y && h !== "get" && h !== "head" && (L = await f(q, w)) !== 0) {
1494
+ let M = new o(u, {
1495
1495
  method: "POST",
1496
1496
  body: w,
1497
1497
  duplex: "half"
1498
1498
  }), Q;
1499
- if (N.isFormData(w) && (Q = q.headers.get("content-type")) && M.setContentType(Q), q.body) {
1499
+ if (N.isFormData(w) && (Q = M.headers.get("content-type")) && q.setContentType(Q), M.body) {
1500
1500
  const [J, T] = as(
1501
1501
  L,
1502
1502
  Rr(is(x))
1503
1503
  );
1504
- w = us(q.body, ls, J, T);
1504
+ w = us(M.body, ls, J, T);
1505
1505
  }
1506
1506
  }
1507
1507
  N.isString(H) || (H = H ? "include" : "omit");
1508
1508
  const P = c && "credentials" in o.prototype;
1509
1509
  if (N.isFormData(w)) {
1510
- const q = M.getContentType();
1511
- q && /^multipart\/form-data/i.test(q) && !/boundary=/i.test(q) && M.delete("content-type");
1510
+ const M = q.getContentType();
1511
+ M && /^multipart\/form-data/i.test(M) && !/boundary=/i.test(M) && q.delete("content-type");
1512
1512
  }
1513
- M.set("User-Agent", "axios/" + qn, !1);
1513
+ q.set("User-Agent", "axios/" + Mn, !1);
1514
1514
  const v = {
1515
1515
  ...G,
1516
1516
  signal: se,
1517
1517
  method: h.toUpperCase(),
1518
- headers: M.normalize().toJSON(),
1518
+ headers: q.normalize().toJSON(),
1519
1519
  body: w,
1520
1520
  duplex: "half",
1521
1521
  credentials: P ? H : void 0
@@ -1523,8 +1523,8 @@ const qn = "1.16.0", ls = 64 * 1024, { isFunction: Dt } = N, ds = (e, ...t) => {
1523
1523
  k = c && new o(u, v);
1524
1524
  let O = await (c ? re(k, G) : re(u, v));
1525
1525
  if (le) {
1526
- const q = N.toFiniteNumber(O.headers.get("content-length"));
1527
- if (q != null && q > K)
1526
+ const M = N.toFiniteNumber(O.headers.get("content-length"));
1527
+ if (M != null && M > K)
1528
1528
  throw new B(
1529
1529
  "maxContentLength size of " + K + " exceeded",
1530
1530
  B.ERR_BAD_RESPONSE,
@@ -1534,9 +1534,9 @@ const qn = "1.16.0", ls = 64 * 1024, { isFunction: Dt } = N, ds = (e, ...t) => {
1534
1534
  }
1535
1535
  const D = b && (F === "stream" || F === "response");
1536
1536
  if (b && O.body && (I || le || D && A)) {
1537
- const q = {};
1537
+ const M = {};
1538
1538
  ["status", "statusText", "headers"].forEach((U) => {
1539
- q[U] = O[U];
1539
+ M[U] = O[U];
1540
1540
  });
1541
1541
  const Q = N.toFiniteNumber(O.headers.get("content-length")), [J, T] = I && as(
1542
1542
  Q,
@@ -1557,7 +1557,7 @@ const qn = "1.16.0", ls = 64 * 1024, { isFunction: Dt } = N, ds = (e, ...t) => {
1557
1557
  us(O.body, ls, C, () => {
1558
1558
  T && T(), A && A();
1559
1559
  }),
1560
- q
1560
+ M
1561
1561
  );
1562
1562
  }
1563
1563
  F = F || "text";
@@ -1566,8 +1566,8 @@ const qn = "1.16.0", ls = 64 * 1024, { isFunction: Dt } = N, ds = (e, ...t) => {
1566
1566
  p
1567
1567
  );
1568
1568
  if (le && !b && !D) {
1569
- let q;
1570
- if (j != null && (typeof j.byteLength == "number" ? q = j.byteLength : typeof j.size == "number" ? q = j.size : typeof j == "string" && (q = typeof n == "function" ? new n().encode(j).byteLength : j.length)), typeof q == "number" && q > K)
1569
+ let M;
1570
+ if (j != null && (typeof j.byteLength == "number" ? M = j.byteLength : typeof j.size == "number" ? M = j.size : typeof j == "string" && (M = typeof n == "function" ? new n().encode(j).byteLength : j.length)), typeof M == "number" && M > K)
1571
1571
  throw new B(
1572
1572
  "maxContentLength size of " + K + " exceeded",
1573
1573
  B.ERR_BAD_RESPONSE,
@@ -1575,8 +1575,8 @@ const qn = "1.16.0", ls = 64 * 1024, { isFunction: Dt } = N, ds = (e, ...t) => {
1575
1575
  k
1576
1576
  );
1577
1577
  }
1578
- return !D && A && A(), await new Promise((q, Q) => {
1579
- Ea(q, Q, {
1578
+ return !D && A && A(), await new Promise((M, Q) => {
1579
+ Ea(M, Q, {
1580
1580
  data: j,
1581
1581
  headers: we.from(O.headers),
1582
1582
  status: O.status,
@@ -1613,14 +1613,14 @@ const qn = "1.16.0", ls = 64 * 1024, { isFunction: Dt } = N, ds = (e, ...t) => {
1613
1613
  return l;
1614
1614
  };
1615
1615
  Sa();
1616
- const Mn = {
1616
+ const qn = {
1617
1617
  http: yc,
1618
1618
  xhr: Hc,
1619
1619
  fetch: {
1620
1620
  get: Sa
1621
1621
  }
1622
1622
  };
1623
- N.forEach(Mn, (e, t) => {
1623
+ N.forEach(qn, (e, t) => {
1624
1624
  if (e) {
1625
1625
  try {
1626
1626
  Object.defineProperty(e, "name", { __proto__: null, value: t });
@@ -1638,7 +1638,7 @@ function Zc(e, t) {
1638
1638
  for (let a = 0; a < r; a++) {
1639
1639
  n = e[a];
1640
1640
  let i;
1641
- if (s = n, !Qc(n) && (s = Mn[(i = String(n)).toLowerCase()], s === void 0))
1641
+ if (s = n, !Qc(n) && (s = qn[(i = String(n)).toLowerCase()], s === void 0))
1642
1642
  throw new B(`Unknown adapter '${i}'`);
1643
1643
  if (s && (N.isFunction(s) || (s = s.get(t))))
1644
1644
  break;
@@ -1668,7 +1668,7 @@ const Ra = {
1668
1668
  * Exposes all known adapters
1669
1669
  * @type {Object<string, Function|Object>}
1670
1670
  */
1671
- adapters: Mn
1671
+ adapters: qn
1672
1672
  };
1673
1673
  function tn(e) {
1674
1674
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
@@ -1703,16 +1703,16 @@ function ps(e) {
1703
1703
  }
1704
1704
  );
1705
1705
  }
1706
- const qr = {};
1706
+ const Mr = {};
1707
1707
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1708
- qr[e] = function(n) {
1708
+ Mr[e] = function(n) {
1709
1709
  return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
1710
1710
  };
1711
1711
  });
1712
1712
  const hs = {};
1713
- qr.transitional = function(t, r, n) {
1713
+ Mr.transitional = function(t, r, n) {
1714
1714
  function s(o, a) {
1715
- return "[Axios v" + qn + "] Transitional option '" + o + "'" + a + (n ? ". " + n : "");
1715
+ return "[Axios v" + Mn + "] Transitional option '" + o + "'" + a + (n ? ". " + n : "");
1716
1716
  }
1717
1717
  return (o, a, i) => {
1718
1718
  if (t === !1)
@@ -1728,7 +1728,7 @@ qr.transitional = function(t, r, n) {
1728
1728
  )), t ? t(o, a, i) : !0;
1729
1729
  };
1730
1730
  };
1731
- qr.spelling = function(t) {
1731
+ Mr.spelling = function(t) {
1732
1732
  return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
1733
1733
  };
1734
1734
  function eu(e, t, r) {
@@ -1753,7 +1753,7 @@ function eu(e, t, r) {
1753
1753
  }
1754
1754
  const _r = {
1755
1755
  assertOptions: eu,
1756
- validators: qr
1756
+ validators: Mr
1757
1757
  }, Re = _r.validators;
1758
1758
  let Ge = class {
1759
1759
  constructor(t) {
@@ -2073,7 +2073,7 @@ ue.Axios = Ge;
2073
2073
  ue.CanceledError = Pt;
2074
2074
  ue.CancelToken = tu;
2075
2075
  ue.isCancel = va;
2076
- ue.VERSION = qn;
2076
+ ue.VERSION = Mn;
2077
2077
  ue.toFormData = Ur;
2078
2078
  ue.AxiosError = B;
2079
2079
  ue.Cancel = ue.CanceledError;
@@ -2282,9 +2282,9 @@ const $n = (e) => {
2282
2282
  return t;
2283
2283
  }
2284
2284
  return e;
2285
- }, yu = (e) => e.includes("/openmrs/ws"), wu = (e) => e.url ?? e.baseURL ?? "", Me = ue.create();
2286
- Me.defaults.headers.common["Content-Type"] = "application/json";
2287
- Me.interceptors.request.use(
2285
+ }, yu = (e) => e.includes("/openmrs/ws"), wu = (e) => e.url ?? e.baseURL ?? "", qe = ue.create();
2286
+ qe.defaults.headers.common["Content-Type"] = "application/json";
2287
+ qe.interceptors.request.use(
2288
2288
  function(e) {
2289
2289
  return e;
2290
2290
  },
@@ -2293,7 +2293,7 @@ Me.interceptors.request.use(
2293
2293
  return Promise.reject(`${t}: ${r}`);
2294
2294
  }
2295
2295
  );
2296
- Me.interceptors.response.use(
2296
+ qe.interceptors.response.use(
2297
2297
  function(e) {
2298
2298
  try {
2299
2299
  const t = wu(e.config);
@@ -2310,7 +2310,7 @@ Me.interceptors.response.use(
2310
2310
  return r.startsWith("ERROR_") || /^[A-Z_]+$/.test(r) ? Promise.reject(new Error(r)) : Promise.reject(`${t}: ${r}`);
2311
2311
  }
2312
2312
  );
2313
- const V = async (e) => (await Me.get(e)).data, De = async (e, t) => (await Me.post(e, t)).data, yg = async (e, t) => (await Me.put(e, t)).data, wg = async (e, t) => (await Me.patch(e, t)).data, Na = async (e) => (await Me.delete(e)).data, Y = (e) => typeof e == "string", pt = () => {
2313
+ const V = async (e) => (await qe.get(e)).data, De = async (e, t) => (await qe.post(e, t)).data, yg = async (e, t) => (await qe.put(e, t)).data, wg = async (e, t) => (await qe.patch(e, t)).data, Na = async (e) => (await qe.delete(e)).data, Y = (e) => typeof e == "string", pt = () => {
2314
2314
  let e, t;
2315
2315
  const r = new Promise((n, s) => {
2316
2316
  e = n, t = s;
@@ -2477,7 +2477,7 @@ class Nr {
2477
2477
  }
2478
2478
  }
2479
2479
  var Ie = new Nr();
2480
- class Mr {
2480
+ class qr {
2481
2481
  constructor() {
2482
2482
  this.observers = {};
2483
2483
  }
@@ -2511,7 +2511,7 @@ class Mr {
2511
2511
  });
2512
2512
  }
2513
2513
  }
2514
- class Es extends Mr {
2514
+ class Es extends qr {
2515
2515
  constructor(t) {
2516
2516
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
2517
2517
  ns: ["translation"],
@@ -2596,7 +2596,7 @@ var $a = {
2596
2596
  }
2597
2597
  };
2598
2598
  const _s = {}, bs = (e) => !Y(e) && typeof e != "boolean" && typeof e != "number";
2599
- class Pr extends Mr {
2599
+ class Pr extends qr {
2600
2600
  constructor(t) {
2601
2601
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2602
2602
  super(), vu(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], t, this), this.options = r, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = Ie.create("translator");
@@ -2642,15 +2642,15 @@ class Pr extends Mr {
2642
2642
  } = this.extractFromKey(t[t.length - 1], r), c = i[i.length - 1], l = r.lng || this.language, d = r.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
2643
2643
  if (l?.toLowerCase() === "cimode") {
2644
2644
  if (d) {
2645
- const M = r.nsSeparator || this.options.nsSeparator;
2645
+ const q = r.nsSeparator || this.options.nsSeparator;
2646
2646
  return s ? {
2647
- res: `${c}${M}${a}`,
2647
+ res: `${c}${q}${a}`,
2648
2648
  usedKey: a,
2649
2649
  exactUsedKey: a,
2650
2650
  usedLng: l,
2651
2651
  usedNS: c,
2652
2652
  usedParams: this.getUsedParamsDetails(r)
2653
- } : `${c}${M}${a}`;
2653
+ } : `${c}${q}${a}`;
2654
2654
  }
2655
2655
  return s ? {
2656
2656
  res: a,
@@ -2672,14 +2672,14 @@ class Pr extends Mr {
2672
2672
  if (p && I && x && g.indexOf(F) < 0 && !(Y(f) && Array.isArray(I))) {
2673
2673
  if (!r.returnObjects && !this.options.returnObjects) {
2674
2674
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
2675
- const M = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(b, I, {
2675
+ const q = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(b, I, {
2676
2676
  ...r,
2677
2677
  ns: i
2678
2678
  }) : `key '${a} (${this.language})' returned an object instead of string.`;
2679
- return s ? (m.res = M, m.usedParams = this.getUsedParamsDetails(r), m) : M;
2679
+ return s ? (m.res = q, m.usedParams = this.getUsedParamsDetails(r), m) : q;
2680
2680
  }
2681
2681
  if (o) {
2682
- const M = Array.isArray(I), H = M ? [] : {}, G = M ? S : b;
2682
+ const q = Array.isArray(I), H = q ? [] : {}, G = q ? S : b;
2683
2683
  for (const K in I)
2684
2684
  if (Object.prototype.hasOwnProperty.call(I, K)) {
2685
2685
  const te = `${G}${o}${K}`;
@@ -2699,10 +2699,10 @@ class Pr extends Mr {
2699
2699
  } else if (p && Y(f) && Array.isArray(y))
2700
2700
  y = y.join(f), y && (y = this.extendTranslation(y, t, r, n));
2701
2701
  else {
2702
- let M = !1, H = !1;
2703
- !this.isValidLookup(y) && h && (M = !0, y = R), this.isValidLookup(y) || (H = !0, y = a);
2702
+ let q = !1, H = !1;
2703
+ !this.isValidLookup(y) && h && (q = !0, y = R), this.isValidLookup(y) || (H = !0, y = a);
2704
2704
  const K = (r.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && H ? void 0 : y, te = h && R !== y && this.options.updateMissing;
2705
- if (H || M || te) {
2705
+ if (H || q || te) {
2706
2706
  if (this.logger.log(te ? "updateKey" : "missingKey", l, c, a, te ? R : y), o) {
2707
2707
  const se = this.resolve(a, {
2708
2708
  ...r,
@@ -2727,7 +2727,7 @@ class Pr extends Mr {
2727
2727
  });
2728
2728
  }) : re(le, a, R));
2729
2729
  }
2730
- y = this.extendTranslation(y, t, r, m, n), H && y === a && this.options.appendNamespaceToMissingKey && (y = `${c}:${a}`), (H || M) && this.options.parseMissingKeyHandler && (y = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}:${a}` : a, M ? y : void 0));
2730
+ y = this.extendTranslation(y, t, r, m, n), H && y === a && this.options.appendNamespaceToMissingKey && (y = `${c}:${a}`), (H || q) && this.options.parseMissingKeyHandler && (y = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}:${a}` : a, q ? y : void 0));
2731
2731
  }
2732
2732
  return s ? (m.res = y, m.usedParams = this.getUsedParamsDetails(r), m) : y;
2733
2733
  }
@@ -3214,7 +3214,7 @@ class Cu {
3214
3214
  const Lu = (e, t) => {
3215
3215
  e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
3216
3216
  };
3217
- class ku extends Mr {
3217
+ class ku extends qr {
3218
3218
  constructor(t, r, n) {
3219
3219
  let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
3220
3220
  super(), this.backend = t, this.store = r, this.services = n, this.languageUtils = n.languageUtils, this.options = s, this.logger = Ie.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, s.backend, s);
@@ -3411,7 +3411,7 @@ const As = () => ({
3411
3411
  typeof e[r] == "function" && (e[r] = e[r].bind(e));
3412
3412
  });
3413
3413
  };
3414
- class St extends Mr {
3414
+ class St extends qr {
3415
3415
  constructor() {
3416
3416
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0;
3417
3417
  if (super(), this.options = Ns(t), this.services = {}, this.logger = Ie, this.modules = {
@@ -3678,10 +3678,10 @@ ie.loadNamespaces;
3678
3678
  ie.loadLanguages;
3679
3679
  const {
3680
3680
  slice: Uu,
3681
- forEach: qu
3681
+ forEach: Mu
3682
3682
  } = [];
3683
- function Mu(e) {
3684
- return qu.call(Uu.call(arguments, 1), (t) => {
3683
+ function qu(e) {
3684
+ return Mu.call(Uu.call(arguments, 1), (t) => {
3685
3685
  if (t)
3686
3686
  for (const r in t)
3687
3687
  e[r] === void 0 && (e[r] = t[r]);
@@ -3962,7 +3962,7 @@ class Ca {
3962
3962
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
3963
3963
  languageUtils: {}
3964
3964
  }, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3965
- this.services = t, this.options = Mu(r, this.options || {}, Xu()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (s) => s.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = n, this.addDetector(Vu), this.addDetector(Bu), this.addDetector(zu), this.addDetector(Gu), this.addDetector(Ku), this.addDetector(Yu), this.addDetector(Wu), this.addDetector(Ju), this.addDetector(Hu);
3965
+ this.services = t, this.options = qu(r, this.options || {}, Xu()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (s) => s.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = n, this.addDetector(Vu), this.addDetector(Bu), this.addDetector(zu), this.addDetector(Gu), this.addDetector(Ku), this.addDetector(Yu), this.addDetector(Wu), this.addDetector(Ju), this.addDetector(Hu);
3966
3966
  }
3967
3967
  addDetector(t) {
3968
3968
  return this.detectors[t.name] = t, this;
@@ -4052,23 +4052,40 @@ function bg() {
4052
4052
  const e = Sn(null), t = Sn(null), r = Xr(async () => {
4053
4053
  t.current && (t.current.getTracks().forEach((a) => a.stop()), t.current = null);
4054
4054
  const o = await navigator.mediaDevices.getUserMedia({
4055
- video: {
4056
- facingMode: "user",
4057
- aspectRatio: 0.75
4058
- }
4055
+ video: { facingMode: "user" }
4059
4056
  });
4060
4057
  t.current = o, e.current && (e.current.srcObject = o);
4061
4058
  }, []), n = Xr(() => {
4062
4059
  t.current && (t.current.getTracks().forEach((o) => o.stop()), t.current = null);
4063
- }, []), s = Xr(() => {
4064
- const o = e.current;
4065
- if (!o) return;
4066
- const a = document.createElement("canvas");
4067
- a.width = o.videoWidth || 0, a.height = o.videoHeight || 0;
4068
- const i = a.getContext("2d");
4069
- if (i)
4070
- return i.drawImage(o, 0, 0), a.toDataURL("image/jpeg", 1);
4071
- }, []);
4060
+ }, []), s = Xr(
4061
+ (o, a, i = 1) => {
4062
+ const c = e.current;
4063
+ if (!c) return;
4064
+ const l = c.videoWidth || 0, d = c.videoHeight || 0;
4065
+ if (!l || !d) return;
4066
+ const m = document.createElement("canvas"), y = m.getContext("2d");
4067
+ if (y) {
4068
+ if (o && a) {
4069
+ const b = o / a, S = l / d;
4070
+ let g = 0, f = 0, p = l, u = d;
4071
+ S > b ? (p = Math.round(d * b), g = Math.round((l - p) / 2)) : (u = Math.round(l / b), f = Math.round((d - u) / 2)), m.width = o, m.height = a, y.drawImage(
4072
+ c,
4073
+ g,
4074
+ f,
4075
+ p,
4076
+ u,
4077
+ 0,
4078
+ 0,
4079
+ o,
4080
+ a
4081
+ );
4082
+ } else
4083
+ m.width = l, m.height = d, y.drawImage(c, 0, 0);
4084
+ return m.toDataURL("image/jpeg", i);
4085
+ }
4086
+ },
4087
+ []
4088
+ );
4072
4089
  return Rn(() => () => n(), [n]), { videoRef: e, start: r, stop: n, capture: s };
4073
4090
  }
4074
4091
  const ol = "bahmni.enableAuditLog", Ua = (e) => `${W}/bahmnicore/sql/globalproperty?property=${e}`, Sg = async (e, t, r) => {
@@ -4089,7 +4106,7 @@ const ol = "bahmni.enableAuditLog", Ua = (e) => `${W}/bahmnicore/sql/globalprope
4089
4106
  function Tg(e, t = " -") {
4090
4107
  return e ? e.toLowerCase().split(new RegExp(`[${t}]+`)).map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ") : "";
4091
4108
  }
4092
- function qa(e) {
4109
+ function Ma(e) {
4093
4110
  const r = document.cookie.split(";");
4094
4111
  for (const n of r) {
4095
4112
  const [s, o] = n.trim().split("=");
@@ -4179,14 +4196,14 @@ function kg(e, t, r, n, s) {
4179
4196
  function xg(e) {
4180
4197
  return e ? e.replaceAll(/[_-]/g, " ").replaceAll(/([a-z])([A-Z])/g, "$1 $2").replaceAll(/([A-Z])([A-Z][a-z])/g, "$1 $2").replaceAll(/([a-z])(\d)/gi, "$1 $2").replaceAll(/(\d)([a-z])/gi, "$1 $2").replaceAll(/\s+/g, " ").trim().toLowerCase().replace(/^./, (t) => t.toUpperCase()) : "";
4181
4198
  }
4182
- const ul = (e) => W + `/user?username=${e}&v=custom:(display,username,uuid)`, Ma = "bahmni.user.location", ll = `${W}/location?tags=Login Location&v=default`, dl = (e) => W + `/user/${e}?v=full`, fl = (e) => W + `/bahmni/app/setting?module=${e}`, pl = "default_dateFormat", hl = ka, ml = [
4199
+ const ul = (e) => W + `/user?username=${e}&v=custom:(display,username,uuid)`, qa = "bahmni.user.location", ll = `${W}/location?tags=Login Location&v=default`, dl = (e) => W + `/user/${e}?v=full`, fl = (e) => W + `/bahmni/app/setting?module=${e}`, pl = "default_dateFormat", hl = ka, ml = [
4183
4200
  La,
4184
- Ma
4201
+ qa
4185
4202
  ], gl = {
4186
4203
  LOGOUT_FAILED: "USER_LOGOUT_FAILED"
4187
4204
  };
4188
4205
  async function Ug() {
4189
- const e = qa(La);
4206
+ const e = Ma(La);
4190
4207
  if (!e)
4191
4208
  return null;
4192
4209
  try {
@@ -4200,7 +4217,7 @@ async function Ug() {
4200
4217
  }
4201
4218
  }
4202
4219
  const jn = () => {
4203
- const e = qa(Ma) ?? null;
4220
+ const e = Ma(qa) ?? null;
4204
4221
  if (!e)
4205
4222
  throw new Error(ie.t("ERROR_FETCHING_USER_LOCATION_DETAILS"));
4206
4223
  const t = JSON.parse(
@@ -4209,9 +4226,9 @@ const jn = () => {
4209
4226
  if (!t.uuid)
4210
4227
  throw new Error(ie.t("ERROR_FETCHING_USER_LOCATION_DETAILS"));
4211
4228
  return t;
4212
- }, qg = async () => (await V(fl("commons"))).find(
4229
+ }, Mg = async () => (await V(fl("commons"))).find(
4213
4230
  (r) => r.property === pl
4214
- )?.value ?? null, Mg = async () => {
4231
+ )?.value ?? null, qg = async () => {
4215
4232
  try {
4216
4233
  return (await V(ll)).results ?? [];
4217
4234
  } catch (e) {
@@ -4295,8 +4312,8 @@ const jn = () => {
4295
4312
  // Extracted address extensions
4296
4313
  ], r = e.city ?? "", n = e.state ?? "", s = e.postalCode ?? "", o = t.filter(Boolean);
4297
4314
  return r && o.push(r), n && s ? o.push(`${n} ${s}`) : n ? o.push(n) : s && o.push(s), o.length > 0 ? o.join(", ").trim() : null;
4298
- }, ql = (e) => !e?.system || !e.value ? null : `${e.system}: ${e.value}`, Ml = (e) => {
4299
- const t = e.address && e.address.length > 0 ? Ul(e.address[0]) : null, r = e.telecom && e.telecom.length > 0 ? ql(e.telecom[0]) : null, n = e.identifier ?? [], s = /* @__PURE__ */ new Map();
4315
+ }, Ml = (e) => !e?.system || !e.value ? null : `${e.system}: ${e.value}`, ql = (e) => {
4316
+ const t = e.address && e.address.length > 0 ? Ul(e.address[0]) : null, r = e.telecom && e.telecom.length > 0 ? Ml(e.telecom[0]) : null, n = e.identifier ?? [], s = /* @__PURE__ */ new Map();
4300
4317
  return n.length > 0 && n.forEach((o) => {
4301
4318
  !o.type?.text || !o.value || s.set(o.type.text, o.value);
4302
4319
  }), {
@@ -4310,7 +4327,7 @@ const jn = () => {
4310
4327
  };
4311
4328
  }, zg = async (e) => {
4312
4329
  const t = await Ll(e);
4313
- return Ml(t);
4330
+ return ql(t);
4314
4331
  }, Gg = async (e) => {
4315
4332
  const t = await fetch(Dl(e));
4316
4333
  if (!t.ok) return null;
@@ -4571,14 +4588,14 @@ function Cn(e, t, r) {
4571
4588
  r?.in,
4572
4589
  e,
4573
4590
  t
4574
- ), o = qs(n, s), a = Math.abs(
4591
+ ), o = Ms(n, s), a = Math.abs(
4575
4592
  za(n, s)
4576
4593
  );
4577
4594
  n.setDate(n.getDate() - o * a);
4578
- const i = +(qs(n, s) === -o), c = o * (a - i);
4595
+ const i = +(Ms(n, s) === -o), c = o * (a - i);
4579
4596
  return c === 0 ? 0 : c;
4580
4597
  }
4581
- function qs(e, t) {
4598
+ function Ms(e, t) {
4582
4599
  const r = e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate() || e.getHours() - t.getHours() || e.getMinutes() - t.getMinutes() || e.getSeconds() - t.getSeconds() || e.getMilliseconds() - t.getMilliseconds();
4583
4600
  return r < 0 ? -1 : r > 0 ? 1 : r;
4584
4601
  }
@@ -4984,12 +5001,12 @@ const $d = /^(\d+)(th|st|nd|rd)?/i, Id = /\d+/i, Dd = {
4984
5001
  /^n/i,
4985
5002
  /^d/i
4986
5003
  ]
4987
- }, qd = {
5004
+ }, Md = {
4988
5005
  narrow: /^[smtwf]/i,
4989
5006
  short: /^(su|mo|tu|we|th|fr|sa)/i,
4990
5007
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
4991
5008
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
4992
- }, Md = {
5009
+ }, qd = {
4993
5010
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
4994
5011
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
4995
5012
  }, Fd = {
@@ -5032,9 +5049,9 @@ const $d = /^(\d+)(th|st|nd|rd)?/i, Id = /\d+/i, Dd = {
5032
5049
  defaultParseWidth: "any"
5033
5050
  }),
5034
5051
  day: mt({
5035
- matchPatterns: qd,
5052
+ matchPatterns: Md,
5036
5053
  defaultMatchWidth: "wide",
5037
- parsePatterns: Md,
5054
+ parsePatterns: qd,
5038
5055
  defaultParseWidth: "any"
5039
5056
  }),
5040
5057
  dayPeriod: mt({
@@ -5143,7 +5160,7 @@ const Ue = {
5143
5160
  afternoon: "afternoon",
5144
5161
  evening: "evening",
5145
5162
  night: "night"
5146
- }, Ms = {
5163
+ }, qs = {
5147
5164
  // Era
5148
5165
  G: function(e, t, r) {
5149
5166
  const n = e.getFullYear() > 0 ? 1 : 0;
@@ -5752,7 +5769,7 @@ function uf(e, t, r) {
5752
5769
  const m = d[0];
5753
5770
  if (m === "'")
5754
5771
  return { isToken: !1, value: lf(d) };
5755
- if (Ms[m])
5772
+ if (qs[m])
5756
5773
  return { isToken: !0, value: d };
5757
5774
  if (m.match(cf))
5758
5775
  throw new RangeError(
@@ -5770,7 +5787,7 @@ function uf(e, t, r) {
5770
5787
  if (!d.isToken) return d.value;
5771
5788
  const m = d.value;
5772
5789
  (ef(m) || Zd(m)) && tf(m, t, String(e));
5773
- const y = Ms[m[0]];
5790
+ const y = qs[m[0]];
5774
5791
  return y(i, m, s.localize, l);
5775
5792
  }).join("");
5776
5793
  }
@@ -5920,7 +5937,7 @@ const hy = {
5920
5937
  const s = t === "upcoming", o = s ? "ge" : "le", a = s ? "date" : "-date", i = s ? (/* @__PURE__ */ new Date()).toISOString() : Nf(/* @__PURE__ */ new Date()).toISOString();
5921
5938
  let c = `${ce}/Appointment?patient=${e}&date=${o}${i}&_sort=${a}`;
5922
5939
  return r !== void 0 && r > 0 && (c += `&_count=${r}`), n !== void 0 && n > 0 && (c += `&_getpagesoffset=${n}`), c;
5923
- }, Df = (e) => Br(e, "upcoming"), Cf = (e, t) => Br(e, "past", t), Lf = (e) => `${Wa}/${e}/status-change`, kf = W + "/appointmentService/all/full", xf = (e) => `${W}/appointmentService?uuid=${e}`, Uf = (e, t = 10, r = 0) => Br(e, "upcoming", t, r), qf = (e, t = 10, r = 0) => Br(e, "past", t, r), gy = async (e) => await De($f, e);
5940
+ }, Df = (e) => Br(e, "upcoming"), Cf = (e, t) => Br(e, "past", t), Lf = (e) => `${Wa}/${e}/status-change`, kf = W + "/appointmentService/all/full", xf = (e) => `${W}/appointmentService?uuid=${e}`, Uf = (e, t = 10, r = 0) => Br(e, "upcoming", t, r), Mf = (e, t = 10, r = 0) => Br(e, "past", t, r), gy = async (e) => await De($f, e);
5924
5941
  async function yy(e) {
5925
5942
  return await V(Df(e));
5926
5943
  }
@@ -5947,11 +5964,11 @@ async function Sy(e, t = 10, r = 1) {
5947
5964
  }
5948
5965
  async function Ry(e, t = 10, r = 1) {
5949
5966
  const n = (r - 1) * t, s = await V(
5950
- qf(e, t, n)
5967
+ Mf(e, t, n)
5951
5968
  );
5952
5969
  return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
5953
5970
  }
5954
- const Ja = "dd/MM/yyyy", Mf = "default_dateFormat", Ff = "h:mm a", Oe = {
5971
+ const Ja = "dd/MM/yyyy", qf = "default_dateFormat", Ff = "h:mm a", Oe = {
5955
5972
  PARSE_ERROR: "DATE_ERROR_PARSE",
5956
5973
  FORMAT_ERROR: "DATE_ERROR_FORMAT",
5957
5974
  EMPTY_OR_INVALID: "DATE_ERROR_EMPTY_OR_INVALID",
@@ -6030,7 +6047,7 @@ function Ty(e, t, r = !1, n) {
6030
6047
  const s = t ?? ((a) => a);
6031
6048
  let o;
6032
6049
  try {
6033
- o = n ?? localStorage.getItem(Mf) ?? Vf();
6050
+ o = n ?? localStorage.getItem(qf) ?? Vf();
6034
6051
  } catch {
6035
6052
  o = Ja;
6036
6053
  }
@@ -6236,7 +6253,7 @@ const ep = (e) => ce + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
6236
6253
  }), un = (e, t) => {
6237
6254
  const r = e.expansion?.contains ?? [];
6238
6255
  return rp(r).map((s) => np(s, t));
6239
- }, qy = async (e, t, r) => {
6256
+ }, My = async (e, t, r) => {
6240
6257
  const n = e ?? tt.MEDICATION.code, s = t ?? tt.FOOD.code, o = r ?? tt.ENVIRONMENT.code, [a, i, c] = await Promise.all([
6241
6258
  br(n),
6242
6259
  br(s),
@@ -6256,7 +6273,7 @@ const ep = (e) => ce + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
6256
6273
  tt.ENVIRONMENT.display
6257
6274
  )
6258
6275
  ];
6259
- }, My = async (e) => {
6276
+ }, qy = async (e) => {
6260
6277
  const t = e ?? tp.code;
6261
6278
  return (await br(t)).compose?.include[0]?.concept ?? [];
6262
6279
  };
@@ -6492,7 +6509,7 @@ function Up(e, t, r) {
6492
6509
  );
6493
6510
  return n?.code?.text ? n.code.text : e?.reference ? e.reference : "Medication";
6494
6511
  }
6495
- function qp(e, t, r) {
6512
+ function Mp(e, t, r) {
6496
6513
  if (e?.reference) {
6497
6514
  const s = e.reference.split("/").pop();
6498
6515
  if (s) {
@@ -6506,7 +6523,7 @@ function qp(e, t, r) {
6506
6523
  );
6507
6524
  return n?.form ? n.form.text ?? n.form.coding?.[0]?.display ?? "" : "";
6508
6525
  }
6509
- function Mp(e) {
6526
+ function qp(e) {
6510
6527
  const t = e.entry?.filter((n) => {
6511
6528
  const s = n.resource;
6512
6529
  return s?.resourceType === "MedicationRequest" && !!s?.id;
@@ -6519,7 +6536,7 @@ function Mp(e) {
6519
6536
  s,
6520
6537
  n,
6521
6538
  r
6522
- ), c = qp(
6539
+ ), c = Mp(
6523
6540
  s,
6524
6541
  n,
6525
6542
  r
@@ -6556,7 +6573,7 @@ async function ow(e, t, r, n = !1) {
6556
6573
  r,
6557
6574
  n
6558
6575
  );
6559
- return Mp(s);
6576
+ return qp(s);
6560
6577
  }
6561
6578
  async function aw() {
6562
6579
  return await V(
@@ -7112,8 +7129,8 @@ function ee() {
7112
7129
  const { nodes: D } = this;
7113
7130
  let j = D.length;
7114
7131
  for (; j--; ) {
7115
- const q = D[j];
7116
- q.optimizeNames(v, O) || (te(v, q.names), D.splice(j, 1));
7132
+ const M = D[j];
7133
+ M.optimizeNames(v, O) || (te(v, M.names), D.splice(j, 1));
7117
7134
  }
7118
7135
  return D.length > 0 ? this : void 0;
7119
7136
  }
@@ -7188,8 +7205,8 @@ function ee() {
7188
7205
  super(), this.varKind = v, this.name = O, this.from = D, this.to = j;
7189
7206
  }
7190
7207
  render(v) {
7191
- const O = v.es5 ? r.varKinds.var : this.varKind, { name: D, from: j, to: q } = this;
7192
- return `for(${O} ${D}=${j}; ${D}<${q}; ${D}++)` + super.render(v);
7208
+ const O = v.es5 ? r.varKinds.var : this.varKind, { name: D, from: j, to: M } = this;
7209
+ return `for(${O} ${D}=${j}; ${D}<${M}; ${D}++)` + super.render(v);
7193
7210
  }
7194
7211
  get names() {
7195
7212
  const v = G(super.names, this.from);
@@ -7259,7 +7276,7 @@ function ee() {
7259
7276
  }
7260
7277
  }
7261
7278
  F.kind = "finally";
7262
- class M {
7279
+ class q {
7263
7280
  constructor(v, O = {}) {
7264
7281
  this._values = {}, this._blockStarts = [], this._constants = {}, this.opts = { ...O, _n: O.lines ? `
7265
7282
  ` : "" }, this._extScope = v, this._scope = new r.Scope({ parent: v }), this._nodes = [new g()];
@@ -7292,8 +7309,8 @@ function ee() {
7292
7309
  return this._extScope.scopeCode(this._values);
7293
7310
  }
7294
7311
  _def(v, O, D, j) {
7295
- const q = this._scope.toName(O);
7296
- return D !== void 0 && j && (this._constants[q.str] = D), this._leafNode(new a(v, q, D)), q;
7312
+ const M = this._scope.toName(O);
7313
+ return D !== void 0 && j && (this._constants[M.str] = D), this._leafNode(new a(v, M, D)), M;
7297
7314
  }
7298
7315
  // `const` declaration (`var` in es5 mode)
7299
7316
  const(v, O, D) {
@@ -7356,28 +7373,28 @@ function ee() {
7356
7373
  return this._for(new h(v), O);
7357
7374
  }
7358
7375
  // `for` statement for a range of values
7359
- forRange(v, O, D, j, q = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
7376
+ forRange(v, O, D, j, M = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
7360
7377
  const Q = this._scope.toName(v);
7361
- return this._for(new w(q, Q, O, D), () => j(Q));
7378
+ return this._for(new w(M, Q, O, D), () => j(Q));
7362
7379
  }
7363
7380
  // `for-of` statement (in es5 mode replace with a normal for loop)
7364
7381
  forOf(v, O, D, j = r.varKinds.const) {
7365
- const q = this._scope.toName(v);
7382
+ const M = this._scope.toName(v);
7366
7383
  if (this.opts.es5) {
7367
7384
  const Q = O instanceof t.Name ? O : this.var("_arr", O);
7368
7385
  return this.forRange("_i", 0, (0, t._)`${Q}.length`, (J) => {
7369
- this.var(q, (0, t._)`${Q}[${J}]`), D(q);
7386
+ this.var(M, (0, t._)`${Q}[${J}]`), D(M);
7370
7387
  });
7371
7388
  }
7372
- return this._for(new _("of", j, q, O), () => D(q));
7389
+ return this._for(new _("of", j, M, O), () => D(M));
7373
7390
  }
7374
7391
  // `for-in` statement.
7375
7392
  // With option `ownProperties` replaced with a `for-of` loop for object keys
7376
7393
  forIn(v, O, D, j = this.opts.es5 ? r.varKinds.var : r.varKinds.const) {
7377
7394
  if (this.opts.ownProperties)
7378
7395
  return this.forOf(v, (0, t._)`Object.keys(${O})`, D);
7379
- const q = this._scope.toName(v);
7380
- return this._for(new _("in", j, q, O), () => D(q));
7396
+ const M = this._scope.toName(v);
7397
+ return this._for(new _("in", j, M, O), () => D(M));
7381
7398
  }
7382
7399
  // end `for` loop
7383
7400
  endFor() {
@@ -7404,8 +7421,8 @@ function ee() {
7404
7421
  throw new Error('CodeGen: "try" without "catch" and "finally"');
7405
7422
  const j = new I();
7406
7423
  if (this._blockNode(j), this.code(v), O) {
7407
- const q = this.name("e");
7408
- this._currNode = j.catch = new x(q), O(q);
7424
+ const M = this.name("e");
7425
+ this._currNode = j.catch = new x(M), O(M);
7409
7426
  }
7410
7427
  return D && (this._currNode = j.finally = new F(), this.code(D)), this._endBlockNode(x, F);
7411
7428
  }
@@ -7469,7 +7486,7 @@ function ee() {
7469
7486
  O[O.length - 1] = v;
7470
7487
  }
7471
7488
  }
7472
- e.CodeGen = M;
7489
+ e.CodeGen = q;
7473
7490
  function H(P, v) {
7474
7491
  for (const O in v)
7475
7492
  P[O] = (P[O] || 0) + (v[O] || 0);
@@ -7483,13 +7500,13 @@ function ee() {
7483
7500
  return D(P);
7484
7501
  if (!j(P))
7485
7502
  return P;
7486
- return new t._Code(P._items.reduce((q, Q) => (Q instanceof t.Name && (Q = D(Q)), Q instanceof t._Code ? q.push(...Q._items) : q.push(Q), q), []));
7487
- function D(q) {
7488
- const Q = O[q.str];
7489
- return Q === void 0 || v[q.str] !== 1 ? q : (delete v[q.str], Q);
7503
+ return new t._Code(P._items.reduce((M, Q) => (Q instanceof t.Name && (Q = D(Q)), Q instanceof t._Code ? M.push(...Q._items) : M.push(Q), M), []));
7504
+ function D(M) {
7505
+ const Q = O[M.str];
7506
+ return Q === void 0 || v[M.str] !== 1 ? M : (delete v[M.str], Q);
7490
7507
  }
7491
- function j(q) {
7492
- return q instanceof t._Code && q._items.some((Q) => Q instanceof t.Name && v[Q.str] === 1 && O[Q.str] !== void 0);
7508
+ function j(M) {
7509
+ return M instanceof t._Code && M._items.some((Q) => Q instanceof t.Name && v[Q.str] === 1 && O[Q.str] !== void 0);
7493
7510
  }
7494
7511
  }
7495
7512
  function te(P, v) {
@@ -7596,8 +7613,8 @@ function ne() {
7596
7613
  }
7597
7614
  X.eachItem = y;
7598
7615
  function b({ mergeNames: _, mergeToName: E, mergeValues: R, resultToName: I }) {
7599
- return (x, F, M, H) => {
7600
- const G = M === void 0 ? F : M instanceof e.Name ? (F instanceof e.Name ? _(x, F, M) : E(x, F, M), M) : F instanceof e.Name ? (E(x, M, F), F) : R(F, M);
7616
+ return (x, F, q, H) => {
7617
+ const G = q === void 0 ? F : q instanceof e.Name ? (F instanceof e.Name ? _(x, F, q) : E(x, F, q), q) : F instanceof e.Name ? (E(x, q, F), F) : R(F, q);
7601
7618
  return H === e.Name && !(G instanceof e.Name) ? I(x, G) : G;
7602
7619
  };
7603
7620
  }
@@ -7765,8 +7782,8 @@ function Hr() {
7765
7782
  return u && (w = (0, t.str)`${w}${(0, r.getErrorPath)(u, r.Type.Str)}`), [d.schemaPath, w];
7766
7783
  }
7767
7784
  function g(f, { params: p, message: u }, h) {
7768
- const { keyword: w, data: _, schemaValue: E, it: R } = f, { opts: I, propertyName: x, topSchemaRef: F, schemaPath: M } = R;
7769
- h.push([d.keyword, w], [d.params, typeof p == "function" ? p(f) : p || (0, t._)`{}`]), I.messages && h.push([d.message, typeof u == "function" ? u(f) : u]), I.verbose && h.push([d.schema, E], [d.parentSchema, (0, t._)`${F}${M}`], [n.default.data, _]), x && h.push([d.propertyName, x]);
7785
+ const { keyword: w, data: _, schemaValue: E, it: R } = f, { opts: I, propertyName: x, topSchemaRef: F, schemaPath: q } = R;
7786
+ h.push([d.keyword, w], [d.params, typeof p == "function" ? p(f) : p || (0, t._)`{}`]), I.messages && h.push([d.message, typeof u == "function" ? u(f) : u]), I.verbose && h.push([d.schema, E], [d.parentSchema, (0, t._)`${F}${q}`], [n.default.data, _]), x && h.push([d.propertyName, x]);
7770
7787
  }
7771
7788
  })(fn)), fn;
7772
7789
  }
@@ -7894,13 +7911,13 @@ function Dr() {
7894
7911
  function m(u, h, w) {
7895
7912
  const { gen: _, data: E, opts: R } = u, I = _.let("dataType", (0, n._)`typeof ${E}`), x = _.let("coerced", (0, n._)`undefined`);
7896
7913
  R.coerceTypes === "array" && _.if((0, n._)`${I} == 'object' && Array.isArray(${E}) && ${E}.length == 1`, () => _.assign(E, (0, n._)`${E}[0]`).assign(I, (0, n._)`typeof ${E}`).if(S(h, E, R.strictNumbers), () => _.assign(x, E))), _.if((0, n._)`${x} !== undefined`);
7897
- for (const M of w)
7898
- (l.has(M) || M === "array" && R.coerceTypes === "array") && F(M);
7914
+ for (const q of w)
7915
+ (l.has(q) || q === "array" && R.coerceTypes === "array") && F(q);
7899
7916
  _.else(), f(u), _.endIf(), _.if((0, n._)`${x} !== undefined`, () => {
7900
7917
  _.assign(E, x), y(u, x);
7901
7918
  });
7902
- function F(M) {
7903
- switch (M) {
7919
+ function F(q) {
7920
+ switch (q) {
7904
7921
  case "string":
7905
7922
  _.elseIf((0, n._)`${I} == "number" || ${I} == "boolean"`).assign(x, (0, n._)`"" + ${E}`).elseIf((0, n._)`${E} === null`).assign(x, (0, n._)`""`);
7906
7923
  return;
@@ -8072,8 +8089,8 @@ function $e() {
8072
8089
  return m(h).filter((w) => !(0, t.alwaysValidSchema)(u, h[w]));
8073
8090
  }
8074
8091
  oe.schemaProperties = y;
8075
- function b({ schemaCode: u, data: h, it: { gen: w, topSchemaRef: _, schemaPath: E, errorPath: R }, it: I }, x, F, M) {
8076
- const H = M ? (0, e._)`${u}, ${h}, ${_}${E}` : h, G = [
8092
+ function b({ schemaCode: u, data: h, it: { gen: w, topSchemaRef: _, schemaPath: E, errorPath: R }, it: I }, x, F, q) {
8093
+ const H = q ? (0, e._)`${u}, ${h}, ${_}${E}` : h, G = [
8077
8094
  [r.default.instancePath, (0, e.strConcat)(r.default.instancePath, R)],
8078
8095
  [r.default.parentData, I.parentData],
8079
8096
  [r.default.parentDataProperty, I.parentDataProperty],
@@ -8103,10 +8120,10 @@ function $e() {
8103
8120
  return h.var(R, !0), I(() => h.break()), R;
8104
8121
  function I(x) {
8105
8122
  const F = h.const("len", (0, e._)`${w}.length`);
8106
- h.forRange("i", 0, F, (M) => {
8123
+ h.forRange("i", 0, F, (q) => {
8107
8124
  u.subschema({
8108
8125
  keyword: _,
8109
- dataProp: M,
8126
+ dataProp: q,
8110
8127
  dataPropType: t.Type.Num
8111
8128
  }, R), h.if((0, e.not)(R), x);
8112
8129
  });
@@ -8120,10 +8137,10 @@ function $e() {
8120
8137
  if (w.some((F) => (0, t.alwaysValidSchema)(E, F)) && !E.opts.unevaluated)
8121
8138
  return;
8122
8139
  const I = h.let("valid", !1), x = h.name("_valid");
8123
- h.block(() => w.forEach((F, M) => {
8140
+ h.block(() => w.forEach((F, q) => {
8124
8141
  const H = u.subschema({
8125
8142
  keyword: _,
8126
- schemaProp: M,
8143
+ schemaProp: q,
8127
8144
  compositeRule: !0
8128
8145
  }, x);
8129
8146
  h.assign(I, (0, e._)`${I} || ${x}`), u.mergeValidEvaluated(H, x) || h.if((0, e.not)(I));
@@ -8157,7 +8174,7 @@ function nh() {
8157
8174
  y.block$data(R, I), y.ok((S = b.valid) !== null && S !== void 0 ? S : R);
8158
8175
  function I() {
8159
8176
  if (b.errors === !1)
8160
- M(), b.modifying && a(y), H(() => y.error());
8177
+ q(), b.modifying && a(y), H(() => y.error());
8161
8178
  else {
8162
8179
  const G = b.async ? x() : F();
8163
8180
  b.modifying && a(y), H(() => i(y, G));
@@ -8165,13 +8182,13 @@ function nh() {
8165
8182
  }
8166
8183
  function x() {
8167
8184
  const G = g.let("ruleErrs", null);
8168
- return g.try(() => M((0, e._)`await `), (K) => g.assign(R, !1).if((0, e._)`${K} instanceof ${w.ValidationError}`, () => g.assign(G, (0, e._)`${K}.errors`), () => g.throw(K))), G;
8185
+ return g.try(() => q((0, e._)`await `), (K) => g.assign(R, !1).if((0, e._)`${K} instanceof ${w.ValidationError}`, () => g.assign(G, (0, e._)`${K}.errors`), () => g.throw(K))), G;
8169
8186
  }
8170
8187
  function F() {
8171
8188
  const G = (0, e._)`${E}.errors`;
8172
- return g.assign(G, null), M(e.nil), G;
8189
+ return g.assign(G, null), q(e.nil), G;
8173
8190
  }
8174
- function M(G = b.async ? (0, e._)`await ` : e.nil) {
8191
+ function q(G = b.async ? (0, e._)`await ` : e.nil) {
8175
8192
  const K = w.opts.passContext ? t.default.this : t.default.self, te = !("compile" in b && !h || b.schema === !1);
8176
8193
  g.assign(R, (0, e._)`${G}${(0, r.callValidateCode)(y, E, K, te)}`, b.modifying);
8177
8194
  }
@@ -8456,12 +8473,12 @@ function zr() {
8456
8473
  if (typeof g == "boolean")
8457
8474
  return {};
8458
8475
  const { schemaId: p, uriResolver: u } = this.opts, h = m(g[p] || f), w = { "": h }, _ = c(u, h, !1), E = {}, R = /* @__PURE__ */ new Set();
8459
- return r(g, { allKeys: !0 }, (F, M, H, G) => {
8476
+ return r(g, { allKeys: !0 }, (F, q, H, G) => {
8460
8477
  if (G === void 0)
8461
8478
  return;
8462
- const K = _ + M;
8479
+ const K = _ + q;
8463
8480
  let te = w[G];
8464
- typeof F[p] == "string" && (te = le.call(this, F[p])), me.call(this, F.$anchor), me.call(this, F.$dynamicAnchor), w[M] = te;
8481
+ typeof F[p] == "string" && (te = le.call(this, F[p])), me.call(this, F.$anchor), me.call(this, F.$dynamicAnchor), w[q] = te;
8465
8482
  function le(re) {
8466
8483
  const se = this.opts.uriResolver.resolve;
8467
8484
  if (re = m(te ? se(te, re) : re), R.has(re))
@@ -8478,8 +8495,8 @@ function zr() {
8478
8495
  }
8479
8496
  }
8480
8497
  }), E;
8481
- function I(F, M, H) {
8482
- if (M !== void 0 && !t(F, M))
8498
+ function I(F, q, H) {
8499
+ if (q !== void 0 && !t(F, q))
8483
8500
  throw x(H);
8484
8501
  }
8485
8502
  function x(F) {
@@ -8550,7 +8567,7 @@ function Gr() {
8550
8567
  }
8551
8568
  function E(T, $) {
8552
8569
  const { schema: C, gen: U, opts: z } = T;
8553
- z.$comment && C.$comment && G(T), M(T), H(T);
8570
+ z.$comment && C.$comment && G(T), q(T), H(T);
8554
8571
  const Z = U.const("_errs", c.default.errors);
8555
8572
  I(T, Z), U.var($, (0, i._)`${Z} === ${c.default.errors}`);
8556
8573
  }
@@ -8571,7 +8588,7 @@ function Gr() {
8571
8588
  const { schema: $, opts: C } = T;
8572
8589
  $.default !== void 0 && C.useDefaults && C.strictSchema && (0, d.checkStrictMode)(T, "default is ignored in the schema root");
8573
8590
  }
8574
- function M(T) {
8591
+ function q(T) {
8575
8592
  const $ = T.schema[T.opts.schemaId];
8576
8593
  $ && (T.baseId = (0, l.resolveUrl)(T.opts.uriResolver, T.baseId, $));
8577
8594
  }
@@ -8766,13 +8783,13 @@ function Gr() {
8766
8783
  const z = new D(T, C, $);
8767
8784
  "code" in C ? C.code(z, U) : z.$data && C.validate ? (0, o.funcKeywordCode)(z, C) : "macro" in C ? (0, o.macroKeywordCode)(z, C) : (C.compile || C.validate) && (0, o.funcKeywordCode)(z, C);
8768
8785
  }
8769
- const q = /^\/(?:[^~]|~0|~1)*$/, Q = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
8786
+ const M = /^\/(?:[^~]|~0|~1)*$/, Q = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
8770
8787
  function J(T, { dataLevel: $, dataNames: C, dataPathArr: U }) {
8771
8788
  let z, Z;
8772
8789
  if (T === "")
8773
8790
  return c.default.rootData;
8774
8791
  if (T[0] === "/") {
8775
- if (!q.test(T))
8792
+ if (!M.test(T))
8776
8793
  throw new Error(`Invalid JSON-pointer: ${T}`);
8777
8794
  z = T, Z = c.default.rootData;
8778
8795
  } else {
@@ -8812,17 +8829,17 @@ function Wn() {
8812
8829
  }
8813
8830
  return Ut.default = e, Ut;
8814
8831
  }
8815
- var qt = {}, lo;
8832
+ var Mt = {}, lo;
8816
8833
  function Kr() {
8817
- if (lo) return qt;
8818
- lo = 1, Object.defineProperty(qt, "__esModule", { value: !0 });
8834
+ if (lo) return Mt;
8835
+ lo = 1, Object.defineProperty(Mt, "__esModule", { value: !0 });
8819
8836
  const e = zr();
8820
8837
  class t extends Error {
8821
8838
  constructor(n, s, o, a) {
8822
8839
  super(a || `can't resolve reference ${o} from id ${s}`), this.missingRef = (0, e.resolveUrl)(n, s, o), this.missingSchema = (0, e.normalizeId)((0, e.getFullPath)(n, this.missingRef));
8823
8840
  }
8824
8841
  }
8825
- return qt.default = t, qt;
8842
+ return Mt.default = t, Mt;
8826
8843
  }
8827
8844
  var be = {}, fo;
8828
8845
  function Jn() {
@@ -8878,10 +8895,10 @@ function Jn() {
8878
8895
  let F;
8879
8896
  try {
8880
8897
  this._compilations.add(f), (0, o.validateFunctionCode)(x), E.optimize(this.opts.code.optimize);
8881
- const M = E.toString();
8882
- F = `${E.scopeRefs(r.default.scope)}return ${M}`, this.opts.code.process && (F = this.opts.code.process(F, f));
8898
+ const q = E.toString();
8899
+ F = `${E.scopeRefs(r.default.scope)}return ${q}`, this.opts.code.process && (F = this.opts.code.process(F, f));
8883
8900
  const G = new Function(`${r.default.self}`, `${r.default.scope}`, F)(this, this.scope.get());
8884
- if (this.scope.value(I, { ref: G }), G.errors = null, G.schema = f.schema, G.schemaEnv = f, f.$async && (G.$async = !0), this.opts.code.source === !0 && (G.source = { validateName: I, validateCode: M, scopeValues: E._values }), this.opts.unevaluated) {
8901
+ if (this.scope.value(I, { ref: G }), G.errors = null, G.schema = f.schema, G.schemaEnv = f, f.$async && (G.$async = !0), this.opts.code.source === !0 && (G.source = { validateName: I, validateCode: q, scopeValues: E._values }), this.opts.unevaluated) {
8885
8902
  const { props: K, items: te } = x;
8886
8903
  G.evaluated = {
8887
8904
  props: K instanceof e.Name ? void 0 : K,
@@ -8891,8 +8908,8 @@ function Jn() {
8891
8908
  }, G.source && (G.source.evaluated = (0, e.stringify)(G.evaluated));
8892
8909
  }
8893
8910
  return f.validate = G, f;
8894
- } catch (M) {
8895
- throw delete f.validate, delete f.validateName, F && this.logger.error("Error compiling schema, function code:", F), M;
8911
+ } catch (q) {
8912
+ throw delete f.validate, delete f.validateName, F && this.logger.error("Error compiling schema, function code:", F), q;
8896
8913
  } finally {
8897
8914
  this._compilations.delete(f);
8898
8915
  }
@@ -8990,7 +9007,7 @@ const ah = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/
8990
9007
  properties: lh,
8991
9008
  additionalProperties: dh
8992
9009
  };
8993
- var Mt = {}, wt = { exports: {} }, wn, po;
9010
+ var qt = {}, wt = { exports: {} }, wn, po;
8994
9011
  function ph() {
8995
9012
  return po || (po = 1, wn = {
8996
9013
  HEX: {
@@ -9347,10 +9364,10 @@ function gh() {
9347
9364
  }
9348
9365
  var yo;
9349
9366
  function yh() {
9350
- if (yo) return Mt;
9351
- yo = 1, Object.defineProperty(Mt, "__esModule", { value: !0 });
9367
+ if (yo) return qt;
9368
+ yo = 1, Object.defineProperty(qt, "__esModule", { value: !0 });
9352
9369
  const e = gh();
9353
- return e.code = 'require("ajv/dist/runtime/uri").default', Mt.default = e, Mt;
9370
+ return e.code = 'require("ajv/dist/runtime/uri").default', qt.default = e, qt;
9354
9371
  }
9355
9372
  var wo;
9356
9373
  function wh() {
@@ -9412,11 +9429,11 @@ function wh() {
9412
9429
  unicode: '"minLength"/"maxLength" account for unicode characters by default.'
9413
9430
  }, u = 200;
9414
9431
  function h(k) {
9415
- var A, L, P, v, O, D, j, q, Q, J, T, $, C, U, z, Z, fe, Ae, ve, Ee, pe, Ye, Se, Yr, Wr;
9432
+ var A, L, P, v, O, D, j, M, Q, J, T, $, C, U, z, Z, fe, Ae, ve, Ee, pe, Ye, Se, Yr, Wr;
9416
9433
  const dt = k.strict, Jr = (A = k.code) === null || A === void 0 ? void 0 : A.optimize, Zn = Jr === !0 || Jr === void 0 ? 1 : Jr || 0, es = (P = (L = k.code) === null || L === void 0 ? void 0 : L.regExp) !== null && P !== void 0 ? P : b, mi = (v = k.uriResolver) !== null && v !== void 0 ? v : y.default;
9417
9434
  return {
9418
9435
  strictSchema: (D = (O = k.strictSchema) !== null && O !== void 0 ? O : dt) !== null && D !== void 0 ? D : !0,
9419
- strictNumbers: (q = (j = k.strictNumbers) !== null && j !== void 0 ? j : dt) !== null && q !== void 0 ? q : !0,
9436
+ strictNumbers: (M = (j = k.strictNumbers) !== null && j !== void 0 ? j : dt) !== null && M !== void 0 ? M : !0,
9420
9437
  strictTypes: (J = (Q = k.strictTypes) !== null && Q !== void 0 ? Q : dt) !== null && J !== void 0 ? J : "log",
9421
9438
  strictTuples: ($ = (T = k.strictTuples) !== null && T !== void 0 ? T : dt) !== null && $ !== void 0 ? $ : "log",
9422
9439
  strictRequired: (U = (C = k.strictRequired) !== null && C !== void 0 ? C : dt) !== null && U !== void 0 ? U : !1,
@@ -9488,14 +9505,14 @@ function wh() {
9488
9505
  } catch (T) {
9489
9506
  if (!(T instanceof s.default))
9490
9507
  throw T;
9491
- return j.call(this, T), await q.call(this, T.missingSchema), D.call(this, J);
9508
+ return j.call(this, T), await M.call(this, T.missingSchema), D.call(this, J);
9492
9509
  }
9493
9510
  }
9494
9511
  function j({ missingSchema: J, missingRef: T }) {
9495
9512
  if (this.refs[J])
9496
9513
  throw new Error(`AnySchema ${J} is loaded but ${T} cannot be resolved`);
9497
9514
  }
9498
- async function q(J) {
9515
+ async function M(J) {
9499
9516
  const T = await Q.call(this, J);
9500
9517
  this.refs[J] || await O.call(this, T.$schema), this.refs[J] || this.addSchema(T, J, L);
9501
9518
  }
@@ -9642,10 +9659,10 @@ function wh() {
9642
9659
  for (const j of O)
9643
9660
  D = D[j];
9644
9661
  for (const j in P) {
9645
- const q = P[j];
9646
- if (typeof q != "object")
9662
+ const M = P[j];
9663
+ if (typeof M != "object")
9647
9664
  continue;
9648
- const { $data: Q } = q.definition, J = D[j];
9665
+ const { $data: Q } = M.definition, J = D[j];
9649
9666
  Q && J && (D[j] = se(J));
9650
9667
  }
9651
9668
  }
@@ -9668,12 +9685,12 @@ function wh() {
9668
9685
  if (typeof A != "boolean")
9669
9686
  throw new Error("schema must be object or boolean");
9670
9687
  }
9671
- let q = this._cache.get(A);
9672
- if (q !== void 0)
9673
- return q;
9688
+ let M = this._cache.get(A);
9689
+ if (M !== void 0)
9690
+ return M;
9674
9691
  P = (0, c.normalizeId)(D || P);
9675
9692
  const Q = c.getSchemaRefs.call(this, A, P);
9676
- return q = new a.SchemaEnv({ schema: A, schemaId: j, meta: L, baseId: P, localRefs: Q }), this._cache.set(q.schema, q), O && !P.startsWith("#") && (P && this._checkUnique(P), this.refs[P] = q), v && this.validateSchema(A, !0), q;
9693
+ return M = new a.SchemaEnv({ schema: A, schemaId: j, meta: L, baseId: P, localRefs: Q }), this._cache.set(M.schema, M), O && !P.startsWith("#") && (P && this._checkUnique(P), this.refs[P] = M), v && this.validateSchema(A, !0), M;
9677
9694
  }
9678
9695
  _checkUnique(A) {
9679
9696
  if (this.schemas[A] || this.refs[A])
@@ -9736,13 +9753,13 @@ function wh() {
9736
9753
  delete k[A];
9737
9754
  return k;
9738
9755
  }
9739
- const M = { log() {
9756
+ const q = { log() {
9740
9757
  }, warn() {
9741
9758
  }, error() {
9742
9759
  } };
9743
9760
  function H(k) {
9744
9761
  if (k === !1)
9745
- return M;
9762
+ return q;
9746
9763
  if (k === void 0)
9747
9764
  return console;
9748
9765
  if (k.log && k.warn && k.error)
@@ -9766,7 +9783,7 @@ function wh() {
9766
9783
  if (L && v)
9767
9784
  throw new Error('keyword with "post" flag cannot have "type"');
9768
9785
  const { RULES: O } = this;
9769
- let D = v ? O.post : O.rules.find(({ type: q }) => q === L);
9786
+ let D = v ? O.post : O.rules.find(({ type: M }) => M === L);
9770
9787
  if (D || (D = { type: L, rules: [] }, O.rules.push(D)), O.keywords[k] = !0, !A)
9771
9788
  return;
9772
9789
  const j = {
@@ -9777,7 +9794,7 @@ function wh() {
9777
9794
  schemaType: (0, l.getJSONTypes)(A.schemaType)
9778
9795
  }
9779
9796
  };
9780
- A.before ? le.call(this, D, j, A.before) : D.rules.push(j), O.all[k] = j, (P = A.implements) === null || P === void 0 || P.forEach((q) => this.addKeyword(q));
9797
+ A.before ? le.call(this, D, j, A.before) : D.rules.push(j), O.all[k] = j, (P = A.implements) === null || P === void 0 || P.forEach((M) => this.addKeyword(M));
9781
9798
  }
9782
9799
  function le(k, A, L) {
9783
9800
  const P = k.rules.findIndex((v) => v.keyword === L);
@@ -9807,10 +9824,10 @@ function vh() {
9807
9824
  };
9808
9825
  return Vt.default = e, Vt;
9809
9826
  }
9810
- var qe = {}, Eo;
9827
+ var Me = {}, Eo;
9811
9828
  function Eh() {
9812
- if (Eo) return qe;
9813
- Eo = 1, Object.defineProperty(qe, "__esModule", { value: !0 }), qe.callRef = qe.getValidate = void 0;
9829
+ if (Eo) return Me;
9830
+ Eo = 1, Object.defineProperty(Me, "__esModule", { value: !0 }), Me.callRef = Me.getValidate = void 0;
9814
9831
  const e = Kr(), t = $e(), r = ee(), n = Fe(), s = Jn(), o = ne(), a = {
9815
9832
  keyword: "$ref",
9816
9833
  schemaType: "string",
@@ -9850,7 +9867,7 @@ function Eh() {
9850
9867
  const { gen: m } = l;
9851
9868
  return d.validate ? m.scopeValue("validate", { ref: d.validate }) : (0, r._)`${m.scopeValue("wrapper", { ref: d })}.validate`;
9852
9869
  }
9853
- qe.getValidate = i;
9870
+ Me.getValidate = i;
9854
9871
  function c(l, d, m, y) {
9855
9872
  const { gen: b, it: S } = l, { allErrors: g, schemaEnv: f, opts: p } = S, u = p.passContext ? n.default.this : r.nil;
9856
9873
  y ? h() : w();
@@ -9892,7 +9909,7 @@ function Eh() {
9892
9909
  }
9893
9910
  }
9894
9911
  }
9895
- return qe.callRef = c, qe.default = a, qe;
9912
+ return Me.callRef = c, Me.default = a, Me;
9896
9913
  }
9897
9914
  var _o;
9898
9915
  function _h() {
@@ -10338,10 +10355,10 @@ function Lh() {
10338
10355
  };
10339
10356
  return nr.default = t, nr;
10340
10357
  }
10341
- var sr = {}, qo;
10358
+ var sr = {}, Mo;
10342
10359
  function kh() {
10343
- if (qo) return sr;
10344
- qo = 1, Object.defineProperty(sr, "__esModule", { value: !0 });
10360
+ if (Mo) return sr;
10361
+ Mo = 1, Object.defineProperty(sr, "__esModule", { value: !0 });
10345
10362
  const e = ee(), t = ne(), r = $e(), n = oi(), o = {
10346
10363
  keyword: "items",
10347
10364
  type: "array",
@@ -10358,10 +10375,10 @@ function kh() {
10358
10375
  };
10359
10376
  return sr.default = o, sr;
10360
10377
  }
10361
- var or = {}, Mo;
10378
+ var or = {}, qo;
10362
10379
  function xh() {
10363
- if (Mo) return or;
10364
- Mo = 1, Object.defineProperty(or, "__esModule", { value: !0 });
10380
+ if (qo) return or;
10381
+ qo = 1, Object.defineProperty(or, "__esModule", { value: !0 });
10365
10382
  const e = ee(), t = ne(), n = {
10366
10383
  keyword: "contains",
10367
10384
  type: "array",
@@ -10489,7 +10506,7 @@ function Uh() {
10489
10506
  })(_n)), _n;
10490
10507
  }
10491
10508
  var ar = {}, jo;
10492
- function qh() {
10509
+ function Mh() {
10493
10510
  if (jo) return ar;
10494
10511
  jo = 1, Object.defineProperty(ar, "__esModule", { value: !0 });
10495
10512
  const e = ee(), t = ne(), n = {
@@ -10592,7 +10609,7 @@ function ii() {
10592
10609
  return ir.default = o, ir;
10593
10610
  }
10594
10611
  var cr = {}, Bo;
10595
- function Mh() {
10612
+ function qh() {
10596
10613
  if (Bo) return cr;
10597
10614
  Bo = 1, Object.defineProperty(cr, "__esModule", { value: !0 });
10598
10615
  const e = Gr(), t = $e(), r = ne(), n = ii(), s = {
@@ -10828,7 +10845,7 @@ var Xo;
10828
10845
  function Kh() {
10829
10846
  if (Xo) return rr;
10830
10847
  Xo = 1, Object.defineProperty(rr, "__esModule", { value: !0 });
10831
- const e = oi(), t = Lh(), r = ai(), n = kh(), s = xh(), o = Uh(), a = qh(), i = ii(), c = Mh(), l = Fh(), d = jh(), m = Vh(), y = Bh(), b = Hh(), S = zh(), g = Gh();
10848
+ const e = oi(), t = Lh(), r = ai(), n = kh(), s = xh(), o = Uh(), a = Mh(), i = ii(), c = qh(), l = Fh(), d = jh(), m = Vh(), y = Bh(), b = Hh(), S = zh(), g = Gh();
10832
10849
  function f(p = !1) {
10833
10850
  const u = [
10834
10851
  // any
@@ -11004,8 +11021,8 @@ function Zh() {
11004
11021
  var w;
11005
11022
  const _ = {}, E = I(m);
11006
11023
  let R = !0;
11007
- for (let M = 0; M < b.length; M++) {
11008
- let H = b[M];
11024
+ for (let q = 0; q < b.length; q++) {
11025
+ let H = b[q];
11009
11026
  if (H?.$ref && !(0, s.schemaHasRulesButRef)(H, y.self.RULES)) {
11010
11027
  const K = H.$ref;
11011
11028
  if (H = r.resolveRef.call(y.self, y.schemaEnv.root, y.baseId, K), H instanceof r.SchemaEnv && (H = H.schema), H === void 0)
@@ -11014,27 +11031,27 @@ function Zh() {
11014
11031
  const G = (w = H?.properties) === null || w === void 0 ? void 0 : w[S];
11015
11032
  if (typeof G != "object")
11016
11033
  throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${S}"`);
11017
- R = R && (E || I(H)), x(G, M);
11034
+ R = R && (E || I(H)), x(G, q);
11018
11035
  }
11019
11036
  if (!R)
11020
11037
  throw new Error(`discriminator: "${S}" must be required`);
11021
11038
  return _;
11022
- function I({ required: M }) {
11023
- return Array.isArray(M) && M.includes(S);
11039
+ function I({ required: q }) {
11040
+ return Array.isArray(q) && q.includes(S);
11024
11041
  }
11025
- function x(M, H) {
11026
- if (M.const)
11027
- F(M.const, H);
11028
- else if (M.enum)
11029
- for (const G of M.enum)
11042
+ function x(q, H) {
11043
+ if (q.const)
11044
+ F(q.const, H);
11045
+ else if (q.enum)
11046
+ for (const G of q.enum)
11030
11047
  F(G, H);
11031
11048
  else
11032
11049
  throw new Error(`discriminator: "properties/${S}" must have "const" or "enum"`);
11033
11050
  }
11034
- function F(M, H) {
11035
- if (typeof M != "string" || M in _)
11051
+ function F(q, H) {
11052
+ if (typeof q != "string" || q in _)
11036
11053
  throw new Error(`discriminator: "${S}" values must be unique strings`);
11037
- _[M] = H;
11054
+ _[q] = H;
11038
11055
  }
11039
11056
  }
11040
11057
  }
@@ -11332,7 +11349,7 @@ const bn = /* @__PURE__ */ new Map(), Im = async (e) => {
11332
11349
  schema: n,
11333
11350
  translations: l
11334
11351
  };
11335
- }, qw = async (e, t, r) => {
11352
+ }, Mw = async (e, t, r) => {
11336
11353
  let n;
11337
11354
  t && t.length > 0 && (n = t.join(","));
11338
11355
  const s = mm(e, r, n), o = await V(s);
@@ -11377,7 +11394,7 @@ function li(e, t) {
11377
11394
  };
11378
11395
  return n(r.controls);
11379
11396
  }
11380
- function Mw(e, t) {
11397
+ function qw(e, t) {
11381
11398
  if (!e.controls || e.controls.length === 0)
11382
11399
  return [];
11383
11400
  const r = [], n = (/* @__PURE__ */ new Date()).toISOString();
@@ -11520,9 +11537,9 @@ const Um = W + "/bahmnicore/diseaseSummaryData?", Hw = async (e, t, r, n) => {
11520
11537
  });
11521
11538
  const o = Um + s.toString();
11522
11539
  return V(o);
11523
- }, Qn = "custom:(uuid,episodeUuid,patient,program,display,dateEnrolled,dateCompleted,location,voided,allowedStates,outcome,states:(uuid,startDate,endDate,voided,state:(uuid,concept:(uuid,display,name,names)),auditInfo),auditInfo,attributes)", qm = (e) => `${W}/bahmniprogramenrollment?patient=${e}&v=${Qn}`, Mm = (e, t = 15, r = 0) => `${W}/bahmniprogramenrollment?patient=${e}&v=${Qn}&limit=${t}&startIndex=${r}&totalCount=true`, fi = (e) => `${W}/bahmniprogramenrollment/${e}`, Fm = (e) => `${fi(e)}?v=${Qn}`, zw = async (e) => await V(qm(e)), Gw = async (e, t = 15, r = 1) => {
11540
+ }, Qn = "custom:(uuid,episodeUuid,patient,program,display,dateEnrolled,dateCompleted,location,voided,allowedStates,outcome,states:(uuid,startDate,endDate,voided,state:(uuid,concept:(uuid,display,name,names)),auditInfo),auditInfo,attributes)", Mm = (e) => `${W}/bahmniprogramenrollment?patient=${e}&v=${Qn}`, qm = (e, t = 15, r = 0) => `${W}/bahmniprogramenrollment?patient=${e}&v=${Qn}&limit=${t}&startIndex=${r}&totalCount=true`, fi = (e) => `${W}/bahmniprogramenrollment/${e}`, Fm = (e) => `${fi(e)}?v=${Qn}`, zw = async (e) => await V(Mm(e)), Gw = async (e, t = 15, r = 1) => {
11524
11541
  const n = (r - 1) * t, s = await V(
11525
- Mm(e, t, n)
11542
+ qm(e, t, n)
11526
11543
  );
11527
11544
  return {
11528
11545
  programs: s.results,
@@ -11699,7 +11716,7 @@ export {
11699
11716
  up as DATETIME_REGEX_PATTERN,
11700
11717
  Zy as DATE_REGEX_PATTERN,
11701
11718
  Ja as DEFAULT_DATE_FORMAT,
11702
- Mf as DEFAULT_DATE_FORMAT_STORAGE_KEY,
11719
+ qf as DEFAULT_DATE_FORMAT_STORAGE_KEY,
11703
11720
  Ff as DEFAULT_TIME_FORMAT,
11704
11721
  Bf as DURATION_UNIT_TO_DAYS,
11705
11722
  jy as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
@@ -11743,12 +11760,12 @@ export {
11743
11760
  Dy as doDateRangesOverlap,
11744
11761
  Jw as extractAttributes,
11745
11762
  Bw as extractNotesFromFormData,
11746
- qy as fetchAndFormatAllergenConcepts,
11763
+ My as fetchAndFormatAllergenConcepts,
11747
11764
  Uw as fetchFormMetadata,
11748
11765
  aw as fetchMedicationOrdersMetadata,
11749
11766
  xw as fetchObservationForms,
11750
11767
  fw as fetchQualityAssessment,
11751
- My as fetchReactionConcepts,
11768
+ qy as fetchReactionConcepts,
11752
11769
  Ig as filterReplacementEntries,
11753
11770
  Iw as findActiveEncounterInSession,
11754
11771
  Ny as formatDateDistance,
@@ -11763,18 +11780,18 @@ export {
11763
11780
  _y as getAllAppointmentServices,
11764
11781
  op as getAllergies,
11765
11782
  Ey as getAppointmentById,
11766
- Mg as getAvailableLocations,
11783
+ qg as getAvailableLocations,
11767
11784
  _w as getCategoryUuidFromOrderTypes,
11768
11785
  xy as getConceptById,
11769
11786
  rw as getConditionPage,
11770
11787
  tw as getConditions,
11771
11788
  Rw as getConfig,
11772
- qa as getCookieByName,
11789
+ Ma as getCookieByName,
11773
11790
  Nw as getCurrentProvider,
11774
11791
  Ww as getCurrentStateName,
11775
11792
  Ug as getCurrentUser,
11776
11793
  Lw as getCurrentUserPrivileges,
11777
- qg as getDefaultDateFormat,
11794
+ Mg as getDefaultDateFormat,
11778
11795
  sw as getDiagnosesPage,
11779
11796
  mw as getDiagnosticReportBundle,
11780
11797
  hw as getDiagnosticReports,
@@ -11802,7 +11819,7 @@ export {
11802
11819
  Ry as getPastAppointmentsPage,
11803
11820
  Ll as getPatientById,
11804
11821
  nw as getPatientDiagnoses,
11805
- qw as getPatientFormData,
11822
+ Mw as getPatientFormData,
11806
11823
  Gg as getPatientImageAsDataUrl,
11807
11824
  rv as getPatientImmunizations,
11808
11825
  Np as getPatientMedicationBundle,
@@ -11864,7 +11881,7 @@ export {
11864
11881
  $w as shouldEnableEncounterFilter,
11865
11882
  Cy as sortByDate,
11866
11883
  jw as transformContainerObservationsToForm2Observations,
11867
- Mw as transformFormDataToObservations,
11884
+ qw as transformFormDataToObservations,
11868
11885
  Fw as transformObservationsToFormData,
11869
11886
  vy as updateAppointmentStatus,
11870
11887
  gw as updateDiagnosticReportBundle,