@medplum/agent 5.0.15 → 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.
- package/dist/cjs/index.cjs +949 -945
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -535,7 +535,7 @@ var require_utf32 = __commonJS({
|
|
|
535
535
|
return this.decoder.end();
|
|
536
536
|
};
|
|
537
537
|
function detectEncoding(bufs, defaultEncoding) {
|
|
538
|
-
var
|
|
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
|
-
|
|
549
|
-
if (
|
|
548
|
+
b2.push(buf[j2]);
|
|
549
|
+
if (b2.length === 4) {
|
|
550
550
|
if (charsProcessed === 0) {
|
|
551
|
-
if (
|
|
551
|
+
if (b2[0] === 255 && b2[1] === 254 && b2[2] === 0 && b2[3] === 0) {
|
|
552
552
|
return "utf-32le";
|
|
553
553
|
}
|
|
554
|
-
if (
|
|
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 (
|
|
559
|
-
if (
|
|
560
|
-
if (
|
|
561
|
-
if ((
|
|
562
|
-
|
|
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
|
|
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
|
-
|
|
698
|
-
if (
|
|
697
|
+
b2.push(buf[j2]);
|
|
698
|
+
if (b2.length === 2) {
|
|
699
699
|
if (charsProcessed === 0) {
|
|
700
|
-
if (
|
|
701
|
-
if (
|
|
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 (
|
|
704
|
-
if (
|
|
705
|
-
|
|
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,
|
|
3972
|
-
if (typeof a === "number" && typeof
|
|
3973
|
-
return a ===
|
|
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(
|
|
3976
|
+
const bnum = numeric.test(b2);
|
|
3977
3977
|
if (anum && bnum) {
|
|
3978
3978
|
a = +a;
|
|
3979
|
-
|
|
3979
|
+
b2 = +b2;
|
|
3980
3980
|
}
|
|
3981
|
-
return a ===
|
|
3981
|
+
return a === b2 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b2 ? -1 : 1;
|
|
3982
3982
|
};
|
|
3983
|
-
var rcompareIdentifiers = (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
|
|
4116
|
-
debug("prerelease compare", i, a,
|
|
4117
|
-
if (a === 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 (
|
|
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 ===
|
|
4123
|
+
} else if (a === b2) {
|
|
4124
4124
|
continue;
|
|
4125
4125
|
} else {
|
|
4126
|
-
return compareIdentifiers(a,
|
|
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
|
|
4138
|
-
debug("build compare", i, a,
|
|
4139
|
-
if (a === 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 (
|
|
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 ===
|
|
4145
|
+
} else if (a === b2) {
|
|
4146
4146
|
continue;
|
|
4147
4147
|
} else {
|
|
4148
|
-
return compareIdentifiers(a,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
4464
|
+
var compareBuild = (a, b2, loose) => {
|
|
4465
4465
|
const versionA = new SemVer(a, loose);
|
|
4466
|
-
const versionB = new SemVer(
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
4570
|
-
|
|
4569
|
+
if (typeof b2 === "object") {
|
|
4570
|
+
b2 = b2.version;
|
|
4571
4571
|
}
|
|
4572
|
-
return a ===
|
|
4572
|
+
return a === b2;
|
|
4573
4573
|
case "!==":
|
|
4574
4574
|
if (typeof a === "object") {
|
|
4575
4575
|
a = a.version;
|
|
4576
4576
|
}
|
|
4577
|
-
if (typeof
|
|
4578
|
-
|
|
4577
|
+
if (typeof b2 === "object") {
|
|
4578
|
+
b2 = b2.version;
|
|
4579
4579
|
}
|
|
4580
|
-
return a !==
|
|
4580
|
+
return a !== b2;
|
|
4581
4581
|
case "":
|
|
4582
4582
|
case "=":
|
|
4583
4583
|
case "==":
|
|
4584
|
-
return eq(a,
|
|
4584
|
+
return eq(a, b2, loose);
|
|
4585
4585
|
case "!=":
|
|
4586
|
-
return neq(a,
|
|
4586
|
+
return neq(a, b2, loose);
|
|
4587
4587
|
case ">":
|
|
4588
|
-
return gt(a,
|
|
4588
|
+
return gt(a, b2, loose);
|
|
4589
4589
|
case ">=":
|
|
4590
|
-
return gte(a,
|
|
4590
|
+
return gte(a, b2, loose);
|
|
4591
4591
|
case "<":
|
|
4592
|
-
return lt4(a,
|
|
4592
|
+
return lt4(a, b2, loose);
|
|
4593
4593
|
case "<=":
|
|
4594
|
-
return lte(a,
|
|
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
|
|
4765
|
-
range = range.replace(
|
|
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,
|
|
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,
|
|
5634
|
+
var higherGT = (a, b2, options) => {
|
|
5635
5635
|
if (!a) {
|
|
5636
|
-
return
|
|
5636
|
+
return b2;
|
|
5637
5637
|
}
|
|
5638
|
-
const comp = compare(a.semver,
|
|
5639
|
-
return comp > 0 ? a : comp < 0 ?
|
|
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,
|
|
5641
|
+
var lowerLT = (a, b2, options) => {
|
|
5642
5642
|
if (!a) {
|
|
5643
|
-
return
|
|
5643
|
+
return b2;
|
|
5644
5644
|
}
|
|
5645
|
-
const comp = compare(a.semver,
|
|
5646
|
-
return comp < 0 ? a : comp > 0 ?
|
|
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,
|
|
10805
|
-
s.pending_buf[s.pending++] =
|
|
10804
|
+
const put_byte = (s, b2) => {
|
|
10805
|
+
s.pending_buf[s.pending++] = b2;
|
|
10806
10806
|
};
|
|
10807
|
-
const putShortMSB = (s,
|
|
10808
|
-
s.pending_buf[s.pending++] =
|
|
10809
|
-
s.pending_buf[s.pending++] =
|
|
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;
|
|
@@ -16094,8 +16094,8 @@ var require_dcmjs = __commonJS({
|
|
|
16094
16094
|
key: "writeBytes",
|
|
16095
16095
|
value: function writeBytes(stream, value, writeOptions) {
|
|
16096
16096
|
var _this8 = this;
|
|
16097
|
-
var val = Array.isArray(value) ? value.map(function(
|
|
16098
|
-
return _this8.convertToString(
|
|
16097
|
+
var val = Array.isArray(value) ? value.map(function(ds2) {
|
|
16098
|
+
return _this8.convertToString(ds2);
|
|
16099
16099
|
}) : [this.convertToString(value)];
|
|
16100
16100
|
return _get(_getPrototypeOf(DecimalString2.prototype), "writeBytes", this).call(this, stream, val, writeOptions);
|
|
16101
16101
|
}
|
|
@@ -16217,8 +16217,8 @@ var require_dcmjs = __commonJS({
|
|
|
16217
16217
|
key: "writeBytes",
|
|
16218
16218
|
value: function writeBytes(stream, value, writeOptions) {
|
|
16219
16219
|
var _this11 = this;
|
|
16220
|
-
var val = Array.isArray(value) ? value.map(function(
|
|
16221
|
-
return _this11.convertToString(
|
|
16220
|
+
var val = Array.isArray(value) ? value.map(function(is2) {
|
|
16221
|
+
return _this11.convertToString(is2);
|
|
16222
16222
|
}) : [this.convertToString(value)];
|
|
16223
16223
|
return _get(_getPrototypeOf(IntegerString2.prototype), "writeBytes", this).call(this, stream, val, writeOptions);
|
|
16224
16224
|
}
|
|
@@ -16974,7 +16974,7 @@ var require_dcmjs = __commonJS({
|
|
|
16974
16974
|
}
|
|
16975
16975
|
}, {
|
|
16976
16976
|
key: "is",
|
|
16977
|
-
value: function
|
|
16977
|
+
value: function is2(t) {
|
|
16978
16978
|
return this.value == t;
|
|
16979
16979
|
}
|
|
16980
16980
|
/**
|
|
@@ -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
|
|
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(
|
|
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",
|
|
@@ -18408,8 +18408,8 @@ var require_dcmjs = __commonJS({
|
|
|
18408
18408
|
}, {
|
|
18409
18409
|
key: "isMultiframeDataset",
|
|
18410
18410
|
value: function isMultiframeDataset() {
|
|
18411
|
-
var
|
|
18412
|
-
var sopClassUID =
|
|
18411
|
+
var ds2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.dataset;
|
|
18412
|
+
var sopClassUID = ds2.SOPClassUID.replace(/[^0-9.]/g, "");
|
|
18413
18413
|
return Normalizer2.isMultiframeSOPClassUID(sopClassUID);
|
|
18414
18414
|
}
|
|
18415
18415
|
}, {
|
|
@@ -18449,16 +18449,16 @@ var require_dcmjs = __commonJS({
|
|
|
18449
18449
|
}
|
|
18450
18450
|
this.derivation = new DerivedImage(this.datasets);
|
|
18451
18451
|
this.dataset = this.derivation.dataset;
|
|
18452
|
-
var
|
|
18452
|
+
var ds2 = this.dataset;
|
|
18453
18453
|
var referenceDataset = this.datasets[0];
|
|
18454
|
-
|
|
18455
|
-
|
|
18456
|
-
|
|
18457
|
-
|
|
18458
|
-
|
|
18459
|
-
|
|
18460
|
-
|
|
18461
|
-
|
|
18454
|
+
ds2.NumberOfFrames = this.datasets.length;
|
|
18455
|
+
ds2.SOPClassUID = referenceDataset.SOPClassUID;
|
|
18456
|
+
ds2.Rows = referenceDataset.Rows;
|
|
18457
|
+
ds2.Columns = referenceDataset.Columns;
|
|
18458
|
+
ds2.BitsAllocated = referenceDataset.BitsAllocated;
|
|
18459
|
+
ds2.PixelRepresentation = referenceDataset.PixelRepresentation;
|
|
18460
|
+
ds2.RescaleSlope = referenceDataset.RescaleSlope || "1";
|
|
18461
|
+
ds2.RescaleIntercept = referenceDataset.RescaleIntercept || "0";
|
|
18462
18462
|
var referencePosition = referenceDataset.ImagePositionPatient;
|
|
18463
18463
|
var rowVector = referenceDataset.ImageOrientationPatient.slice(0, 3);
|
|
18464
18464
|
var columnVector = referenceDataset.ImageOrientationPatient.slice(3, 6);
|
|
@@ -18470,46 +18470,46 @@ 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,
|
|
18474
|
-
return
|
|
18473
|
+
distanceDatasetPairs.sort(function(a, b2) {
|
|
18474
|
+
return b2[0] - a[0];
|
|
18475
18475
|
});
|
|
18476
|
-
if (
|
|
18476
|
+
if (ds2.BitsAllocated !== 16) {
|
|
18477
18477
|
log2.error("Only works with 16 bit data, not " + String(this.dataset.BitsAllocated));
|
|
18478
18478
|
}
|
|
18479
18479
|
if (referenceDataset._vrMap && !referenceDataset._vrMap.PixelData) {
|
|
18480
18480
|
log2.warn("No vr map given for pixel data, using OW");
|
|
18481
|
-
|
|
18481
|
+
ds2._vrMap = {
|
|
18482
18482
|
PixelData: "OW"
|
|
18483
18483
|
};
|
|
18484
18484
|
} else {
|
|
18485
|
-
|
|
18485
|
+
ds2._vrMap = {
|
|
18486
18486
|
PixelData: referenceDataset._vrMap.PixelData
|
|
18487
18487
|
};
|
|
18488
18488
|
}
|
|
18489
18489
|
var frameSize = referenceDataset.PixelData.byteLength;
|
|
18490
|
-
|
|
18490
|
+
ds2.PixelData = new ArrayBuffer(ds2.NumberOfFrames * frameSize);
|
|
18491
18491
|
var frame = 0;
|
|
18492
18492
|
distanceDatasetPairs.forEach(function(pair) {
|
|
18493
18493
|
var dataset = pair[1];
|
|
18494
18494
|
var pixels = new Uint16Array(dataset.PixelData);
|
|
18495
|
-
var frameView = new Uint16Array(
|
|
18495
|
+
var frameView = new Uint16Array(ds2.PixelData, frame * frameSize, frameSize / 2);
|
|
18496
18496
|
try {
|
|
18497
18497
|
frameView.set(pixels);
|
|
18498
18498
|
} catch (e) {
|
|
18499
18499
|
if (e instanceof RangeError) {
|
|
18500
|
-
var message2 = "Error inserting pixels in PixelData\n" + "frameSize ".concat(frameSize, "\n") + "NumberOfFrames ".concat(
|
|
18500
|
+
var message2 = "Error inserting pixels in PixelData\n" + "frameSize ".concat(frameSize, "\n") + "NumberOfFrames ".concat(ds2.NumberOfFrames, "\n") + "pair ".concat(pair, "\n") + "dataset PixelData size ".concat(dataset.PixelData.length);
|
|
18501
18501
|
log2.error(message2);
|
|
18502
18502
|
}
|
|
18503
18503
|
}
|
|
18504
18504
|
frame++;
|
|
18505
18505
|
});
|
|
18506
|
-
if (
|
|
18506
|
+
if (ds2.NumberOfFrames < 2) {
|
|
18507
18507
|
log2.error("Cannot populate shared groups uniquely without multiple frames");
|
|
18508
18508
|
}
|
|
18509
18509
|
var _distanceDatasetPairs = _slicedToArray(distanceDatasetPairs[0], 2), distance0 = _distanceDatasetPairs[0], dataset0 = _distanceDatasetPairs[1];
|
|
18510
18510
|
var distance1 = distanceDatasetPairs[1][0];
|
|
18511
18511
|
var SpacingBetweenSlices = Math.abs(distance1 - distance0);
|
|
18512
|
-
|
|
18512
|
+
ds2.SharedFunctionalGroupsSequence = {
|
|
18513
18513
|
PlaneOrientationSequence: {
|
|
18514
18514
|
ImageOrientationPatient: dataset0.ImageOrientationPatient
|
|
18515
18515
|
},
|
|
@@ -18519,14 +18519,14 @@ var require_dcmjs = __commonJS({
|
|
|
18519
18519
|
SliceThickness: SpacingBetweenSlices
|
|
18520
18520
|
}
|
|
18521
18521
|
};
|
|
18522
|
-
|
|
18522
|
+
ds2.ReferencedSeriesSequence = {
|
|
18523
18523
|
SeriesInstanceUID: dataset0.SeriesInstanceUID,
|
|
18524
18524
|
ReferencedInstanceSequence: []
|
|
18525
18525
|
};
|
|
18526
|
-
|
|
18526
|
+
ds2.PerFrameFunctionalGroupsSequence = [];
|
|
18527
18527
|
distanceDatasetPairs.forEach(function(pair) {
|
|
18528
18528
|
var dataset = pair[1];
|
|
18529
|
-
|
|
18529
|
+
ds2.PerFrameFunctionalGroupsSequence.push({
|
|
18530
18530
|
PlanePositionSequence: {
|
|
18531
18531
|
ImagePositionPatient: dataset.ImagePositionPatient
|
|
18532
18532
|
},
|
|
@@ -18535,7 +18535,7 @@ var require_dcmjs = __commonJS({
|
|
|
18535
18535
|
WindowWidth: dataset.WindowWidth
|
|
18536
18536
|
}
|
|
18537
18537
|
});
|
|
18538
|
-
|
|
18538
|
+
ds2.ReferencedSeriesSequence.ReferencedInstanceSequence.push({
|
|
18539
18539
|
ReferencedSOPClassUID: dataset.SOPClassUID,
|
|
18540
18540
|
ReferencedSOPInstanceUID: dataset.SOPInstanceUID
|
|
18541
18541
|
});
|
|
@@ -18555,29 +18555,29 @@ var require_dcmjs = __commonJS({
|
|
|
18555
18555
|
}, {
|
|
18556
18556
|
key: "normalizeMultiframe",
|
|
18557
18557
|
value: function normalizeMultiframe() {
|
|
18558
|
-
var
|
|
18559
|
-
if (!
|
|
18558
|
+
var ds2 = this.dataset;
|
|
18559
|
+
if (!ds2.NumberOfFrames) {
|
|
18560
18560
|
log2.error("Missing number or frames not supported");
|
|
18561
18561
|
return;
|
|
18562
18562
|
}
|
|
18563
|
-
if (!
|
|
18564
|
-
|
|
18563
|
+
if (!ds2.PixelRepresentation) {
|
|
18564
|
+
ds2.PixelRepresentation = 1;
|
|
18565
18565
|
}
|
|
18566
|
-
if (!
|
|
18567
|
-
|
|
18566
|
+
if (!ds2.StudyID || ds2.StudyID === "") {
|
|
18567
|
+
ds2.StudyID = "No Study ID";
|
|
18568
18568
|
}
|
|
18569
18569
|
var validLateralities = ["R", "L"];
|
|
18570
|
-
if (validLateralities.indexOf(
|
|
18571
|
-
delete
|
|
18570
|
+
if (validLateralities.indexOf(ds2.Laterality) === -1) {
|
|
18571
|
+
delete ds2.Laterality;
|
|
18572
18572
|
}
|
|
18573
|
-
if (!
|
|
18574
|
-
|
|
18573
|
+
if (!ds2.PresentationLUTShape) {
|
|
18574
|
+
ds2.PresentationLUTShape = "IDENTITY";
|
|
18575
18575
|
}
|
|
18576
|
-
if (!
|
|
18576
|
+
if (!ds2.SharedFunctionalGroupsSequence) {
|
|
18577
18577
|
log2.error("Can only process multiframe data with SharedFunctionalGroupsSequence");
|
|
18578
18578
|
}
|
|
18579
|
-
if (
|
|
18580
|
-
|
|
18579
|
+
if (ds2.BodyPartExamined === "PROSTATE") {
|
|
18580
|
+
ds2.SharedFunctionalGroupsSequence.FrameAnatomySequence = {
|
|
18581
18581
|
AnatomicRegionSequence: {
|
|
18582
18582
|
CodeValue: "T-9200B",
|
|
18583
18583
|
CodingSchemeDesignator: "SRT",
|
|
@@ -18586,17 +18586,17 @@ var require_dcmjs = __commonJS({
|
|
|
18586
18586
|
FrameLaterality: "U"
|
|
18587
18587
|
};
|
|
18588
18588
|
}
|
|
18589
|
-
var rescaleIntercept =
|
|
18590
|
-
var rescaleSlope =
|
|
18591
|
-
|
|
18589
|
+
var rescaleIntercept = ds2.RescaleIntercept || 0;
|
|
18590
|
+
var rescaleSlope = ds2.RescaleSlope || 1;
|
|
18591
|
+
ds2.SharedFunctionalGroupsSequence.PixelValueTransformationSequence = {
|
|
18592
18592
|
RescaleIntercept: rescaleIntercept,
|
|
18593
18593
|
RescaleSlope: rescaleSlope,
|
|
18594
18594
|
RescaleType: "US"
|
|
18595
18595
|
};
|
|
18596
18596
|
var frameNumber = 1;
|
|
18597
18597
|
this.datasets.forEach(function(dataset) {
|
|
18598
|
-
if (
|
|
18599
|
-
|
|
18598
|
+
if (ds2.NumberOfFrames === 1) ds2.PerFrameFunctionalGroupsSequence = [ds2.PerFrameFunctionalGroupsSequence];
|
|
18599
|
+
ds2.PerFrameFunctionalGroupsSequence[frameNumber - 1].FrameContentSequence = {
|
|
18600
18600
|
FrameAcquisitionDuration: 0,
|
|
18601
18601
|
StackID: 1,
|
|
18602
18602
|
InStackPositionNumber: frameNumber,
|
|
@@ -18604,30 +18604,30 @@ var require_dcmjs = __commonJS({
|
|
|
18604
18604
|
};
|
|
18605
18605
|
var frameTime = dataset.AcquisitionDate + dataset.AcquisitionTime;
|
|
18606
18606
|
if (!isNaN(frameTime)) {
|
|
18607
|
-
var frameContentSequence =
|
|
18607
|
+
var frameContentSequence = ds2.PerFrameFunctionalGroupsSequence[frameNumber - 1].FrameContentSequence;
|
|
18608
18608
|
frameContentSequence.FrameAcquisitionDateTime = frameTime;
|
|
18609
18609
|
frameContentSequence.FrameReferenceDateTime = frameTime;
|
|
18610
18610
|
}
|
|
18611
18611
|
frameNumber++;
|
|
18612
18612
|
});
|
|
18613
|
-
if (
|
|
18614
|
-
if (!Array.isArray(
|
|
18615
|
-
|
|
18613
|
+
if (ds2.WindowCenter && ds2.WindowWidth) {
|
|
18614
|
+
if (!Array.isArray(ds2.WindowCenter)) {
|
|
18615
|
+
ds2.WindowCenter = [ds2.WindowCenter];
|
|
18616
18616
|
}
|
|
18617
|
-
if (!Array.isArray(
|
|
18618
|
-
|
|
18617
|
+
if (!Array.isArray(ds2.WindowWidth)) {
|
|
18618
|
+
ds2.WindowWidth = [ds2.WindowWidth];
|
|
18619
18619
|
}
|
|
18620
18620
|
}
|
|
18621
|
-
if (!
|
|
18622
|
-
|
|
18623
|
-
|
|
18624
|
-
if (
|
|
18621
|
+
if (!ds2.WindowCenter || !ds2.WindowWidth) {
|
|
18622
|
+
ds2.WindowCenter = [];
|
|
18623
|
+
ds2.WindowWidth = [];
|
|
18624
|
+
if (ds2.PerFrameFunctionalGroupsSequence) {
|
|
18625
18625
|
var wcww = {
|
|
18626
18626
|
center: 0,
|
|
18627
18627
|
width: 0,
|
|
18628
18628
|
count: 0
|
|
18629
18629
|
};
|
|
18630
|
-
|
|
18630
|
+
ds2.PerFrameFunctionalGroupsSequence.forEach(function(functionalGroup) {
|
|
18631
18631
|
if (functionalGroup.FrameVOILUT) {
|
|
18632
18632
|
var wc = functionalGroup.FrameVOILUTSequence.WindowCenter;
|
|
18633
18633
|
var ww = functionalGroup.FrameVOILUTSequence.WindowWidth;
|
|
@@ -18645,22 +18645,22 @@ var require_dcmjs = __commonJS({
|
|
|
18645
18645
|
}
|
|
18646
18646
|
});
|
|
18647
18647
|
if (wcww.count > 0) {
|
|
18648
|
-
|
|
18649
|
-
|
|
18648
|
+
ds2.WindowCenter.push(String(wcww.center / wcww.count));
|
|
18649
|
+
ds2.WindowWidth.push(String(wcww.width / wcww.count));
|
|
18650
18650
|
}
|
|
18651
18651
|
}
|
|
18652
18652
|
}
|
|
18653
|
-
if (
|
|
18654
|
-
|
|
18653
|
+
if (ds2.WindowCenter.length === 0) {
|
|
18654
|
+
ds2.WindowCenter = [300];
|
|
18655
18655
|
}
|
|
18656
|
-
if (
|
|
18657
|
-
|
|
18656
|
+
if (ds2.WindowWidth.length === 0) {
|
|
18657
|
+
ds2.WindowWidth = [500];
|
|
18658
18658
|
}
|
|
18659
18659
|
}
|
|
18660
18660
|
}], [{
|
|
18661
18661
|
key: "vec3CrossProduct",
|
|
18662
|
-
value: function vec3CrossProduct(a,
|
|
18663
|
-
var ax = a[0], ay = a[1], az = a[2], bx =
|
|
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,
|
|
18672
|
+
value: function vec3Subtract(a, b2) {
|
|
18673
18673
|
var out = [];
|
|
18674
|
-
out[0] = a[0] -
|
|
18675
|
-
out[1] = a[1] -
|
|
18676
|
-
out[2] = a[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,
|
|
18682
|
-
return a[0] *
|
|
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;
|
|
@@ -18700,12 +18700,12 @@ var require_dcmjs = __commonJS({
|
|
|
18700
18700
|
key: "normalizeMultiframe",
|
|
18701
18701
|
value: function normalizeMultiframe() {
|
|
18702
18702
|
_get(_getPrototypeOf(MRImageNormalizer2.prototype), "normalizeMultiframe", this).call(this);
|
|
18703
|
-
var
|
|
18704
|
-
if (!
|
|
18705
|
-
|
|
18703
|
+
var ds2 = this.dataset;
|
|
18704
|
+
if (!ds2.ImageType || !ds2.ImageType.constructor || ds2.ImageType.constructor.name != "Array" || ds2.ImageType.length != 4) {
|
|
18705
|
+
ds2.ImageType = ["ORIGINAL", "PRIMARY", "OTHER", "NONE"];
|
|
18706
18706
|
}
|
|
18707
|
-
|
|
18708
|
-
FrameType:
|
|
18707
|
+
ds2.SharedFunctionalGroupsSequence.MRImageFrameTypeSequence = {
|
|
18708
|
+
FrameType: ds2.ImageType,
|
|
18709
18709
|
PixelPresentation: "MONOCHROME",
|
|
18710
18710
|
VolumetricProperties: "VOLUME",
|
|
18711
18711
|
VolumeBasedCalculationTechnique: "NONE",
|
|
@@ -18830,9 +18830,9 @@ var require_dcmjs = __commonJS({
|
|
|
18830
18830
|
key: "normalize",
|
|
18831
18831
|
value: function normalize3() {
|
|
18832
18832
|
_get(_getPrototypeOf(PMImageNormalizer2.prototype), "normalize", this).call(this);
|
|
18833
|
-
var
|
|
18834
|
-
if (
|
|
18835
|
-
log2.error("Only works with 32 bit data, not " + String(
|
|
18833
|
+
var ds2 = this.datasets[0];
|
|
18834
|
+
if (ds2.BitsAllocated !== 32) {
|
|
18835
|
+
log2.error("Only works with 32 bit data, not " + String(ds2.BitsAllocated));
|
|
18836
18836
|
}
|
|
18837
18837
|
}
|
|
18838
18838
|
}]);
|
|
@@ -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,
|
|
20772
|
-
return a[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,
|
|
21018
|
-
return [a[1] *
|
|
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,
|
|
21102
|
+
function nearlyEqual(a, b2, epsilon) {
|
|
21103
21103
|
var absA = Math.abs(a);
|
|
21104
|
-
var absB = Math.abs(
|
|
21105
|
-
var diff = Math.abs(a -
|
|
21106
|
-
if (a ===
|
|
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 ||
|
|
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
|
|
21510
|
+
var N2 = byteValue + 1;
|
|
21511
21511
|
var next = i + 1;
|
|
21512
|
-
for (var p = next; p < next +
|
|
21512
|
+
for (var p = next; p < next + N2; p++) {
|
|
21513
21513
|
pixelData[pixelDataIndex] = uInt8Frame[p];
|
|
21514
21514
|
pixelDataIndex++;
|
|
21515
21515
|
}
|
|
21516
|
-
i +=
|
|
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,
|
|
23581
|
-
out[0] = a[0] +
|
|
23582
|
-
out[1] = a[1] +
|
|
23583
|
-
out[2] = a[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,
|
|
23587
|
-
out[0] = a[0] -
|
|
23588
|
-
out[1] = a[1] -
|
|
23589
|
-
out[2] = a[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,
|
|
23593
|
-
out[0] = a[0] *
|
|
23594
|
-
out[1] = a[1] *
|
|
23595
|
-
out[2] = a[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,
|
|
23599
|
-
out[0] = a[0] /
|
|
23600
|
-
out[1] = a[1] /
|
|
23601
|
-
out[2] = a[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,
|
|
23617
|
-
out[0] = Math.min(a[0],
|
|
23618
|
-
out[1] = Math.min(a[1],
|
|
23619
|
-
out[2] = Math.min(a[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,
|
|
23623
|
-
out[0] = Math.max(a[0],
|
|
23624
|
-
out[1] = Math.max(a[1],
|
|
23625
|
-
out[2] = Math.max(a[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,
|
|
23635
|
-
out[0] = a[0] *
|
|
23636
|
-
out[1] = a[1] *
|
|
23637
|
-
out[2] = a[2] *
|
|
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,
|
|
23641
|
-
out[0] = a[0] +
|
|
23642
|
-
out[1] = a[1] +
|
|
23643
|
-
out[2] = a[2] +
|
|
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,
|
|
23647
|
-
var x3 =
|
|
23648
|
-
var y2 =
|
|
23649
|
-
var z =
|
|
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,
|
|
23653
|
-
var x3 =
|
|
23654
|
-
var y2 =
|
|
23655
|
-
var z =
|
|
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,
|
|
23690
|
-
return a[0] *
|
|
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,
|
|
23692
|
+
function cross$1(out, a, b2) {
|
|
23693
23693
|
var ax = a[0], ay = a[1], az = a[2];
|
|
23694
|
-
var bx =
|
|
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,
|
|
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 * (
|
|
23705
|
-
out[1] = ay + t * (
|
|
23706
|
-
out[2] = az + t * (
|
|
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,
|
|
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 +
|
|
23716
|
-
out[1] = a[1] * factor1 +
|
|
23717
|
-
out[2] = a[2] * factor1 +
|
|
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,
|
|
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 +
|
|
23729
|
-
out[1] = a[1] * factor1 +
|
|
23730
|
-
out[2] = a[2] * factor1 +
|
|
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,
|
|
23776
|
+
function rotateX(out, a, b2, rad) {
|
|
23777
23777
|
var p = [], r6 = [];
|
|
23778
|
-
p[0] = a[0] -
|
|
23779
|
-
p[1] = a[1] -
|
|
23780
|
-
p[2] = a[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] +
|
|
23785
|
-
out[1] = r6[1] +
|
|
23786
|
-
out[2] = r6[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,
|
|
23789
|
+
function rotateY(out, a, b2, rad) {
|
|
23790
23790
|
var p = [], r6 = [];
|
|
23791
|
-
p[0] = a[0] -
|
|
23792
|
-
p[1] = a[1] -
|
|
23793
|
-
p[2] = a[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] +
|
|
23798
|
-
out[1] = r6[1] +
|
|
23799
|
-
out[2] = r6[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,
|
|
23802
|
+
function rotateZ(out, a, b2, rad) {
|
|
23803
23803
|
var p = [], r6 = [];
|
|
23804
|
-
p[0] = a[0] -
|
|
23805
|
-
p[1] = a[1] -
|
|
23806
|
-
p[2] = a[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] +
|
|
23811
|
-
out[1] = r6[1] +
|
|
23812
|
-
out[2] = r6[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,
|
|
23816
|
-
var ax = a[0], ay = a[1], az = a[2], bx =
|
|
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,
|
|
23829
|
-
return a[0] ===
|
|
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,
|
|
23831
|
+
function equals(a, b2) {
|
|
23832
23832
|
var a0 = a[0], a1 = a[1], a2 = a[2];
|
|
23833
|
-
var b0 =
|
|
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,
|
|
24371
|
-
out[0] = a[0] -
|
|
24372
|
-
out[1] = a[1] -
|
|
24373
|
-
out[2] = a[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,
|
|
26960
|
-
return a +
|
|
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,
|
|
27002
|
-
return a +
|
|
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,
|
|
27196
|
-
return a +
|
|
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'.");
|
|
@@ -29204,17 +29204,17 @@ var require_decorator = __commonJS({
|
|
|
29204
29204
|
return mergedObject;
|
|
29205
29205
|
};
|
|
29206
29206
|
var mergePropertyAndMethodDecorators = (d1, d2) => {
|
|
29207
|
-
var _a2, _b,
|
|
29207
|
+
var _a2, _b, _c, _d;
|
|
29208
29208
|
return {
|
|
29209
29209
|
property: mergeObjectsOfDecorators((_a2 = d1 === null || d1 === void 0 ? void 0 : d1.property) !== null && _a2 !== void 0 ? _a2 : {}, (_b = d2 === null || d2 === void 0 ? void 0 : d2.property) !== null && _b !== void 0 ? _b : {}),
|
|
29210
|
-
method: mergeObjectsOfDecorators((
|
|
29210
|
+
method: mergeObjectsOfDecorators((_c = d1 === null || d1 === void 0 ? void 0 : d1.method) !== null && _c !== void 0 ? _c : {}, (_d = d2 === null || d2 === void 0 ? void 0 : d2.method) !== null && _d !== void 0 ? _d : {})
|
|
29211
29211
|
};
|
|
29212
29212
|
};
|
|
29213
29213
|
var mergeDecorators = (d1, d2) => {
|
|
29214
|
-
var _a2, _b,
|
|
29214
|
+
var _a2, _b, _c, _d, _e2, _f;
|
|
29215
29215
|
return {
|
|
29216
29216
|
class: (0, util_1.unique)([...(_a2 = d1 === null || d1 === void 0 ? void 0 : d1.class) !== null && _a2 !== void 0 ? _a2 : [], ...(_b = d2 === null || d2 === void 0 ? void 0 : d2.class) !== null && _b !== void 0 ? _b : []]),
|
|
29217
|
-
static: mergePropertyAndMethodDecorators((
|
|
29217
|
+
static: mergePropertyAndMethodDecorators((_c = d1 === null || d1 === void 0 ? void 0 : d1.static) !== null && _c !== void 0 ? _c : {}, (_d = d2 === null || d2 === void 0 ? void 0 : d2.static) !== null && _d !== void 0 ? _d : {}),
|
|
29218
29218
|
instance: mergePropertyAndMethodDecorators((_e2 = d1 === null || d1 === void 0 ? void 0 : d1.instance) !== null && _e2 !== void 0 ? _e2 : {}, (_f = d2 === null || d2 === void 0 ? void 0 : d2.instance) !== null && _f !== void 0 ? _f : {})
|
|
29219
29219
|
};
|
|
29220
29220
|
};
|
|
@@ -29275,7 +29275,7 @@ var require_decorator = __commonJS({
|
|
|
29275
29275
|
return decorator(clazz);
|
|
29276
29276
|
});
|
|
29277
29277
|
var decorateMember = (decorator) => ((object, key, ...otherArgs) => {
|
|
29278
|
-
var _a2, _b,
|
|
29278
|
+
var _a2, _b, _c;
|
|
29279
29279
|
const decoratorTargetType = typeof object === "function" ? "static" : "instance";
|
|
29280
29280
|
const decoratorType = typeof object[key] === "function" ? "method" : "property";
|
|
29281
29281
|
const clazz = decoratorTargetType === "static" ? object : object.constructor;
|
|
@@ -29284,7 +29284,7 @@ var require_decorator = __commonJS({
|
|
|
29284
29284
|
decoratorsForClass[decoratorTargetType] = decoratorsForTargetType;
|
|
29285
29285
|
let decoratorsForType = (_b = decoratorsForTargetType === null || decoratorsForTargetType === void 0 ? void 0 : decoratorsForTargetType[decoratorType]) !== null && _b !== void 0 ? _b : {};
|
|
29286
29286
|
decoratorsForTargetType[decoratorType] = decoratorsForType;
|
|
29287
|
-
let decoratorsForKey = (
|
|
29287
|
+
let decoratorsForKey = (_c = decoratorsForType === null || decoratorsForType === void 0 ? void 0 : decoratorsForType[key]) !== null && _c !== void 0 ? _c : [];
|
|
29288
29288
|
decoratorsForType[key] = decoratorsForKey;
|
|
29289
29289
|
decoratorsForKey.push(decorator);
|
|
29290
29290
|
return decorator(object, key, ...otherArgs);
|
|
@@ -29310,7 +29310,7 @@ var require_mixins = __commonJS({
|
|
|
29310
29310
|
var decorator_1 = require_decorator();
|
|
29311
29311
|
var mixin_tracking_1 = require_mixin_tracking();
|
|
29312
29312
|
function Mixin(...constructors) {
|
|
29313
|
-
var _a2, _b,
|
|
29313
|
+
var _a2, _b, _c;
|
|
29314
29314
|
const prototypes = constructors.map((constructor) => constructor.prototype);
|
|
29315
29315
|
const initFunctionName = settings_1.settings.initFunction;
|
|
29316
29316
|
if (initFunctionName !== null) {
|
|
@@ -29340,7 +29340,7 @@ var require_mixins = __commonJS({
|
|
|
29340
29340
|
}
|
|
29341
29341
|
}
|
|
29342
29342
|
applyPropAndMethodDecorators((_b = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.static) !== null && _b !== void 0 ? _b : {}, DecoratedMixedClass);
|
|
29343
|
-
applyPropAndMethodDecorators((
|
|
29343
|
+
applyPropAndMethodDecorators((_c = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.instance) !== null && _c !== void 0 ? _c : {}, DecoratedMixedClass.prototype);
|
|
29344
29344
|
}
|
|
29345
29345
|
(0, mixin_tracking_1.registerMixins)(DecoratedMixedClass, constructors);
|
|
29346
29346
|
return DecoratedMixedClass;
|
|
@@ -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,
|
|
30843
|
-
s.pending_buf[s.pending++] =
|
|
30842
|
+
const put_byte = (s, b2) => {
|
|
30843
|
+
s.pending_buf[s.pending++] = b2;
|
|
30844
30844
|
};
|
|
30845
|
-
const putShortMSB = (s,
|
|
30846
|
-
s.pending_buf[s.pending++] =
|
|
30847
|
-
s.pending_buf[s.pending++] =
|
|
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;
|
|
@@ -35798,8 +35798,8 @@ var require_dcmjs2 = __commonJS({
|
|
|
35798
35798
|
key: "writeBytes",
|
|
35799
35799
|
value: function writeBytes(stream, value, writeOptions) {
|
|
35800
35800
|
var _this8 = this;
|
|
35801
|
-
var val = Array.isArray(value) ? value.map(function(
|
|
35802
|
-
return _this8.convertToString(
|
|
35801
|
+
var val = Array.isArray(value) ? value.map(function(ds2) {
|
|
35802
|
+
return _this8.convertToString(ds2);
|
|
35803
35803
|
}) : [this.convertToString(value)];
|
|
35804
35804
|
return _get(_getPrototypeOf(DecimalString2.prototype), "writeBytes", this).call(this, stream, val, writeOptions);
|
|
35805
35805
|
}
|
|
@@ -35921,8 +35921,8 @@ var require_dcmjs2 = __commonJS({
|
|
|
35921
35921
|
key: "writeBytes",
|
|
35922
35922
|
value: function writeBytes(stream, value, writeOptions) {
|
|
35923
35923
|
var _this13 = this;
|
|
35924
|
-
var val = Array.isArray(value) ? value.map(function(
|
|
35925
|
-
return _this13.convertToString(
|
|
35924
|
+
var val = Array.isArray(value) ? value.map(function(is2) {
|
|
35925
|
+
return _this13.convertToString(is2);
|
|
35926
35926
|
}) : [this.convertToString(value)];
|
|
35927
35927
|
return _get(_getPrototypeOf(IntegerString2.prototype), "writeBytes", this).call(this, stream, val, writeOptions);
|
|
35928
35928
|
}
|
|
@@ -36678,7 +36678,7 @@ var require_dcmjs2 = __commonJS({
|
|
|
36678
36678
|
}
|
|
36679
36679
|
}, {
|
|
36680
36680
|
key: "is",
|
|
36681
|
-
value: function
|
|
36681
|
+
value: function is2(t) {
|
|
36682
36682
|
return this.value == t;
|
|
36683
36683
|
}
|
|
36684
36684
|
}, {
|
|
@@ -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
|
|
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(
|
|
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",
|
|
@@ -37572,8 +37572,8 @@ var require_dcmjs2 = __commonJS({
|
|
|
37572
37572
|
}, {
|
|
37573
37573
|
key: "isMultiframeDataset",
|
|
37574
37574
|
value: function isMultiframeDataset() {
|
|
37575
|
-
var
|
|
37576
|
-
var sopClassUID =
|
|
37575
|
+
var ds2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.dataset;
|
|
37576
|
+
var sopClassUID = ds2.SOPClassUID.replace(/[^0-9.]/g, "");
|
|
37577
37577
|
return Normalizer2.isMultiframeSOPClassUID(sopClassUID);
|
|
37578
37578
|
}
|
|
37579
37579
|
}, {
|
|
@@ -37613,16 +37613,16 @@ var require_dcmjs2 = __commonJS({
|
|
|
37613
37613
|
}
|
|
37614
37614
|
this.derivation = new DerivedImage(this.datasets);
|
|
37615
37615
|
this.dataset = this.derivation.dataset;
|
|
37616
|
-
var
|
|
37616
|
+
var ds2 = this.dataset;
|
|
37617
37617
|
var referenceDataset = this.datasets[0];
|
|
37618
|
-
|
|
37619
|
-
|
|
37620
|
-
|
|
37621
|
-
|
|
37622
|
-
|
|
37623
|
-
|
|
37624
|
-
|
|
37625
|
-
|
|
37618
|
+
ds2.NumberOfFrames = this.datasets.length;
|
|
37619
|
+
ds2.SOPClassUID = referenceDataset.SOPClassUID;
|
|
37620
|
+
ds2.Rows = referenceDataset.Rows;
|
|
37621
|
+
ds2.Columns = referenceDataset.Columns;
|
|
37622
|
+
ds2.BitsAllocated = referenceDataset.BitsAllocated;
|
|
37623
|
+
ds2.PixelRepresentation = referenceDataset.PixelRepresentation;
|
|
37624
|
+
ds2.RescaleSlope = referenceDataset.RescaleSlope || "1";
|
|
37625
|
+
ds2.RescaleIntercept = referenceDataset.RescaleIntercept || "0";
|
|
37626
37626
|
var referencePosition = referenceDataset.ImagePositionPatient;
|
|
37627
37627
|
var rowVector = referenceDataset.ImageOrientationPatient.slice(0, 3);
|
|
37628
37628
|
var columnVector = referenceDataset.ImageOrientationPatient.slice(3, 6);
|
|
@@ -37634,46 +37634,46 @@ 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,
|
|
37638
|
-
return
|
|
37637
|
+
distanceDatasetPairs.sort(function(a, b2) {
|
|
37638
|
+
return b2[0] - a[0];
|
|
37639
37639
|
});
|
|
37640
|
-
if (
|
|
37640
|
+
if (ds2.BitsAllocated !== 16) {
|
|
37641
37641
|
log2.error("Only works with 16 bit data, not " + String(this.dataset.BitsAllocated));
|
|
37642
37642
|
}
|
|
37643
37643
|
if (referenceDataset._vrMap && !referenceDataset._vrMap.PixelData) {
|
|
37644
37644
|
log2.warn("No vr map given for pixel data, using OW");
|
|
37645
|
-
|
|
37645
|
+
ds2._vrMap = {
|
|
37646
37646
|
PixelData: "OW"
|
|
37647
37647
|
};
|
|
37648
37648
|
} else {
|
|
37649
|
-
|
|
37649
|
+
ds2._vrMap = {
|
|
37650
37650
|
PixelData: referenceDataset._vrMap.PixelData
|
|
37651
37651
|
};
|
|
37652
37652
|
}
|
|
37653
37653
|
var frameSize = referenceDataset.PixelData.byteLength;
|
|
37654
|
-
|
|
37654
|
+
ds2.PixelData = new ArrayBuffer(ds2.NumberOfFrames * frameSize);
|
|
37655
37655
|
var frame = 0;
|
|
37656
37656
|
distanceDatasetPairs.forEach(function(pair) {
|
|
37657
37657
|
var dataset = pair[1];
|
|
37658
37658
|
var pixels = new Uint16Array(dataset.PixelData);
|
|
37659
|
-
var frameView = new Uint16Array(
|
|
37659
|
+
var frameView = new Uint16Array(ds2.PixelData, frame * frameSize, frameSize / 2);
|
|
37660
37660
|
try {
|
|
37661
37661
|
frameView.set(pixels);
|
|
37662
37662
|
} catch (e) {
|
|
37663
37663
|
if (e instanceof RangeError) {
|
|
37664
|
-
var message2 = "Error inserting pixels in PixelData\n" + "frameSize ".concat(frameSize, "\n") + "NumberOfFrames ".concat(
|
|
37664
|
+
var message2 = "Error inserting pixels in PixelData\n" + "frameSize ".concat(frameSize, "\n") + "NumberOfFrames ".concat(ds2.NumberOfFrames, "\n") + "pair ".concat(pair, "\n") + "dataset PixelData size ".concat(dataset.PixelData.length);
|
|
37665
37665
|
log2.error(message2);
|
|
37666
37666
|
}
|
|
37667
37667
|
}
|
|
37668
37668
|
frame++;
|
|
37669
37669
|
});
|
|
37670
|
-
if (
|
|
37670
|
+
if (ds2.NumberOfFrames < 2) {
|
|
37671
37671
|
log2.error("Cannot populate shared groups uniquely without multiple frames");
|
|
37672
37672
|
}
|
|
37673
37673
|
var _distanceDatasetPairs = _slicedToArray(distanceDatasetPairs[0], 2), distance0 = _distanceDatasetPairs[0], dataset0 = _distanceDatasetPairs[1];
|
|
37674
37674
|
var distance1 = distanceDatasetPairs[1][0];
|
|
37675
37675
|
var SpacingBetweenSlices = Math.abs(distance1 - distance0);
|
|
37676
|
-
|
|
37676
|
+
ds2.SharedFunctionalGroupsSequence = {
|
|
37677
37677
|
PlaneOrientationSequence: {
|
|
37678
37678
|
ImageOrientationPatient: dataset0.ImageOrientationPatient
|
|
37679
37679
|
},
|
|
@@ -37683,14 +37683,14 @@ var require_dcmjs2 = __commonJS({
|
|
|
37683
37683
|
SliceThickness: SpacingBetweenSlices
|
|
37684
37684
|
}
|
|
37685
37685
|
};
|
|
37686
|
-
|
|
37686
|
+
ds2.ReferencedSeriesSequence = {
|
|
37687
37687
|
SeriesInstanceUID: dataset0.SeriesInstanceUID,
|
|
37688
37688
|
ReferencedInstanceSequence: []
|
|
37689
37689
|
};
|
|
37690
|
-
|
|
37690
|
+
ds2.PerFrameFunctionalGroupsSequence = [];
|
|
37691
37691
|
distanceDatasetPairs.forEach(function(pair) {
|
|
37692
37692
|
var dataset = pair[1];
|
|
37693
|
-
|
|
37693
|
+
ds2.PerFrameFunctionalGroupsSequence.push({
|
|
37694
37694
|
PlanePositionSequence: {
|
|
37695
37695
|
ImagePositionPatient: dataset.ImagePositionPatient
|
|
37696
37696
|
},
|
|
@@ -37699,7 +37699,7 @@ var require_dcmjs2 = __commonJS({
|
|
|
37699
37699
|
WindowWidth: dataset.WindowWidth
|
|
37700
37700
|
}
|
|
37701
37701
|
});
|
|
37702
|
-
|
|
37702
|
+
ds2.ReferencedSeriesSequence.ReferencedInstanceSequence.push({
|
|
37703
37703
|
ReferencedSOPClassUID: dataset.SOPClassUID,
|
|
37704
37704
|
ReferencedSOPInstanceUID: dataset.SOPInstanceUID
|
|
37705
37705
|
});
|
|
@@ -37719,29 +37719,29 @@ var require_dcmjs2 = __commonJS({
|
|
|
37719
37719
|
}, {
|
|
37720
37720
|
key: "normalizeMultiframe",
|
|
37721
37721
|
value: function normalizeMultiframe() {
|
|
37722
|
-
var
|
|
37723
|
-
if (!
|
|
37722
|
+
var ds2 = this.dataset;
|
|
37723
|
+
if (!ds2.NumberOfFrames) {
|
|
37724
37724
|
log2.error("Missing number or frames not supported");
|
|
37725
37725
|
return;
|
|
37726
37726
|
}
|
|
37727
|
-
if (!
|
|
37728
|
-
|
|
37727
|
+
if (!ds2.PixelRepresentation) {
|
|
37728
|
+
ds2.PixelRepresentation = 1;
|
|
37729
37729
|
}
|
|
37730
|
-
if (!
|
|
37731
|
-
|
|
37730
|
+
if (!ds2.StudyID || ds2.StudyID === "") {
|
|
37731
|
+
ds2.StudyID = "No Study ID";
|
|
37732
37732
|
}
|
|
37733
37733
|
var validLateralities = ["R", "L"];
|
|
37734
|
-
if (validLateralities.indexOf(
|
|
37735
|
-
delete
|
|
37734
|
+
if (validLateralities.indexOf(ds2.Laterality) === -1) {
|
|
37735
|
+
delete ds2.Laterality;
|
|
37736
37736
|
}
|
|
37737
|
-
if (!
|
|
37738
|
-
|
|
37737
|
+
if (!ds2.PresentationLUTShape) {
|
|
37738
|
+
ds2.PresentationLUTShape = "IDENTITY";
|
|
37739
37739
|
}
|
|
37740
|
-
if (!
|
|
37740
|
+
if (!ds2.SharedFunctionalGroupsSequence) {
|
|
37741
37741
|
log2.error("Can only process multiframe data with SharedFunctionalGroupsSequence");
|
|
37742
37742
|
}
|
|
37743
|
-
if (
|
|
37744
|
-
|
|
37743
|
+
if (ds2.BodyPartExamined === "PROSTATE") {
|
|
37744
|
+
ds2.SharedFunctionalGroupsSequence.FrameAnatomySequence = {
|
|
37745
37745
|
AnatomicRegionSequence: {
|
|
37746
37746
|
CodeValue: "T-9200B",
|
|
37747
37747
|
CodingSchemeDesignator: "SRT",
|
|
@@ -37750,17 +37750,17 @@ var require_dcmjs2 = __commonJS({
|
|
|
37750
37750
|
FrameLaterality: "U"
|
|
37751
37751
|
};
|
|
37752
37752
|
}
|
|
37753
|
-
var rescaleIntercept =
|
|
37754
|
-
var rescaleSlope =
|
|
37755
|
-
|
|
37753
|
+
var rescaleIntercept = ds2.RescaleIntercept || 0;
|
|
37754
|
+
var rescaleSlope = ds2.RescaleSlope || 1;
|
|
37755
|
+
ds2.SharedFunctionalGroupsSequence.PixelValueTransformationSequence = {
|
|
37756
37756
|
RescaleIntercept: rescaleIntercept,
|
|
37757
37757
|
RescaleSlope: rescaleSlope,
|
|
37758
37758
|
RescaleType: "US"
|
|
37759
37759
|
};
|
|
37760
37760
|
var frameNumber = 1;
|
|
37761
37761
|
this.datasets.forEach(function(dataset) {
|
|
37762
|
-
if (
|
|
37763
|
-
|
|
37762
|
+
if (ds2.NumberOfFrames === 1) ds2.PerFrameFunctionalGroupsSequence = [ds2.PerFrameFunctionalGroupsSequence];
|
|
37763
|
+
ds2.PerFrameFunctionalGroupsSequence[frameNumber - 1].FrameContentSequence = {
|
|
37764
37764
|
FrameAcquisitionDuration: 0,
|
|
37765
37765
|
StackID: 1,
|
|
37766
37766
|
InStackPositionNumber: frameNumber,
|
|
@@ -37768,30 +37768,30 @@ var require_dcmjs2 = __commonJS({
|
|
|
37768
37768
|
};
|
|
37769
37769
|
var frameTime = dataset.AcquisitionDate + dataset.AcquisitionTime;
|
|
37770
37770
|
if (!isNaN(frameTime)) {
|
|
37771
|
-
var frameContentSequence =
|
|
37771
|
+
var frameContentSequence = ds2.PerFrameFunctionalGroupsSequence[frameNumber - 1].FrameContentSequence;
|
|
37772
37772
|
frameContentSequence.FrameAcquisitionDateTime = frameTime;
|
|
37773
37773
|
frameContentSequence.FrameReferenceDateTime = frameTime;
|
|
37774
37774
|
}
|
|
37775
37775
|
frameNumber++;
|
|
37776
37776
|
});
|
|
37777
|
-
if (
|
|
37778
|
-
if (!Array.isArray(
|
|
37779
|
-
|
|
37777
|
+
if (ds2.WindowCenter && ds2.WindowWidth) {
|
|
37778
|
+
if (!Array.isArray(ds2.WindowCenter)) {
|
|
37779
|
+
ds2.WindowCenter = [ds2.WindowCenter];
|
|
37780
37780
|
}
|
|
37781
|
-
if (!Array.isArray(
|
|
37782
|
-
|
|
37781
|
+
if (!Array.isArray(ds2.WindowWidth)) {
|
|
37782
|
+
ds2.WindowWidth = [ds2.WindowWidth];
|
|
37783
37783
|
}
|
|
37784
37784
|
}
|
|
37785
|
-
if (!
|
|
37786
|
-
|
|
37787
|
-
|
|
37788
|
-
if (
|
|
37785
|
+
if (!ds2.WindowCenter || !ds2.WindowWidth) {
|
|
37786
|
+
ds2.WindowCenter = [];
|
|
37787
|
+
ds2.WindowWidth = [];
|
|
37788
|
+
if (ds2.PerFrameFunctionalGroupsSequence) {
|
|
37789
37789
|
var wcww = {
|
|
37790
37790
|
center: 0,
|
|
37791
37791
|
width: 0,
|
|
37792
37792
|
count: 0
|
|
37793
37793
|
};
|
|
37794
|
-
|
|
37794
|
+
ds2.PerFrameFunctionalGroupsSequence.forEach(function(functionalGroup) {
|
|
37795
37795
|
if (functionalGroup.FrameVOILUT) {
|
|
37796
37796
|
var wc = functionalGroup.FrameVOILUTSequence.WindowCenter;
|
|
37797
37797
|
var ww = functionalGroup.FrameVOILUTSequence.WindowWidth;
|
|
@@ -37809,22 +37809,22 @@ var require_dcmjs2 = __commonJS({
|
|
|
37809
37809
|
}
|
|
37810
37810
|
});
|
|
37811
37811
|
if (wcww.count > 0) {
|
|
37812
|
-
|
|
37813
|
-
|
|
37812
|
+
ds2.WindowCenter.push(String(wcww.center / wcww.count));
|
|
37813
|
+
ds2.WindowWidth.push(String(wcww.width / wcww.count));
|
|
37814
37814
|
}
|
|
37815
37815
|
}
|
|
37816
37816
|
}
|
|
37817
|
-
if (
|
|
37818
|
-
|
|
37817
|
+
if (ds2.WindowCenter.length === 0) {
|
|
37818
|
+
ds2.WindowCenter = [300];
|
|
37819
37819
|
}
|
|
37820
|
-
if (
|
|
37821
|
-
|
|
37820
|
+
if (ds2.WindowWidth.length === 0) {
|
|
37821
|
+
ds2.WindowWidth = [500];
|
|
37822
37822
|
}
|
|
37823
37823
|
}
|
|
37824
37824
|
}], [{
|
|
37825
37825
|
key: "vec3CrossProduct",
|
|
37826
|
-
value: function vec3CrossProduct(a,
|
|
37827
|
-
var ax = a[0], ay = a[1], az = a[2], bx =
|
|
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,
|
|
37836
|
+
value: function vec3Subtract(a, b2) {
|
|
37837
37837
|
var out = [];
|
|
37838
|
-
out[0] = a[0] -
|
|
37839
|
-
out[1] = a[1] -
|
|
37840
|
-
out[2] = a[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,
|
|
37846
|
-
return a[0] *
|
|
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;
|
|
@@ -37864,12 +37864,12 @@ var require_dcmjs2 = __commonJS({
|
|
|
37864
37864
|
key: "normalizeMultiframe",
|
|
37865
37865
|
value: function normalizeMultiframe() {
|
|
37866
37866
|
_get(_getPrototypeOf(MRImageNormalizer2.prototype), "normalizeMultiframe", this).call(this);
|
|
37867
|
-
var
|
|
37868
|
-
if (!
|
|
37869
|
-
|
|
37867
|
+
var ds2 = this.dataset;
|
|
37868
|
+
if (!ds2.ImageType || !ds2.ImageType.constructor || ds2.ImageType.constructor.name != "Array" || ds2.ImageType.length != 4) {
|
|
37869
|
+
ds2.ImageType = ["ORIGINAL", "PRIMARY", "OTHER", "NONE"];
|
|
37870
37870
|
}
|
|
37871
|
-
|
|
37872
|
-
FrameType:
|
|
37871
|
+
ds2.SharedFunctionalGroupsSequence.MRImageFrameTypeSequence = {
|
|
37872
|
+
FrameType: ds2.ImageType,
|
|
37873
37873
|
PixelPresentation: "MONOCHROME",
|
|
37874
37874
|
VolumetricProperties: "VOLUME",
|
|
37875
37875
|
VolumeBasedCalculationTechnique: "NONE",
|
|
@@ -37994,9 +37994,9 @@ var require_dcmjs2 = __commonJS({
|
|
|
37994
37994
|
key: "normalize",
|
|
37995
37995
|
value: function normalize3() {
|
|
37996
37996
|
_get(_getPrototypeOf(PMImageNormalizer2.prototype), "normalize", this).call(this);
|
|
37997
|
-
var
|
|
37998
|
-
if (
|
|
37999
|
-
log2.error("Only works with 32 bit data, not " + String(
|
|
37997
|
+
var ds2 = this.datasets[0];
|
|
37998
|
+
if (ds2.BitsAllocated !== 32) {
|
|
37999
|
+
log2.error("Only works with 32 bit data, not " + String(ds2.BitsAllocated));
|
|
38000
38000
|
}
|
|
38001
38001
|
}
|
|
38002
38002
|
}]);
|
|
@@ -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,
|
|
39936
|
-
return a[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,
|
|
40182
|
-
return [a[1] *
|
|
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,
|
|
40266
|
+
function nearlyEqual(a, b2, epsilon) {
|
|
40267
40267
|
var absA = Math.abs(a);
|
|
40268
|
-
var absB = Math.abs(
|
|
40269
|
-
var diff = Math.abs(a -
|
|
40270
|
-
if (a ===
|
|
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 ||
|
|
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
|
|
40674
|
+
var N2 = byteValue + 1;
|
|
40675
40675
|
var next = i + 1;
|
|
40676
|
-
for (var p = next; p < next +
|
|
40676
|
+
for (var p = next; p < next + N2; p++) {
|
|
40677
40677
|
pixelData[pixelDataIndex] = uInt8Frame[p];
|
|
40678
40678
|
pixelDataIndex++;
|
|
40679
40679
|
}
|
|
40680
|
-
i +=
|
|
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,
|
|
42745
|
-
out[0] = a[0] +
|
|
42746
|
-
out[1] = a[1] +
|
|
42747
|
-
out[2] = a[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,
|
|
42751
|
-
out[0] = a[0] -
|
|
42752
|
-
out[1] = a[1] -
|
|
42753
|
-
out[2] = a[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,
|
|
42757
|
-
out[0] = a[0] *
|
|
42758
|
-
out[1] = a[1] *
|
|
42759
|
-
out[2] = a[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,
|
|
42763
|
-
out[0] = a[0] /
|
|
42764
|
-
out[1] = a[1] /
|
|
42765
|
-
out[2] = a[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,
|
|
42781
|
-
out[0] = Math.min(a[0],
|
|
42782
|
-
out[1] = Math.min(a[1],
|
|
42783
|
-
out[2] = Math.min(a[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,
|
|
42787
|
-
out[0] = Math.max(a[0],
|
|
42788
|
-
out[1] = Math.max(a[1],
|
|
42789
|
-
out[2] = Math.max(a[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,
|
|
42799
|
-
out[0] = a[0] *
|
|
42800
|
-
out[1] = a[1] *
|
|
42801
|
-
out[2] = a[2] *
|
|
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,
|
|
42805
|
-
out[0] = a[0] +
|
|
42806
|
-
out[1] = a[1] +
|
|
42807
|
-
out[2] = a[2] +
|
|
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,
|
|
42811
|
-
var x3 =
|
|
42812
|
-
var y2 =
|
|
42813
|
-
var z =
|
|
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,
|
|
42817
|
-
var x3 =
|
|
42818
|
-
var y2 =
|
|
42819
|
-
var z =
|
|
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,
|
|
42854
|
-
return a[0] *
|
|
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,
|
|
42856
|
+
function cross$1(out, a, b2) {
|
|
42857
42857
|
var ax = a[0], ay = a[1], az = a[2];
|
|
42858
|
-
var bx =
|
|
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,
|
|
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 * (
|
|
42869
|
-
out[1] = ay + t * (
|
|
42870
|
-
out[2] = az + t * (
|
|
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,
|
|
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 +
|
|
42880
|
-
out[1] = a[1] * factor1 +
|
|
42881
|
-
out[2] = a[2] * factor1 +
|
|
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,
|
|
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 +
|
|
42893
|
-
out[1] = a[1] * factor1 +
|
|
42894
|
-
out[2] = a[2] * factor1 +
|
|
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,
|
|
42940
|
+
function rotateX(out, a, b2, rad) {
|
|
42941
42941
|
var p = [], r6 = [];
|
|
42942
|
-
p[0] = a[0] -
|
|
42943
|
-
p[1] = a[1] -
|
|
42944
|
-
p[2] = a[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] +
|
|
42949
|
-
out[1] = r6[1] +
|
|
42950
|
-
out[2] = r6[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,
|
|
42953
|
+
function rotateY(out, a, b2, rad) {
|
|
42954
42954
|
var p = [], r6 = [];
|
|
42955
|
-
p[0] = a[0] -
|
|
42956
|
-
p[1] = a[1] -
|
|
42957
|
-
p[2] = a[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] +
|
|
42962
|
-
out[1] = r6[1] +
|
|
42963
|
-
out[2] = r6[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,
|
|
42966
|
+
function rotateZ(out, a, b2, rad) {
|
|
42967
42967
|
var p = [], r6 = [];
|
|
42968
|
-
p[0] = a[0] -
|
|
42969
|
-
p[1] = a[1] -
|
|
42970
|
-
p[2] = a[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] +
|
|
42975
|
-
out[1] = r6[1] +
|
|
42976
|
-
out[2] = r6[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,
|
|
42980
|
-
var ax = a[0], ay = a[1], az = a[2], bx =
|
|
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,
|
|
42993
|
-
return a[0] ===
|
|
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,
|
|
42995
|
+
function equals(a, b2) {
|
|
42996
42996
|
var a0 = a[0], a1 = a[1], a2 = a[2];
|
|
42997
|
-
var b0 =
|
|
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,
|
|
43535
|
-
out[0] = a[0] -
|
|
43536
|
-
out[1] = a[1] -
|
|
43537
|
-
out[2] = a[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,
|
|
46124
|
-
return a +
|
|
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,
|
|
46166
|
-
return a +
|
|
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,
|
|
46360
|
-
return a +
|
|
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:
|
|
47753
|
-
e.exports =
|
|
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]:
|
|
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
|
|
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
|
|
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:
|
|
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:
|
|
49628
|
-
e2.exports =
|
|
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:
|
|
49637
|
-
class
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
50093
|
-
Object.freeze(
|
|
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),
|
|
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
|
|
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,
|
|
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 },
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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 {
|
|
@@ -51817,7 +51817,7 @@ var require_has_flag = __commonJS({
|
|
|
51817
51817
|
var require_supports_colors = __commonJS({
|
|
51818
51818
|
"../../node_modules/@colors/colors/lib/system/supports-colors.js"(exports2, module2) {
|
|
51819
51819
|
"use strict";
|
|
51820
|
-
var
|
|
51820
|
+
var os = require("os");
|
|
51821
51821
|
var hasFlag = require_has_flag();
|
|
51822
51822
|
var env = process.env;
|
|
51823
51823
|
var forceColor = void 0;
|
|
@@ -51855,7 +51855,7 @@ var require_supports_colors = __commonJS({
|
|
|
51855
51855
|
}
|
|
51856
51856
|
var min = forceColor ? 1 : 0;
|
|
51857
51857
|
if (process.platform === "win32") {
|
|
51858
|
-
var osRelease =
|
|
51858
|
+
var osRelease = os.release().split(".");
|
|
51859
51859
|
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
51860
51860
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
51861
51861
|
}
|
|
@@ -56351,9 +56351,9 @@ var require_stream_readable = __commonJS({
|
|
|
56351
56351
|
return from(Readable2, iterable, opts);
|
|
56352
56352
|
};
|
|
56353
56353
|
}
|
|
56354
|
-
function indexOf(
|
|
56355
|
-
for (var i = 0, l2 =
|
|
56356
|
-
if (
|
|
56354
|
+
function indexOf(xs, x3) {
|
|
56355
|
+
for (var i = 0, l2 = xs.length; i < l2; i++) {
|
|
56356
|
+
if (xs[i] === x3) return i;
|
|
56357
56357
|
}
|
|
56358
56358
|
return -1;
|
|
56359
56359
|
}
|
|
@@ -57115,7 +57115,7 @@ var require_winston_transport = __commonJS({
|
|
|
57115
57115
|
var require_console = __commonJS({
|
|
57116
57116
|
"../../node_modules/winston/lib/winston/transports/console.js"(exports2, module2) {
|
|
57117
57117
|
"use strict";
|
|
57118
|
-
var
|
|
57118
|
+
var os = require("os");
|
|
57119
57119
|
var { LEVEL, MESSAGE } = require_triple_beam();
|
|
57120
57120
|
var TransportStream = require_winston_transport();
|
|
57121
57121
|
module2.exports = class Console extends TransportStream {
|
|
@@ -57129,7 +57129,7 @@ var require_console = __commonJS({
|
|
|
57129
57129
|
this.name = options.name || "console";
|
|
57130
57130
|
this.stderrLevels = this._stringArrayToSet(options.stderrLevels);
|
|
57131
57131
|
this.consoleWarnLevels = this._stringArrayToSet(options.consoleWarnLevels);
|
|
57132
|
-
this.eol = typeof options.eol === "string" ? options.eol :
|
|
57132
|
+
this.eol = typeof options.eol === "string" ? options.eol : os.EOL;
|
|
57133
57133
|
this.forceConsole = options.forceConsole || false;
|
|
57134
57134
|
this._consoleLog = console.log.bind(console);
|
|
57135
57135
|
this._consoleWarn = console.warn.bind(console);
|
|
@@ -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
|
|
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,
|
|
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
|
|
58390
|
-
return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r6 + "%, " + g3 + "%, " +
|
|
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
|
|
58463
|
-
const min = Math.min(r6, g3,
|
|
58464
|
-
const max = Math.max(r6, g3,
|
|
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 -
|
|
58474
|
+
h2 = (g3 - b2) / delta;
|
|
58475
58475
|
break;
|
|
58476
58476
|
}
|
|
58477
58477
|
case g3: {
|
|
58478
|
-
h2 = 2 + (
|
|
58478
|
+
h2 = 2 + (b2 - r6) / delta;
|
|
58479
58479
|
break;
|
|
58480
58480
|
}
|
|
58481
|
-
case
|
|
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
|
|
58509
|
-
const v3 = Math.max(r6, g3,
|
|
58510
|
-
const diff = v3 - Math.min(r6, g3,
|
|
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(
|
|
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
|
|
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
|
|
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,
|
|
58554
|
-
|
|
58555
|
-
return [h2, w3 * 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
|
|
58561
|
-
const lp = Math.cbrt(0.4122214708 * r6 + 0.5363325363 * g3 + 0.0514459929 *
|
|
58562
|
-
const mp = Math.cbrt(0.2119034982 * r6 + 0.6806995451 * g3 + 0.1073969566 *
|
|
58563
|
-
const sp = Math.cbrt(0.0883024619 * r6 + 0.2817188376 * g3 + 0.6299787005 *
|
|
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
|
|
58573
|
-
const k2 = Math.min(1 - r6, 1 - g3, 1 -
|
|
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 -
|
|
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
|
|
58606
|
-
const x3 = r6 * 0.4124564 + g3 * 0.3575761 +
|
|
58607
|
-
const y2 = r6 * 0.2126729 + g3 * 0.7151522 +
|
|
58608
|
-
const z = r6 * 0.0193339 + g3 * 0.119192 +
|
|
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
|
|
58625
|
-
return [l2, a,
|
|
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
|
|
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
|
-
|
|
58746
|
+
b2 = wh;
|
|
58747
58747
|
break;
|
|
58748
58748
|
}
|
|
58749
58749
|
case 1: {
|
|
58750
58750
|
r6 = n;
|
|
58751
58751
|
g3 = v3;
|
|
58752
|
-
|
|
58752
|
+
b2 = wh;
|
|
58753
58753
|
break;
|
|
58754
58754
|
}
|
|
58755
58755
|
case 2: {
|
|
58756
58756
|
r6 = wh;
|
|
58757
58757
|
g3 = v3;
|
|
58758
|
-
|
|
58758
|
+
b2 = n;
|
|
58759
58759
|
break;
|
|
58760
58760
|
}
|
|
58761
58761
|
case 3: {
|
|
58762
58762
|
r6 = wh;
|
|
58763
58763
|
g3 = n;
|
|
58764
|
-
|
|
58764
|
+
b2 = v3;
|
|
58765
58765
|
break;
|
|
58766
58766
|
}
|
|
58767
58767
|
case 4: {
|
|
58768
58768
|
r6 = n;
|
|
58769
58769
|
g3 = wh;
|
|
58770
|
-
|
|
58770
|
+
b2 = v3;
|
|
58771
58771
|
break;
|
|
58772
58772
|
}
|
|
58773
58773
|
case 5: {
|
|
58774
58774
|
r6 = v3;
|
|
58775
58775
|
g3 = wh;
|
|
58776
|
-
|
|
58776
|
+
b2 = n;
|
|
58777
58777
|
break;
|
|
58778
58778
|
}
|
|
58779
58779
|
}
|
|
58780
|
-
return [r6 * 255, g3 * 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
|
|
58790
|
-
return [r6 * 255, g3 * 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
|
|
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
|
-
|
|
58801
|
+
b2 = x3 * 0.0556434 + y2 * -0.2040259 + z * 1.0572252;
|
|
58802
58802
|
r6 = srgbNonlinearTransform(r6);
|
|
58803
58803
|
g3 = srgbNonlinearTransform(g3);
|
|
58804
|
-
|
|
58805
|
-
return [r6 * 255, g3 * 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
|
|
58820
|
-
return [l2, a,
|
|
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
|
|
58832
|
-
return [l2 * 100, a * 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
|
|
58841
|
-
const l2 = (0.999999998 * ll + 0.396337792 * a + 0.215803758 *
|
|
58842
|
-
const m3 = (1.000000008 * ll - 0.105561342 * a - 0.063854175 *
|
|
58843
|
-
const s = (1.000000055 * ll - 0.089484182 * a - 1.291485538 *
|
|
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
|
|
58859
|
-
return [r6 * 255, g3 * 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
|
|
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 -
|
|
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
|
|
58888
|
+
const b2 = lab[2];
|
|
58889
58889
|
let h2;
|
|
58890
|
-
const
|
|
58891
|
-
h2 =
|
|
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 +
|
|
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
|
|
58903
|
-
const a = c2 * Math.cos(
|
|
58904
|
-
const
|
|
58905
|
-
return [l2, a,
|
|
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,
|
|
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(
|
|
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
|
|
58927
|
-
if (r6 >> 4 === g3 >> 4 && g3 >> 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(
|
|
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
|
|
58953
|
-
return [r6, g3,
|
|
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
|
|
58966
|
-
return [r6, g3,
|
|
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
|
|
58986
|
-
return [r6, g3,
|
|
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
|
|
58992
|
-
const max = Math.max(Math.max(r6, g3),
|
|
58993
|
-
const min = Math.min(Math.min(r6, g3),
|
|
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 -
|
|
59000
|
+
hue = (g3 - b2) / chroma % 6;
|
|
59001
59001
|
} else if (max === g3) {
|
|
59002
|
-
hue = 2 + (
|
|
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
|
|
59117
|
-
const v3 = 1 -
|
|
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),
|
|
59699
|
-
return [parseInt(r6, 16), parseInt(g3, 16), parseInt(
|
|
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,
|
|
59702
|
-
var red = r6 / 255 * 5, green = g3 / 255 * 5, blue =
|
|
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,
|
|
59706
|
-
var red = Math.round(r6), green = Math.round(g3), blue = Math.round(
|
|
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() {
|
|
@@ -59939,7 +59939,7 @@ var require_file = __commonJS({
|
|
|
59939
59939
|
var { Stream, PassThrough } = require_readable();
|
|
59940
59940
|
var TransportStream = require_winston_transport();
|
|
59941
59941
|
var debug = require_node2()("winston:file");
|
|
59942
|
-
var
|
|
59942
|
+
var os = require("os");
|
|
59943
59943
|
var tailFile = require_tail_file();
|
|
59944
59944
|
module2.exports = class File extends TransportStream {
|
|
59945
59945
|
/**
|
|
@@ -59977,7 +59977,7 @@ var require_file = __commonJS({
|
|
|
59977
59977
|
this.rotationFormat = options.rotationFormat || false;
|
|
59978
59978
|
this.zippedArchive = options.zippedArchive || false;
|
|
59979
59979
|
this.maxFiles = options.maxFiles || null;
|
|
59980
|
-
this.eol = typeof options.eol === "string" ? options.eol :
|
|
59980
|
+
this.eol = typeof options.eol === "string" ? options.eol : os.EOL;
|
|
59981
59981
|
this.tailable = options.tailable || false;
|
|
59982
59982
|
this.lazy = options.lazy || false;
|
|
59983
59983
|
this._size = 0;
|
|
@@ -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
|
|
60704
|
+
const me2 = this;
|
|
60705
60705
|
this.batchCallback = callback;
|
|
60706
60706
|
this.batchTimeoutID = setTimeout(function() {
|
|
60707
|
-
|
|
60708
|
-
|
|
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) {
|
|
@@ -60780,7 +60780,7 @@ var require_stream3 = __commonJS({
|
|
|
60780
60780
|
"use strict";
|
|
60781
60781
|
var isStream = require_is_stream();
|
|
60782
60782
|
var { MESSAGE } = require_triple_beam();
|
|
60783
|
-
var
|
|
60783
|
+
var os = require("os");
|
|
60784
60784
|
var TransportStream = require_winston_transport();
|
|
60785
60785
|
module2.exports = class Stream extends TransportStream {
|
|
60786
60786
|
/**
|
|
@@ -60796,7 +60796,7 @@ var require_stream3 = __commonJS({
|
|
|
60796
60796
|
this._stream = options.stream;
|
|
60797
60797
|
this._stream.setMaxListeners(Infinity);
|
|
60798
60798
|
this.isObjectMode = options.stream._writableState.objectMode;
|
|
60799
|
-
this.eol = typeof options.eol === "string" ? options.eol :
|
|
60799
|
+
this.eol = typeof options.eol === "string" ? options.eol : os.EOL;
|
|
60800
60800
|
}
|
|
60801
60801
|
/**
|
|
60802
60802
|
* Core logging method exposed to Winston.
|
|
@@ -61180,7 +61180,7 @@ var require_exception_stream = __commonJS({
|
|
|
61180
61180
|
var require_exception_handler = __commonJS({
|
|
61181
61181
|
"../../node_modules/winston/lib/winston/exception-handler.js"(exports2, module2) {
|
|
61182
61182
|
"use strict";
|
|
61183
|
-
var
|
|
61183
|
+
var os = require("os");
|
|
61184
61184
|
var asyncForEach = require_forEach();
|
|
61185
61185
|
var debug = require_node2()("winston:exception");
|
|
61186
61186
|
var once = require_one_time();
|
|
@@ -61275,8 +61275,8 @@ var require_exception_handler = __commonJS({
|
|
|
61275
61275
|
*/
|
|
61276
61276
|
getOsInfo() {
|
|
61277
61277
|
return {
|
|
61278
|
-
loadavg:
|
|
61279
|
-
uptime:
|
|
61278
|
+
loadavg: os.loadavg(),
|
|
61279
|
+
uptime: os.uptime()
|
|
61280
61280
|
};
|
|
61281
61281
|
}
|
|
61282
61282
|
/**
|
|
@@ -61418,7 +61418,7 @@ var require_rejection_stream = __commonJS({
|
|
|
61418
61418
|
var require_rejection_handler = __commonJS({
|
|
61419
61419
|
"../../node_modules/winston/lib/winston/rejection-handler.js"(exports2, module2) {
|
|
61420
61420
|
"use strict";
|
|
61421
|
-
var
|
|
61421
|
+
var os = require("os");
|
|
61422
61422
|
var asyncForEach = require_forEach();
|
|
61423
61423
|
var debug = require_node2()("winston:rejection");
|
|
61424
61424
|
var once = require_one_time();
|
|
@@ -61515,8 +61515,8 @@ var require_rejection_handler = __commonJS({
|
|
|
61515
61515
|
*/
|
|
61516
61516
|
getOsInfo() {
|
|
61517
61517
|
return {
|
|
61518
|
-
loadavg:
|
|
61519
|
-
uptime:
|
|
61518
|
+
loadavg: os.loadavg(),
|
|
61519
|
+
uptime: os.uptime()
|
|
61520
61520
|
};
|
|
61521
61521
|
}
|
|
61522
61522
|
/**
|
|
@@ -62801,11 +62801,11 @@ var require_object_hash = __commonJS({
|
|
|
62801
62801
|
function PassThrough() {
|
|
62802
62802
|
return {
|
|
62803
62803
|
buf: "",
|
|
62804
|
-
write: function(
|
|
62805
|
-
this.buf +=
|
|
62804
|
+
write: function(b2) {
|
|
62805
|
+
this.buf += b2;
|
|
62806
62806
|
},
|
|
62807
|
-
end: function(
|
|
62808
|
-
this.buf +=
|
|
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,
|
|
62840
|
-
return Object.prototype.hasOwnProperty.call(a,
|
|
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,
|
|
62872
|
-
for (var i in
|
|
62873
|
-
if (hasOwnProp(
|
|
62874
|
-
a[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(
|
|
62878
|
-
a.toString =
|
|
62877
|
+
if (hasOwnProp(b2, "toString")) {
|
|
62878
|
+
a.toString = b2.toString;
|
|
62879
62879
|
}
|
|
62880
|
-
if (hasOwnProp(
|
|
62881
|
-
a.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,
|
|
63358
|
-
return a.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,
|
|
63772
|
-
return
|
|
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,
|
|
64161
|
-
return
|
|
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,
|
|
64673
|
+
function defaults(a, b2, c2) {
|
|
64674
64674
|
if (a != null) {
|
|
64675
64675
|
return a;
|
|
64676
64676
|
}
|
|
64677
|
-
if (
|
|
64678
|
-
return
|
|
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,
|
|
65579
|
-
if (a.date() <
|
|
65580
|
-
return -monthDiff(
|
|
65578
|
+
function monthDiff(a, b2) {
|
|
65579
|
+
if (a.date() < b2.date()) {
|
|
65580
|
+
return -monthDiff(b2, a);
|
|
65581
65581
|
}
|
|
65582
|
-
var wholeMonthDiff = (
|
|
65583
|
-
if (
|
|
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 = (
|
|
65585
|
+
adjust = (b2 - anchor) / (anchor - anchor2);
|
|
65586
65586
|
} else {
|
|
65587
65587
|
anchor2 = a.clone().add(wholeMonthDiff + 1, "months");
|
|
65588
|
-
adjust = (
|
|
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
|
|
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
|
});
|
|
@@ -66870,15 +66870,15 @@ var require_FileStreamRotator = __commonJS({
|
|
|
66870
66870
|
};
|
|
66871
66871
|
FileStreamRotator.parseFileSize = function(size) {
|
|
66872
66872
|
if (size && typeof size == "string") {
|
|
66873
|
-
var
|
|
66874
|
-
if (
|
|
66875
|
-
switch (
|
|
66873
|
+
var _s2 = size.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/);
|
|
66874
|
+
if (_s2) {
|
|
66875
|
+
switch (_s2[2]) {
|
|
66876
66876
|
case "k":
|
|
66877
|
-
return
|
|
66877
|
+
return _s2[1] * 1024;
|
|
66878
66878
|
case "m":
|
|
66879
|
-
return
|
|
66879
|
+
return _s2[1] * 1024 * 1024;
|
|
66880
66880
|
case "g":
|
|
66881
|
-
return
|
|
66881
|
+
return _s2[1] * 1024 * 1024 * 1024;
|
|
66882
66882
|
}
|
|
66883
66883
|
}
|
|
66884
66884
|
}
|
|
@@ -67272,7 +67272,7 @@ var require_daily_rotate_file = __commonJS({
|
|
|
67272
67272
|
"../../node_modules/winston-daily-rotate-file/daily-rotate-file.js"(exports2, module2) {
|
|
67273
67273
|
"use strict";
|
|
67274
67274
|
var fs3 = require("fs");
|
|
67275
|
-
var
|
|
67275
|
+
var os = require("os");
|
|
67276
67276
|
var path4 = require("path");
|
|
67277
67277
|
var util = require("util");
|
|
67278
67278
|
var zlib = require("zlib");
|
|
@@ -67283,7 +67283,7 @@ var require_daily_rotate_file = __commonJS({
|
|
|
67283
67283
|
var loggerDefaults = {
|
|
67284
67284
|
json: false,
|
|
67285
67285
|
colorize: false,
|
|
67286
|
-
eol:
|
|
67286
|
+
eol: os.EOL,
|
|
67287
67287
|
logstash: null,
|
|
67288
67288
|
prettyPrint: false,
|
|
67289
67289
|
label: null,
|
|
@@ -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,
|
|
67526
|
+
results.sort((a, b2) => {
|
|
67527
67527
|
const d1 = new Date(a.timestamp).getTime();
|
|
67528
|
-
const d2 = new Date(
|
|
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") {
|
|
@@ -67591,7 +67591,7 @@ module.exports = __toCommonJS(main_exports);
|
|
|
67591
67591
|
var Oo = Object.defineProperty;
|
|
67592
67592
|
var Io = (r6, e, t) => e in r6 ? Oo(r6, e, { enumerable: true, configurable: true, writable: true, value: t }) : r6[e] = t;
|
|
67593
67593
|
var c = (r6, e, t) => Io(r6, typeof e != "symbol" ? e + "" : e, t);
|
|
67594
|
-
var
|
|
67594
|
+
var lt = class {
|
|
67595
67595
|
constructor(e, t) {
|
|
67596
67596
|
c(this, "operator");
|
|
67597
67597
|
c(this, "child");
|
|
@@ -67612,7 +67612,7 @@ var ce = class {
|
|
|
67612
67612
|
return `(${this.left.toString()} ${this.operator} ${this.right.toString()})`;
|
|
67613
67613
|
}
|
|
67614
67614
|
};
|
|
67615
|
-
var
|
|
67615
|
+
var pt = class {
|
|
67616
67616
|
constructor() {
|
|
67617
67617
|
c(this, "prefixParselets", {});
|
|
67618
67618
|
c(this, "infixParselets", {});
|
|
@@ -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
|
|
67693
|
+
var De = class {
|
|
67694
67694
|
constructor(e = 10) {
|
|
67695
67695
|
c(this, "max");
|
|
67696
67696
|
c(this, "cache");
|
|
@@ -67716,13 +67716,13 @@ var Ve = class {
|
|
|
67716
67716
|
return this.cache.keys().next().value;
|
|
67717
67717
|
}
|
|
67718
67718
|
};
|
|
67719
|
-
var
|
|
67720
|
-
var
|
|
67721
|
-
var
|
|
67719
|
+
var dt = "http://hl7.org";
|
|
67720
|
+
var ft = "created";
|
|
67721
|
+
var hr = "not-modified";
|
|
67722
67722
|
var yr = "not-found";
|
|
67723
67723
|
var xr = "unauthorized";
|
|
67724
67724
|
var ht = "accepted";
|
|
67725
|
-
var
|
|
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
|
|
67745
|
-
return r6.id === "ok" || r6.id ===
|
|
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
|
|
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
|
|
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,
|
|
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 =
|
|
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[
|
|
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 =
|
|
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(
|
|
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
|
|
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
|
|
67934
|
+
function Dr(r6, e, t) {
|
|
67935
67935
|
let n = r6.path;
|
|
67936
|
-
return Bo(
|
|
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
|
|
67943
|
-
var
|
|
67944
|
-
function
|
|
67942
|
+
var qo = new De(1e3);
|
|
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 m(r6) {
|
|
67945
67945
|
return [{ type: d.boolean, value: r6 }];
|
|
67946
67946
|
}
|
|
67947
|
-
function
|
|
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
|
|
67950
|
+
function B(r6) {
|
|
67951
67951
|
return r6.length === 0 ? false : !!r6[0].value;
|
|
67952
67952
|
}
|
|
67953
67953
|
function J(r6, e) {
|
|
@@ -67956,12 +67956,12 @@ 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
|
|
67959
|
+
function D(r6, e, t) {
|
|
67960
67960
|
if (!r6.value) return;
|
|
67961
67961
|
let n = Et(r6.type, e, t?.profileUrl);
|
|
67962
|
-
return n ?
|
|
67962
|
+
return n ? Yo(r6, e, n) : Xo(r6, e);
|
|
67963
67963
|
}
|
|
67964
|
-
function
|
|
67964
|
+
function Yo(r6, e, t) {
|
|
67965
67965
|
let n = r6.value, i = t.type;
|
|
67966
67966
|
if (!i || i.length === 0) return;
|
|
67967
67967
|
let o2, s = "undefined", a, u2 = t.path.lastIndexOf("."), l2 = t.path.substring(u2 + 1);
|
|
@@ -67984,13 +67984,13 @@ function Ko(r6, e, t) {
|
|
|
67984
67984
|
function Yn(r6, e) {
|
|
67985
67985
|
return e === "Resource" && k(r6) && (e = r6.resourceType), { type: e, value: r6 };
|
|
67986
67986
|
}
|
|
67987
|
-
function
|
|
67987
|
+
function Xo(r6, e) {
|
|
67988
67988
|
let t = r6.value;
|
|
67989
67989
|
if (!t || typeof t != "object") return;
|
|
67990
67990
|
let n;
|
|
67991
67991
|
if (e in t) {
|
|
67992
67992
|
let i = t[e];
|
|
67993
|
-
Array.isArray(i) ? n = i.map(
|
|
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 (
|
|
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
|
|
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 ?
|
|
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 ?
|
|
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
|
-
function
|
|
68031
|
+
function Je(r6, e) {
|
|
68032
68032
|
let t = r6.value?.valueOf(), n = e.value?.valueOf();
|
|
68033
|
-
return typeof t == "number" && typeof n == "number" ?
|
|
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 ?
|
|
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
|
-
function
|
|
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" ?
|
|
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
|
|
68046
|
+
function St(r6, e) {
|
|
68047
68047
|
let { value: t } = r6;
|
|
68048
68048
|
if (t == null) return false;
|
|
68049
68049
|
let n = e;
|
|
@@ -68068,10 +68068,10 @@ function bt(r6, e) {
|
|
|
68068
68068
|
}
|
|
68069
68069
|
}
|
|
68070
68070
|
function ni(r6) {
|
|
68071
|
-
return typeof r6 == "string" && !!
|
|
68071
|
+
return typeof r6 == "string" && !!xt.date.exec(r6);
|
|
68072
68072
|
}
|
|
68073
68073
|
function Ue(r6) {
|
|
68074
|
-
return typeof r6 == "string" && !!
|
|
68074
|
+
return typeof r6 == "string" && !!xt.dateTime.exec(r6);
|
|
68075
68075
|
}
|
|
68076
68076
|
function ii(r6) {
|
|
68077
68077
|
return !!(r6 && typeof r6 == "object" && ("start" in r6 && Ue(r6.start) || "end" in r6 && Ue(r6.end)));
|
|
@@ -68099,55 +68099,55 @@ function Zn(r6) {
|
|
|
68099
68099
|
function Nr(r6, e) {
|
|
68100
68100
|
if (e) {
|
|
68101
68101
|
if (typeof e != "object") throw new Error("Primitive extension must be an object");
|
|
68102
|
-
return
|
|
68102
|
+
return es(r6 ?? {}, e);
|
|
68103
68103
|
}
|
|
68104
68104
|
return r6;
|
|
68105
68105
|
}
|
|
68106
|
-
function
|
|
68106
|
+
function es(r6, e) {
|
|
68107
68107
|
return delete e.__proto__, delete e.constructor, Object.assign(r6, e);
|
|
68108
68108
|
}
|
|
68109
|
-
function
|
|
68109
|
+
function Ye(r6, e) {
|
|
68110
68110
|
return k(r6, e) && "id" in r6 && typeof r6.id == "string";
|
|
68111
68111
|
}
|
|
68112
|
-
function
|
|
68113
|
-
let e = A(r6) ?? "undefined/undefined", t =
|
|
68112
|
+
function Se(r6) {
|
|
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 (
|
|
68118
|
-
if (
|
|
68117
|
+
if (G(r6)) return r6.reference;
|
|
68118
|
+
if (Ye(r6)) return `${r6.resourceType}/${r6.id}`;
|
|
68119
68119
|
}
|
|
68120
|
-
function
|
|
68121
|
-
if (r6) return
|
|
68120
|
+
function be(r6) {
|
|
68121
|
+
if (r6) return G(r6) ? r6.reference.split("/")[1] : r6.id;
|
|
68122
68122
|
}
|
|
68123
|
-
function
|
|
68123
|
+
function ts(r6) {
|
|
68124
68124
|
return r6.resourceType === "Patient" || r6.resourceType === "Practitioner" || r6.resourceType === "RelatedPerson";
|
|
68125
68125
|
}
|
|
68126
|
-
function
|
|
68127
|
-
if (
|
|
68128
|
-
let e =
|
|
68126
|
+
function rs(r6) {
|
|
68127
|
+
if (ts(r6)) {
|
|
68128
|
+
let e = ns(r6);
|
|
68129
68129
|
if (e) return e;
|
|
68130
68130
|
}
|
|
68131
68131
|
if (r6.resourceType === "Device") {
|
|
68132
|
-
let e =
|
|
68132
|
+
let e = is(r6);
|
|
68133
68133
|
if (e) return e;
|
|
68134
68134
|
}
|
|
68135
|
-
if (r6.resourceType === "MedicationRequest" && r6.medicationCodeableConcept) return
|
|
68135
|
+
if (r6.resourceType === "MedicationRequest" && r6.medicationCodeableConcept) return Ke(r6.medicationCodeableConcept);
|
|
68136
68136
|
if (r6.resourceType === "Subscription" && r6.criteria) return r6.criteria;
|
|
68137
68137
|
if (r6.resourceType === "User" && r6.email) return r6.email;
|
|
68138
68138
|
if ("name" in r6 && r6.name && typeof r6.name == "string") return r6.name;
|
|
68139
68139
|
if ("code" in r6 && r6.code) {
|
|
68140
68140
|
let e = r6.code;
|
|
68141
|
-
if (Array.isArray(e) && (e = e[0]), Wr(e)) return
|
|
68142
|
-
if (
|
|
68141
|
+
if (Array.isArray(e) && (e = e[0]), Wr(e)) return Ke(e);
|
|
68142
|
+
if (ds(e)) return e.text;
|
|
68143
68143
|
}
|
|
68144
68144
|
return A(r6) ?? "";
|
|
68145
68145
|
}
|
|
68146
|
-
function
|
|
68146
|
+
function ns(r6) {
|
|
68147
68147
|
let e = r6.name;
|
|
68148
|
-
if (e && e.length > 0) return
|
|
68148
|
+
if (e && e.length > 0) return Ze(e[0]);
|
|
68149
68149
|
}
|
|
68150
|
-
function
|
|
68150
|
+
function is(r6) {
|
|
68151
68151
|
let e = r6.deviceName;
|
|
68152
68152
|
if (e && e.length > 0) return e[0].name;
|
|
68153
68153
|
}
|
|
@@ -68173,9 +68173,9 @@ function Ct(r6, e) {
|
|
|
68173
68173
|
return JSON.stringify(t, null, e ? 2 : void 0) ?? "";
|
|
68174
68174
|
}
|
|
68175
68175
|
function Hr(r6) {
|
|
68176
|
-
if (!(r6 == null || r6 === "")) return typeof r6 == "object" ? Array.isArray(r6) ?
|
|
68176
|
+
if (!(r6 == null || r6 === "")) return typeof r6 == "object" ? Array.isArray(r6) ? ss(r6) : as(r6) : r6;
|
|
68177
68177
|
}
|
|
68178
|
-
function
|
|
68178
|
+
function ss(r6) {
|
|
68179
68179
|
let e = r6.length;
|
|
68180
68180
|
if (e === 0) return;
|
|
68181
68181
|
let t, n = 0;
|
|
@@ -68185,7 +68185,7 @@ function os(r6) {
|
|
|
68185
68185
|
}
|
|
68186
68186
|
if (n !== 0) return t ?? r6;
|
|
68187
68187
|
}
|
|
68188
|
-
function
|
|
68188
|
+
function as(r6) {
|
|
68189
68189
|
let e, t = 0;
|
|
68190
68190
|
for (let n in r6) {
|
|
68191
68191
|
let i = r6[n], o2 = Hr(i);
|
|
@@ -68204,14 +68204,14 @@ function re(r6) {
|
|
|
68204
68204
|
return e === "string" && r6 !== "" || e === "object" && ("length" in r6 && r6.length > 0 || Object.keys(r6).length > 0);
|
|
68205
68205
|
}
|
|
68206
68206
|
function pe(r6, e, t) {
|
|
68207
|
-
return r6 === e || C(r6) && C(e) ? true : C(r6) || C(e) ? false : Array.isArray(r6) && Array.isArray(e) ?
|
|
68207
|
+
return r6 === e || C(r6) && C(e) ? true : C(r6) || C(e) ? false : Array.isArray(r6) && Array.isArray(e) ? cs(r6, e) : Array.isArray(r6) || Array.isArray(e) ? false : E(r6) && E(e) ? us(r6, e, t) : (E(r6) || E(e), false);
|
|
68208
68208
|
}
|
|
68209
|
-
function
|
|
68209
|
+
function cs(r6, e) {
|
|
68210
68210
|
if (r6.length !== e.length) return false;
|
|
68211
68211
|
for (let t = 0; t < r6.length; t++) if (!pe(r6[t], e[t])) return false;
|
|
68212
68212
|
return true;
|
|
68213
68213
|
}
|
|
68214
|
-
function
|
|
68214
|
+
function us(r6, e, t) {
|
|
68215
68215
|
let n = /* @__PURE__ */ new Set();
|
|
68216
68216
|
for (let i of Object.keys(r6)) n.add(i);
|
|
68217
68217
|
for (let i of Object.keys(e)) n.add(i);
|
|
@@ -68237,7 +68237,7 @@ function qr(r6) {
|
|
|
68237
68237
|
function Wr(r6) {
|
|
68238
68238
|
return E(r6) && "coding" in r6 && Array.isArray(r6.coding) && r6.coding.every(qr);
|
|
68239
68239
|
}
|
|
68240
|
-
function
|
|
68240
|
+
function ds(r6) {
|
|
68241
68241
|
return E(r6) && "text" in r6 && typeof r6.text == "string";
|
|
68242
68242
|
}
|
|
68243
68243
|
var li = [];
|
|
@@ -68265,7 +68265,7 @@ var Qr = (r6, e) => new Promise((t, n) => {
|
|
|
68265
68265
|
clearTimeout(i), n(e.signal?.reason);
|
|
68266
68266
|
}, { once: true });
|
|
68267
68267
|
});
|
|
68268
|
-
function
|
|
68268
|
+
function Xe(r6, e, t) {
|
|
68269
68269
|
let n = [];
|
|
68270
68270
|
for (let i = 0; i < t - 1; i++) {
|
|
68271
68271
|
let o2 = r6.indexOf(e);
|
|
@@ -68280,24 +68280,24 @@ function Pt(r6) {
|
|
|
68280
68280
|
function zr(r6) {
|
|
68281
68281
|
return r6.endsWith("/") ? r6 : r6 + "/";
|
|
68282
68282
|
}
|
|
68283
|
-
function
|
|
68283
|
+
function vs(r6) {
|
|
68284
68284
|
return r6.startsWith("/") ? r6.slice(1) : r6;
|
|
68285
68285
|
}
|
|
68286
|
-
function
|
|
68287
|
-
return new URL(
|
|
68286
|
+
function L(r6, e) {
|
|
68287
|
+
return new URL(vs(e), zr(r6.toString())).toString();
|
|
68288
68288
|
}
|
|
68289
68289
|
function gi(r6, e) {
|
|
68290
|
-
return
|
|
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();
|
|
68294
68294
|
}
|
|
68295
|
-
var
|
|
68296
|
-
function
|
|
68297
|
-
return
|
|
68295
|
+
var Ts = /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-_]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-_]*[A-Za-z0-9])$/;
|
|
68296
|
+
function ep(r6) {
|
|
68297
|
+
return Ts.test(r6);
|
|
68298
68298
|
}
|
|
68299
68299
|
var g = Object.freeze([]);
|
|
68300
|
-
function
|
|
68300
|
+
function Ze(r6, e) {
|
|
68301
68301
|
if (!r6) return "";
|
|
68302
68302
|
let t = [];
|
|
68303
68303
|
if (r6.prefix && e?.prefix !== false && t.push(...r6.prefix), r6.given && t.push(...r6.given), r6.family && t.push(r6.family), r6.suffix && e?.suffix !== false && t.push(...r6.suffix), r6.use && (e?.all || e?.use) && t.push("[" + r6.use + "]"), t.length === 0) {
|
|
@@ -68306,7 +68306,7 @@ function et(r6, e) {
|
|
|
68306
68306
|
}
|
|
68307
68307
|
return t.join(" ").trim();
|
|
68308
68308
|
}
|
|
68309
|
-
function
|
|
68309
|
+
function Ke(r6) {
|
|
68310
68310
|
if (!r6) return "";
|
|
68311
68311
|
let e = Re(r6.text);
|
|
68312
68312
|
return e || (r6.coding ? r6.coding.map((t) => Ti(t)).join(", ") : "");
|
|
@@ -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 =
|
|
68332
|
-
return e || (e = { searchParamsDetails: {} },
|
|
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) {
|
|
@@ -68339,16 +68339,16 @@ function Kr(r6) {
|
|
|
68339
68339
|
}
|
|
68340
68340
|
function Rr(r6) {
|
|
68341
68341
|
let e = r6.type?.[0]?.code;
|
|
68342
|
-
return e === "BackboneElement" || e === "Element" ?
|
|
68342
|
+
return e === "BackboneElement" || e === "Element" ? ks((r6.base?.path ?? r6.path)?.split(".")) : e;
|
|
68343
68343
|
}
|
|
68344
|
-
function
|
|
68344
|
+
function ks(r6) {
|
|
68345
68345
|
return r6.length === 1 ? r6[0] : r6.map(M).join("");
|
|
68346
68346
|
}
|
|
68347
68347
|
function Et(r6, e, t) {
|
|
68348
68348
|
let n = Qe(r6, t);
|
|
68349
|
-
if (n) return
|
|
68349
|
+
if (n) return _s(n.elements, e);
|
|
68350
68350
|
}
|
|
68351
|
-
function
|
|
68351
|
+
function _s(r6, e) {
|
|
68352
68352
|
let t = r6[e] ?? r6[e + "[x]"];
|
|
68353
68353
|
if (t) return t;
|
|
68354
68354
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -68362,10 +68362,10 @@ function Ms(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
|
|
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
|
|
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
|
|
68380
|
-
for (let t of e) if (!t.value) return
|
|
68381
|
-
return
|
|
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
|
|
68384
|
-
return
|
|
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
|
|
68387
|
-
return
|
|
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
|
|
68390
|
-
return
|
|
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
|
|
68392
|
+
if (e.length === 0) return m(true);
|
|
68393
68393
|
let n = t.eval(r6, Ce(r6));
|
|
68394
|
-
return n.length === 0 ?
|
|
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 ?
|
|
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) =>
|
|
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) => [
|
|
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
|
|
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
|
|
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
|
|
68443
|
-
if (["false", "f", "no", "n", "0", "0.0"].includes(n)) return
|
|
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 ? [] :
|
|
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 ? [] :
|
|
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 ? [] :
|
|
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 ? [] :
|
|
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 ? [] :
|
|
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 ? [] :
|
|
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 ? [] :
|
|
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 ? [] :
|
|
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) =>
|
|
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 =
|
|
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 =
|
|
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
|
|
68501
|
-
}, not: (r6, e) =>
|
|
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
|
|
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
|
|
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
|
|
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(
|
|
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
|
|
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
|
|
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 :
|
|
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;
|
|
@@ -68606,7 +68606,7 @@ var wt = class {
|
|
|
68606
68606
|
return "{}";
|
|
68607
68607
|
}
|
|
68608
68608
|
};
|
|
68609
|
-
var Ot = class extends
|
|
68609
|
+
var Ot = class extends lt {
|
|
68610
68610
|
constructor(t, n, i) {
|
|
68611
68611
|
super(t, n);
|
|
68612
68612
|
c(this, "impl");
|
|
@@ -68619,12 +68619,12 @@ var Ot = class extends pt {
|
|
|
68619
68619
|
return this.operator + this.child.toString();
|
|
68620
68620
|
}
|
|
68621
68621
|
};
|
|
68622
|
-
var
|
|
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
|
|
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" ?
|
|
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
|
|
68662
|
+
return m(n.some((o2) => o2.value === i[0].value));
|
|
68663
68663
|
}
|
|
68664
68664
|
};
|
|
68665
|
-
var
|
|
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 ?
|
|
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
|
|
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
|
|
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 ?
|
|
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 ?
|
|
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 ? [] :
|
|
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 ?
|
|
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 =
|
|
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
|
}
|
|
@@ -68807,60 +68807,60 @@ var we = class {
|
|
|
68807
68807
|
return `${this.left.toString()}[${this.expr.toString()}]`;
|
|
68808
68808
|
}
|
|
68809
68809
|
};
|
|
68810
|
-
var
|
|
68810
|
+
var tt = ["!=", "!~", "<=", ">=", "{}", "->"];
|
|
68811
68811
|
var v = { FunctionCall: 0, Dot: 1, Indexer: 2, UnaryAdd: 3, UnarySubtract: 3, Multiply: 4, Divide: 4, IntegerDivide: 4, Modulo: 4, Add: 5, Subtract: 5, Ampersand: 5, Is: 6, As: 6, Union: 7, GreaterThan: 8, GreaterThanOrEquals: 8, LessThan: 8, LessThanOrEquals: 8, Equals: 9, Equivalent: 9, NotEquals: 9, NotEquivalent: 9, In: 10, Contains: 10, And: 11, Xor: 12, Or: 12, Implies: 13, Arrow: 100, Semicolon: 200 };
|
|
68812
|
-
var
|
|
68812
|
+
var Us = { parse(r6) {
|
|
68813
68813
|
let e = r6.consumeAndParse();
|
|
68814
68814
|
if (!r6.match(")")) throw new Error("Parse error: expected `)` got `" + r6.peek()?.value + "`");
|
|
68815
68815
|
return e;
|
|
68816
68816
|
} };
|
|
68817
|
-
var
|
|
68817
|
+
var Bs = { parse(r6, e) {
|
|
68818
68818
|
let t = r6.consumeAndParse();
|
|
68819
68819
|
if (!r6.match("]")) throw new Error("Parse error: expected `]`");
|
|
68820
68820
|
return new we(e, t);
|
|
68821
68821
|
}, precedence: v.Indexer };
|
|
68822
|
-
var
|
|
68823
|
-
if (!(e instanceof
|
|
68822
|
+
var qs = { parse(r6, e) {
|
|
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);
|
|
68827
68827
|
}, precedence: v.FunctionCall };
|
|
68828
|
-
function
|
|
68828
|
+
function Ws(r6) {
|
|
68829
68829
|
let e = r6.split(" "), t = Number.parseFloat(e[0]), n = e[1];
|
|
68830
68830
|
return n?.startsWith("'") && n.endsWith("'") ? n = n.substring(1, n.length - 1) : n = "{" + n + "}", { value: t, unit: n };
|
|
68831
68831
|
}
|
|
68832
|
-
function
|
|
68833
|
-
return new
|
|
68832
|
+
function rt() {
|
|
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
|
-
var
|
|
68836
|
-
var
|
|
68837
|
-
var Yr = { contains:
|
|
68838
|
-
var Xr = { eq:
|
|
68839
|
-
var
|
|
68835
|
+
var js = rt();
|
|
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
|
-
var
|
|
68842
|
-
var
|
|
68843
|
-
function
|
|
68841
|
+
var xa = [Ie.READ, Ie.VREAD, Ie.HISTORY, Ie.SEARCH];
|
|
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
|
-
|
|
68850
|
+
$() && globalThis.location.assign(r6);
|
|
68851
68851
|
}, reload() {
|
|
68852
|
-
|
|
68852
|
+
$() && globalThis.location.reload();
|
|
68853
68853
|
}, getSearch() {
|
|
68854
|
-
return
|
|
68854
|
+
return $() ? globalThis.location.search : "";
|
|
68855
68855
|
}, getPathname() {
|
|
68856
|
-
return
|
|
68856
|
+
return $() ? globalThis.location.pathname : "";
|
|
68857
68857
|
}, getLocation() {
|
|
68858
|
-
return
|
|
68858
|
+
return $() ? globalThis.location.toString() : "";
|
|
68859
68859
|
}, getOrigin() {
|
|
68860
|
-
return
|
|
68860
|
+
return $() ? globalThis.location.protocol + "//" + globalThis.location.host + "/" : "";
|
|
68861
68861
|
} };
|
|
68862
|
-
function
|
|
68863
|
-
if (
|
|
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 Ta(r6) {
|
|
|
68869
68869
|
throw new Error("Unable to decode base64");
|
|
68870
68870
|
}
|
|
68871
68871
|
function $t(r6) {
|
|
68872
|
-
if (
|
|
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
|
|
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
|
|
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);
|
|
@@ -68955,8 +68955,8 @@ function Bi(r6) {
|
|
|
68955
68955
|
if (nn.includes(r6)) throw new f(x(`'context.version' is required for '${r6}'.`));
|
|
68956
68956
|
}
|
|
68957
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
|
-
function
|
|
68959
|
-
return
|
|
68958
|
+
function Ma(r6) {
|
|
68959
|
+
return Va.includes(r6);
|
|
68960
68960
|
}
|
|
68961
68961
|
function qi(r6) {
|
|
68962
68962
|
return !!r6.endpoint;
|
|
@@ -68973,27 +68973,27 @@ function Gt(r6) {
|
|
|
68973
68973
|
for (let o2 of i) if (!rn[o2]) return false;
|
|
68974
68974
|
return !(qi(r6) && !(typeof r6.endpoint == "string" && r6.endpoint.startsWith("ws")));
|
|
68975
68975
|
}
|
|
68976
|
-
function
|
|
68976
|
+
function _a(r6, e, t, n) {
|
|
68977
68977
|
if (typeof e != "object") throw new f(x(`context[${t}] is invalid. Context must contain a single valid FHIR resource! Resource is not an object.`));
|
|
68978
68978
|
if (!(e.id && typeof e.id == "string")) throw new f(x(`context[${t}] is invalid. Resource must contain a valid string ID.`));
|
|
68979
68979
|
if (!e.resourceType) throw new f(x(`context[${t}] is invalid. Resource must contain a resource type. No resource type found.`));
|
|
68980
68980
|
let i = n.resourceType;
|
|
68981
68981
|
if (i !== "*") {
|
|
68982
|
-
if (!
|
|
68982
|
+
if (!Ma(e.resourceType)) throw new f(x(`context[${t}] is invalid. Resource must contain a valid FHIRcast resource type. Resource type is not a known resource type.`));
|
|
68983
68983
|
if (i && e.resourceType !== i) throw new f(x(`context[${t}] is invalid. context[${t}] for the '${r6}' event should contain resource of type ${i}.`));
|
|
68984
68984
|
}
|
|
68985
68985
|
}
|
|
68986
|
-
function
|
|
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 (!
|
|
68989
|
-
} else
|
|
68988
|
+
if (!G(e.reference)) throw new f(x(`context[${t}] is invalid. Expected key '${e.key}' to be a reference.`));
|
|
68989
|
+
} else _a(r6, e.resource, t, n);
|
|
68990
68990
|
}
|
|
68991
|
-
function
|
|
68991
|
+
function Fa(r6, e) {
|
|
68992
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.`));
|
|
68996
|
-
|
|
68996
|
+
La(r6, e[i], i, n[o2], t);
|
|
68997
68997
|
}
|
|
68998
68998
|
for (let [i, o2] of Object.entries(n)) {
|
|
68999
68999
|
if (!(o2.optional || t.has(i))) throw new f(x(`Missing required key '${i}' on context for '${r6}' event.`));
|
|
@@ -69006,7 +69006,7 @@ function sn(r6, e, t, n) {
|
|
|
69006
69006
|
if (typeof t != "object") throw new f(x("context must be a context object or array of context objects."));
|
|
69007
69007
|
if (nn.includes(e) && !n) throw new f(x(`The '${e}' event must contain a 'context.versionId'.`));
|
|
69008
69008
|
let i = Array.isArray(t) ? t : [t];
|
|
69009
|
-
return
|
|
69009
|
+
return Fa(e, i), { timestamp: (/* @__PURE__ */ new Date()).toISOString(), id: se(), event: { "hub.topic": r6, "hub.event": e, context: i, ...n ? { "context.versionId": n } : {} } };
|
|
69010
69010
|
}
|
|
69011
69011
|
var Ht = class extends ee {
|
|
69012
69012
|
constructor(t) {
|
|
@@ -69031,7 +69031,7 @@ var Ht = class extends ee {
|
|
|
69031
69031
|
this.websocket.close();
|
|
69032
69032
|
}
|
|
69033
69033
|
};
|
|
69034
|
-
function
|
|
69034
|
+
function Na(r6) {
|
|
69035
69035
|
return JSON.parse(Li(r6));
|
|
69036
69036
|
}
|
|
69037
69037
|
function Wi(r6) {
|
|
@@ -69039,7 +69039,7 @@ function Wi(r6) {
|
|
|
69039
69039
|
}
|
|
69040
69040
|
function Qt(r6) {
|
|
69041
69041
|
let [e, t, n] = r6.split(".");
|
|
69042
|
-
return
|
|
69042
|
+
return Na(t);
|
|
69043
69043
|
}
|
|
69044
69044
|
function ji(r6) {
|
|
69045
69045
|
try {
|
|
@@ -69073,7 +69073,7 @@ var zt = class {
|
|
|
69073
69073
|
};
|
|
69074
69074
|
var Hi;
|
|
69075
69075
|
Hi = Symbol.toStringTag;
|
|
69076
|
-
var
|
|
69076
|
+
var N = class {
|
|
69077
69077
|
constructor(e) {
|
|
69078
69078
|
c(this, Hi, "ReadablePromise");
|
|
69079
69079
|
c(this, "suspender");
|
|
@@ -69110,7 +69110,7 @@ var F = class {
|
|
|
69110
69110
|
return this.suspender.finally(e);
|
|
69111
69111
|
}
|
|
69112
69112
|
};
|
|
69113
|
-
var
|
|
69113
|
+
var ot = class {
|
|
69114
69114
|
constructor(e, t = "") {
|
|
69115
69115
|
c(this, "storage");
|
|
69116
69116
|
c(this, "prefix", "");
|
|
@@ -69164,7 +69164,7 @@ var an = class {
|
|
|
69164
69164
|
};
|
|
69165
69165
|
var je = { Event: typeof globalThis.Event < "u" ? globalThis.Event : void 0, ErrorEvent: void 0, CloseEvent: void 0 };
|
|
69166
69166
|
var Qi = false;
|
|
69167
|
-
function
|
|
69167
|
+
function Ua() {
|
|
69168
69168
|
if (typeof globalThis.Event > "u") throw new Error("Unable to lazy init events for ReconnectingWebSocket. globalThis.Event is not defined yet");
|
|
69169
69169
|
je.Event = globalThis.Event, je.ErrorEvent = class extends Event {
|
|
69170
69170
|
constructor(t, n) {
|
|
@@ -69183,7 +69183,7 @@ function Na() {
|
|
|
69183
69183
|
}
|
|
69184
69184
|
};
|
|
69185
69185
|
}
|
|
69186
|
-
function
|
|
69186
|
+
function Ba(r6, e) {
|
|
69187
69187
|
if (!r6) throw new Error(e);
|
|
69188
69188
|
}
|
|
69189
69189
|
function Jt(r6) {
|
|
@@ -69193,7 +69193,7 @@ var ke = { maxReconnectionDelay: 1e4, minReconnectionDelay: 1e3 + Math.random()
|
|
|
69193
69193
|
var zi = false;
|
|
69194
69194
|
var Kt = class r extends ee {
|
|
69195
69195
|
constructor(t, n, i = {}) {
|
|
69196
|
-
Qi || (
|
|
69196
|
+
Qi || (Ua(), Qi = true);
|
|
69197
69197
|
super();
|
|
69198
69198
|
c(this, "_ws");
|
|
69199
69199
|
c(this, "_retryCount", -1);
|
|
@@ -69215,7 +69215,7 @@ var Kt = class r extends ee {
|
|
|
69215
69215
|
c(this, "_handleOpen", (t2) => {
|
|
69216
69216
|
this._debug("open event");
|
|
69217
69217
|
let { minUptime: n2 = ke.minUptime } = this._options;
|
|
69218
|
-
clearTimeout(this._connectTimeout), this._uptimeTimeout = setTimeout(() => this._acceptOpen(), n2),
|
|
69218
|
+
clearTimeout(this._connectTimeout), this._uptimeTimeout = setTimeout(() => this._acceptOpen(), n2), Ba(this._ws, "WebSocket is not defined"), this._ws.binaryType = this._binaryType, this._messageQueue.forEach((i2) => this._ws?.send(i2)), this._messageQueue = [], this.onopen && this.onopen(t2), this.dispatchEvent(Jt(t2));
|
|
69219
69219
|
});
|
|
69220
69220
|
c(this, "_handleMessage", (t2) => {
|
|
69221
69221
|
this._debug("message event"), this.onmessage && this.onmessage(t2), this.dispatchEvent(Jt(t2));
|
|
@@ -69357,8 +69357,8 @@ var Kt = class r extends ee {
|
|
|
69357
69357
|
clearTimeout(this._connectTimeout), clearTimeout(this._uptimeTimeout);
|
|
69358
69358
|
}
|
|
69359
69359
|
};
|
|
69360
|
-
var
|
|
69361
|
-
var
|
|
69360
|
+
var qa = [WebSocket.CLOSING, WebSocket.CLOSED];
|
|
69361
|
+
var st = class extends ee {
|
|
69362
69362
|
constructor(...t) {
|
|
69363
69363
|
super();
|
|
69364
69364
|
c(this, "criteria");
|
|
@@ -69384,7 +69384,7 @@ var cn = class {
|
|
|
69384
69384
|
c(this, "token");
|
|
69385
69385
|
c(this, "tokenExpiry");
|
|
69386
69386
|
c(this, "connecting", false);
|
|
69387
|
-
this.criteria = e, this.emitter = new
|
|
69387
|
+
this.criteria = e, this.emitter = new st(e), this.refCount = 1, this.subscriptionProps = t ? { ...t } : void 0;
|
|
69388
69388
|
}
|
|
69389
69389
|
clearAttachedSubscription() {
|
|
69390
69390
|
this.subscriptionId = void 0, this.token = void 0, this.tokenExpiry = void 0;
|
|
@@ -69411,7 +69411,7 @@ var Yt = class {
|
|
|
69411
69411
|
throw new f(x("Not a valid URL"));
|
|
69412
69412
|
}
|
|
69413
69413
|
let o2 = n?.ReconnectingWebSocket ? new n.ReconnectingWebSocket(i, void 0, { debug: n?.debug, debugLogger: n?.debugLogger }) : new Kt(i, void 0, { debug: n?.debug, debugLogger: n?.debugLogger });
|
|
69414
|
-
this.medplum = e, this.ws = o2, this.masterSubEmitter = new
|
|
69414
|
+
this.medplum = e, this.ws = o2, this.masterSubEmitter = new st(), this.criteriaEntries = /* @__PURE__ */ new Map(), this.criteriaEntriesBySubscriptionId = /* @__PURE__ */ new Map(), this.wsClosed = false, this.pingIntervalMs = n?.pingIntervalMs ?? 5e3, this.currentProfile = e.getProfile(), this.setupListeners();
|
|
69415
69415
|
}
|
|
69416
69416
|
setupListeners() {
|
|
69417
69417
|
let e = this.ws;
|
|
@@ -69428,7 +69428,7 @@ var Yt = class {
|
|
|
69428
69428
|
return;
|
|
69429
69429
|
}
|
|
69430
69430
|
if (o2.type === "handshake") {
|
|
69431
|
-
let 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(
|
|
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;
|
|
@@ -69578,10 +69578,10 @@ var Yt = class {
|
|
|
69578
69578
|
return this.getAllCriteriaEmitters().length;
|
|
69579
69579
|
}
|
|
69580
69580
|
getMasterEmitter() {
|
|
69581
|
-
return this.masterSubEmitter || (this.masterSubEmitter = new
|
|
69581
|
+
return this.masterSubEmitter || (this.masterSubEmitter = new st(...Array.from(this.criteriaEntries.keys()))), this.masterSubEmitter;
|
|
69582
69582
|
}
|
|
69583
69583
|
async reconnectIfNeeded() {
|
|
69584
|
-
|
|
69584
|
+
qa.includes(this.getWebSocket().readyState) && await new Promise((e) => {
|
|
69585
69585
|
let t = () => {
|
|
69586
69586
|
this.getWebSocket().removeEventListener("open", t), e();
|
|
69587
69587
|
};
|
|
@@ -69589,18 +69589,18 @@ var Yt = class {
|
|
|
69589
69589
|
});
|
|
69590
69590
|
}
|
|
69591
69591
|
};
|
|
69592
|
-
var un = "5.
|
|
69593
|
-
var
|
|
69594
|
-
var
|
|
69595
|
-
var
|
|
69596
|
-
var
|
|
69597
|
-
var
|
|
69598
|
-
var
|
|
69599
|
-
var
|
|
69592
|
+
var un = "5.1.1-d54b8dc";
|
|
69593
|
+
var $a = O.FHIR_JSON + ", */*; q=0.1";
|
|
69594
|
+
var Ha = "https://api.medplum.com/";
|
|
69595
|
+
var Ga = 1e3;
|
|
69596
|
+
var Qa = 6e4;
|
|
69597
|
+
var za = 0;
|
|
69598
|
+
var Ja = 3e5;
|
|
69599
|
+
var Ka = "Binary/";
|
|
69600
69600
|
var Ji = { resourceType: "Device", id: "system", deviceName: [{ type: "model-name", name: "System" }] };
|
|
69601
69601
|
var $e = { ClientCredentials: "client_credentials", AuthorizationCode: "authorization_code", RefreshToken: "refresh_token", JwtBearer: "urn:ietf:params:oauth:grant-type:jwt-bearer", TokenExchange: "urn:ietf:params:oauth:grant-type:token-exchange" };
|
|
69602
|
-
var
|
|
69603
|
-
var
|
|
69602
|
+
var Ya = { AccessToken: "urn:ietf:params:oauth:token-type:access_token", RefreshToken: "urn:ietf:params:oauth:token-type:refresh_token", IdToken: "urn:ietf:params:oauth:token-type:id_token", Saml1Token: "urn:ietf:params:oauth:token-type:saml1", Saml2Token: "urn:ietf:params:oauth:token-type:saml2" };
|
|
69603
|
+
var Xa = { JwtBearer: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer" };
|
|
69604
69604
|
var Xt = class extends ee {
|
|
69605
69605
|
constructor(t) {
|
|
69606
69606
|
super();
|
|
@@ -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 ??
|
|
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(),
|
|
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 =
|
|
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
|
|
69708
|
+
let s = new N(o2);
|
|
69705
69709
|
return this.setCacheEntry(t, s, n), s;
|
|
69706
69710
|
}
|
|
69707
69711
|
post(t, n, i, o2 = {}) {
|
|
@@ -69755,7 +69759,7 @@ var Xt = class extends ee {
|
|
|
69755
69759
|
}
|
|
69756
69760
|
async exchangeExternalAccessToken(t, n, i) {
|
|
69757
69761
|
if (n = n ?? this.clientId, !n) throw new Error("MedplumClient is missing clientId");
|
|
69758
|
-
let o2 = { grant_type: $e.TokenExchange, subject_token_type:
|
|
69762
|
+
let o2 = { grant_type: $e.TokenExchange, subject_token_type: Ya.AccessToken, client_id: n, subject_token: t };
|
|
69759
69763
|
return i && (o2.membership_id = i), this.fetchTokens(o2);
|
|
69760
69764
|
}
|
|
69761
69765
|
getExternalAuthRedirectUri(t, n, i, o2, s = true) {
|
|
@@ -69769,7 +69773,7 @@ var Xt = class extends ee {
|
|
|
69769
69773
|
return a.toString();
|
|
69770
69774
|
}
|
|
69771
69775
|
fhirUrl(...t) {
|
|
69772
|
-
return new URL(
|
|
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
|
|
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
|
|
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
|
|
69830
|
-
if (i === "system") return new
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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:
|
|
69956
|
-
return y2 && Q2.searchParams.set("_filename", y2), T?.reference && this.setRequestHeader(u2, "X-Security-Context", T.reference),
|
|
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(
|
|
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 [
|
|
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 =
|
|
69977
|
-
return this.createBinary(
|
|
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 =
|
|
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",
|
|
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(
|
|
70031
|
+
return this.get(this.cdsServicesUrl, t);
|
|
70028
70032
|
}
|
|
70029
70033
|
callCdsService(t, n, i) {
|
|
70030
|
-
return this.post(
|
|
70034
|
+
return this.post(L(this.cdsServicesUrl, t), n, O.JSON, i);
|
|
70031
70035
|
}
|
|
70032
70036
|
getActiveLogin() {
|
|
70033
70037
|
return this.storage.getObject("activeLogin");
|
|
@@ -70090,13 +70094,13 @@ var Xt = class extends ee {
|
|
|
70090
70094
|
async download(t, n = {}) {
|
|
70091
70095
|
this.refreshPromise && await this.refreshPromise;
|
|
70092
70096
|
let i = t.toString();
|
|
70093
|
-
i.startsWith(
|
|
70097
|
+
i.startsWith(Ka) && (t = this.fhirUrl(i));
|
|
70094
70098
|
let o2 = n.headers;
|
|
70095
70099
|
return o2 || (o2 = {}, n.headers = o2), o2.Accept || (o2.Accept = "*/*"), this.addFetchOptionsDefaults(n), (await this.fetchWithRetry(t.toString(), n)).blob();
|
|
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 =
|
|
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 =
|
|
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
|
|
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
|
|
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(
|
|
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(
|
|
70170
|
+
if (s.status >= 400) throw new f(mt(l2));
|
|
70167
70171
|
return l2;
|
|
70168
70172
|
}
|
|
70169
70173
|
async parseBody(t, n) {
|
|
@@ -70179,12 +70183,12 @@ var Xt = class extends ee {
|
|
|
70179
70183
|
}
|
|
70180
70184
|
}
|
|
70181
70185
|
async fetchWithRetry(t, n) {
|
|
70182
|
-
t.startsWith("http") || (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);
|
|
70186
70190
|
let s = await this.fetch(t, n);
|
|
70187
|
-
if (this.logLevel !== "none" && this.logResponse(s), this.setCurrentRateLimit(s), o2 >= i || !
|
|
70191
|
+
if (this.logLevel !== "none" && this.logResponse(s), this.setCurrentRateLimit(s), o2 >= i || !nc(s)) return s;
|
|
70188
70192
|
let a = this.getRetryDelay(o2), u2 = n.maxRetryTime ?? 2e3;
|
|
70189
70193
|
if (a > u2) return s;
|
|
70190
70194
|
await Qr(a, { signal: n.signal });
|
|
@@ -70238,22 +70242,22 @@ 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,
|
|
70245
|
+
o2.resolve(await this.request(o2.method, L(this.fhirBaseUrl, o2.url), o2.options));
|
|
70242
70246
|
} catch (s) {
|
|
70243
|
-
o2.reject(new f(
|
|
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 && !
|
|
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) {
|
|
70254
70258
|
Object.entries(this.defaultHeaders).forEach(([n, i]) => {
|
|
70255
70259
|
this.setRequestHeader(t, n, i);
|
|
70256
|
-
}), this.setRequestHeader(t, "Accept",
|
|
70260
|
+
}), this.setRequestHeader(t, "Accept", $a, true), this.options.extendedMode !== false && this.setRequestHeader(t, "X-Medplum", "extended"), t.body && this.setRequestHeader(t, "Content-Type", O.FHIR_JSON, true), this.accessToken ? this.setRequestHeader(t, "Authorization", "Bearer " + this.accessToken) : this.basicAuth && this.setRequestHeader(t, "Authorization", "Basic " + this.basicAuth), t.cache || (t.cache = "no-cache"), t.credentials || (t.credentials = "include");
|
|
70257
70261
|
}
|
|
70258
70262
|
setRequestContentType(t, n) {
|
|
70259
70263
|
this.setRequestHeader(t, "Content-Type", n);
|
|
@@ -70319,7 +70323,7 @@ var Xt = class extends ee {
|
|
|
70319
70323
|
return this.clientId = t, this.fetchTokens({ grant_type: $e.JwtBearer, client_id: t, assertion: n, scope: i });
|
|
70320
70324
|
}
|
|
70321
70325
|
async startJwtAssertionLogin(t) {
|
|
70322
|
-
return this.fetchTokens({ grant_type: $e.ClientCredentials, client_assertion_type:
|
|
70326
|
+
return this.fetchTokens({ grant_type: $e.ClientCredentials, client_assertion_type: Xa.JwtBearer, client_assertion: t });
|
|
70323
70327
|
}
|
|
70324
70328
|
setBasicAuth(t, n) {
|
|
70325
70329
|
this.clientId = t, this.clientSecret = n, this.basicAuth = $t(t + ":" + n);
|
|
@@ -70417,7 +70421,7 @@ var Xt = class extends ee {
|
|
|
70417
70421
|
return this.getSubscriptionManager().getMasterEmitter();
|
|
70418
70422
|
}
|
|
70419
70423
|
};
|
|
70420
|
-
function
|
|
70424
|
+
function Za() {
|
|
70421
70425
|
if (!globalThis.fetch) throw new Error("Fetch not available in this environment");
|
|
70422
70426
|
return globalThis.fetch.bind(globalThis);
|
|
70423
70427
|
}
|
|
@@ -70432,28 +70436,28 @@ function Yi(r6) {
|
|
|
70432
70436
|
let e = r6.entry?.map((t) => t.resource) ?? [];
|
|
70433
70437
|
return Object.assign(e, { bundle: r6 });
|
|
70434
70438
|
}
|
|
70435
|
-
function
|
|
70439
|
+
function ec(r6) {
|
|
70436
70440
|
return E(r6) && "data" in r6 && "contentType" in r6;
|
|
70437
70441
|
}
|
|
70438
70442
|
function Xi(r6, e, t, n) {
|
|
70439
|
-
return
|
|
70443
|
+
return ec(r6) ? r6 : { data: r6, filename: e, contentType: t, onProgress: n };
|
|
70440
70444
|
}
|
|
70441
|
-
function
|
|
70445
|
+
function tc(r6) {
|
|
70442
70446
|
return E(r6) && "docDefinition" in r6;
|
|
70443
70447
|
}
|
|
70444
|
-
function
|
|
70445
|
-
return
|
|
70448
|
+
function rc(r6, e, t, n) {
|
|
70449
|
+
return tc(r6) ? r6 : { docDefinition: r6, filename: e, tableLayouts: t, fonts: n };
|
|
70446
70450
|
}
|
|
70447
|
-
function
|
|
70451
|
+
function nc(r6) {
|
|
70448
70452
|
return r6.status === 429 || r6.status >= 500;
|
|
70449
70453
|
}
|
|
70450
|
-
var mc = [...
|
|
70451
|
-
var
|
|
70452
|
-
var
|
|
70453
|
-
var
|
|
70454
|
-
var
|
|
70455
|
-
var
|
|
70456
|
-
var
|
|
70454
|
+
var mc = [...tt, "->", "<<", ">>", "=="];
|
|
70455
|
+
var xc = rt().registerInfix("->", { precedence: v.Arrow }).registerInfix(";", { precedence: v.Semicolon });
|
|
70456
|
+
var Lc = " ".repeat(2);
|
|
70457
|
+
var Nc = [...tt, "eq", "ne", "co"];
|
|
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 };
|
|
70459
|
+
var qc = rt();
|
|
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 {
|
|
70458
70462
|
constructor(e = "\r", t = "|", n = "^", i = "~", o2 = "\\", s = "&") {
|
|
70459
70463
|
c(this, "segmentSeparator");
|
|
@@ -70497,7 +70501,7 @@ var vo = class r2 {
|
|
|
70497
70501
|
}
|
|
70498
70502
|
buildAck(e) {
|
|
70499
70503
|
let t = /* @__PURE__ */ new Date(), n = this.getSegment("MSH"), i = n?.getField(3)?.toString() ?? "", o2 = n?.getField(4)?.toString() ?? "", s = n?.getField(5)?.toString() ?? "", a = n?.getField(6)?.toString() ?? "", u2 = n?.getField(10)?.toString() ?? "", l2 = n?.getField(12)?.toString() ?? "2.5.1", p = e?.ackCode ?? "AA";
|
|
70500
|
-
return new r2([new
|
|
70504
|
+
return new r2([new ut(["MSH", this.context.getMsh2(), s, a, i, o2, $c(t), "", this.buildAckMessageType(n), t.getTime().toString(), "P", l2], this.context), new ut(["MSA", p, u2, Wc[p]], this.context), ...e?.errSegment ? [e.errSegment] : []]);
|
|
70501
70505
|
}
|
|
70502
70506
|
buildAckMessageType(e) {
|
|
70503
70507
|
let t = e?.getField(9), n = t?.getComponent(2), i = t?.getComponent(3), o2 = "ACK";
|
|
@@ -70509,7 +70513,7 @@ var vo = class r2 {
|
|
|
70509
70513
|
throw n.type = "entity.parse.failed", n;
|
|
70510
70514
|
}
|
|
70511
70515
|
let t = new xe("\r", e.charAt(3), e.charAt(4), e.charAt(5), e.charAt(6), e.charAt(7));
|
|
70512
|
-
return new r2(e.split(/[\r\n]+/).map((n) =>
|
|
70516
|
+
return new r2(e.split(/[\r\n]+/).map((n) => ut.parse(n, t)), t);
|
|
70513
70517
|
}
|
|
70514
70518
|
setSegment(e, t) {
|
|
70515
70519
|
if (t.name === "MSH") {
|
|
@@ -70522,7 +70526,7 @@ var vo = class r2 {
|
|
|
70522
70526
|
return n === 0 && t.name !== "MSH" ? false : n !== -1 ? (this.segments[n] = t, true) : false;
|
|
70523
70527
|
}
|
|
70524
70528
|
};
|
|
70525
|
-
var
|
|
70529
|
+
var ut = class r3 {
|
|
70526
70530
|
constructor(e, t = new xe()) {
|
|
70527
70531
|
c(this, "context");
|
|
70528
70532
|
c(this, "name");
|
|
@@ -70597,12 +70601,12 @@ var te = class r4 {
|
|
|
70597
70601
|
return true;
|
|
70598
70602
|
}
|
|
70599
70603
|
};
|
|
70600
|
-
function
|
|
70604
|
+
function $c(r6) {
|
|
70601
70605
|
let e = r6 instanceof Date ? r6 : new Date(r6), n = e.toISOString().replaceAll(/[-:T]/g, "").replace(/(\.\d+)?Z$/, ""), i = e.getUTCMilliseconds();
|
|
70602
70606
|
return i > 0 && (n += "." + i.toString()), n;
|
|
70603
70607
|
}
|
|
70604
70608
|
var He = { NONE: 0, ERROR: 1, WARN: 2, INFO: 3, DEBUG: 4 };
|
|
70605
|
-
var
|
|
70609
|
+
var Hc = ["NONE", "ERROR", "WARN", "INFO", "DEBUG"];
|
|
70606
70610
|
var To = class r5 {
|
|
70607
70611
|
constructor(e, t = {}, n = He.INFO, i = {}) {
|
|
70608
70612
|
c(this, "write");
|
|
@@ -70640,10 +70644,10 @@ var To = class r5 {
|
|
|
70640
70644
|
i = { ...n };
|
|
70641
70645
|
for (let [o2, s] of Object.entries(i)) s instanceof Error && (i[o2] = cr(s));
|
|
70642
70646
|
}
|
|
70643
|
-
this.write(JSON.stringify({ level:
|
|
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
|
|
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,10 +70665,10 @@ function cr(r6, e = 0, t = 10) {
|
|
|
70661
70665
|
}
|
|
70662
70666
|
return n;
|
|
70663
70667
|
}
|
|
70664
|
-
var
|
|
70665
|
-
var
|
|
70668
|
+
var bn = `${dt}/fhir/StructureDefinition/patient-preferredPharmacy`;
|
|
70669
|
+
var ou = "https://meta.medplum.com/releases";
|
|
70666
70670
|
var pr = /* @__PURE__ */ new Map();
|
|
70667
|
-
function
|
|
70671
|
+
function su(r6) {
|
|
70668
70672
|
let e = r6;
|
|
70669
70673
|
if (!e.tag_name) throw new Error("Manifest missing tag_name");
|
|
70670
70674
|
let t = e.assets;
|
|
@@ -70677,7 +70681,7 @@ function ou(r6) {
|
|
|
70677
70681
|
async function Rn(r6, e, t) {
|
|
70678
70682
|
let n = pr.get(e ?? "latest");
|
|
70679
70683
|
if (!n) {
|
|
70680
|
-
let i = e ? `v${e}` : "latest", o2 = new URL(`${
|
|
70684
|
+
let i = e ? `v${e}` : "latest", o2 = new URL(`${ou}/${i}.json`);
|
|
70681
70685
|
if (o2.searchParams.set("a", r6), o2.searchParams.set("c", un), t) for (let [u2, l2] of Object.entries(t)) o2.searchParams.set(u2, l2);
|
|
70682
70686
|
let s = await fetch(o2.toString());
|
|
70683
70687
|
if (s.status !== 200) {
|
|
@@ -70690,15 +70694,15 @@ async function Rn(r6, e, t) {
|
|
|
70690
70694
|
throw new Error(`Received status code ${s.status} while fetching manifest for version '${e ?? "latest"}'. Message: ${u2}`);
|
|
70691
70695
|
}
|
|
70692
70696
|
let a = await s.json();
|
|
70693
|
-
|
|
70697
|
+
su(a), n = a, pr.set(e ?? "latest", n), e || pr.set(n.tag_name.slice(1), n);
|
|
70694
70698
|
}
|
|
70695
70699
|
return n;
|
|
70696
70700
|
}
|
|
70697
|
-
function
|
|
70701
|
+
function au(r6) {
|
|
70698
70702
|
return /^\d+\.\d+\.\d+(-[0-9a-z]{7})?$/.test(r6);
|
|
70699
70703
|
}
|
|
70700
|
-
async function
|
|
70701
|
-
if (!
|
|
70704
|
+
async function ry(r6, e) {
|
|
70705
|
+
if (!au(e)) return false;
|
|
70702
70706
|
try {
|
|
70703
70707
|
await Rn(r6, e);
|
|
70704
70708
|
} catch {
|
|
@@ -70706,7 +70710,7 @@ async function ty(r6, e) {
|
|
|
70706
70710
|
}
|
|
70707
70711
|
return true;
|
|
70708
70712
|
}
|
|
70709
|
-
async function
|
|
70713
|
+
async function ny(r6) {
|
|
70710
70714
|
let e = await Rn(r6);
|
|
70711
70715
|
if (!e.tag_name.startsWith("v")) throw new Error(`Invalid release name found. Release tag '${e.tag_name}' did not start with 'v'`);
|
|
70712
70716
|
return e.tag_name.slice(1);
|
|
@@ -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
|
|
70730
|
-
var o = (d2, 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 ===
|
|
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 ??
|
|
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
|
|
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 ?
|
|
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,
|
|
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
|
|
71937
|
+
var EnhancedHl7Client = class extends S2 {
|
|
71934
71938
|
constructor(options) {
|
|
71935
71939
|
super(options);
|
|
71936
71940
|
__publicField(this, "stats");
|
|
@@ -72243,7 +72247,7 @@ function cleanupLoggerConfig(config, configPathRoot = "config") {
|
|
|
72243
72247
|
warnings.push(`${configPathRoot}.filesToKeep must be a valid integer`);
|
|
72244
72248
|
config.filesToKeep = void 0;
|
|
72245
72249
|
}
|
|
72246
|
-
if (typeof config.logLevel !== "undefined" && !(typeof config.logLevel === "number" &&
|
|
72250
|
+
if (typeof config.logLevel !== "undefined" && !(typeof config.logLevel === "number" && Hc[config.logLevel] !== void 0)) {
|
|
72247
72251
|
warnings.push(`${configPathRoot}.logLevel must be a valid log level between LogLevel.NONE and LogLevel.DEBUG`);
|
|
72248
72252
|
config.logLevel = void 0;
|
|
72249
72253
|
}
|
|
@@ -72281,14 +72285,14 @@ function parseLoggerConfigFromArgs(args) {
|
|
|
72281
72285
|
if (!propName.startsWith("logger.") || propVal === void 0) {
|
|
72282
72286
|
continue;
|
|
72283
72287
|
}
|
|
72284
|
-
const [_2, configType, settingName] =
|
|
72288
|
+
const [_2, configType, settingName] = Xe(propName, ".", 3);
|
|
72285
72289
|
if (!LOGGER_CONFIG_KEYS.includes(settingName)) {
|
|
72286
72290
|
warnings.push(`${propName} is not a valid setting name`);
|
|
72287
72291
|
}
|
|
72288
72292
|
let configValue;
|
|
72289
72293
|
if (settingName === "logLevel") {
|
|
72290
72294
|
try {
|
|
72291
|
-
configValue =
|
|
72295
|
+
configValue = Tm(propVal);
|
|
72292
72296
|
} catch (err) {
|
|
72293
72297
|
warnings.push(`Error while parsing ${propName}: ${_e(err)}`);
|
|
72294
72298
|
}
|
|
@@ -72623,9 +72627,9 @@ async function downloadRelease(version, path4) {
|
|
|
72623
72627
|
writeStream.once("close", resolve2);
|
|
72624
72628
|
});
|
|
72625
72629
|
}
|
|
72626
|
-
function parseDownloadUrl(release,
|
|
72630
|
+
function parseDownloadUrl(release, os) {
|
|
72627
72631
|
let endingToMatch;
|
|
72628
|
-
switch (
|
|
72632
|
+
switch (os) {
|
|
72629
72633
|
case "win32":
|
|
72630
72634
|
endingToMatch = ".exe";
|
|
72631
72635
|
break;
|
|
@@ -72633,14 +72637,14 @@ function parseDownloadUrl(release, os2) {
|
|
|
72633
72637
|
endingToMatch = "linux";
|
|
72634
72638
|
break;
|
|
72635
72639
|
default:
|
|
72636
|
-
throw new Error(`Unsupported platform: ${
|
|
72640
|
+
throw new Error(`Unsupported platform: ${os}`);
|
|
72637
72641
|
}
|
|
72638
72642
|
for (const asset of release.assets) {
|
|
72639
72643
|
if (asset.name.endsWith(endingToMatch)) {
|
|
72640
72644
|
return asset.browser_download_url;
|
|
72641
72645
|
}
|
|
72642
72646
|
}
|
|
72643
|
-
throw new Error(`No download URL found for release '${release.tag_name}' for ${
|
|
72647
|
+
throw new Error(`No download URL found for release '${release.tag_name}' for ${os}`);
|
|
72644
72648
|
}
|
|
72645
72649
|
function getReleaseBinPath(version) {
|
|
72646
72650
|
let binaryName;
|
|
@@ -73215,7 +73219,7 @@ IPv6 is currently unsupported.`;
|
|
|
73215
73219
|
this.log.error(errMsg);
|
|
73216
73220
|
throw new Error(errMsg);
|
|
73217
73221
|
}
|
|
73218
|
-
if (!((0, import_node_net4.isIPv4)(message.remote) ||
|
|
73222
|
+
if (!((0, import_node_net4.isIPv4)(message.remote) || ep(message.remote))) {
|
|
73219
73223
|
const errMsg = `Attempted to ping an invalid host.
|
|
73220
73224
|
|
|
73221
73225
|
"${message.remote}" is not a valid IPv4 address or a resolvable hostname.`;
|
|
@@ -73290,7 +73294,7 @@ ${result}`);
|
|
|
73290
73294
|
return;
|
|
73291
73295
|
}
|
|
73292
73296
|
let child;
|
|
73293
|
-
if (message.version && !await
|
|
73297
|
+
if (message.version && !await ry("agent-upgrader", message.version)) {
|
|
73294
73298
|
const versionTag = message.version ? `v${message.version}` : "latest";
|
|
73295
73299
|
const errMsg = `Error during upgrading to version '${versionTag}'. '${message.version}' is not a valid version`;
|
|
73296
73300
|
this.log.error(errMsg);
|
|
@@ -73301,7 +73305,7 @@ ${result}`);
|
|
|
73301
73305
|
});
|
|
73302
73306
|
return;
|
|
73303
73307
|
}
|
|
73304
|
-
const targetVersion = message.version ?? await
|
|
73308
|
+
const targetVersion = message.version ?? await ny("agent-upgrader");
|
|
73305
73309
|
if (un.startsWith(targetVersion)) {
|
|
73306
73310
|
if (!message?.force) {
|
|
73307
73311
|
this.log.info(`Attempted to upgrade to version ${targetVersion}, but agent is already on that version`);
|
|
@@ -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 ??
|
|
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
|
|
73572
|
+
return Vd.APPLICATION;
|
|
73569
73573
|
}
|
|
73570
73574
|
if (normalizedValue === "first") {
|
|
73571
|
-
return
|
|
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 ?
|
|
73638
|
+
const app = new App(medplum, agentId, args.logLevel ? Tm(args.logLevel) : void 0, {
|
|
73635
73639
|
mainLogger,
|
|
73636
73640
|
channelLogger
|
|
73637
73641
|
});
|
|
@@ -73673,10 +73677,10 @@ async function upgraderMain(argv) {
|
|
|
73673
73677
|
rejectOnTimeout = () => reject(new Error("Timed out while waiting for IPC to disconnect"));
|
|
73674
73678
|
import_node_process3.default.once("disconnect", resolve2);
|
|
73675
73679
|
});
|
|
73676
|
-
if (argv[3] && !
|
|
73680
|
+
if (argv[3] && !au(argv[3])) {
|
|
73677
73681
|
throw new Error("Invalid version specified");
|
|
73678
73682
|
}
|
|
73679
|
-
const version = argv[3] ?? await
|
|
73683
|
+
const version = argv[3] ?? await ny("agent-upgrader");
|
|
73680
73684
|
const binPath = getReleaseBinPath(version);
|
|
73681
73685
|
if (!(0, import_node_fs6.existsSync)(binPath)) {
|
|
73682
73686
|
globalLogger.info(`Could not find binary at "${binPath}". Downloading release from GitHub...`);
|