@bahmni/services 0.0.1-dev.226 → 0.0.1-dev.229

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
@@ -1,15 +1,15 @@
1
1
  import { initReactI18next as vi } from "react-i18next";
2
- import { useTranslation as tw } from "react-i18next";
2
+ import { useTranslation as ew } from "react-i18next";
3
3
  import { useRef as bn, useCallback as Wr, useEffect as _n } from "react";
4
4
  function aa(e, t) {
5
5
  return function() {
6
6
  return e.apply(t, arguments);
7
7
  };
8
8
  }
9
- const { toString: wi } = Object.prototype, { getPrototypeOf: Cn } = Object, { iterator: Cr, toStringTag: ia } = Symbol, Dr = /* @__PURE__ */ ((e) => (t) => {
9
+ const { toString: wi } = Object.prototype, { getPrototypeOf: Dn } = Object, { iterator: Dr, toStringTag: ia } = Symbol, Cr = /* @__PURE__ */ ((e) => (t) => {
10
10
  const r = wi.call(t);
11
11
  return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
12
- })(/* @__PURE__ */ Object.create(null)), $e = (e) => (e = e.toLowerCase(), (t) => Dr(t) === e), Lr = (e) => (t) => typeof t === e, { isArray: ct } = Array, ot = Lr("undefined");
12
+ })(/* @__PURE__ */ Object.create(null)), $e = (e) => (e = e.toLowerCase(), (t) => Cr(t) === e), Lr = (e) => (t) => typeof t === e, { isArray: ct } = Array, ot = Lr("undefined");
13
13
  function Rt(e) {
14
14
  return e !== null && !ot(e) && e.constructor !== null && !ot(e.constructor) && Ee(e.constructor.isBuffer) && e.constructor.isBuffer(e);
15
15
  }
@@ -19,10 +19,10 @@ function Ei(e) {
19
19
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ca(e.buffer), t;
20
20
  }
21
21
  const bi = Lr("string"), Ee = Lr("function"), ua = Lr("number"), Tt = (e) => e !== null && typeof e == "object", _i = (e) => e === !0 || e === !1, vr = (e) => {
22
- if (Dr(e) !== "object")
22
+ if (Cr(e) !== "object")
23
23
  return !1;
24
- const t = Cn(e);
25
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ia in e) && !(Cr in e);
24
+ const t = Dn(e);
25
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ia in e) && !(Dr in e);
26
26
  }, Si = (e) => {
27
27
  if (!Tt(e) || Rt(e))
28
28
  return !1;
@@ -35,11 +35,11 @@ const bi = Lr("string"), Ee = Lr("function"), ua = Lr("number"), Tt = (e) => e !
35
35
  function Ii() {
36
36
  return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
37
37
  }
38
- const Xn = Ii(), Zn = typeof Xn.FormData < "u" ? Xn.FormData : void 0, Ci = (e) => {
38
+ const Xn = Ii(), Zn = typeof Xn.FormData < "u" ? Xn.FormData : void 0, Di = (e) => {
39
39
  let t;
40
- return e && (Zn && e instanceof Zn || Ee(e.append) && ((t = Dr(e)) === "formdata" || // detect form-data instance
40
+ return e && (Zn && e instanceof Zn || Ee(e.append) && ((t = Cr(e)) === "formdata" || // detect form-data instance
41
41
  t === "object" && Ee(e.toString) && e.toString() === "[object FormData]"));
42
- }, Di = $e("URLSearchParams"), [Li, ki, Ui, xi] = [
42
+ }, Ci = $e("URLSearchParams"), [Li, ki, Ui, xi] = [
43
43
  "ReadableStream",
44
44
  "Request",
45
45
  "Response",
@@ -116,7 +116,7 @@ const Mi = (e, t, r, { allOwnKeys: n } = {}) => (Ot(
116
116
  do {
117
117
  for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
118
118
  a = s[o], (!n || n(a, e, t)) && !i[a] && (t[a] = e[a], i[a] = !0);
119
- e = r !== !1 && Cn(e);
119
+ e = r !== !1 && Dn(e);
120
120
  } while (e && (!r || r(e, t)) && e !== Object.prototype);
121
121
  return t;
122
122
  }, Bi = (e, t, r) => {
@@ -132,8 +132,8 @@ const Mi = (e, t, r, { allOwnKeys: n } = {}) => (Ot(
132
132
  for (; t-- > 0; )
133
133
  r[t] = e[t];
134
134
  return r;
135
- }, zi = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Cn(Uint8Array)), Gi = (e, t) => {
136
- const n = (e && e[Cr]).call(e);
135
+ }, zi = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Dn(Uint8Array)), Gi = (e, t) => {
136
+ const n = (e && e[Dr]).call(e);
137
137
  let s;
138
138
  for (; (s = n.next()) && !s.done; ) {
139
139
  const o = s.value;
@@ -178,7 +178,7 @@ const Mi = (e, t, r, { allOwnKeys: n } = {}) => (Ot(
178
178
  }, Zi = () => {
179
179
  }, ec = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
180
180
  function tc(e) {
181
- return !!(e && Ee(e.append) && e[ia] === "FormData" && e[Cr]);
181
+ return !!(e && Ee(e.append) && e[ia] === "FormData" && e[Dr]);
182
182
  }
183
183
  const rc = (e) => {
184
184
  const t = new Array(10), r = (n, s) => {
@@ -207,11 +207,11 @@ const rc = (e) => {
207
207
  !1
208
208
  ), (s) => {
209
209
  n.push(s), ze.postMessage(r, "*");
210
- }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", Ee(ze.postMessage)), oc = typeof queueMicrotask < "u" ? queueMicrotask.bind(ze) : typeof process < "u" && process.nextTick || pa, ac = (e) => e != null && Ee(e[Cr]), I = {
210
+ }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", Ee(ze.postMessage)), oc = typeof queueMicrotask < "u" ? queueMicrotask.bind(ze) : typeof process < "u" && process.nextTick || pa, ac = (e) => e != null && Ee(e[Dr]), I = {
211
211
  isArray: ct,
212
212
  isArrayBuffer: ca,
213
213
  isBuffer: Rt,
214
- isFormData: Ci,
214
+ isFormData: Di,
215
215
  isArrayBufferView: Ei,
216
216
  isString: bi,
217
217
  isNumber: ua,
@@ -232,7 +232,7 @@ const rc = (e) => {
232
232
  isRegExp: Ji,
233
233
  isFunction: Ee,
234
234
  isStream: Pi,
235
- isURLSearchParams: Di,
235
+ isURLSearchParams: Ci,
236
236
  isTypedArray: zi,
237
237
  isFileList: $i,
238
238
  forEach: Ot,
@@ -242,7 +242,7 @@ const rc = (e) => {
242
242
  stripBOM: Fi,
243
243
  inherits: ji,
244
244
  toFlatObject: Vi,
245
- kindOf: Dr,
245
+ kindOf: Cr,
246
246
  kindOfTest: $e,
247
247
  endsWith: Bi,
248
248
  toArray: Hi,
@@ -421,10 +421,10 @@ function ts(e) {
421
421
  return t[n];
422
422
  });
423
423
  }
424
- function Dn(e, t) {
424
+ function Cn(e, t) {
425
425
  this._pairs = [], e && kr(e, this, t);
426
426
  }
427
- const ga = Dn.prototype;
427
+ const ga = Cn.prototype;
428
428
  ga.append = function(t, r) {
429
429
  this._pairs.push([t, r]);
430
430
  };
@@ -446,7 +446,7 @@ function ya(e, t, r) {
446
446
  serialize: r
447
447
  } : r, o = s && s.serialize;
448
448
  let a;
449
- if (o ? a = o(t, s) : a = I.isURLSearchParams(t) ? t.toString() : new Dn(t, s).toString(n), a) {
449
+ if (o ? a = o(t, s) : a = I.isURLSearchParams(t) ? t.toString() : new Cn(t, s).toString(n), a) {
450
450
  const i = e.indexOf("#");
451
451
  i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
452
452
  }
@@ -512,7 +512,7 @@ const Ln = {
512
512
  forcedJSONParsing: !0,
513
513
  clarifyTimeoutError: !1,
514
514
  legacyInterceptorReqResOrdering: !0
515
- }, dc = typeof URLSearchParams < "u" ? URLSearchParams : Dn, fc = typeof FormData < "u" ? FormData : null, pc = typeof Blob < "u" ? Blob : null, hc = {
515
+ }, dc = typeof URLSearchParams < "u" ? URLSearchParams : Cn, fc = typeof FormData < "u" ? FormData : null, pc = typeof Blob < "u" ? Blob : null, hc = {
516
516
  isBrowser: !0,
517
517
  classes: {
518
518
  URLSearchParams: dc,
@@ -918,7 +918,7 @@ function Ic(e) {
918
918
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
919
919
  return t && t[1] || "";
920
920
  }
921
- function Cc(e, t) {
921
+ function Dc(e, t) {
922
922
  e = e || 10;
923
923
  const r = new Array(e), n = new Array(e);
924
924
  let s = 0, o = 0, a;
@@ -934,7 +934,7 @@ function Cc(e, t) {
934
934
  return S ? Math.round(v * 1e3 / S) : void 0;
935
935
  };
936
936
  }
937
- function Dc(e, t) {
937
+ function Cc(e, t) {
938
938
  let r = 0, n = 1e3 / t, s, o;
939
939
  const a = (d, l = Date.now()) => {
940
940
  r = l, s = null, o && (clearTimeout(o), o = null), e(...d);
@@ -948,8 +948,8 @@ function Dc(e, t) {
948
948
  }
949
949
  const Sr = (e, t, r = 3) => {
950
950
  let n = 0;
951
- const s = Cc(50, 250);
952
- return Dc((o) => {
951
+ const s = Dc(50, 250);
952
+ return Cc((o) => {
953
953
  const a = o.loaded, i = o.lengthComputable ? o.total : void 0, c = a - n, d = s(c), l = a <= i;
954
954
  n = a;
955
955
  const m = {
@@ -1358,8 +1358,8 @@ const Sa = (e) => {
1358
1358
  method: "POST",
1359
1359
  body: p,
1360
1360
  duplex: "half"
1361
- }), D;
1362
- if (I.isFormData(p) && (D = A.headers.get("content-type")) && N.setContentType(D), A.body) {
1361
+ }), C;
1362
+ if (I.isFormData(p) && (C = A.headers.get("content-type")) && N.setContentType(C), A.body) {
1363
1363
  const [P, w] = ss(
1364
1364
  re,
1365
1365
  Sr(os(b))
@@ -1385,8 +1385,8 @@ const Sa = (e) => {
1385
1385
  ["status", "statusText", "headers"].forEach((T) => {
1386
1386
  A[T] = Q[T];
1387
1387
  });
1388
- const D = I.toFiniteNumber(Q.headers.get("content-length")), [P, w] = _ && ss(
1389
- D,
1388
+ const C = I.toFiniteNumber(Q.headers.get("content-length")), [P, w] = _ && ss(
1389
+ C,
1390
1390
  Sr(os(_), !0)
1391
1391
  ) || [];
1392
1392
  Q = new n(
@@ -1401,8 +1401,8 @@ const Sa = (e) => {
1401
1401
  Q,
1402
1402
  y
1403
1403
  );
1404
- return !ue && G && G(), await new Promise((A, D) => {
1405
- ba(A, D, {
1404
+ return !ue && G && G(), await new Promise((A, C) => {
1405
+ ba(A, C, {
1406
1406
  data: U,
1407
1407
  headers: be.from(Q.headers),
1408
1408
  status: Q.status,
@@ -1896,22 +1896,22 @@ le.getAdapter = Ta.getAdapter;
1896
1896
  le.HttpStatusCode = On;
1897
1897
  le.default = le;
1898
1898
  const {
1899
- Axios: Jm,
1900
- AxiosError: Qm,
1901
- CanceledError: Xm,
1902
- isCancel: Zm,
1903
- CancelToken: eg,
1904
- VERSION: tg,
1905
- all: rg,
1906
- Cancel: ng,
1907
- isAxiosError: sg,
1908
- spread: og,
1909
- toFormData: ag,
1910
- AxiosHeaders: ig,
1911
- HttpStatusCode: cg,
1912
- formToJSON: ug,
1913
- getAdapter: lg,
1914
- mergeConfig: dg
1899
+ Axios: Wm,
1900
+ AxiosError: Jm,
1901
+ CanceledError: Qm,
1902
+ isCancel: Xm,
1903
+ CancelToken: Zm,
1904
+ VERSION: eg,
1905
+ all: tg,
1906
+ Cancel: rg,
1907
+ isAxiosError: ng,
1908
+ spread: sg,
1909
+ toFormData: og,
1910
+ AxiosHeaders: ag,
1911
+ HttpStatusCode: ig,
1912
+ formToJSON: cg,
1913
+ getAdapter: ug,
1914
+ mergeConfig: lg
1915
1915
  } = le, Zc = (e) => typeof e == "object" && e !== null && "resourceType" in e && e.resourceType === "OperationOutcome", eu = (e) => {
1916
1916
  if (!e.issue || !Array.isArray(e.issue))
1917
1917
  return null;
@@ -2116,7 +2116,7 @@ Me.interceptors.response.use(
2116
2116
  return r.startsWith("ERROR_") || /^[A-Z_]+$/.test(r) ? Promise.reject(new Error(r)) : Promise.reject(`${t}: ${r}`);
2117
2117
  }
2118
2118
  );
2119
- const F = async (e) => (await Me.get(e)).data, Ce = async (e, t) => (await Me.post(e, t)).data, fg = async (e, t) => (await Me.put(e, t)).data, pg = async (e, t) => (await Me.patch(e, t)).data, Pa = async (e) => (await Me.delete(e)).data, Y = (e) => typeof e == "string", ft = () => {
2119
+ const F = async (e) => (await Me.get(e)).data, De = async (e, t) => (await Me.post(e, t)).data, dg = async (e, t) => (await Me.put(e, t)).data, fg = async (e, t) => (await Me.patch(e, t)).data, Pa = async (e) => (await Me.delete(e)).data, Y = (e) => typeof e == "string", ft = () => {
2120
2120
  let e, t;
2121
2121
  const r = new Promise((n, s) => {
2122
2122
  e = n, t = s;
@@ -2390,7 +2390,7 @@ class Es extends xr {
2390
2390
  return this.data;
2391
2391
  }
2392
2392
  }
2393
- var Ca = {
2393
+ var Da = {
2394
2394
  processors: {},
2395
2395
  addPostProcessor(e) {
2396
2396
  this.processors[e.name] = e;
@@ -2523,8 +2523,8 @@ class Nr extends xr {
2523
2523
  ne.push(fe[ue]);
2524
2524
  else this.options.saveMissingTo === "all" ? ne = this.languageUtils.toResolveHierarchy(r.lng || this.language) : ne.push(r.lng || this.language);
2525
2525
  const Q = (ue, U, A) => {
2526
- const D = h && A !== v ? A : G;
2527
- this.options.missingKeyHandler ? this.options.missingKeyHandler(ue, c, U, D, re, r) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(ue, c, U, D, re, r), this.emit("missingKey", ue, c, U, v);
2526
+ const C = h && A !== v ? A : G;
2527
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(ue, c, U, C, re, r) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(ue, c, U, C, re, r), this.emit("missingKey", ue, c, U, v);
2528
2528
  };
2529
2529
  this.options.saveMissing && (this.options.saveMissingPlurals && u ? ne.forEach((ue) => {
2530
2530
  const U = this.pluralResolver.getSuffixes(ue, r);
@@ -2575,7 +2575,7 @@ class Nr extends xr {
2575
2575
  }, n)), n.interpolation && this.interpolator.reset();
2576
2576
  }
2577
2577
  const i = n.postProcess || this.options.postProcess, c = Y(i) ? [i] : i;
2578
- return t != null && c?.length && n.applyPostProcessor !== !1 && (t = Ca.handle(c, t, r, this.options && this.options.postProcessPassResolved ? {
2578
+ return t != null && c?.length && n.applyPostProcessor !== !1 && (t = Da.handle(c, t, r, this.options && this.options.postProcessPassResolved ? {
2579
2579
  i18nResolved: {
2580
2580
  ...s,
2581
2581
  usedParams: this.getUsedParamsDetails(n)
@@ -3211,7 +3211,7 @@ const As = () => ({
3211
3211
  maxReplaces: 1e3,
3212
3212
  skipOnVariables: !0
3213
3213
  }
3214
- }), Ns = (e) => (Y(e.ns) && (e.ns = [e.ns]), Y(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Y(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Ct = () => {
3214
+ }), Ns = (e) => (Y(e.ns) && (e.ns = [e.ns]), Y(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Y(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Dt = () => {
3215
3215
  }, Iu = (e) => {
3216
3216
  Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((r) => {
3217
3217
  typeof e[r] == "function" && (e[r] = e[r].bind(e));
@@ -3268,7 +3268,7 @@ class _t extends xr {
3268
3268
  S.init && S.init(this);
3269
3269
  });
3270
3270
  }
3271
- if (this.format = this.options.interpolation.format, n || (n = Ct), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
3271
+ if (this.format = this.options.interpolation.format, n || (n = Dt), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
3272
3272
  const l = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
3273
3273
  l.length > 0 && l[0] !== "dev" && (this.options.lng = l[0]);
3274
3274
  }
@@ -3291,7 +3291,7 @@ class _t extends xr {
3291
3291
  return this.options.resources || !this.options.initAsync ? d() : setTimeout(d, 0), c;
3292
3292
  }
3293
3293
  loadResources(t) {
3294
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ct;
3294
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Dt;
3295
3295
  const s = Y(t) ? t : this.language;
3296
3296
  if (typeof t == "function" && (n = t), !this.options.resources || this.options.partialBundledLanguages) {
3297
3297
  if (s?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
@@ -3309,14 +3309,14 @@ class _t extends xr {
3309
3309
  }
3310
3310
  reloadResources(t, r, n) {
3311
3311
  const s = ft();
3312
- return typeof t == "function" && (n = t, t = void 0), typeof r == "function" && (n = r, r = void 0), t || (t = this.languages), r || (r = this.options.ns), n || (n = Ct), this.services.backendConnector.reload(t, r, (o) => {
3312
+ return typeof t == "function" && (n = t, t = void 0), typeof r == "function" && (n = r, r = void 0), t || (t = this.languages), r || (r = this.options.ns), n || (n = Dt), this.services.backendConnector.reload(t, r, (o) => {
3313
3313
  s.resolve(), n(o);
3314
3314
  }), s;
3315
3315
  }
3316
3316
  use(t) {
3317
3317
  if (!t) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
3318
3318
  if (!t.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
3319
- return t.type === "backend" && (this.modules.backend = t), (t.type === "logger" || t.log && t.warn && t.error) && (this.modules.logger = t), t.type === "languageDetector" && (this.modules.languageDetector = t), t.type === "i18nFormat" && (this.modules.i18nFormat = t), t.type === "postProcessor" && Ca.addPostProcessor(t), t.type === "formatter" && (this.modules.formatter = t), t.type === "3rdParty" && this.modules.external.push(t), this;
3319
+ return t.type === "backend" && (this.modules.backend = t), (t.type === "logger" || t.log && t.warn && t.error) && (this.modules.logger = t), t.type === "languageDetector" && (this.modules.languageDetector = t), t.type === "i18nFormat" && (this.modules.i18nFormat = t), t.type === "postProcessor" && Da.addPostProcessor(t), t.type === "formatter" && (this.modules.formatter = t), t.type === "3rdParty" && this.modules.external.push(t), this;
3320
3320
  }
3321
3321
  setResolvedLanguage(t) {
3322
3322
  if (!(!t || !this.languages) && !(["cimode", "dev"].indexOf(t) > -1))
@@ -3426,7 +3426,7 @@ class _t extends xr {
3426
3426
  return new _t(t, r);
3427
3427
  }
3428
3428
  cloneInstance() {
3429
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ct;
3429
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Dt;
3430
3430
  const n = t.forkResourceStore;
3431
3431
  n && delete t.forkResourceStore;
3432
3432
  const s = {
@@ -3483,11 +3483,11 @@ ie.hasLoadedNamespace;
3483
3483
  ie.loadNamespaces;
3484
3484
  ie.loadLanguages;
3485
3485
  const {
3486
- slice: Cu,
3487
- forEach: Du
3486
+ slice: Du,
3487
+ forEach: Cu
3488
3488
  } = [];
3489
3489
  function Lu(e) {
3490
- return Du.call(Cu.call(arguments, 1), (t) => {
3490
+ return Cu.call(Du.call(arguments, 1), (t) => {
3491
3491
  if (t)
3492
3492
  for (const r in t)
3493
3493
  e[r] === void 0 && (e[r] = t[r]);
@@ -3663,7 +3663,7 @@ var Fu = {
3663
3663
  }
3664
3664
  };
3665
3665
  let Xe = null;
3666
- const Cs = () => {
3666
+ const Ds = () => {
3667
3667
  if (Xe !== null) return Xe;
3668
3668
  try {
3669
3669
  if (Xe = typeof window < "u" && window.sessionStorage !== null, !Xe)
@@ -3681,14 +3681,14 @@ var ju = {
3681
3681
  let {
3682
3682
  lookupSessionStorage: t
3683
3683
  } = e;
3684
- if (t && Cs())
3684
+ if (t && Ds())
3685
3685
  return window.sessionStorage.getItem(t) || void 0;
3686
3686
  },
3687
3687
  cacheUserLanguage(e, t) {
3688
3688
  let {
3689
3689
  lookupSessionStorage: r
3690
3690
  } = t;
3691
- r && Cs() && window.sessionStorage.setItem(r, e);
3691
+ r && Ds() && window.sessionStorage.setItem(r, e);
3692
3692
  }
3693
3693
  }, Vu = {
3694
3694
  name: "navigator",
@@ -3739,13 +3739,13 @@ var ju = {
3739
3739
  return n[r];
3740
3740
  }
3741
3741
  };
3742
- let Da = !1;
3742
+ let Ca = !1;
3743
3743
  try {
3744
- document.cookie, Da = !0;
3744
+ document.cookie, Ca = !0;
3745
3745
  } catch {
3746
3746
  }
3747
3747
  const La = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
3748
- Da || La.splice(1, 1);
3748
+ Ca || La.splice(1, 1);
3749
3749
  const Gu = () => ({
3750
3750
  order: La,
3751
3751
  lookupQuerystring: "lng",
@@ -3790,7 +3790,7 @@ class ka {
3790
3790
  }
3791
3791
  }
3792
3792
  ka.type = "languageDetector";
3793
- const Ku = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", W = "/openmrs/ws/rest/v1", Yu = "/openmrs/ws/rest/v2", Ua = "bahmni.user", hg = "/bahmni/home/index.html", xa = W + "/session", Wu = "en", qa = "NG_TRANSLATE_LANG_KEY", Ju = (e, t) => Ku + `${e}/locales/locale_${t}.json`, Qu = (e, t) => `/bahmni_config/openmrs/i18n/${e}/locale_${t}.json`, qr = () => localStorage.getItem(qa) ?? Wu, Ds = async (e) => {
3793
+ const Ku = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", W = "/openmrs/ws/rest/v1", Yu = "/openmrs/ws/rest/v2", Ua = "bahmni.user", pg = "/bahmni/home/index.html", xa = W + "/session", Wu = "en", qa = "NG_TRANSLATE_LANG_KEY", Ju = (e, t) => Ku + `${e}/locales/locale_${t}.json`, Qu = (e, t) => `/bahmni_config/openmrs/i18n/${e}/locale_${t}.json`, qr = () => localStorage.getItem(qa) ?? Wu, Cs = async (e) => {
3794
3794
  try {
3795
3795
  const t = await F(e);
3796
3796
  return t || (console.error(`Invalid response from ${e}`), {});
@@ -3799,9 +3799,9 @@ const Ku = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", W = "/ope
3799
3799
  }
3800
3800
  }, Ls = async (e, t) => {
3801
3801
  let r = {}, n = {};
3802
- return r = await Ds(
3802
+ return r = await Cs(
3803
3803
  Ju(e, t)
3804
- ), n = await Ds(
3804
+ ), n = await Cs(
3805
3805
  Qu(e, t)
3806
3806
  ), {
3807
3807
  ...r,
@@ -3814,7 +3814,7 @@ const Ku = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", W = "/ope
3814
3814
  }, e !== "en" && (r.en = {
3815
3815
  [t]: await Ls(t, "en")
3816
3816
  }), r;
3817
- }, mg = (e, t) => {
3817
+ }, hg = (e, t) => {
3818
3818
  const r = e.toUpperCase(), n = t.toUpperCase().replace(/\s+/g, "_").replace(/[^A-Z0-9_]/g, "");
3819
3819
  return `${r}_${n}`;
3820
3820
  }, Zu = (e, t) => {
@@ -3831,7 +3831,7 @@ const Ku = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", W = "/ope
3831
3831
  labels: n.labels ?? {},
3832
3832
  concepts: n.concepts ?? {}
3833
3833
  };
3834
- }, gg = async (e) => {
3834
+ }, mg = async (e) => {
3835
3835
  const t = qr(), r = await Xu(t, e);
3836
3836
  return ie.isInitialized ? (Object.entries(r).forEach(([n, s]) => {
3837
3837
  Object.entries(s).forEach(([o, a]) => {
@@ -3854,7 +3854,7 @@ const Ku = process.env.PUBLIC_URL ?? "/", ce = "/openmrs/ws/fhir2/R4", W = "/ope
3854
3854
  }
3855
3855
  }), ie;
3856
3856
  };
3857
- function yg() {
3857
+ function gg() {
3858
3858
  const e = bn(null), t = bn(null), r = Wr(async () => {
3859
3859
  t.current && (t.current.getTracks().forEach((a) => a.stop()), t.current = null);
3860
3860
  const o = await navigator.mediaDevices.getUserMedia({
@@ -3877,10 +3877,10 @@ function yg() {
3877
3877
  }, []);
3878
3878
  return _n(() => () => n(), [n]), { videoRef: e, start: r, stop: n, capture: s };
3879
3879
  }
3880
- const el = "bahmni.enableAuditLog", Ma = (e) => `${W}/bahmnicore/sql/globalproperty?property=${e}`, vg = async (e, t, r) => {
3880
+ const el = "bahmni.enableAuditLog", Ma = (e) => `${W}/bahmnicore/sql/globalproperty?property=${e}`, yg = async (e, t, r) => {
3881
3881
  const { exact: n = !0, refetchActiveNow: s = !0 } = r ?? {};
3882
3882
  await e.cancelQueries({ queryKey: t, exact: n }), await e.removeQueries({ queryKey: t, exact: n }), await e.invalidateQueries({ queryKey: t, exact: n }), s && await e.refetchQueries({ queryKey: t, exact: n, type: "active" });
3883
- }, wg = () => Math.random().toString(36).substring(2, 9), Eg = () => {
3883
+ }, vg = () => Math.random().toString(36).substring(2, 9), wg = () => {
3884
3884
  if (typeof globalThis < "u" && globalThis.crypto?.randomUUID)
3885
3885
  return globalThis.crypto.randomUUID();
3886
3886
  const e = globalThis.crypto || globalThis.msCrypto;
@@ -3892,7 +3892,7 @@ const el = "bahmni.enableAuditLog", Ma = (e) => `${W}/bahmnicore/sql/globalprope
3892
3892
  "Crypto API (crypto.randomUUID or crypto.getRandomValues) is not available. UUID generation requires cryptographically secure random number generation."
3893
3893
  );
3894
3894
  };
3895
- function bg(e, t = " -") {
3895
+ function Eg(e, t = " -") {
3896
3896
  return e ? e.toLowerCase().split(new RegExp(`[${t}]+`)).map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ") : "";
3897
3897
  }
3898
3898
  function Fa(e) {
@@ -3907,10 +3907,10 @@ function Fa(e) {
3907
3907
  function tl(e) {
3908
3908
  document.cookie = `${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`;
3909
3909
  }
3910
- function _g(e, t) {
3910
+ function bg(e, t) {
3911
3911
  document.cookie = `${e}=${t}; path=/;`;
3912
3912
  }
3913
- const Sg = (e) => !e || e.trim().length === 0, Rg = (e, t) => {
3913
+ const _g = (e) => !e || e.trim().length === 0, Sg = (e, t) => {
3914
3914
  if (!e || !t || t.length === 0)
3915
3915
  return 999;
3916
3916
  const r = t.findIndex(
@@ -3918,7 +3918,7 @@ const Sg = (e) => !e || e.trim().length === 0, Rg = (e, t) => {
3918
3918
  );
3919
3919
  return r === -1 ? 999 : r;
3920
3920
  };
3921
- function Tg(e, t) {
3921
+ function Rg(e, t) {
3922
3922
  if (!e || e.length === 0)
3923
3923
  return [];
3924
3924
  const r = /* @__PURE__ */ new Map();
@@ -3930,7 +3930,7 @@ function Tg(e, t) {
3930
3930
  items: s
3931
3931
  }));
3932
3932
  }
3933
- function Og(e, t, r) {
3933
+ function Tg(e, t, r) {
3934
3934
  if (!e || e.length === 0)
3935
3935
  return [];
3936
3936
  const n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
@@ -3951,7 +3951,7 @@ function rl(e) {
3951
3951
  o[n(a[1])] = n(a[2]);
3952
3952
  return o;
3953
3953
  }
3954
- function Ag(e, t, r) {
3954
+ function Og(e, t, r) {
3955
3955
  const n = /{{([^}]*)}}/g, s = e.match(n);
3956
3956
  let o = e;
3957
3957
  const a = r ?? !1, i = a ? rl() : {};
@@ -3964,7 +3964,7 @@ function Ag(e, t, r) {
3964
3964
  const nl = (e) => new Promise((t, r) => {
3965
3965
  const n = new FileReader();
3966
3966
  n.onloadend = () => t(n.result), n.onerror = r, n.readAsDataURL(e);
3967
- }), Ng = (e) => {
3967
+ }), Ag = (e) => {
3968
3968
  if (typeof e == "number" && !isNaN(e))
3969
3969
  return "number";
3970
3970
  if (typeof e != "string")
@@ -3972,17 +3972,17 @@ const nl = (e) => new Promise((t, r) => {
3972
3972
  const t = e.toLowerCase();
3973
3973
  return t.endsWith(".pdf") ? "PDF" : [".png", ".jpg", ".jpeg", ".gif", ".bmp", ".svg"].some((s) => t.endsWith(s)) ? "Image" : [".mp4", ".ogg", ".webm", ".mkv", ".flv"].some((s) => t.endsWith(s)) ? "Video" : typeof e == "string" ? "string" : "object";
3974
3974
  };
3975
- function $g(e) {
3975
+ function Ng(e) {
3976
3976
  return e.replace(/[\s-]+/g, "_").replace(/([a-z])([A-Z])/g, "$1_$2").replace(/([A-Z])([A-Z][a-z])/g, "$1_$2").toUpperCase();
3977
3977
  }
3978
- function Pg(e, t, r, n, s) {
3978
+ function $g(e, t, r, n, s) {
3979
3979
  const o = (a) => ({
3980
3980
  ...n(a),
3981
3981
  disabled: !0
3982
3982
  });
3983
3983
  return e ? [o(s.loading)] : t ? [o(s.error)] : r.length ? r : [o(s.empty)];
3984
3984
  }
3985
- function Ig(e) {
3985
+ function Pg(e) {
3986
3986
  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()) : "";
3987
3987
  }
3988
3988
  const sl = (e) => W + `/user?username=${e}&v=custom:(display,username,uuid)`, ja = "bahmni.user.location", ol = `${W}/location?tags=Login Location&v=default`, al = (e) => W + `/user/${e}?v=full`, il = (e) => W + `/bahmni/app/setting?module=${e}`, cl = "default_dateFormat", ul = xa, ll = [
@@ -3991,7 +3991,7 @@ const sl = (e) => W + `/user?username=${e}&v=custom:(display,username,uuid)`, ja
3991
3991
  ], dl = {
3992
3992
  LOGOUT_FAILED: "USER_LOGOUT_FAILED"
3993
3993
  };
3994
- async function Cg() {
3994
+ async function Ig() {
3995
3995
  const e = Fa(Ua);
3996
3996
  if (!e)
3997
3997
  return null;
@@ -4017,13 +4017,13 @@ const qn = () => {
4017
4017
  return t;
4018
4018
  }, Dg = async () => (await F(il("commons"))).find(
4019
4019
  (r) => r.property === cl
4020
- )?.value ?? null, Lg = async () => {
4020
+ )?.value ?? null, Cg = async () => {
4021
4021
  try {
4022
4022
  return (await F(ol)).results ?? [];
4023
4023
  } catch (e) {
4024
4024
  return console.error("Failed to fetch available locations:", e), [];
4025
4025
  }
4026
- }, kg = async () => {
4026
+ }, Lg = async () => {
4027
4027
  try {
4028
4028
  await Pa(ul), ll.forEach((e) => {
4029
4029
  tl(e);
@@ -4031,8 +4031,8 @@ const qn = () => {
4031
4031
  } catch (e) {
4032
4032
  throw console.error("Logout failed:", e), new Error(ie.t(dl.LOGOUT_FAILED));
4033
4033
  }
4034
- }, Ug = async (e, t) => {
4035
- await Ce(al(e), {
4034
+ }, kg = async (e, t) => {
4035
+ await De(al(e), {
4036
4036
  userProperties: { loginLocation: t.uuid }
4037
4037
  });
4038
4038
  }, Mn = {
@@ -4081,7 +4081,7 @@ const qn = () => {
4081
4081
  }, Va = W + "/idgen/identifiertype", gl = (e) => W + `/bahmni/app/setting?module=${e}`, yl = "bahmni.primaryIdentifierType", vl = W + "/bahmnicore/patientprofile", wl = (e) => W + `/bahmnicore/patientprofile/${e}`, El = (e) => W + `/patientprofile/${e}?v=full`, bl = (e, t, r = 20, n) => {
4082
4082
  let s = `/openmrs/module/addresshierarchy/ajax/getPossibleAddressHierarchyEntriesWithParents.form?addressField=${e}&limit=${r}&searchString=${encodeURIComponent(t)}`;
4083
4083
  return n && (s += `&parent=${n}`), s;
4084
- }, _l = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", Sl = W + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)&limit=150", Rl = 20, Tl = 2, xg = 120, qg = 50, Mg = 15, Ol = /^[a-f0-9-]{36}$/i, Al = (e) => Yu + `/patientImage?patientUuid=${e}`, Nl = W + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", $l = async (e) => {
4084
+ }, _l = "/openmrs/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form", Sl = W + "/relationshiptype?v=custom:(aIsToB,bIsToA,uuid)&limit=150", Rl = 20, Tl = 2, Ug = 120, xg = 50, qg = 15, Ol = /^[a-f0-9-]{36}$/i, Al = (e) => Yu + `/patientImage?patientUuid=${e}`, Nl = W + "/personattributetype?v=custom:(uuid,name,sortWeight,description,format,concept:(uuid,display,answers:(uuid,name)))", $l = async (e) => {
4085
4085
  if (!e || e.trim() === "")
4086
4086
  throw new Error("Invalid patient UUID: UUID cannot be empty");
4087
4087
  if (!Ol.test(e))
@@ -4092,7 +4092,7 @@ const qn = () => {
4092
4092
  return null;
4093
4093
  const t = e.name[0], r = t.given?.join(" ") ?? "", n = t.family ?? "";
4094
4094
  return !r && !n ? null : `${r} ${n}`.trim();
4095
- }, Cl = (e) => {
4095
+ }, Dl = (e) => {
4096
4096
  if (!e) return null;
4097
4097
  const t = [
4098
4098
  ...e.line ?? [],
@@ -4101,8 +4101,8 @@ const qn = () => {
4101
4101
  // Extracted address extensions
4102
4102
  ], r = e.city ?? "", n = e.state ?? "", s = e.postalCode ?? "", o = t.filter(Boolean);
4103
4103
  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;
4104
- }, Dl = (e) => !e?.system || !e.value ? null : `${e.system}: ${e.value}`, Ll = (e) => {
4105
- const t = e.address && e.address.length > 0 ? Cl(e.address[0]) : null, r = e.telecom && e.telecom.length > 0 ? Dl(e.telecom[0]) : null, n = e.identifier ?? [], s = /* @__PURE__ */ new Map();
4104
+ }, Cl = (e) => !e?.system || !e.value ? null : `${e.system}: ${e.value}`, Ll = (e) => {
4105
+ const t = e.address && e.address.length > 0 ? Dl(e.address[0]) : null, r = e.telecom && e.telecom.length > 0 ? Cl(e.telecom[0]) : null, n = e.identifier ?? [], s = /* @__PURE__ */ new Map();
4106
4106
  return n.length > 0 && n.forEach((o) => {
4107
4107
  !o.type?.text || !o.value || s.set(o.type.text, o.value);
4108
4108
  }), {
@@ -4114,20 +4114,20 @@ const qn = () => {
4114
4114
  formattedContact: r,
4115
4115
  identifiers: s
4116
4116
  };
4117
- }, Fg = async (e) => {
4117
+ }, Mg = async (e) => {
4118
4118
  const t = await $l(e);
4119
4119
  return Ll(t);
4120
- }, jg = async (e) => {
4120
+ }, Fg = async (e) => {
4121
4121
  const t = await fetch(Al(e));
4122
4122
  if (!t.ok) return null;
4123
4123
  const r = await t.blob();
4124
4124
  return await nl(r);
4125
- }, Vg = async (e, t) => {
4125
+ }, jg = async (e, t) => {
4126
4126
  const r = qn();
4127
4127
  return await F(
4128
4128
  hl(e, r.uuid, t)
4129
4129
  );
4130
- }, Bg = async (e, t, r, n, s) => {
4130
+ }, Vg = async (e, t, r, n, s) => {
4131
4131
  const o = qn();
4132
4132
  return await F(
4133
4133
  ml(
@@ -4138,9 +4138,9 @@ const qn = () => {
4138
4138
  o.uuid
4139
4139
  )
4140
4140
  );
4141
- }, Hg = async () => F(Va), kl = async () => (await F(gl("core"))).find(
4141
+ }, Bg = async () => F(Va), kl = async () => (await F(gl("core"))).find(
4142
4142
  (r) => r.property === yl
4143
- )?.value ?? null, zg = async () => {
4143
+ )?.value ?? null, Hg = async () => {
4144
4144
  const [e, t] = await Promise.all([
4145
4145
  F(Va),
4146
4146
  kl()
@@ -4157,10 +4157,10 @@ const qn = () => {
4157
4157
  sourcesByPrefix: n,
4158
4158
  primaryIdentifierTypeUuid: t
4159
4159
  }) : { prefixes: r, sourcesByPrefix: n, primaryIdentifierTypeUuid: t };
4160
- }, Gg = async (e) => Ce(vl, e), Kg = async (e, t) => Ce(
4160
+ }, zg = async (e) => De(vl, e), Gg = async (e, t) => De(
4161
4161
  wl(e),
4162
4162
  t
4163
- ), Yg = async () => F(Ma("mrs.genders")), Wg = async (e, t, r = Rl, n) => {
4163
+ ), Kg = async () => F(Ma("mrs.genders")), Yg = async (e, t, r = Rl, n) => {
4164
4164
  if (!t || t.length < Tl)
4165
4165
  return [];
4166
4166
  try {
@@ -4172,7 +4172,7 @@ const qn = () => {
4172
4172
  `Failed to fetch address hierarchy for field "${e}": ${s instanceof Error ? s.message : "Unknown error"}`
4173
4173
  );
4174
4174
  }
4175
- }, Jg = async () => F(_l), Qg = async (e) => F(El(e)), Xg = async () => {
4175
+ }, Wg = async () => F(_l), Jg = async (e) => F(El(e)), Qg = async () => {
4176
4176
  try {
4177
4177
  return (await F(
4178
4178
  Sl
@@ -4186,9 +4186,9 @@ const qn = () => {
4186
4186
  `Failed to fetch relationship types: ${e instanceof Error ? e.message : "Unknown error"}`
4187
4187
  );
4188
4188
  }
4189
- }, Zg = async () => F(Nl);
4189
+ }, Xg = async () => F(Nl);
4190
4190
  var Ul = /* @__PURE__ */ ((e) => (e.BOOLEAN = "java.lang.Boolean", e.BOOLEAN_DATATYPE = "org.openmrs.customdatatype.datatype.BooleanDatatype", e.CONCEPT = "org.openmrs.Concept", e.CODED_CONCEPT = "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype", e.CONCEPT_DATATYPE = "org.openmrs.customdatatype.datatype.ConceptDatatype", e.STRING = "java.lang.String", e.FREE_TEXT = "org.openmrs.customdatatype.datatype.FreeTextDatatype", e.REGEX_VALIDATED_TEXT = "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", e.INTEGER = "java.lang.Integer", e.FLOAT = "java.lang.Float", e.ATTRIBUTABLE_DATE = "org.openmrs.util.AttributableDate", e.DATE_DATATYPE = "org.openmrs.customdatatype.datatype.DateDatatype", e))(Ul || {}), xl = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.DROPDOWN = "dropdown", e.TEXT = "text", e.NUMBER = "number", e.DATE = "date", e))(xl || {});
4191
- const ey = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype" ? "checkbox" : e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype" ? "dropdown" : e === "java.lang.Integer" || e === "java.lang.Float" ? "number" : e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype" ? "date" : "text", ty = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype", ry = (e) => e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype", ny = (e) => e === "java.lang.Integer" || e === "java.lang.Float", sy = (e) => e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype", oy = (e) => e === "java.lang.String" || e === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || e === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", ql = (e) => {
4191
+ const Zg = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype" ? "checkbox" : e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype" ? "dropdown" : e === "java.lang.Integer" || e === "java.lang.Float" ? "number" : e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype" ? "date" : "text", ey = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype.datatype.BooleanDatatype", ty = (e) => e === "org.openmrs.Concept" || e === "org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype" || e === "org.openmrs.customdatatype.datatype.ConceptDatatype", ry = (e) => e === "java.lang.Integer" || e === "java.lang.Float", ny = (e) => e === "org.openmrs.util.AttributableDate" || e === "org.openmrs.customdatatype.datatype.DateDatatype", sy = (e) => e === "java.lang.String" || e === "org.openmrs.customdatatype.datatype.FreeTextDatatype" || e === "org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype", ql = (e) => {
4192
4192
  const t = new CustomEvent("bahmni-audit-log", { detail: e });
4193
4193
  window.dispatchEvent(t);
4194
4194
  }, Ml = (e) => {
@@ -4241,10 +4241,10 @@ const ey = (e) => e === "java.lang.Boolean" || e === "org.openmrs.customdatatype
4241
4241
  }
4242
4242
  }, Fl = W + "/auditlog", jl = {
4243
4243
  UNKNOWN_EVENT_TYPE: "AUDIT_LOG_ERROR_UNKNOWN_EVENT_TYPE"
4244
- }, Vl = () => W + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", Bl = W + "/visit", Hl = (e) => W + `/visit?patient=${e}&includeInactive=false&v=custom:(uuid,visitType,startDatetime,stopDatetime)`, zl = (e) => W + `/bahmnicore/visitLocation/${e}`, ay = async () => F(Vl()), Gl = async (e) => F(Hl(e)), Kl = async (e) => F(zl(e)), Yl = async (e) => Ce(Bl, e), iy = async (e) => {
4244
+ }, Vl = () => W + "/bahmnicore/config/bahmniencounter?callerContext=REGISTRATION_CONCEPTS", Bl = W + "/visit", Hl = (e) => W + `/visit?patient=${e}&includeInactive=false&v=custom:(uuid,visitType,startDatetime,stopDatetime)`, zl = (e) => W + `/bahmnicore/visitLocation/${e}`, oy = async () => F(Vl()), Gl = async (e) => F(Hl(e)), Kl = async (e) => F(zl(e)), Yl = async (e) => De(Bl, e), ay = async (e) => {
4245
4245
  const t = await Gl(e);
4246
4246
  return t?.results && t.results.length > 0;
4247
- }, cy = async (e, t) => {
4247
+ }, iy = async (e, t) => {
4248
4248
  const r = await Kl(
4249
4249
  qn().uuid
4250
4250
  ), n = {
@@ -4761,7 +4761,7 @@ const Td = /^(\d+)(th|st|nd|rd)?/i, Od = /\d+/i, Ad = {
4761
4761
  narrow: /^[jfmasond]/i,
4762
4762
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
4763
4763
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
4764
- }, Cd = {
4764
+ }, Dd = {
4765
4765
  narrow: [
4766
4766
  /^j/i,
4767
4767
  /^f/i,
@@ -4790,7 +4790,7 @@ const Td = /^(\d+)(th|st|nd|rd)?/i, Od = /\d+/i, Ad = {
4790
4790
  /^n/i,
4791
4791
  /^d/i
4792
4792
  ]
4793
- }, Dd = {
4793
+ }, Cd = {
4794
4794
  narrow: /^[smtwf]/i,
4795
4795
  short: /^(su|mo|tu|we|th|fr|sa)/i,
4796
4796
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
@@ -4834,11 +4834,11 @@ const Td = /^(\d+)(th|st|nd|rd)?/i, Od = /\d+/i, Ad = {
4834
4834
  month: ht({
4835
4835
  matchPatterns: Id,
4836
4836
  defaultMatchWidth: "wide",
4837
- parsePatterns: Cd,
4837
+ parsePatterns: Dd,
4838
4838
  defaultParseWidth: "any"
4839
4839
  }),
4840
4840
  day: ht({
4841
- matchPatterns: Dd,
4841
+ matchPatterns: Cd,
4842
4842
  defaultMatchWidth: "wide",
4843
4843
  parsePatterns: Ld,
4844
4844
  defaultParseWidth: "any"
@@ -5616,21 +5616,21 @@ function Hn(e, t) {
5616
5616
  }
5617
5617
  return de(a + i + c, t?.in);
5618
5618
  }
5619
- const Dt = {
5619
+ const Ct = {
5620
5620
  dateTimeDelimiter: /[T ]/,
5621
5621
  timeZoneDelimiter: /[Z ]/i,
5622
5622
  timezone: /([Z+-].*)$/
5623
5623
  }, af = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, cf = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, uf = /^([+-])(\d{2})(?::?(\d{2}))?$/;
5624
5624
  function lf(e) {
5625
- const t = {}, r = e.split(Dt.dateTimeDelimiter);
5625
+ const t = {}, r = e.split(Ct.dateTimeDelimiter);
5626
5626
  let n;
5627
5627
  if (r.length > 2)
5628
5628
  return t;
5629
- if (/:/.test(r[0]) ? n = r[0] : (t.date = r[0], n = r[1], Dt.timeZoneDelimiter.test(t.date) && (t.date = e.split(Dt.timeZoneDelimiter)[0], n = e.substr(
5629
+ if (/:/.test(r[0]) ? n = r[0] : (t.date = r[0], n = r[1], Ct.timeZoneDelimiter.test(t.date) && (t.date = e.split(Ct.timeZoneDelimiter)[0], n = e.substr(
5630
5630
  t.date.length,
5631
5631
  e.length
5632
5632
  ))), n) {
5633
- const s = Dt.timezone.exec(n);
5633
+ const s = Ct.timezone.exec(n);
5634
5634
  s ? (t.time = n.replace(s[1], ""), t.timezone = s[1]) : t.time = n;
5635
5635
  }
5636
5636
  return t;
@@ -5711,7 +5711,7 @@ function Sf(e, t, r) {
5711
5711
  function Rf(e, t, r) {
5712
5712
  return jn(e, -t, r);
5713
5713
  }
5714
- const uy = {
5714
+ const cy = {
5715
5715
  PROPOSED: "proposed",
5716
5716
  PENDING: "pending",
5717
5717
  BOOKED: "booked",
@@ -5722,38 +5722,38 @@ const uy = {
5722
5722
  CHECKED_IN: "checked-in",
5723
5723
  WAITLIST: "waitlist",
5724
5724
  ENTERED_IN_ERROR: "entered-in-error"
5725
- }, Tf = W + "/appointments/search", Qa = W + "/appointments", ly = "http://fhir.bahmni.org/code-system/appointments", Of = (e) => `${Qa}/${e}`, jr = (e, t, r, n) => {
5725
+ }, Tf = W + "/appointments/search", Qa = W + "/appointments", uy = "http://fhir.bahmni.org/code-system/appointments", Of = (e) => `${Qa}/${e}`, jr = (e, t, r, n) => {
5726
5726
  const s = t === "upcoming", o = s ? "ge" : "le", a = s ? "date" : "-date", i = s ? (/* @__PURE__ */ new Date()).toISOString() : Sf(/* @__PURE__ */ new Date()).toISOString();
5727
5727
  let c = `${ce}/Appointment?patient=${e}&date=${o}${i}&_sort=${a}`;
5728
5728
  return r !== void 0 && r > 0 && (c += `&_count=${r}`), n !== void 0 && n > 0 && (c += `&_getpagesoffset=${n}`), c;
5729
- }, Af = (e) => jr(e, "upcoming"), Nf = (e, t) => jr(e, "past", t), $f = (e) => `${Qa}/${e}/status-change`, Pf = W + "/appointmentService/all/full", If = (e) => `${W}/appointmentService?uuid=${e}`, Cf = (e, t = 10, r = 0) => jr(e, "upcoming", t, r), Df = (e, t = 10, r = 0) => jr(e, "past", t, r), dy = async (e) => await Ce(Tf, e);
5730
- async function fy(e) {
5729
+ }, Af = (e) => jr(e, "upcoming"), Nf = (e, t) => jr(e, "past", t), $f = (e) => `${Qa}/${e}/status-change`, Pf = W + "/appointmentService/all/full", If = (e) => `${W}/appointmentService?uuid=${e}`, Df = (e, t = 10, r = 0) => jr(e, "upcoming", t, r), Cf = (e, t = 10, r = 0) => jr(e, "past", t, r), ly = async (e) => await De(Tf, e);
5730
+ async function dy(e) {
5731
5731
  return await F(Af(e));
5732
5732
  }
5733
- async function py(e, t) {
5733
+ async function fy(e, t) {
5734
5734
  return await F(
5735
5735
  Nf(e, t)
5736
5736
  );
5737
5737
  }
5738
- const hy = async (e, t, r) => await Ce($f(e), {
5738
+ const py = async (e, t, r) => await De($f(e), {
5739
5739
  toStatus: t,
5740
5740
  onDate: r
5741
5741
  });
5742
- async function my(e) {
5742
+ async function hy(e) {
5743
5743
  return await F(Of(e));
5744
5744
  }
5745
- const gy = async () => await F(Pf), yy = async (e) => {
5745
+ const my = async () => await F(Pf), gy = async (e) => {
5746
5746
  await Pa(If(e));
5747
5747
  };
5748
- async function vy(e, t = 10, r = 1) {
5748
+ async function yy(e, t = 10, r = 1) {
5749
5749
  const n = (r - 1) * t, s = await F(
5750
- Cf(e, t, n)
5750
+ Df(e, t, n)
5751
5751
  );
5752
5752
  return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
5753
5753
  }
5754
- async function wy(e, t = 10, r = 1) {
5754
+ async function vy(e, t = 10, r = 1) {
5755
5755
  const n = (r - 1) * t, s = await F(
5756
- Df(e, t, n)
5756
+ Cf(e, t, n)
5757
5757
  );
5758
5758
  return { bundle: s, total: s.total ?? s.entry?.length ?? 0 };
5759
5759
  }
@@ -5764,7 +5764,7 @@ const Xa = "dd/MM/yyyy", Lf = "default_dateFormat", kf = "h:mm a", Te = {
5764
5764
  INVALID_FORMAT: "DATE_ERROR_INVALID_FORMAT",
5765
5765
  NULL_OR_UNDEFINED: "DATE_ERROR_NULL_OR_UNDEFINED"
5766
5766
  };
5767
- function Ey(e) {
5767
+ function wy(e) {
5768
5768
  if (typeof e != "string" || !/^\d{4}-\d{2}-\d{2}$/.test(e))
5769
5769
  return null;
5770
5770
  const t = Hn(e);
@@ -5832,7 +5832,7 @@ function xf() {
5832
5832
  return Xa;
5833
5833
  }
5834
5834
  }
5835
- function by(e, t, r = !1, n) {
5835
+ function Ey(e, t, r = !1, n) {
5836
5836
  const s = t ?? ((a) => a);
5837
5837
  let o;
5838
5838
  try {
@@ -5842,7 +5842,7 @@ function by(e, t, r = !1, n) {
5842
5842
  }
5843
5843
  return r && !n && (o = `${o} ${kf}`), Uf(e, o, s);
5844
5844
  }
5845
- function _y(e, t, r) {
5845
+ function by(e, t, r) {
5846
5846
  if (!e || !$t(e) || t === null || t === void 0 || !r || typeof t != "number")
5847
5847
  return;
5848
5848
  const n = new Date(e);
@@ -5857,7 +5857,7 @@ function _y(e, t, r) {
5857
5857
  return;
5858
5858
  }
5859
5859
  }
5860
- function Sy(e, t) {
5860
+ function _y(e, t) {
5861
5861
  if (e == null)
5862
5862
  return {
5863
5863
  formattedResult: "",
@@ -5909,11 +5909,11 @@ function Sy(e, t) {
5909
5909
  }
5910
5910
  return { formattedResult: c };
5911
5911
  }
5912
- const Ry = () => {
5912
+ const Sy = () => {
5913
5913
  const e = /* @__PURE__ */ new Date();
5914
5914
  return e.setHours(0, 0, 0, 0), e;
5915
5915
  };
5916
- function Ty(e, t) {
5916
+ function Ry(e, t) {
5917
5917
  const r = typeof e == "string" ? Hn(e) : new Date(e), n = /* @__PURE__ */ new Date(), s = Bn(n, r), o = jn(r, s), a = Vn(n, o), i = Mr(o, a), c = Pn(n, i), d = {
5918
5918
  years: "YEARS",
5919
5919
  months: "MONTHS",
@@ -5947,14 +5947,14 @@ const qf = {
5947
5947
  h: 1 / 24,
5948
5948
  min: 1 / 1440,
5949
5949
  s: 1 / 86400
5950
- }, Oy = (e, t, r) => {
5950
+ }, Ty = (e, t, r) => {
5951
5951
  const n = typeof e == "string" ? new Date(e) : e;
5952
5952
  if (isNaN(n.getTime()))
5953
5953
  throw new Error(`Invalid date: ${e}`);
5954
5954
  const s = qf[r] ?? 1, o = t * s;
5955
5955
  return za(n, o);
5956
- }, Ay = (e, t, r, n) => e <= n && r <= t;
5957
- function Ny(e, t, r = !1) {
5956
+ }, Oy = (e, t, r, n) => e <= n && r <= t;
5957
+ function Ay(e, t, r = !1) {
5958
5958
  return !e || !Array.isArray(e) ? [] : e.sort((n, s) => {
5959
5959
  const o = new Date(n[t]), a = new Date(s[t]);
5960
5960
  if (isNaN(o.getTime()) && isNaN(a.getTime())) return 0;
@@ -5993,7 +5993,7 @@ const Mf = () => {
5993
5993
  );
5994
5994
  }
5995
5995
  };
5996
- }, $y = Mf(), Ff = (e) => ce + `/ValueSet/${e}/$expand`, jf = (e) => ce + `/ValueSet/$expand?filter=${encodeURIComponent(e)}`, Vf = (e, t, r) => W + `/bahmni/terminologies/concepts?limit=${t}&locale=${r}&term=${e}`, Bf = (e) => W + `/concept/${e}`, Hf = (e) => `${W}/concept?s=byFullySpecifiedName&name=${encodeURIComponent(e)}`, zf = "SHORT", Gf = "FULLY_SPECIFIED", Py = async (e, t = 20) => {
5996
+ }, Ny = Mf(), Ff = (e) => ce + `/ValueSet/${e}/$expand`, jf = (e) => ce + `/ValueSet/$expand?filter=${encodeURIComponent(e)}`, Vf = (e, t, r) => W + `/bahmni/terminologies/concepts?limit=${t}&locale=${r}&term=${e}`, Bf = (e) => W + `/concept/${e}`, Hf = (e) => `${W}/concept?s=byFullySpecifiedName&name=${encodeURIComponent(e)}`, zf = "SHORT", Gf = "FULLY_SPECIFIED", $y = async (e, t = 20) => {
5997
5997
  const r = qr(), n = Vf(e, t, r);
5998
5998
  return F(n);
5999
5999
  }, br = async (e) => {
@@ -6003,10 +6003,10 @@ const Mf = () => {
6003
6003
  const t = `${jf(e)}`;
6004
6004
  return F(t);
6005
6005
  };
6006
- async function Iy(e) {
6006
+ async function Py(e) {
6007
6007
  return await F(Bf(e));
6008
6008
  }
6009
- async function Cy(e) {
6009
+ async function Iy(e) {
6010
6010
  const t = Hf(e), r = await F(t);
6011
6011
  return !r.results || r.results.length === 0 ? null : r.results[0];
6012
6012
  }
@@ -6062,7 +6062,7 @@ const Wf = (e) => ce + `/AllergyIntolerance?patient=${e}&_count=100&_sort=-_last
6062
6062
  et.ENVIRONMENT.display
6063
6063
  )
6064
6064
  ];
6065
- }, Ly = async (e) => {
6065
+ }, Cy = async (e) => {
6066
6066
  const t = e ?? Jf.code;
6067
6067
  return (await br(t)).compose?.include[0]?.concept ?? [];
6068
6068
  };
@@ -6096,22 +6096,22 @@ function tp(e) {
6096
6096
  };
6097
6097
  });
6098
6098
  }
6099
- async function ky(e) {
6099
+ async function Ly(e) {
6100
6100
  const t = await ep(e);
6101
6101
  return tp(t);
6102
6102
  }
6103
6103
  var rp = /* @__PURE__ */ ((e) => (e.Active = "Active", e.Inactive = "Inactive", e))(rp || {}), np = /* @__PURE__ */ ((e) => (e.mild = "mild", e.moderate = "moderate", e.severe = "severe", e))(np || {});
6104
- const Uy = "http://fhir.openmrs.org/code-system/encounter-type", ei = "problem-list-item", xy = "http://terminology.hl7.org/CodeSystem/condition-ver-status", ti = "encounter-diagnosis", qy = "http://terminology.hl7.org/CodeSystem/condition-clinical", My = "http://terminology.hl7.org/CodeSystem/condition-category", Fy = "http://fhir.bahmni.org/ext/lab-order-concept-type", jy = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", Vy = "http://fhir.bahmni.org/ext/observation/form-namespace-path", By = "http://fhir.bahmni.org/ext/observation/obs-value-attachment", Hy = "Numeric", zy = "Complex", Gy = "final", Ky = "Observation", Yy = /^\d{4}-\d{2}-\d{2}/, sp = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/, Wy = {
6104
+ const ky = "http://fhir.openmrs.org/code-system/encounter-type", ei = "problem-list-item", Uy = "http://terminology.hl7.org/CodeSystem/condition-ver-status", ti = "encounter-diagnosis", xy = "http://terminology.hl7.org/CodeSystem/condition-clinical", qy = "http://terminology.hl7.org/CodeSystem/condition-category", My = "http://fhir.bahmni.org/ext/lab-order-concept-type", Fy = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", jy = "http://fhir.bahmni.org/ext/observation/form-namespace-path", Vy = "http://fhir.bahmni.org/ext/observation/obs-value-attachment", By = "Numeric", Hy = "Complex", zy = "final", Gy = "Observation", Ky = /^\d{4}-\d{2}-\d{2}/, sp = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/, Yy = {
6105
6105
  ABNORMAL: { code: "A", display: "Abnormal" },
6106
6106
  NORMAL: { code: "N", display: "Normal" }
6107
6107
  }, op = (e) => ce + `/Condition?category=${ei}&patient=${e}&_count=100&_sort=-_lastUpdated`, ap = (e, t = 10, r = 0) => ce + `/Condition?category=${ei}&patient=${e}&_count=${t}&_getpagesoffset=${r}&_sort=-_lastUpdated`;
6108
6108
  async function ip(e) {
6109
6109
  return await F(`${op(e)}`);
6110
6110
  }
6111
- async function Jy(e) {
6111
+ async function Wy(e) {
6112
6112
  return (await ip(e)).entry?.filter((n) => n.resource?.resourceType === "Condition").map((n) => n.resource) ?? [];
6113
6113
  }
6114
- async function Qy(e, t = 10, r = 1) {
6114
+ async function Jy(e, t = 10, r = 1) {
6115
6115
  const n = (r - 1) * t, s = await F(
6116
6116
  ap(e, t, n)
6117
6117
  );
@@ -6177,11 +6177,11 @@ function gp(e) {
6177
6177
  }
6178
6178
  return Array.from(t.values());
6179
6179
  }
6180
- async function Xy(e) {
6180
+ async function Qy(e) {
6181
6181
  const t = await fp(e), r = ri(t);
6182
6182
  return gp(r);
6183
6183
  }
6184
- async function Zy(e, t = 10, r = 1) {
6184
+ async function Xy(e, t = 10, r = 1) {
6185
6185
  const n = (r - 1) * t, s = await pp(
6186
6186
  e,
6187
6187
  t,
@@ -6282,7 +6282,7 @@ function Pp(e) {
6282
6282
  function Ip(e) {
6283
6283
  return !e || e.length === 0 ? "" : e.map((t) => t.text).filter(Boolean).join(" ");
6284
6284
  }
6285
- function Cp(e, t, r) {
6285
+ function Dp(e, t, r) {
6286
6286
  if (e?.display)
6287
6287
  return e.display;
6288
6288
  if (e?.reference) {
@@ -6298,7 +6298,7 @@ function Cp(e, t, r) {
6298
6298
  );
6299
6299
  return n?.code?.text ? n.code.text : e?.reference ? e.reference : "Medication";
6300
6300
  }
6301
- function Dp(e, t, r) {
6301
+ function Cp(e, t, r) {
6302
6302
  if (e?.reference) {
6303
6303
  const s = e.reference.split("/").pop();
6304
6304
  if (s) {
@@ -6321,11 +6321,11 @@ function Lp(e) {
6321
6321
  const s = n.resource;
6322
6322
  s.resourceType === "Medication" && r.set(s.id, s);
6323
6323
  }), t.map((n) => {
6324
- const s = n.medicationReference, o = n.requester, a = _p(n), i = Cp(
6324
+ const s = n.medicationReference, o = n.requester, a = _p(n), i = Dp(
6325
6325
  s,
6326
6326
  n,
6327
6327
  r
6328
- ), c = Dp(
6328
+ ), c = Cp(
6329
6329
  s,
6330
6330
  n,
6331
6331
  r
@@ -6355,7 +6355,7 @@ function Lp(e) {
6355
6355
  });
6356
6356
  }
6357
6357
  const Bs = (e) => e.priority === "stat" || e.dosageInstruction?.[0]?.timing?.code?.text === "Immediately" || !1;
6358
- async function ev(e, t, r, n = !1) {
6358
+ async function Zy(e, t, r, n = !1) {
6359
6359
  const s = await Sp(
6360
6360
  e,
6361
6361
  t,
@@ -6364,39 +6364,26 @@ async function ev(e, t, r, n = !1) {
6364
6364
  );
6365
6365
  return Lp(s);
6366
6366
  }
6367
- async function tv() {
6367
+ async function ev() {
6368
6368
  return await F(
6369
6369
  wp
6370
6370
  );
6371
6371
  }
6372
- async function rv(e, t = 20) {
6372
+ async function tv(e, t = 20) {
6373
6373
  return await F(
6374
6374
  Ep(e, t)
6375
6375
  );
6376
6376
  }
6377
- async function nv() {
6377
+ async function rv() {
6378
6378
  return await F(bp);
6379
6379
  }
6380
6380
  const kp = 200, Up = (e, t, r, n, s) => {
6381
6381
  let a = `${ce + `/ServiceRequest?_count=${kp}&_sort=-_lastUpdated`}&category=${e}&patient=${t}`;
6382
6382
  return s && (a += `&_revinclude=${s}`), r ? a += `&encounter=${r}` : n && (a += `&numberOfVisits=${n}`), a;
6383
6383
  };
6384
- function xp(e) {
6385
- if (!e || e.length === 0)
6386
- return [];
6387
- const t = /* @__PURE__ */ new Set();
6388
- return e.filter((r) => {
6389
- const n = r.resource;
6390
- if (!n || n.resourceType !== "ServiceRequest")
6391
- return !0;
6392
- const s = n, o = s.code?.coding?.[0]?.code?.toLowerCase() ?? "", a = s.encounter?.reference?.toLowerCase() ?? "", i = s.requester?.reference?.toLowerCase() ?? "", c = `${o}|${a}|${i}`;
6393
- return t.has(c) ? !1 : (t.add(c), !0);
6394
- });
6395
- }
6396
6384
  async function Pt(e, t, r, n, s) {
6397
6385
  let o;
6398
- r && r.length > 0 && (o = r.join(","));
6399
- const a = await F(
6386
+ return r && r.length > 0 && (o = r.join(",")), await F(
6400
6387
  Up(
6401
6388
  e,
6402
6389
  t,
@@ -6405,10 +6392,9 @@ async function Pt(e, t, r, n, s) {
6405
6392
  s
6406
6393
  )
6407
6394
  );
6408
- return a.entry && (a.entry = xp(a.entry), a.total = a.entry.length), a;
6409
6395
  }
6410
- const qp = (e) => `${ce}/ImagingStudy/${e}/$fetch-quality-assessment`;
6411
- async function sv(e, t, r, n) {
6396
+ const xp = (e) => `${ce}/ImagingStudy/${e}/$fetch-quality-assessment`;
6397
+ async function nv(e, t, r, n) {
6412
6398
  return await Pt(
6413
6399
  t,
6414
6400
  e,
@@ -6416,7 +6402,7 @@ async function sv(e, t, r, n) {
6416
6402
  n
6417
6403
  );
6418
6404
  }
6419
- async function ov(e, t, r, n) {
6405
+ async function sv(e, t, r, n) {
6420
6406
  return await Pt(
6421
6407
  t,
6422
6408
  e,
@@ -6425,7 +6411,7 @@ async function ov(e, t, r, n) {
6425
6411
  "ImagingStudy:basedon"
6426
6412
  );
6427
6413
  }
6428
- async function av(e, t, r, n) {
6414
+ async function ov(e, t, r, n) {
6429
6415
  return (await Pt(
6430
6416
  t,
6431
6417
  e,
@@ -6433,10 +6419,10 @@ async function av(e, t, r, n) {
6433
6419
  n
6434
6420
  )).entry?.filter((a) => a.resource?.resourceType === "ServiceRequest").map((a) => a.resource) ?? [];
6435
6421
  }
6436
- async function iv(e) {
6437
- return await F(qp(e));
6422
+ async function av(e) {
6423
+ return await F(xp(e));
6438
6424
  }
6439
- async function cv(e, t, r, n) {
6425
+ async function iv(e, t, r, n) {
6440
6426
  return await Pt(
6441
6427
  t,
6442
6428
  e,
@@ -6444,36 +6430,36 @@ async function cv(e, t, r, n) {
6444
6430
  n
6445
6431
  );
6446
6432
  }
6447
- const Mp = (e, t) => {
6433
+ const qp = (e, t) => {
6448
6434
  const r = `${ce}/DiagnosticReport?patient=${e}`;
6449
6435
  return t ? `${r}&based-on=${t}` : r;
6450
- }, Fp = (e) => `${ce}/DiagnosticReport/${e}/$fetch-bundle`, jp = (e) => `${ce}/DiagnosticReport/${e}/$update-bundle`;
6451
- async function uv(e, t = []) {
6452
- const r = t.length > 0 ? t.join(",") : void 0, n = Mp(e, r);
6436
+ }, Mp = (e) => `${ce}/DiagnosticReport/${e}/$fetch-bundle`, Fp = (e) => `${ce}/DiagnosticReport/${e}/$update-bundle`;
6437
+ async function cv(e, t = []) {
6438
+ const r = t.length > 0 ? t.join(",") : void 0, n = qp(e, r);
6453
6439
  return await F(n);
6454
6440
  }
6455
- async function lv(e) {
6456
- const t = Fp(e);
6441
+ async function uv(e) {
6442
+ const t = Mp(e);
6457
6443
  return await F(t);
6458
6444
  }
6459
- async function dv(e, t) {
6460
- const r = jp(e);
6461
- return await Ce(r, t);
6445
+ async function lv(e, t) {
6446
+ const r = Fp(e);
6447
+ return await De(r, t);
6462
6448
  }
6463
- const fv = [
6449
+ const dv = [
6464
6450
  "preliminary",
6465
6451
  "final",
6466
6452
  "amended",
6467
6453
  "corrected",
6468
6454
  "appended"
6469
- ], pv = [
6455
+ ], fv = [
6470
6456
  "registered",
6471
6457
  "unknown",
6472
6458
  "partial"
6473
- ], Vp = "All Orderables", Bp = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", Hp = "LabSet", zp = "http://fhir.bahmni.org/ext/ValueSet/concept-class", hv = ["orderTypes"], Gp = async () => await Kf(Vp), zn = async () => await F(Bp), Kp = (e) => {
6459
+ ], jp = "All Orderables", Vp = "/openmrs/ws/rest/v1/ordertype?v=custom:(uuid,display,conceptClasses:(uuid,name))", Bp = "LabSet", Hp = "http://fhir.bahmni.org/ext/ValueSet/concept-class", pv = ["orderTypes"], zp = async () => await Kf(jp), zn = async () => await F(Vp), Gp = (e) => {
6474
6460
  let t = e.display ?? "Unknown investigation";
6475
- return ni(e) === Hp && (t += ` (${ie.t("INVESTIGATION_PANEL")})`), t;
6476
- }, Yp = (e) => {
6461
+ return ni(e) === Bp && (t += ` (${ie.t("INVESTIGATION_PANEL")})`), t;
6462
+ }, Kp = (e) => {
6477
6463
  const t = /* @__PURE__ */ new Map();
6478
6464
  return e.results.forEach((r) => {
6479
6465
  r.conceptClasses.forEach((n) => {
@@ -6482,10 +6468,10 @@ const fv = [
6482
6468
  }), t;
6483
6469
  }, ni = (e) => {
6484
6470
  const t = e.extension?.find(
6485
- (r) => r.url === zp
6471
+ (r) => r.url === Hp
6486
6472
  );
6487
6473
  return t ? t.valueString ?? "" : "";
6488
- }, Wp = (e, t) => {
6474
+ }, Yp = (e, t) => {
6489
6475
  const r = [];
6490
6476
  return !e.expansion?.contains || e.expansion.contains.length === 0 || t.size === 0 || e.expansion.contains.forEach((n) => {
6491
6477
  n.contains?.forEach((s) => {
@@ -6495,19 +6481,19 @@ const fv = [
6495
6481
  return;
6496
6482
  r.filter((d) => d.code === o.code && d.categoryCode === i.uuid).length > 0 || r.push({
6497
6483
  code: o.code ?? "",
6498
- display: Kp(o),
6484
+ display: Gp(o),
6499
6485
  category: i.display,
6500
6486
  categoryCode: i.uuid
6501
6487
  });
6502
6488
  });
6503
6489
  });
6504
6490
  }), r;
6505
- }, mv = async () => {
6506
- const e = await Gp(), t = await zn();
6507
- return Wp(e, Yp(t));
6508
- }, gv = async (e) => e ? (await zn()).results.find(
6491
+ }, hv = async () => {
6492
+ const e = await zp(), t = await zn();
6493
+ return Yp(e, Kp(t));
6494
+ }, mv = async (e) => e ? (await zn()).results.find(
6509
6495
  (n) => n.display.toLowerCase() === e.toLowerCase()
6510
- )?.uuid ?? null : null, yv = async () => (await zn()).results.map((t) => t.display), vv = async (e, t, r) => {
6496
+ )?.uuid ?? null : null, gv = async () => (await zn()).results.map((t) => t.display), yv = async (e, t, r) => {
6511
6497
  const n = [];
6512
6498
  for (const s of e) {
6513
6499
  const o = s.uuid;
@@ -6527,10 +6513,10 @@ const fv = [
6527
6513
  }
6528
6514
  return n;
6529
6515
  };
6530
- function Jp(e) {
6516
+ function Wp(e) {
6531
6517
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6532
6518
  }
6533
- var Lt = { exports: {} }, un = {}, De = {}, je = {}, ln = {}, dn = {}, fn = {}, Hs;
6519
+ var Lt = { exports: {} }, un = {}, Ce = {}, je = {}, ln = {}, dn = {}, fn = {}, Hs;
6534
6520
  function Pr() {
6535
6521
  return Hs || (Hs = 1, (function(e) {
6536
6522
  Object.defineProperty(e, "__esModule", { value: !0 }), e.regexpCode = e.getEsmExportName = e.getProperty = e.safeStringify = e.stringify = e.strConcat = e.addCodeArg = e.str = e._ = e.nil = e._Code = e.Name = e.IDENTIFIER = e._CodeOrName = void 0;
@@ -6829,12 +6815,12 @@ function Z() {
6829
6815
  }
6830
6816
  }
6831
6817
  class a extends o {
6832
- constructor(w, T, C) {
6833
- super(), this.varKind = w, this.name = T, this.rhs = C;
6818
+ constructor(w, T, D) {
6819
+ super(), this.varKind = w, this.name = T, this.rhs = D;
6834
6820
  }
6835
6821
  render({ es5: w, _n: T }) {
6836
- const C = w ? r.varKinds.var : this.varKind, V = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
6837
- return `${C} ${this.name}${V};` + T;
6822
+ const D = w ? r.varKinds.var : this.varKind, V = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
6823
+ return `${D} ${this.name}${V};` + T;
6838
6824
  }
6839
6825
  optimizeNames(w, T) {
6840
6826
  if (w[this.name.str])
@@ -6845,8 +6831,8 @@ function Z() {
6845
6831
  }
6846
6832
  }
6847
6833
  class i extends o {
6848
- constructor(w, T, C) {
6849
- super(), this.lhs = w, this.rhs = T, this.sideEffects = C;
6834
+ constructor(w, T, D) {
6835
+ super(), this.lhs = w, this.rhs = T, this.sideEffects = D;
6850
6836
  }
6851
6837
  render({ _n: w }) {
6852
6838
  return `${this.lhs} = ${this.rhs};` + w;
@@ -6861,8 +6847,8 @@ function Z() {
6861
6847
  }
6862
6848
  }
6863
6849
  class c extends i {
6864
- constructor(w, T, C, V) {
6865
- super(w, C, V), this.op = T;
6850
+ constructor(w, T, D, V) {
6851
+ super(w, D, V), this.op = T;
6866
6852
  }
6867
6853
  render({ _n: w }) {
6868
6854
  return `${this.lhs} ${this.op}= ${this.rhs};` + w;
@@ -6917,25 +6903,25 @@ function Z() {
6917
6903
  super(), this.nodes = w;
6918
6904
  }
6919
6905
  render(w) {
6920
- return this.nodes.reduce((T, C) => T + C.render(w), "");
6906
+ return this.nodes.reduce((T, D) => T + D.render(w), "");
6921
6907
  }
6922
6908
  optimizeNodes() {
6923
6909
  const { nodes: w } = this;
6924
6910
  let T = w.length;
6925
6911
  for (; T--; ) {
6926
- const C = w[T].optimizeNodes();
6927
- Array.isArray(C) ? w.splice(T, 1, ...C) : C ? w[T] = C : w.splice(T, 1);
6912
+ const D = w[T].optimizeNodes();
6913
+ Array.isArray(D) ? w.splice(T, 1, ...D) : D ? w[T] = D : w.splice(T, 1);
6928
6914
  }
6929
6915
  return w.length > 0 ? this : void 0;
6930
6916
  }
6931
6917
  optimizeNames(w, T) {
6932
- const { nodes: C } = this;
6933
- let V = C.length;
6918
+ const { nodes: D } = this;
6919
+ let V = D.length;
6934
6920
  for (; V--; ) {
6935
- const z = C[V];
6936
- z.optimizeNames(w, T) || (re(w, z.names), C.splice(V, 1));
6921
+ const z = D[V];
6922
+ z.optimizeNames(w, T) || (re(w, z.names), D.splice(V, 1));
6937
6923
  }
6938
- return C.length > 0 ? this : void 0;
6924
+ return D.length > 0 ? this : void 0;
6939
6925
  }
6940
6926
  get names() {
6941
6927
  return this.nodes.reduce((w, T) => j(w, T.names), {});
@@ -6966,8 +6952,8 @@ function Z() {
6966
6952
  return this.nodes;
6967
6953
  let T = this.else;
6968
6954
  if (T) {
6969
- const C = T.optimizeNodes();
6970
- T = this.else = Array.isArray(C) ? new f(C) : C;
6955
+ const D = T.optimizeNodes();
6956
+ T = this.else = Array.isArray(D) ? new f(D) : D;
6971
6957
  }
6972
6958
  if (T)
6973
6959
  return w === !1 ? T instanceof p ? T : T.nodes : this.nodes.length ? this : new p(ne(w), T instanceof p ? [T] : T.nodes);
@@ -6975,8 +6961,8 @@ function Z() {
6975
6961
  return this;
6976
6962
  }
6977
6963
  optimizeNames(w, T) {
6978
- var C;
6979
- if (this.else = (C = this.else) === null || C === void 0 ? void 0 : C.optimizeNames(w, T), !!(super.optimizeNames(w, T) || this.else))
6964
+ var D;
6965
+ if (this.else = (D = this.else) === null || D === void 0 ? void 0 : D.optimizeNames(w, T), !!(super.optimizeNames(w, T) || this.else))
6980
6966
  return this.condition = G(this.condition, w, T), this;
6981
6967
  }
6982
6968
  get names() {
@@ -7004,12 +6990,12 @@ function Z() {
7004
6990
  }
7005
6991
  }
7006
6992
  class E extends u {
7007
- constructor(w, T, C, V) {
7008
- super(), this.varKind = w, this.name = T, this.from = C, this.to = V;
6993
+ constructor(w, T, D, V) {
6994
+ super(), this.varKind = w, this.name = T, this.from = D, this.to = V;
7009
6995
  }
7010
6996
  render(w) {
7011
- const T = w.es5 ? r.varKinds.var : this.varKind, { name: C, from: V, to: z } = this;
7012
- return `for(${T} ${C}=${V}; ${C}<${z}; ${C}++)` + super.render(w);
6997
+ const T = w.es5 ? r.varKinds.var : this.varKind, { name: D, from: V, to: z } = this;
6998
+ return `for(${T} ${D}=${V}; ${D}<${z}; ${D}++)` + super.render(w);
7013
6999
  }
7014
7000
  get names() {
7015
7001
  const w = B(super.names, this.from);
@@ -7017,8 +7003,8 @@ function Z() {
7017
7003
  }
7018
7004
  }
7019
7005
  class _ extends u {
7020
- constructor(w, T, C, V) {
7021
- super(), this.loop = w, this.varKind = T, this.name = C, this.iterable = V;
7006
+ constructor(w, T, D, V) {
7007
+ super(), this.loop = w, this.varKind = T, this.name = D, this.iterable = V;
7022
7008
  }
7023
7009
  render(w) {
7024
7010
  return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(w);
@@ -7032,8 +7018,8 @@ function Z() {
7032
7018
  }
7033
7019
  }
7034
7020
  class b extends y {
7035
- constructor(w, T, C) {
7036
- super(), this.name = w, this.args = T, this.async = C;
7021
+ constructor(w, T, D) {
7022
+ super(), this.name = w, this.args = T, this.async = D;
7037
7023
  }
7038
7024
  render(w) {
7039
7025
  return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(w);
@@ -7056,8 +7042,8 @@ function Z() {
7056
7042
  return super.optimizeNodes(), (w = this.catch) === null || w === void 0 || w.optimizeNodes(), (T = this.finally) === null || T === void 0 || T.optimizeNodes(), this;
7057
7043
  }
7058
7044
  optimizeNames(w, T) {
7059
- var C, V;
7060
- return super.optimizeNames(w, T), (C = this.catch) === null || C === void 0 || C.optimizeNames(w, T), (V = this.finally) === null || V === void 0 || V.optimizeNames(w, T), this;
7045
+ var D, V;
7046
+ return super.optimizeNames(w, T), (D = this.catch) === null || D === void 0 || D.optimizeNames(w, T), (V = this.finally) === null || V === void 0 || V.optimizeNames(w, T), this;
7061
7047
  }
7062
7048
  get names() {
7063
7049
  const w = super.names;
@@ -7097,8 +7083,8 @@ function Z() {
7097
7083
  }
7098
7084
  // reserves unique name in the external scope and assigns value to it
7099
7085
  scopeValue(w, T) {
7100
- const C = this._extScope.value(w, T);
7101
- return (this._values[C.prefix] || (this._values[C.prefix] = /* @__PURE__ */ new Set())).add(C), C;
7086
+ const D = this._extScope.value(w, T);
7087
+ return (this._values[D.prefix] || (this._values[D.prefix] = /* @__PURE__ */ new Set())).add(D), D;
7102
7088
  }
7103
7089
  getScopeValue(w, T) {
7104
7090
  return this._extScope.getValue(w, T);
@@ -7111,25 +7097,25 @@ function Z() {
7111
7097
  scopeCode() {
7112
7098
  return this._extScope.scopeCode(this._values);
7113
7099
  }
7114
- _def(w, T, C, V) {
7100
+ _def(w, T, D, V) {
7115
7101
  const z = this._scope.toName(T);
7116
- return C !== void 0 && V && (this._constants[z.str] = C), this._leafNode(new a(w, z, C)), z;
7102
+ return D !== void 0 && V && (this._constants[z.str] = D), this._leafNode(new a(w, z, D)), z;
7117
7103
  }
7118
7104
  // `const` declaration (`var` in es5 mode)
7119
- const(w, T, C) {
7120
- return this._def(r.varKinds.const, w, T, C);
7105
+ const(w, T, D) {
7106
+ return this._def(r.varKinds.const, w, T, D);
7121
7107
  }
7122
7108
  // `let` declaration with optional assignment (`var` in es5 mode)
7123
- let(w, T, C) {
7124
- return this._def(r.varKinds.let, w, T, C);
7109
+ let(w, T, D) {
7110
+ return this._def(r.varKinds.let, w, T, D);
7125
7111
  }
7126
7112
  // `var` declaration with optional assignment
7127
- var(w, T, C) {
7128
- return this._def(r.varKinds.var, w, T, C);
7113
+ var(w, T, D) {
7114
+ return this._def(r.varKinds.var, w, T, D);
7129
7115
  }
7130
7116
  // assignment code
7131
- assign(w, T, C) {
7132
- return this._leafNode(new i(w, T, C));
7117
+ assign(w, T, D) {
7118
+ return this._leafNode(new i(w, T, D));
7133
7119
  }
7134
7120
  // `+=` code
7135
7121
  add(w, T) {
@@ -7142,17 +7128,17 @@ function Z() {
7142
7128
  // returns code for object literal for the passed argument list of key-value pairs
7143
7129
  object(...w) {
7144
7130
  const T = ["{"];
7145
- for (const [C, V] of w)
7146
- T.length > 1 && T.push(","), T.push(C), (C !== V || this.opts.es5) && (T.push(":"), (0, t.addCodeArg)(T, V));
7131
+ for (const [D, V] of w)
7132
+ T.length > 1 && T.push(","), T.push(D), (D !== V || this.opts.es5) && (T.push(":"), (0, t.addCodeArg)(T, V));
7147
7133
  return T.push("}"), new t._Code(T);
7148
7134
  }
7149
7135
  // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
7150
- if(w, T, C) {
7151
- if (this._blockNode(new p(w)), T && C)
7152
- this.code(T).else().code(C).endIf();
7136
+ if(w, T, D) {
7137
+ if (this._blockNode(new p(w)), T && D)
7138
+ this.code(T).else().code(D).endIf();
7153
7139
  else if (T)
7154
7140
  this.code(T).endIf();
7155
- else if (C)
7141
+ else if (D)
7156
7142
  throw new Error('CodeGen: "else" body without "then" body');
7157
7143
  return this;
7158
7144
  }
@@ -7176,28 +7162,28 @@ function Z() {
7176
7162
  return this._for(new h(w), T);
7177
7163
  }
7178
7164
  // `for` statement for a range of values
7179
- forRange(w, T, C, V, z = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
7165
+ forRange(w, T, D, V, z = this.opts.es5 ? r.varKinds.var : r.varKinds.let) {
7180
7166
  const se = this._scope.toName(w);
7181
- return this._for(new E(z, se, T, C), () => V(se));
7167
+ return this._for(new E(z, se, T, D), () => V(se));
7182
7168
  }
7183
7169
  // `for-of` statement (in es5 mode replace with a normal for loop)
7184
- forOf(w, T, C, V = r.varKinds.const) {
7170
+ forOf(w, T, D, V = r.varKinds.const) {
7185
7171
  const z = this._scope.toName(w);
7186
7172
  if (this.opts.es5) {
7187
7173
  const se = T instanceof t.Name ? T : this.var("_arr", T);
7188
7174
  return this.forRange("_i", 0, (0, t._)`${se}.length`, (ee) => {
7189
- this.var(z, (0, t._)`${se}[${ee}]`), C(z);
7175
+ this.var(z, (0, t._)`${se}[${ee}]`), D(z);
7190
7176
  });
7191
7177
  }
7192
- return this._for(new _("of", V, z, T), () => C(z));
7178
+ return this._for(new _("of", V, z, T), () => D(z));
7193
7179
  }
7194
7180
  // `for-in` statement.
7195
7181
  // With option `ownProperties` replaced with a `for-of` loop for object keys
7196
- forIn(w, T, C, V = this.opts.es5 ? r.varKinds.var : r.varKinds.const) {
7182
+ forIn(w, T, D, V = this.opts.es5 ? r.varKinds.var : r.varKinds.const) {
7197
7183
  if (this.opts.ownProperties)
7198
- return this.forOf(w, (0, t._)`Object.keys(${T})`, C);
7184
+ return this.forOf(w, (0, t._)`Object.keys(${T})`, D);
7199
7185
  const z = this._scope.toName(w);
7200
- return this._for(new _("in", V, z, T), () => C(z));
7186
+ return this._for(new _("in", V, z, T), () => D(z));
7201
7187
  }
7202
7188
  // end `for` loop
7203
7189
  endFor() {
@@ -7219,15 +7205,15 @@ function Z() {
7219
7205
  return this._endBlockNode(R);
7220
7206
  }
7221
7207
  // `try` statement
7222
- try(w, T, C) {
7223
- if (!T && !C)
7208
+ try(w, T, D) {
7209
+ if (!T && !D)
7224
7210
  throw new Error('CodeGen: "try" without "catch" and "finally"');
7225
7211
  const V = new N();
7226
7212
  if (this._blockNode(V), this.code(w), T) {
7227
7213
  const z = this.name("e");
7228
7214
  this._currNode = V.catch = new k(z), T(z);
7229
7215
  }
7230
- return C && (this._currNode = V.finally = new M(), this.code(C)), this._endBlockNode(k, M);
7216
+ return D && (this._currNode = V.finally = new M(), this.code(D)), this._endBlockNode(k, M);
7231
7217
  }
7232
7218
  // `throw` statement
7233
7219
  throw(w) {
@@ -7242,14 +7228,14 @@ function Z() {
7242
7228
  const T = this._blockStarts.pop();
7243
7229
  if (T === void 0)
7244
7230
  throw new Error("CodeGen: not in self-balancing block");
7245
- const C = this._nodes.length - T;
7246
- if (C < 0 || w !== void 0 && C !== w)
7247
- throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${w} expected`);
7231
+ const D = this._nodes.length - T;
7232
+ if (D < 0 || w !== void 0 && D !== w)
7233
+ throw new Error(`CodeGen: wrong number of nodes: ${D} vs ${w} expected`);
7248
7234
  return this._nodes.length = T, this;
7249
7235
  }
7250
7236
  // `function` heading (or definition if funcBody is passed)
7251
- func(w, T = t.nil, C, V) {
7252
- return this._blockNode(new b(w, T, C)), V && this.code(V).endFunc(), this;
7237
+ func(w, T = t.nil, D, V) {
7238
+ return this._blockNode(new b(w, T, D)), V && this.code(V).endFunc(), this;
7253
7239
  }
7254
7240
  // end function definition
7255
7241
  endFunc() {
@@ -7266,8 +7252,8 @@ function Z() {
7266
7252
  this._currNode.nodes.push(w), this._nodes.push(w);
7267
7253
  }
7268
7254
  _endBlockNode(w, T) {
7269
- const C = this._currNode;
7270
- if (C instanceof w || T && C instanceof T)
7255
+ const D = this._currNode;
7256
+ if (D instanceof w || T && D instanceof T)
7271
7257
  return this._nodes.pop(), this;
7272
7258
  throw new Error(`CodeGen: not in block "${T ? `${w.kind}/${T.kind}` : w.kind}"`);
7273
7259
  }
@@ -7300,11 +7286,11 @@ function Z() {
7300
7286
  }
7301
7287
  function G(P, w, T) {
7302
7288
  if (P instanceof t.Name)
7303
- return C(P);
7289
+ return D(P);
7304
7290
  if (!V(P))
7305
7291
  return P;
7306
- return new t._Code(P._items.reduce((z, se) => (se instanceof t.Name && (se = C(se)), se instanceof t._Code ? z.push(...se._items) : z.push(se), z), []));
7307
- function C(z) {
7292
+ return new t._Code(P._items.reduce((z, se) => (se instanceof t.Name && (se = D(se)), se instanceof t._Code ? z.push(...se._items) : z.push(se), z), []));
7293
+ function D(z) {
7308
7294
  const se = T[z.str];
7309
7295
  return se === void 0 || w[z.str] !== 1 ? z : (delete w[z.str], se);
7310
7296
  }
@@ -7317,7 +7303,7 @@ function Z() {
7317
7303
  P[T] = (P[T] || 0) - (w[T] || 0);
7318
7304
  }
7319
7305
  function ne(P) {
7320
- return typeof P == "boolean" || typeof P == "number" || P === null ? !P : (0, t._)`!${D(P)}`;
7306
+ return typeof P == "boolean" || typeof P == "number" || P === null ? !P : (0, t._)`!${C(P)}`;
7321
7307
  }
7322
7308
  e.not = ne;
7323
7309
  const fe = A(e.operators.AND);
@@ -7331,9 +7317,9 @@ function Z() {
7331
7317
  }
7332
7318
  e.or = U;
7333
7319
  function A(P) {
7334
- return (w, T) => w === t.nil ? T : T === t.nil ? w : (0, t._)`${D(w)} ${P} ${D(T)}`;
7320
+ return (w, T) => w === t.nil ? T : T === t.nil ? w : (0, t._)`${C(w)} ${P} ${C(T)}`;
7335
7321
  }
7336
- function D(P) {
7322
+ function C(P) {
7337
7323
  return P instanceof t.Name ? P : (0, t._)`(${P})`;
7338
7324
  }
7339
7325
  })(dn)), dn;
@@ -7591,7 +7577,7 @@ function Vr() {
7591
7577
  })(ln)), ln;
7592
7578
  }
7593
7579
  var Qs;
7594
- function Qp() {
7580
+ function Jp() {
7595
7581
  if (Qs) return je;
7596
7582
  Qs = 1, Object.defineProperty(je, "__esModule", { value: !0 }), je.boolOrEmptySchema = je.topBoolOrEmptySchema = void 0;
7597
7583
  const e = Vr(), t = Z(), r = Fe(), n = {
@@ -7816,7 +7802,7 @@ function Ir() {
7816
7802
  return me;
7817
7803
  }
7818
7804
  var gt = {}, to;
7819
- function Xp() {
7805
+ function Qp() {
7820
7806
  if (to) return gt;
7821
7807
  to = 1, Object.defineProperty(gt, "__esModule", { value: !0 }), gt.assignDefaults = void 0;
7822
7808
  const e = Z(), t = te();
@@ -7952,7 +7938,7 @@ function Pe() {
7952
7938
  return oe.validateUnion = p, oe;
7953
7939
  }
7954
7940
  var no;
7955
- function Zp() {
7941
+ function Xp() {
7956
7942
  if (no) return Ne;
7957
7943
  no = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.validateKeywordUsage = Ne.validSchemaType = Ne.funcKeywordCode = Ne.macroKeywordCode = void 0;
7958
7944
  const e = Z(), t = Fe(), r = Pe(), n = Vr();
@@ -8041,7 +8027,7 @@ function Zp() {
8041
8027
  return Ne.validateKeywordUsage = m, Ne;
8042
8028
  }
8043
8029
  var ke = {}, so;
8044
- function eh() {
8030
+ function Zp() {
8045
8031
  if (so) return ke;
8046
8032
  so = 1, Object.defineProperty(ke, "__esModule", { value: !0 }), ke.extendSubschemaMode = ke.extendSubschemaData = ke.getSubschema = void 0;
8047
8033
  const e = Z(), t = te();
@@ -8125,7 +8111,7 @@ function ai() {
8125
8111
  }), hn;
8126
8112
  }
8127
8113
  var mn = { exports: {} }, ao;
8128
- function th() {
8114
+ function eh() {
8129
8115
  if (ao) return mn.exports;
8130
8116
  ao = 1;
8131
8117
  var e = mn.exports = function(n, s, o) {
@@ -8203,7 +8189,7 @@ var io;
8203
8189
  function Br() {
8204
8190
  if (io) return ye;
8205
8191
  io = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.getSchemaRefs = ye.resolveUrl = ye.normalizeId = ye._getFullPath = ye.getFullPath = ye.inlineRef = void 0;
8206
- const e = te(), t = ai(), r = th(), n = /* @__PURE__ */ new Set([
8192
+ const e = te(), t = ai(), r = eh(), n = /* @__PURE__ */ new Set([
8207
8193
  "type",
8208
8194
  "format",
8209
8195
  "pattern",
@@ -8310,9 +8296,9 @@ function Br() {
8310
8296
  }
8311
8297
  var co;
8312
8298
  function Hr() {
8313
- if (co) return De;
8314
- co = 1, Object.defineProperty(De, "__esModule", { value: !0 }), De.getData = De.KeywordCxt = De.validateFunctionCode = void 0;
8315
- const e = Qp(), t = Ir(), r = oi(), n = Ir(), s = Xp(), o = Zp(), a = eh(), i = Z(), c = Fe(), d = Br(), l = te(), m = Vr();
8299
+ if (co) return Ce;
8300
+ co = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.getData = Ce.KeywordCxt = Ce.validateFunctionCode = void 0;
8301
+ const e = Jp(), t = Ir(), r = oi(), n = Ir(), s = Qp(), o = Xp(), a = Zp(), i = Z(), c = Fe(), d = Br(), l = te(), m = Vr();
8316
8302
  function v(O) {
8317
8303
  if (_(O) && (R(O), E(O))) {
8318
8304
  f(O);
@@ -8320,7 +8306,7 @@ function Hr() {
8320
8306
  }
8321
8307
  S(O, () => (0, e.topBoolOrEmptySchema)(O));
8322
8308
  }
8323
- De.validateFunctionCode = v;
8309
+ Ce.validateFunctionCode = v;
8324
8310
  function S({ gen: O, validateName: $, schema: L, schemaEnv: x, opts: H }, X) {
8325
8311
  H.code.es5 ? O.func($, (0, i._)`${c.default.data}, ${c.default.valCxt}`, x.$async, () => {
8326
8312
  O.code((0, i._)`"use strict"; ${u(L, H)}`), g(O, H), O.code(X);
@@ -8460,11 +8446,11 @@ function Hr() {
8460
8446
  const H = L[x];
8461
8447
  if (typeof H == "object" && (0, r.shouldUseRule)(O.schema, H)) {
8462
8448
  const { type: X } = H.definition;
8463
- X.length && !X.some((pe) => D($, pe)) && T(O, `missing type "${X.join(",")}" for keyword "${x}"`);
8449
+ X.length && !X.some((pe) => C($, pe)) && T(O, `missing type "${X.join(",")}" for keyword "${x}"`);
8464
8450
  }
8465
8451
  }
8466
8452
  }
8467
- function D(O, $) {
8453
+ function C(O, $) {
8468
8454
  return O.includes($) || $ === "number" && O.includes("integer");
8469
8455
  }
8470
8456
  function P(O, $) {
@@ -8480,7 +8466,7 @@ function Hr() {
8480
8466
  const L = O.schemaEnv.baseId + O.errSchemaPath;
8481
8467
  $ += ` at "${L}" (strictTypes)`, (0, l.checkStrictMode)(O, $, O.opts.strictTypes);
8482
8468
  }
8483
- class C {
8469
+ class D {
8484
8470
  constructor($, L, x) {
8485
8471
  if ((0, o.validateKeywordUsage)($, L, x), this.gen = $.gen, this.allErrors = $.allErrors, this.keyword = x, this.data = $.data, this.schema = $.schema[x], this.$data = L.$data && $.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, l.schemaRefOrVal)($, this.schema, x, this.$data), this.schemaType = L.schemaType, this.parentSchema = $.schema, this.params = {}, this.it = $, this.def = L, this.$data)
8486
8472
  this.schemaCode = $.gen.const("vSchema", ee(this.$data, $));
@@ -8581,9 +8567,9 @@ function Hr() {
8581
8567
  return H.if(L, () => this.mergeEvaluated($, i.Name)), !0;
8582
8568
  }
8583
8569
  }
8584
- De.KeywordCxt = C;
8570
+ Ce.KeywordCxt = D;
8585
8571
  function V(O, $, L, x) {
8586
- const H = new C(O, L, $);
8572
+ const H = new D(O, L, $);
8587
8573
  "code" in L ? L.code(H, x) : H.$data && L.validate ? (0, o.funcKeywordCode)(H, L) : "macro" in L ? (0, o.macroKeywordCode)(H, L) : (L.compile || L.validate) && (0, o.funcKeywordCode)(H, L);
8588
8574
  }
8589
8575
  const z = /^\/(?:[^~]|~0|~1)*$/, se = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
@@ -8619,7 +8605,7 @@ function Hr() {
8619
8605
  return `Cannot access ${we} ${he} levels up, current level is ${$}`;
8620
8606
  }
8621
8607
  }
8622
- return De.getData = ee, De;
8608
+ return Ce.getData = ee, Ce;
8623
8609
  }
8624
8610
  var Ut = {}, uo;
8625
8611
  function Gn() {
@@ -8802,16 +8788,16 @@ function Kn() {
8802
8788
  }
8803
8789
  return _e;
8804
8790
  }
8805
- const rh = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", nh = "Meta-schema for $data reference (JSON AnySchema extension proposal)", sh = "object", oh = ["$data"], ah = { $data: { type: "string", anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] } }, ih = !1, ch = {
8806
- $id: rh,
8807
- description: nh,
8808
- type: sh,
8809
- required: oh,
8810
- properties: ah,
8811
- additionalProperties: ih
8791
+ const th = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", rh = "Meta-schema for $data reference (JSON AnySchema extension proposal)", nh = "object", sh = ["$data"], oh = { $data: { type: "string", anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] } }, ah = !1, ih = {
8792
+ $id: th,
8793
+ description: rh,
8794
+ type: nh,
8795
+ required: sh,
8796
+ properties: oh,
8797
+ additionalProperties: ah
8812
8798
  };
8813
8799
  var qt = {}, yt = { exports: {} }, gn, po;
8814
- function uh() {
8800
+ function ch() {
8815
8801
  return po || (po = 1, gn = {
8816
8802
  HEX: {
8817
8803
  0: 0,
@@ -8840,10 +8826,10 @@ function uh() {
8840
8826
  }), gn;
8841
8827
  }
8842
8828
  var yn, ho;
8843
- function lh() {
8829
+ function uh() {
8844
8830
  if (ho) return yn;
8845
8831
  ho = 1;
8846
- const { HEX: e } = uh(), t = /^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;
8832
+ const { HEX: e } = ch(), t = /^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;
8847
8833
  function r(g) {
8848
8834
  if (i(g, ".") < 3)
8849
8835
  return { host: g, isIPV4: !1 };
@@ -8975,7 +8961,7 @@ function lh() {
8975
8961
  }, yn;
8976
8962
  }
8977
8963
  var vn, mo;
8978
- function dh() {
8964
+ function lh() {
8979
8965
  if (mo) return vn;
8980
8966
  mo = 1;
8981
8967
  const e = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu, t = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
@@ -9067,10 +9053,10 @@ function dh() {
9067
9053
  return vn = p, vn;
9068
9054
  }
9069
9055
  var go;
9070
- function fh() {
9056
+ function dh() {
9071
9057
  if (go) return yt.exports;
9072
9058
  go = 1;
9073
- const { normalizeIPv6: e, normalizeIPv4: t, removeDotSegments: r, recomposeAuthority: n, normalizeComponentEncoding: s } = lh(), o = dh();
9059
+ const { normalizeIPv6: e, normalizeIPv4: t, removeDotSegments: r, recomposeAuthority: n, normalizeComponentEncoding: s } = uh(), o = lh();
9074
9060
  function a(f, p) {
9075
9061
  return typeof f == "string" ? f = l(y(f, p), p) : typeof f == "object" && (f = y(l(f, p), p)), f;
9076
9062
  }
@@ -9166,14 +9152,14 @@ function fh() {
9166
9152
  return yt.exports = g, yt.exports.default = g, yt.exports.fastUri = g, yt.exports;
9167
9153
  }
9168
9154
  var yo;
9169
- function ph() {
9155
+ function fh() {
9170
9156
  if (yo) return qt;
9171
9157
  yo = 1, Object.defineProperty(qt, "__esModule", { value: !0 });
9172
- const e = fh();
9158
+ const e = dh();
9173
9159
  return e.code = 'require("ajv/dist/runtime/uri").default', qt.default = e, qt;
9174
9160
  }
9175
9161
  var vo;
9176
- function hh() {
9162
+ function ph() {
9177
9163
  return vo || (vo = 1, (function(e) {
9178
9164
  Object.defineProperty(e, "__esModule", { value: !0 }), e.CodeGen = e.Name = e.nil = e.stringify = e.str = e._ = e.KeywordCxt = void 0;
9179
9165
  var t = Hr();
@@ -9194,7 +9180,7 @@ function hh() {
9194
9180
  } }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
9195
9181
  return r.CodeGen;
9196
9182
  } });
9197
- const n = Gn(), s = zr(), o = si(), a = Kn(), i = Z(), c = Br(), d = Ir(), l = te(), m = ch, v = ph(), S = (U, A) => new RegExp(U, A);
9183
+ const n = Gn(), s = zr(), o = si(), a = Kn(), i = Z(), c = Br(), d = Ir(), l = te(), m = ih, v = fh(), S = (U, A) => new RegExp(U, A);
9198
9184
  S.code = "new RegExp";
9199
9185
  const y = ["removeAdditional", "useDefaults", "coerceTypes"], g = /* @__PURE__ */ new Set([
9200
9186
  "validate",
@@ -9232,10 +9218,10 @@ function hh() {
9232
9218
  unicode: '"minLength"/"maxLength" account for unicode characters by default.'
9233
9219
  }, u = 200;
9234
9220
  function h(U) {
9235
- var A, D, P, w, T, C, V, z, se, ee, O, $, L, x, H, X, pe, Ae, ve, we, he, Ye, Se, Gr, Kr;
9236
- const lt = U.strict, Yr = (A = U.code) === null || A === void 0 ? void 0 : A.optimize, Jn = Yr === !0 || Yr === void 0 ? 1 : Yr || 0, Qn = (P = (D = U.code) === null || D === void 0 ? void 0 : D.regExp) !== null && P !== void 0 ? P : S, yi = (w = U.uriResolver) !== null && w !== void 0 ? w : v.default;
9221
+ var A, C, P, w, T, D, V, z, se, ee, O, $, L, x, H, X, pe, Ae, ve, we, he, Ye, Se, Gr, Kr;
9222
+ const lt = U.strict, Yr = (A = U.code) === null || A === void 0 ? void 0 : A.optimize, Jn = Yr === !0 || Yr === void 0 ? 1 : Yr || 0, Qn = (P = (C = U.code) === null || C === void 0 ? void 0 : C.regExp) !== null && P !== void 0 ? P : S, yi = (w = U.uriResolver) !== null && w !== void 0 ? w : v.default;
9237
9223
  return {
9238
- strictSchema: (C = (T = U.strictSchema) !== null && T !== void 0 ? T : lt) !== null && C !== void 0 ? C : !0,
9224
+ strictSchema: (D = (T = U.strictSchema) !== null && T !== void 0 ? T : lt) !== null && D !== void 0 ? D : !0,
9239
9225
  strictNumbers: (z = (V = U.strictNumbers) !== null && V !== void 0 ? V : lt) !== null && z !== void 0 ? z : !0,
9240
9226
  strictTypes: (ee = (se = U.strictTypes) !== null && se !== void 0 ? se : lt) !== null && ee !== void 0 ? ee : "log",
9241
9227
  strictTuples: ($ = (O = U.strictTuples) !== null && O !== void 0 ? O : lt) !== null && $ !== void 0 ? $ : "log",
@@ -9258,8 +9244,8 @@ function hh() {
9258
9244
  class E {
9259
9245
  constructor(A = {}) {
9260
9246
  this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), A = this.opts = { ...A, ...h(A) };
9261
- const { es5: D, lines: P } = this.opts.code;
9262
- this.scope = new i.ValueScope({ scope: {}, prefixes: g, es5: D, lines: P }), this.logger = j(A.logger);
9247
+ const { es5: C, lines: P } = this.opts.code;
9248
+ this.scope = new i.ValueScope({ scope: {}, prefixes: g, es5: C, lines: P }), this.logger = j(A.logger);
9263
9249
  const w = A.validateFormats;
9264
9250
  A.validateFormats = !1, this.RULES = (0, o.getRules)(), _.call(this, f, A, "NOT SUPPORTED"), _.call(this, p, A, "DEPRECATED", "warn"), this._metaOpts = M.call(this), A.formats && N.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), A.keywords && k.call(this, A.keywords), typeof A.meta == "object" && this.addMetaSchema(A.meta), R.call(this), A.validateFormats = w;
9265
9251
  }
@@ -9267,48 +9253,48 @@ function hh() {
9267
9253
  this.addKeyword("$async");
9268
9254
  }
9269
9255
  _addDefaultMetaSchema() {
9270
- const { $data: A, meta: D, schemaId: P } = this.opts;
9256
+ const { $data: A, meta: C, schemaId: P } = this.opts;
9271
9257
  let w = m;
9272
- P === "id" && (w = { ...m }, w.id = w.$id, delete w.$id), D && A && this.addMetaSchema(w, w[P], !1);
9258
+ P === "id" && (w = { ...m }, w.id = w.$id, delete w.$id), C && A && this.addMetaSchema(w, w[P], !1);
9273
9259
  }
9274
9260
  defaultMeta() {
9275
- const { meta: A, schemaId: D } = this.opts;
9276
- return this.opts.defaultMeta = typeof A == "object" ? A[D] || A : void 0;
9261
+ const { meta: A, schemaId: C } = this.opts;
9262
+ return this.opts.defaultMeta = typeof A == "object" ? A[C] || A : void 0;
9277
9263
  }
9278
- validate(A, D) {
9264
+ validate(A, C) {
9279
9265
  let P;
9280
9266
  if (typeof A == "string") {
9281
9267
  if (P = this.getSchema(A), !P)
9282
9268
  throw new Error(`no schema with key or ref "${A}"`);
9283
9269
  } else
9284
9270
  P = this.compile(A);
9285
- const w = P(D);
9271
+ const w = P(C);
9286
9272
  return "$async" in P || (this.errors = P.errors), w;
9287
9273
  }
9288
- compile(A, D) {
9289
- const P = this._addSchema(A, D);
9274
+ compile(A, C) {
9275
+ const P = this._addSchema(A, C);
9290
9276
  return P.validate || this._compileSchemaEnv(P);
9291
9277
  }
9292
- compileAsync(A, D) {
9278
+ compileAsync(A, C) {
9293
9279
  if (typeof this.opts.loadSchema != "function")
9294
9280
  throw new Error("options.loadSchema should be a function");
9295
9281
  const { loadSchema: P } = this.opts;
9296
- return w.call(this, A, D);
9282
+ return w.call(this, A, C);
9297
9283
  async function w(ee, O) {
9298
9284
  await T.call(this, ee.$schema);
9299
9285
  const $ = this._addSchema(ee, O);
9300
- return $.validate || C.call(this, $);
9286
+ return $.validate || D.call(this, $);
9301
9287
  }
9302
9288
  async function T(ee) {
9303
9289
  ee && !this.getSchema(ee) && await w.call(this, { $ref: ee }, !0);
9304
9290
  }
9305
- async function C(ee) {
9291
+ async function D(ee) {
9306
9292
  try {
9307
9293
  return this._compileSchemaEnv(ee);
9308
9294
  } catch (O) {
9309
9295
  if (!(O instanceof s.default))
9310
9296
  throw O;
9311
- return V.call(this, O), await z.call(this, O.missingSchema), C.call(this, ee);
9297
+ return V.call(this, O), await z.call(this, O.missingSchema), D.call(this, ee);
9312
9298
  }
9313
9299
  }
9314
9300
  function V({ missingSchema: ee, missingRef: O }) {
@@ -9317,7 +9303,7 @@ function hh() {
9317
9303
  }
9318
9304
  async function z(ee) {
9319
9305
  const O = await se.call(this, ee);
9320
- this.refs[ee] || await T.call(this, O.$schema), this.refs[ee] || this.addSchema(O, ee, D);
9306
+ this.refs[ee] || await T.call(this, O.$schema), this.refs[ee] || this.addSchema(O, ee, C);
9321
9307
  }
9322
9308
  async function se(ee) {
9323
9309
  const O = this._loading[ee];
@@ -9331,27 +9317,27 @@ function hh() {
9331
9317
  }
9332
9318
  }
9333
9319
  // Adds schema to the instance
9334
- addSchema(A, D, P, w = this.opts.validateSchema) {
9320
+ addSchema(A, C, P, w = this.opts.validateSchema) {
9335
9321
  if (Array.isArray(A)) {
9336
- for (const C of A)
9337
- this.addSchema(C, void 0, P, w);
9322
+ for (const D of A)
9323
+ this.addSchema(D, void 0, P, w);
9338
9324
  return this;
9339
9325
  }
9340
9326
  let T;
9341
9327
  if (typeof A == "object") {
9342
- const { schemaId: C } = this.opts;
9343
- if (T = A[C], T !== void 0 && typeof T != "string")
9344
- throw new Error(`schema ${C} must be string`);
9328
+ const { schemaId: D } = this.opts;
9329
+ if (T = A[D], T !== void 0 && typeof T != "string")
9330
+ throw new Error(`schema ${D} must be string`);
9345
9331
  }
9346
- return D = (0, c.normalizeId)(D || T), this._checkUnique(D), this.schemas[D] = this._addSchema(A, P, D, w, !0), this;
9332
+ return C = (0, c.normalizeId)(C || T), this._checkUnique(C), this.schemas[C] = this._addSchema(A, P, C, w, !0), this;
9347
9333
  }
9348
9334
  // Add schema that will be used to validate other schemas
9349
9335
  // options in META_IGNORE_OPTIONS are alway set to false
9350
- addMetaSchema(A, D, P = this.opts.validateSchema) {
9351
- return this.addSchema(A, D, !0, P), this;
9336
+ addMetaSchema(A, C, P = this.opts.validateSchema) {
9337
+ return this.addSchema(A, C, !0, P), this;
9352
9338
  }
9353
9339
  // Validate schema against its meta-schema
9354
- validateSchema(A, D) {
9340
+ validateSchema(A, C) {
9355
9341
  if (typeof A == "boolean")
9356
9342
  return !0;
9357
9343
  let P;
@@ -9360,7 +9346,7 @@ function hh() {
9360
9346
  if (P = P || this.opts.defaultMeta || this.defaultMeta(), !P)
9361
9347
  return this.logger.warn("meta-schema not available"), this.errors = null, !0;
9362
9348
  const w = this.validate(P, A);
9363
- if (!w && D) {
9349
+ if (!w && C) {
9364
9350
  const T = "schema is invalid: " + this.errorsText();
9365
9351
  if (this.opts.validateSchema === "log")
9366
9352
  this.logger.error(T);
@@ -9372,16 +9358,16 @@ function hh() {
9372
9358
  // Get compiled schema by `key` or `ref`.
9373
9359
  // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)
9374
9360
  getSchema(A) {
9375
- let D;
9376
- for (; typeof (D = b.call(this, A)) == "string"; )
9377
- A = D;
9378
- if (D === void 0) {
9361
+ let C;
9362
+ for (; typeof (C = b.call(this, A)) == "string"; )
9363
+ A = C;
9364
+ if (C === void 0) {
9379
9365
  const { schemaId: P } = this.opts, w = new a.SchemaEnv({ schema: {}, schemaId: P });
9380
- if (D = a.resolveSchema.call(this, w, A), !D)
9366
+ if (C = a.resolveSchema.call(this, w, A), !C)
9381
9367
  return;
9382
- this.refs[A] = D;
9368
+ this.refs[A] = C;
9383
9369
  }
9384
- return D.validate || this._compileSchemaEnv(D);
9370
+ return C.validate || this._compileSchemaEnv(C);
9385
9371
  }
9386
9372
  // Remove cached schema(s).
9387
9373
  // If no parameter is passed all schemas but meta-schemas are removed.
@@ -9394,12 +9380,12 @@ function hh() {
9394
9380
  case "undefined":
9395
9381
  return this._removeAllSchemas(this.schemas), this._removeAllSchemas(this.refs), this._cache.clear(), this;
9396
9382
  case "string": {
9397
- const D = b.call(this, A);
9398
- return typeof D == "object" && this._cache.delete(D.schema), delete this.schemas[A], delete this.refs[A], this;
9383
+ const C = b.call(this, A);
9384
+ return typeof C == "object" && this._cache.delete(C.schema), delete this.schemas[A], delete this.refs[A], this;
9399
9385
  }
9400
9386
  case "object": {
9401
- const D = A;
9402
- this._cache.delete(D);
9387
+ const C = A;
9388
+ this._cache.delete(C);
9403
9389
  let P = A[this.opts.schemaId];
9404
9390
  return P && (P = (0, c.normalizeId)(P), delete this.schemas[P], delete this.refs[P]), this;
9405
9391
  }
@@ -9409,79 +9395,79 @@ function hh() {
9409
9395
  }
9410
9396
  // add "vocabulary" - a collection of keywords
9411
9397
  addVocabulary(A) {
9412
- for (const D of A)
9413
- this.addKeyword(D);
9398
+ for (const C of A)
9399
+ this.addKeyword(C);
9414
9400
  return this;
9415
9401
  }
9416
- addKeyword(A, D) {
9402
+ addKeyword(A, C) {
9417
9403
  let P;
9418
9404
  if (typeof A == "string")
9419
- P = A, typeof D == "object" && (this.logger.warn("these parameters are deprecated, see docs for addKeyword"), D.keyword = P);
9420
- else if (typeof A == "object" && D === void 0) {
9421
- if (D = A, P = D.keyword, Array.isArray(P) && !P.length)
9405
+ P = A, typeof C == "object" && (this.logger.warn("these parameters are deprecated, see docs for addKeyword"), C.keyword = P);
9406
+ else if (typeof A == "object" && C === void 0) {
9407
+ if (C = A, P = C.keyword, Array.isArray(P) && !P.length)
9422
9408
  throw new Error("addKeywords: keyword must be string or non-empty array");
9423
9409
  } else
9424
9410
  throw new Error("invalid addKeywords parameters");
9425
- if (G.call(this, P, D), !D)
9411
+ if (G.call(this, P, C), !C)
9426
9412
  return (0, l.eachItem)(P, (T) => re.call(this, T)), this;
9427
- fe.call(this, D);
9413
+ fe.call(this, C);
9428
9414
  const w = {
9429
- ...D,
9430
- type: (0, d.getJSONTypes)(D.type),
9431
- schemaType: (0, d.getJSONTypes)(D.schemaType)
9415
+ ...C,
9416
+ type: (0, d.getJSONTypes)(C.type),
9417
+ schemaType: (0, d.getJSONTypes)(C.schemaType)
9432
9418
  };
9433
- return (0, l.eachItem)(P, w.type.length === 0 ? (T) => re.call(this, T, w) : (T) => w.type.forEach((C) => re.call(this, T, w, C))), this;
9419
+ return (0, l.eachItem)(P, w.type.length === 0 ? (T) => re.call(this, T, w) : (T) => w.type.forEach((D) => re.call(this, T, w, D))), this;
9434
9420
  }
9435
9421
  getKeyword(A) {
9436
- const D = this.RULES.all[A];
9437
- return typeof D == "object" ? D.definition : !!D;
9422
+ const C = this.RULES.all[A];
9423
+ return typeof C == "object" ? C.definition : !!C;
9438
9424
  }
9439
9425
  // Remove keyword
9440
9426
  removeKeyword(A) {
9441
- const { RULES: D } = this;
9442
- delete D.keywords[A], delete D.all[A];
9443
- for (const P of D.rules) {
9427
+ const { RULES: C } = this;
9428
+ delete C.keywords[A], delete C.all[A];
9429
+ for (const P of C.rules) {
9444
9430
  const w = P.rules.findIndex((T) => T.keyword === A);
9445
9431
  w >= 0 && P.rules.splice(w, 1);
9446
9432
  }
9447
9433
  return this;
9448
9434
  }
9449
9435
  // Add format
9450
- addFormat(A, D) {
9451
- return typeof D == "string" && (D = new RegExp(D)), this.formats[A] = D, this;
9436
+ addFormat(A, C) {
9437
+ return typeof C == "string" && (C = new RegExp(C)), this.formats[A] = C, this;
9452
9438
  }
9453
- errorsText(A = this.errors, { separator: D = ", ", dataVar: P = "data" } = {}) {
9454
- return !A || A.length === 0 ? "No errors" : A.map((w) => `${P}${w.instancePath} ${w.message}`).reduce((w, T) => w + D + T);
9439
+ errorsText(A = this.errors, { separator: C = ", ", dataVar: P = "data" } = {}) {
9440
+ return !A || A.length === 0 ? "No errors" : A.map((w) => `${P}${w.instancePath} ${w.message}`).reduce((w, T) => w + C + T);
9455
9441
  }
9456
- $dataMetaSchema(A, D) {
9442
+ $dataMetaSchema(A, C) {
9457
9443
  const P = this.RULES.all;
9458
9444
  A = JSON.parse(JSON.stringify(A));
9459
- for (const w of D) {
9445
+ for (const w of C) {
9460
9446
  const T = w.split("/").slice(1);
9461
- let C = A;
9447
+ let D = A;
9462
9448
  for (const V of T)
9463
- C = C[V];
9449
+ D = D[V];
9464
9450
  for (const V in P) {
9465
9451
  const z = P[V];
9466
9452
  if (typeof z != "object")
9467
9453
  continue;
9468
- const { $data: se } = z.definition, ee = C[V];
9469
- se && ee && (C[V] = ue(ee));
9454
+ const { $data: se } = z.definition, ee = D[V];
9455
+ se && ee && (D[V] = ue(ee));
9470
9456
  }
9471
9457
  }
9472
9458
  return A;
9473
9459
  }
9474
- _removeAllSchemas(A, D) {
9460
+ _removeAllSchemas(A, C) {
9475
9461
  for (const P in A) {
9476
9462
  const w = A[P];
9477
- (!D || D.test(P)) && (typeof w == "string" ? delete A[P] : w && !w.meta && (this._cache.delete(w.schema), delete A[P]));
9463
+ (!C || C.test(P)) && (typeof w == "string" ? delete A[P] : w && !w.meta && (this._cache.delete(w.schema), delete A[P]));
9478
9464
  }
9479
9465
  }
9480
- _addSchema(A, D, P, w = this.opts.validateSchema, T = this.opts.addUsedSchema) {
9481
- let C;
9466
+ _addSchema(A, C, P, w = this.opts.validateSchema, T = this.opts.addUsedSchema) {
9467
+ let D;
9482
9468
  const { schemaId: V } = this.opts;
9483
9469
  if (typeof A == "object")
9484
- C = A[V];
9470
+ D = A[V];
9485
9471
  else {
9486
9472
  if (this.opts.jtd)
9487
9473
  throw new Error("schema must be object");
@@ -9491,9 +9477,9 @@ function hh() {
9491
9477
  let z = this._cache.get(A);
9492
9478
  if (z !== void 0)
9493
9479
  return z;
9494
- P = (0, c.normalizeId)(C || P);
9480
+ P = (0, c.normalizeId)(D || P);
9495
9481
  const se = c.getSchemaRefs.call(this, A, P);
9496
- return z = new a.SchemaEnv({ schema: A, schemaId: V, meta: D, baseId: P, localRefs: se }), this._cache.set(z.schema, z), T && !P.startsWith("#") && (P && this._checkUnique(P), this.refs[P] = z), w && this.validateSchema(A, !0), z;
9482
+ return z = new a.SchemaEnv({ schema: A, schemaId: V, meta: C, baseId: P, localRefs: se }), this._cache.set(z.schema, z), T && !P.startsWith("#") && (P && this._checkUnique(P), this.refs[P] = z), w && this.validateSchema(A, !0), z;
9497
9483
  }
9498
9484
  _checkUnique(A) {
9499
9485
  if (this.schemas[A] || this.refs[A])
@@ -9505,20 +9491,20 @@ function hh() {
9505
9491
  return A.validate;
9506
9492
  }
9507
9493
  _compileMetaSchema(A) {
9508
- const D = this.opts;
9494
+ const C = this.opts;
9509
9495
  this.opts = this._metaOpts;
9510
9496
  try {
9511
9497
  a.compileSchema.call(this, A);
9512
9498
  } finally {
9513
- this.opts = D;
9499
+ this.opts = C;
9514
9500
  }
9515
9501
  }
9516
9502
  }
9517
9503
  E.ValidationError = n.default, E.MissingRefError = s.default, e.default = E;
9518
- function _(U, A, D, P = "error") {
9504
+ function _(U, A, C, P = "error") {
9519
9505
  for (const w in U) {
9520
9506
  const T = w;
9521
- T in A && this.logger[P](`${D}: option ${w}. ${U[T]}`);
9507
+ T in A && this.logger[P](`${C}: option ${w}. ${U[T]}`);
9522
9508
  }
9523
9509
  }
9524
9510
  function b(U) {
@@ -9546,8 +9532,8 @@ function hh() {
9546
9532
  }
9547
9533
  this.logger.warn("keywords option as map is deprecated, pass array");
9548
9534
  for (const A in U) {
9549
- const D = U[A];
9550
- D.keyword || (D.keyword = A), this.addKeyword(D);
9535
+ const C = U[A];
9536
+ C.keyword || (C.keyword = A), this.addKeyword(C);
9551
9537
  }
9552
9538
  }
9553
9539
  function M() {
@@ -9571,23 +9557,23 @@ function hh() {
9571
9557
  }
9572
9558
  const B = /^[a-z_$][a-z0-9_$:-]*$/i;
9573
9559
  function G(U, A) {
9574
- const { RULES: D } = this;
9560
+ const { RULES: C } = this;
9575
9561
  if ((0, l.eachItem)(U, (P) => {
9576
- if (D.keywords[P])
9562
+ if (C.keywords[P])
9577
9563
  throw new Error(`Keyword ${P} is already defined`);
9578
9564
  if (!B.test(P))
9579
9565
  throw new Error(`Keyword ${P} has invalid name`);
9580
9566
  }), !!A && A.$data && !("code" in A || "validate" in A))
9581
9567
  throw new Error('$data keyword must have "code" or "validate" function');
9582
9568
  }
9583
- function re(U, A, D) {
9569
+ function re(U, A, C) {
9584
9570
  var P;
9585
9571
  const w = A?.post;
9586
- if (D && w)
9572
+ if (C && w)
9587
9573
  throw new Error('keyword with "post" flag cannot have "type"');
9588
9574
  const { RULES: T } = this;
9589
- let C = w ? T.post : T.rules.find(({ type: z }) => z === D);
9590
- if (C || (C = { type: D, rules: [] }, T.rules.push(C)), T.keywords[U] = !0, !A)
9575
+ let D = w ? T.post : T.rules.find(({ type: z }) => z === C);
9576
+ if (D || (D = { type: C, rules: [] }, T.rules.push(D)), T.keywords[U] = !0, !A)
9591
9577
  return;
9592
9578
  const V = {
9593
9579
  keyword: U,
@@ -9597,11 +9583,11 @@ function hh() {
9597
9583
  schemaType: (0, d.getJSONTypes)(A.schemaType)
9598
9584
  }
9599
9585
  };
9600
- A.before ? ne.call(this, C, V, A.before) : C.rules.push(V), T.all[U] = V, (P = A.implements) === null || P === void 0 || P.forEach((z) => this.addKeyword(z));
9586
+ A.before ? ne.call(this, D, V, A.before) : D.rules.push(V), T.all[U] = V, (P = A.implements) === null || P === void 0 || P.forEach((z) => this.addKeyword(z));
9601
9587
  }
9602
- function ne(U, A, D) {
9603
- const P = U.rules.findIndex((w) => w.keyword === D);
9604
- P >= 0 ? U.rules.splice(P, 0, A) : (U.rules.push(A), this.logger.warn(`rule ${D} is not defined`));
9588
+ function ne(U, A, C) {
9589
+ const P = U.rules.findIndex((w) => w.keyword === C);
9590
+ P >= 0 ? U.rules.splice(P, 0, A) : (U.rules.push(A), this.logger.warn(`rule ${C} is not defined`));
9605
9591
  }
9606
9592
  function fe(U) {
9607
9593
  let { metaSchema: A } = U;
@@ -9616,7 +9602,7 @@ function hh() {
9616
9602
  })(un)), un;
9617
9603
  }
9618
9604
  var Mt = {}, Ft = {}, jt = {}, wo;
9619
- function mh() {
9605
+ function hh() {
9620
9606
  if (wo) return jt;
9621
9607
  wo = 1, Object.defineProperty(jt, "__esModule", { value: !0 });
9622
9608
  const e = {
@@ -9628,7 +9614,7 @@ function mh() {
9628
9614
  return jt.default = e, jt;
9629
9615
  }
9630
9616
  var qe = {}, Eo;
9631
- function gh() {
9617
+ function mh() {
9632
9618
  if (Eo) return qe;
9633
9619
  Eo = 1, Object.defineProperty(qe, "__esModule", { value: !0 }), qe.callRef = qe.getValidate = void 0;
9634
9620
  const e = zr(), t = Pe(), r = Z(), n = Fe(), s = Kn(), o = te(), a = {
@@ -9715,10 +9701,10 @@ function gh() {
9715
9701
  return qe.callRef = c, qe.default = a, qe;
9716
9702
  }
9717
9703
  var bo;
9718
- function yh() {
9704
+ function gh() {
9719
9705
  if (bo) return Ft;
9720
9706
  bo = 1, Object.defineProperty(Ft, "__esModule", { value: !0 });
9721
- const e = mh(), t = gh(), r = [
9707
+ const e = hh(), t = mh(), r = [
9722
9708
  "$schema",
9723
9709
  "$id",
9724
9710
  "$defs",
@@ -9731,7 +9717,7 @@ function yh() {
9731
9717
  return Ft.default = r, Ft;
9732
9718
  }
9733
9719
  var Vt = {}, Bt = {}, _o;
9734
- function vh() {
9720
+ function yh() {
9735
9721
  if (_o) return Bt;
9736
9722
  _o = 1, Object.defineProperty(Bt, "__esModule", { value: !0 });
9737
9723
  const e = Z(), t = e.operators, r = {
@@ -9756,7 +9742,7 @@ function vh() {
9756
9742
  return Bt.default = s, Bt;
9757
9743
  }
9758
9744
  var Ht = {}, So;
9759
- function wh() {
9745
+ function vh() {
9760
9746
  if (So) return Ht;
9761
9747
  So = 1, Object.defineProperty(Ht, "__esModule", { value: !0 });
9762
9748
  const e = Z(), r = {
@@ -9776,7 +9762,7 @@ function wh() {
9776
9762
  return Ht.default = r, Ht;
9777
9763
  }
9778
9764
  var zt = {}, Gt = {}, Ro;
9779
- function Eh() {
9765
+ function wh() {
9780
9766
  if (Ro) return Gt;
9781
9767
  Ro = 1, Object.defineProperty(Gt, "__esModule", { value: !0 });
9782
9768
  function e(t) {
@@ -9789,10 +9775,10 @@ function Eh() {
9789
9775
  return Gt.default = e, e.code = 'require("ajv/dist/runtime/ucs2length").default', Gt;
9790
9776
  }
9791
9777
  var To;
9792
- function bh() {
9778
+ function Eh() {
9793
9779
  if (To) return zt;
9794
9780
  To = 1, Object.defineProperty(zt, "__esModule", { value: !0 });
9795
- const e = Z(), t = te(), r = Eh(), s = {
9781
+ const e = Z(), t = te(), r = wh(), s = {
9796
9782
  keyword: ["maxLength", "minLength"],
9797
9783
  type: "string",
9798
9784
  schemaType: "number",
@@ -9812,7 +9798,7 @@ function bh() {
9812
9798
  return zt.default = s, zt;
9813
9799
  }
9814
9800
  var Kt = {}, Oo;
9815
- function _h() {
9801
+ function bh() {
9816
9802
  if (Oo) return Kt;
9817
9803
  Oo = 1, Object.defineProperty(Kt, "__esModule", { value: !0 });
9818
9804
  const e = Pe(), t = Z(), n = {
@@ -9832,7 +9818,7 @@ function _h() {
9832
9818
  return Kt.default = n, Kt;
9833
9819
  }
9834
9820
  var Yt = {}, Ao;
9835
- function Sh() {
9821
+ function _h() {
9836
9822
  if (Ao) return Yt;
9837
9823
  Ao = 1, Object.defineProperty(Yt, "__esModule", { value: !0 });
9838
9824
  const e = Z(), r = {
@@ -9855,7 +9841,7 @@ function Sh() {
9855
9841
  return Yt.default = r, Yt;
9856
9842
  }
9857
9843
  var Wt = {}, No;
9858
- function Rh() {
9844
+ function Sh() {
9859
9845
  if (No) return Wt;
9860
9846
  No = 1, Object.defineProperty(Wt, "__esModule", { value: !0 });
9861
9847
  const e = Pe(), t = Z(), r = te(), s = {
@@ -9912,7 +9898,7 @@ function Rh() {
9912
9898
  return Wt.default = s, Wt;
9913
9899
  }
9914
9900
  var Jt = {}, $o;
9915
- function Th() {
9901
+ function Rh() {
9916
9902
  if ($o) return Jt;
9917
9903
  $o = 1, Object.defineProperty(Jt, "__esModule", { value: !0 });
9918
9904
  const e = Z(), r = {
@@ -9942,7 +9928,7 @@ function Yn() {
9942
9928
  return e.code = 'require("ajv/dist/runtime/equal").default', Xt.default = e, Xt;
9943
9929
  }
9944
9930
  var Io;
9945
- function Oh() {
9931
+ function Th() {
9946
9932
  if (Io) return Qt;
9947
9933
  Io = 1, Object.defineProperty(Qt, "__esModule", { value: !0 });
9948
9934
  const e = Ir(), t = Z(), r = te(), n = Yn(), o = {
@@ -9985,10 +9971,10 @@ function Oh() {
9985
9971
  };
9986
9972
  return Qt.default = o, Qt;
9987
9973
  }
9988
- var Zt = {}, Co;
9989
- function Ah() {
9990
- if (Co) return Zt;
9991
- Co = 1, Object.defineProperty(Zt, "__esModule", { value: !0 });
9974
+ var Zt = {}, Do;
9975
+ function Oh() {
9976
+ if (Do) return Zt;
9977
+ Do = 1, Object.defineProperty(Zt, "__esModule", { value: !0 });
9992
9978
  const e = Z(), t = te(), r = Yn(), s = {
9993
9979
  keyword: "const",
9994
9980
  $data: !0,
@@ -10003,10 +9989,10 @@ function Ah() {
10003
9989
  };
10004
9990
  return Zt.default = s, Zt;
10005
9991
  }
10006
- var er = {}, Do;
10007
- function Nh() {
10008
- if (Do) return er;
10009
- Do = 1, Object.defineProperty(er, "__esModule", { value: !0 });
9992
+ var er = {}, Co;
9993
+ function Ah() {
9994
+ if (Co) return er;
9995
+ Co = 1, Object.defineProperty(er, "__esModule", { value: !0 });
10010
9996
  const e = Z(), t = te(), r = Yn(), s = {
10011
9997
  keyword: "enum",
10012
9998
  schemaType: "array",
@@ -10044,10 +10030,10 @@ function Nh() {
10044
10030
  return er.default = s, er;
10045
10031
  }
10046
10032
  var Lo;
10047
- function $h() {
10033
+ function Nh() {
10048
10034
  if (Lo) return Vt;
10049
10035
  Lo = 1, Object.defineProperty(Vt, "__esModule", { value: !0 });
10050
- const e = vh(), t = wh(), r = bh(), n = _h(), s = Sh(), o = Rh(), a = Th(), i = Oh(), c = Ah(), d = Nh(), l = [
10036
+ const e = yh(), t = vh(), r = Eh(), n = bh(), s = _h(), o = Sh(), a = Rh(), i = Th(), c = Oh(), d = Ah(), l = [
10051
10037
  // number
10052
10038
  e.default,
10053
10039
  t.default,
@@ -10146,7 +10132,7 @@ function ci() {
10146
10132
  return rt.validateTuple = s, rt.default = n, rt;
10147
10133
  }
10148
10134
  var xo;
10149
- function Ph() {
10135
+ function $h() {
10150
10136
  if (xo) return rr;
10151
10137
  xo = 1, Object.defineProperty(rr, "__esModule", { value: !0 });
10152
10138
  const e = ci(), t = {
@@ -10159,7 +10145,7 @@ function Ph() {
10159
10145
  return rr.default = t, rr;
10160
10146
  }
10161
10147
  var nr = {}, qo;
10162
- function Ih() {
10148
+ function Ph() {
10163
10149
  if (qo) return nr;
10164
10150
  qo = 1, Object.defineProperty(nr, "__esModule", { value: !0 });
10165
10151
  const e = Z(), t = te(), r = Pe(), n = ii(), o = {
@@ -10179,7 +10165,7 @@ function Ih() {
10179
10165
  return nr.default = o, nr;
10180
10166
  }
10181
10167
  var sr = {}, Mo;
10182
- function Ch() {
10168
+ function Ih() {
10183
10169
  if (Mo) return sr;
10184
10170
  Mo = 1, Object.defineProperty(sr, "__esModule", { value: !0 });
10185
10171
  const e = Z(), t = te(), n = {
@@ -10309,7 +10295,7 @@ function Dh() {
10309
10295
  })(wn)), wn;
10310
10296
  }
10311
10297
  var or = {}, jo;
10312
- function Lh() {
10298
+ function Ch() {
10313
10299
  if (jo) return or;
10314
10300
  jo = 1, Object.defineProperty(or, "__esModule", { value: !0 });
10315
10301
  const e = Z(), t = te(), n = {
@@ -10412,7 +10398,7 @@ function ui() {
10412
10398
  return ar.default = o, ar;
10413
10399
  }
10414
10400
  var ir = {}, Bo;
10415
- function kh() {
10401
+ function Lh() {
10416
10402
  if (Bo) return ir;
10417
10403
  Bo = 1, Object.defineProperty(ir, "__esModule", { value: !0 });
10418
10404
  const e = Hr(), t = Pe(), r = te(), n = ui(), s = {
@@ -10447,7 +10433,7 @@ function kh() {
10447
10433
  return ir.default = s, ir;
10448
10434
  }
10449
10435
  var cr = {}, Ho;
10450
- function Uh() {
10436
+ function kh() {
10451
10437
  if (Ho) return cr;
10452
10438
  Ho = 1, Object.defineProperty(cr, "__esModule", { value: !0 });
10453
10439
  const e = Pe(), t = Z(), r = te(), n = te(), s = {
@@ -10488,7 +10474,7 @@ function Uh() {
10488
10474
  return cr.default = s, cr;
10489
10475
  }
10490
10476
  var ur = {}, zo;
10491
- function xh() {
10477
+ function Uh() {
10492
10478
  if (zo) return ur;
10493
10479
  zo = 1, Object.defineProperty(ur, "__esModule", { value: !0 });
10494
10480
  const e = te(), t = {
@@ -10514,7 +10500,7 @@ function xh() {
10514
10500
  return ur.default = t, ur;
10515
10501
  }
10516
10502
  var lr = {}, Go;
10517
- function qh() {
10503
+ function xh() {
10518
10504
  if (Go) return lr;
10519
10505
  Go = 1, Object.defineProperty(lr, "__esModule", { value: !0 });
10520
10506
  const t = {
@@ -10527,7 +10513,7 @@ function qh() {
10527
10513
  return lr.default = t, lr;
10528
10514
  }
10529
10515
  var dr = {}, Ko;
10530
- function Mh() {
10516
+ function qh() {
10531
10517
  if (Ko) return dr;
10532
10518
  Ko = 1, Object.defineProperty(dr, "__esModule", { value: !0 });
10533
10519
  const e = Z(), t = te(), n = {
@@ -10563,7 +10549,7 @@ function Mh() {
10563
10549
  return dr.default = n, dr;
10564
10550
  }
10565
10551
  var fr = {}, Yo;
10566
- function Fh() {
10552
+ function Mh() {
10567
10553
  if (Yo) return fr;
10568
10554
  Yo = 1, Object.defineProperty(fr, "__esModule", { value: !0 });
10569
10555
  const e = te(), t = {
@@ -10585,7 +10571,7 @@ function Fh() {
10585
10571
  return fr.default = t, fr;
10586
10572
  }
10587
10573
  var pr = {}, Wo;
10588
- function jh() {
10574
+ function Fh() {
10589
10575
  if (Wo) return pr;
10590
10576
  Wo = 1, Object.defineProperty(pr, "__esModule", { value: !0 });
10591
10577
  const e = Z(), t = te(), n = {
@@ -10632,7 +10618,7 @@ function jh() {
10632
10618
  return pr.default = n, pr;
10633
10619
  }
10634
10620
  var hr = {}, Jo;
10635
- function Vh() {
10621
+ function jh() {
10636
10622
  if (Jo) return hr;
10637
10623
  Jo = 1, Object.defineProperty(hr, "__esModule", { value: !0 });
10638
10624
  const e = te(), t = {
@@ -10645,10 +10631,10 @@ function Vh() {
10645
10631
  return hr.default = t, hr;
10646
10632
  }
10647
10633
  var Qo;
10648
- function Bh() {
10634
+ function Vh() {
10649
10635
  if (Qo) return tr;
10650
10636
  Qo = 1, Object.defineProperty(tr, "__esModule", { value: !0 });
10651
- const e = ii(), t = Ph(), r = ci(), n = Ih(), s = Ch(), o = Dh(), a = Lh(), i = ui(), c = kh(), d = Uh(), l = xh(), m = qh(), v = Mh(), S = Fh(), y = jh(), g = Vh();
10637
+ const e = ii(), t = $h(), r = ci(), n = Ph(), s = Ih(), o = Dh(), a = Ch(), i = ui(), c = Lh(), d = kh(), l = Uh(), m = xh(), v = qh(), S = Mh(), y = Fh(), g = jh();
10652
10638
  function f(p = !1) {
10653
10639
  const u = [
10654
10640
  // any
@@ -10670,7 +10656,7 @@ function Bh() {
10670
10656
  return tr.default = f, tr;
10671
10657
  }
10672
10658
  var mr = {}, gr = {}, Xo;
10673
- function Hh() {
10659
+ function Bh() {
10674
10660
  if (Xo) return gr;
10675
10661
  Xo = 1, Object.defineProperty(gr, "__esModule", { value: !0 });
10676
10662
  const e = Z(), r = {
@@ -10739,14 +10725,14 @@ function Hh() {
10739
10725
  return gr.default = r, gr;
10740
10726
  }
10741
10727
  var Zo;
10742
- function zh() {
10728
+ function Hh() {
10743
10729
  if (Zo) return mr;
10744
10730
  Zo = 1, Object.defineProperty(mr, "__esModule", { value: !0 });
10745
- const t = [Hh().default];
10731
+ const t = [Bh().default];
10746
10732
  return mr.default = t, mr;
10747
10733
  }
10748
10734
  var Be = {}, ea;
10749
- function Gh() {
10735
+ function zh() {
10750
10736
  return ea || (ea = 1, Object.defineProperty(Be, "__esModule", { value: !0 }), Be.contentVocabulary = Be.metadataVocabulary = void 0, Be.metadataVocabulary = [
10751
10737
  "title",
10752
10738
  "description",
@@ -10762,10 +10748,10 @@ function Gh() {
10762
10748
  ]), Be;
10763
10749
  }
10764
10750
  var ta;
10765
- function Kh() {
10751
+ function Gh() {
10766
10752
  if (ta) return Mt;
10767
10753
  ta = 1, Object.defineProperty(Mt, "__esModule", { value: !0 });
10768
- const e = yh(), t = $h(), r = Bh(), n = zh(), s = Gh(), o = [
10754
+ const e = gh(), t = Nh(), r = Vh(), n = Hh(), s = zh(), o = [
10769
10755
  e.default,
10770
10756
  t.default,
10771
10757
  (0, r.default)(),
@@ -10776,7 +10762,7 @@ function Kh() {
10776
10762
  return Mt.default = o, Mt;
10777
10763
  }
10778
10764
  var yr = {}, vt = {}, ra;
10779
- function Yh() {
10765
+ function Kh() {
10780
10766
  if (ra) return vt;
10781
10767
  ra = 1, Object.defineProperty(vt, "__esModule", { value: !0 }), vt.DiscrError = void 0;
10782
10768
  var e;
@@ -10785,10 +10771,10 @@ function Yh() {
10785
10771
  })(e || (vt.DiscrError = e = {})), vt;
10786
10772
  }
10787
10773
  var na;
10788
- function Wh() {
10774
+ function Yh() {
10789
10775
  if (na) return yr;
10790
10776
  na = 1, Object.defineProperty(yr, "__esModule", { value: !0 });
10791
- const e = Z(), t = Yh(), r = Kn(), n = zr(), s = te(), a = {
10777
+ const e = Z(), t = Kh(), r = Kn(), n = zr(), s = te(), a = {
10792
10778
  keyword: "discriminator",
10793
10779
  type: "object",
10794
10780
  schemaType: "object",
@@ -10861,20 +10847,20 @@ function Wh() {
10861
10847
  };
10862
10848
  return yr.default = a, yr;
10863
10849
  }
10864
- const Jh = "http://json-schema.org/draft-07/schema#", Qh = "http://json-schema.org/draft-07/schema#", Xh = "Core schema meta-schema", Zh = { schemaArray: { type: "array", minItems: 1, items: { $ref: "#" } }, nonNegativeInteger: { type: "integer", minimum: 0 }, nonNegativeIntegerDefault0: { allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }] }, simpleTypes: { enum: ["array", "boolean", "integer", "null", "number", "object", "string"] }, stringArray: { type: "array", items: { type: "string" }, uniqueItems: !0, default: [] } }, em = ["object", "boolean"], tm = { $id: { type: "string", format: "uri-reference" }, $schema: { type: "string", format: "uri" }, $ref: { type: "string", format: "uri-reference" }, $comment: { type: "string" }, title: { type: "string" }, description: { type: "string" }, default: !0, readOnly: { type: "boolean", default: !1 }, examples: { type: "array", items: !0 }, multipleOf: { type: "number", exclusiveMinimum: 0 }, maximum: { type: "number" }, exclusiveMaximum: { type: "number" }, minimum: { type: "number" }, exclusiveMinimum: { type: "number" }, maxLength: { $ref: "#/definitions/nonNegativeInteger" }, minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, pattern: { type: "string", format: "regex" }, additionalItems: { $ref: "#" }, items: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], default: !0 }, maxItems: { $ref: "#/definitions/nonNegativeInteger" }, minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, uniqueItems: { type: "boolean", default: !1 }, contains: { $ref: "#" }, maxProperties: { $ref: "#/definitions/nonNegativeInteger" }, minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, required: { $ref: "#/definitions/stringArray" }, additionalProperties: { $ref: "#" }, definitions: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, properties: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, patternProperties: { type: "object", additionalProperties: { $ref: "#" }, propertyNames: { format: "regex" }, default: {} }, dependencies: { type: "object", additionalProperties: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] } }, propertyNames: { $ref: "#" }, const: !0, enum: { type: "array", items: !0, minItems: 1, uniqueItems: !0 }, type: { anyOf: [{ $ref: "#/definitions/simpleTypes" }, { type: "array", items: { $ref: "#/definitions/simpleTypes" }, minItems: 1, uniqueItems: !0 }] }, format: { type: "string" }, contentMediaType: { type: "string" }, contentEncoding: { type: "string" }, if: { $ref: "#" }, then: { $ref: "#" }, else: { $ref: "#" }, allOf: { $ref: "#/definitions/schemaArray" }, anyOf: { $ref: "#/definitions/schemaArray" }, oneOf: { $ref: "#/definitions/schemaArray" }, not: { $ref: "#" } }, rm = {
10865
- $schema: Jh,
10866
- $id: Qh,
10867
- title: Xh,
10868
- definitions: Zh,
10869
- type: em,
10870
- properties: tm,
10850
+ const Wh = "http://json-schema.org/draft-07/schema#", Jh = "http://json-schema.org/draft-07/schema#", Qh = "Core schema meta-schema", Xh = { schemaArray: { type: "array", minItems: 1, items: { $ref: "#" } }, nonNegativeInteger: { type: "integer", minimum: 0 }, nonNegativeIntegerDefault0: { allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }] }, simpleTypes: { enum: ["array", "boolean", "integer", "null", "number", "object", "string"] }, stringArray: { type: "array", items: { type: "string" }, uniqueItems: !0, default: [] } }, Zh = ["object", "boolean"], em = { $id: { type: "string", format: "uri-reference" }, $schema: { type: "string", format: "uri" }, $ref: { type: "string", format: "uri-reference" }, $comment: { type: "string" }, title: { type: "string" }, description: { type: "string" }, default: !0, readOnly: { type: "boolean", default: !1 }, examples: { type: "array", items: !0 }, multipleOf: { type: "number", exclusiveMinimum: 0 }, maximum: { type: "number" }, exclusiveMaximum: { type: "number" }, minimum: { type: "number" }, exclusiveMinimum: { type: "number" }, maxLength: { $ref: "#/definitions/nonNegativeInteger" }, minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, pattern: { type: "string", format: "regex" }, additionalItems: { $ref: "#" }, items: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], default: !0 }, maxItems: { $ref: "#/definitions/nonNegativeInteger" }, minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, uniqueItems: { type: "boolean", default: !1 }, contains: { $ref: "#" }, maxProperties: { $ref: "#/definitions/nonNegativeInteger" }, minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, required: { $ref: "#/definitions/stringArray" }, additionalProperties: { $ref: "#" }, definitions: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, properties: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, patternProperties: { type: "object", additionalProperties: { $ref: "#" }, propertyNames: { format: "regex" }, default: {} }, dependencies: { type: "object", additionalProperties: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] } }, propertyNames: { $ref: "#" }, const: !0, enum: { type: "array", items: !0, minItems: 1, uniqueItems: !0 }, type: { anyOf: [{ $ref: "#/definitions/simpleTypes" }, { type: "array", items: { $ref: "#/definitions/simpleTypes" }, minItems: 1, uniqueItems: !0 }] }, format: { type: "string" }, contentMediaType: { type: "string" }, contentEncoding: { type: "string" }, if: { $ref: "#" }, then: { $ref: "#" }, else: { $ref: "#" }, allOf: { $ref: "#/definitions/schemaArray" }, anyOf: { $ref: "#/definitions/schemaArray" }, oneOf: { $ref: "#/definitions/schemaArray" }, not: { $ref: "#" } }, tm = {
10851
+ $schema: Wh,
10852
+ $id: Jh,
10853
+ title: Qh,
10854
+ definitions: Xh,
10855
+ type: Zh,
10856
+ properties: em,
10871
10857
  default: !0
10872
10858
  };
10873
10859
  var sa;
10874
- function nm() {
10860
+ function rm() {
10875
10861
  return sa || (sa = 1, (function(e, t) {
10876
10862
  Object.defineProperty(t, "__esModule", { value: !0 }), t.MissingRefError = t.ValidationError = t.CodeGen = t.Name = t.nil = t.stringify = t.str = t._ = t.KeywordCxt = t.Ajv = void 0;
10877
- const r = hh(), n = Kh(), s = Wh(), o = rm, a = ["/properties"], i = "http://json-schema.org/draft-07/schema";
10863
+ const r = ph(), n = Gh(), s = Yh(), o = tm, a = ["/properties"], i = "http://json-schema.org/draft-07/schema";
10878
10864
  class c extends r.default {
10879
10865
  _addVocabularies() {
10880
10866
  super._addVocabularies(), n.default.forEach((y) => this.addVocabulary(y)), this.opts.discriminator && this.addKeyword(s.default);
@@ -10918,86 +10904,86 @@ function nm() {
10918
10904
  } });
10919
10905
  })(Lt, Lt.exports)), Lt.exports;
10920
10906
  }
10921
- var sm = nm();
10922
- const om = /* @__PURE__ */ Jp(sm), oa = {
10907
+ var nm = rm();
10908
+ const sm = /* @__PURE__ */ Wp(nm), oa = {
10923
10909
  CONFIG_NOT_FOUND: "CONFIG_ERROR_NOT_FOUND",
10924
10910
  VALIDATION_FAILED: "CONFIG_ERROR_VALIDATION_FAILED"
10925
- }, wv = async (e, t) => {
10926
- const r = await am(e);
10911
+ }, vv = async (e, t) => {
10912
+ const r = await om(e);
10927
10913
  if (!r)
10928
10914
  throw new Error(oa.CONFIG_NOT_FOUND);
10929
- if (!await im(r, t))
10915
+ if (!await am(r, t))
10930
10916
  throw new Error(oa.VALIDATION_FAILED);
10931
10917
  return r;
10932
- }, am = async (e) => await F(e), im = async (e, t) => new om().compile(t)(e), cm = (e) => W + `/form/${e}?v=custom:(resources:(value))`, um = (e) => {
10918
+ }, om = async (e) => await F(e), am = async (e, t) => new sm().compile(t)(e), im = (e) => W + `/form/${e}?v=custom:(resources:(value))`, cm = (e) => {
10933
10919
  const t = W + "/bahmniie/form/latestPublishedForms";
10934
10920
  return e ? t + `?episodeUuid=${e}` : t;
10935
- }, Ev = (e) => W + `/user/${e}?v=full`, lm = (e, t, r, n) => W + `/bahmniie/form/translations?formName=${encodeURIComponent(e)}&formUuid=${t}&formVersion=${r}&locale=${n}`, _r = "Bahmni", dm = (e, t, r) => {
10921
+ }, wv = (e) => W + `/user/${e}?v=full`, um = (e, t, r, n) => W + `/bahmniie/form/translations?formName=${encodeURIComponent(e)}&formUuid=${t}&formVersion=${r}&locale=${n}`, _r = "Bahmni", lm = (e, t, r) => {
10936
10922
  let s = W + "/bahmnicore/patient/" + e + "/forms";
10937
10923
  return r ? s += `?patientProgramUuid=${r}` : t && (s += `?numberOfVisits=${t}`), s;
10938
- }, fm = (e, t) => {
10924
+ }, dm = (e, t) => {
10939
10925
  const r = t.join(",");
10940
10926
  return `${ce}/Observation?patient=${e}&code=${r}&_include=Observation:has-member&_sort=-_lastUpdated`;
10941
- }, pm = (e, t) => {
10927
+ }, fm = (e, t) => {
10942
10928
  const r = t.join(",");
10943
10929
  return `${ce}/Observation?patient=${e}&code=${r}&_include=Observation:has-member&_include=Observation:encounter&_sort=-_lastUpdated`;
10944
10930
  };
10945
- async function hm(e, t) {
10946
- const r = fm(e, t);
10931
+ async function pm(e, t) {
10932
+ const r = dm(e, t);
10947
10933
  return await F(r);
10948
10934
  }
10949
- async function bv(e, t) {
10950
- const r = pm(e, t);
10935
+ async function Ev(e, t) {
10936
+ const r = fm(e, t);
10951
10937
  return await F(r);
10952
10938
  }
10953
- async function _v(e, t) {
10954
- return (await hm(e, t)).entry?.filter((s) => s.resource?.resourceType === "Observation").map((s) => s.resource) ?? [];
10939
+ async function bv(e, t) {
10940
+ return (await pm(e, t)).entry?.filter((s) => s.resource?.resourceType === "Observation").map((s) => s.resource) ?? [];
10955
10941
  }
10956
- const mm = (e) => W + `/provider?user=${e}&v=custom:(uuid,display,person)`;
10957
- async function Sv(e) {
10942
+ const hm = (e) => W + `/provider?user=${e}&v=custom:(uuid,display,person)`;
10943
+ async function _v(e) {
10958
10944
  const t = await F(
10959
- mm(e)
10945
+ hm(e)
10960
10946
  );
10961
10947
  return !t.results || t.results.length === 0 ? null : t.results[0];
10962
10948
  }
10963
- const gm = (e) => ce + `/Encounter?subject:Patient=${e}&_tag=visit`, ym = (e) => `${ce}/Observation/$fetch-all?encounter=${e}`;
10949
+ const mm = (e) => ce + `/Encounter?subject:Patient=${e}&_tag=visit`, gm = (e) => `${ce}/Observation/$fetch-all?encounter=${e}`;
10950
+ async function ym(e) {
10951
+ return await F(mm(e));
10952
+ }
10964
10953
  async function vm(e) {
10965
- return await F(gm(e));
10954
+ return (await ym(e)).entry?.map((r) => r.resource).filter((r) => r !== void 0) ?? [];
10966
10955
  }
10967
10956
  async function wm(e) {
10968
- return (await vm(e)).entry?.map((r) => r.resource).filter((r) => r !== void 0) ?? [];
10957
+ return (await vm(e)).find((r) => !r.period?.end) ?? null;
10969
10958
  }
10970
- async function Em(e) {
10971
- return (await wm(e)).find((r) => !r.period?.end) ?? null;
10972
- }
10973
- async function Rv(e) {
10959
+ async function Sv(e) {
10974
10960
  return await F(
10975
- ym(e)
10961
+ gm(e)
10976
10962
  );
10977
10963
  }
10978
- const Tv = (e, t) => e?.length === 0 ? !1 : t?.length === 0, bm = ce + "/Encounter", _m = W + "/systemsetting/bahmni.encountersession.duration";
10979
- async function Sm(e) {
10964
+ const Rv = (e, t) => e?.length === 0 ? !1 : t?.length === 0, Em = ce + "/Encounter", bm = W + "/systemsetting/bahmni.encountersession.duration";
10965
+ async function _m(e) {
10980
10966
  const t = new URLSearchParams();
10981
10967
  Object.entries(e).forEach(([s, o]) => {
10982
10968
  o && t.append(s, o);
10983
10969
  });
10984
- const r = `${bm}?${t.toString()}`;
10970
+ const r = `${Em}?${t.toString()}`;
10985
10971
  return (await F(r)).entry?.map((s) => s.resource).filter((s) => s !== void 0) ?? [];
10986
10972
  }
10987
- async function Rm() {
10973
+ async function Sm() {
10988
10974
  try {
10989
10975
  const e = await F(
10990
- _m
10976
+ bm
10991
10977
  ), t = Number(e.value);
10992
10978
  return !isNaN(t) && t > 0 ? t : 60;
10993
10979
  } catch {
10994
10980
  return 30;
10995
10981
  }
10996
10982
  }
10997
- async function Tm(e, t) {
10983
+ async function Rm(e, t) {
10998
10984
  if (!e.length) return null;
10999
10985
  try {
11000
- const r = await Em(t);
10986
+ const r = await wm(t);
11001
10987
  return r ? e.find((n) => {
11002
10988
  const s = n.partOf?.reference?.split("/")[1];
11003
10989
  return r.id === s;
@@ -11006,25 +10992,25 @@ async function Tm(e, t) {
11006
10992
  return null;
11007
10993
  }
11008
10994
  }
11009
- async function Ov(e, t, r, n) {
10995
+ async function Tv(e, t, r, n) {
11010
10996
  try {
11011
10997
  if (!e) return null;
11012
- const s = r ?? await Rm(), a = `ge${new Date(Date.now() - s * 60 * 1e3).toISOString()}`, i = {
10998
+ const s = r ?? await Sm(), a = `ge${new Date(Date.now() - s * 60 * 1e3).toISOString()}`, i = {
11013
10999
  patient: e,
11014
11000
  _tag: "encounter",
11015
11001
  _lastUpdated: a,
11016
11002
  type: n
11017
11003
  };
11018
11004
  t && (i.participant = t);
11019
- const c = await Sm(i);
11020
- return c.length === 0 ? null : await Tm(c, e);
11005
+ const c = await _m(i);
11006
+ return c.length === 0 ? null : await Rm(c, e);
11021
11007
  } catch {
11022
11008
  return null;
11023
11009
  }
11024
11010
  }
11025
- const Om = (e) => ce + `/EpisodeOfCare?_revinclude=Encounter:episode-of-care&_id=${e}`;
11026
- async function Av(e) {
11027
- const t = e.join(","), r = await F(Om(t));
11011
+ const Tm = (e) => ce + `/EpisodeOfCare?_revinclude=Encounter:episode-of-care&_id=${e}`;
11012
+ async function Ov(e) {
11013
+ const t = e.join(","), r = await F(Tm(t));
11028
11014
  if (r.total === 0)
11029
11015
  throw new Error(
11030
11016
  "No episode of care found for the provided UUIDs: " + e.join(", ")
@@ -11036,13 +11022,13 @@ async function Av(e) {
11036
11022
  c && s.add(c);
11037
11023
  }), { visitUuids: Array.from(s), encounterUuids: o };
11038
11024
  }
11039
- const En = /* @__PURE__ */ new Map(), Am = async (e) => {
11025
+ const En = /* @__PURE__ */ new Map(), Om = async (e) => {
11040
11026
  if (En.has(e))
11041
11027
  return En.get(e) ?? null;
11042
11028
  const t = await F(Ma(e)), r = t ? String(t) : null;
11043
11029
  return En.set(e, r), r;
11044
- }, Nm = async () => await Am(el) === "true", $m = async (e, t, r, n = nt.CLINICAL) => {
11045
- if (!await Nm())
11030
+ }, Am = async () => await Om(el) === "true", Nm = async (e, t, r, n = nt.CLINICAL) => {
11031
+ if (!await Am())
11046
11032
  return { logged: !1 };
11047
11033
  const o = $n[t];
11048
11034
  if (!o)
@@ -11058,22 +11044,22 @@ const En = /* @__PURE__ */ new Map(), Am = async (e) => {
11058
11044
  message: r ? `${o.message}~${JSON.stringify(r)}` : o.message,
11059
11045
  module: n
11060
11046
  };
11061
- return await Ce(Fl, a), { logged: !0 };
11062
- }, Nv = () => Ml(async (t) => {
11063
- await $m(
11047
+ return await De(Fl, a), { logged: !0 };
11048
+ }, Av = () => Ml(async (t) => {
11049
+ await Nm(
11064
11050
  t.patientUuid,
11065
11051
  t.eventType,
11066
11052
  t.messageParams,
11067
11053
  t.module
11068
11054
  );
11069
- }), $v = async () => {
11055
+ }), Nv = async () => {
11070
11056
  try {
11071
11057
  return (await F(xa)).user.privileges;
11072
11058
  } catch (e) {
11073
11059
  const { message: t } = Rr(e);
11074
11060
  throw new Error(t);
11075
11061
  }
11076
- }, Pv = (e, t) => {
11062
+ }, $v = (e, t) => {
11077
11063
  if (!e || e.length === 0)
11078
11064
  return !1;
11079
11065
  if (!t || t.length === 0)
@@ -11082,17 +11068,17 @@ const En = /* @__PURE__ */ new Map(), Am = async (e) => {
11082
11068
  return e.some(
11083
11069
  (n) => r.includes(n.name)
11084
11070
  );
11085
- }, Pm = async (e) => {
11071
+ }, $m = async (e) => {
11086
11072
  let t;
11087
11073
  e && e.length > 0 && (t = e.join(","));
11088
- const r = await fetch(um(t));
11074
+ const r = await fetch(cm(t));
11089
11075
  if (!r.ok)
11090
11076
  throw new Error(
11091
11077
  `HTTP error! status for latestPublishedForms: ${r.status}`
11092
11078
  );
11093
11079
  const n = await r.json();
11094
11080
  return Array.isArray(n) ? n : [];
11095
- }, Im = (e, t) => {
11081
+ }, Pm = (e, t) => {
11096
11082
  const r = JSON.parse(e.nameTranslation);
11097
11083
  if (Array.isArray(r) && r.length > 0) {
11098
11084
  const n = r.find(
@@ -11102,8 +11088,8 @@ const En = /* @__PURE__ */ new Map(), Am = async (e) => {
11102
11088
  return n.display;
11103
11089
  }
11104
11090
  return e.name;
11105
- }, Cm = (e, t) => {
11106
- const r = Im(e, t);
11091
+ }, Im = (e, t) => {
11092
+ const r = Pm(e, t);
11107
11093
  return {
11108
11094
  uuid: e.uuid,
11109
11095
  name: r,
@@ -11113,13 +11099,13 @@ const En = /* @__PURE__ */ new Map(), Am = async (e) => {
11113
11099
  editable: n.editable
11114
11100
  }))
11115
11101
  };
11116
- }, Iv = async (e) => {
11117
- const t = await Pm(e), r = qr();
11102
+ }, Pv = async (e) => {
11103
+ const t = await $m(e), r = qr();
11118
11104
  return t.map(
11119
- (n) => Cm(n, r)
11105
+ (n) => Im(n, r)
11120
11106
  );
11121
- }, Cv = async (e) => {
11122
- const t = await fetch(cm(e));
11107
+ }, Iv = async (e) => {
11108
+ const t = await fetch(im(e));
11123
11109
  if (!t.ok)
11124
11110
  throw new Error(
11125
11111
  `Failed to fetch form metadata for ${e}: ${t.status}`
@@ -11130,7 +11116,7 @@ const En = /* @__PURE__ */ new Map(), Am = async (e) => {
11130
11116
  const n = JSON.parse(r.resources[0].value), s = qr(), o = r.name ?? n.name, a = r.uuid ?? n.uuid, i = r.version ?? n.version ?? "1", c = r.published ?? !1;
11131
11117
  let d = { labels: {}, concepts: {} };
11132
11118
  if (n && typeof n == "object" && "translationsUrl" in n && typeof n.translationsUrl == "string") {
11133
- const l = lm(
11119
+ const l = um(
11134
11120
  o,
11135
11121
  a,
11136
11122
  i,
@@ -11155,7 +11141,7 @@ const En = /* @__PURE__ */ new Map(), Am = async (e) => {
11155
11141
  }, Dv = async (e, t, r) => {
11156
11142
  let n;
11157
11143
  t && t.length > 0 && (n = t.join(","));
11158
- const s = dm(e, r, n), o = await F(s);
11144
+ const s = lm(e, r, n), o = await F(s);
11159
11145
  return Array.isArray(o) ? o : [];
11160
11146
  };
11161
11147
  function li(e) {
@@ -11197,7 +11183,7 @@ function fi(e, t) {
11197
11183
  };
11198
11184
  return n(r.controls);
11199
11185
  }
11200
- function Lv(e, t) {
11186
+ function Cv(e, t) {
11201
11187
  if (!e.controls || e.controls.length === 0)
11202
11188
  return [];
11203
11189
  const r = [], n = (/* @__PURE__ */ new Date()).toISOString();
@@ -11242,7 +11228,7 @@ function Lv(e, t) {
11242
11228
  s.interpretation && (a.interpretation = s.interpretation), s.comment && (a.comment = s.comment), r.push(a);
11243
11229
  }), r;
11244
11230
  }
11245
- function kv(e, t) {
11231
+ function Lv(e, t) {
11246
11232
  if (!e || e.length === 0)
11247
11233
  return {
11248
11234
  controls: [],
@@ -11275,7 +11261,7 @@ function kv(e, t) {
11275
11261
  metadata: { formMetadata: t }
11276
11262
  };
11277
11263
  }
11278
- function Uv(e) {
11264
+ function kv(e) {
11279
11265
  const t = (n) => {
11280
11266
  const s = (d) => d == null ? null : typeof d == "string" || typeof d == "number" || typeof d == "boolean" || typeof d == "object" ? d : null, o = n.concept, a = typeof o == "object" && o !== null && "uuid" in o ? o.uuid : o, i = typeof o == "object" && o !== null && "datatype" in o ? o.datatype : void 0, c = {
11281
11267
  concept: {
@@ -11295,11 +11281,11 @@ function Uv(e) {
11295
11281
  };
11296
11282
  return (e?.filter((n) => n.uuid && n.voided ? !0 : !(!n.uuid && n.voided || n.value && typeof n.value == "string" && n.value.endsWith("voided"))) ?? []).map(t);
11297
11283
  }
11298
- function xv(e) {
11284
+ function Uv(e) {
11299
11285
  if (!(!e || typeof e != "object"))
11300
11286
  return "toJS" in e && typeof e.toJS == "function" ? e.toJS() : e;
11301
11287
  }
11302
- function qv(e, t) {
11288
+ function xv(e, t) {
11303
11289
  !e || !Array.isArray(e.children) || e.children.forEach((r) => {
11304
11290
  r && typeof r == "object" && pi(
11305
11291
  r,
@@ -11329,7 +11315,7 @@ function pi(e, t) {
11329
11315
  );
11330
11316
  });
11331
11317
  }
11332
- const Dm = W + "/bahmnicore/diseaseSummaryData?", Mv = async (e, t, r, n) => {
11318
+ const Dm = W + "/bahmnicore/diseaseSummaryData?", qv = async (e, t, r, n) => {
11333
11319
  const s = new URLSearchParams({
11334
11320
  groupBy: n,
11335
11321
  latestCount: t.toString(),
@@ -11340,15 +11326,15 @@ const Dm = W + "/bahmnicore/diseaseSummaryData?", Mv = async (e, t, r, n) => {
11340
11326
  });
11341
11327
  const o = Dm + s.toString();
11342
11328
  return F(o);
11343
- }, Wn = "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)", Lm = (e) => `${W}/bahmniprogramenrollment?patient=${e}&v=${Wn}`, km = (e, t = 15, r = 0) => `${W}/bahmniprogramenrollment?patient=${e}&v=${Wn}&limit=${t}&startIndex=${r}&totalCount=true`, hi = (e) => `${W}/bahmniprogramenrollment/${e}`, Um = (e) => `${hi(e)}?v=${Wn}`, Fv = async (e) => await F(Lm(e)), jv = async (e, t = 15, r = 1) => {
11329
+ }, Wn = "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)", Cm = (e) => `${W}/bahmniprogramenrollment?patient=${e}&v=${Wn}`, Lm = (e, t = 15, r = 0) => `${W}/bahmniprogramenrollment?patient=${e}&v=${Wn}&limit=${t}&startIndex=${r}&totalCount=true`, hi = (e) => `${W}/bahmniprogramenrollment/${e}`, km = (e) => `${hi(e)}?v=${Wn}`, Mv = async (e) => await F(Cm(e)), Fv = async (e, t = 15, r = 1) => {
11344
11330
  const n = (r - 1) * t, s = await F(
11345
- km(e, t, n)
11331
+ Lm(e, t, n)
11346
11332
  );
11347
11333
  return {
11348
11334
  programs: s.results,
11349
11335
  total: s.totalCount
11350
11336
  };
11351
- }, Vv = async (e) => await F(Um(e)), Bv = async (e, t) => {
11337
+ }, jv = async (e) => await F(km(e)), Vv = async (e, t) => {
11352
11338
  const r = {
11353
11339
  uuid: e,
11354
11340
  states: [
@@ -11357,12 +11343,12 @@ const Dm = W + "/bahmnicore/diseaseSummaryData?", Mv = async (e, t, r, n) => {
11357
11343
  }
11358
11344
  ]
11359
11345
  };
11360
- return await Ce(
11346
+ return await De(
11361
11347
  hi(e),
11362
11348
  r
11363
11349
  );
11364
11350
  };
11365
- function Hv(e) {
11351
+ function Bv(e) {
11366
11352
  if (e.states.length === 0)
11367
11353
  return null;
11368
11354
  let t;
@@ -11378,7 +11364,7 @@ function Hv(e) {
11378
11364
  t = e.states.find((r) => r.endDate === null);
11379
11365
  return t ? Yf(t.state.concept.names) ?? t.state.concept.display : null;
11380
11366
  }
11381
- function zv(e, t) {
11367
+ function Hv(e, t) {
11382
11368
  if (t.length === 0)
11383
11369
  return {};
11384
11370
  const r = {};
@@ -11390,12 +11376,12 @@ function zv(e, t) {
11390
11376
  }
11391
11377
  return r;
11392
11378
  }
11393
- const In = "consultation:saved", Gv = (e) => {
11379
+ const In = "consultation:saved", zv = (e) => {
11394
11380
  const t = new CustomEvent(In, {
11395
11381
  detail: e
11396
11382
  });
11397
11383
  window.dispatchEvent(t);
11398
- }, Kv = (e, t = []) => {
11384
+ }, Gv = (e, t = []) => {
11399
11385
  const r = bn(e);
11400
11386
  _n(() => {
11401
11387
  r.current = e;
@@ -11427,17 +11413,17 @@ function gi(e) {
11427
11413
  };
11428
11414
  });
11429
11415
  }
11430
- async function xm(e, t) {
11416
+ async function Um(e, t) {
11431
11417
  const r = mi(e, t);
11432
11418
  return F(r);
11433
11419
  }
11434
- async function Yv(e, t) {
11435
- const n = ((await xm(e, t)).entry ?? []).filter(
11420
+ async function Kv(e, t) {
11421
+ const n = ((await Um(e, t)).entry ?? []).filter(
11436
11422
  (s) => !!s.resource
11437
11423
  );
11438
11424
  return gi(n);
11439
11425
  }
11440
- async function Wv(e, t, r = 10, n = 1) {
11426
+ async function Yv(e, t, r = 10, n = 1) {
11441
11427
  const s = (n - 1) * r, o = mi(
11442
11428
  e,
11443
11429
  t,
@@ -11451,24 +11437,24 @@ async function Wv(e, t, r = 10, n = 1) {
11451
11437
  total: a.total ?? i.length
11452
11438
  };
11453
11439
  }
11454
- const qm = (e) => `${W}/location?operator=ALL&s=byTags&tags=${encodeURIComponent(e)}&v=custom:(uuid,display,childLocations:(uuid,display,retired))`;
11455
- async function Jv(e) {
11456
- return (await F(qm(e))).results ?? [];
11440
+ const xm = (e) => `${W}/location?operator=ALL&s=byTags&tags=${encodeURIComponent(e)}&v=custom:(uuid,display,childLocations:(uuid,display,retired))`;
11441
+ async function Wv(e) {
11442
+ return (await F(xm(e))).results ?? [];
11457
11443
  }
11458
- const Mm = ce + "/Immunization", Fm = (e, t) => {
11459
- let r = `${Mm}?patient=${e}&_sort=-_lastUpdated&_count=100`;
11444
+ const qm = ce + "/Immunization", Mm = (e, t) => {
11445
+ let r = `${qm}?patient=${e}&_sort=-date&_count=100`;
11460
11446
  return t && (r += `&status=${t}`), r;
11461
11447
  };
11462
- async function Qv(e, t) {
11463
- return (await jm(e, t)).entry?.filter((n) => n.resource?.resourceType === "Immunization").map((n) => n.resource) ?? [];
11448
+ async function Jv(e, t) {
11449
+ return (await Fm(e, t)).entry?.filter((n) => n.resource?.resourceType === "Immunization").map((n) => n.resource) ?? [];
11464
11450
  }
11465
- async function jm(e, t) {
11451
+ async function Fm(e, t) {
11466
11452
  return F(
11467
- Fm(e, t)
11453
+ Mm(e, t)
11468
11454
  );
11469
11455
  }
11470
- const Vm = W + "/bahmnicore/visitDocument/uploadDocument", Bm = "application";
11471
- async function Hm(e) {
11456
+ const jm = W + "/bahmnicore/visitDocument/uploadDocument", Vm = "application";
11457
+ async function Bm(e) {
11472
11458
  return new Promise((t, r) => {
11473
11459
  const n = new FileReader();
11474
11460
  n.onload = () => {
@@ -11481,7 +11467,7 @@ async function Hm(e) {
11481
11467
  let a = o, i = "";
11482
11468
  const c = o.lastIndexOf(".");
11483
11469
  c !== -1 && (a = o.substring(0, c), i = o.substring(c + 1).toLowerCase());
11484
- const d = e.type ? e.type.split("/")[0] : Bm;
11470
+ const d = e.type ? e.type.split("/")[0] : Vm;
11485
11471
  t({
11486
11472
  content: s,
11487
11473
  fileName: a,
@@ -11493,8 +11479,8 @@ async function Hm(e) {
11493
11479
  }, n.readAsDataURL(e);
11494
11480
  });
11495
11481
  }
11496
- async function Xv(e, t, r) {
11497
- const n = await Hm(e), s = {
11482
+ async function Qv(e, t, r) {
11483
+ const n = await Bm(e), s = {
11498
11484
  content: n.content,
11499
11485
  encounterTypeName: t,
11500
11486
  fileName: n.fileName,
@@ -11502,196 +11488,196 @@ async function Xv(e, t, r) {
11502
11488
  format: n.format,
11503
11489
  patientUuid: r
11504
11490
  };
11505
- return Ce(Vm, s);
11491
+ return De(jm, s);
11506
11492
  }
11507
11493
  export {
11508
- ly as APPOINTMENT_IDENTIFIER_SYSTEM,
11509
- uy as APPOINTMENT_STATUSES,
11494
+ uy as APPOINTMENT_IDENTIFIER_SYSTEM,
11495
+ cy as APPOINTMENT_STATUSES,
11510
11496
  $n as AUDIT_LOG_EVENT_DETAILS,
11511
11497
  np as AllergySeverity,
11512
11498
  rp as AllergyStatus,
11513
11499
  Ul as AttributeFormat,
11514
11500
  xl as AttributeInputType,
11515
- hg as BAHMNI_HOME_PATH,
11516
- zy as CONCEPT_DATATYPE_COMPLEX,
11517
- Hy as CONCEPT_DATATYPE_NUMERIC,
11501
+ pg as BAHMNI_HOME_PATH,
11502
+ Hy as CONCEPT_DATATYPE_COMPLEX,
11503
+ By as CONCEPT_DATATYPE_NUMERIC,
11518
11504
  In as CONSULTATION_SAVED_EVENT,
11519
11505
  sp as DATETIME_REGEX_PATTERN,
11520
- Yy as DATE_REGEX_PATTERN,
11506
+ Ky as DATE_REGEX_PATTERN,
11521
11507
  Xa as DEFAULT_DATE_FORMAT,
11522
11508
  Lf as DEFAULT_DATE_FORMAT_STORAGE_KEY,
11523
11509
  kf as DEFAULT_TIME_FORMAT,
11524
11510
  qf as DURATION_UNIT_TO_DAYS,
11525
- Uy as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
11526
- Fy as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
11527
- Vy as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
11528
- jy as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
11529
- Gy as FHIR_OBSERVATION_STATUS_FINAL,
11530
- By as FHIR_OBSERVATION_VALUE_ATTACHMENT_URL,
11531
- Ky as FHIR_RESOURCE_TYPE_OBSERVATION,
11532
- My as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
11511
+ ky as FHIR_ENCOUNTER_TYPE_CODE_SYSTEM,
11512
+ My as FHIR_LAB_ORDER_CONCEPT_TYPE_EXTENSION_URL,
11513
+ jy as FHIR_OBSERVATION_FORM_NAMESPACE_PATH_URL,
11514
+ Fy as FHIR_OBSERVATION_INTERPRETATION_SYSTEM,
11515
+ zy as FHIR_OBSERVATION_STATUS_FINAL,
11516
+ Vy as FHIR_OBSERVATION_VALUE_ATTACHMENT_URL,
11517
+ Gy as FHIR_RESOURCE_TYPE_OBSERVATION,
11518
+ qy as HL7_CONDITION_CATEGORY_CODE_SYSTEM,
11533
11519
  ei as HL7_CONDITION_CATEGORY_CONDITION_CODE,
11534
11520
  ti as HL7_CONDITION_CATEGORY_DIAGNOSIS_CODE,
11535
- qy as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
11536
- xy as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
11537
- Wy as INTERPRETATION_TO_CODE,
11538
- qg as MAX_NAME_LENGTH,
11539
- xg as MAX_PATIENT_AGE_YEARS,
11540
- Mg as MAX_PHONE_NUMBER_LENGTH,
11521
+ xy as HL7_CONDITION_CLINICAL_STATUS_CODE_SYSTEM,
11522
+ Uy as HL7_CONDITION_VERIFICATION_STATUS_CODE_SYSTEM,
11523
+ Yy as INTERPRETATION_TO_CODE,
11524
+ xg as MAX_NAME_LENGTH,
11525
+ Ug as MAX_PATIENT_AGE_YEARS,
11526
+ qg as MAX_PHONE_NUMBER_LENGTH,
11541
11527
  Ue as MedicationStatus,
11542
11528
  ce as OPENMRS_FHIR_R4,
11543
11529
  W as OPENMRS_REST_V1,
11544
- hv as ORDER_TYPE_QUERY_KEY,
11545
- pv as PENDING_REPORT_STATUSES,
11546
- fv as PROCESSED_REPORT_STATUSES,
11547
- Ev as USER_PINNED_PREFERENCE_URL,
11548
- Ey as calculateAge,
11549
- Oy as calculateEndDate,
11550
- _y as calculateOnsetDate,
11551
- $g as camelToScreamingSnakeCase,
11552
- bg as capitalize,
11553
- iy as checkIfActiveVisitExists,
11554
- xv as convertImmutableToPlainObject,
11555
- Ig as convertToSentenceCase,
11556
- Gg as createPatient,
11557
- cy as createVisitForPatient,
11530
+ pv as ORDER_TYPE_QUERY_KEY,
11531
+ fv as PENDING_REPORT_STATUSES,
11532
+ dv as PROCESSED_REPORT_STATUSES,
11533
+ wv as USER_PINNED_PREFERENCE_URL,
11534
+ wy as calculateAge,
11535
+ Ty as calculateEndDate,
11536
+ by as calculateOnsetDate,
11537
+ Ng as camelToScreamingSnakeCase,
11538
+ Eg as capitalize,
11539
+ ay as checkIfActiveVisitExists,
11540
+ Uv as convertImmutableToPlainObject,
11541
+ Pg as convertToSentenceCase,
11542
+ zg as createPatient,
11543
+ iy as createVisitForPatient,
11558
11544
  Pa as del,
11559
- yy as deleteAppointmentService,
11545
+ gy as deleteAppointmentService,
11560
11546
  tl as deleteCookie,
11561
11547
  ql as dispatchAuditEvent,
11562
- Gv as dispatchConsultationSaved,
11563
- Ay as doDateRangesOverlap,
11564
- zv as extractAttributes,
11565
- qv as extractNotesFromFormData,
11548
+ zv as dispatchConsultationSaved,
11549
+ Oy as doDateRangesOverlap,
11550
+ Hv as extractAttributes,
11551
+ xv as extractNotesFromFormData,
11566
11552
  Dy as fetchAndFormatAllergenConcepts,
11567
- Cv as fetchFormMetadata,
11568
- tv as fetchMedicationOrdersMetadata,
11569
- Iv as fetchObservationForms,
11570
- iv as fetchQualityAssessment,
11571
- Ly as fetchReactionConcepts,
11572
- Og as filterReplacementEntries,
11573
- Ov as findActiveEncounterInSession,
11574
- Sy as formatDateDistance,
11575
- by as formatDateTime,
11576
- Ag as formatUrl,
11577
- wg as generateId,
11578
- Eg as generateUUID,
11553
+ Iv as fetchFormMetadata,
11554
+ ev as fetchMedicationOrdersMetadata,
11555
+ Pv as fetchObservationForms,
11556
+ av as fetchQualityAssessment,
11557
+ Cy as fetchReactionConcepts,
11558
+ Tg as filterReplacementEntries,
11559
+ Tv as findActiveEncounterInSession,
11560
+ _y as formatDateDistance,
11561
+ Ey as formatDateTime,
11562
+ Og as formatUrl,
11563
+ vg as generateId,
11564
+ wg as generateUUID,
11579
11565
  F as get,
11580
- Em as getActiveVisit,
11566
+ wm as getActiveVisit,
11581
11567
  Gl as getActiveVisitByPatient,
11582
- Wg as getAddressHierarchyEntries,
11583
- gy as getAllAppointmentServices,
11568
+ Yg as getAddressHierarchyEntries,
11569
+ my as getAllAppointmentServices,
11584
11570
  ep as getAllergies,
11585
- my as getAppointmentById,
11586
- Lg as getAvailableLocations,
11587
- gv as getCategoryUuidFromOrderTypes,
11588
- Iy as getConceptById,
11589
- Qy as getConditionPage,
11590
- Jy as getConditions,
11591
- wv as getConfig,
11571
+ hy as getAppointmentById,
11572
+ Cg as getAvailableLocations,
11573
+ mv as getCategoryUuidFromOrderTypes,
11574
+ Py as getConceptById,
11575
+ Jy as getConditionPage,
11576
+ Wy as getConditions,
11577
+ vv as getConfig,
11592
11578
  Fa as getCookieByName,
11593
- Sv as getCurrentProvider,
11594
- Hv as getCurrentStateName,
11595
- Cg as getCurrentUser,
11596
- $v as getCurrentUserPrivileges,
11579
+ _v as getCurrentProvider,
11580
+ Bv as getCurrentStateName,
11581
+ Ig as getCurrentUser,
11582
+ Nv as getCurrentUserPrivileges,
11597
11583
  Dg as getDefaultDateFormat,
11598
- Zy as getDiagnosesPage,
11599
- lv as getDiagnosticReportBundle,
11600
- uv as getDiagnosticReports,
11601
- Wv as getDocumentReferencePage,
11602
- xm as getDocumentReferences,
11603
- Av as getEncountersAndVisitsForEOC,
11604
- vv as getExistingServiceRequestsForAllCategories,
11605
- mv as getFlattenedInvestigations,
11606
- Ty as getFormattedAge,
11607
- ky as getFormattedAllergies,
11608
- Yv as getFormattedDocumentReferences,
11584
+ Xy as getDiagnosesPage,
11585
+ uv as getDiagnosticReportBundle,
11586
+ cv as getDiagnosticReports,
11587
+ Yv as getDocumentReferencePage,
11588
+ Um as getDocumentReferences,
11589
+ Ov as getEncountersAndVisitsForEOC,
11590
+ yv as getExistingServiceRequestsForAllCategories,
11591
+ hv as getFlattenedInvestigations,
11592
+ Ry as getFormattedAge,
11593
+ Ly as getFormattedAllergies,
11594
+ Kv as getFormattedDocumentReferences,
11609
11595
  Rr as getFormattedError,
11610
- Fg as getFormattedPatientById,
11611
- Yg as getGenders,
11612
- zg as getIdentifierData,
11613
- Hg as getIdentifierTypes,
11614
- ey as getInputTypeForFormat,
11615
- cv as getLabInvestigationsBundle,
11616
- Jv as getLocationByTag,
11617
- Rv as getObservationsBundleByEncounterUuid,
11618
- yv as getOrderTypeNames,
11596
+ Mg as getFormattedPatientById,
11597
+ Kg as getGenders,
11598
+ Hg as getIdentifierData,
11599
+ Bg as getIdentifierTypes,
11600
+ Zg as getInputTypeForFormat,
11601
+ iv as getLabInvestigationsBundle,
11602
+ Wv as getLocationByTag,
11603
+ Sv as getObservationsBundleByEncounterUuid,
11604
+ gv as getOrderTypeNames,
11619
11605
  zn as getOrderTypes,
11620
- Jg as getOrderedAddressHierarchyLevels,
11621
- py as getPastAppointments,
11622
- wy as getPastAppointmentsPage,
11606
+ Wg as getOrderedAddressHierarchyLevels,
11607
+ fy as getPastAppointments,
11608
+ vy as getPastAppointmentsPage,
11623
11609
  $l as getPatientById,
11624
- Xy as getPatientDiagnoses,
11610
+ Qy as getPatientDiagnoses,
11625
11611
  Dv as getPatientFormData,
11626
- jg as getPatientImageAsDataUrl,
11627
- Qv as getPatientImmunizations,
11612
+ Fg as getPatientImageAsDataUrl,
11613
+ Jv as getPatientImmunizations,
11628
11614
  Sp as getPatientMedicationBundle,
11629
- ev as getPatientMedications,
11630
- _v as getPatientObservations,
11631
- hm as getPatientObservationsBundle,
11632
- bv as getPatientObservationsWithEncounterBundle,
11633
- Qg as getPatientProfile,
11634
- Fv as getPatientPrograms,
11635
- jv as getPatientProgramsPage,
11636
- sv as getPatientRadiologyInvestigationBundle,
11637
- ov as getPatientRadiologyInvestigationBundleWithImagingStudy,
11638
- av as getPatientRadiologyInvestigations,
11639
- Zg as getPersonAttributeTypes,
11615
+ Zy as getPatientMedications,
11616
+ bv as getPatientObservations,
11617
+ pm as getPatientObservationsBundle,
11618
+ Ev as getPatientObservationsWithEncounterBundle,
11619
+ Jg as getPatientProfile,
11620
+ Mv as getPatientPrograms,
11621
+ Fv as getPatientProgramsPage,
11622
+ nv as getPatientRadiologyInvestigationBundle,
11623
+ sv as getPatientRadiologyInvestigationBundleWithImagingStudy,
11624
+ ov as getPatientRadiologyInvestigations,
11625
+ Xg as getPersonAttributeTypes,
11640
11626
  kl as getPrimaryIdentifierType,
11641
- Rg as getPriorityByOrder,
11642
- Vv as getProgramByUUID,
11643
- Xg as getRelationshipTypes,
11627
+ Sg as getPriorityByOrder,
11628
+ jv as getProgramByUUID,
11629
+ Qg as getRelationshipTypes,
11644
11630
  Pt as getServiceRequests,
11645
- Ry as getTodayDate,
11646
- fy as getUpcomingAppointments,
11647
- vy as getUpcomingAppointmentsPage,
11631
+ Sy as getTodayDate,
11632
+ dy as getUpcomingAppointments,
11633
+ yy as getUpcomingAppointmentsPage,
11648
11634
  qn as getUserLoginLocation,
11649
11635
  qr as getUserPreferredLocale,
11650
- nv as getVaccinations,
11651
- Ng as getValueType,
11652
- ay as getVisitTypes,
11653
- Mv as getVitalFlowSheetData,
11654
- Tg as groupByDate,
11655
- Pv as hasPrivilege,
11656
- gg as initAppI18n,
11657
- Nv as initializeAuditListener,
11658
- ty as isBooleanFormat,
11659
- ry as isConceptFormat,
11660
- sy as isDateFormat,
11661
- ny as isNumberFormat,
11662
- Sg as isStringEmpty,
11663
- oy as isTextFormat,
11664
- $m as logAuditEvent,
11665
- kg as logout,
11666
- mg as normalizeTranslationKey,
11667
- $y as notificationService,
11636
+ rv as getVaccinations,
11637
+ Ag as getValueType,
11638
+ oy as getVisitTypes,
11639
+ qv as getVitalFlowSheetData,
11640
+ Rg as groupByDate,
11641
+ $v as hasPrivilege,
11642
+ mg as initAppI18n,
11643
+ Av as initializeAuditListener,
11644
+ ey as isBooleanFormat,
11645
+ ty as isConceptFormat,
11646
+ ny as isDateFormat,
11647
+ ry as isNumberFormat,
11648
+ _g as isStringEmpty,
11649
+ sy as isTextFormat,
11650
+ Nm as logAuditEvent,
11651
+ Lg as logout,
11652
+ hg as normalizeTranslationKey,
11653
+ Ny as notificationService,
11668
11654
  rl as parseQueryParams,
11669
- pg as patch,
11670
- Ce as post,
11671
- fg as put,
11672
- vg as refreshQueries,
11673
- Pg as resolveComboBoxItems,
11674
- Ug as saveUserLocation,
11675
- dy as searchAppointmentsByAttribute,
11676
- Cy as searchConceptByName,
11677
- Py as searchConcepts,
11655
+ fg as patch,
11656
+ De as post,
11657
+ dg as put,
11658
+ yg as refreshQueries,
11659
+ $g as resolveComboBoxItems,
11660
+ kg as saveUserLocation,
11661
+ ly as searchAppointmentsByAttribute,
11662
+ Iy as searchConceptByName,
11663
+ $y as searchConcepts,
11678
11664
  br as searchFHIRConcepts,
11679
11665
  Kf as searchFHIRConceptsByName,
11680
- rv as searchMedications,
11681
- Bg as searchPatientByCustomAttribute,
11682
- Vg as searchPatientByNameOrId,
11683
- _g as setCookie,
11684
- Tv as shouldEnableEncounterFilter,
11685
- Ny as sortByDate,
11686
- Uv as transformContainerObservationsToForm2Observations,
11687
- Lv as transformFormDataToObservations,
11688
- kv as transformObservationsToFormData,
11689
- hy as updateAppointmentStatus,
11690
- dv as updateDiagnosticReportBundle,
11691
- Kg as updatePatient,
11692
- Bv as updateProgramState,
11693
- Xv as uploadDocument,
11694
- yg as useCamera,
11695
- Kv as useSubscribeConsultationSaved,
11696
- tw as useTranslation
11666
+ tv as searchMedications,
11667
+ Vg as searchPatientByCustomAttribute,
11668
+ jg as searchPatientByNameOrId,
11669
+ bg as setCookie,
11670
+ Rv as shouldEnableEncounterFilter,
11671
+ Ay as sortByDate,
11672
+ kv as transformContainerObservationsToForm2Observations,
11673
+ Cv as transformFormDataToObservations,
11674
+ Lv as transformObservationsToFormData,
11675
+ py as updateAppointmentStatus,
11676
+ lv as updateDiagnosticReportBundle,
11677
+ Gg as updatePatient,
11678
+ Vv as updateProgramState,
11679
+ Qv as uploadDocument,
11680
+ gg as useCamera,
11681
+ Gv as useSubscribeConsultationSaved,
11682
+ ew as useTranslation
11697
11683
  };