@medplum/agent 5.1.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cjs/index.cjs +649 -645
  2. package/package.json +5 -5
@@ -535,7 +535,7 @@ var require_utf32 = __commonJS({
535
535
  return this.decoder.end();
536
536
  };
537
537
  function detectEncoding(bufs, defaultEncoding) {
538
- var b3 = [];
538
+ var b2 = [];
539
539
  var charsProcessed = 0;
540
540
  var invalidLE = 0;
541
541
  var invalidBE = 0;
@@ -545,21 +545,21 @@ var require_utf32 = __commonJS({
545
545
  for (var i = 0; i < bufs.length; i++) {
546
546
  var buf = bufs[i];
547
547
  for (var j2 = 0; j2 < buf.length; j2++) {
548
- b3.push(buf[j2]);
549
- if (b3.length === 4) {
548
+ b2.push(buf[j2]);
549
+ if (b2.length === 4) {
550
550
  if (charsProcessed === 0) {
551
- if (b3[0] === 255 && b3[1] === 254 && b3[2] === 0 && b3[3] === 0) {
551
+ if (b2[0] === 255 && b2[1] === 254 && b2[2] === 0 && b2[3] === 0) {
552
552
  return "utf-32le";
553
553
  }
554
- if (b3[0] === 0 && b3[1] === 0 && b3[2] === 254 && b3[3] === 255) {
554
+ if (b2[0] === 0 && b2[1] === 0 && b2[2] === 254 && b2[3] === 255) {
555
555
  return "utf-32be";
556
556
  }
557
557
  }
558
- if (b3[0] !== 0 || b3[1] > 16) invalidBE++;
559
- if (b3[3] !== 0 || b3[2] > 16) invalidLE++;
560
- if (b3[0] === 0 && b3[1] === 0 && (b3[2] !== 0 || b3[3] !== 0)) bmpCharsBE++;
561
- if ((b3[0] !== 0 || b3[1] !== 0) && b3[2] === 0 && b3[3] === 0) bmpCharsLE++;
562
- b3.length = 0;
558
+ if (b2[0] !== 0 || b2[1] > 16) invalidBE++;
559
+ if (b2[3] !== 0 || b2[2] > 16) invalidLE++;
560
+ if (b2[0] === 0 && b2[1] === 0 && (b2[2] !== 0 || b2[3] !== 0)) bmpCharsBE++;
561
+ if ((b2[0] !== 0 || b2[1] !== 0) && b2[2] === 0 && b2[3] === 0) bmpCharsLE++;
562
+ b2.length = 0;
563
563
  charsProcessed++;
564
564
  if (charsProcessed >= 100) {
565
565
  break outerLoop;
@@ -686,7 +686,7 @@ var require_utf16 = __commonJS({
686
686
  return this.decoder.end();
687
687
  };
688
688
  function detectEncoding(bufs, defaultEncoding) {
689
- var b3 = [];
689
+ var b2 = [];
690
690
  var charsProcessed = 0;
691
691
  var asciiCharsLE = 0;
692
692
  var asciiCharsBE = 0;
@@ -694,15 +694,15 @@ var require_utf16 = __commonJS({
694
694
  for (var i = 0; i < bufs.length; i++) {
695
695
  var buf = bufs[i];
696
696
  for (var j2 = 0; j2 < buf.length; j2++) {
697
- b3.push(buf[j2]);
698
- if (b3.length === 2) {
697
+ b2.push(buf[j2]);
698
+ if (b2.length === 2) {
699
699
  if (charsProcessed === 0) {
700
- if (b3[0] === 255 && b3[1] === 254) return "utf-16le";
701
- if (b3[0] === 254 && b3[1] === 255) return "utf-16be";
700
+ if (b2[0] === 255 && b2[1] === 254) return "utf-16le";
701
+ if (b2[0] === 254 && b2[1] === 255) return "utf-16be";
702
702
  }
703
- if (b3[0] === 0 && b3[1] !== 0) asciiCharsBE++;
704
- if (b3[0] !== 0 && b3[1] === 0) asciiCharsLE++;
705
- b3.length = 0;
703
+ if (b2[0] === 0 && b2[1] !== 0) asciiCharsBE++;
704
+ if (b2[0] !== 0 && b2[1] === 0) asciiCharsLE++;
705
+ b2.length = 0;
706
706
  charsProcessed++;
707
707
  if (charsProcessed >= 100) {
708
708
  break outerLoop;
@@ -3968,19 +3968,19 @@ var require_identifiers = __commonJS({
3968
3968
  "node_modules/semver/internal/identifiers.js"(exports2, module2) {
3969
3969
  "use strict";
3970
3970
  var numeric = /^[0-9]+$/;
3971
- var compareIdentifiers = (a, b3) => {
3972
- if (typeof a === "number" && typeof b3 === "number") {
3973
- return a === b3 ? 0 : a < b3 ? -1 : 1;
3971
+ var compareIdentifiers = (a, b2) => {
3972
+ if (typeof a === "number" && typeof b2 === "number") {
3973
+ return a === b2 ? 0 : a < b2 ? -1 : 1;
3974
3974
  }
3975
3975
  const anum = numeric.test(a);
3976
- const bnum = numeric.test(b3);
3976
+ const bnum = numeric.test(b2);
3977
3977
  if (anum && bnum) {
3978
3978
  a = +a;
3979
- b3 = +b3;
3979
+ b2 = +b2;
3980
3980
  }
3981
- return a === b3 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b3 ? -1 : 1;
3981
+ return a === b2 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b2 ? -1 : 1;
3982
3982
  };
3983
- var rcompareIdentifiers = (a, b3) => compareIdentifiers(b3, a);
3983
+ var rcompareIdentifiers = (a, b2) => compareIdentifiers(b2, a);
3984
3984
  module2.exports = {
3985
3985
  compareIdentifiers,
3986
3986
  rcompareIdentifiers
@@ -4112,18 +4112,18 @@ var require_semver = __commonJS({
4112
4112
  let i = 0;
4113
4113
  do {
4114
4114
  const a = this.prerelease[i];
4115
- const b3 = other.prerelease[i];
4116
- debug("prerelease compare", i, a, b3);
4117
- if (a === void 0 && b3 === void 0) {
4115
+ const b2 = other.prerelease[i];
4116
+ debug("prerelease compare", i, a, b2);
4117
+ if (a === void 0 && b2 === void 0) {
4118
4118
  return 0;
4119
- } else if (b3 === void 0) {
4119
+ } else if (b2 === void 0) {
4120
4120
  return 1;
4121
4121
  } else if (a === void 0) {
4122
4122
  return -1;
4123
- } else if (a === b3) {
4123
+ } else if (a === b2) {
4124
4124
  continue;
4125
4125
  } else {
4126
- return compareIdentifiers(a, b3);
4126
+ return compareIdentifiers(a, b2);
4127
4127
  }
4128
4128
  } while (++i);
4129
4129
  }
@@ -4134,18 +4134,18 @@ var require_semver = __commonJS({
4134
4134
  let i = 0;
4135
4135
  do {
4136
4136
  const a = this.build[i];
4137
- const b3 = other.build[i];
4138
- debug("build compare", i, a, b3);
4139
- if (a === void 0 && b3 === void 0) {
4137
+ const b2 = other.build[i];
4138
+ debug("build compare", i, a, b2);
4139
+ if (a === void 0 && b2 === void 0) {
4140
4140
  return 0;
4141
- } else if (b3 === void 0) {
4141
+ } else if (b2 === void 0) {
4142
4142
  return 1;
4143
4143
  } else if (a === void 0) {
4144
4144
  return -1;
4145
- } else if (a === b3) {
4145
+ } else if (a === b2) {
4146
4146
  continue;
4147
4147
  } else {
4148
- return compareIdentifiers(a, b3);
4148
+ return compareIdentifiers(a, b2);
4149
4149
  }
4150
4150
  } while (++i);
4151
4151
  }
@@ -4431,7 +4431,7 @@ var require_compare = __commonJS({
4431
4431
  "node_modules/semver/functions/compare.js"(exports2, module2) {
4432
4432
  "use strict";
4433
4433
  var SemVer = require_semver();
4434
- var compare = (a, b3, loose) => new SemVer(a, loose).compare(new SemVer(b3, loose));
4434
+ var compare = (a, b2, loose) => new SemVer(a, loose).compare(new SemVer(b2, loose));
4435
4435
  module2.exports = compare;
4436
4436
  }
4437
4437
  });
@@ -4441,7 +4441,7 @@ var require_rcompare = __commonJS({
4441
4441
  "node_modules/semver/functions/rcompare.js"(exports2, module2) {
4442
4442
  "use strict";
4443
4443
  var compare = require_compare();
4444
- var rcompare = (a, b3, loose) => compare(b3, a, loose);
4444
+ var rcompare = (a, b2, loose) => compare(b2, a, loose);
4445
4445
  module2.exports = rcompare;
4446
4446
  }
4447
4447
  });
@@ -4451,7 +4451,7 @@ var require_compare_loose = __commonJS({
4451
4451
  "node_modules/semver/functions/compare-loose.js"(exports2, module2) {
4452
4452
  "use strict";
4453
4453
  var compare = require_compare();
4454
- var compareLoose = (a, b3) => compare(a, b3, true);
4454
+ var compareLoose = (a, b2) => compare(a, b2, true);
4455
4455
  module2.exports = compareLoose;
4456
4456
  }
4457
4457
  });
@@ -4461,9 +4461,9 @@ var require_compare_build = __commonJS({
4461
4461
  "node_modules/semver/functions/compare-build.js"(exports2, module2) {
4462
4462
  "use strict";
4463
4463
  var SemVer = require_semver();
4464
- var compareBuild = (a, b3, loose) => {
4464
+ var compareBuild = (a, b2, loose) => {
4465
4465
  const versionA = new SemVer(a, loose);
4466
- const versionB = new SemVer(b3, loose);
4466
+ const versionB = new SemVer(b2, loose);
4467
4467
  return versionA.compare(versionB) || versionA.compareBuild(versionB);
4468
4468
  };
4469
4469
  module2.exports = compareBuild;
@@ -4475,7 +4475,7 @@ var require_sort = __commonJS({
4475
4475
  "node_modules/semver/functions/sort.js"(exports2, module2) {
4476
4476
  "use strict";
4477
4477
  var compareBuild = require_compare_build();
4478
- var sort = (list, loose) => list.sort((a, b3) => compareBuild(a, b3, loose));
4478
+ var sort = (list, loose) => list.sort((a, b2) => compareBuild(a, b2, loose));
4479
4479
  module2.exports = sort;
4480
4480
  }
4481
4481
  });
@@ -4485,7 +4485,7 @@ var require_rsort = __commonJS({
4485
4485
  "node_modules/semver/functions/rsort.js"(exports2, module2) {
4486
4486
  "use strict";
4487
4487
  var compareBuild = require_compare_build();
4488
- var rsort = (list, loose) => list.sort((a, b3) => compareBuild(b3, a, loose));
4488
+ var rsort = (list, loose) => list.sort((a, b2) => compareBuild(b2, a, loose));
4489
4489
  module2.exports = rsort;
4490
4490
  }
4491
4491
  });
@@ -4495,7 +4495,7 @@ var require_gt = __commonJS({
4495
4495
  "node_modules/semver/functions/gt.js"(exports2, module2) {
4496
4496
  "use strict";
4497
4497
  var compare = require_compare();
4498
- var gt = (a, b3, loose) => compare(a, b3, loose) > 0;
4498
+ var gt = (a, b2, loose) => compare(a, b2, loose) > 0;
4499
4499
  module2.exports = gt;
4500
4500
  }
4501
4501
  });
@@ -4505,7 +4505,7 @@ var require_lt = __commonJS({
4505
4505
  "node_modules/semver/functions/lt.js"(exports2, module2) {
4506
4506
  "use strict";
4507
4507
  var compare = require_compare();
4508
- var lt4 = (a, b3, loose) => compare(a, b3, loose) < 0;
4508
+ var lt4 = (a, b2, loose) => compare(a, b2, loose) < 0;
4509
4509
  module2.exports = lt4;
4510
4510
  }
4511
4511
  });
@@ -4515,7 +4515,7 @@ var require_eq = __commonJS({
4515
4515
  "node_modules/semver/functions/eq.js"(exports2, module2) {
4516
4516
  "use strict";
4517
4517
  var compare = require_compare();
4518
- var eq = (a, b3, loose) => compare(a, b3, loose) === 0;
4518
+ var eq = (a, b2, loose) => compare(a, b2, loose) === 0;
4519
4519
  module2.exports = eq;
4520
4520
  }
4521
4521
  });
@@ -4525,7 +4525,7 @@ var require_neq = __commonJS({
4525
4525
  "node_modules/semver/functions/neq.js"(exports2, module2) {
4526
4526
  "use strict";
4527
4527
  var compare = require_compare();
4528
- var neq = (a, b3, loose) => compare(a, b3, loose) !== 0;
4528
+ var neq = (a, b2, loose) => compare(a, b2, loose) !== 0;
4529
4529
  module2.exports = neq;
4530
4530
  }
4531
4531
  });
@@ -4535,7 +4535,7 @@ var require_gte = __commonJS({
4535
4535
  "node_modules/semver/functions/gte.js"(exports2, module2) {
4536
4536
  "use strict";
4537
4537
  var compare = require_compare();
4538
- var gte = (a, b3, loose) => compare(a, b3, loose) >= 0;
4538
+ var gte = (a, b2, loose) => compare(a, b2, loose) >= 0;
4539
4539
  module2.exports = gte;
4540
4540
  }
4541
4541
  });
@@ -4545,7 +4545,7 @@ var require_lte = __commonJS({
4545
4545
  "node_modules/semver/functions/lte.js"(exports2, module2) {
4546
4546
  "use strict";
4547
4547
  var compare = require_compare();
4548
- var lte = (a, b3, loose) => compare(a, b3, loose) <= 0;
4548
+ var lte = (a, b2, loose) => compare(a, b2, loose) <= 0;
4549
4549
  module2.exports = lte;
4550
4550
  }
4551
4551
  });
@@ -4560,38 +4560,38 @@ var require_cmp = __commonJS({
4560
4560
  var gte = require_gte();
4561
4561
  var lt4 = require_lt();
4562
4562
  var lte = require_lte();
4563
- var cmp = (a, op, b3, loose) => {
4563
+ var cmp = (a, op, b2, loose) => {
4564
4564
  switch (op) {
4565
4565
  case "===":
4566
4566
  if (typeof a === "object") {
4567
4567
  a = a.version;
4568
4568
  }
4569
- if (typeof b3 === "object") {
4570
- b3 = b3.version;
4569
+ if (typeof b2 === "object") {
4570
+ b2 = b2.version;
4571
4571
  }
4572
- return a === b3;
4572
+ return a === b2;
4573
4573
  case "!==":
4574
4574
  if (typeof a === "object") {
4575
4575
  a = a.version;
4576
4576
  }
4577
- if (typeof b3 === "object") {
4578
- b3 = b3.version;
4577
+ if (typeof b2 === "object") {
4578
+ b2 = b2.version;
4579
4579
  }
4580
- return a !== b3;
4580
+ return a !== b2;
4581
4581
  case "":
4582
4582
  case "=":
4583
4583
  case "==":
4584
- return eq(a, b3, loose);
4584
+ return eq(a, b2, loose);
4585
4585
  case "!=":
4586
- return neq(a, b3, loose);
4586
+ return neq(a, b2, loose);
4587
4587
  case ">":
4588
- return gt(a, b3, loose);
4588
+ return gt(a, b2, loose);
4589
4589
  case ">=":
4590
- return gte(a, b3, loose);
4590
+ return gte(a, b2, loose);
4591
4591
  case "<":
4592
- return lt4(a, b3, loose);
4592
+ return lt4(a, b2, loose);
4593
4593
  case "<=":
4594
- return lte(a, b3, loose);
4594
+ return lte(a, b2, loose);
4595
4595
  default:
4596
4596
  throw new TypeError(`Invalid operator: ${op}`);
4597
4597
  }
@@ -4761,8 +4761,8 @@ var require_range = __commonJS({
4761
4761
  return cached;
4762
4762
  }
4763
4763
  const loose = this.options.loose;
4764
- const hr = loose ? re2[t.HYPHENRANGELOOSE] : re2[t.HYPHENRANGE];
4765
- range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
4764
+ const hr2 = loose ? re2[t.HYPHENRANGELOOSE] : re2[t.HYPHENRANGE];
4765
+ range = range.replace(hr2, hyphenReplace(this.options.includePrerelease));
4766
4766
  debug("hyphen replace", range);
4767
4767
  range = range.replace(re2[t.COMPARATORTRIM], comparatorTrimReplace);
4768
4768
  debug("comparator trim", range);
@@ -5447,7 +5447,7 @@ var require_simplify = __commonJS({
5447
5447
  const set = [];
5448
5448
  let first = null;
5449
5449
  let prev = null;
5450
- const v3 = versions.sort((a, b3) => compare(a, b3, options));
5450
+ const v3 = versions.sort((a, b2) => compare(a, b2, options));
5451
5451
  for (const version of v3) {
5452
5452
  const included = satisfies(version, range, options);
5453
5453
  if (included) {
@@ -5631,19 +5631,19 @@ var require_subset = __commonJS({
5631
5631
  }
5632
5632
  return true;
5633
5633
  };
5634
- var higherGT = (a, b3, options) => {
5634
+ var higherGT = (a, b2, options) => {
5635
5635
  if (!a) {
5636
- return b3;
5636
+ return b2;
5637
5637
  }
5638
- const comp = compare(a.semver, b3.semver, options);
5639
- return comp > 0 ? a : comp < 0 ? b3 : b3.operator === ">" && a.operator === ">=" ? b3 : a;
5638
+ const comp = compare(a.semver, b2.semver, options);
5639
+ return comp > 0 ? a : comp < 0 ? b2 : b2.operator === ">" && a.operator === ">=" ? b2 : a;
5640
5640
  };
5641
- var lowerLT = (a, b3, options) => {
5641
+ var lowerLT = (a, b2, options) => {
5642
5642
  if (!a) {
5643
- return b3;
5643
+ return b2;
5644
5644
  }
5645
- const comp = compare(a.semver, b3.semver, options);
5646
- return comp < 0 ? a : comp > 0 ? b3 : b3.operator === "<" && a.operator === "<=" ? b3 : a;
5645
+ const comp = compare(a.semver, b2.semver, options);
5646
+ return comp < 0 ? a : comp > 0 ? b2 : b2.operator === "<" && a.operator === "<=" ? b2 : a;
5647
5647
  };
5648
5648
  module2.exports = subset;
5649
5649
  }
@@ -10801,12 +10801,12 @@ var require_dcmjs = __commonJS({
10801
10801
  s.block_start = s.strstart;
10802
10802
  flush_pending(s.strm);
10803
10803
  };
10804
- const put_byte = (s, b3) => {
10805
- s.pending_buf[s.pending++] = b3;
10804
+ const put_byte = (s, b2) => {
10805
+ s.pending_buf[s.pending++] = b2;
10806
10806
  };
10807
- const putShortMSB = (s, b3) => {
10808
- s.pending_buf[s.pending++] = b3 >>> 8 & 255;
10809
- s.pending_buf[s.pending++] = b3 & 255;
10807
+ const putShortMSB = (s, b2) => {
10808
+ s.pending_buf[s.pending++] = b2 >>> 8 & 255;
10809
+ s.pending_buf[s.pending++] = b2 & 255;
10810
10810
  };
10811
10811
  const read_buf = (strm, buf, start, size) => {
10812
10812
  let len2 = strm.avail_in;
@@ -18142,9 +18142,9 @@ var require_dcmjs = __commonJS({
18142
18142
  value: function lab2XYZ(lab) {
18143
18143
  var L2 = (lab[0] + 16) / 116;
18144
18144
  var a = L2 + lab[1] / 500;
18145
- var b3 = L2 - lab[2] / 200;
18145
+ var b2 = L2 - lab[2] / 200;
18146
18146
  var whitePoint = Colors2.d65WhitePointXYZ();
18147
- return [whitePoint[0] * Colors2.labfInv(a), whitePoint[1] * Colors2.labfInv(L2), whitePoint[2] * Colors2.labfInv(b3)];
18147
+ return [whitePoint[0] * Colors2.labfInv(a), whitePoint[1] * Colors2.labfInv(L2), whitePoint[2] * Colors2.labfInv(b2)];
18148
18148
  }
18149
18149
  }, {
18150
18150
  key: "xyz2RGB",
@@ -18470,8 +18470,8 @@ var require_dcmjs = __commonJS({
18470
18470
  var distance2 = ImageNormalizer2.vec3Dot(positionVector, scanAxis);
18471
18471
  distanceDatasetPairs.push([distance2, dataset]);
18472
18472
  });
18473
- distanceDatasetPairs.sort(function(a, b3) {
18474
- return b3[0] - a[0];
18473
+ distanceDatasetPairs.sort(function(a, b2) {
18474
+ return b2[0] - a[0];
18475
18475
  });
18476
18476
  if (ds2.BitsAllocated !== 16) {
18477
18477
  log2.error("Only works with 16 bit data, not " + String(this.dataset.BitsAllocated));
@@ -18659,8 +18659,8 @@ var require_dcmjs = __commonJS({
18659
18659
  }
18660
18660
  }], [{
18661
18661
  key: "vec3CrossProduct",
18662
- value: function vec3CrossProduct(a, b3) {
18663
- var ax = a[0], ay = a[1], az = a[2], bx = b3[0], by = b3[1], bz = b3[2];
18662
+ value: function vec3CrossProduct(a, b2) {
18663
+ var ax = a[0], ay = a[1], az = a[2], bx = b2[0], by = b2[1], bz = b2[2];
18664
18664
  var out = [];
18665
18665
  out[0] = ay * bz - az * by;
18666
18666
  out[1] = az * bx - ax * bz;
@@ -18669,17 +18669,17 @@ var require_dcmjs = __commonJS({
18669
18669
  }
18670
18670
  }, {
18671
18671
  key: "vec3Subtract",
18672
- value: function vec3Subtract(a, b3) {
18672
+ value: function vec3Subtract(a, b2) {
18673
18673
  var out = [];
18674
- out[0] = a[0] - b3[0];
18675
- out[1] = a[1] - b3[1];
18676
- out[2] = a[2] - b3[2];
18674
+ out[0] = a[0] - b2[0];
18675
+ out[1] = a[1] - b2[1];
18676
+ out[2] = a[2] - b2[2];
18677
18677
  return out;
18678
18678
  }
18679
18679
  }, {
18680
18680
  key: "vec3Dot",
18681
- value: function vec3Dot(a, b3) {
18682
- return a[0] * b3[0] + a[1] * b3[1] + a[2] * b3[2];
18681
+ value: function vec3Dot(a, b2) {
18682
+ return a[0] * b2[0] + a[1] * b2[1] + a[2] * b2[2];
18683
18683
  }
18684
18684
  }]);
18685
18685
  return ImageNormalizer2;
@@ -20768,8 +20768,8 @@ var require_dcmjs = __commonJS({
20768
20768
  var iota = iota_1;
20769
20769
  var isBuffer = isBuffer_1;
20770
20770
  var hasTypedArrays = typeof Float64Array !== "undefined";
20771
- function compare1st(a, b3) {
20772
- return a[0] - b3[0];
20771
+ function compare1st(a, b2) {
20772
+ return a[0] - b2[0];
20773
20773
  }
20774
20774
  function order() {
20775
20775
  var stride = this.stride;
@@ -21014,8 +21014,8 @@ var require_dcmjs = __commonJS({
21014
21014
  }
21015
21015
  var ndarray = wrappedNDArrayCtor;
21016
21016
  var ndarray$1 = /* @__PURE__ */ getDefaultExportFromCjs(ndarray);
21017
- function crossProduct3D(a, b3) {
21018
- return [a[1] * b3[2] - a[2] * b3[1], a[2] * b3[0] - a[0] * b3[2], a[0] * b3[1] - a[1] * b3[0]];
21017
+ function crossProduct3D(a, b2) {
21018
+ return [a[1] * b2[2] - a[2] * b2[1], a[2] * b2[0] - a[0] * b2[2], a[0] * b2[1] - a[1] * b2[0]];
21019
21019
  }
21020
21020
  var flipImageOrientationPatient = {
21021
21021
  /**
@@ -21099,13 +21099,13 @@ var require_dcmjs = __commonJS({
21099
21099
  }
21100
21100
  return result;
21101
21101
  }
21102
- function nearlyEqual(a, b3, epsilon) {
21102
+ function nearlyEqual(a, b2, epsilon) {
21103
21103
  var absA = Math.abs(a);
21104
- var absB = Math.abs(b3);
21105
- var diff = Math.abs(a - b3);
21106
- if (a === b3) {
21104
+ var absB = Math.abs(b2);
21105
+ var diff = Math.abs(a - b2);
21106
+ if (a === b2) {
21107
21107
  return true;
21108
- } else if (a === 0 || b3 === 0 || absA + absB < epsilon * epsilon) {
21108
+ } else if (a === 0 || b2 === 0 || absA + absB < epsilon * epsilon) {
21109
21109
  return diff < epsilon;
21110
21110
  } else {
21111
21111
  return diff / Math.min(absA + absB, Number.MAX_VALUE) < epsilon;
@@ -21507,13 +21507,13 @@ var require_dcmjs = __commonJS({
21507
21507
  break;
21508
21508
  }
21509
21509
  if (byteValue <= 127) {
21510
- var N = byteValue + 1;
21510
+ var N2 = byteValue + 1;
21511
21511
  var next = i + 1;
21512
- for (var p = next; p < next + N; p++) {
21512
+ for (var p = next; p < next + N2; p++) {
21513
21513
  pixelData[pixelDataIndex] = uInt8Frame[p];
21514
21514
  pixelDataIndex++;
21515
21515
  }
21516
- i += N + 1;
21516
+ i += N2 + 1;
21517
21517
  }
21518
21518
  if (byteValue >= 129) {
21519
21519
  var _N = 257 - byteValue;
@@ -23577,28 +23577,28 @@ var require_dcmjs = __commonJS({
23577
23577
  out[2] = z;
23578
23578
  return out;
23579
23579
  }
23580
- function add(out, a, b3) {
23581
- out[0] = a[0] + b3[0];
23582
- out[1] = a[1] + b3[1];
23583
- out[2] = a[2] + b3[2];
23580
+ function add(out, a, b2) {
23581
+ out[0] = a[0] + b2[0];
23582
+ out[1] = a[1] + b2[1];
23583
+ out[2] = a[2] + b2[2];
23584
23584
  return out;
23585
23585
  }
23586
- function subtract$1(out, a, b3) {
23587
- out[0] = a[0] - b3[0];
23588
- out[1] = a[1] - b3[1];
23589
- out[2] = a[2] - b3[2];
23586
+ function subtract$1(out, a, b2) {
23587
+ out[0] = a[0] - b2[0];
23588
+ out[1] = a[1] - b2[1];
23589
+ out[2] = a[2] - b2[2];
23590
23590
  return out;
23591
23591
  }
23592
- function multiply(out, a, b3) {
23593
- out[0] = a[0] * b3[0];
23594
- out[1] = a[1] * b3[1];
23595
- out[2] = a[2] * b3[2];
23592
+ function multiply(out, a, b2) {
23593
+ out[0] = a[0] * b2[0];
23594
+ out[1] = a[1] * b2[1];
23595
+ out[2] = a[2] * b2[2];
23596
23596
  return out;
23597
23597
  }
23598
- function divide(out, a, b3) {
23599
- out[0] = a[0] / b3[0];
23600
- out[1] = a[1] / b3[1];
23601
- out[2] = a[2] / b3[2];
23598
+ function divide(out, a, b2) {
23599
+ out[0] = a[0] / b2[0];
23600
+ out[1] = a[1] / b2[1];
23601
+ out[2] = a[2] / b2[2];
23602
23602
  return out;
23603
23603
  }
23604
23604
  function ceil(out, a) {
@@ -23613,16 +23613,16 @@ var require_dcmjs = __commonJS({
23613
23613
  out[2] = Math.floor(a[2]);
23614
23614
  return out;
23615
23615
  }
23616
- function min(out, a, b3) {
23617
- out[0] = Math.min(a[0], b3[0]);
23618
- out[1] = Math.min(a[1], b3[1]);
23619
- out[2] = Math.min(a[2], b3[2]);
23616
+ function min(out, a, b2) {
23617
+ out[0] = Math.min(a[0], b2[0]);
23618
+ out[1] = Math.min(a[1], b2[1]);
23619
+ out[2] = Math.min(a[2], b2[2]);
23620
23620
  return out;
23621
23621
  }
23622
- function max(out, a, b3) {
23623
- out[0] = Math.max(a[0], b3[0]);
23624
- out[1] = Math.max(a[1], b3[1]);
23625
- out[2] = Math.max(a[2], b3[2]);
23622
+ function max(out, a, b2) {
23623
+ out[0] = Math.max(a[0], b2[0]);
23624
+ out[1] = Math.max(a[1], b2[1]);
23625
+ out[2] = Math.max(a[2], b2[2]);
23626
23626
  return out;
23627
23627
  }
23628
23628
  function round(out, a) {
@@ -23631,28 +23631,28 @@ var require_dcmjs = __commonJS({
23631
23631
  out[2] = Math.round(a[2]);
23632
23632
  return out;
23633
23633
  }
23634
- function scale(out, a, b3) {
23635
- out[0] = a[0] * b3;
23636
- out[1] = a[1] * b3;
23637
- out[2] = a[2] * b3;
23634
+ function scale(out, a, b2) {
23635
+ out[0] = a[0] * b2;
23636
+ out[1] = a[1] * b2;
23637
+ out[2] = a[2] * b2;
23638
23638
  return out;
23639
23639
  }
23640
- function scaleAndAdd(out, a, b3, scale2) {
23641
- out[0] = a[0] + b3[0] * scale2;
23642
- out[1] = a[1] + b3[1] * scale2;
23643
- out[2] = a[2] + b3[2] * scale2;
23640
+ function scaleAndAdd(out, a, b2, scale2) {
23641
+ out[0] = a[0] + b2[0] * scale2;
23642
+ out[1] = a[1] + b2[1] * scale2;
23643
+ out[2] = a[2] + b2[2] * scale2;
23644
23644
  return out;
23645
23645
  }
23646
- function distance(a, b3) {
23647
- var x3 = b3[0] - a[0];
23648
- var y2 = b3[1] - a[1];
23649
- var z = b3[2] - a[2];
23646
+ function distance(a, b2) {
23647
+ var x3 = b2[0] - a[0];
23648
+ var y2 = b2[1] - a[1];
23649
+ var z = b2[2] - a[2];
23650
23650
  return Math.hypot(x3, y2, z);
23651
23651
  }
23652
- function squaredDistance(a, b3) {
23653
- var x3 = b3[0] - a[0];
23654
- var y2 = b3[1] - a[1];
23655
- var z = b3[2] - a[2];
23652
+ function squaredDistance(a, b2) {
23653
+ var x3 = b2[0] - a[0];
23654
+ var y2 = b2[1] - a[1];
23655
+ var z = b2[2] - a[2];
23656
23656
  return x3 * x3 + y2 * y2 + z * z;
23657
23657
  }
23658
23658
  function squaredLength(a) {
@@ -23686,38 +23686,38 @@ var require_dcmjs = __commonJS({
23686
23686
  out[2] = a[2] * len2;
23687
23687
  return out;
23688
23688
  }
23689
- function dot(a, b3) {
23690
- return a[0] * b3[0] + a[1] * b3[1] + a[2] * b3[2];
23689
+ function dot(a, b2) {
23690
+ return a[0] * b2[0] + a[1] * b2[1] + a[2] * b2[2];
23691
23691
  }
23692
- function cross$1(out, a, b3) {
23692
+ function cross$1(out, a, b2) {
23693
23693
  var ax = a[0], ay = a[1], az = a[2];
23694
- var bx = b3[0], by = b3[1], bz = b3[2];
23694
+ var bx = b2[0], by = b2[1], bz = b2[2];
23695
23695
  out[0] = ay * bz - az * by;
23696
23696
  out[1] = az * bx - ax * bz;
23697
23697
  out[2] = ax * by - ay * bx;
23698
23698
  return out;
23699
23699
  }
23700
- function lerp(out, a, b3, t) {
23700
+ function lerp(out, a, b2, t) {
23701
23701
  var ax = a[0];
23702
23702
  var ay = a[1];
23703
23703
  var az = a[2];
23704
- out[0] = ax + t * (b3[0] - ax);
23705
- out[1] = ay + t * (b3[1] - ay);
23706
- out[2] = az + t * (b3[2] - az);
23704
+ out[0] = ax + t * (b2[0] - ax);
23705
+ out[1] = ay + t * (b2[1] - ay);
23706
+ out[2] = az + t * (b2[2] - az);
23707
23707
  return out;
23708
23708
  }
23709
- function hermite(out, a, b3, c2, d2, t) {
23709
+ function hermite(out, a, b2, c2, d2, t) {
23710
23710
  var factorTimes2 = t * t;
23711
23711
  var factor1 = factorTimes2 * (2 * t - 3) + 1;
23712
23712
  var factor2 = factorTimes2 * (t - 2) + t;
23713
23713
  var factor3 = factorTimes2 * (t - 1);
23714
23714
  var factor4 = factorTimes2 * (3 - 2 * t);
23715
- out[0] = a[0] * factor1 + b3[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
23716
- out[1] = a[1] * factor1 + b3[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
23717
- out[2] = a[2] * factor1 + b3[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
23715
+ out[0] = a[0] * factor1 + b2[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
23716
+ out[1] = a[1] * factor1 + b2[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
23717
+ out[2] = a[2] * factor1 + b2[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
23718
23718
  return out;
23719
23719
  }
23720
- function bezier(out, a, b3, c2, d2, t) {
23720
+ function bezier(out, a, b2, c2, d2, t) {
23721
23721
  var inverseFactor = 1 - t;
23722
23722
  var inverseFactorTimesTwo = inverseFactor * inverseFactor;
23723
23723
  var factorTimes2 = t * t;
@@ -23725,9 +23725,9 @@ var require_dcmjs = __commonJS({
23725
23725
  var factor2 = 3 * t * inverseFactorTimesTwo;
23726
23726
  var factor3 = 3 * factorTimes2 * inverseFactor;
23727
23727
  var factor4 = factorTimes2 * t;
23728
- out[0] = a[0] * factor1 + b3[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
23729
- out[1] = a[1] * factor1 + b3[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
23730
- out[2] = a[2] * factor1 + b3[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
23728
+ out[0] = a[0] * factor1 + b2[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
23729
+ out[1] = a[1] * factor1 + b2[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
23730
+ out[2] = a[2] * factor1 + b2[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
23731
23731
  return out;
23732
23732
  }
23733
23733
  function random(out, scale2) {
@@ -23773,47 +23773,47 @@ var require_dcmjs = __commonJS({
23773
23773
  out[2] = z + uvz + uuvz;
23774
23774
  return out;
23775
23775
  }
23776
- function rotateX(out, a, b3, rad) {
23776
+ function rotateX(out, a, b2, rad) {
23777
23777
  var p = [], r6 = [];
23778
- p[0] = a[0] - b3[0];
23779
- p[1] = a[1] - b3[1];
23780
- p[2] = a[2] - b3[2];
23778
+ p[0] = a[0] - b2[0];
23779
+ p[1] = a[1] - b2[1];
23780
+ p[2] = a[2] - b2[2];
23781
23781
  r6[0] = p[0];
23782
23782
  r6[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);
23783
23783
  r6[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad);
23784
- out[0] = r6[0] + b3[0];
23785
- out[1] = r6[1] + b3[1];
23786
- out[2] = r6[2] + b3[2];
23784
+ out[0] = r6[0] + b2[0];
23785
+ out[1] = r6[1] + b2[1];
23786
+ out[2] = r6[2] + b2[2];
23787
23787
  return out;
23788
23788
  }
23789
- function rotateY(out, a, b3, rad) {
23789
+ function rotateY(out, a, b2, rad) {
23790
23790
  var p = [], r6 = [];
23791
- p[0] = a[0] - b3[0];
23792
- p[1] = a[1] - b3[1];
23793
- p[2] = a[2] - b3[2];
23791
+ p[0] = a[0] - b2[0];
23792
+ p[1] = a[1] - b2[1];
23793
+ p[2] = a[2] - b2[2];
23794
23794
  r6[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);
23795
23795
  r6[1] = p[1];
23796
23796
  r6[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad);
23797
- out[0] = r6[0] + b3[0];
23798
- out[1] = r6[1] + b3[1];
23799
- out[2] = r6[2] + b3[2];
23797
+ out[0] = r6[0] + b2[0];
23798
+ out[1] = r6[1] + b2[1];
23799
+ out[2] = r6[2] + b2[2];
23800
23800
  return out;
23801
23801
  }
23802
- function rotateZ(out, a, b3, rad) {
23802
+ function rotateZ(out, a, b2, rad) {
23803
23803
  var p = [], r6 = [];
23804
- p[0] = a[0] - b3[0];
23805
- p[1] = a[1] - b3[1];
23806
- p[2] = a[2] - b3[2];
23804
+ p[0] = a[0] - b2[0];
23805
+ p[1] = a[1] - b2[1];
23806
+ p[2] = a[2] - b2[2];
23807
23807
  r6[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);
23808
23808
  r6[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);
23809
23809
  r6[2] = p[2];
23810
- out[0] = r6[0] + b3[0];
23811
- out[1] = r6[1] + b3[1];
23812
- out[2] = r6[2] + b3[2];
23810
+ out[0] = r6[0] + b2[0];
23811
+ out[1] = r6[1] + b2[1];
23812
+ out[2] = r6[2] + b2[2];
23813
23813
  return out;
23814
23814
  }
23815
- function angle(a, b3) {
23816
- var ax = a[0], ay = a[1], az = a[2], bx = b3[0], by = b3[1], bz = b3[2], mag1 = Math.sqrt(ax * ax + ay * ay + az * az), mag2 = Math.sqrt(bx * bx + by * by + bz * bz), mag = mag1 * mag2, cosine = mag && dot(a, b3) / mag;
23815
+ function angle(a, b2) {
23816
+ var ax = a[0], ay = a[1], az = a[2], bx = b2[0], by = b2[1], bz = b2[2], mag1 = Math.sqrt(ax * ax + ay * ay + az * az), mag2 = Math.sqrt(bx * bx + by * by + bz * bz), mag = mag1 * mag2, cosine = mag && dot(a, b2) / mag;
23817
23817
  return Math.acos(Math.min(Math.max(cosine, -1), 1));
23818
23818
  }
23819
23819
  function zero(out) {
@@ -23825,12 +23825,12 @@ var require_dcmjs = __commonJS({
23825
23825
  function str(a) {
23826
23826
  return "vec3(" + a[0] + ", " + a[1] + ", " + a[2] + ")";
23827
23827
  }
23828
- function exactEquals(a, b3) {
23829
- return a[0] === b3[0] && a[1] === b3[1] && a[2] === b3[2];
23828
+ function exactEquals(a, b2) {
23829
+ return a[0] === b2[0] && a[1] === b2[1] && a[2] === b2[2];
23830
23830
  }
23831
- function equals(a, b3) {
23831
+ function equals(a, b2) {
23832
23832
  var a0 = a[0], a1 = a[1], a2 = a[2];
23833
- var b0 = b3[0], b1 = b3[1], b22 = b3[2];
23833
+ var b0 = b2[0], b1 = b2[1], b22 = b2[2];
23834
23834
  return Math.abs(a0 - b0) <= EPSILON$1 * Math.max(1, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON$1 * Math.max(1, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b22) <= EPSILON$1 * Math.max(1, Math.abs(a2), Math.abs(b22));
23835
23835
  }
23836
23836
  var sub = subtract$1;
@@ -24367,10 +24367,10 @@ var require_dcmjs = __commonJS({
24367
24367
  }
24368
24368
  return den;
24369
24369
  }
24370
- function subtract(a, b3, out) {
24371
- out[0] = a[0] - b3[0];
24372
- out[1] = a[1] - b3[1];
24373
- out[2] = a[2] - b3[2];
24370
+ function subtract(a, b2, out) {
24371
+ out[0] = a[0] - b2[0];
24372
+ out[1] = a[1] - b2[1];
24373
+ out[2] = a[2] - b2[2];
24374
24374
  }
24375
24375
  function geometryFromFunctionalGroups(dataset, PerFrameFunctionalGroups) {
24376
24376
  var geometry = {};
@@ -26956,8 +26956,8 @@ var require_dcmjs = __commonJS({
26956
26956
  }]);
26957
26957
  var groupItem = _this20[0];
26958
26958
  var wereReferencesProvided = [options.referencedRegions !== void 0, options.referencedVolume !== void 0, options.referencedSegmentation !== void 0];
26959
- var numReferences = wereReferencesProvided.reduce(function(a, b3) {
26960
- return a + b3;
26959
+ var numReferences = wereReferencesProvided.reduce(function(a, b2) {
26960
+ return a + b2;
26961
26961
  });
26962
26962
  if (numReferences === 0) {
26963
26963
  throw new Error("One of the following options must be provided: 'referencedRegions', 'referencedVolume', or 'referencedSegmentation'.");
@@ -26998,8 +26998,8 @@ var require_dcmjs = __commonJS({
26998
26998
  function PlanarROIMeasurementsAndQualitativeEvaluations2(options) {
26999
26999
  _classCallCheck(this, PlanarROIMeasurementsAndQualitativeEvaluations2);
27000
27000
  var wereReferencesProvided = [options.referencedRegion !== void 0, options.referencedSegmentation !== void 0];
27001
- var numReferences = wereReferencesProvided.reduce(function(a, b3) {
27002
- return a + b3;
27001
+ var numReferences = wereReferencesProvided.reduce(function(a, b2) {
27002
+ return a + b2;
27003
27003
  });
27004
27004
  if (numReferences === 0) {
27005
27005
  throw new Error("One of the following options must be provided: 'referencedRegion', 'referencedSegmentation'.");
@@ -27192,8 +27192,8 @@ var require_dcmjs = __commonJS({
27192
27192
  var imageLibraryItem = new ImageLibrary();
27193
27193
  (_item$ContentSequence3 = item.ContentSequence).push.apply(_item$ContentSequence3, _toConsumableArray(imageLibraryItem));
27194
27194
  var wereOptionsProvided = [options.imagingMeasurements !== void 0, options.derivedImagingMeasurements !== void 0, options.qualitativeEvaluations !== void 0];
27195
- var numOptionsProvided = wereOptionsProvided.reduce(function(a, b3) {
27196
- return a + b3;
27195
+ var numOptionsProvided = wereOptionsProvided.reduce(function(a, b2) {
27196
+ return a + b2;
27197
27197
  });
27198
27198
  if (numOptionsProvided > 1) {
27199
27199
  throw new Error("Only one of the following options should be provided: 'imagingMeasurements', 'derivedImagingMeasurement', 'qualitativeEvaluations'.");
@@ -30839,12 +30839,12 @@ var require_dcmjs2 = __commonJS({
30839
30839
  s.block_start = s.strstart;
30840
30840
  flush_pending(s.strm);
30841
30841
  };
30842
- const put_byte = (s, b3) => {
30843
- s.pending_buf[s.pending++] = b3;
30842
+ const put_byte = (s, b2) => {
30843
+ s.pending_buf[s.pending++] = b2;
30844
30844
  };
30845
- const putShortMSB = (s, b3) => {
30846
- s.pending_buf[s.pending++] = b3 >>> 8 & 255;
30847
- s.pending_buf[s.pending++] = b3 & 255;
30845
+ const putShortMSB = (s, b2) => {
30846
+ s.pending_buf[s.pending++] = b2 >>> 8 & 255;
30847
+ s.pending_buf[s.pending++] = b2 & 255;
30848
30848
  };
30849
30849
  const read_buf = (strm, buf, start, size) => {
30850
30850
  let len2 = strm.avail_in;
@@ -37321,9 +37321,9 @@ var require_dcmjs2 = __commonJS({
37321
37321
  value: function lab2XYZ(lab) {
37322
37322
  var L2 = (lab[0] + 16) / 116;
37323
37323
  var a = L2 + lab[1] / 500;
37324
- var b3 = L2 - lab[2] / 200;
37324
+ var b2 = L2 - lab[2] / 200;
37325
37325
  var whitePoint = Colors2.d65WhitePointXYZ();
37326
- return [whitePoint[0] * Colors2.labfInv(a), whitePoint[1] * Colors2.labfInv(L2), whitePoint[2] * Colors2.labfInv(b3)];
37326
+ return [whitePoint[0] * Colors2.labfInv(a), whitePoint[1] * Colors2.labfInv(L2), whitePoint[2] * Colors2.labfInv(b2)];
37327
37327
  }
37328
37328
  }, {
37329
37329
  key: "xyz2RGB",
@@ -37634,8 +37634,8 @@ var require_dcmjs2 = __commonJS({
37634
37634
  var distance2 = ImageNormalizer2.vec3Dot(positionVector, scanAxis);
37635
37635
  distanceDatasetPairs.push([distance2, dataset]);
37636
37636
  });
37637
- distanceDatasetPairs.sort(function(a, b3) {
37638
- return b3[0] - a[0];
37637
+ distanceDatasetPairs.sort(function(a, b2) {
37638
+ return b2[0] - a[0];
37639
37639
  });
37640
37640
  if (ds2.BitsAllocated !== 16) {
37641
37641
  log2.error("Only works with 16 bit data, not " + String(this.dataset.BitsAllocated));
@@ -37823,8 +37823,8 @@ var require_dcmjs2 = __commonJS({
37823
37823
  }
37824
37824
  }], [{
37825
37825
  key: "vec3CrossProduct",
37826
- value: function vec3CrossProduct(a, b3) {
37827
- var ax = a[0], ay = a[1], az = a[2], bx = b3[0], by = b3[1], bz = b3[2];
37826
+ value: function vec3CrossProduct(a, b2) {
37827
+ var ax = a[0], ay = a[1], az = a[2], bx = b2[0], by = b2[1], bz = b2[2];
37828
37828
  var out = [];
37829
37829
  out[0] = ay * bz - az * by;
37830
37830
  out[1] = az * bx - ax * bz;
@@ -37833,17 +37833,17 @@ var require_dcmjs2 = __commonJS({
37833
37833
  }
37834
37834
  }, {
37835
37835
  key: "vec3Subtract",
37836
- value: function vec3Subtract(a, b3) {
37836
+ value: function vec3Subtract(a, b2) {
37837
37837
  var out = [];
37838
- out[0] = a[0] - b3[0];
37839
- out[1] = a[1] - b3[1];
37840
- out[2] = a[2] - b3[2];
37838
+ out[0] = a[0] - b2[0];
37839
+ out[1] = a[1] - b2[1];
37840
+ out[2] = a[2] - b2[2];
37841
37841
  return out;
37842
37842
  }
37843
37843
  }, {
37844
37844
  key: "vec3Dot",
37845
- value: function vec3Dot(a, b3) {
37846
- return a[0] * b3[0] + a[1] * b3[1] + a[2] * b3[2];
37845
+ value: function vec3Dot(a, b2) {
37846
+ return a[0] * b2[0] + a[1] * b2[1] + a[2] * b2[2];
37847
37847
  }
37848
37848
  }]);
37849
37849
  return ImageNormalizer2;
@@ -39932,8 +39932,8 @@ var require_dcmjs2 = __commonJS({
39932
39932
  var iota = iota_1;
39933
39933
  var isBuffer = isBuffer_1;
39934
39934
  var hasTypedArrays = typeof Float64Array !== "undefined";
39935
- function compare1st(a, b3) {
39936
- return a[0] - b3[0];
39935
+ function compare1st(a, b2) {
39936
+ return a[0] - b2[0];
39937
39937
  }
39938
39938
  function order() {
39939
39939
  var stride = this.stride;
@@ -40178,8 +40178,8 @@ var require_dcmjs2 = __commonJS({
40178
40178
  }
40179
40179
  var ndarray = wrappedNDArrayCtor;
40180
40180
  var ndarray$1 = /* @__PURE__ */ getDefaultExportFromCjs(ndarray);
40181
- function crossProduct3D(a, b3) {
40182
- return [a[1] * b3[2] - a[2] * b3[1], a[2] * b3[0] - a[0] * b3[2], a[0] * b3[1] - a[1] * b3[0]];
40181
+ function crossProduct3D(a, b2) {
40182
+ return [a[1] * b2[2] - a[2] * b2[1], a[2] * b2[0] - a[0] * b2[2], a[0] * b2[1] - a[1] * b2[0]];
40183
40183
  }
40184
40184
  var flipImageOrientationPatient = {
40185
40185
  /**
@@ -40263,13 +40263,13 @@ var require_dcmjs2 = __commonJS({
40263
40263
  }
40264
40264
  return result;
40265
40265
  }
40266
- function nearlyEqual(a, b3, epsilon) {
40266
+ function nearlyEqual(a, b2, epsilon) {
40267
40267
  var absA = Math.abs(a);
40268
- var absB = Math.abs(b3);
40269
- var diff = Math.abs(a - b3);
40270
- if (a === b3) {
40268
+ var absB = Math.abs(b2);
40269
+ var diff = Math.abs(a - b2);
40270
+ if (a === b2) {
40271
40271
  return true;
40272
- } else if (a === 0 || b3 === 0 || absA + absB < epsilon * epsilon) {
40272
+ } else if (a === 0 || b2 === 0 || absA + absB < epsilon * epsilon) {
40273
40273
  return diff < epsilon;
40274
40274
  } else {
40275
40275
  return diff / Math.min(absA + absB, Number.MAX_VALUE) < epsilon;
@@ -40671,13 +40671,13 @@ var require_dcmjs2 = __commonJS({
40671
40671
  break;
40672
40672
  }
40673
40673
  if (byteValue <= 127) {
40674
- var N = byteValue + 1;
40674
+ var N2 = byteValue + 1;
40675
40675
  var next = i + 1;
40676
- for (var p = next; p < next + N; p++) {
40676
+ for (var p = next; p < next + N2; p++) {
40677
40677
  pixelData[pixelDataIndex] = uInt8Frame[p];
40678
40678
  pixelDataIndex++;
40679
40679
  }
40680
- i += N + 1;
40680
+ i += N2 + 1;
40681
40681
  }
40682
40682
  if (byteValue >= 129) {
40683
40683
  var _N = 257 - byteValue;
@@ -42741,28 +42741,28 @@ var require_dcmjs2 = __commonJS({
42741
42741
  out[2] = z;
42742
42742
  return out;
42743
42743
  }
42744
- function add(out, a, b3) {
42745
- out[0] = a[0] + b3[0];
42746
- out[1] = a[1] + b3[1];
42747
- out[2] = a[2] + b3[2];
42744
+ function add(out, a, b2) {
42745
+ out[0] = a[0] + b2[0];
42746
+ out[1] = a[1] + b2[1];
42747
+ out[2] = a[2] + b2[2];
42748
42748
  return out;
42749
42749
  }
42750
- function subtract$1(out, a, b3) {
42751
- out[0] = a[0] - b3[0];
42752
- out[1] = a[1] - b3[1];
42753
- out[2] = a[2] - b3[2];
42750
+ function subtract$1(out, a, b2) {
42751
+ out[0] = a[0] - b2[0];
42752
+ out[1] = a[1] - b2[1];
42753
+ out[2] = a[2] - b2[2];
42754
42754
  return out;
42755
42755
  }
42756
- function multiply(out, a, b3) {
42757
- out[0] = a[0] * b3[0];
42758
- out[1] = a[1] * b3[1];
42759
- out[2] = a[2] * b3[2];
42756
+ function multiply(out, a, b2) {
42757
+ out[0] = a[0] * b2[0];
42758
+ out[1] = a[1] * b2[1];
42759
+ out[2] = a[2] * b2[2];
42760
42760
  return out;
42761
42761
  }
42762
- function divide(out, a, b3) {
42763
- out[0] = a[0] / b3[0];
42764
- out[1] = a[1] / b3[1];
42765
- out[2] = a[2] / b3[2];
42762
+ function divide(out, a, b2) {
42763
+ out[0] = a[0] / b2[0];
42764
+ out[1] = a[1] / b2[1];
42765
+ out[2] = a[2] / b2[2];
42766
42766
  return out;
42767
42767
  }
42768
42768
  function ceil(out, a) {
@@ -42777,16 +42777,16 @@ var require_dcmjs2 = __commonJS({
42777
42777
  out[2] = Math.floor(a[2]);
42778
42778
  return out;
42779
42779
  }
42780
- function min(out, a, b3) {
42781
- out[0] = Math.min(a[0], b3[0]);
42782
- out[1] = Math.min(a[1], b3[1]);
42783
- out[2] = Math.min(a[2], b3[2]);
42780
+ function min(out, a, b2) {
42781
+ out[0] = Math.min(a[0], b2[0]);
42782
+ out[1] = Math.min(a[1], b2[1]);
42783
+ out[2] = Math.min(a[2], b2[2]);
42784
42784
  return out;
42785
42785
  }
42786
- function max(out, a, b3) {
42787
- out[0] = Math.max(a[0], b3[0]);
42788
- out[1] = Math.max(a[1], b3[1]);
42789
- out[2] = Math.max(a[2], b3[2]);
42786
+ function max(out, a, b2) {
42787
+ out[0] = Math.max(a[0], b2[0]);
42788
+ out[1] = Math.max(a[1], b2[1]);
42789
+ out[2] = Math.max(a[2], b2[2]);
42790
42790
  return out;
42791
42791
  }
42792
42792
  function round(out, a) {
@@ -42795,28 +42795,28 @@ var require_dcmjs2 = __commonJS({
42795
42795
  out[2] = Math.round(a[2]);
42796
42796
  return out;
42797
42797
  }
42798
- function scale(out, a, b3) {
42799
- out[0] = a[0] * b3;
42800
- out[1] = a[1] * b3;
42801
- out[2] = a[2] * b3;
42798
+ function scale(out, a, b2) {
42799
+ out[0] = a[0] * b2;
42800
+ out[1] = a[1] * b2;
42801
+ out[2] = a[2] * b2;
42802
42802
  return out;
42803
42803
  }
42804
- function scaleAndAdd(out, a, b3, scale2) {
42805
- out[0] = a[0] + b3[0] * scale2;
42806
- out[1] = a[1] + b3[1] * scale2;
42807
- out[2] = a[2] + b3[2] * scale2;
42804
+ function scaleAndAdd(out, a, b2, scale2) {
42805
+ out[0] = a[0] + b2[0] * scale2;
42806
+ out[1] = a[1] + b2[1] * scale2;
42807
+ out[2] = a[2] + b2[2] * scale2;
42808
42808
  return out;
42809
42809
  }
42810
- function distance(a, b3) {
42811
- var x3 = b3[0] - a[0];
42812
- var y2 = b3[1] - a[1];
42813
- var z = b3[2] - a[2];
42810
+ function distance(a, b2) {
42811
+ var x3 = b2[0] - a[0];
42812
+ var y2 = b2[1] - a[1];
42813
+ var z = b2[2] - a[2];
42814
42814
  return Math.hypot(x3, y2, z);
42815
42815
  }
42816
- function squaredDistance(a, b3) {
42817
- var x3 = b3[0] - a[0];
42818
- var y2 = b3[1] - a[1];
42819
- var z = b3[2] - a[2];
42816
+ function squaredDistance(a, b2) {
42817
+ var x3 = b2[0] - a[0];
42818
+ var y2 = b2[1] - a[1];
42819
+ var z = b2[2] - a[2];
42820
42820
  return x3 * x3 + y2 * y2 + z * z;
42821
42821
  }
42822
42822
  function squaredLength(a) {
@@ -42850,38 +42850,38 @@ var require_dcmjs2 = __commonJS({
42850
42850
  out[2] = a[2] * len2;
42851
42851
  return out;
42852
42852
  }
42853
- function dot(a, b3) {
42854
- return a[0] * b3[0] + a[1] * b3[1] + a[2] * b3[2];
42853
+ function dot(a, b2) {
42854
+ return a[0] * b2[0] + a[1] * b2[1] + a[2] * b2[2];
42855
42855
  }
42856
- function cross$1(out, a, b3) {
42856
+ function cross$1(out, a, b2) {
42857
42857
  var ax = a[0], ay = a[1], az = a[2];
42858
- var bx = b3[0], by = b3[1], bz = b3[2];
42858
+ var bx = b2[0], by = b2[1], bz = b2[2];
42859
42859
  out[0] = ay * bz - az * by;
42860
42860
  out[1] = az * bx - ax * bz;
42861
42861
  out[2] = ax * by - ay * bx;
42862
42862
  return out;
42863
42863
  }
42864
- function lerp(out, a, b3, t) {
42864
+ function lerp(out, a, b2, t) {
42865
42865
  var ax = a[0];
42866
42866
  var ay = a[1];
42867
42867
  var az = a[2];
42868
- out[0] = ax + t * (b3[0] - ax);
42869
- out[1] = ay + t * (b3[1] - ay);
42870
- out[2] = az + t * (b3[2] - az);
42868
+ out[0] = ax + t * (b2[0] - ax);
42869
+ out[1] = ay + t * (b2[1] - ay);
42870
+ out[2] = az + t * (b2[2] - az);
42871
42871
  return out;
42872
42872
  }
42873
- function hermite(out, a, b3, c2, d2, t) {
42873
+ function hermite(out, a, b2, c2, d2, t) {
42874
42874
  var factorTimes2 = t * t;
42875
42875
  var factor1 = factorTimes2 * (2 * t - 3) + 1;
42876
42876
  var factor2 = factorTimes2 * (t - 2) + t;
42877
42877
  var factor3 = factorTimes2 * (t - 1);
42878
42878
  var factor4 = factorTimes2 * (3 - 2 * t);
42879
- out[0] = a[0] * factor1 + b3[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
42880
- out[1] = a[1] * factor1 + b3[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
42881
- out[2] = a[2] * factor1 + b3[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
42879
+ out[0] = a[0] * factor1 + b2[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
42880
+ out[1] = a[1] * factor1 + b2[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
42881
+ out[2] = a[2] * factor1 + b2[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
42882
42882
  return out;
42883
42883
  }
42884
- function bezier(out, a, b3, c2, d2, t) {
42884
+ function bezier(out, a, b2, c2, d2, t) {
42885
42885
  var inverseFactor = 1 - t;
42886
42886
  var inverseFactorTimesTwo = inverseFactor * inverseFactor;
42887
42887
  var factorTimes2 = t * t;
@@ -42889,9 +42889,9 @@ var require_dcmjs2 = __commonJS({
42889
42889
  var factor2 = 3 * t * inverseFactorTimesTwo;
42890
42890
  var factor3 = 3 * factorTimes2 * inverseFactor;
42891
42891
  var factor4 = factorTimes2 * t;
42892
- out[0] = a[0] * factor1 + b3[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
42893
- out[1] = a[1] * factor1 + b3[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
42894
- out[2] = a[2] * factor1 + b3[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
42892
+ out[0] = a[0] * factor1 + b2[0] * factor2 + c2[0] * factor3 + d2[0] * factor4;
42893
+ out[1] = a[1] * factor1 + b2[1] * factor2 + c2[1] * factor3 + d2[1] * factor4;
42894
+ out[2] = a[2] * factor1 + b2[2] * factor2 + c2[2] * factor3 + d2[2] * factor4;
42895
42895
  return out;
42896
42896
  }
42897
42897
  function random(out, scale2) {
@@ -42937,47 +42937,47 @@ var require_dcmjs2 = __commonJS({
42937
42937
  out[2] = z + uvz + uuvz;
42938
42938
  return out;
42939
42939
  }
42940
- function rotateX(out, a, b3, rad) {
42940
+ function rotateX(out, a, b2, rad) {
42941
42941
  var p = [], r6 = [];
42942
- p[0] = a[0] - b3[0];
42943
- p[1] = a[1] - b3[1];
42944
- p[2] = a[2] - b3[2];
42942
+ p[0] = a[0] - b2[0];
42943
+ p[1] = a[1] - b2[1];
42944
+ p[2] = a[2] - b2[2];
42945
42945
  r6[0] = p[0];
42946
42946
  r6[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);
42947
42947
  r6[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad);
42948
- out[0] = r6[0] + b3[0];
42949
- out[1] = r6[1] + b3[1];
42950
- out[2] = r6[2] + b3[2];
42948
+ out[0] = r6[0] + b2[0];
42949
+ out[1] = r6[1] + b2[1];
42950
+ out[2] = r6[2] + b2[2];
42951
42951
  return out;
42952
42952
  }
42953
- function rotateY(out, a, b3, rad) {
42953
+ function rotateY(out, a, b2, rad) {
42954
42954
  var p = [], r6 = [];
42955
- p[0] = a[0] - b3[0];
42956
- p[1] = a[1] - b3[1];
42957
- p[2] = a[2] - b3[2];
42955
+ p[0] = a[0] - b2[0];
42956
+ p[1] = a[1] - b2[1];
42957
+ p[2] = a[2] - b2[2];
42958
42958
  r6[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);
42959
42959
  r6[1] = p[1];
42960
42960
  r6[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad);
42961
- out[0] = r6[0] + b3[0];
42962
- out[1] = r6[1] + b3[1];
42963
- out[2] = r6[2] + b3[2];
42961
+ out[0] = r6[0] + b2[0];
42962
+ out[1] = r6[1] + b2[1];
42963
+ out[2] = r6[2] + b2[2];
42964
42964
  return out;
42965
42965
  }
42966
- function rotateZ(out, a, b3, rad) {
42966
+ function rotateZ(out, a, b2, rad) {
42967
42967
  var p = [], r6 = [];
42968
- p[0] = a[0] - b3[0];
42969
- p[1] = a[1] - b3[1];
42970
- p[2] = a[2] - b3[2];
42968
+ p[0] = a[0] - b2[0];
42969
+ p[1] = a[1] - b2[1];
42970
+ p[2] = a[2] - b2[2];
42971
42971
  r6[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);
42972
42972
  r6[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);
42973
42973
  r6[2] = p[2];
42974
- out[0] = r6[0] + b3[0];
42975
- out[1] = r6[1] + b3[1];
42976
- out[2] = r6[2] + b3[2];
42974
+ out[0] = r6[0] + b2[0];
42975
+ out[1] = r6[1] + b2[1];
42976
+ out[2] = r6[2] + b2[2];
42977
42977
  return out;
42978
42978
  }
42979
- function angle(a, b3) {
42980
- var ax = a[0], ay = a[1], az = a[2], bx = b3[0], by = b3[1], bz = b3[2], mag1 = Math.sqrt(ax * ax + ay * ay + az * az), mag2 = Math.sqrt(bx * bx + by * by + bz * bz), mag = mag1 * mag2, cosine = mag && dot(a, b3) / mag;
42979
+ function angle(a, b2) {
42980
+ var ax = a[0], ay = a[1], az = a[2], bx = b2[0], by = b2[1], bz = b2[2], mag1 = Math.sqrt(ax * ax + ay * ay + az * az), mag2 = Math.sqrt(bx * bx + by * by + bz * bz), mag = mag1 * mag2, cosine = mag && dot(a, b2) / mag;
42981
42981
  return Math.acos(Math.min(Math.max(cosine, -1), 1));
42982
42982
  }
42983
42983
  function zero(out) {
@@ -42989,12 +42989,12 @@ var require_dcmjs2 = __commonJS({
42989
42989
  function str(a) {
42990
42990
  return "vec3(" + a[0] + ", " + a[1] + ", " + a[2] + ")";
42991
42991
  }
42992
- function exactEquals(a, b3) {
42993
- return a[0] === b3[0] && a[1] === b3[1] && a[2] === b3[2];
42992
+ function exactEquals(a, b2) {
42993
+ return a[0] === b2[0] && a[1] === b2[1] && a[2] === b2[2];
42994
42994
  }
42995
- function equals(a, b3) {
42995
+ function equals(a, b2) {
42996
42996
  var a0 = a[0], a1 = a[1], a2 = a[2];
42997
- var b0 = b3[0], b1 = b3[1], b22 = b3[2];
42997
+ var b0 = b2[0], b1 = b2[1], b22 = b2[2];
42998
42998
  return Math.abs(a0 - b0) <= EPSILON$1 * Math.max(1, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON$1 * Math.max(1, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b22) <= EPSILON$1 * Math.max(1, Math.abs(a2), Math.abs(b22));
42999
42999
  }
43000
43000
  var sub = subtract$1;
@@ -43531,10 +43531,10 @@ var require_dcmjs2 = __commonJS({
43531
43531
  }
43532
43532
  return den;
43533
43533
  }
43534
- function subtract(a, b3, out) {
43535
- out[0] = a[0] - b3[0];
43536
- out[1] = a[1] - b3[1];
43537
- out[2] = a[2] - b3[2];
43534
+ function subtract(a, b2, out) {
43535
+ out[0] = a[0] - b2[0];
43536
+ out[1] = a[1] - b2[1];
43537
+ out[2] = a[2] - b2[2];
43538
43538
  }
43539
43539
  function geometryFromFunctionalGroups(dataset, PerFrameFunctionalGroups) {
43540
43540
  var geometry = {};
@@ -46120,8 +46120,8 @@ var require_dcmjs2 = __commonJS({
46120
46120
  }]);
46121
46121
  var groupItem = _this22[0];
46122
46122
  var wereReferencesProvided = [options.referencedRegions !== void 0, options.referencedVolume !== void 0, options.referencedSegmentation !== void 0];
46123
- var numReferences = wereReferencesProvided.reduce(function(a, b3) {
46124
- return a + b3;
46123
+ var numReferences = wereReferencesProvided.reduce(function(a, b2) {
46124
+ return a + b2;
46125
46125
  });
46126
46126
  if (numReferences === 0) {
46127
46127
  throw new Error("One of the following options must be provided: 'referencedRegions', 'referencedVolume', or 'referencedSegmentation'.");
@@ -46162,8 +46162,8 @@ var require_dcmjs2 = __commonJS({
46162
46162
  function PlanarROIMeasurementsAndQualitativeEvaluations2(options) {
46163
46163
  _classCallCheck(this, PlanarROIMeasurementsAndQualitativeEvaluations2);
46164
46164
  var wereReferencesProvided = [options.referencedRegion !== void 0, options.referencedSegmentation !== void 0];
46165
- var numReferences = wereReferencesProvided.reduce(function(a, b3) {
46166
- return a + b3;
46165
+ var numReferences = wereReferencesProvided.reduce(function(a, b2) {
46166
+ return a + b2;
46167
46167
  });
46168
46168
  if (numReferences === 0) {
46169
46169
  throw new Error("One of the following options must be provided: 'referencedRegion', 'referencedSegmentation'.");
@@ -46356,8 +46356,8 @@ var require_dcmjs2 = __commonJS({
46356
46356
  var imageLibraryItem = new ImageLibrary();
46357
46357
  (_item$ContentSequence3 = item.ContentSequence).push.apply(_item$ContentSequence3, _toConsumableArray(imageLibraryItem));
46358
46358
  var wereOptionsProvided = [options.imagingMeasurements !== void 0, options.derivedImagingMeasurements !== void 0, options.qualitativeEvaluations !== void 0];
46359
- var numOptionsProvided = wereOptionsProvided.reduce(function(a, b3) {
46360
- return a + b3;
46359
+ var numOptionsProvided = wereOptionsProvided.reduce(function(a, b2) {
46360
+ return a + b2;
46361
46361
  });
46362
46362
  if (numOptionsProvided > 1) {
46363
46363
  throw new Error("Only one of the following options should be provided: 'imagingMeasurements', 'derivedImagingMeasurement', 'qualitativeEvaluations'.");
@@ -47749,8 +47749,8 @@ var require_dcmjs_codecs_min = __commonJS({
47749
47749
  }
47750
47750
  e.exports = o2;
47751
47751
  }, 237: (e, t, r6) => {
47752
- const { Codec: s, ExplicitVRBigEndianCodec: o2, ExplicitVRLittleEndianCodec: i, HtJpeg2000LosslessCodec: n, HtJpeg2000LosslessRpclCodec: a, HtJpeg2000LossyCodec: l2, ImplicitVRLittleEndianCodec: c2, Jpeg2000LosslessCodec: d2, Jpeg2000LossyCodec: p, JpegBaselineProcess1Codec: h2, JpegLosslessProcess14V1Codec: m3, JpegLsLosslessCodec: u2, JpegLsLossyCodec: g3, RleLosslessCodec: f2 } = r6(258), { Jpeg2000ProgressionOrder: w3, JpegSampleFactor: P, PhotometricInterpretation: y2, PixelRepresentation: x3, PlanarConfiguration: C2, TransferSyntax: b3 } = r6(492), _2 = r6(234), I3 = r6(25), A3 = r6(190), S2 = { codecs: { Codec: s, ExplicitVRBigEndianCodec: o2, ExplicitVRLittleEndianCodec: i, HtJpeg2000LosslessCodec: n, HtJpeg2000LosslessRpclCodec: a, HtJpeg2000LossyCodec: l2, ImplicitVRLittleEndianCodec: c2, Jpeg2000LosslessCodec: d2, Jpeg2000LossyCodec: p, JpegBaselineProcess1Codec: h2, JpegLosslessProcess14V1Codec: m3, JpegLsLosslessCodec: u2, JpegLsLossyCodec: g3, RleLosslessCodec: f2 }, constants: { Jpeg2000ProgressionOrder: w3, JpegSampleFactor: P, PhotometricInterpretation: y2, PixelRepresentation: x3, PlanarConfiguration: C2, TransferSyntax: b3 }, Context: _2, log: r6(547), NativeCodecs: I3, Transcoder: A3, version: r6(837) };
47753
- e.exports = S2;
47752
+ const { Codec: s, ExplicitVRBigEndianCodec: o2, ExplicitVRLittleEndianCodec: i, HtJpeg2000LosslessCodec: n, HtJpeg2000LosslessRpclCodec: a, HtJpeg2000LossyCodec: l2, ImplicitVRLittleEndianCodec: c2, Jpeg2000LosslessCodec: d2, Jpeg2000LossyCodec: p, JpegBaselineProcess1Codec: h2, JpegLosslessProcess14V1Codec: m3, JpegLsLosslessCodec: u2, JpegLsLossyCodec: g3, RleLosslessCodec: f2 } = r6(258), { Jpeg2000ProgressionOrder: w3, JpegSampleFactor: P, PhotometricInterpretation: y2, PixelRepresentation: x3, PlanarConfiguration: C2, TransferSyntax: b2 } = r6(492), _2 = r6(234), I3 = r6(25), A3 = r6(190), S3 = { codecs: { Codec: s, ExplicitVRBigEndianCodec: o2, ExplicitVRLittleEndianCodec: i, HtJpeg2000LosslessCodec: n, HtJpeg2000LosslessRpclCodec: a, HtJpeg2000LossyCodec: l2, ImplicitVRLittleEndianCodec: c2, Jpeg2000LosslessCodec: d2, Jpeg2000LossyCodec: p, JpegBaselineProcess1Codec: h2, JpegLosslessProcess14V1Codec: m3, JpegLsLosslessCodec: u2, JpegLsLossyCodec: g3, RleLosslessCodec: f2 }, constants: { Jpeg2000ProgressionOrder: w3, JpegSampleFactor: P, PhotometricInterpretation: y2, PixelRepresentation: x3, PlanarConfiguration: C2, TransferSyntax: b2 }, Context: _2, log: r6(547), NativeCodecs: I3, Transcoder: A3, version: r6(837) };
47753
+ e.exports = S3;
47754
47754
  }, 258: (e, t, r6) => {
47755
47755
  const { Jpeg2000ProgressionOrder: s, JpegSampleFactor: o2, PhotometricInterpretation: i, PlanarConfiguration: n, TransferSyntax: a } = r6(492), { FrameConverter: l2, Frames: c2 } = r6(859), d2 = r6(234), p = r6(25), h2 = r6(984);
47756
47756
  class m3 {
@@ -47761,7 +47761,7 @@ var require_dcmjs_codecs_min = __commonJS({
47761
47761
  throw new Error("decode should be implemented");
47762
47762
  }
47763
47763
  static getCodec(e2) {
47764
- const t2 = { [a.ImplicitVRLittleEndian]: u2, [a.ExplicitVRLittleEndian]: g3, [a.ExplicitVRBigEndian]: f2, [a.RleLossless]: w3, [a.JpegBaselineProcess1]: y2, [a.JpegLosslessProcess14V1]: x3, [a.JpegLsLossless]: b3, [a.JpegLsLossy]: _2, [a.Jpeg2000Lossless]: A3, [a.Jpeg2000Lossy]: S2, [a.HtJpeg2000Lossless]: E3, [a.HtJpeg2000LosslessRpcl]: v3, [a.HtJpeg2000Lossy]: B2 }[e2];
47764
+ const t2 = { [a.ImplicitVRLittleEndian]: u2, [a.ExplicitVRLittleEndian]: g3, [a.ExplicitVRBigEndian]: f2, [a.RleLossless]: w3, [a.JpegBaselineProcess1]: y2, [a.JpegLosslessProcess14V1]: x3, [a.JpegLsLossless]: b2, [a.JpegLsLossy]: _2, [a.Jpeg2000Lossless]: A3, [a.Jpeg2000Lossy]: S3, [a.HtJpeg2000Lossless]: E3, [a.HtJpeg2000LosslessRpcl]: v3, [a.HtJpeg2000Lossy]: B2 }[e2];
47765
47765
  if (!t2) throw new Error(`Codec for transfer syntax UID ${e2} is not implemented`);
47766
47766
  return new t2();
47767
47767
  }
@@ -47897,7 +47897,7 @@ var require_dcmjs_codecs_min = __commonJS({
47897
47897
  return super._baseDecodeImpl(e2, t2, "decodeJpegLs", s2);
47898
47898
  }
47899
47899
  }
47900
- class b3 extends C2 {
47900
+ class b2 extends C2 {
47901
47901
  encode(e2, t2, r7 = {}) {
47902
47902
  return r7.lossy = false, super.encode(e2, t2, r7);
47903
47903
  }
@@ -47945,7 +47945,7 @@ var require_dcmjs_codecs_min = __commonJS({
47945
47945
  return super.decode(e2, t2, "decodeJpeg2000", r7);
47946
47946
  }
47947
47947
  }
47948
- class S2 extends I3 {
47948
+ class S3 extends I3 {
47949
47949
  encode(e2, t2, r7 = {}) {
47950
47950
  return r7.lossy = true, super.encode(e2, t2, "encodeJpeg2000", r7);
47951
47951
  }
@@ -47977,7 +47977,7 @@ var require_dcmjs_codecs_min = __commonJS({
47977
47977
  return super.decode(e2, t2, "decodeHtJpeg2000", r7);
47978
47978
  }
47979
47979
  }
47980
- e.exports = { Codec: m3, ExplicitVRBigEndianCodec: f2, ExplicitVRLittleEndianCodec: g3, HtJpeg2000LosslessCodec: E3, HtJpeg2000LosslessRpclCodec: v3, HtJpeg2000LossyCodec: B2, ImplicitVRLittleEndianCodec: u2, Jpeg2000LosslessCodec: A3, Jpeg2000LossyCodec: S2, JpegBaselineProcess1Codec: y2, JpegLosslessProcess14V1Codec: x3, JpegLsLosslessCodec: b3, JpegLsLossyCodec: _2, RleLosslessCodec: w3 };
47980
+ e.exports = { Codec: m3, ExplicitVRBigEndianCodec: f2, ExplicitVRLittleEndianCodec: g3, HtJpeg2000LosslessCodec: E3, HtJpeg2000LosslessRpclCodec: v3, HtJpeg2000LossyCodec: B2, ImplicitVRLittleEndianCodec: u2, Jpeg2000LosslessCodec: A3, Jpeg2000LossyCodec: S3, JpegBaselineProcess1Codec: y2, JpegLosslessProcess14V1Codec: x3, JpegLsLosslessCodec: b2, JpegLsLossyCodec: _2, RleLosslessCodec: w3 };
47981
47981
  }, 492: (e) => {
47982
47982
  const t = { ImplicitVRLittleEndian: "1.2.840.10008.1.2", ExplicitVRLittleEndian: "1.2.840.10008.1.2.1", ExplicitVRBigEndian: "1.2.840.10008.1.2.2", RleLossless: "1.2.840.10008.1.2.5", JpegBaselineProcess1: "1.2.840.10008.1.2.4.50", JpegLosslessProcess14V1: "1.2.840.10008.1.2.4.70", JpegLsLossless: "1.2.840.10008.1.2.4.80", JpegLsLossy: "1.2.840.10008.1.2.4.81", Jpeg2000Lossless: "1.2.840.10008.1.2.4.90", Jpeg2000Lossy: "1.2.840.10008.1.2.4.91", JpegXlLossless: "1.2.840.10008.1.2.4.110", JpegXlRecompression: "1.2.840.10008.1.2.4.111", JpegXl: "1.2.840.10008.1.2.4.112", HtJpeg2000Lossless: "1.2.840.10008.1.2.4.201", HtJpeg2000LosslessRpcl: "1.2.840.10008.1.2.4.202", HtJpeg2000Lossy: "1.2.840.10008.1.2.4.203" };
47983
47983
  Object.freeze(t);
@@ -49624,8 +49624,8 @@ var require_dcmjs_dimse_min = __commonJS({
49624
49624
  "use strict";
49625
49625
  e2.exports = s;
49626
49626
  }, 237: (e2, t2, s2) => {
49627
- const { Association: n2, PresentationContext: i2 } = s2(570), { Scp: r7, Server: o3 } = s2(538), { CCancelRequest: a2, CEchoRequest: c3, CEchoResponse: d3, CFindRequest: u2, CFindResponse: h2, CGetRequest: m3, CGetResponse: g3, CMoveRequest: l2, CMoveResponse: p, CStoreRequest: R3, CStoreResponse: S2, NActionRequest: y2, NActionResponse: f2, NCreateRequest: I3, NCreateResponse: C2, NDeleteRequest: P, NDeleteResponse: v3, NEventReportRequest: x3, NEventReportResponse: A3, NGetRequest: U2, NGetResponse: w3, NSetRequest: D3, NSetResponse: q2 } = s2(940), { AbortReason: E3, AbortSource: T, CommandFieldType: b3, PresentationContextResult: O2, Priority: N, RawPduType: B2, RejectReason: M3, RejectResult: L2, RejectSource: F2, SopClass: k2, Status: $, StorageClass: j2, TransferSyntax: V2, Uid: _2, UserIdentityType: G2 } = s2(492), z = s2(422), Q2 = s2(825), W2 = s2(139), J2 = s2(906), X2 = s2(73), H2 = { association: { Association: n2, PresentationContext: i2 }, Client: z, constants: { AbortReason: E3, AbortSource: T, CommandFieldType: b3, PresentationContextResult: O2, Priority: N, RawPduType: B2, RejectReason: M3, RejectResult: L2, RejectSource: F2, SopClass: k2, Status: $, StorageClass: j2, TransferSyntax: V2, Uid: _2, UserIdentityType: G2 }, Dataset: Q2, Implementation: W2, log: s2(547), requests: { CCancelRequest: a2, CEchoRequest: c3, CFindRequest: u2, CGetRequest: m3, CMoveRequest: l2, CStoreRequest: R3, NActionRequest: y2, NCreateRequest: I3, NDeleteRequest: P, NEventReportRequest: x3, NGetRequest: U2, NSetRequest: D3 }, responses: { CEchoResponse: d3, CFindResponse: h2, CGetResponse: g3, CMoveResponse: p, CStoreResponse: S2, NActionResponse: f2, NCreateResponse: C2, NDeleteResponse: v3, NEventReportResponse: A3, NGetResponse: w3, NSetResponse: q2 }, Scp: r7, Server: o3, Statistics: J2, Transcoding: X2, version: s2(837) };
49628
- e2.exports = H2;
49627
+ const { Association: n2, PresentationContext: i2 } = s2(570), { Scp: r7, Server: o3 } = s2(538), { CCancelRequest: a2, CEchoRequest: c3, CEchoResponse: d3, CFindRequest: u2, CFindResponse: h2, CGetRequest: m3, CGetResponse: g3, CMoveRequest: l2, CMoveResponse: p, CStoreRequest: R3, CStoreResponse: S3, NActionRequest: y2, NActionResponse: f2, NCreateRequest: I3, NCreateResponse: C2, NDeleteRequest: P, NDeleteResponse: v3, NEventReportRequest: x3, NEventReportResponse: A3, NGetRequest: U, NGetResponse: w3, NSetRequest: D3, NSetResponse: q2 } = s2(940), { AbortReason: E3, AbortSource: T, CommandFieldType: b2, PresentationContextResult: O2, Priority: N2, RawPduType: B2, RejectReason: M3, RejectResult: L2, RejectSource: F2, SopClass: k2, Status: $2, StorageClass: j2, TransferSyntax: V2, Uid: _2, UserIdentityType: G2 } = s2(492), z = s2(422), Q2 = s2(825), W2 = s2(139), J2 = s2(906), X2 = s2(73), H = { association: { Association: n2, PresentationContext: i2 }, Client: z, constants: { AbortReason: E3, AbortSource: T, CommandFieldType: b2, PresentationContextResult: O2, Priority: N2, RawPduType: B2, RejectReason: M3, RejectResult: L2, RejectSource: F2, SopClass: k2, Status: $2, StorageClass: j2, TransferSyntax: V2, Uid: _2, UserIdentityType: G2 }, Dataset: Q2, Implementation: W2, log: s2(547), requests: { CCancelRequest: a2, CEchoRequest: c3, CFindRequest: u2, CGetRequest: m3, CMoveRequest: l2, CStoreRequest: R3, NActionRequest: y2, NCreateRequest: I3, NDeleteRequest: P, NEventReportRequest: x3, NGetRequest: U, NSetRequest: D3 }, responses: { CEchoResponse: d3, CFindResponse: h2, CGetResponse: g3, CMoveResponse: p, CStoreResponse: S3, NActionResponse: f2, NCreateResponse: C2, NDeleteResponse: v3, NEventReportResponse: A3, NGetResponse: w3, NSetResponse: q2 }, Scp: r7, Server: o3, Statistics: J2, Transcoding: X2, version: s2(837) };
49628
+ e2.exports = H;
49629
49629
  }, 278: (e2) => {
49630
49630
  "use strict";
49631
49631
  e2.exports = require("net");
@@ -49633,8 +49633,8 @@ var require_dcmjs_dimse_min = __commonJS({
49633
49633
  "use strict";
49634
49634
  e2.exports = n;
49635
49635
  }, 371: (e2, t2, s2) => {
49636
- const { Association: n2 } = s2(570), { AAbort: i2, AAssociateAC: r7, AAssociateRJ: o3, AAssociateRQ: a2, AReleaseRP: c3, AReleaseRQ: d3, PDataTF: u2, Pdv: h2, RawPdu: m3 } = s2(942), { CommandFieldType: g3, RawPduType: l2, Status: p } = s2(492), { CCancelRequest: R3, CEchoRequest: S2, CEchoResponse: y2, CFindRequest: f2, CFindResponse: I3, CGetRequest: C2, CGetResponse: P, CMoveRequest: v3, CMoveResponse: x3, Command: A3, CStoreRequest: U2, CStoreResponse: w3, NActionRequest: D3, NActionResponse: q2, NCreateRequest: E3, NCreateResponse: T, NDeleteRequest: b3, NDeleteResponse: O2, NEventReportRequest: N, NEventReportResponse: B2, NGetRequest: M3, NGetResponse: L2, NSetRequest: F2, NSetResponse: k2, Response: $ } = s2(940), j2 = s2(825), V2 = s2(139), _2 = s2(906), G2 = s2(73), z = s2(547), { SmartBuffer: Q2 } = s2(766), { EOL: W2 } = s2(857), J2 = s2(0), X2 = s2(235);
49637
- class H2 extends J2 {
49636
+ const { Association: n2 } = s2(570), { AAbort: i2, AAssociateAC: r7, AAssociateRJ: o3, AAssociateRQ: a2, AReleaseRP: c3, AReleaseRQ: d3, PDataTF: u2, Pdv: h2, RawPdu: m3 } = s2(942), { CommandFieldType: g3, RawPduType: l2, Status: p } = s2(492), { CCancelRequest: R3, CEchoRequest: S3, CEchoResponse: y2, CFindRequest: f2, CFindResponse: I3, CGetRequest: C2, CGetResponse: P, CMoveRequest: v3, CMoveResponse: x3, Command: A3, CStoreRequest: U, CStoreResponse: w3, NActionRequest: D3, NActionResponse: q2, NCreateRequest: E3, NCreateResponse: T, NDeleteRequest: b2, NDeleteResponse: O2, NEventReportRequest: N2, NEventReportResponse: B2, NGetRequest: M3, NGetResponse: L2, NSetRequest: F2, NSetResponse: k2, Response: $2 } = s2(940), j2 = s2(825), V2 = s2(139), _2 = s2(906), G2 = s2(73), z = s2(547), { SmartBuffer: Q2 } = s2(766), { EOL: W2 } = s2(857), J2 = s2(0), X2 = s2(235);
49637
+ class H extends J2 {
49638
49638
  constructor() {
49639
49639
  super();
49640
49640
  }
@@ -49741,7 +49741,7 @@ var require_dcmjs_dimse_min = __commonJS({
49741
49741
  if (!t3) return void this.emit("done");
49742
49742
  const s3 = this.association.getAcceptedPresentationContextFromRequest(t3);
49743
49743
  if (s3) {
49744
- t3 instanceof U2 && t3.loadFullDatasetIfNeeded(), t3.setMessageId(this._getNextMessageId()), this.pending.push(t3);
49744
+ t3 instanceof U && t3.loadFullDatasetIfNeeded(), t3.setMessageId(this._getNextMessageId()), this.pending.push(t3);
49745
49745
  const n3 = { context: s3, command: t3 };
49746
49746
  n3.command.on("done", () => {
49747
49747
  e3();
@@ -49836,7 +49836,7 @@ var require_dcmjs_dimse_min = __commonJS({
49836
49836
  const e5 = new A3(new j2(this.dimseStream.toBuffer()));
49837
49837
  switch (e5.getCommandFieldType()) {
49838
49838
  case g3.CEchoRequest:
49839
- this.dimse = Object.assign(new S2(), e5);
49839
+ this.dimse = Object.assign(new S3(), e5);
49840
49840
  break;
49841
49841
  case g3.CEchoResponse:
49842
49842
  this.dimse = Object.assign(new y2(), e5);
@@ -49848,7 +49848,7 @@ var require_dcmjs_dimse_min = __commonJS({
49848
49848
  this.dimse = Object.assign(new I3(), e5);
49849
49849
  break;
49850
49850
  case g3.CStoreRequest:
49851
- this.dimse = Object.assign(new U2(), e5);
49851
+ this.dimse = Object.assign(new U(), e5);
49852
49852
  break;
49853
49853
  case g3.CStoreResponse:
49854
49854
  this.dimse = Object.assign(new w3(), e5);
@@ -49878,13 +49878,13 @@ var require_dcmjs_dimse_min = __commonJS({
49878
49878
  this.dimse = Object.assign(new q2(), e5);
49879
49879
  break;
49880
49880
  case g3.NDeleteRequest:
49881
- this.dimse = Object.assign(new b3(), e5);
49881
+ this.dimse = Object.assign(new b2(), e5);
49882
49882
  break;
49883
49883
  case g3.NDeleteResponse:
49884
49884
  this.dimse = Object.assign(new O2(), e5);
49885
49885
  break;
49886
49886
  case g3.NEventReportRequest:
49887
- this.dimse = Object.assign(new N(), e5);
49887
+ this.dimse = Object.assign(new N2(), e5);
49888
49888
  break;
49889
49889
  case g3.NEventReportResponse:
49890
49890
  this.dimse = Object.assign(new B2(), e5);
@@ -49923,7 +49923,7 @@ var require_dcmjs_dimse_min = __commonJS({
49923
49923
  }
49924
49924
  }
49925
49925
  _performDimse(e3, t3) {
49926
- if (t3 instanceof $) {
49926
+ if (t3 instanceof $2) {
49927
49927
  const e4 = Object.assign(Object.create(Object.getPrototypeOf(t3)), t3), s3 = this.pending.find((e5) => e5.getMessageId() === t3.getMessageIdBeingRespondedTo());
49928
49928
  return void (s3 && (s3.raiseResponseEvent(e4), e4.getStatus() !== p.Pending && s3.raiseDoneEvent()));
49929
49929
  }
@@ -49961,7 +49961,7 @@ var require_dcmjs_dimse_min = __commonJS({
49961
49961
  this.socket.setTimeout(this.connectTimeout), this.socket.on("connect", () => {
49962
49962
  this.connected = true, this.connectedTime = Date.now(), this.emit("connect");
49963
49963
  });
49964
- const e3 = new H2();
49964
+ const e3 = new H();
49965
49965
  e3.on("pdu", async (e4) => {
49966
49966
  this.lastPduTime = Date.now(), await this._processPdu(e4);
49967
49967
  }), e3.on("error", (e4) => {
@@ -50089,10 +50089,10 @@ var require_dcmjs_dimse_min = __commonJS({
50089
50089
  Object.freeze(p);
50090
50090
  const R3 = [p.ImplicitVRLittleEndian, p.ExplicitVRLittleEndian, p.ExplicitVRBigEndian, p.RleLossless, p.JpegBaseline, p.JpegLossless, p.JpegLsLossless, p.JpegLsLossy, p.Jpeg2000Lossless, p.Jpeg2000Lossy, p.HtJpeg2000Lossless, p.HtJpeg2000LosslessRpcl, p.HtJpeg2000Lossy];
50091
50091
  Object.freeze(R3);
50092
- const S2 = { ImplementationClassUid: "1.2.826.0.1.3680043.10.854", ImplementationVersion: "DCMJS-DIMSE-V0.2", MaxPduLength: 262144 };
50093
- Object.freeze(S2), e2.exports = { AbortReason: o3, AbortSource: r7, CommandFieldType: s2, DefaultImplementation: S2, PresentationContextResult: n2, Priority: u2, RawPduType: t2, RejectReason: d3, RejectResult: a2, RejectSource: c3, SopClass: l2, Status: h2, StorageClass: g3, TranscodableTransferSyntaxes: R3, TransferSyntax: p, Uid: m3, UserIdentityType: i2 };
50092
+ const S3 = { ImplementationClassUid: "1.2.826.0.1.3680043.10.854", ImplementationVersion: "DCMJS-DIMSE-V0.2", MaxPduLength: 262144 };
50093
+ Object.freeze(S3), e2.exports = { AbortReason: o3, AbortSource: r7, CommandFieldType: s2, DefaultImplementation: S3, PresentationContextResult: n2, Priority: u2, RawPduType: t2, RejectReason: d3, RejectResult: a2, RejectSource: c3, SopClass: l2, Status: h2, StorageClass: g3, TranscodableTransferSyntaxes: R3, TransferSyntax: p, Uid: m3, UserIdentityType: i2 };
50094
50094
  }, 538: (e2, t2, s2) => {
50095
- const { CEchoResponse: n2, CFindResponse: i2, CGetResponse: r7, CMoveResponse: o3, CStoreResponse: a2, NActionResponse: c3, NCreateResponse: d3, NDeleteResponse: u2, NEventReportResponse: h2, NGetResponse: m3, NSetResponse: g3 } = s2(940), l2 = s2(371), p = s2(906), R3 = s2(547), S2 = s2(0), y2 = s2(278), f2 = s2(756);
50095
+ const { CEchoResponse: n2, CFindResponse: i2, CGetResponse: r7, CMoveResponse: o3, CStoreResponse: a2, NActionResponse: c3, NCreateResponse: d3, NDeleteResponse: u2, NEventReportResponse: h2, NGetResponse: m3, NSetResponse: g3 } = s2(940), l2 = s2(371), p = s2(906), R3 = s2(547), S3 = s2(0), y2 = s2(278), f2 = s2(756);
50096
50096
  e2.exports = { Scp: class extends l2 {
50097
50097
  constructor(e3, t3) {
50098
50098
  super(e3, t3), this.on("associationRequested", (e4) => {
@@ -50178,7 +50178,7 @@ var require_dcmjs_dimse_min = __commonJS({
50178
50178
  abort(e3, t3) {
50179
50179
  R3.error("abort method must be implemented");
50180
50180
  }
50181
- }, Server: class extends S2 {
50181
+ }, Server: class extends S3 {
50182
50182
  constructor(e3) {
50183
50183
  super(), this.scp = { class: e3 }, this.server = void 0, this.clients = [], this.statistics = new p();
50184
50184
  }
@@ -50520,10 +50520,10 @@ var require_dcmjs_dimse_min = __commonJS({
50520
50520
  "use strict";
50521
50521
  e2.exports = a;
50522
50522
  }, 825: (e2, t2, s2) => {
50523
- const { StorageClass: n2, TransferSyntax: i2 } = s2(492), r7 = s2(139), { readFile: o3, readFileSync: a2, writeFile: c3, writeFileSync: d3 } = s2(896), { EOL: u2 } = s2(857), h2 = s2(111), { DicomDict: m3, DicomMessage: g3, DicomMetaDictionary: l2, ReadBufferStream: p, WriteBufferStream: R3 } = h2.data, S2 = h2.log;
50523
+ const { StorageClass: n2, TransferSyntax: i2 } = s2(492), r7 = s2(139), { readFile: o3, readFileSync: a2, writeFile: c3, writeFileSync: d3 } = s2(896), { EOL: u2 } = s2(857), h2 = s2(111), { DicomDict: m3, DicomMessage: g3, DicomMetaDictionary: l2, ReadBufferStream: p, WriteBufferStream: R3 } = h2.data, S3 = h2.log;
50524
50524
  class y2 {
50525
50525
  constructor(e3, t3, s3) {
50526
- s3 = s3 || {}, s3 = { ignoreErrors: true, ...s3 }, S2.level = "error", this.transferSyntaxUid = t3 || i2.ImplicitVRLittleEndian, Buffer.isBuffer(e3) ? this.elements = this._fromElementsBuffer(e3, this.transferSyntaxUid, s3) : this.elements = e3 || {};
50526
+ s3 = s3 || {}, s3 = { ignoreErrors: true, ...s3 }, S3.level = "error", this.transferSyntaxUid = t3 || i2.ImplicitVRLittleEndian, Buffer.isBuffer(e3) ? this.elements = this._fromElementsBuffer(e3, this.transferSyntaxUid, s3) : this.elements = e3 || {};
50527
50527
  }
50528
50528
  getElement(e3) {
50529
50529
  return this.elements[e3];
@@ -50879,13 +50879,13 @@ var require_dcmjs_dimse_min = __commonJS({
50879
50879
  super(n2.CEchoRequest, r7.Verification, false);
50880
50880
  }
50881
50881
  }
50882
- class S2 extends p {
50882
+ class S3 extends p {
50883
50883
  constructor(e3, t3) {
50884
50884
  super(n2.CEchoResponse, r7.Verification, false, e3, t3);
50885
50885
  }
50886
50886
  static fromRequest(e3) {
50887
50887
  if (!(e3 instanceof R3)) throw new Error("Request should be an instance of CEchoRequest");
50888
- const t3 = new S2(o3.ProcessingFailure);
50888
+ const t3 = new S3(o3.ProcessingFailure);
50889
50889
  return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
50890
50890
  }
50891
50891
  }
@@ -51095,7 +51095,7 @@ var require_dcmjs_dimse_min = __commonJS({
51095
51095
  return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
51096
51096
  }
51097
51097
  }
51098
- class U2 extends l2 {
51098
+ class U extends l2 {
51099
51099
  constructor(e3, t3, s3) {
51100
51100
  super(n2.NCreateRequest, e3, false), this.setAffectedSopInstanceUid(t3), this.setMetaSopClassUid(s3);
51101
51101
  }
@@ -51105,7 +51105,7 @@ var require_dcmjs_dimse_min = __commonJS({
51105
51105
  super(n2.NCreateResponse, e3, false, s3, i3), this.setAffectedSopInstanceUid(t3);
51106
51106
  }
51107
51107
  static fromRequest(e3) {
51108
- if (!(e3 instanceof U2)) throw new Error("Request should be an instance of NCreateRequest");
51108
+ if (!(e3 instanceof U)) throw new Error("Request should be an instance of NCreateRequest");
51109
51109
  const t3 = new w3(e3.getAffectedSopClassUid(), e3.getAffectedSopInstanceUid(), o3.ProcessingFailure);
51110
51110
  return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
51111
51111
  }
@@ -51152,7 +51152,7 @@ var require_dcmjs_dimse_min = __commonJS({
51152
51152
  return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
51153
51153
  }
51154
51154
  }
51155
- class b3 extends l2 {
51155
+ class b2 extends l2 {
51156
51156
  constructor(e3, t3, s3, i3) {
51157
51157
  super(n2.NEventReportRequest, e3, false), this.setAffectedSopInstanceUid(t3), this.setEventTypeId(s3), this.setMetaSopClassUid(i3);
51158
51158
  }
@@ -51174,12 +51174,12 @@ var require_dcmjs_dimse_min = __commonJS({
51174
51174
  this.getCommandDataset().setElement("EventTypeID", e3);
51175
51175
  }
51176
51176
  static fromRequest(e3) {
51177
- if (!(e3 instanceof b3)) throw new Error("Request should be an instance of NEventReportRequest");
51177
+ if (!(e3 instanceof b2)) throw new Error("Request should be an instance of NEventReportRequest");
51178
51178
  const t3 = new O2(e3.getAffectedSopClassUid(), e3.getAffectedSopInstanceUid(), e3.getEventTypeId(), o3.ProcessingFailure);
51179
51179
  return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
51180
51180
  }
51181
51181
  }
51182
- class N extends l2 {
51182
+ class N2 extends l2 {
51183
51183
  constructor(e3, t3, s3, i3) {
51184
51184
  super(n2.NGetRequest, e3, false), this.setRequestedSopInstanceUid(t3), this.setAttributeIdentifierList(Array.isArray(s3) ? s3 : [s3]), this.setMetaSopClassUid(i3);
51185
51185
  }
@@ -51210,7 +51210,7 @@ var require_dcmjs_dimse_min = __commonJS({
51210
51210
  super(n2.NGetResponse, e3, false, s3, i3), this.setAffectedSopInstanceUid(t3);
51211
51211
  }
51212
51212
  static fromRequest(e3) {
51213
- if (!(e3 instanceof N)) throw new Error("Request should be an instance of NGetRequest");
51213
+ if (!(e3 instanceof N2)) throw new Error("Request should be an instance of NGetRequest");
51214
51214
  const t3 = new B2(e3.getRequestedSopClassUid(), e3.getRequestedSopInstanceUid(), o3.ProcessingFailure);
51215
51215
  return t3.setMessageIdBeingRespondedTo(e3.getMessageId()), t3;
51216
51216
  }
@@ -51245,7 +51245,7 @@ var require_dcmjs_dimse_min = __commonJS({
51245
51245
  return new F2(e3.getAffectedSopClassUid(), e3.getMessageId());
51246
51246
  }
51247
51247
  }
51248
- e2.exports = { CCancelRequest: F2, CEchoRequest: R3, CEchoResponse: S2, CFindRequest: y2, CFindResponse: f2, CGetRequest: x3, CGetResponse: A3, CMoveRequest: P, CMoveResponse: v3, Command: g3, CStoreRequest: I3, CStoreResponse: C2, NActionRequest: D3, NActionResponse: q2, NCreateRequest: U2, NCreateResponse: w3, NDeleteRequest: E3, NDeleteResponse: T, NEventReportRequest: b3, NEventReportResponse: O2, NGetRequest: N, NGetResponse: B2, NSetRequest: M3, NSetResponse: L2, Request: l2, Response: p };
51248
+ e2.exports = { CCancelRequest: F2, CEchoRequest: R3, CEchoResponse: S3, CFindRequest: y2, CFindResponse: f2, CGetRequest: x3, CGetResponse: A3, CMoveRequest: P, CMoveResponse: v3, Command: g3, CStoreRequest: I3, CStoreResponse: C2, NActionRequest: D3, NActionResponse: q2, NCreateRequest: U, NCreateResponse: w3, NDeleteRequest: E3, NDeleteResponse: T, NEventReportRequest: b2, NEventReportResponse: O2, NGetRequest: N2, NGetResponse: B2, NSetRequest: M3, NSetResponse: L2, Request: l2, Response: p };
51249
51249
  }, 942: (e2, t2, s2) => {
51250
51250
  const { AbortReason: n2, AbortSource: i2, RawPduType: r7, RejectReason: o3, RejectResult: a2, RejectSource: c3, TransferSyntax: d3 } = s2(492), { SmartBuffer: u2 } = s2(766), { EOL: h2 } = s2(857);
51251
51251
  class m3 {
@@ -58371,9 +58371,9 @@ var require_index_cjs = __commonJS({
58371
58371
  const alpha = Number.parseFloat(match[4]);
58372
58372
  const h2 = (Number.parseFloat(match[1]) % 360 + 360) % 360;
58373
58373
  const w3 = clamp(Number.parseFloat(match[2]), 0, 100);
58374
- const b3 = clamp(Number.parseFloat(match[3]), 0, 100);
58374
+ const b2 = clamp(Number.parseFloat(match[3]), 0, 100);
58375
58375
  const a = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
58376
- return [h2, w3, b3, a];
58376
+ return [h2, w3, b2, a];
58377
58377
  }
58378
58378
  return null;
58379
58379
  };
@@ -58386,8 +58386,8 @@ var require_index_cjs = __commonJS({
58386
58386
  cs2.to.rgb.percent = function(...rgba) {
58387
58387
  const r6 = Math.round(rgba[0] / 255 * 100);
58388
58388
  const g3 = Math.round(rgba[1] / 255 * 100);
58389
- const b3 = Math.round(rgba[2] / 255 * 100);
58390
- return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r6 + "%, " + g3 + "%, " + b3 + "%)" : "rgba(" + r6 + "%, " + g3 + "%, " + b3 + "%, " + rgba[3] + ")";
58389
+ const b2 = Math.round(rgba[2] / 255 * 100);
58390
+ return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r6 + "%, " + g3 + "%, " + b2 + "%)" : "rgba(" + r6 + "%, " + g3 + "%, " + b2 + "%, " + rgba[3] + ")";
58391
58391
  };
58392
58392
  cs2.to.hsl = function(...hsla) {
58393
58393
  return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")";
@@ -58459,9 +58459,9 @@ var require_index_cjs = __commonJS({
58459
58459
  convert$1.rgb.hsl = function(rgb) {
58460
58460
  const r6 = rgb[0] / 255;
58461
58461
  const g3 = rgb[1] / 255;
58462
- const b3 = rgb[2] / 255;
58463
- const min = Math.min(r6, g3, b3);
58464
- const max = Math.max(r6, g3, b3);
58462
+ const b2 = rgb[2] / 255;
58463
+ const min = Math.min(r6, g3, b2);
58464
+ const max = Math.max(r6, g3, b2);
58465
58465
  const delta = max - min;
58466
58466
  let h2;
58467
58467
  let s;
@@ -58471,14 +58471,14 @@ var require_index_cjs = __commonJS({
58471
58471
  break;
58472
58472
  }
58473
58473
  case r6: {
58474
- h2 = (g3 - b3) / delta;
58474
+ h2 = (g3 - b2) / delta;
58475
58475
  break;
58476
58476
  }
58477
58477
  case g3: {
58478
- h2 = 2 + (b3 - r6) / delta;
58478
+ h2 = 2 + (b2 - r6) / delta;
58479
58479
  break;
58480
58480
  }
58481
- case b3: {
58481
+ case b2: {
58482
58482
  h2 = 4 + (r6 - g3) / delta;
58483
58483
  break;
58484
58484
  }
@@ -58505,9 +58505,9 @@ var require_index_cjs = __commonJS({
58505
58505
  let s;
58506
58506
  const r6 = rgb[0] / 255;
58507
58507
  const g3 = rgb[1] / 255;
58508
- const b3 = rgb[2] / 255;
58509
- const v3 = Math.max(r6, g3, b3);
58510
- const diff = v3 - Math.min(r6, g3, b3);
58508
+ const b2 = rgb[2] / 255;
58509
+ const v3 = Math.max(r6, g3, b2);
58510
+ const diff = v3 - Math.min(r6, g3, b2);
58511
58511
  const diffc = function(c2) {
58512
58512
  return (v3 - c2) / 6 / diff + 1 / 2;
58513
58513
  };
@@ -58518,7 +58518,7 @@ var require_index_cjs = __commonJS({
58518
58518
  s = diff / v3;
58519
58519
  rdif = diffc(r6);
58520
58520
  gdif = diffc(g3);
58521
- bdif = diffc(b3);
58521
+ bdif = diffc(b2);
58522
58522
  switch (v3) {
58523
58523
  case r6: {
58524
58524
  h2 = bdif - gdif;
@@ -58528,7 +58528,7 @@ var require_index_cjs = __commonJS({
58528
58528
  h2 = 1 / 3 + rdif - bdif;
58529
58529
  break;
58530
58530
  }
58531
- case b3: {
58531
+ case b2: {
58532
58532
  h2 = 2 / 3 + gdif - rdif;
58533
58533
  break;
58534
58534
  }
@@ -58548,19 +58548,19 @@ var require_index_cjs = __commonJS({
58548
58548
  convert$1.rgb.hwb = function(rgb) {
58549
58549
  const r6 = rgb[0];
58550
58550
  const g3 = rgb[1];
58551
- let b3 = rgb[2];
58551
+ let b2 = rgb[2];
58552
58552
  const h2 = convert$1.rgb.hsl(rgb)[0];
58553
- const w3 = 1 / 255 * Math.min(r6, Math.min(g3, b3));
58554
- b3 = 1 - 1 / 255 * Math.max(r6, Math.max(g3, b3));
58555
- return [h2, w3 * 100, b3 * 100];
58553
+ const w3 = 1 / 255 * Math.min(r6, Math.min(g3, b2));
58554
+ b2 = 1 - 1 / 255 * Math.max(r6, Math.max(g3, b2));
58555
+ return [h2, w3 * 100, b2 * 100];
58556
58556
  };
58557
58557
  convert$1.rgb.oklab = function(rgb) {
58558
58558
  const r6 = srgbNonlinearTransformInv(rgb[0] / 255);
58559
58559
  const g3 = srgbNonlinearTransformInv(rgb[1] / 255);
58560
- const b3 = srgbNonlinearTransformInv(rgb[2] / 255);
58561
- const lp = Math.cbrt(0.4122214708 * r6 + 0.5363325363 * g3 + 0.0514459929 * b3);
58562
- const mp = Math.cbrt(0.2119034982 * r6 + 0.6806995451 * g3 + 0.1073969566 * b3);
58563
- const sp = Math.cbrt(0.0883024619 * r6 + 0.2817188376 * g3 + 0.6299787005 * b3);
58560
+ const b2 = srgbNonlinearTransformInv(rgb[2] / 255);
58561
+ const lp = Math.cbrt(0.4122214708 * r6 + 0.5363325363 * g3 + 0.0514459929 * b2);
58562
+ const mp = Math.cbrt(0.2119034982 * r6 + 0.6806995451 * g3 + 0.1073969566 * b2);
58563
+ const sp = Math.cbrt(0.0883024619 * r6 + 0.2817188376 * g3 + 0.6299787005 * b2);
58564
58564
  const l2 = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
58565
58565
  const aa = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
58566
58566
  const bb = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
@@ -58569,11 +58569,11 @@ var require_index_cjs = __commonJS({
58569
58569
  convert$1.rgb.cmyk = function(rgb) {
58570
58570
  const r6 = rgb[0] / 255;
58571
58571
  const g3 = rgb[1] / 255;
58572
- const b3 = rgb[2] / 255;
58573
- const k2 = Math.min(1 - r6, 1 - g3, 1 - b3);
58572
+ const b2 = rgb[2] / 255;
58573
+ const k2 = Math.min(1 - r6, 1 - g3, 1 - b2);
58574
58574
  const c2 = (1 - r6 - k2) / (1 - k2) || 0;
58575
58575
  const m3 = (1 - g3 - k2) / (1 - k2) || 0;
58576
- const y2 = (1 - b3 - k2) / (1 - k2) || 0;
58576
+ const y2 = (1 - b2 - k2) / (1 - k2) || 0;
58577
58577
  return [c2 * 100, m3 * 100, y2 * 100, k2 * 100];
58578
58578
  };
58579
58579
  function comparativeDistance(x3, y2) {
@@ -58602,10 +58602,10 @@ var require_index_cjs = __commonJS({
58602
58602
  convert$1.rgb.xyz = function(rgb) {
58603
58603
  const r6 = srgbNonlinearTransformInv(rgb[0] / 255);
58604
58604
  const g3 = srgbNonlinearTransformInv(rgb[1] / 255);
58605
- const b3 = srgbNonlinearTransformInv(rgb[2] / 255);
58606
- const x3 = r6 * 0.4124564 + g3 * 0.3575761 + b3 * 0.1804375;
58607
- const y2 = r6 * 0.2126729 + g3 * 0.7151522 + b3 * 0.072175;
58608
- const z = r6 * 0.0193339 + g3 * 0.119192 + b3 * 0.9503041;
58605
+ const b2 = srgbNonlinearTransformInv(rgb[2] / 255);
58606
+ const x3 = r6 * 0.4124564 + g3 * 0.3575761 + b2 * 0.1804375;
58607
+ const y2 = r6 * 0.2126729 + g3 * 0.7151522 + b2 * 0.072175;
58608
+ const z = r6 * 0.0193339 + g3 * 0.119192 + b2 * 0.9503041;
58609
58609
  return [x3 * 100, y2 * 100, z * 100];
58610
58610
  };
58611
58611
  convert$1.rgb.lab = function(rgb) {
@@ -58621,8 +58621,8 @@ var require_index_cjs = __commonJS({
58621
58621
  z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
58622
58622
  const l2 = 116 * y2 - 16;
58623
58623
  const a = 500 * (x3 - y2);
58624
- const b3 = 200 * (y2 - z);
58625
- return [l2, a, b3];
58624
+ const b2 = 200 * (y2 - z);
58625
+ return [l2, a, b2];
58626
58626
  };
58627
58627
  convert$1.hsl.rgb = function(hsl) {
58628
58628
  const h2 = hsl[0] / 360;
@@ -58736,48 +58736,48 @@ var require_index_cjs = __commonJS({
58736
58736
  const n = wh + f2 * (v3 - wh);
58737
58737
  let r6;
58738
58738
  let g3;
58739
- let b3;
58739
+ let b2;
58740
58740
  switch (i) {
58741
58741
  default:
58742
58742
  case 6:
58743
58743
  case 0: {
58744
58744
  r6 = v3;
58745
58745
  g3 = n;
58746
- b3 = wh;
58746
+ b2 = wh;
58747
58747
  break;
58748
58748
  }
58749
58749
  case 1: {
58750
58750
  r6 = n;
58751
58751
  g3 = v3;
58752
- b3 = wh;
58752
+ b2 = wh;
58753
58753
  break;
58754
58754
  }
58755
58755
  case 2: {
58756
58756
  r6 = wh;
58757
58757
  g3 = v3;
58758
- b3 = n;
58758
+ b2 = n;
58759
58759
  break;
58760
58760
  }
58761
58761
  case 3: {
58762
58762
  r6 = wh;
58763
58763
  g3 = n;
58764
- b3 = v3;
58764
+ b2 = v3;
58765
58765
  break;
58766
58766
  }
58767
58767
  case 4: {
58768
58768
  r6 = n;
58769
58769
  g3 = wh;
58770
- b3 = v3;
58770
+ b2 = v3;
58771
58771
  break;
58772
58772
  }
58773
58773
  case 5: {
58774
58774
  r6 = v3;
58775
58775
  g3 = wh;
58776
- b3 = n;
58776
+ b2 = n;
58777
58777
  break;
58778
58778
  }
58779
58779
  }
58780
- return [r6 * 255, g3 * 255, b3 * 255];
58780
+ return [r6 * 255, g3 * 255, b2 * 255];
58781
58781
  };
58782
58782
  convert$1.cmyk.rgb = function(cmyk) {
58783
58783
  const c2 = cmyk[0] / 100;
@@ -58786,8 +58786,8 @@ var require_index_cjs = __commonJS({
58786
58786
  const k2 = cmyk[3] / 100;
58787
58787
  const r6 = 1 - Math.min(1, c2 * (1 - k2) + k2);
58788
58788
  const g3 = 1 - Math.min(1, m3 * (1 - k2) + k2);
58789
- const b3 = 1 - Math.min(1, y2 * (1 - k2) + k2);
58790
- return [r6 * 255, g3 * 255, b3 * 255];
58789
+ const b2 = 1 - Math.min(1, y2 * (1 - k2) + k2);
58790
+ return [r6 * 255, g3 * 255, b2 * 255];
58791
58791
  };
58792
58792
  convert$1.xyz.rgb = function(xyz) {
58793
58793
  const x3 = xyz[0] / 100;
@@ -58795,14 +58795,14 @@ var require_index_cjs = __commonJS({
58795
58795
  const z = xyz[2] / 100;
58796
58796
  let r6;
58797
58797
  let g3;
58798
- let b3;
58798
+ let b2;
58799
58799
  r6 = x3 * 3.2404542 + y2 * -1.5371385 + z * -0.4985314;
58800
58800
  g3 = x3 * -0.969266 + y2 * 1.8760108 + z * 0.041556;
58801
- b3 = x3 * 0.0556434 + y2 * -0.2040259 + z * 1.0572252;
58801
+ b2 = x3 * 0.0556434 + y2 * -0.2040259 + z * 1.0572252;
58802
58802
  r6 = srgbNonlinearTransform(r6);
58803
58803
  g3 = srgbNonlinearTransform(g3);
58804
- b3 = srgbNonlinearTransform(b3);
58805
- return [r6 * 255, g3 * 255, b3 * 255];
58804
+ b2 = srgbNonlinearTransform(b2);
58805
+ return [r6 * 255, g3 * 255, b2 * 255];
58806
58806
  };
58807
58807
  convert$1.xyz.lab = function(xyz) {
58808
58808
  let x3 = xyz[0];
@@ -58816,8 +58816,8 @@ var require_index_cjs = __commonJS({
58816
58816
  z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
58817
58817
  const l2 = 116 * y2 - 16;
58818
58818
  const a = 500 * (x3 - y2);
58819
- const b3 = 200 * (y2 - z);
58820
- return [l2, a, b3];
58819
+ const b2 = 200 * (y2 - z);
58820
+ return [l2, a, b2];
58821
58821
  };
58822
58822
  convert$1.xyz.oklab = function(xyz) {
58823
58823
  const x3 = xyz[0] / 100;
@@ -58828,8 +58828,8 @@ var require_index_cjs = __commonJS({
58828
58828
  const sp = Math.cbrt(0.0482003018 * x3 + 0.2643662691 * y2 + 0.633851707 * z);
58829
58829
  const l2 = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
58830
58830
  const a = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
58831
- const b3 = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
58832
- return [l2 * 100, a * 100, b3 * 100];
58831
+ const b2 = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
58832
+ return [l2 * 100, a * 100, b2 * 100];
58833
58833
  };
58834
58834
  convert$1.oklab.oklch = function(oklab) {
58835
58835
  return convert$1.lab.lch(oklab);
@@ -58837,10 +58837,10 @@ var require_index_cjs = __commonJS({
58837
58837
  convert$1.oklab.xyz = function(oklab) {
58838
58838
  const ll = oklab[0] / 100;
58839
58839
  const a = oklab[1] / 100;
58840
- const b3 = oklab[2] / 100;
58841
- const l2 = (0.999999998 * ll + 0.396337792 * a + 0.215803758 * b3) ** 3;
58842
- const m3 = (1.000000008 * ll - 0.105561342 * a - 0.063854175 * b3) ** 3;
58843
- const s = (1.000000055 * ll - 0.089484182 * a - 1.291485538 * b3) ** 3;
58840
+ const b2 = oklab[2] / 100;
58841
+ const l2 = (0.999999998 * ll + 0.396337792 * a + 0.215803758 * b2) ** 3;
58842
+ const m3 = (1.000000008 * ll - 0.105561342 * a - 0.063854175 * b2) ** 3;
58843
+ const s = (1.000000055 * ll - 0.089484182 * a - 1.291485538 * b2) ** 3;
58844
58844
  const x3 = 1.227013851 * l2 - 0.55779998 * m3 + 0.281256149 * s;
58845
58845
  const y2 = -0.040580178 * l2 + 1.11225687 * m3 - 0.071676679 * s;
58846
58846
  const z = -0.076381285 * l2 - 0.421481978 * m3 + 1.58616322 * s;
@@ -58855,8 +58855,8 @@ var require_index_cjs = __commonJS({
58855
58855
  const s = (ll - 0.0894841775 * aa - 1.291485548 * bb) ** 3;
58856
58856
  const r6 = srgbNonlinearTransform(4.0767416621 * l2 - 3.3077115913 * m3 + 0.2309699292 * s);
58857
58857
  const g3 = srgbNonlinearTransform(-1.2684380046 * l2 + 2.6097574011 * m3 - 0.3413193965 * s);
58858
- const b3 = srgbNonlinearTransform(-0.0041960863 * l2 - 0.7034186147 * m3 + 1.707614701 * s);
58859
- return [r6 * 255, g3 * 255, b3 * 255];
58858
+ const b2 = srgbNonlinearTransform(-0.0041960863 * l2 - 0.7034186147 * m3 + 1.707614701 * s);
58859
+ return [r6 * 255, g3 * 255, b2 * 255];
58860
58860
  };
58861
58861
  convert$1.oklch.oklab = function(oklch) {
58862
58862
  return convert$1.lch.lab(oklch);
@@ -58864,13 +58864,13 @@ var require_index_cjs = __commonJS({
58864
58864
  convert$1.lab.xyz = function(lab) {
58865
58865
  const l2 = lab[0];
58866
58866
  const a = lab[1];
58867
- const b3 = lab[2];
58867
+ const b2 = lab[2];
58868
58868
  let x3;
58869
58869
  let y2;
58870
58870
  let z;
58871
58871
  y2 = (l2 + 16) / 116;
58872
58872
  x3 = a / 500 + y2;
58873
- z = y2 - b3 / 200;
58873
+ z = y2 - b2 / 200;
58874
58874
  const y22 = y2 ** 3;
58875
58875
  const x22 = x3 ** 3;
58876
58876
  const z2 = z ** 3;
@@ -58885,33 +58885,33 @@ var require_index_cjs = __commonJS({
58885
58885
  convert$1.lab.lch = function(lab) {
58886
58886
  const l2 = lab[0];
58887
58887
  const a = lab[1];
58888
- const b3 = lab[2];
58888
+ const b2 = lab[2];
58889
58889
  let h2;
58890
- const hr = Math.atan2(b3, a);
58891
- h2 = hr * 360 / 2 / Math.PI;
58890
+ const hr2 = Math.atan2(b2, a);
58891
+ h2 = hr2 * 360 / 2 / Math.PI;
58892
58892
  if (h2 < 0) {
58893
58893
  h2 += 360;
58894
58894
  }
58895
- const c2 = Math.sqrt(a * a + b3 * b3);
58895
+ const c2 = Math.sqrt(a * a + b2 * b2);
58896
58896
  return [l2, c2, h2];
58897
58897
  };
58898
58898
  convert$1.lch.lab = function(lch) {
58899
58899
  const l2 = lch[0];
58900
58900
  const c2 = lch[1];
58901
58901
  const h2 = lch[2];
58902
- const hr = h2 / 360 * 2 * Math.PI;
58903
- const a = c2 * Math.cos(hr);
58904
- const b3 = c2 * Math.sin(hr);
58905
- return [l2, a, b3];
58902
+ const hr2 = h2 / 360 * 2 * Math.PI;
58903
+ const a = c2 * Math.cos(hr2);
58904
+ const b2 = c2 * Math.sin(hr2);
58905
+ return [l2, a, b2];
58906
58906
  };
58907
58907
  convert$1.rgb.ansi16 = function(args, saturation = null) {
58908
- const [r6, g3, b3] = args;
58908
+ const [r6, g3, b2] = args;
58909
58909
  let value = saturation === null ? convert$1.rgb.hsv(args)[2] : saturation;
58910
58910
  value = Math.round(value / 50);
58911
58911
  if (value === 0) {
58912
58912
  return 30;
58913
58913
  }
58914
- let ansi = 30 + (Math.round(b3 / 255) << 2 | Math.round(g3 / 255) << 1 | Math.round(r6 / 255));
58914
+ let ansi = 30 + (Math.round(b2 / 255) << 2 | Math.round(g3 / 255) << 1 | Math.round(r6 / 255));
58915
58915
  if (value === 2) {
58916
58916
  ansi += 60;
58917
58917
  }
@@ -58923,8 +58923,8 @@ var require_index_cjs = __commonJS({
58923
58923
  convert$1.rgb.ansi256 = function(args) {
58924
58924
  const r6 = args[0];
58925
58925
  const g3 = args[1];
58926
- const b3 = args[2];
58927
- if (r6 >> 4 === g3 >> 4 && g3 >> 4 === b3 >> 4) {
58926
+ const b2 = args[2];
58927
+ if (r6 >> 4 === g3 >> 4 && g3 >> 4 === b2 >> 4) {
58928
58928
  if (r6 < 8) {
58929
58929
  return 16;
58930
58930
  }
@@ -58933,7 +58933,7 @@ var require_index_cjs = __commonJS({
58933
58933
  }
58934
58934
  return Math.round((r6 - 8) / 247 * 24) + 232;
58935
58935
  }
58936
- const ansi = 16 + 36 * Math.round(r6 / 255 * 5) + 6 * Math.round(g3 / 255 * 5) + Math.round(b3 / 255 * 5);
58936
+ const ansi = 16 + 36 * Math.round(r6 / 255 * 5) + 6 * Math.round(g3 / 255 * 5) + Math.round(b2 / 255 * 5);
58937
58937
  return ansi;
58938
58938
  };
58939
58939
  convert$1.ansi16.rgb = function(args) {
@@ -58949,8 +58949,8 @@ var require_index_cjs = __commonJS({
58949
58949
  const mult = (Math.trunc(args > 50) + 1) * 0.5;
58950
58950
  const r6 = (color & 1) * mult * 255;
58951
58951
  const g3 = (color >> 1 & 1) * mult * 255;
58952
- const b3 = (color >> 2 & 1) * mult * 255;
58953
- return [r6, g3, b3];
58952
+ const b2 = (color >> 2 & 1) * mult * 255;
58953
+ return [r6, g3, b2];
58954
58954
  };
58955
58955
  convert$1.ansi256.rgb = function(args) {
58956
58956
  args = args[0];
@@ -58962,8 +58962,8 @@ var require_index_cjs = __commonJS({
58962
58962
  let rem;
58963
58963
  const r6 = Math.floor(args / 36) / 5 * 255;
58964
58964
  const g3 = Math.floor((rem = args % 36) / 6) / 5 * 255;
58965
- const b3 = rem % 6 / 5 * 255;
58966
- return [r6, g3, b3];
58965
+ const b2 = rem % 6 / 5 * 255;
58966
+ return [r6, g3, b2];
58967
58967
  };
58968
58968
  convert$1.rgb.hex = function(args) {
58969
58969
  const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
@@ -58982,24 +58982,24 @@ var require_index_cjs = __commonJS({
58982
58982
  const integer = Number.parseInt(colorString, 16);
58983
58983
  const r6 = integer >> 16 & 255;
58984
58984
  const g3 = integer >> 8 & 255;
58985
- const b3 = integer & 255;
58986
- return [r6, g3, b3];
58985
+ const b2 = integer & 255;
58986
+ return [r6, g3, b2];
58987
58987
  };
58988
58988
  convert$1.rgb.hcg = function(rgb) {
58989
58989
  const r6 = rgb[0] / 255;
58990
58990
  const g3 = rgb[1] / 255;
58991
- const b3 = rgb[2] / 255;
58992
- const max = Math.max(Math.max(r6, g3), b3);
58993
- const min = Math.min(Math.min(r6, g3), b3);
58991
+ const b2 = rgb[2] / 255;
58992
+ const max = Math.max(Math.max(r6, g3), b2);
58993
+ const min = Math.min(Math.min(r6, g3), b2);
58994
58994
  const chroma = max - min;
58995
58995
  let hue;
58996
58996
  const grayscale = chroma < 1 ? min / (1 - chroma) : 0;
58997
58997
  if (chroma <= 0) {
58998
58998
  hue = 0;
58999
58999
  } else if (max === r6) {
59000
- hue = (g3 - b3) / chroma % 6;
59000
+ hue = (g3 - b2) / chroma % 6;
59001
59001
  } else if (max === g3) {
59002
- hue = 2 + (b3 - r6) / chroma;
59002
+ hue = 2 + (b2 - r6) / chroma;
59003
59003
  } else {
59004
59004
  hue = 4 + (r6 - g3) / chroma;
59005
59005
  }
@@ -59113,8 +59113,8 @@ var require_index_cjs = __commonJS({
59113
59113
  };
59114
59114
  convert$1.hwb.hcg = function(hwb) {
59115
59115
  const w3 = hwb[1] / 100;
59116
- const b3 = hwb[2] / 100;
59117
- const v3 = 1 - b3;
59116
+ const b2 = hwb[2] / 100;
59117
+ const v3 = 1 - b2;
59118
59118
  const c2 = v3 - w3;
59119
59119
  let g3 = 0;
59120
59120
  if (c2 < 1) {
@@ -59695,15 +59695,15 @@ var require_kuler = __commonJS({
59695
59695
  color[1] = color[0];
59696
59696
  color = color.join("");
59697
59697
  }
59698
- var r6 = color.substring(0, 2), g3 = color.substring(2, 4), b3 = color.substring(4, 6);
59699
- return [parseInt(r6, 16), parseInt(g3, 16), parseInt(b3, 16)];
59698
+ var r6 = color.substring(0, 2), g3 = color.substring(2, 4), b2 = color.substring(4, 6);
59699
+ return [parseInt(r6, 16), parseInt(g3, 16), parseInt(b2, 16)];
59700
59700
  };
59701
- Kuler.prototype.rgb = function rgb(r6, g3, b3) {
59702
- var red = r6 / 255 * 5, green = g3 / 255 * 5, blue = b3 / 255 * 5;
59701
+ Kuler.prototype.rgb = function rgb(r6, g3, b2) {
59702
+ var red = r6 / 255 * 5, green = g3 / 255 * 5, blue = b2 / 255 * 5;
59703
59703
  return this.ansi(red, green, blue);
59704
59704
  };
59705
- Kuler.prototype.ansi = function ansi(r6, g3, b3) {
59706
- var red = Math.round(r6), green = Math.round(g3), blue = Math.round(b3);
59705
+ Kuler.prototype.ansi = function ansi(r6, g3, b2) {
59706
+ var red = Math.round(r6), green = Math.round(g3), blue = Math.round(b2);
59707
59707
  return 16 + red * 36 + green * 6 + blue;
59708
59708
  };
59709
59709
  Kuler.prototype.reset = function reset() {
@@ -60701,11 +60701,11 @@ var require_http = __commonJS({
60701
60701
  _doBatch(options, callback, auth, path4) {
60702
60702
  this.batchOptions.push(options);
60703
60703
  if (this.batchOptions.length === 1) {
60704
- const me = this;
60704
+ const me2 = this;
60705
60705
  this.batchCallback = callback;
60706
60706
  this.batchTimeoutID = setTimeout(function() {
60707
- me.batchTimeoutID = -1;
60708
- me._doBatchRequest(me.batchCallback, auth, path4);
60707
+ me2.batchTimeoutID = -1;
60708
+ me2._doBatchRequest(me2.batchCallback, auth, path4);
60709
60709
  }, this.batchInterval);
60710
60710
  }
60711
60711
  if (this.batchOptions.length === this.batchCount) {
@@ -62801,11 +62801,11 @@ var require_object_hash = __commonJS({
62801
62801
  function PassThrough() {
62802
62802
  return {
62803
62803
  buf: "",
62804
- write: function(b3) {
62805
- this.buf += b3;
62804
+ write: function(b2) {
62805
+ this.buf += b2;
62806
62806
  },
62807
- end: function(b3) {
62808
- this.buf += b3;
62807
+ end: function(b2) {
62808
+ this.buf += b2;
62809
62809
  },
62810
62810
  read: function() {
62811
62811
  return this.buf;
@@ -62836,8 +62836,8 @@ var require_moment = __commonJS({
62836
62836
  function isObject(input) {
62837
62837
  return input != null && Object.prototype.toString.call(input) === "[object Object]";
62838
62838
  }
62839
- function hasOwnProp(a, b3) {
62840
- return Object.prototype.hasOwnProperty.call(a, b3);
62839
+ function hasOwnProp(a, b2) {
62840
+ return Object.prototype.hasOwnProperty.call(a, b2);
62841
62841
  }
62842
62842
  function isObjectEmpty(obj) {
62843
62843
  if (Object.getOwnPropertyNames) {
@@ -62868,17 +62868,17 @@ var require_moment = __commonJS({
62868
62868
  }
62869
62869
  return res;
62870
62870
  }
62871
- function extend(a, b3) {
62872
- for (var i in b3) {
62873
- if (hasOwnProp(b3, i)) {
62874
- a[i] = b3[i];
62871
+ function extend(a, b2) {
62872
+ for (var i in b2) {
62873
+ if (hasOwnProp(b2, i)) {
62874
+ a[i] = b2[i];
62875
62875
  }
62876
62876
  }
62877
- if (hasOwnProp(b3, "toString")) {
62878
- a.toString = b3.toString;
62877
+ if (hasOwnProp(b2, "toString")) {
62878
+ a.toString = b2.toString;
62879
62879
  }
62880
- if (hasOwnProp(b3, "valueOf")) {
62881
- a.valueOf = b3.valueOf;
62880
+ if (hasOwnProp(b2, "valueOf")) {
62881
+ a.valueOf = b2.valueOf;
62882
62882
  }
62883
62883
  return a;
62884
62884
  }
@@ -63354,8 +63354,8 @@ var require_moment = __commonJS({
63354
63354
  units.push({ unit: u2, priority: priorities[u2] });
63355
63355
  }
63356
63356
  }
63357
- units.sort(function(a, b3) {
63358
- return a.priority - b3.priority;
63357
+ units.sort(function(a, b2) {
63358
+ return a.priority - b2.priority;
63359
63359
  });
63360
63360
  return units;
63361
63361
  }
@@ -63768,8 +63768,8 @@ var require_moment = __commonJS({
63768
63768
  }
63769
63769
  }
63770
63770
  function computeMonthsParse() {
63771
- function cmpLenRev(a, b3) {
63772
- return b3.length - a.length;
63771
+ function cmpLenRev(a, b2) {
63772
+ return b2.length - a.length;
63773
63773
  }
63774
63774
  var shortPieces = [], longPieces = [], mixedPieces = [], i, mom, shortP, longP;
63775
63775
  for (i = 0; i < 12; i++) {
@@ -64157,8 +64157,8 @@ var require_moment = __commonJS({
64157
64157
  }
64158
64158
  }
64159
64159
  function computeWeekdaysParse() {
64160
- function cmpLenRev(a, b3) {
64161
- return b3.length - a.length;
64160
+ function cmpLenRev(a, b2) {
64161
+ return b2.length - a.length;
64162
64162
  }
64163
64163
  var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i, mom, minp, shortp, longp;
64164
64164
  for (i = 0; i < 7; i++) {
@@ -64670,12 +64670,12 @@ var require_moment = __commonJS({
64670
64670
  config._d = /* @__PURE__ */ new Date(config._i + (config._useUTC ? " UTC" : ""));
64671
64671
  }
64672
64672
  );
64673
- function defaults(a, b3, c2) {
64673
+ function defaults(a, b2, c2) {
64674
64674
  if (a != null) {
64675
64675
  return a;
64676
64676
  }
64677
- if (b3 != null) {
64678
- return b3;
64677
+ if (b2 != null) {
64678
+ return b2;
64679
64679
  }
64680
64680
  return c2;
64681
64681
  }
@@ -65575,17 +65575,17 @@ var require_moment = __commonJS({
65575
65575
  }
65576
65576
  return asFloat ? output : absFloor(output);
65577
65577
  }
65578
- function monthDiff(a, b3) {
65579
- if (a.date() < b3.date()) {
65580
- return -monthDiff(b3, a);
65578
+ function monthDiff(a, b2) {
65579
+ if (a.date() < b2.date()) {
65580
+ return -monthDiff(b2, a);
65581
65581
  }
65582
- var wholeMonthDiff = (b3.year() - a.year()) * 12 + (b3.month() - a.month()), anchor = a.clone().add(wholeMonthDiff, "months"), anchor2, adjust;
65583
- if (b3 - anchor < 0) {
65582
+ var wholeMonthDiff = (b2.year() - a.year()) * 12 + (b2.month() - a.month()), anchor = a.clone().add(wholeMonthDiff, "months"), anchor2, adjust;
65583
+ if (b2 - anchor < 0) {
65584
65584
  anchor2 = a.clone().add(wholeMonthDiff - 1, "months");
65585
- adjust = (b3 - anchor) / (anchor - anchor2);
65585
+ adjust = (b2 - anchor) / (anchor - anchor2);
65586
65586
  } else {
65587
65587
  anchor2 = a.clone().add(wholeMonthDiff + 1, "months");
65588
- adjust = (b3 - anchor) / (anchor2 - anchor);
65588
+ adjust = (b2 - anchor) / (anchor2 - anchor);
65589
65589
  }
65590
65590
  return -(wholeMonthDiff + adjust) || 0;
65591
65591
  }
@@ -66474,7 +66474,7 @@ var require_moment = __commonJS({
66474
66474
  ],
66475
66475
  dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
66476
66476
  ordinal: function(number) {
66477
- var b3 = number % 10, output = toInt(number % 100 / 10) === 1 ? "th" : b3 === 1 ? "st" : b3 === 2 ? "nd" : b3 === 3 ? "rd" : "th";
66477
+ var b2 = number % 10, output = toInt(number % 100 / 10) === 1 ? "th" : b2 === 1 ? "st" : b2 === 2 ? "nd" : b2 === 3 ? "rd" : "th";
66478
66478
  return number + output;
66479
66479
  }
66480
66480
  });
@@ -67523,9 +67523,9 @@ var require_daily_rotate_file = __commonJS({
67523
67523
  if (logFiles.length) {
67524
67524
  processLogFile(logFiles.shift());
67525
67525
  } else if (callback) {
67526
- results.sort((a, b3) => {
67526
+ results.sort((a, b2) => {
67527
67527
  const d1 = new Date(a.timestamp).getTime();
67528
- const d2 = new Date(b3.timestamp).getTime();
67528
+ const d2 = new Date(b2.timestamp).getTime();
67529
67529
  return d1 > d2 ? 1 : d1 < d2 ? -1 : 0;
67530
67530
  });
67531
67531
  if (options.order === "desc") {
@@ -67690,7 +67690,7 @@ var dr = class {
67690
67690
  return this.infixParselets[e.id === "Symbol" ? e.value : e.id];
67691
67691
  }
67692
67692
  };
67693
- var Ve = class {
67693
+ var De = class {
67694
67694
  constructor(e = 10) {
67695
67695
  c(this, "max");
67696
67696
  c(this, "cache");
@@ -67718,11 +67718,11 @@ var Ve = class {
67718
67718
  };
67719
67719
  var dt = "http://hl7.org";
67720
67720
  var ft = "created";
67721
- var mr = "not-modified";
67721
+ var hr = "not-modified";
67722
67722
  var yr = "not-found";
67723
67723
  var xr = "unauthorized";
67724
- var mt = "accepted";
67725
- var Vn = { resourceType: "OperationOutcome", id: yr, issue: [{ severity: "error", code: "not-found", details: { text: "Not found" } }] };
67724
+ var ht = "accepted";
67725
+ var Dn = { resourceType: "OperationOutcome", id: yr, issue: [{ severity: "error", code: "not-found", details: { text: "Not found" } }] };
67726
67726
  var Me = { resourceType: "OperationOutcome", id: xr, issue: [{ severity: "error", code: "login", details: { text: "Unauthorized" } }] };
67727
67727
  var Mn = { ...Me, issue: [...Me.issue, { severity: "error", code: "expired", details: { text: "Token expired" } }] };
67728
67728
  var vr = { ...Me, issue: [...Me.issue, { severity: "error", code: "invalid", details: { text: "Token not issued for this audience" } }] };
@@ -67741,8 +67741,8 @@ function Tr(r6) {
67741
67741
  function Ge(r6) {
67742
67742
  return typeof r6 == "object" && r6 !== null && r6.resourceType === "OperationOutcome";
67743
67743
  }
67744
- function br(r6) {
67745
- return r6.id === "ok" || r6.id === ft || r6.id === mr || r6.id === mt;
67744
+ function Sr(r6) {
67745
+ return r6.id === "ok" || r6.id === ft || r6.id === hr || r6.id === ht;
67746
67746
  }
67747
67747
  var f = class extends Error {
67748
67748
  constructor(t, n) {
@@ -67751,7 +67751,7 @@ var f = class extends Error {
67751
67751
  this.name = "OperationOutcomeError", this.outcome = t;
67752
67752
  }
67753
67753
  };
67754
- function ht(r6) {
67754
+ function mt(r6) {
67755
67755
  return r6 instanceof f ? r6.outcome : Ge(r6) ? r6 : R(_e(r6));
67756
67756
  }
67757
67757
  function _e(r6) {
@@ -67765,13 +67765,13 @@ function ko(r6) {
67765
67765
  let e;
67766
67766
  return r6.details?.text ? r6.diagnostics ? e = `${r6.details.text} (${r6.diagnostics})` : e = r6.details.text : r6.diagnostics ? e = r6.diagnostics : e = "Unknown error", r6.expression?.length && (e += ` (${r6.expression.join(", ")})`), e;
67767
67767
  }
67768
- function Vo(r6, e) {
67768
+ function Do(r6, e) {
67769
67769
  let t = e.max && e.max === Number.MAX_SAFE_INTEGER ? Number.POSITIVE_INFINITY : e.max;
67770
67770
  return { path: r6, description: "", type: e.type ?? [], min: e.min ?? 0, max: t ?? 1, isArray: !!t && t > 1, constraints: [] };
67771
67771
  }
67772
67772
  function Un(r6) {
67773
67773
  let e = /* @__PURE__ */ Object.create(null);
67774
- for (let [t, n] of Object.entries(r6)) e[t] = { name: t, type: t, path: t, elements: Object.fromEntries(Object.entries(n.elements).map(([i, o2]) => [i, Vo(i, o2)])), constraints: [], innerTypes: [] };
67774
+ for (let [t, n] of Object.entries(r6)) e[t] = { name: t, type: t, path: t, elements: Object.fromEntries(Object.entries(n.elements).map(([i, o2]) => [i, Do(i, o2)])), constraints: [], innerTypes: [] };
67775
67775
  return e;
67776
67776
  }
67777
67777
  var Bn = { Element: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] } } }, BackboneElement: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] } } }, Address: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, type: { type: [{ code: "code" }] }, text: { type: [{ code: "string" }] }, line: { max: 9007199254740991, type: [{ code: "string" }] }, city: { type: [{ code: "string" }] }, district: { type: [{ code: "string" }] }, state: { type: [{ code: "string" }] }, postalCode: { type: [{ code: "string" }] }, country: { type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] } } }, Age: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Annotation: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "author[x]": { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Organization"] }, { code: "string" }] }, time: { type: [{ code: "dateTime" }] }, text: { min: 1, type: [{ code: "markdown" }] } } }, Attachment: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, contentType: { type: [{ code: "code" }] }, language: { type: [{ code: "code" }] }, data: { type: [{ code: "base64Binary" }] }, url: { type: [{ code: "url" }] }, size: { type: [{ code: "unsignedInt" }] }, hash: { type: [{ code: "base64Binary" }] }, title: { type: [{ code: "string" }] }, creation: { type: [{ code: "dateTime" }] } } }, CodeableConcept: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, coding: { max: 9007199254740991, type: [{ code: "Coding" }] }, text: { type: [{ code: "string" }] } } }, Coding: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, system: { type: [{ code: "uri" }] }, version: { type: [{ code: "string" }] }, code: { type: [{ code: "code" }] }, display: { type: [{ code: "string" }] }, userSelected: { type: [{ code: "boolean" }] } } }, ContactDetail: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, name: { type: [{ code: "string" }] }, telecom: { max: 9007199254740991, type: [{ code: "ContactPoint" }] } } }, ContactPoint: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, system: { type: [{ code: "code" }] }, value: { type: [{ code: "string" }] }, use: { type: [{ code: "code" }] }, rank: { type: [{ code: "positiveInt" }] }, period: { type: [{ code: "Period" }] } } }, Contributor: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, name: { min: 1, type: [{ code: "string" }] }, contact: { max: 9007199254740991, type: [{ code: "ContactDetail" }] } } }, Count: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, DataRequirement: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, profile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] }, "subject[x]": { type: [{ code: "CodeableConcept" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Group"] }] }, mustSupport: { max: 9007199254740991, type: [{ code: "string" }] }, codeFilter: { max: 9007199254740991, type: [{ code: "DataRequirementCodeFilter" }] }, dateFilter: { max: 9007199254740991, type: [{ code: "DataRequirementDateFilter" }] }, limit: { type: [{ code: "positiveInt" }] }, sort: { max: 9007199254740991, type: [{ code: "DataRequirementSort" }] } } }, DataRequirementCodeFilter: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { type: [{ code: "string" }] }, searchParam: { type: [{ code: "string" }] }, valueSet: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/ValueSet"] }] }, code: { max: 9007199254740991, type: [{ code: "Coding" }] } } }, DataRequirementDateFilter: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { type: [{ code: "string" }] }, searchParam: { type: [{ code: "string" }] }, "value[x]": { type: [{ code: "dateTime" }, { code: "Period" }, { code: "Duration" }] } } }, DataRequirementSort: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, direction: { min: 1, type: [{ code: "code" }] } } }, Distance: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Dosage: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, sequence: { type: [{ code: "integer" }] }, text: { type: [{ code: "string" }] }, additionalInstruction: { max: 9007199254740991, type: [{ code: "CodeableConcept" }] }, patientInstruction: { type: [{ code: "string" }] }, timing: { type: [{ code: "Timing" }] }, "asNeeded[x]": { type: [{ code: "boolean" }, { code: "CodeableConcept" }] }, site: { type: [{ code: "CodeableConcept" }] }, route: { type: [{ code: "CodeableConcept" }] }, method: { type: [{ code: "CodeableConcept" }] }, doseAndRate: { max: 9007199254740991, type: [{ code: "DosageDoseAndRate" }] }, maxDosePerPeriod: { type: [{ code: "Ratio" }] }, maxDosePerAdministration: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, maxDosePerLifetime: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, DosageDoseAndRate: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { type: [{ code: "CodeableConcept" }] }, "dose[x]": { type: [{ code: "Range" }, { code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, "rate[x]": { type: [{ code: "Ratio" }, { code: "Range" }, { code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, Duration: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, ElementDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, representation: { max: 9007199254740991, type: [{ code: "code" }] }, sliceName: { type: [{ code: "string" }] }, sliceIsConstraining: { type: [{ code: "boolean" }] }, label: { type: [{ code: "string" }] }, code: { max: 9007199254740991, type: [{ code: "Coding" }] }, slicing: { type: [{ code: "ElementDefinitionSlicing" }] }, short: { type: [{ code: "string" }] }, definition: { type: [{ code: "markdown" }] }, comment: { type: [{ code: "markdown" }] }, requirements: { type: [{ code: "markdown" }] }, alias: { max: 9007199254740991, type: [{ code: "string" }] }, min: { type: [{ code: "unsignedInt" }] }, max: { type: [{ code: "string" }] }, base: { type: [{ code: "ElementDefinitionBase" }] }, contentReference: { type: [{ code: "uri" }] }, type: { max: 9007199254740991, type: [{ code: "ElementDefinitionType" }] }, "defaultValue[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, meaningWhenMissing: { type: [{ code: "markdown" }] }, orderMeaning: { type: [{ code: "string" }] }, "fixed[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, "pattern[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, example: { max: 9007199254740991, type: [{ code: "ElementDefinitionExample" }] }, "minValue[x]": { type: [{ code: "date" }, { code: "dateTime" }, { code: "instant" }, { code: "time" }, { code: "decimal" }, { code: "integer" }, { code: "positiveInt" }, { code: "unsignedInt" }, { code: "Quantity" }] }, "maxValue[x]": { type: [{ code: "date" }, { code: "dateTime" }, { code: "instant" }, { code: "time" }, { code: "decimal" }, { code: "integer" }, { code: "positiveInt" }, { code: "unsignedInt" }, { code: "Quantity" }] }, maxLength: { type: [{ code: "integer" }] }, condition: { max: 9007199254740991, type: [{ code: "id" }] }, constraint: { max: 9007199254740991, type: [{ code: "ElementDefinitionConstraint" }] }, mustSupport: { type: [{ code: "boolean" }] }, isModifier: { type: [{ code: "boolean" }] }, isModifierReason: { type: [{ code: "string" }] }, isSummary: { type: [{ code: "boolean" }] }, binding: { type: [{ code: "ElementDefinitionBinding" }] }, mapping: { max: 9007199254740991, type: [{ code: "ElementDefinitionMapping" }] } } }, ElementDefinitionSlicingDiscriminator: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, path: { min: 1, type: [{ code: "string" }] } } }, ElementDefinitionSlicing: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, discriminator: { max: 9007199254740991, type: [{ code: "ElementDefinitionSlicingDiscriminator" }] }, description: { type: [{ code: "string" }] }, ordered: { type: [{ code: "boolean" }] }, rules: { min: 1, type: [{ code: "code" }] } } }, ElementDefinitionBase: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, min: { min: 1, type: [{ code: "unsignedInt" }] }, max: { min: 1, type: [{ code: "string" }] } } }, ElementDefinitionType: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, code: { min: 1, type: [{ code: "uri" }] }, profile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition", "http://hl7.org/fhir/StructureDefinition/ImplementationGuide"] }] }, targetProfile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition", "http://hl7.org/fhir/StructureDefinition/ImplementationGuide"] }] }, aggregation: { max: 9007199254740991, type: [{ code: "code" }] }, versioning: { type: [{ code: "code" }] } } }, ElementDefinitionExample: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, label: { min: 1, type: [{ code: "string" }] }, "value[x]": { min: 1, type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] } } }, ElementDefinitionConstraint: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, key: { min: 1, type: [{ code: "id" }] }, requirements: { type: [{ code: "string" }] }, severity: { min: 1, type: [{ code: "code" }] }, human: { min: 1, type: [{ code: "string" }] }, expression: { type: [{ code: "string" }] }, xpath: { type: [{ code: "string" }] }, source: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] } } }, ElementDefinitionBinding: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, strength: { min: 1, type: [{ code: "code" }] }, description: { type: [{ code: "string" }] }, valueSet: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/ValueSet"] }] } } }, ElementDefinitionMapping: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, identity: { min: 1, type: [{ code: "id" }] }, language: { type: [{ code: "code" }] }, map: { min: 1, type: [{ code: "string" }] }, comment: { type: [{ code: "string" }] } } }, Expression: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, description: { type: [{ code: "string" }] }, name: { type: [{ code: "id" }] }, language: { min: 1, type: [{ code: "code" }] }, expression: { type: [{ code: "string" }] }, reference: { type: [{ code: "uri" }] } } }, Extension: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, url: { min: 1, type: [{ code: "uri" }] }, "value[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] } } }, HumanName: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, text: { type: [{ code: "string" }] }, family: { type: [{ code: "string" }] }, given: { max: 9007199254740991, type: [{ code: "string" }] }, prefix: { max: 9007199254740991, type: [{ code: "string" }] }, suffix: { max: 9007199254740991, type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] } } }, Identifier: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, type: { type: [{ code: "CodeableConcept" }] }, system: { type: [{ code: "uri" }] }, value: { type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] }, assigner: { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Organization"] }] } } }, MarketingStatus: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, country: { min: 1, type: [{ code: "CodeableConcept" }] }, jurisdiction: { type: [{ code: "CodeableConcept" }] }, status: { min: 1, type: [{ code: "CodeableConcept" }] }, dateRange: { min: 1, type: [{ code: "Period" }] }, restoreDate: { type: [{ code: "dateTime" }] } } }, Meta: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, versionId: { type: [{ code: "id" }] }, lastUpdated: { type: [{ code: "instant" }] }, source: { type: [{ code: "uri" }] }, profile: { max: 9007199254740991, type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] }, security: { max: 9007199254740991, type: [{ code: "Coding" }] }, tag: { max: 9007199254740991, type: [{ code: "Coding" }] }, project: { type: [{ code: "uri" }] }, author: { type: [{ code: "Reference" }] }, onBehalfOf: { type: [{ code: "Reference" }] }, account: { type: [{ code: "Reference" }] }, accounts: { max: 9007199254740991, type: [{ code: "Reference" }] }, compartment: { max: 9007199254740991, type: [{ code: "Reference" }] } } }, Money: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, currency: { type: [{ code: "code" }] } } }, Narrative: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, status: { min: 1, type: [{ code: "code" }] }, div: { min: 1, type: [{ code: "xhtml" }] } } }, ParameterDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, name: { type: [{ code: "code" }] }, use: { min: 1, type: [{ code: "code" }] }, min: { type: [{ code: "integer" }] }, max: { type: [{ code: "string" }] }, documentation: { type: [{ code: "string" }] }, type: { min: 1, type: [{ code: "code" }] }, profile: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] } } }, Period: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, start: { type: [{ code: "dateTime" }] }, end: { type: [{ code: "dateTime" }] } } }, Population: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "age[x]": { type: [{ code: "Range" }, { code: "CodeableConcept" }] }, gender: { type: [{ code: "CodeableConcept" }] }, race: { type: [{ code: "CodeableConcept" }] }, physiologicalCondition: { type: [{ code: "CodeableConcept" }] } } }, ProdCharacteristic: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, height: { type: [{ code: "Quantity" }] }, width: { type: [{ code: "Quantity" }] }, depth: { type: [{ code: "Quantity" }] }, weight: { type: [{ code: "Quantity" }] }, nominalVolume: { type: [{ code: "Quantity" }] }, externalDiameter: { type: [{ code: "Quantity" }] }, shape: { type: [{ code: "string" }] }, color: { max: 9007199254740991, type: [{ code: "string" }] }, imprint: { max: 9007199254740991, type: [{ code: "string" }] }, image: { max: 9007199254740991, type: [{ code: "Attachment" }] }, scoring: { type: [{ code: "CodeableConcept" }] } } }, ProductShelfLife: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, identifier: { type: [{ code: "Identifier" }] }, type: { min: 1, type: [{ code: "CodeableConcept" }] }, period: { min: 1, type: [{ code: "Quantity" }] }, specialPrecautionsForStorage: { max: 9007199254740991, type: [{ code: "CodeableConcept" }] } } }, Quantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Range: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, low: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, high: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, Ratio: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, numerator: { type: [{ code: "Quantity" }] }, denominator: { type: [{ code: "Quantity" }] } } }, Reference: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, reference: { type: [{ code: "string" }] }, type: { type: [{ code: "uri" }] }, identifier: { type: [{ code: "Identifier" }] }, display: { type: [{ code: "string" }] } } }, RelatedArtifact: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, label: { type: [{ code: "string" }] }, display: { type: [{ code: "string" }] }, citation: { type: [{ code: "markdown" }] }, url: { type: [{ code: "url" }] }, document: { type: [{ code: "Attachment" }] }, resource: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Resource"] }] } } }, SampledData: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, origin: { min: 1, type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, period: { min: 1, type: [{ code: "decimal" }] }, factor: { type: [{ code: "decimal" }] }, lowerLimit: { type: [{ code: "decimal" }] }, upperLimit: { type: [{ code: "decimal" }] }, dimensions: { min: 1, type: [{ code: "positiveInt" }] }, data: { type: [{ code: "string" }] } } }, Signature: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, max: 9007199254740991, type: [{ code: "Coding" }] }, when: { min: 1, type: [{ code: "instant" }] }, who: { min: 1, type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization"] }] }, onBehalfOf: { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization"] }] }, targetFormat: { type: [{ code: "code" }] }, sigFormat: { type: [{ code: "code" }] }, data: { type: [{ code: "base64Binary" }] } } }, SubstanceAmount: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "amount[x]": { type: [{ code: "Quantity" }, { code: "Range" }, { code: "string" }] }, amountType: { type: [{ code: "CodeableConcept" }] }, amountText: { type: [{ code: "string" }] }, referenceRange: { type: [{ code: "SubstanceAmountReferenceRange" }] } } }, SubstanceAmountReferenceRange: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, lowLimit: { type: [{ code: "Quantity" }] }, highLimit: { type: [{ code: "Quantity" }] } } }, Timing: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, modifierExtension: { max: 9007199254740991, type: [{ code: "Extension" }] }, event: { max: 9007199254740991, type: [{ code: "dateTime" }] }, repeat: { type: [{ code: "TimingRepeat" }] }, code: { type: [{ code: "CodeableConcept" }] } } }, TimingRepeat: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, "bounds[x]": { type: [{ code: "Duration" }, { code: "Range" }, { code: "Period" }] }, count: { type: [{ code: "positiveInt" }] }, countMax: { type: [{ code: "positiveInt" }] }, duration: { type: [{ code: "decimal" }] }, durationMax: { type: [{ code: "decimal" }] }, durationUnit: { type: [{ code: "code" }] }, frequency: { type: [{ code: "positiveInt" }] }, frequencyMax: { type: [{ code: "positiveInt" }] }, period: { type: [{ code: "decimal" }] }, periodMax: { type: [{ code: "decimal" }] }, periodUnit: { type: [{ code: "code" }] }, dayOfWeek: { max: 9007199254740991, type: [{ code: "code" }] }, timeOfDay: { max: 9007199254740991, type: [{ code: "time" }] }, when: { max: 9007199254740991, type: [{ code: "code" }] }, offset: { type: [{ code: "unsignedInt" }] } } }, TriggerDefinition: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, name: { type: [{ code: "string" }] }, "timing[x]": { type: [{ code: "Timing" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Schedule"] }, { code: "date" }, { code: "dateTime" }] }, data: { max: 9007199254740991, type: [{ code: "DataRequirement" }] }, condition: { type: [{ code: "Expression" }] } } }, UsageContext: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, code: { min: 1, type: [{ code: "Coding" }] }, "value[x]": { min: 1, type: [{ code: "CodeableConcept" }, { code: "Quantity" }, { code: "Range" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/PlanDefinition", "http://hl7.org/fhir/StructureDefinition/ResearchStudy", "http://hl7.org/fhir/StructureDefinition/InsurancePlan", "http://hl7.org/fhir/StructureDefinition/HealthcareService", "http://hl7.org/fhir/StructureDefinition/Group", "http://hl7.org/fhir/StructureDefinition/Location", "http://hl7.org/fhir/StructureDefinition/Organization"] }] } } }, MoneyQuantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, SimpleQuantity: { elements: { id: { type: [{ code: "string" }] }, extension: { max: 9007199254740991, type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { max: 0, type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, IdentityProvider: { elements: { authorizeUrl: { min: 1, type: [{ code: "string" }] }, tokenUrl: { min: 1, type: [{ code: "string" }] }, tokenAuthMethod: { type: [{ code: "code" }] }, userInfoUrl: { min: 1, type: [{ code: "string" }] }, clientId: { min: 1, type: [{ code: "string" }] }, clientSecret: { min: 1, type: [{ code: "string" }] }, usePkce: { type: [{ code: "boolean" }] }, useSubject: { type: [{ code: "boolean" }] } } } };
@@ -67831,7 +67831,7 @@ var Er = class {
67831
67831
  if (e.sliceName) this.parseSliceStart(e);
67832
67832
  else if (e.id?.includes(":")) {
67833
67833
  if (this.slicingContext?.current) {
67834
- let t = Sr(e, this.slicingContext.path);
67834
+ let t = br(e, this.slicingContext.path);
67835
67835
  this.slicingContext.current.elements[t] = this.parseElementDefinition(e);
67836
67836
  }
67837
67837
  } else {
@@ -67840,13 +67840,13 @@ var Er = class {
67840
67840
  let n = this.backboneContext;
67841
67841
  for (; n; ) {
67842
67842
  if (e.path?.startsWith(n.path + ".")) {
67843
- n.type.elements[Sr(e, n.path)] = t;
67843
+ n.type.elements[br(e, n.path)] = t;
67844
67844
  break;
67845
67845
  }
67846
67846
  n = n.parent;
67847
67847
  }
67848
67848
  if (!n) {
67849
- let i = Sr(e, this.root.path);
67849
+ let i = br(e, this.root.path);
67850
67850
  e.isSummary && this.resourceSchema.summaryProperties?.add(i.replace("[x]", "")), t.min > 0 && this.resourceSchema.mandatoryProperties?.add(i.replace("[x]", "")), this.resourceSchema.elements[i] = t;
67851
67851
  }
67852
67852
  this.checkFieldExit(e);
@@ -67905,13 +67905,13 @@ var Er = class {
67905
67905
  }
67906
67906
  parseElementDefinition(e) {
67907
67907
  let t = jn(e.max), n = e.base?.max ? jn(e.base.max) : t, i = { type: "ElementDefinition", value: e };
67908
- return { description: e.definition || "", path: e.path || e.base?.path || "", min: e.min ?? 0, max: t, isArray: n > 1, constraints: (e.constraint ?? []).map((o2) => ({ key: o2.key ?? "", severity: o2.severity ?? "error", expression: o2.expression ?? "", description: o2.human ?? "" })), type: this.parseElementDefinitionType(e), fixed: $n(V(i, "fixed[x]")), pattern: $n(V(i, "pattern[x]")), binding: e.binding };
67908
+ return { description: e.definition || "", path: e.path || e.base?.path || "", min: e.min ?? 0, max: t, isArray: n > 1, constraints: (e.constraint ?? []).map((o2) => ({ key: o2.key ?? "", severity: o2.severity ?? "error", expression: o2.expression ?? "", description: o2.human ?? "" })), type: this.parseElementDefinitionType(e), fixed: $n(D(i, "fixed[x]")), pattern: $n(D(i, "pattern[x]")), binding: e.binding };
67909
67909
  }
67910
67910
  };
67911
67911
  function jn(r6) {
67912
67912
  return r6 === "*" ? Number.POSITIVE_INFINITY : Number.parseInt(r6, 10);
67913
67913
  }
67914
- function Sr(r6, e = "") {
67914
+ function br(r6, e = "") {
67915
67915
  return Fo(r6.path, e);
67916
67916
  }
67917
67917
  function Fo(r6, e) {
@@ -67931,23 +67931,23 @@ function Uo(r6) {
67931
67931
  let e = r6.description;
67932
67932
  return e?.startsWith(`Base StructureDefinition for ${r6.name} Type: `) && (e = e.substring(`Base StructureDefinition for ${r6.name} Type: `.length)), e;
67933
67933
  }
67934
- function Vr(r6, e, t) {
67934
+ function Dr(r6, e, t) {
67935
67935
  let n = r6.path;
67936
- return Bo(V(r6, e, t), n, e);
67936
+ return Bo(D(r6, e, t), n, e);
67937
67937
  }
67938
67938
  function Bo(r6, e, t) {
67939
67939
  let n = e ? e + "." : "";
67940
67940
  return r6 === void 0 ? { type: "undefined", value: void 0, path: `${n}${t}` } : Array.isArray(r6) ? r6.map((i, o2) => ({ ...i, path: `${n}${t}[${o2}]` })) : { ...r6, path: `${n}${t}` };
67941
67941
  }
67942
- var qo = new Ve(1e3);
67942
+ var qo = new De(1e3);
67943
67943
  var xt = { canonical: /^\S*$/, code: /^[^\s]+( [^\s]+)*$/, date: /^(\d(\d(\d[1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2]\d|3[0-1]))?)?$/, dateTime: /^(\d(\d(\d[1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2]\d|3[0-1])(T([01]\d|2[0-3])(:[0-5]\d:([0-5]\d|60)(\.\d{1,9})?)?)?)?(Z|[+-]((0\d|1[0-3]):[0-5]\d|14:00)?)?)?$/, id: /^[A-Za-z0-9\-.]{1,64}$/, instant: /^(\d(\d(\d[1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])T([01]\d|2[0-3]):[0-5]\d:([0-5]\d|60)(\.\d{1,9})?(Z|[+-]((0\d|1[0-3]):[0-5]\d|14:00))$/, markdown: /^[\r\n\t\u0020-\uFFFF]+$/, oid: /^urn:oid:[0-2](\.(0|[1-9]\d*))+$/, string: /^[\r\n\t\u0020-\uFFFF]+$/, time: /^([01]\d|2[0-3]):[0-5]\d:([0-5]\d|60)(\.\d{1,9})?$/, uri: /^\S*$/, url: /^\S*$/, uuid: /^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/, xhtml: /.*/ };
67944
- function h(r6) {
67944
+ function m(r6) {
67945
67945
  return [{ type: d.boolean, value: r6 }];
67946
67946
  }
67947
- function b(r6) {
67947
+ function S(r6) {
67948
67948
  return r6 == null ? { type: "undefined", value: void 0 } : Number.isSafeInteger(r6) ? { type: d.integer, value: r6 } : typeof r6 == "number" ? { type: d.decimal, value: r6 } : typeof r6 == "boolean" ? { type: d.boolean, value: r6 } : typeof r6 == "string" ? { type: d.string, value: r6 } : I(r6) ? { type: d.Quantity, value: r6 } : k(r6) ? { type: r6.resourceType, value: r6 } : Wr(r6) ? { type: d.CodeableConcept, value: r6 } : qr(r6) ? { type: d.Coding, value: r6 } : { type: d.BackboneElement, value: r6 };
67949
67949
  }
67950
- function U(r6) {
67950
+ function B(r6) {
67951
67951
  return r6.length === 0 ? false : !!r6[0].value;
67952
67952
  }
67953
67953
  function J(r6, e) {
@@ -67956,7 +67956,7 @@ function J(r6, e) {
67956
67956
  throw new Error(`Expected singleton of type ${e}, but found ${JSON.stringify(r6)}`);
67957
67957
  }
67958
67958
  }
67959
- function V(r6, e, t) {
67959
+ function D(r6, e, t) {
67960
67960
  if (!r6.value) return;
67961
67961
  let n = Et(r6.type, e, t?.profileUrl);
67962
67962
  return n ? Yo(r6, e, n) : Xo(r6, e);
@@ -67990,7 +67990,7 @@ function Xo(r6, e) {
67990
67990
  let n;
67991
67991
  if (e in t) {
67992
67992
  let i = t[e];
67993
- Array.isArray(i) ? n = i.map(b) : n = b(i);
67993
+ Array.isArray(i) ? n = i.map(S) : n = S(i);
67994
67994
  } else {
67995
67995
  let i = e.endsWith("[x]") ? e.substring(0, e.length - 3) : e;
67996
67996
  for (let o2 of Object.values(d)) {
@@ -68011,7 +68011,7 @@ function Tt(r6) {
68011
68011
  let e = [];
68012
68012
  for (let t of r6) {
68013
68013
  let n = false;
68014
- for (let i of e) if (U(Je(t, i))) {
68014
+ for (let i of e) if (B(Je(t, i))) {
68015
68015
  n = true;
68016
68016
  break;
68017
68017
  }
@@ -68020,30 +68020,30 @@ function Tt(r6) {
68020
68020
  return e;
68021
68021
  }
68022
68022
  function ei(r6) {
68023
- return h(!U(r6));
68023
+ return m(!B(r6));
68024
68024
  }
68025
68025
  function ti(r6, e) {
68026
- return r6.length === 0 || e.length === 0 ? [] : r6.length !== e.length ? h(false) : h(r6.every((t, n) => U(Je(t, e[n]))));
68026
+ return r6.length === 0 || e.length === 0 ? [] : r6.length !== e.length ? m(false) : m(r6.every((t, n) => B(Je(t, e[n]))));
68027
68027
  }
68028
68028
  function ri(r6, e) {
68029
- return r6.length === 0 || e.length === 0 ? [] : r6.length !== e.length ? h(true) : h(r6.some((t, n) => !U(Je(t, e[n]))));
68029
+ return r6.length === 0 || e.length === 0 ? [] : r6.length !== e.length ? m(true) : m(r6.some((t, n) => !B(Je(t, e[n]))));
68030
68030
  }
68031
68031
  function Je(r6, e) {
68032
68032
  let t = r6.value?.valueOf(), n = e.value?.valueOf();
68033
- return typeof t == "number" && typeof n == "number" ? h(Math.abs(t - n) < 1e-8) : I(t) && I(n) ? h(oi(t, n)) : h(typeof t == "object" && typeof n == "object" ? Br(r6, e) : t === n);
68033
+ return typeof t == "number" && typeof n == "number" ? m(Math.abs(t - n) < 1e-8) : I(t) && I(n) ? m(oi(t, n)) : m(typeof t == "object" && typeof n == "object" ? Br(r6, e) : t === n);
68034
68034
  }
68035
68035
  function Ur(r6, e) {
68036
- return r6.length === 0 && e.length === 0 ? h(true) : r6.length !== e.length ? h(false) : (r6.sort(Xn), e.sort(Xn), h(r6.every((t, n) => U(Zo(t, e[n])))));
68036
+ return r6.length === 0 && e.length === 0 ? m(true) : r6.length !== e.length ? m(false) : (r6.sort(Xn), e.sort(Xn), m(r6.every((t, n) => B(Zo(t, e[n])))));
68037
68037
  }
68038
68038
  function Zo(r6, e) {
68039
68039
  let { type: t, value: n } = r6, { type: i, value: o2 } = e, s = n?.valueOf(), a = o2?.valueOf();
68040
- return typeof s == "number" && typeof a == "number" ? h(Math.abs(s - a) < 0.01) : I(s) && I(a) ? h(oi(s, a)) : h(t === "Coding" && i === "Coding" ? typeof s != "object" || typeof a != "object" ? false : s.code === a.code && s.system === a.system : typeof s == "object" && typeof a == "object" ? Br({ ...s, id: void 0 }, { ...a, id: void 0 }) : typeof s == "string" && typeof a == "string" ? s.toLowerCase() === a.toLowerCase() : s === a);
68040
+ return typeof s == "number" && typeof a == "number" ? m(Math.abs(s - a) < 0.01) : I(s) && I(a) ? m(oi(s, a)) : m(t === "Coding" && i === "Coding" ? typeof s != "object" || typeof a != "object" ? false : s.code === a.code && s.system === a.system : typeof s == "object" && typeof a == "object" ? Br({ ...s, id: void 0 }, { ...a, id: void 0 }) : typeof s == "string" && typeof a == "string" ? s.toLowerCase() === a.toLowerCase() : s === a);
68041
68041
  }
68042
68042
  function Xn(r6, e) {
68043
68043
  let t = r6.value?.valueOf(), n = e.value?.valueOf();
68044
68044
  return typeof t == "number" && typeof n == "number" ? t - n : typeof t == "string" && typeof n == "string" ? t.localeCompare(n) : 0;
68045
68045
  }
68046
- function bt(r6, e) {
68046
+ function St(r6, e) {
68047
68047
  let { value: t } = r6;
68048
68048
  if (t == null) return false;
68049
68049
  let n = e;
@@ -68109,16 +68109,16 @@ function es(r6, e) {
68109
68109
  function Ye(r6, e) {
68110
68110
  return k(r6, e) && "id" in r6 && typeof r6.id == "string";
68111
68111
  }
68112
- function be(r6) {
68112
+ function Se(r6) {
68113
68113
  let e = A(r6) ?? "undefined/undefined", t = rs(r6);
68114
68114
  return t === e ? { reference: e } : { reference: e, display: t };
68115
68115
  }
68116
68116
  function A(r6) {
68117
- if (H(r6)) return r6.reference;
68117
+ if (G(r6)) return r6.reference;
68118
68118
  if (Ye(r6)) return `${r6.resourceType}/${r6.id}`;
68119
68119
  }
68120
- function Se(r6) {
68121
- if (r6) return H(r6) ? r6.reference.split("/")[1] : r6.id;
68120
+ function be(r6) {
68121
+ if (r6) return G(r6) ? r6.reference.split("/")[1] : r6.id;
68122
68122
  }
68123
68123
  function ts(r6) {
68124
68124
  return r6.resourceType === "Patient" || r6.resourceType === "Practitioner" || r6.resourceType === "RelatedPerson";
@@ -68283,11 +68283,11 @@ function zr(r6) {
68283
68283
  function vs(r6) {
68284
68284
  return r6.startsWith("/") ? r6.slice(1) : r6;
68285
68285
  }
68286
- function G(r6, e) {
68286
+ function L(r6, e) {
68287
68287
  return new URL(vs(e), zr(r6.toString())).toString();
68288
68288
  }
68289
68289
  function gi(r6, e) {
68290
- return G(r6, e).toString().replace("http://", "ws://").replace("https://", "wss://");
68290
+ return L(r6, e).toString().replace("http://", "ws://").replace("https://", "wss://");
68291
68291
  }
68292
68292
  function xi(r6) {
68293
68293
  return typeof r6 == "object" && !Array.isArray(r6) && !(r6 instanceof URLSearchParams) && (r6 = Object.fromEntries(Object.entries(r6).filter((e) => e[1] !== void 0))), new URLSearchParams(r6).toString();
@@ -68328,8 +68328,8 @@ function Kn(r6) {
68328
68328
  for (let t of e) t?.resourceType === "StructureDefinition" && t.kind === "resource" && Ei(t.type);
68329
68329
  }
68330
68330
  function Ei(r6) {
68331
- let e = B.types[r6];
68332
- return e || (e = { searchParamsDetails: {} }, B.types[r6] = e), !e.searchParams && r6 !== "Binary" && (e.searchParams = { _id: { base: [r6], code: "_id", type: "token", expression: r6 + ".id" }, _lastUpdated: { base: [r6], code: "_lastUpdated", type: "date", expression: r6 + ".meta.lastUpdated" }, _compartment: { base: [r6], code: "_compartment", type: "reference", expression: r6 + ".meta.compartment" }, _profile: { base: [r6], code: "_profile", type: "uri", expression: r6 + ".meta.profile" }, _security: { base: [r6], code: "_security", type: "token", expression: r6 + ".meta.security" }, _source: { base: [r6], code: "_source", type: "uri", expression: r6 + ".meta.source" }, _tag: { base: [r6], code: "_tag", type: "token", expression: r6 + ".meta.tag" } }), e;
68331
+ let e = q.types[r6];
68332
+ return e || (e = { searchParamsDetails: {} }, q.types[r6] = e), !e.searchParams && r6 !== "Binary" && (e.searchParams = { _id: { base: [r6], code: "_id", type: "token", expression: r6 + ".id" }, _lastUpdated: { base: [r6], code: "_lastUpdated", type: "date", expression: r6 + ".meta.lastUpdated" }, _compartment: { base: [r6], code: "_compartment", type: "reference", expression: r6 + ".meta.compartment" }, _profile: { base: [r6], code: "_profile", type: "uri", expression: r6 + ".meta.profile" }, _security: { base: [r6], code: "_security", type: "token", expression: r6 + ".meta.security" }, _source: { base: [r6], code: "_source", type: "uri", expression: r6 + ".meta.source" }, _tag: { base: [r6], code: "_tag", type: "token", expression: r6 + ".meta.tag" } }), e;
68333
68333
  }
68334
68334
  function Kr(r6) {
68335
68335
  for (let e of r6.base ?? g) {
@@ -68362,10 +68362,10 @@ function _s(r6, e) {
68362
68362
  function k(r6, e) {
68363
68363
  return !(!r6 || typeof r6 != "object" || !("resourceType" in r6) || e && r6.resourceType !== e);
68364
68364
  }
68365
- function H(r6, e) {
68365
+ function G(r6, e) {
68366
68366
  return r6 && typeof r6 == "object" && "reference" in r6 && typeof r6.reference == "string" ? e ? r6.reference.match(new RegExp(`^${e}(/|\\?)`)) !== null : true : false;
68367
68367
  }
68368
- var B = { types: {} };
68368
+ var q = { types: {} };
68369
68369
  function qe(r6) {
68370
68370
  if (r6.startsWith("T")) return r6 + "T00:00:00.000Z".substring(r6.length);
68371
68371
  if (r6.length <= 10) return r6;
@@ -68376,30 +68376,30 @@ function qe(r6) {
68376
68376
  }
68377
68377
  }
68378
68378
  var ne = () => [];
68379
- var D = { empty: (r6, e) => h(e.every((t) => C(t.value))), hasValue: (r6, e) => h(e.length !== 0), exists: (r6, e, t) => t ? h(e.some((n) => U(t.eval(r6, [n])))) : h(e.length > 0 && e.every((n) => !C(n.value))), all: (r6, e, t) => h(e.every((n) => U(t.eval(r6, [n])))), allTrue: (r6, e) => {
68380
- for (let t of e) if (!t.value) return h(false);
68381
- return h(true);
68379
+ var V = { empty: (r6, e) => m(e.every((t) => C(t.value))), hasValue: (r6, e) => m(e.length !== 0), exists: (r6, e, t) => t ? m(e.some((n) => B(t.eval(r6, [n])))) : m(e.length > 0 && e.every((n) => !C(n.value))), all: (r6, e, t) => m(e.every((n) => B(t.eval(r6, [n])))), allTrue: (r6, e) => {
68380
+ for (let t of e) if (!t.value) return m(false);
68381
+ return m(true);
68382
68382
  }, anyTrue: (r6, e) => {
68383
- for (let t of e) if (t.value) return h(true);
68384
- return h(false);
68383
+ for (let t of e) if (t.value) return m(true);
68384
+ return m(false);
68385
68385
  }, allFalse: (r6, e) => {
68386
- for (let t of e) if (t.value) return h(false);
68387
- return h(true);
68386
+ for (let t of e) if (t.value) return m(false);
68387
+ return m(true);
68388
68388
  }, anyFalse: (r6, e) => {
68389
- for (let t of e) if (!t.value) return h(true);
68390
- return h(false);
68389
+ for (let t of e) if (!t.value) return m(true);
68390
+ return m(false);
68391
68391
  }, subsetOf: (r6, e, t) => {
68392
- if (e.length === 0) return h(true);
68392
+ if (e.length === 0) return m(true);
68393
68393
  let n = t.eval(r6, Ce(r6));
68394
- return n.length === 0 ? h(false) : h(e.every((i) => n.some((o2) => o2.value === i.value)));
68394
+ return n.length === 0 ? m(false) : m(e.every((i) => n.some((o2) => o2.value === i.value)));
68395
68395
  }, supersetOf: (r6, e, t) => {
68396
68396
  let n = t.eval(r6, Ce(r6));
68397
- return n.length === 0 ? h(true) : e.length === 0 ? h(false) : h(n.every((i) => e.some((o2) => o2.value === i.value)));
68397
+ return n.length === 0 ? m(true) : e.length === 0 ? m(false) : m(n.every((i) => e.some((o2) => o2.value === i.value)));
68398
68398
  }, count: (r6, e) => [{ type: d.integer, value: e.length }], distinct: (r6, e) => {
68399
68399
  let t = [];
68400
68400
  for (let n of e) t.some((i) => i.value === n.value) || t.push(n);
68401
68401
  return t;
68402
- }, isDistinct: (r6, e) => h(e.length === D.distinct(r6, e).length), where: (r6, e, t) => e.filter((n) => U(t.eval(r6, [n]))), select: (r6, e, t) => e.flatMap((n) => t.eval({ parent: r6, variables: { $this: n } }, [n])), repeat: ne, ofType: (r6, e, t) => e.filter((n) => n.type === t.name), single: (r6, e) => {
68402
+ }, isDistinct: (r6, e) => m(e.length === V.distinct(r6, e).length), where: (r6, e, t) => e.filter((n) => B(t.eval(r6, [n]))), select: (r6, e, t) => e.flatMap((n) => t.eval({ parent: r6, variables: { $this: n } }, [n])), repeat: ne, ofType: (r6, e, t) => e.filter((n) => n.type === t.name), single: (r6, e) => {
68403
68403
  if (e.length > 1) throw new Error("Expected input length one for single()");
68404
68404
  return e.length === 0 ? [] : e.slice(0, 1);
68405
68405
  }, first: (r6, e) => e.length === 0 ? [] : e.slice(0, 1), last: (r6, e) => e.length === 0 ? [] : e.slice(-1, e.length), tail: (r6, e) => e.length === 0 ? [] : e.slice(1, e.length), skip: (r6, e, t) => {
@@ -68428,46 +68428,46 @@ var D = { empty: (r6, e) => h(e.every((t) => C(t.value))), hasValue: (r6, e) =>
68428
68428
  if (!t) return e;
68429
68429
  let n = t.eval(r6, Ce(r6));
68430
68430
  return [...e, ...n];
68431
- }, htmlChecks: (r6, e, t) => [b(true)], iif: (r6, e, t, n, i) => {
68431
+ }, htmlChecks: (r6, e, t) => [S(true)], iif: (r6, e, t, n, i) => {
68432
68432
  let o2 = t.eval(r6, e);
68433
68433
  if (o2.length > 1 || o2.length === 1 && typeof o2[0].value != "boolean") throw new Error("Expected criterion to evaluate to a Boolean");
68434
- return U(o2) ? n.eval(r6, e) : i ? i.eval(r6, e) : [];
68434
+ return B(o2) ? n.eval(r6, e) : i ? i.eval(r6, e) : [];
68435
68435
  }, toBoolean: (r6, e) => {
68436
68436
  if (e.length === 0) return [];
68437
68437
  let [{ value: t }] = X(e, 1);
68438
68438
  if (typeof t == "boolean") return [{ type: d.boolean, value: t }];
68439
- if (typeof t == "number" && (t === 0 || t === 1)) return h(!!t);
68439
+ if (typeof t == "number" && (t === 0 || t === 1)) return m(!!t);
68440
68440
  if (typeof t == "string") {
68441
68441
  let n = t.toLowerCase();
68442
- if (["true", "t", "yes", "y", "1", "1.0"].includes(n)) return h(true);
68443
- if (["false", "f", "no", "n", "0", "0.0"].includes(n)) return h(false);
68442
+ if (["true", "t", "yes", "y", "1", "1.0"].includes(n)) return m(true);
68443
+ if (["false", "f", "no", "n", "0", "0.0"].includes(n)) return m(false);
68444
68444
  }
68445
68445
  return [];
68446
- }, convertsToBoolean: (r6, e) => e.length === 0 ? [] : h(D.toBoolean(r6, e).length === 1), toInteger: (r6, e) => {
68446
+ }, convertsToBoolean: (r6, e) => e.length === 0 ? [] : m(V.toBoolean(r6, e).length === 1), toInteger: (r6, e) => {
68447
68447
  if (e.length === 0) return [];
68448
68448
  let [{ value: t }] = X(e, 1);
68449
68449
  return typeof t == "number" ? [{ type: d.integer, value: t }] : typeof t == "string" && /^[+-]?\d+$/.exec(t) ? [{ type: d.integer, value: Number.parseInt(t, 10) }] : typeof t == "boolean" ? [{ type: d.integer, value: t ? 1 : 0 }] : [];
68450
- }, convertsToInteger: (r6, e) => e.length === 0 ? [] : h(D.toInteger(r6, e).length === 1), toDate: (r6, e) => {
68450
+ }, convertsToInteger: (r6, e) => e.length === 0 ? [] : m(V.toInteger(r6, e).length === 1), toDate: (r6, e) => {
68451
68451
  if (e.length === 0) return [];
68452
68452
  let [{ value: t }] = X(e, 1);
68453
68453
  return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type: d.date, value: qe(t) }] : [];
68454
- }, convertsToDate: (r6, e) => e.length === 0 ? [] : h(D.toDate(r6, e).length === 1), toDateTime: (r6, e) => {
68454
+ }, convertsToDate: (r6, e) => e.length === 0 ? [] : m(V.toDate(r6, e).length === 1), toDateTime: (r6, e) => {
68455
68455
  if (e.length === 0) return [];
68456
68456
  let [{ value: t }] = X(e, 1);
68457
68457
  return typeof t == "string" && /^\d{4}(-\d{2}(-\d{2})?)?/.exec(t) ? [{ type: d.dateTime, value: qe(t) }] : [];
68458
- }, convertsToDateTime: (r6, e) => e.length === 0 ? [] : h(D.toDateTime(r6, e).length === 1), toDecimal: (r6, e) => {
68458
+ }, convertsToDateTime: (r6, e) => e.length === 0 ? [] : m(V.toDateTime(r6, e).length === 1), toDecimal: (r6, e) => {
68459
68459
  if (e.length === 0) return [];
68460
68460
  let [{ value: t }] = X(e, 1);
68461
68461
  return typeof t == "number" ? [{ type: d.decimal, value: t }] : typeof t == "string" && /^-?\d{1,9}(\.\d{1,9})?$/.exec(t) ? [{ type: d.decimal, value: Number.parseFloat(t) }] : typeof t == "boolean" ? [{ type: d.decimal, value: t ? 1 : 0 }] : [];
68462
- }, convertsToDecimal: (r6, e) => e.length === 0 ? [] : h(D.toDecimal(r6, e).length === 1), toQuantity: (r6, e) => {
68462
+ }, convertsToDecimal: (r6, e) => e.length === 0 ? [] : m(V.toDecimal(r6, e).length === 1), toQuantity: (r6, e) => {
68463
68463
  if (e.length === 0) return [];
68464
68464
  let [{ value: t }] = X(e, 1);
68465
68465
  return I(t) ? [{ type: d.Quantity, value: t }] : typeof t == "number" ? [{ type: d.Quantity, value: { value: t, unit: "1" } }] : typeof t == "string" && /^-?\d{1,9}(\.\d{1,9})?/.exec(t) ? [{ type: d.Quantity, value: { value: Number.parseFloat(t), unit: "1" } }] : typeof t == "boolean" ? [{ type: d.Quantity, value: { value: t ? 1 : 0, unit: "1" } }] : [];
68466
- }, convertsToQuantity: (r6, e) => e.length === 0 ? [] : h(D.toQuantity(r6, e).length === 1), toString: (r6, e) => {
68466
+ }, convertsToQuantity: (r6, e) => e.length === 0 ? [] : m(V.toQuantity(r6, e).length === 1), toString: (r6, e) => {
68467
68467
  if (e.length === 0) return [];
68468
68468
  let [{ value: t }] = X(e, 1);
68469
68469
  return t == null ? [] : I(t) ? [{ type: d.string, value: `${t.value} '${t.unit}'` }] : [{ type: d.string, value: t.toString() }];
68470
- }, convertsToString: (r6, e) => e.length === 0 ? [] : h(D.toString(r6, e).length === 1), toTime: (r6, e) => {
68470
+ }, convertsToString: (r6, e) => e.length === 0 ? [] : m(V.toString(r6, e).length === 1), toTime: (r6, e) => {
68471
68471
  if (e.length === 0) return [];
68472
68472
  let [{ value: t }] = X(e, 1);
68473
68473
  if (typeof t == "string") {
@@ -68475,10 +68475,10 @@ var D = { empty: (r6, e) => h(e.every((t) => C(t.value))), hasValue: (r6, e) =>
68475
68475
  if (n) return [{ type: d.time, value: qe("T" + n[1]) }];
68476
68476
  }
68477
68477
  return [];
68478
- }, convertsToTime: (r6, e) => e.length === 0 ? [] : h(D.toTime(r6, e).length === 1), indexOf: (r6, e, t) => q((n, i) => n.indexOf(i), r6, e, t), substring: (r6, e, t, n) => q((i, o2, s) => {
68478
+ }, convertsToTime: (r6, e) => e.length === 0 ? [] : m(V.toTime(r6, e).length === 1), indexOf: (r6, e, t) => W((n, i) => n.indexOf(i), r6, e, t), substring: (r6, e, t, n) => W((i, o2, s) => {
68479
68479
  let a = o2, u2 = s ? a + s : i.length;
68480
68480
  return a < 0 || a >= i.length ? void 0 : i.substring(a, u2);
68481
- }, r6, e, t, n), startsWith: (r6, e, t) => q((n, i) => n.startsWith(i), r6, e, t), endsWith: (r6, e, t) => q((n, i) => n.endsWith(i), r6, e, t), contains: (r6, e, t) => q((n, i) => n.includes(i), r6, e, t), upper: (r6, e) => q((t) => t.toUpperCase(), r6, e), lower: (r6, e) => q((t) => t.toLowerCase(), r6, e), replace: (r6, e, t, n) => q((i, o2, s) => i.replaceAll(o2, s), r6, e, t, n), matches: (r6, e, t) => q((n, i) => !!new RegExp(i).exec(n), r6, e, t), replaceMatches: (r6, e, t, n) => q((i, o2, s) => i.replaceAll(new RegExp(o2, "g"), s.replaceAll(/\$\{(\w+)\}/g, "$<$1>")), r6, e, t, n), length: (r6, e) => q((t) => t.length, r6, e), toChars: (r6, e) => q((t) => t ? t.split("") : void 0, r6, e), encode: ne, decode: ne, escape: ne, unescape: ne, trim: ne, split: ne, join: (r6, e, t) => {
68481
+ }, r6, e, t, n), startsWith: (r6, e, t) => W((n, i) => n.startsWith(i), r6, e, t), endsWith: (r6, e, t) => W((n, i) => n.endsWith(i), r6, e, t), contains: (r6, e, t) => W((n, i) => n.includes(i), r6, e, t), upper: (r6, e) => W((t) => t.toUpperCase(), r6, e), lower: (r6, e) => W((t) => t.toLowerCase(), r6, e), replace: (r6, e, t, n) => W((i, o2, s) => i.replaceAll(o2, s), r6, e, t, n), matches: (r6, e, t) => W((n, i) => !!new RegExp(i).exec(n), r6, e, t), replaceMatches: (r6, e, t, n) => W((i, o2, s) => i.replaceAll(new RegExp(o2, "g"), s.replaceAll(/\$\{(\w+)\}/g, "$<$1>")), r6, e, t, n), length: (r6, e) => W((t) => t.length, r6, e), toChars: (r6, e) => W((t) => t ? t.split("") : void 0, r6, e), encode: ne, decode: ne, escape: ne, unescape: ne, trim: ne, split: ne, join: (r6, e, t) => {
68482
68482
  let n = t?.eval(r6, Ce(r6))[0]?.value ?? "";
68483
68483
  if (typeof n != "string") throw new TypeError("Separator must be a string.");
68484
68484
  return [{ type: d.string, value: e.map((i) => i.value?.toString() ?? "").join(n) }];
@@ -68487,9 +68487,9 @@ var D = { empty: (r6, e) => h(e.every((t) => C(t.value))), hasValue: (r6, e) =>
68487
68487
  let o2 = Math.pow(10, i);
68488
68488
  return Math.round(n * o2) / o2;
68489
68489
  }, r6, e, ...t), sqrt: (r6, e) => Y(Math.sqrt, r6, e), truncate: (r6, e) => Y((t) => Math.trunc(t), r6, e), children: ne, descendants: ne, trace: (r6, e, t) => e, now: () => [{ type: d.dateTime, value: (/* @__PURE__ */ new Date()).toISOString() }], timeOfDay: () => [{ type: d.time, value: (/* @__PURE__ */ new Date()).toISOString().substring(11) }], today: () => [{ type: d.date, value: (/* @__PURE__ */ new Date()).toISOString().substring(0, 10) }], between: (r6, e, t, n, i) => {
68490
- let o2 = D.toDateTime(r6, t.eval(r6, e));
68490
+ let o2 = V.toDateTime(r6, t.eval(r6, e));
68491
68491
  if (o2.length === 0) throw new Error("Invalid start date");
68492
- let s = D.toDateTime(r6, n.eval(r6, e));
68492
+ let s = V.toDateTime(r6, n.eval(r6, e));
68493
68493
  if (s.length === 0) throw new Error("Invalid end date");
68494
68494
  let a = i.eval(r6, e)[0]?.value;
68495
68495
  if (a !== "years" && a !== "months" && a !== "days") throw new Error("Invalid units");
@@ -68497,13 +68497,13 @@ var D = { empty: (r6, e) => h(e.every((t) => C(t.value))), hasValue: (r6, e) =>
68497
68497
  return [{ type: d.Quantity, value: { value: u2[a], unit: a } }];
68498
68498
  }, is: (r6, e, t) => {
68499
68499
  let n = "";
68500
- return t instanceof L ? n = t.name : t instanceof Z && (n = t.left.name + "." + t.right.name), n ? e.map((i) => ({ type: d.boolean, value: bt(i, n) })) : [];
68501
- }, not: (r6, e) => D.toBoolean(r6, e).map((t) => ({ type: d.boolean, value: !t.value })), resolve: (r6, e) => e.map((t) => {
68500
+ return t instanceof F ? n = t.name : t instanceof Z && (n = t.left.name + "." + t.right.name), n ? e.map((i) => ({ type: d.boolean, value: St(i, n) })) : [];
68501
+ }, not: (r6, e) => V.toBoolean(r6, e).map((t) => ({ type: d.boolean, value: !t.value })), resolve: (r6, e) => e.map((t) => {
68502
68502
  let n = t.value, i;
68503
68503
  if (typeof n == "string") i = n;
68504
68504
  else if (typeof n == "object") {
68505
68505
  let o2 = n;
68506
- if (o2.resource) return b(o2.resource);
68506
+ if (o2.resource) return S(o2.resource);
68507
68507
  o2.reference ? i = o2.reference : o2.type && o2.identifier && (i = `${o2.type}?identifier=${o2.identifier.system}|${o2.identifier.value}`);
68508
68508
  }
68509
68509
  if (i?.includes("?")) {
@@ -68527,7 +68527,7 @@ var D = { empty: (r6, e) => h(e.every((t) => C(t.value))), hasValue: (r6, e) =>
68527
68527
  let n = e[0].value;
68528
68528
  if (!n?.reference) return [];
68529
68529
  let i = "";
68530
- return t instanceof L && (i = t.name), i && !n.reference.startsWith(i + "/") ? [] : [{ type: d.id, value: Se(n) }];
68530
+ return t instanceof F && (i = t.name), i && !n.reference.startsWith(i + "/") ? [] : [{ type: d.id, value: be(n) }];
68531
68531
  }, extension: (r6, e, t) => {
68532
68532
  let n = t.eval(r6, e)[0].value, i = e?.[0]?.value;
68533
68533
  if (i) {
@@ -68536,12 +68536,12 @@ var D = { empty: (r6, e) => h(e.every((t) => C(t.value))), hasValue: (r6, e) =>
68536
68536
  }
68537
68537
  return [];
68538
68538
  } };
68539
- function q(r6, e, t, ...n) {
68539
+ function W(r6, e, t, ...n) {
68540
68540
  if (t.length === 0) return [];
68541
68541
  let [{ value: i }] = X(t, 1);
68542
68542
  if (typeof i != "string") throw new TypeError("String function cannot be called with non-string");
68543
68543
  let o2 = n.map((a) => a?.eval(e, t)[0]?.value), s = r6(i, ...o2);
68544
- return s === void 0 ? [] : Array.isArray(s) ? s.map(b) : [b(s)];
68544
+ return s === void 0 ? [] : Array.isArray(s) ? s.map(S) : [S(s)];
68545
68545
  }
68546
68546
  function Y(r6, e, t, ...n) {
68547
68547
  if (t.length === 0) return [];
@@ -68560,7 +68560,7 @@ function Ce(r6) {
68560
68560
  for (; e.parent?.variables.$this; ) e = e.parent;
68561
68561
  return [e.variables.$this];
68562
68562
  }
68563
- var W = class {
68563
+ var j = class {
68564
68564
  constructor(e) {
68565
68565
  c(this, "value");
68566
68566
  this.value = e;
@@ -68573,7 +68573,7 @@ var W = class {
68573
68573
  return typeof e == "string" ? `'${e}'` : e.toString();
68574
68574
  }
68575
68575
  };
68576
- var L = class {
68576
+ var F = class {
68577
68577
  constructor(e) {
68578
68578
  c(this, "name");
68579
68579
  this.name = e;
@@ -68592,7 +68592,7 @@ var L = class {
68592
68592
  }
68593
68593
  evalValue(e) {
68594
68594
  let t = e.value;
68595
- if (!(!t || typeof t != "object")) return k(t, this.name) ? e : Vr(e, this.name);
68595
+ if (!(!t || typeof t != "object")) return k(t, this.name) ? e : Dr(e, this.name);
68596
68596
  }
68597
68597
  toString() {
68598
68598
  return this.name;
@@ -68619,12 +68619,12 @@ var Ot = class extends lt {
68619
68619
  return this.operator + this.child.toString();
68620
68620
  }
68621
68621
  };
68622
- var he = class extends ce {
68622
+ var me = class extends ce {
68623
68623
  constructor(e, t) {
68624
68624
  super("as", e, t);
68625
68625
  }
68626
68626
  eval(e, t) {
68627
- return D.ofType(e, this.left.eval(e, t), this.right);
68627
+ return V.ofType(e, this.left.eval(e, t), this.right);
68628
68628
  }
68629
68629
  };
68630
68630
  var w = class extends ce {
@@ -68641,7 +68641,7 @@ var _ = class extends w {
68641
68641
  let o2 = this.right.eval(t, n);
68642
68642
  if (o2.length !== 1) return [];
68643
68643
  let s = i[0].value, a = o2[0].value, u2 = I(s) ? s.value : s, l2 = I(a) ? a.value : a, p = this.impl(u2, l2);
68644
- return typeof p == "boolean" ? h(p) : I(s) ? [{ type: d.Quantity, value: { ...s, value: p } }] : [b(p)];
68644
+ return typeof p == "boolean" ? m(p) : I(s) ? [{ type: d.Quantity, value: { ...s, value: p } }] : [S(p)];
68645
68645
  }
68646
68646
  };
68647
68647
  var It = class extends ce {
@@ -68659,16 +68659,16 @@ var kt = class extends w {
68659
68659
  }
68660
68660
  eval(e, t) {
68661
68661
  let n = this.left.eval(e, t), i = this.right.eval(e, t);
68662
- return h(n.some((o2) => o2.value === i[0].value));
68662
+ return m(n.some((o2) => o2.value === i[0].value));
68663
68663
  }
68664
68664
  };
68665
- var Dt = class extends w {
68665
+ var Vt = class extends w {
68666
68666
  constructor(e, t) {
68667
68667
  super("in", e, t);
68668
68668
  }
68669
68669
  eval(e, t) {
68670
68670
  let n = J(this.left.eval(e, t)), i = this.right.eval(e, t);
68671
- return n ? h(i.some((o2) => Je(n, o2)[0].value)) : [];
68671
+ return n ? m(i.some((o2) => Je(n, o2)[0].value)) : [];
68672
68672
  }
68673
68673
  };
68674
68674
  var Z = class extends ce {
@@ -68691,7 +68691,7 @@ var Pe = class extends ce {
68691
68691
  return Tt([...n, ...i]);
68692
68692
  }
68693
68693
  };
68694
- var Vt = class extends w {
68694
+ var Dt = class extends w {
68695
68695
  constructor(e, t) {
68696
68696
  super("=", e, t);
68697
68697
  }
@@ -68735,7 +68735,7 @@ var Ae = class extends w {
68735
68735
  let n = this.left.eval(e, t);
68736
68736
  if (n.length !== 1) return [];
68737
68737
  let i = this.right.name;
68738
- return h(bt(n[0], i));
68738
+ return m(St(n[0], i));
68739
68739
  }
68740
68740
  };
68741
68741
  var Ft = class extends w {
@@ -68744,7 +68744,7 @@ var Ft = class extends w {
68744
68744
  }
68745
68745
  eval(e, t) {
68746
68746
  let n = J(this.left.eval(e, t), "boolean"), i = J(this.right.eval(e, t), "boolean");
68747
- return n?.value === true && i?.value === true ? h(true) : n?.value === false || i?.value === false ? h(false) : [];
68747
+ return n?.value === true && i?.value === true ? m(true) : n?.value === false || i?.value === false ? m(false) : [];
68748
68748
  }
68749
68749
  };
68750
68750
  var Nt = class extends w {
@@ -68753,7 +68753,7 @@ var Nt = class extends w {
68753
68753
  }
68754
68754
  eval(e, t) {
68755
68755
  let n = J(this.left.eval(e, t), "boolean"), i = J(this.right.eval(e, t), "boolean");
68756
- return n?.value === false && i?.value === false ? h(false) : n?.value || i?.value ? h(true) : [];
68756
+ return n?.value === false && i?.value === false ? m(false) : n?.value || i?.value ? m(true) : [];
68757
68757
  }
68758
68758
  };
68759
68759
  var Ut = class extends w {
@@ -68762,7 +68762,7 @@ var Ut = class extends w {
68762
68762
  }
68763
68763
  eval(e, t) {
68764
68764
  let n = J(this.left.eval(e, t), "boolean"), i = J(this.right.eval(e, t), "boolean");
68765
- return !n || !i ? [] : h(n.value !== i.value);
68765
+ return !n || !i ? [] : m(n.value !== i.value);
68766
68766
  }
68767
68767
  };
68768
68768
  var Bt = class extends w {
@@ -68771,7 +68771,7 @@ var Bt = class extends w {
68771
68771
  }
68772
68772
  eval(e, t) {
68773
68773
  let n = J(this.left.eval(e, t), "boolean"), i = J(this.right.eval(e, t), "boolean");
68774
- return i?.value === true || n?.value === false ? h(true) : !n || !i ? [] : h(false);
68774
+ return i?.value === true || n?.value === false ? m(true) : !n || !i ? [] : m(false);
68775
68775
  }
68776
68776
  };
68777
68777
  var ie = class {
@@ -68781,7 +68781,7 @@ var ie = class {
68781
68781
  this.name = e, this.args = t;
68782
68782
  }
68783
68783
  eval(e, t) {
68784
- let n = D[this.name];
68784
+ let n = V[this.name];
68785
68785
  if (!n) throw new Error("Unrecognized function: " + this.name);
68786
68786
  return n(e, t, ...this.args);
68787
68787
  }
@@ -68820,7 +68820,7 @@ var Bs = { parse(r6, e) {
68820
68820
  return new we(e, t);
68821
68821
  }, precedence: v.Indexer };
68822
68822
  var qs = { parse(r6, e) {
68823
- if (!(e instanceof L)) throw new Error("Unexpected parentheses");
68823
+ if (!(e instanceof F)) throw new Error("Unexpected parentheses");
68824
68824
  let t = [];
68825
68825
  for (; !r6.match(")"); ) t.push(r6.consumeAndParse()), r6.match(",");
68826
68826
  return new ie(e.name, t);
@@ -68830,37 +68830,37 @@ function Ws(r6) {
68830
68830
  return n?.startsWith("'") && n.endsWith("'") ? n = n.substring(1, n.length - 1) : n = "{" + n + "}", { value: t, unit: n };
68831
68831
  }
68832
68832
  function rt() {
68833
- return new pt().registerPrefix("String", { parse: (r6, e) => new W({ type: d.string, value: e.value }) }).registerPrefix("DateTime", { parse: (r6, e) => new W({ type: d.dateTime, value: qe(e.value) }) }).registerPrefix("Quantity", { parse: (r6, e) => new W({ type: d.Quantity, value: Ws(e.value) }) }).registerPrefix("Number", { parse: (r6, e) => new W({ type: e.value.includes(".") ? d.decimal : d.integer, value: Number.parseFloat(e.value) }) }).registerPrefix("true", { parse: () => new W({ type: d.boolean, value: true }) }).registerPrefix("false", { parse: () => new W({ type: d.boolean, value: false }) }).registerPrefix("Symbol", { parse: (r6, e) => new L(e.value) }).registerPrefix("{}", { parse: () => new wt() }).registerPrefix("(", Us).registerInfix("[", Bs).registerInfix("(", qs).prefix("+", v.UnaryAdd, (r6, e) => new Ot("+", e, (t) => t)).prefix("-", v.UnarySubtract, (r6, e) => new _("-", e, e, (t, n) => -n)).infixLeft(".", v.Dot, (r6, e, t) => new Z(r6, t)).infixLeft("/", v.Divide, (r6, e, t) => new _("/", r6, t, (n, i) => n / i)).infixLeft("*", v.Multiply, (r6, e, t) => new _("*", r6, t, (n, i) => n * i)).infixLeft("+", v.Add, (r6, e, t) => new _("+", r6, t, (n, i) => n + i)).infixLeft("-", v.Subtract, (r6, e, t) => new _("-", r6, t, (n, i) => n - i)).infixLeft("|", v.Union, (r6, e, t) => new Pe(r6, t)).infixLeft("=", v.Equals, (r6, e, t) => new Vt(r6, t)).infixLeft("!=", v.NotEquals, (r6, e, t) => new Mt(r6, t)).infixLeft("~", v.Equivalent, (r6, e, t) => new _t(r6, t)).infixLeft("!~", v.NotEquivalent, (r6, e, t) => new Lt(r6, t)).infixLeft("<", v.LessThan, (r6, e, t) => new _("<", r6, t, (n, i) => n < i)).infixLeft("<=", v.LessThanOrEquals, (r6, e, t) => new _("<=", r6, t, (n, i) => n <= i)).infixLeft(">", v.GreaterThan, (r6, e, t) => new _(">", r6, t, (n, i) => n > i)).infixLeft(">=", v.GreaterThanOrEquals, (r6, e, t) => new _(">=", r6, t, (n, i) => n >= i)).infixLeft("&", v.Ampersand, (r6, e, t) => new It(r6, t)).infixLeft("and", v.And, (r6, e, t) => new Ft(r6, t)).infixLeft("as", v.As, (r6, e, t) => new he(r6, t)).infixLeft("contains", v.Contains, (r6, e, t) => new kt(r6, t)).infixLeft("div", v.Divide, (r6, e, t) => new _("div", r6, t, (n, i) => Math.trunc(n / i))).infixLeft("in", v.In, (r6, e, t) => new Dt(r6, t)).infixLeft("is", v.Is, (r6, e, t) => new Ae(r6, t)).infixLeft("mod", v.Modulo, (r6, e, t) => new _("mod", r6, t, (n, i) => n % i)).infixLeft("or", v.Or, (r6, e, t) => new Nt(r6, t)).infixLeft("xor", v.Xor, (r6, e, t) => new Ut(r6, t)).infixLeft("implies", v.Implies, (r6, e, t) => new Bt(r6, t));
68833
+ return new pt().registerPrefix("String", { parse: (r6, e) => new j({ type: d.string, value: e.value }) }).registerPrefix("DateTime", { parse: (r6, e) => new j({ type: d.dateTime, value: qe(e.value) }) }).registerPrefix("Quantity", { parse: (r6, e) => new j({ type: d.Quantity, value: Ws(e.value) }) }).registerPrefix("Number", { parse: (r6, e) => new j({ type: e.value.includes(".") ? d.decimal : d.integer, value: Number.parseFloat(e.value) }) }).registerPrefix("true", { parse: () => new j({ type: d.boolean, value: true }) }).registerPrefix("false", { parse: () => new j({ type: d.boolean, value: false }) }).registerPrefix("Symbol", { parse: (r6, e) => new F(e.value) }).registerPrefix("{}", { parse: () => new wt() }).registerPrefix("(", Us).registerInfix("[", Bs).registerInfix("(", qs).prefix("+", v.UnaryAdd, (r6, e) => new Ot("+", e, (t) => t)).prefix("-", v.UnarySubtract, (r6, e) => new _("-", e, e, (t, n) => -n)).infixLeft(".", v.Dot, (r6, e, t) => new Z(r6, t)).infixLeft("/", v.Divide, (r6, e, t) => new _("/", r6, t, (n, i) => n / i)).infixLeft("*", v.Multiply, (r6, e, t) => new _("*", r6, t, (n, i) => n * i)).infixLeft("+", v.Add, (r6, e, t) => new _("+", r6, t, (n, i) => n + i)).infixLeft("-", v.Subtract, (r6, e, t) => new _("-", r6, t, (n, i) => n - i)).infixLeft("|", v.Union, (r6, e, t) => new Pe(r6, t)).infixLeft("=", v.Equals, (r6, e, t) => new Dt(r6, t)).infixLeft("!=", v.NotEquals, (r6, e, t) => new Mt(r6, t)).infixLeft("~", v.Equivalent, (r6, e, t) => new _t(r6, t)).infixLeft("!~", v.NotEquivalent, (r6, e, t) => new Lt(r6, t)).infixLeft("<", v.LessThan, (r6, e, t) => new _("<", r6, t, (n, i) => n < i)).infixLeft("<=", v.LessThanOrEquals, (r6, e, t) => new _("<=", r6, t, (n, i) => n <= i)).infixLeft(">", v.GreaterThan, (r6, e, t) => new _(">", r6, t, (n, i) => n > i)).infixLeft(">=", v.GreaterThanOrEquals, (r6, e, t) => new _(">=", r6, t, (n, i) => n >= i)).infixLeft("&", v.Ampersand, (r6, e, t) => new It(r6, t)).infixLeft("and", v.And, (r6, e, t) => new Ft(r6, t)).infixLeft("as", v.As, (r6, e, t) => new me(r6, t)).infixLeft("contains", v.Contains, (r6, e, t) => new kt(r6, t)).infixLeft("div", v.Divide, (r6, e, t) => new _("div", r6, t, (n, i) => Math.trunc(n / i))).infixLeft("in", v.In, (r6, e, t) => new Vt(r6, t)).infixLeft("is", v.Is, (r6, e, t) => new Ae(r6, t)).infixLeft("mod", v.Modulo, (r6, e, t) => new _("mod", r6, t, (n, i) => n % i)).infixLeft("or", v.Or, (r6, e, t) => new Nt(r6, t)).infixLeft("xor", v.Xor, (r6, e, t) => new Ut(r6, t)).infixLeft("implies", v.Implies, (r6, e, t) => new Bt(r6, t));
68834
68834
  }
68835
68835
  var js = rt();
68836
- var m = { EQUALS: "eq", NOT_EQUALS: "ne", GREATER_THAN: "gt", LESS_THAN: "lt", GREATER_THAN_OR_EQUALS: "ge", LESS_THAN_OR_EQUALS: "le", STARTS_AFTER: "sa", ENDS_BEFORE: "eb", APPROXIMATELY: "ap", CONTAINS: "contains", STARTS_WITH: "sw", EXACT: "exact", TEXT: "text", NOT: "not", ABOVE: "above", BELOW: "below", IN: "in", NOT_IN: "not-in", OF_TYPE: "of-type", MISSING: "missing", PRESENT: "present", IDENTIFIER: "identifier", ITERATE: "iterate" };
68837
- var Yr = { contains: m.CONTAINS, exact: m.EXACT, above: m.ABOVE, below: m.BELOW, text: m.TEXT, not: m.NOT, in: m.IN, "not-in": m.NOT_IN, "of-type": m.OF_TYPE, missing: m.MISSING, identifier: m.IDENTIFIER, iterate: m.ITERATE };
68838
- var Xr = { eq: m.EQUALS, ne: m.NOT_EQUALS, lt: m.LESS_THAN, le: m.LESS_THAN_OR_EQUALS, gt: m.GREATER_THAN, ge: m.GREATER_THAN_OR_EQUALS, sa: m.STARTS_AFTER, eb: m.ENDS_BEFORE, ap: m.APPROXIMATELY, sw: m.STARTS_WITH };
68839
- var Ys = [m.MISSING, m.PRESENT];
68836
+ var h = { EQUALS: "eq", NOT_EQUALS: "ne", GREATER_THAN: "gt", LESS_THAN: "lt", GREATER_THAN_OR_EQUALS: "ge", LESS_THAN_OR_EQUALS: "le", STARTS_AFTER: "sa", ENDS_BEFORE: "eb", APPROXIMATELY: "ap", CONTAINS: "contains", STARTS_WITH: "sw", EXACT: "exact", TEXT: "text", NOT: "not", ABOVE: "above", BELOW: "below", IN: "in", NOT_IN: "not-in", OF_TYPE: "of-type", MISSING: "missing", PRESENT: "present", IDENTIFIER: "identifier", ITERATE: "iterate" };
68837
+ var Yr = { contains: h.CONTAINS, exact: h.EXACT, above: h.ABOVE, below: h.BELOW, text: h.TEXT, not: h.NOT, in: h.IN, "not-in": h.NOT_IN, "of-type": h.OF_TYPE, missing: h.MISSING, identifier: h.IDENTIFIER, iterate: h.ITERATE };
68838
+ var Xr = { eq: h.EQUALS, ne: h.NOT_EQUALS, lt: h.LESS_THAN, le: h.LESS_THAN_OR_EQUALS, gt: h.GREATER_THAN, ge: h.GREATER_THAN_OR_EQUALS, sa: h.STARTS_AFTER, eb: h.ENDS_BEFORE, ap: h.APPROXIMATELY, sw: h.STARTS_WITH };
68839
+ var Ys = [h.MISSING, h.PRESENT];
68840
68840
  var Ie = { READ: "read", VREAD: "vread", UPDATE: "update", DELETE: "delete", HISTORY: "history", CREATE: "create", SEARCH: "search" };
68841
68841
  var xa = [Ie.READ, Ie.VREAD, Ie.HISTORY, Ie.SEARCH];
68842
- var Dd = { FIRST: "first", APPLICATION: "application" };
68843
- function j() {
68842
+ var Vd = { FIRST: "first", APPLICATION: "application" };
68843
+ function $() {
68844
68844
  return typeof window < "u";
68845
68845
  }
68846
68846
  function Zr() {
68847
68847
  return typeof Buffer < "u" ? Buffer : void 0;
68848
68848
  }
68849
68849
  var oe = { assign(r6) {
68850
- j() && globalThis.location.assign(r6);
68850
+ $() && globalThis.location.assign(r6);
68851
68851
  }, reload() {
68852
- j() && globalThis.location.reload();
68852
+ $() && globalThis.location.reload();
68853
68853
  }, getSearch() {
68854
- return j() ? globalThis.location.search : "";
68854
+ return $() ? globalThis.location.search : "";
68855
68855
  }, getPathname() {
68856
- return j() ? globalThis.location.pathname : "";
68856
+ return $() ? globalThis.location.pathname : "";
68857
68857
  }, getLocation() {
68858
- return j() ? globalThis.location.toString() : "";
68858
+ return $() ? globalThis.location.toString() : "";
68859
68859
  }, getOrigin() {
68860
- return j() ? globalThis.location.protocol + "//" + globalThis.location.host + "/" : "";
68860
+ return $() ? globalThis.location.protocol + "//" + globalThis.location.host + "/" : "";
68861
68861
  } };
68862
- function ba(r6) {
68863
- if (j()) {
68862
+ function Sa(r6) {
68863
+ if ($()) {
68864
68864
  let t = window.atob(r6), n = Uint8Array.from(t, (i) => i.codePointAt(0));
68865
68865
  return new window.TextDecoder().decode(n);
68866
68866
  }
@@ -68869,7 +68869,7 @@ function ba(r6) {
68869
68869
  throw new Error("Unable to decode base64");
68870
68870
  }
68871
68871
  function $t(r6) {
68872
- if (j()) {
68872
+ if ($()) {
68873
68873
  let t = new window.TextEncoder().encode(r6), n = String.fromCodePoint.apply(null, t);
68874
68874
  return window.btoa(n);
68875
68875
  }
@@ -68880,7 +68880,7 @@ function $t(r6) {
68880
68880
  function Li(r6) {
68881
68881
  r6 = r6.padEnd(r6.length + (4 - r6.length % 4) % 4, "=");
68882
68882
  let e = r6.replaceAll("-", "+").replaceAll("_", "/");
68883
- return ba(e);
68883
+ return Sa(e);
68884
68884
  }
68885
68885
  function en() {
68886
68886
  let r6 = new Uint32Array(28);
@@ -68946,7 +68946,7 @@ var ee = class {
68946
68946
  }
68947
68947
  };
68948
68948
  var rn = { "Patient-open": "Patient-open", "Patient-close": "Patient-close", "ImagingStudy-open": "ImagingStudy-open", "ImagingStudy-close": "ImagingStudy-close", "Encounter-open": "Encounter-open", "Encounter-close": "Encounter-close", "DiagnosticReport-open": "DiagnosticReport-open", "DiagnosticReport-close": "DiagnosticReport-close", "DiagnosticReport-select": "DiagnosticReport-select", "DiagnosticReport-update": "DiagnosticReport-update", syncerror: "syncerror" };
68949
- var Da = ["Patient", "Encounter", "ImagingStudy", "DiagnosticReport", "OperationOutcome", "Bundle"];
68949
+ var Va = ["Patient", "Encounter", "ImagingStudy", "DiagnosticReport", "OperationOutcome", "Bundle"];
68950
68950
  var nn = ["DiagnosticReport-update"];
68951
68951
  function Ui(r6) {
68952
68952
  return nn.includes(r6);
@@ -68954,9 +68954,9 @@ function Ui(r6) {
68954
68954
  function Bi(r6) {
68955
68955
  if (nn.includes(r6)) throw new f(x(`'context.version' is required for '${r6}'.`));
68956
68956
  }
68957
- var Va = { "Patient-open": { patient: { resourceType: "Patient" }, encounter: { resourceType: "Encounter", optional: true } }, "Patient-close": { patient: { resourceType: "Patient" }, encounter: { resourceType: "Encounter", optional: true } }, "ImagingStudy-open": { study: { resourceType: "ImagingStudy" }, encounter: { resourceType: "Encounter", optional: true }, patient: { resourceType: "Patient", optional: true } }, "ImagingStudy-close": { study: { resourceType: "ImagingStudy" }, encounter: { resourceType: "Encounter", optional: true }, patient: { resourceType: "Patient", optional: true } }, "Encounter-open": { encounter: { resourceType: "Encounter" }, patient: { resourceType: "Patient" } }, "Encounter-close": { encounter: { resourceType: "Encounter" }, patient: { resourceType: "Patient" } }, "DiagnosticReport-open": { report: { resourceType: "DiagnosticReport" }, encounter: { resourceType: "Encounter", optional: true }, study: { resourceType: "ImagingStudy", optional: true, manyAllowed: true }, patient: { resourceType: "Patient" } }, "DiagnosticReport-close": { report: { resourceType: "DiagnosticReport" }, encounter: { resourceType: "Encounter", optional: true }, study: { resourceType: "ImagingStudy", optional: true, manyAllowed: true }, patient: { resourceType: "Patient" } }, "DiagnosticReport-select": { report: { resourceType: "DiagnosticReport", reference: true }, patient: { resourceType: "Patient", optional: true, reference: true }, select: { resourceType: "*", reference: true, manyAllowed: true } }, "DiagnosticReport-update": { report: { resourceType: "DiagnosticReport", reference: true }, patient: { resourceType: "Patient", optional: true, reference: true }, updates: { resourceType: "Bundle" } }, syncerror: { operationoutcome: { resourceType: "OperationOutcome" } } };
68957
+ var Da = { "Patient-open": { patient: { resourceType: "Patient" }, encounter: { resourceType: "Encounter", optional: true } }, "Patient-close": { patient: { resourceType: "Patient" }, encounter: { resourceType: "Encounter", optional: true } }, "ImagingStudy-open": { study: { resourceType: "ImagingStudy" }, encounter: { resourceType: "Encounter", optional: true }, patient: { resourceType: "Patient", optional: true } }, "ImagingStudy-close": { study: { resourceType: "ImagingStudy" }, encounter: { resourceType: "Encounter", optional: true }, patient: { resourceType: "Patient", optional: true } }, "Encounter-open": { encounter: { resourceType: "Encounter" }, patient: { resourceType: "Patient" } }, "Encounter-close": { encounter: { resourceType: "Encounter" }, patient: { resourceType: "Patient" } }, "DiagnosticReport-open": { report: { resourceType: "DiagnosticReport" }, encounter: { resourceType: "Encounter", optional: true }, study: { resourceType: "ImagingStudy", optional: true, manyAllowed: true }, patient: { resourceType: "Patient" } }, "DiagnosticReport-close": { report: { resourceType: "DiagnosticReport" }, encounter: { resourceType: "Encounter", optional: true }, study: { resourceType: "ImagingStudy", optional: true, manyAllowed: true }, patient: { resourceType: "Patient" } }, "DiagnosticReport-select": { report: { resourceType: "DiagnosticReport", reference: true }, patient: { resourceType: "Patient", optional: true, reference: true }, select: { resourceType: "*", reference: true, manyAllowed: true } }, "DiagnosticReport-update": { report: { resourceType: "DiagnosticReport", reference: true }, patient: { resourceType: "Patient", optional: true, reference: true }, updates: { resourceType: "Bundle" } }, syncerror: { operationoutcome: { resourceType: "OperationOutcome" } } };
68958
68958
  function Ma(r6) {
68959
- return Da.includes(r6);
68959
+ return Va.includes(r6);
68960
68960
  }
68961
68961
  function qi(r6) {
68962
68962
  return !!r6.endpoint;
@@ -68985,11 +68985,11 @@ function _a(r6, e, t, n) {
68985
68985
  }
68986
68986
  function La(r6, e, t, n, i) {
68987
68987
  if (i.set(e.key, (i.get(e.key) ?? 0) + 1), n.reference) {
68988
- if (!H(e.reference)) throw new f(x(`context[${t}] is invalid. Expected key '${e.key}' to be a reference.`));
68988
+ if (!G(e.reference)) throw new f(x(`context[${t}] is invalid. Expected key '${e.key}' to be a reference.`));
68989
68989
  } else _a(r6, e.resource, t, n);
68990
68990
  }
68991
68991
  function Fa(r6, e) {
68992
- let t = /* @__PURE__ */ new Map(), n = Va[r6];
68992
+ let t = /* @__PURE__ */ new Map(), n = Da[r6];
68993
68993
  for (let i = 0; i < e.length; i++) {
68994
68994
  let o2 = e[i].key;
68995
68995
  if (!n[o2]) throw new f(x(`Key '${o2}' not found for event '${r6}'. Make sure to add only valid keys.`));
@@ -69073,7 +69073,7 @@ var zt = class {
69073
69073
  };
69074
69074
  var Hi;
69075
69075
  Hi = Symbol.toStringTag;
69076
- var F = class {
69076
+ var N = class {
69077
69077
  constructor(e) {
69078
69078
  c(this, Hi, "ReadablePromise");
69079
69079
  c(this, "suspender");
@@ -69428,7 +69428,7 @@ var Yt = class {
69428
69428
  return;
69429
69429
  }
69430
69430
  if (o2.type === "handshake") {
69431
- let a = Se(o2.subscription), u2 = { type: "connect", payload: { subscriptionId: a } };
69431
+ let a = be(o2.subscription), u2 = { type: "connect", payload: { subscriptionId: a } };
69432
69432
  this.masterSubEmitter?.dispatchEvent(u2);
69433
69433
  let l2 = this.criteriaEntriesBySubscriptionId.get(a);
69434
69434
  if (!l2) {
@@ -69439,7 +69439,7 @@ var Yt = class {
69439
69439
  return;
69440
69440
  }
69441
69441
  this.masterSubEmitter?.dispatchEvent({ type: "message", payload: i });
69442
- let s = this.criteriaEntriesBySubscriptionId.get(Se(o2.subscription));
69442
+ let s = this.criteriaEntriesBySubscriptionId.get(be(o2.subscription));
69443
69443
  if (!s) {
69444
69444
  console.warn("Received notification for criteria the SubscriptionManager is not listening for");
69445
69445
  return;
@@ -69589,7 +69589,7 @@ var Yt = class {
69589
69589
  });
69590
69590
  }
69591
69591
  };
69592
- var un = "5.1.0-cc87b44";
69592
+ var un = "5.1.1-d54b8dc";
69593
69593
  var $a = O.FHIR_JSON + ", */*; q=0.1";
69594
69594
  var Ha = "https://api.medplum.com/";
69595
69595
  var Ga = 1e3;
@@ -69616,6 +69616,7 @@ var Xt = class extends ee {
69616
69616
  c(this, "tokenUrl");
69617
69617
  c(this, "logoutUrl");
69618
69618
  c(this, "fhircastHubUrl");
69619
+ c(this, "cdsServicesUrl");
69619
69620
  c(this, "defaultHeaders");
69620
69621
  c(this, "onUnauthenticated");
69621
69622
  c(this, "autoBatchTime");
@@ -69640,7 +69641,7 @@ var Xt = class extends ee {
69640
69641
  c(this, "keyValueClient");
69641
69642
  c(this, "logLevel");
69642
69643
  if (t?.baseUrl && !t.baseUrl.startsWith("http")) throw new Error("Base URL must start with http or https");
69643
- this.options = t ?? {}, this.fetch = t?.fetch ?? Za(), this.storage = t?.storage ?? new ot(void 0, t?.storagePrefix), this.createPdfImpl = t?.createPdf, this.baseUrl = zr(t?.baseUrl ?? Ha), this.fhirBaseUrl = G(this.baseUrl, t?.fhirUrlPath ?? "fhir/R4"), this.authorizeUrl = G(this.baseUrl, t?.authorizeUrl ?? "oauth2/authorize"), this.tokenUrl = G(this.baseUrl, t?.tokenUrl ?? "oauth2/token"), this.logoutUrl = G(this.baseUrl, t?.logoutUrl ?? "oauth2/logout"), this.fhircastHubUrl = G(this.baseUrl, t?.fhircastHubUrl ?? "fhircast/STU3"), this.clientId = t?.clientId ?? "", this.clientSecret = t?.clientSecret ?? "", this.credentialsInHeader = t?.authCredentialsMethod === "header", this.defaultHeaders = t?.defaultHeaders ?? {}, this.onUnauthenticated = t?.onUnauthenticated, this.refreshGracePeriod = t?.refreshGracePeriod ?? Ja, this.logLevel = this.initializeLogLevel(t), this.cacheTime = t?.cacheTime ?? (j() ? Qa : za), this.cacheTime > 0 ? this.requestCache = new Ve(t?.resourceCacheSize ?? Ga) : this.requestCache = void 0, t?.autoBatchTime ? (this.autoBatchTime = t.autoBatchTime, this.autoBatchQueue = []) : (this.autoBatchTime = 0, this.autoBatchQueue = void 0), t?.accessToken && this.setAccessToken(t.accessToken), this.storage.getInitPromise === void 0 ? (t?.accessToken || this.attemptResumeActiveLogin().catch(console.error), this.initPromise = Promise.resolve(), this.dispatchEvent({ type: "storageInitialized" })) : (this.initComplete = false, this.initPromise = this.storage.getInitPromise(), this.initPromise.then(() => {
69644
+ this.options = t ?? {}, this.fetch = t?.fetch ?? Za(), this.storage = t?.storage ?? new ot(void 0, t?.storagePrefix), this.createPdfImpl = t?.createPdf, this.baseUrl = zr(t?.baseUrl ?? Ha), this.fhirBaseUrl = L(this.baseUrl, t?.fhirUrlPath ?? "fhir/R4"), this.authorizeUrl = L(this.baseUrl, t?.authorizeUrl ?? "oauth2/authorize"), this.tokenUrl = L(this.baseUrl, t?.tokenUrl ?? "oauth2/token"), this.logoutUrl = L(this.baseUrl, t?.logoutUrl ?? "oauth2/logout"), this.fhircastHubUrl = L(this.baseUrl, t?.fhircastHubUrl ?? "fhircast/STU3"), this.cdsServicesUrl = L(this.baseUrl, t?.cdsServicesUrl ?? "cds-services"), this.clientId = t?.clientId ?? "", this.clientSecret = t?.clientSecret ?? "", this.credentialsInHeader = t?.authCredentialsMethod === "header", this.defaultHeaders = t?.defaultHeaders ?? {}, this.onUnauthenticated = t?.onUnauthenticated, this.refreshGracePeriod = t?.refreshGracePeriod ?? Ja, this.logLevel = this.initializeLogLevel(t), this.cacheTime = t?.cacheTime ?? ($() ? Qa : za), this.cacheTime > 0 ? this.requestCache = new De(t?.resourceCacheSize ?? Ga) : this.requestCache = void 0, t?.autoBatchTime ? (this.autoBatchTime = t.autoBatchTime, this.autoBatchQueue = []) : (this.autoBatchTime = 0, this.autoBatchQueue = void 0), t?.accessToken && this.setAccessToken(t.accessToken), this.storage.getInitPromise === void 0 ? (t?.accessToken || this.attemptResumeActiveLogin().catch(console.error), this.initPromise = Promise.resolve(), this.dispatchEvent({ type: "storageInitialized" })) : (this.initComplete = false, this.initPromise = this.storage.getInitPromise(), this.initPromise.then(() => {
69644
69645
  t?.accessToken || this.attemptResumeActiveLogin().catch(console.error), this.initComplete = true, this.dispatchEvent({ type: "storageInitialized" });
69645
69646
  }).catch((n) => {
69646
69647
  console.error(n), this.initComplete = true, this.dispatchEvent({ type: "storageInitFailed", payload: { error: n } });
@@ -69674,11 +69675,14 @@ var Xt = class extends ee {
69674
69675
  getFhircastHubUrl() {
69675
69676
  return this.fhircastHubUrl;
69676
69677
  }
69678
+ getCdsServicesUrl() {
69679
+ return this.cdsServicesUrl;
69680
+ }
69677
69681
  getDefaultHeaders() {
69678
69682
  return this.defaultHeaders;
69679
69683
  }
69680
69684
  clear() {
69681
- this.storage.clear(), j() && sessionStorage.clear(), this.clearActiveLogin();
69685
+ this.storage.clear(), $() && sessionStorage.clear(), this.clearActiveLogin();
69682
69686
  }
69683
69687
  clearActiveLogin() {
69684
69688
  this.storage.setString("activeLogin", void 0), this.requestCache?.clear(), this.accessToken = void 0, this.refreshToken = void 0, this.refreshPromise = void 0, this.accessTokenExpires = void 0, this.sessionDetails = void 0, this.medplumServer = void 0, this.dispatchEvent({ type: "change" });
@@ -69690,7 +69694,7 @@ var Xt = class extends ee {
69690
69694
  this.requestCache?.clear();
69691
69695
  }
69692
69696
  invalidateSearches(t) {
69693
- let n = G(this.fhirBaseUrl, t);
69697
+ let n = L(this.fhirBaseUrl, t);
69694
69698
  for (let i of this.requestCache?.keys() ?? g) (i.endsWith(n) || i.includes(n + "?")) && this.requestCache?.delete(i);
69695
69699
  }
69696
69700
  get(t, n = {}) {
@@ -69701,7 +69705,7 @@ var Xt = class extends ee {
69701
69705
  t.startsWith(this.fhirBaseUrl) && this.autoBatchQueue && !n.disableAutoBatch ? o2 = new Promise((a, u2) => {
69702
69706
  this.autoBatchQueue.push({ method: "GET", url: t.replace(this.fhirBaseUrl, ""), options: n, resolve: a, reject: u2 }), this.autoBatchTimerId || (this.autoBatchTimerId = setTimeout(() => this.executeAutoBatch(), this.autoBatchTime));
69703
69707
  }) : o2 = this.request("GET", t, n);
69704
- let s = new F(o2);
69708
+ let s = new N(o2);
69705
69709
  return this.setCacheEntry(t, s, n), s;
69706
69710
  }
69707
69711
  post(t, n, i, o2 = {}) {
@@ -69769,7 +69773,7 @@ var Xt = class extends ee {
69769
69773
  return a.toString();
69770
69774
  }
69771
69775
  fhirUrl(...t) {
69772
- return new URL(G(this.fhirBaseUrl, t.join("/")));
69776
+ return new URL(L(this.fhirBaseUrl, t.join("/")));
69773
69777
  }
69774
69778
  fhirSearchUrl(t, n) {
69775
69779
  let i = this.fhirUrl(t);
@@ -69786,13 +69790,13 @@ var Xt = class extends ee {
69786
69790
  o2.searchParams.set("_count", "1"), o2.searchParams.sort();
69787
69791
  let s = "searchOne-" + o2.toString(), a = this.getCacheEntry(s, i);
69788
69792
  if (a) return a.value;
69789
- let u2 = new F(this.search(t, o2.searchParams, i).then((l2) => l2.entry?.[0]?.resource));
69793
+ let u2 = new N(this.search(t, o2.searchParams, i).then((l2) => l2.entry?.[0]?.resource));
69790
69794
  return this.setCacheEntry(s, u2, i), u2;
69791
69795
  }
69792
69796
  searchResources(t, n, i) {
69793
69797
  let s = "searchResources-" + this.fhirSearchUrl(t, n).toString(), a = this.getCacheEntry(s, i);
69794
69798
  if (a) return a.value;
69795
- let u2 = new F(this.search(t, n, i).then(Yi));
69799
+ let u2 = new N(this.search(t, n, i).then(Yi));
69796
69800
  return this.setCacheEntry(s, u2, i), u2;
69797
69801
  }
69798
69802
  async *searchResourcePages(t, n, i) {
@@ -69826,10 +69830,10 @@ var Xt = class extends ee {
69826
69830
  }
69827
69831
  readReference(t, n) {
69828
69832
  let i = t.reference;
69829
- if (!i) return new F(Promise.reject(new Error("Missing reference")));
69830
- if (i === "system") return new F(Promise.resolve(Ji));
69833
+ if (!i) return new N(Promise.reject(new Error("Missing reference")));
69834
+ if (i === "system") return new N(Promise.resolve(Ji));
69831
69835
  let [o2, s] = i.split("/");
69832
- return !o2 || !s ? new F(Promise.reject(new Error("Invalid reference"))) : this.readResource(o2, s, n);
69836
+ return !o2 || !s ? new N(Promise.reject(new Error("Invalid reference"))) : this.readResource(o2, s, n);
69833
69837
  }
69834
69838
  readCanonical(t, n, i) {
69835
69839
  return Array.isArray(t) ? this.searchOne("", { _type: t.join(","), url: n }, i) : this.searchOne(t, "url=" + n, i);
@@ -69838,7 +69842,7 @@ var Xt = class extends ee {
69838
69842
  if (Qn(t)) return Promise.resolve();
69839
69843
  let i = t + "-requestSchema", o2 = this.getCacheEntry(i, void 0);
69840
69844
  if (o2) return o2.value;
69841
- let s = new F((async () => {
69845
+ let s = new N((async () => {
69842
69846
  let a = `{
69843
69847
  StructureDefinitionList(_filter: "name eq ${t}") {
69844
69848
  resourceType,
@@ -69889,7 +69893,7 @@ var Xt = class extends ee {
69889
69893
  if (!n?.expandProfile && zn(t)) return Promise.resolve();
69890
69894
  let i = t + "-requestSchema" + (n?.expandProfile ? "-nested" : ""), o2 = this.getCacheEntry(i, void 0);
69891
69895
  if (o2) return o2.value;
69892
- let s = new F((async () => {
69896
+ let s = new N((async () => {
69893
69897
  if (n?.expandProfile) {
69894
69898
  let a = this.fhirUrl("StructureDefinition", "$expand-profile");
69895
69899
  a.search = new URLSearchParams({ url: t }).toString();
@@ -69937,11 +69941,11 @@ var Xt = class extends ee {
69937
69941
  let a = Xi(t, n, i, o2);
69938
69942
  if (a.contentType === O.XML) {
69939
69943
  let p = a.data, y2;
69940
- p instanceof Blob ? y2 = await new Promise((T, $) => {
69944
+ p instanceof Blob ? y2 = await new Promise((T, H) => {
69941
69945
  let Q2 = new FileReader();
69942
69946
  Q2.onload = () => {
69943
69947
  if (!Q2.result) {
69944
- $(new Error("Failed to load file"));
69948
+ H(new Error("Failed to load file"));
69945
69949
  return;
69946
69950
  }
69947
69951
  T(Q2.result);
@@ -69952,8 +69956,8 @@ var Xt = class extends ee {
69952
69956
  return { contentType: a.contentType, url: l2.url, title: a.filename };
69953
69957
  }
69954
69958
  createBinary(t, n, i, o2, s) {
69955
- let a = Xi(t, n, i, o2), u2 = s ?? (typeof n == "object" ? n : {}), { data: l2, contentType: p, filename: y2, securityContext: T, onProgress: $ } = a, Q2 = this.fhirUrl("Binary");
69956
- return y2 && Q2.searchParams.set("_filename", y2), T?.reference && this.setRequestHeader(u2, "X-Security-Context", T.reference), $ ? this.uploadwithProgress(Q2, l2, p, $, u2) : this.post(Q2, l2, p, u2);
69959
+ let a = Xi(t, n, i, o2), u2 = s ?? (typeof n == "object" ? n : {}), { data: l2, contentType: p, filename: y2, securityContext: T, onProgress: H } = a, Q2 = this.fhirUrl("Binary");
69960
+ return y2 && Q2.searchParams.set("_filename", y2), T?.reference && this.setRequestHeader(u2, "X-Security-Context", T.reference), H ? this.uploadwithProgress(Q2, l2, p, H, u2) : this.post(Q2, l2, p, u2);
69957
69961
  }
69958
69962
  uploadwithProgress(t, n, i, o2, s) {
69959
69963
  return new Promise((a, u2) => {
@@ -69963,22 +69967,22 @@ var Xt = class extends ee {
69963
69967
  s?.signal?.removeEventListener("abort", p), T instanceof Error ? u2(T) : a(T);
69964
69968
  };
69965
69969
  if (l2.responseType = "json", l2.onabort = () => y2(new DOMException("Request aborted", "AbortError")), l2.onerror = () => y2(new Error("Request error")), o2 && (l2.upload.onprogress = (T) => o2(T), l2.upload.onload = (T) => o2(T)), l2.onload = () => {
69966
- l2.status >= 200 && l2.status < 300 ? y2(l2.response) : y2(new f(ht(l2.response || l2.statusText)));
69970
+ l2.status >= 200 && l2.status < 300 ? y2(l2.response) : y2(new f(mt(l2.response || l2.statusText)));
69967
69971
  }, l2.open("POST", t), l2.withCredentials = true, l2.setRequestHeader("Authorization", "Bearer " + this.accessToken), l2.setRequestHeader("Cache-Control", "no-cache, no-store, max-age=0"), l2.setRequestHeader("Content-Type", i), this.options.extendedMode !== false && l2.setRequestHeader("X-Medplum", "extended"), s?.headers) {
69968
69972
  let T = s.headers;
69969
- for (let [$, Q2] of Object.entries(T)) l2.setRequestHeader($, Q2);
69973
+ for (let [H, Q2] of Object.entries(T)) l2.setRequestHeader(H, Q2);
69970
69974
  }
69971
69975
  l2.send(n);
69972
69976
  });
69973
69977
  }
69974
69978
  async createPdf(t, n, i, o2) {
69975
69979
  if (!this.createPdfImpl) throw new Error("PDF creation not enabled");
69976
- let s = rc(t, n, i, o2), a = typeof n == "object" ? n : {}, { docDefinition: u2, tableLayouts: l2, fonts: p, ...y2 } = s, T = await this.createPdfImpl(u2, l2, p), $ = { ...y2, data: T, contentType: "application/pdf" };
69977
- return this.createBinary($, a);
69980
+ let s = rc(t, n, i, o2), a = typeof n == "object" ? n : {}, { docDefinition: u2, tableLayouts: l2, fonts: p, ...y2 } = s, T = await this.createPdfImpl(u2, l2, p), H = { ...y2, data: T, contentType: "application/pdf" };
69981
+ return this.createBinary(H, a);
69978
69982
  }
69979
69983
  createComment(t, n, i) {
69980
69984
  let o2 = this.getProfile(), s, a;
69981
- return t.resourceType === "Encounter" && (s = be(t), a = t.subject), t.resourceType === "ServiceRequest" && (s = t.encounter, a = t.subject), t.resourceType === "Patient" && (a = be(t)), this.createResource({ resourceType: "Communication", status: "completed", basedOn: [be(t)], encounter: s, subject: a, sender: o2 ? be(o2) : void 0, sent: (/* @__PURE__ */ new Date()).toISOString(), payload: [{ contentString: n }] }, i);
69985
+ return t.resourceType === "Encounter" && (s = Se(t), a = t.subject), t.resourceType === "ServiceRequest" && (s = t.encounter, a = t.subject), t.resourceType === "Patient" && (a = Se(t)), this.createResource({ resourceType: "Communication", status: "completed", basedOn: [Se(t)], encounter: s, subject: a, sender: o2 ? Se(o2) : void 0, sent: (/* @__PURE__ */ new Date()).toISOString(), payload: [{ contentString: n }] }, i);
69982
69986
  }
69983
69987
  async updateResource(t, n) {
69984
69988
  if (!t.resourceType) throw new Error("Missing resourceType");
@@ -70021,13 +70025,13 @@ var Xt = class extends ee {
70021
70025
  }
70022
70026
  pushToAgent(t, n, i, o2, s, a) {
70023
70027
  let { waitTimeout: u2, returnAck: l2, ...p } = a ?? {};
70024
- return this.post(this.fhirUrl("Agent", Se(t), "$push"), { destination: typeof n == "string" ? n : A(n), body: i, contentType: o2, waitForResponse: s, ...u2 !== void 0 ? { waitTimeout: u2 } : void 0, ...l2 !== void 0 ? { returnAck: l2 } : void 0 }, O.FHIR_JSON, p);
70028
+ return this.post(this.fhirUrl("Agent", be(t), "$push"), { destination: typeof n == "string" ? n : A(n), body: i, contentType: o2, waitForResponse: s, ...u2 !== void 0 ? { waitTimeout: u2 } : void 0, ...l2 !== void 0 ? { returnAck: l2 } : void 0 }, O.FHIR_JSON, p);
70025
70029
  }
70026
70030
  getCdsServices(t) {
70027
- return this.get("/cds-services", t);
70031
+ return this.get(this.cdsServicesUrl, t);
70028
70032
  }
70029
70033
  callCdsService(t, n, i) {
70030
- return this.post(`/cds-services/${t}`, n, O.JSON, i);
70034
+ return this.post(L(this.cdsServicesUrl, t), n, O.JSON, i);
70031
70035
  }
70032
70036
  getActiveLogin() {
70033
70037
  return this.storage.getObject("activeLogin");
@@ -70096,7 +70100,7 @@ var Xt = class extends ee {
70096
70100
  }
70097
70101
  async createMedia(t, n) {
70098
70102
  let { additionalFields: i, ...o2 } = t, s = await this.createResource({ resourceType: "Media", status: "preparation", content: { contentType: t.contentType }, ...i });
70099
- o2.securityContext || (o2.securityContext = be(s));
70103
+ o2.securityContext || (o2.securityContext = Se(s));
70100
70104
  let a = await this.createAttachment(o2, n);
70101
70105
  return this.updateResource({ ...s, status: "completed", content: a });
70102
70106
  }
@@ -70105,7 +70109,7 @@ var Xt = class extends ee {
70105
70109
  }
70106
70110
  async createDocumentReference(t, n) {
70107
70111
  let { additionalFields: i, ...o2 } = t, s = await this.createResource({ resourceType: "DocumentReference", status: "current", content: [{ attachment: { contentType: t.contentType } }], ...i });
70108
- o2.securityContext || (o2.securityContext = be(s));
70112
+ o2.securityContext || (o2.securityContext = Se(s));
70109
70113
  let a = await this.createAttachment(o2, n);
70110
70114
  return this.updateResource({ ...s, content: [{ attachment: a }] });
70111
70115
  }
@@ -70122,7 +70126,7 @@ var Xt = class extends ee {
70122
70126
  return this.keyValueClient || (this.keyValueClient = new zt(this)), this.keyValueClient;
70123
70127
  }
70124
70128
  getBundle(t, n) {
70125
- return new F((async () => {
70129
+ return new N((async () => {
70126
70130
  let i = await this.get(t, n);
70127
70131
  for (let o2 of i.entry ?? g) this.cacheResource(o2.resource, n);
70128
70132
  return i;
@@ -70142,7 +70146,7 @@ var Xt = class extends ee {
70142
70146
  }));
70143
70147
  }
70144
70148
  cacheResource(t, n) {
70145
- t?.id && !t.meta?.tag?.some((i) => i.code === "SUBSETTED") && this.setCacheEntry(this.fhirUrl(t.resourceType, t.id).toString(), new F(Promise.resolve(t)), n);
70149
+ t?.id && !t.meta?.tag?.some((i) => i.code === "SUBSETTED") && this.setCacheEntry(this.fhirUrl(t.resourceType, t.id).toString(), new N(Promise.resolve(t)), n);
70146
70150
  }
70147
70151
  deleteCacheEntry(t) {
70148
70152
  this.requestCache && this.requestCache.delete(t);
@@ -70153,7 +70157,7 @@ var Xt = class extends ee {
70153
70157
  if (s.status === 401) return this.handleUnauthenticated(t, n, i);
70154
70158
  if (s.status === 204 || s.status === 304) return;
70155
70159
  let u2 = s.headers.get("content-type")?.includes("json");
70156
- if (s.status === 404 && !u2) throw new f(Vn);
70160
+ if (s.status === 404 && !u2) throw new f(Dn);
70157
70161
  let l2 = await this.parseBody(s, u2);
70158
70162
  if (s.status === 200 && i.followRedirectOnOk || s.status === 201 && i.followRedirectOnCreated) {
70159
70163
  let p = await Ki(s, l2);
@@ -70163,7 +70167,7 @@ var Xt = class extends ee {
70163
70167
  let y2 = await Ki(s, l2) ?? o2.statusUrl;
70164
70168
  if (y2) return this.pollStatus(y2, i, o2);
70165
70169
  }
70166
- if (s.status >= 400) throw new f(ht(l2));
70170
+ if (s.status >= 400) throw new f(mt(l2));
70167
70171
  return l2;
70168
70172
  }
70169
70173
  async parseBody(t, n) {
@@ -70179,7 +70183,7 @@ var Xt = class extends ee {
70179
70183
  }
70180
70184
  }
70181
70185
  async fetchWithRetry(t, n) {
70182
- t.startsWith("http") || (t = G(this.baseUrl, t));
70186
+ t.startsWith("http") || (t = L(this.baseUrl, t));
70183
70187
  let i = n?.maxRetries ?? 2;
70184
70188
  for (let o2 = 0; o2 <= i; o2++) try {
70185
70189
  this.logLevel !== "none" && this.logRequest(t, n);
@@ -70238,16 +70242,16 @@ var Xt = class extends ee {
70238
70242
  if (this.autoBatchQueue.length = 0, this.autoBatchTimerId = void 0, t.length === 1) {
70239
70243
  let o2 = t[0];
70240
70244
  try {
70241
- o2.resolve(await this.request(o2.method, G(this.fhirBaseUrl, o2.url), o2.options));
70245
+ o2.resolve(await this.request(o2.method, L(this.fhirBaseUrl, o2.url), o2.options));
70242
70246
  } catch (s) {
70243
- o2.reject(new f(ht(s)));
70247
+ o2.reject(new f(mt(s)));
70244
70248
  }
70245
70249
  return;
70246
70250
  }
70247
70251
  let n = { resourceType: "Bundle", type: "batch", entry: t.map((o2) => ({ request: { method: o2.method, url: o2.url }, resource: o2.options.body ? JSON.parse(o2.options.body) : void 0 })) }, i = await this.post(this.fhirBaseUrl, n);
70248
70252
  for (let o2 = 0; o2 < t.length; o2++) {
70249
70253
  let s = t[o2], a = i.entry?.[o2];
70250
- a?.response?.outcome && !br(a.response.outcome) ? s.reject(new f(a.response.outcome)) : s.resolve(a?.resource);
70254
+ a?.response?.outcome && !Sr(a.response.outcome) ? s.reject(new f(a.response.outcome)) : s.resolve(a?.resource);
70251
70255
  }
70252
70256
  }
70253
70257
  addFetchOptionsDefaults(t) {
@@ -70447,11 +70451,11 @@ function rc(r6, e, t, n) {
70447
70451
  function nc(r6) {
70448
70452
  return r6.status === 429 || r6.status >= 500;
70449
70453
  }
70450
- var hc = [...tt, "->", "<<", ">>", "=="];
70454
+ var mc = [...tt, "->", "<<", ">>", "=="];
70451
70455
  var xc = rt().registerInfix("->", { precedence: v.Arrow }).registerInfix(";", { precedence: v.Semicolon });
70452
70456
  var Lc = " ".repeat(2);
70453
70457
  var Nc = [...tt, "eq", "ne", "co"];
70454
- var Uc = { eq: m.EXACT, ne: m.NOT_EQUALS, co: m.CONTAINS, sw: m.STARTS_WITH, ew: void 0, gt: m.GREATER_THAN, lt: m.LESS_THAN, ge: m.GREATER_THAN_OR_EQUALS, le: m.LESS_THAN_OR_EQUALS, ap: m.APPROXIMATELY, sa: m.STARTS_AFTER, eb: m.ENDS_BEFORE, pr: m.PRESENT, po: void 0, ss: void 0, sb: void 0, in: m.IN, ni: m.NOT_IN, re: m.EQUALS, identifier: m.IDENTIFIER };
70458
+ var Uc = { eq: h.EXACT, ne: h.NOT_EQUALS, co: h.CONTAINS, sw: h.STARTS_WITH, ew: void 0, gt: h.GREATER_THAN, lt: h.LESS_THAN, ge: h.GREATER_THAN_OR_EQUALS, le: h.LESS_THAN_OR_EQUALS, ap: h.APPROXIMATELY, sa: h.STARTS_AFTER, eb: h.ENDS_BEFORE, pr: h.PRESENT, po: void 0, ss: void 0, sb: void 0, in: h.IN, ni: h.NOT_IN, re: h.EQUALS, identifier: h.IDENTIFIER };
70455
70459
  var qc = rt();
70456
70460
  var Wc = { AA: "OK", AE: "Application Error", AR: "Application Reject", CA: "Commit Accept", CE: "Commit Error", CR: "Commit Reject" };
70457
70461
  var xe = class {
@@ -70643,7 +70647,7 @@ var To = class r5 {
70643
70647
  this.write(JSON.stringify({ level: Hc[e], timestamp: (/* @__PURE__ */ new Date()).toISOString(), msg: this.prefix ? `${this.prefix}${t}` : t, ...i, ...this.metadata }));
70644
70648
  }
70645
70649
  };
70646
- function Th(r6) {
70650
+ function Tm(r6) {
70647
70651
  let e = He[r6.toUpperCase()];
70648
70652
  if (e === void 0) throw new Error(`Invalid log level: ${r6}`);
70649
70653
  return e;
@@ -70661,7 +70665,7 @@ function cr(r6, e = 0, t = 10) {
70661
70665
  }
70662
70666
  return n;
70663
70667
  }
70664
- var Sn = `${dt}/fhir/StructureDefinition/patient-preferredPharmacy`;
70668
+ var bn = `${dt}/fhir/StructureDefinition/patient-preferredPharmacy`;
70665
70669
  var ou = "https://meta.medplum.com/releases";
70666
70670
  var pr = /* @__PURE__ */ new Map();
70667
70671
  function su(r6) {
@@ -70726,8 +70730,8 @@ var import_node_net = require("node:net");
70726
70730
  var import_iconv_lite = __toESM(require_lib(), 1);
70727
70731
  var import_node_net2 = __toESM(require("node:net"), 1);
70728
70732
  var x2 = Object.defineProperty;
70729
- var b2 = (d2, i, e) => i in d2 ? x2(d2, i, { enumerable: true, configurable: true, writable: true, value: e }) : d2[i] = e;
70730
- var o = (d2, i, e) => b2(d2, typeof i != "symbol" ? i + "" : i, e);
70733
+ var b = (d2, i, e) => i in d2 ? x2(d2, i, { enumerable: true, configurable: true, writable: true, value: e }) : d2[i] = e;
70734
+ var o = (d2, i, e) => b(d2, typeof i != "symbol" ? i + "" : i, e);
70731
70735
  var m2 = class extends EventTarget {
70732
70736
  addEventListener(i, e, t) {
70733
70737
  super.addEventListener(i, e, t);
@@ -70804,7 +70808,7 @@ var g2 = class extends m2 {
70804
70808
  return;
70805
70809
  }
70806
70810
  let p = c2.message.getSegment("MSA")?.getField(1)?.toString()?.toUpperCase();
70807
- p && (h2.returnAck === Dd.APPLICATION && p === "CA" || (h2.resolve(c2.message), this.pendingMessages.delete(a)));
70811
+ p && (h2.returnAck === Vd.APPLICATION && p === "CA" || (h2.resolve(c2.message), this.pendingMessages.delete(a)));
70808
70812
  });
70809
70813
  }
70810
70814
  isClosed() {
@@ -70857,7 +70861,7 @@ var g2 = class extends m2 {
70857
70861
  let r6;
70858
70862
  t?.timeoutMs && (r6 = setTimeout(() => {
70859
70863
  this.pendingMessages.delete(c2), n(new f({ resourceType: "OperationOutcome", issue: [{ severity: "error", code: "timeout", details: { text: "Client timeout" }, diagnostics: `Request timed out after waiting ${t.timeoutMs} milliseconds for response` }] }));
70860
- }, t.timeoutMs)), this.pendingMessages.set(c2, { message: e, resolve: s, reject: n, returnAck: t?.returnAck ?? Dd.APPLICATION, timer: r6 }), this.sendImpl(e);
70864
+ }, t.timeoutMs)), this.pendingMessages.set(c2, { message: e, resolve: s, reject: n, returnAck: t?.returnAck ?? Vd.APPLICATION, timer: r6 }), this.sendImpl(e);
70861
70865
  });
70862
70866
  }
70863
70867
  async close() {
@@ -70899,7 +70903,7 @@ var g2 = class extends m2 {
70899
70903
  return this.pendingMessages.size;
70900
70904
  }
70901
70905
  };
70902
- var S = class extends m2 {
70906
+ var S2 = class extends m2 {
70903
70907
  constructor(e) {
70904
70908
  super();
70905
70909
  o(this, "options");
@@ -71391,7 +71395,7 @@ var AgentDicomChannel = class extends BaseChannel {
71391
71395
  calledAeTitle: this.association?.getCalledAeTitle()
71392
71396
  },
71393
71397
  dataset: dicomJson,
71394
- binary: binary ? be(binary) : void 0
71398
+ binary: binary ? Se(binary) : void 0
71395
71399
  };
71396
71400
  App.instance.addToWebSocketQueue({
71397
71401
  type: "agent:transmit:request",
@@ -71617,7 +71621,7 @@ function calculatePercentile(rttSamples, percentile) {
71617
71621
  if (rttSamples.length === 0) {
71618
71622
  return -1;
71619
71623
  }
71620
- const sorted = [...rttSamples].sort((a, b3) => a - b3);
71624
+ const sorted = [...rttSamples].sort((a, b2) => a - b2);
71621
71625
  const index = Math.ceil(percentile / 100 * sorted.length) - 1;
71622
71626
  return sorted[Math.max(0, index)];
71623
71627
  }
@@ -71930,7 +71934,7 @@ function shouldSendAppLevelAck(options) {
71930
71934
  }
71931
71935
 
71932
71936
  // src/enhanced-hl7-client.ts
71933
- var EnhancedHl7Client = class extends S {
71937
+ var EnhancedHl7Client = class extends S2 {
71934
71938
  constructor(options) {
71935
71939
  super(options);
71936
71940
  __publicField(this, "stats");
@@ -72288,7 +72292,7 @@ function parseLoggerConfigFromArgs(args) {
72288
72292
  let configValue;
72289
72293
  if (settingName === "logLevel") {
72290
72294
  try {
72291
- configValue = Th(propVal);
72295
+ configValue = Tm(propVal);
72292
72296
  } catch (err) {
72293
72297
  warnings.push(`Error while parsing ${propName}: ${_e(err)}`);
72294
72298
  }
@@ -73467,7 +73471,7 @@ ${result}`);
73467
73471
  } catch (err) {
73468
73472
  this.log.warn(`${_e(err)} - falling back to default return ACK behavior of 'first'.`);
73469
73473
  }
73470
- const returnAck = msgReturnAck ?? defaultReturnAck ?? Dd.FIRST;
73474
+ const returnAck = msgReturnAck ?? defaultReturnAck ?? Vd.FIRST;
73471
73475
  let pool;
73472
73476
  if (this.hl7Clients.has(message.remote)) {
73473
73477
  pool = this.hl7Clients.get(message.remote);
@@ -73565,10 +73569,10 @@ ${result}`);
73565
73569
  }
73566
73570
  const normalizedValue = rawValue.toLowerCase();
73567
73571
  if (normalizedValue === "application") {
73568
- return Dd.APPLICATION;
73572
+ return Vd.APPLICATION;
73569
73573
  }
73570
73574
  if (normalizedValue === "first") {
73571
- return Dd.FIRST;
73575
+ return Vd.FIRST;
73572
73576
  }
73573
73577
  throw new Error(`Invalid value for returnAck; expected: 'first' or 'application', received: ${rawValue}`);
73574
73578
  }
@@ -73631,7 +73635,7 @@ async function agentMain(argv) {
73631
73635
  for (const warning of warnings) {
73632
73636
  mainLogger.warn(warning);
73633
73637
  }
73634
- const app = new App(medplum, agentId, args.logLevel ? Th(args.logLevel) : void 0, {
73638
+ const app = new App(medplum, agentId, args.logLevel ? Tm(args.logLevel) : void 0, {
73635
73639
  mainLogger,
73636
73640
  channelLogger
73637
73641
  });