@dpuse/dpuse-shared 1.0.225 → 1.0.227
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/dpuse-shared.es.js
CHANGED
|
@@ -432,7 +432,7 @@ function E(e, t) {
|
|
|
432
432
|
});
|
|
433
433
|
}
|
|
434
434
|
/* @__NO_SIDE_EFFECTS__ */
|
|
435
|
-
function
|
|
435
|
+
function ee(...e) {
|
|
436
436
|
return d({
|
|
437
437
|
...e[0],
|
|
438
438
|
pipe: e,
|
|
@@ -449,7 +449,7 @@ function D(...e) {
|
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
451
|
/* @__NO_SIDE_EFFECTS__ */
|
|
452
|
-
function
|
|
452
|
+
function D(e, t, n) {
|
|
453
453
|
let r = e["~run"]({ value: t }, /* @__PURE__ */ a(n));
|
|
454
454
|
return {
|
|
455
455
|
typed: r.typed,
|
|
@@ -459,10 +459,10 @@ function O(e, t, n) {
|
|
|
459
459
|
};
|
|
460
460
|
}
|
|
461
461
|
// src/locale/locale.schema.ts
|
|
462
|
-
var
|
|
462
|
+
var O = /* @__PURE__ */ C({
|
|
463
463
|
en: /* @__PURE__ */ w(),
|
|
464
464
|
es: /* @__PURE__ */ w()
|
|
465
|
-
}),
|
|
465
|
+
}), te = {
|
|
466
466
|
id: /* @__PURE__ */ w(),
|
|
467
467
|
label: /* @__PURE__ */ C({
|
|
468
468
|
en: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
@@ -474,7 +474,7 @@ var k = /* @__PURE__ */ C({
|
|
|
474
474
|
}),
|
|
475
475
|
icon: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
476
476
|
iconDark: /* @__PURE__ */ y(/* @__PURE__ */ w())
|
|
477
|
-
},
|
|
477
|
+
}, k = (e) => /* @__PURE__ */ E(e.map((e) => /* @__PURE__ */ _(e))), ne = k([
|
|
478
478
|
"app",
|
|
479
479
|
"connector",
|
|
480
480
|
"connectorConnection",
|
|
@@ -496,32 +496,32 @@ var k = /* @__PURE__ */ C({
|
|
|
496
496
|
"presenter",
|
|
497
497
|
"presenterPresentation",
|
|
498
498
|
"tool"
|
|
499
|
-
]),
|
|
499
|
+
]), re = k([
|
|
500
500
|
"danger",
|
|
501
501
|
"success",
|
|
502
502
|
"warning"
|
|
503
|
-
]),
|
|
503
|
+
]), ie = k([
|
|
504
504
|
"alpha",
|
|
505
505
|
"beta",
|
|
506
506
|
"releaseCandidate",
|
|
507
507
|
"generalAvailability"
|
|
508
|
-
]),
|
|
509
|
-
color:
|
|
508
|
+
]), ae = /* @__PURE__ */ C({
|
|
509
|
+
color: re,
|
|
510
510
|
label: /* @__PURE__ */ w()
|
|
511
|
-
}),
|
|
512
|
-
...
|
|
513
|
-
typeId:
|
|
514
|
-
},
|
|
515
|
-
...
|
|
511
|
+
}), oe = {
|
|
512
|
+
...te,
|
|
513
|
+
typeId: ne
|
|
514
|
+
}, se = /* @__PURE__ */ C({
|
|
515
|
+
...oe,
|
|
516
516
|
order: /* @__PURE__ */ b(),
|
|
517
517
|
path: /* @__PURE__ */ w()
|
|
518
|
-
}),
|
|
519
|
-
...
|
|
518
|
+
}), ce = {
|
|
519
|
+
...oe,
|
|
520
520
|
firstCreatedAt: /* @__PURE__ */ y(/* @__PURE__ */ b()),
|
|
521
521
|
lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */ b()),
|
|
522
|
-
status: /* @__PURE__ */ y(
|
|
523
|
-
statusId: /* @__PURE__ */ y(
|
|
524
|
-
},
|
|
522
|
+
status: /* @__PURE__ */ y(ae),
|
|
523
|
+
statusId: /* @__PURE__ */ y(ie)
|
|
524
|
+
}, le = /* @__PURE__ */ C({ ...ce }), ue = [
|
|
525
525
|
{
|
|
526
526
|
id: "alpha",
|
|
527
527
|
color: "danger",
|
|
@@ -555,8 +555,8 @@ var k = /* @__PURE__ */ C({
|
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
];
|
|
558
|
-
function
|
|
559
|
-
let n =
|
|
558
|
+
function de(e, t = "en") {
|
|
559
|
+
let n = ue.find((t) => t.id === e);
|
|
560
560
|
if (n) {
|
|
561
561
|
let e = n.labels[t] ?? n.labels.en ?? n.id;
|
|
562
562
|
return {
|
|
@@ -570,7 +570,7 @@ function ue(e, t = "en") {
|
|
|
570
570
|
};
|
|
571
571
|
}
|
|
572
572
|
// src/component/dataView/index.ts
|
|
573
|
-
var
|
|
573
|
+
var fe = [
|
|
574
574
|
{
|
|
575
575
|
id: "arrow",
|
|
576
576
|
isStructured: !1,
|
|
@@ -662,7 +662,7 @@ var de = [
|
|
|
662
662
|
isText: !1,
|
|
663
663
|
supportId: "unsupported"
|
|
664
664
|
}
|
|
665
|
-
],
|
|
665
|
+
], A = [
|
|
666
666
|
{
|
|
667
667
|
id: ",",
|
|
668
668
|
character: ","
|
|
@@ -703,7 +703,7 @@ var de = [
|
|
|
703
703
|
id: "0x1E",
|
|
704
704
|
character: ""
|
|
705
705
|
}
|
|
706
|
-
],
|
|
706
|
+
], pe = [
|
|
707
707
|
{
|
|
708
708
|
id: "string",
|
|
709
709
|
defaultSubtypeId: "plain",
|
|
@@ -760,11 +760,11 @@ var de = [
|
|
|
760
760
|
isChoosable: !1,
|
|
761
761
|
subtypeIds: []
|
|
762
762
|
}
|
|
763
|
-
],
|
|
764
|
-
function
|
|
765
|
-
return
|
|
763
|
+
], me = [",", "."];
|
|
764
|
+
function he(e) {
|
|
765
|
+
return A.find(({ id: t }) => t === e)?.character ?? e;
|
|
766
766
|
}
|
|
767
|
-
|
|
767
|
+
k([
|
|
768
768
|
"app",
|
|
769
769
|
"engine",
|
|
770
770
|
"connector",
|
|
@@ -773,16 +773,16 @@ A([
|
|
|
773
773
|
"tool"
|
|
774
774
|
]);
|
|
775
775
|
// src/component/module/moduleConfig.schema.ts
|
|
776
|
-
var
|
|
777
|
-
...
|
|
776
|
+
var j = {
|
|
777
|
+
...ce,
|
|
778
778
|
vendorAccountURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
779
779
|
vendorDocumentationURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
780
780
|
vendorHomeURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
781
781
|
version: /* @__PURE__ */ w()
|
|
782
782
|
};
|
|
783
|
-
({ ...
|
|
783
|
+
({ ...j });
|
|
784
784
|
// src/component/module/connector/connectorConfig.schema.ts
|
|
785
|
-
var
|
|
785
|
+
var ge = k([
|
|
786
786
|
"auditObjectContent",
|
|
787
787
|
"closeStore",
|
|
788
788
|
"createObject",
|
|
@@ -803,22 +803,22 @@ var he = A([
|
|
|
803
803
|
"removeRecords",
|
|
804
804
|
"retrieveRecords",
|
|
805
805
|
"upsertRecords"
|
|
806
|
-
]),
|
|
806
|
+
]), _e = k([
|
|
807
807
|
"application",
|
|
808
808
|
"curatedDataset",
|
|
809
809
|
"database",
|
|
810
810
|
"fileStore"
|
|
811
|
-
]),
|
|
811
|
+
]), ve = /* @__PURE__ */ C({ label: O }), ye = k([
|
|
812
812
|
"apiEndpoint",
|
|
813
813
|
"file",
|
|
814
814
|
"table"
|
|
815
|
-
]),
|
|
815
|
+
]), be = k([
|
|
816
816
|
"bidirectional",
|
|
817
817
|
"destination",
|
|
818
818
|
"source",
|
|
819
819
|
"unknown"
|
|
820
|
-
]),
|
|
821
|
-
authMethodId:
|
|
820
|
+
]), xe = /* @__PURE__ */ C({ label: O }), Se = /* @__PURE__ */ C({
|
|
821
|
+
authMethodId: k([
|
|
822
822
|
"apiKey",
|
|
823
823
|
"disabled",
|
|
824
824
|
"oAuth2",
|
|
@@ -827,77 +827,77 @@ var he = A([
|
|
|
827
827
|
activeConnectionCount: /* @__PURE__ */ x(/* @__PURE__ */ b()),
|
|
828
828
|
canDescribe: /* @__PURE__ */ x(/* @__PURE__ */ g()),
|
|
829
829
|
id: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
830
|
-
label: /* @__PURE__ */ x(
|
|
830
|
+
label: /* @__PURE__ */ x(O),
|
|
831
831
|
maxConnectionCount: /* @__PURE__ */ y(/* @__PURE__ */ b()),
|
|
832
832
|
params: /* @__PURE__ */ x(/* @__PURE__ */ h(/* @__PURE__ */ S(/* @__PURE__ */ w(), /* @__PURE__ */ w())))
|
|
833
|
-
}),
|
|
834
|
-
...
|
|
833
|
+
}), Ce = /* @__PURE__ */ C({
|
|
834
|
+
...j,
|
|
835
835
|
typeId: /* @__PURE__ */ _("connector"),
|
|
836
|
-
actionNames: /* @__PURE__ */ h(
|
|
837
|
-
category: /* @__PURE__ */ y(
|
|
838
|
-
categoryId:
|
|
839
|
-
implementations: /* @__PURE__ */ S(/* @__PURE__ */ w(),
|
|
840
|
-
itemTypeId:
|
|
841
|
-
usage: /* @__PURE__ */ y(
|
|
842
|
-
usageId: /* @__PURE__ */ y(
|
|
843
|
-
}),
|
|
836
|
+
actionNames: /* @__PURE__ */ h(ge),
|
|
837
|
+
category: /* @__PURE__ */ y(ve),
|
|
838
|
+
categoryId: _e,
|
|
839
|
+
implementations: /* @__PURE__ */ S(/* @__PURE__ */ w(), Se),
|
|
840
|
+
itemTypeId: ye,
|
|
841
|
+
usage: /* @__PURE__ */ y(xe),
|
|
842
|
+
usageId: /* @__PURE__ */ y(be)
|
|
843
|
+
}), we = /* @__PURE__ */ new Set([
|
|
844
844
|
"APIError",
|
|
845
845
|
"AppError",
|
|
846
846
|
"ConnectorError",
|
|
847
847
|
"DPUseError",
|
|
848
848
|
"EngineError",
|
|
849
849
|
"FetchError"
|
|
850
|
-
]),
|
|
851
|
-
[/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${
|
|
852
|
-
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) =>
|
|
853
|
-
[/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () =>
|
|
854
|
-
[/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () =>
|
|
855
|
-
[/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () =>
|
|
856
|
-
],
|
|
850
|
+
]), Te = 2048, M = "[REDACTED]", Ee = 10, De = /api[-_]?key|authori[sz]ation|cookie|credential|passw(?:or)?d|private[-_]?key|secret|token/i, Oe = [
|
|
851
|
+
[/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${M}`],
|
|
852
|
+
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) => De.test(t) && !/^(?:Basic|Bearer)$/i.test(r) ? `${t}${n}${M}` : e],
|
|
853
|
+
[/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () => M],
|
|
854
|
+
[/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () => M],
|
|
855
|
+
[/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () => M]
|
|
856
|
+
], N = class extends Error {
|
|
857
857
|
data;
|
|
858
858
|
locator;
|
|
859
859
|
constructor(e, t, n, r) {
|
|
860
860
|
super(e, r), this.name = "DPUseError", this.data = n, this.locator = t;
|
|
861
861
|
}
|
|
862
|
-
},
|
|
862
|
+
}, P = class extends N {
|
|
863
863
|
constructor(e, t, n, r) {
|
|
864
864
|
super(e, t, n, r), this.name = "AppError";
|
|
865
865
|
}
|
|
866
|
-
},
|
|
866
|
+
}, ke = class extends N {
|
|
867
867
|
constructor(e, t, n, r) {
|
|
868
868
|
super(e, t, n, r), this.name = "APIError";
|
|
869
869
|
}
|
|
870
|
-
},
|
|
870
|
+
}, Ae = class extends N {
|
|
871
871
|
constructor(e, t, n, r) {
|
|
872
872
|
super(e, t, n, r), this.name = "EngineError";
|
|
873
873
|
}
|
|
874
|
-
},
|
|
874
|
+
}, F = class extends N {
|
|
875
875
|
constructor(e, t, n, r) {
|
|
876
876
|
super(e, t, n, r), this.name = "ConnectorError";
|
|
877
877
|
}
|
|
878
|
-
},
|
|
878
|
+
}, I = class extends N {
|
|
879
879
|
constructor(e, t, n, r) {
|
|
880
880
|
super(e, t, n, r), this.name = "FetchError";
|
|
881
881
|
}
|
|
882
882
|
};
|
|
883
|
-
async function
|
|
883
|
+
async function je(e, t, n) {
|
|
884
884
|
let r = ` - ${e.statusText}`, i = `${t} Response status '${String(e.status)}${e.statusText ? r : ""}' received.`, a;
|
|
885
885
|
try {
|
|
886
886
|
a = await e.text();
|
|
887
887
|
} catch (e) {
|
|
888
|
-
a = `<body unavailable: ${
|
|
888
|
+
a = `<body unavailable: ${L(e).message}>`;
|
|
889
889
|
}
|
|
890
|
-
return new
|
|
890
|
+
return new I(i, n, { body: ze(a) });
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function Me(e) {
|
|
893
893
|
return e.map((e) => e.message).join(" ");
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function Ne(e) {
|
|
896
896
|
try {
|
|
897
897
|
e();
|
|
898
898
|
} catch {}
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function L(e) {
|
|
901
901
|
if (e instanceof Error) return e;
|
|
902
902
|
if (typeof e == "string") return Error(e);
|
|
903
903
|
if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return Error(String(e));
|
|
@@ -909,24 +909,24 @@ function z(e) {
|
|
|
909
909
|
}
|
|
910
910
|
return /* @__PURE__ */ Error("Unknown error");
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
let t = /* @__PURE__ */ new Set(), n = [], r =
|
|
912
|
+
function Pe(e) {
|
|
913
|
+
let t = /* @__PURE__ */ new Set(), n = [], r = L(e);
|
|
914
914
|
for (; r != null && !t.has(r);) {
|
|
915
915
|
t.add(r);
|
|
916
|
-
let [e, i] =
|
|
916
|
+
let [e, i] = Ve(r), a = Re(e);
|
|
917
917
|
/(?:\.{3}|[.!?])$/.test(a.message) || (a.message += "."), n.push(a), r = i;
|
|
918
918
|
}
|
|
919
919
|
return n;
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function Fe(e) {
|
|
922
922
|
let t;
|
|
923
923
|
for (let n of e.toReversed()) {
|
|
924
|
-
let e =
|
|
924
|
+
let e = Le(n, t);
|
|
925
925
|
n.stack !== void 0 && (e.stack = n.stack), t = e;
|
|
926
926
|
}
|
|
927
927
|
return t ?? /* @__PURE__ */ Error("No error to unserialise.");
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function Ie(e) {
|
|
930
930
|
let t;
|
|
931
931
|
try {
|
|
932
932
|
t = JSON.stringify(e);
|
|
@@ -935,13 +935,13 @@ function Pe(e) {
|
|
|
935
935
|
}
|
|
936
936
|
return t === "" && (t = "Unknown error"), t;
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function Le(e, t) {
|
|
939
939
|
switch (e.name) {
|
|
940
|
-
case "APIError": return new
|
|
941
|
-
case "AppError": return new
|
|
942
|
-
case "ConnectorError": return new
|
|
943
|
-
case "EngineError": return new
|
|
944
|
-
case "FetchError": return new
|
|
940
|
+
case "APIError": return new ke(e.message, e.locator, e.data, { cause: t });
|
|
941
|
+
case "AppError": return new P(e.message, e.locator, e.data, { cause: t });
|
|
942
|
+
case "ConnectorError": return new F(e.message, e.locator, e.data, { cause: t });
|
|
943
|
+
case "EngineError": return new Ae(e.message, e.locator, e.data, { cause: t });
|
|
944
|
+
case "FetchError": return new I(e.message, e.locator, e.data, { cause: t });
|
|
945
945
|
default: {
|
|
946
946
|
let n = e.name;
|
|
947
947
|
return new class extends Error {
|
|
@@ -950,32 +950,32 @@ function Fe(e, t) {
|
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function Re(e) {
|
|
954
954
|
let { data: t, message: n, stack: r } = e;
|
|
955
955
|
return {
|
|
956
956
|
...e,
|
|
957
|
-
data: t === void 0 ? void 0 :
|
|
958
|
-
message:
|
|
959
|
-
stack: r === void 0 ? void 0 :
|
|
957
|
+
data: t === void 0 ? void 0 : z(t, /* @__PURE__ */ new WeakSet(), 0),
|
|
958
|
+
message: R(n),
|
|
959
|
+
stack: r === void 0 ? void 0 : R(r)
|
|
960
960
|
};
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function R(e) {
|
|
963
963
|
let t = e;
|
|
964
|
-
for (let [e, n] of
|
|
964
|
+
for (let [e, n] of Oe) t = t.replaceAll(e, (e, ...t) => n(e, ...t));
|
|
965
965
|
return t;
|
|
966
966
|
}
|
|
967
|
-
function
|
|
968
|
-
return typeof e == "string" ?
|
|
967
|
+
function z(e, t, n) {
|
|
968
|
+
return typeof e == "string" ? R(e) : typeof e != "object" || !e ? e : n >= Ee ? M : t.has(e) ? "[Circular]" : (t.add(e), Array.isArray(e) ? e.map((e) => z(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, r != null && De.test(e) ? M : z(r, t, n + 1)])));
|
|
969
969
|
}
|
|
970
|
-
function
|
|
971
|
-
if (e != null && e !== "") return e.length >
|
|
970
|
+
function ze(e) {
|
|
971
|
+
if (e != null && e !== "") return e.length > Te ? `${e.slice(0, Te)}... [truncated]` : e;
|
|
972
972
|
}
|
|
973
|
-
function
|
|
974
|
-
return e instanceof
|
|
973
|
+
function Be(e) {
|
|
974
|
+
return e instanceof N || we.has(e.name) && typeof e.locator == "string";
|
|
975
975
|
}
|
|
976
|
-
function
|
|
977
|
-
let t = e.cause == null ? null :
|
|
978
|
-
if (
|
|
976
|
+
function Ve(e) {
|
|
977
|
+
let t = e.cause == null ? null : L(e.cause);
|
|
978
|
+
if (Be(e)) return [{
|
|
979
979
|
data: e.data,
|
|
980
980
|
locator: e.locator,
|
|
981
981
|
message: e.message,
|
|
@@ -992,46 +992,46 @@ function ze(e) {
|
|
|
992
992
|
}, t] : [{
|
|
993
993
|
data: n,
|
|
994
994
|
locator: "",
|
|
995
|
-
message:
|
|
995
|
+
message: Ie(e),
|
|
996
996
|
name: "Error",
|
|
997
997
|
stack: void 0
|
|
998
998
|
}, null];
|
|
999
999
|
}
|
|
1000
1000
|
// src/component/module/connector/objectFetching.ts
|
|
1001
|
-
var
|
|
1002
|
-
async function
|
|
1003
|
-
if (
|
|
1001
|
+
var He = 33554432, B = 416;
|
|
1002
|
+
async function Ue(e, t) {
|
|
1003
|
+
if (We()) {
|
|
1004
1004
|
let n = await fetch(e, {
|
|
1005
1005
|
headers: t.headers ?? {},
|
|
1006
1006
|
signal: t.signal
|
|
1007
1007
|
});
|
|
1008
|
-
if (!n.ok) throw await
|
|
1009
|
-
return
|
|
1008
|
+
if (!n.ok) throw await je(n, `Failed to fetch '${t.path}' file.`, t.locator);
|
|
1009
|
+
return Ge(n, t);
|
|
1010
1010
|
}
|
|
1011
|
-
let n = await
|
|
1012
|
-
if (n.status !== 206 && n.status !==
|
|
1011
|
+
let n = await Ke(e, 0, t);
|
|
1012
|
+
if (n.status !== 206 && n.status !== B) return Ge(n, t);
|
|
1013
1013
|
let r = n, i = 0;
|
|
1014
1014
|
return new ReadableStream({ pull: async (n) => {
|
|
1015
|
-
let a = r ?? await
|
|
1016
|
-
if (r = void 0, a.status ===
|
|
1015
|
+
let a = r ?? await Ke(e, i, t);
|
|
1016
|
+
if (r = void 0, a.status === B) {
|
|
1017
1017
|
n.close();
|
|
1018
1018
|
return;
|
|
1019
1019
|
}
|
|
1020
|
-
if (a.status !== 206) throw new
|
|
1020
|
+
if (a.status !== 206) throw new F(`Failed to fetch part of '${t.path}' file.`, `${t.locator}.range`);
|
|
1021
1021
|
let o = new Uint8Array(await a.arrayBuffer());
|
|
1022
|
-
i += o.length, o.length > 0 && n.enqueue(o), o.length <
|
|
1022
|
+
i += o.length, o.length > 0 && n.enqueue(o), o.length < He && n.close();
|
|
1023
1023
|
} }, { highWaterMark: 0 });
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1025
|
+
function We() {
|
|
1026
1026
|
let { userAgentData: e } = globalThis.navigator;
|
|
1027
1027
|
return e?.brands.some(({ brand: e }) => e === "Chromium") === !0;
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1030
|
-
if (e.body == null) throw new
|
|
1029
|
+
function Ge(e, t) {
|
|
1030
|
+
if (e.body == null) throw new F("Readable streams are not supported in this runtime.", `${t.locator}.unsupported`);
|
|
1031
1031
|
return e.body;
|
|
1032
1032
|
}
|
|
1033
|
-
async function
|
|
1034
|
-
let r = `bytes=${String(t)}-${String(t +
|
|
1033
|
+
async function Ke(e, t, n) {
|
|
1034
|
+
let r = `bytes=${String(t)}-${String(t + He - 1)}`, i = await fetch(e, {
|
|
1035
1035
|
cache: "no-store",
|
|
1036
1036
|
headers: {
|
|
1037
1037
|
...n.headers,
|
|
@@ -1039,11 +1039,11 @@ async function We(e, t, n) {
|
|
|
1039
1039
|
},
|
|
1040
1040
|
signal: n.signal
|
|
1041
1041
|
});
|
|
1042
|
-
if (!i.ok && i.status !==
|
|
1042
|
+
if (!i.ok && i.status !== B) throw await je(i, `Failed to fetch '${n.path}' file.`, n.locator);
|
|
1043
1043
|
return i;
|
|
1044
1044
|
}
|
|
1045
1045
|
// src/encoding/index.ts
|
|
1046
|
-
var
|
|
1046
|
+
var qe = {
|
|
1047
1047
|
arabic: {
|
|
1048
1048
|
id: "arabic",
|
|
1049
1049
|
label: {
|
|
@@ -1198,7 +1198,7 @@ var Ge = {
|
|
|
1198
1198
|
es: "Occidental"
|
|
1199
1199
|
}
|
|
1200
1200
|
}
|
|
1201
|
-
},
|
|
1201
|
+
}, Je = {
|
|
1202
1202
|
"armscii-8": {
|
|
1203
1203
|
id: "armscii-8",
|
|
1204
1204
|
groupId: "armenian",
|
|
@@ -1990,16 +1990,16 @@ var Ge = {
|
|
|
1990
1990
|
textDecoderId: "windows-1257",
|
|
1991
1991
|
iconvLiteDecoderId: "windows1257"
|
|
1992
1992
|
}
|
|
1993
|
-
},
|
|
1994
|
-
function
|
|
1995
|
-
return Object.hasOwn(
|
|
1993
|
+
}, Ye = qe, V = Je;
|
|
1994
|
+
function Xe(e) {
|
|
1995
|
+
return Object.hasOwn(V, e);
|
|
1996
1996
|
}
|
|
1997
|
-
function
|
|
1998
|
-
return
|
|
1997
|
+
function Ze(e) {
|
|
1998
|
+
return Xe(e) ? V[e].textDecoderId ?? e : e;
|
|
1999
1999
|
}
|
|
2000
|
-
function
|
|
2001
|
-
return Array.from(Object.values(
|
|
2002
|
-
let o = t == null ? "" :
|
|
2000
|
+
function Qe(e = "en") {
|
|
2001
|
+
return Array.from(Object.values(V), ({ groupId: t, iconvLiteDecoderId: n, id: r, isDetectable: i, textDecoderId: a }) => {
|
|
2002
|
+
let o = t == null ? "" : $e(t, e);
|
|
2003
2003
|
return {
|
|
2004
2004
|
id: r,
|
|
2005
2005
|
groupLabel: o,
|
|
@@ -2011,11 +2011,11 @@ function Xe(e = "en") {
|
|
|
2011
2011
|
};
|
|
2012
2012
|
}).toSorted((t, n) => t.groupLabel.localeCompare(n.groupLabel, e) || t.id.localeCompare(n.id, e, { numeric: !0 }));
|
|
2013
2013
|
}
|
|
2014
|
-
function
|
|
2015
|
-
let n =
|
|
2014
|
+
function $e(e, t) {
|
|
2015
|
+
let n = Ye[e].label;
|
|
2016
2016
|
return n[t] ?? n.en ?? e;
|
|
2017
2017
|
}
|
|
2018
|
-
var
|
|
2018
|
+
var et = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ ee(/* @__PURE__ */ h(k([
|
|
2019
2019
|
"arrow",
|
|
2020
2020
|
"avro",
|
|
2021
2021
|
"dtv",
|
|
@@ -2028,15 +2028,15 @@ var Qe = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ D(/* @__PURE__ */ h(
|
|
|
2028
2028
|
"sqlite",
|
|
2029
2029
|
"xlsx",
|
|
2030
2030
|
"xml"
|
|
2031
|
-
])), /* @__PURE__ */ f(1)) }),
|
|
2032
|
-
...
|
|
2031
|
+
])), /* @__PURE__ */ f(1)) }), tt = /* @__PURE__ */ h(/* @__PURE__ */ w()), nt = /* @__PURE__ */ C({
|
|
2032
|
+
...j,
|
|
2033
2033
|
typeId: /* @__PURE__ */ _("tool"),
|
|
2034
|
-
actionNames: /* @__PURE__ */ x(
|
|
2035
|
-
parser: /* @__PURE__ */ x(
|
|
2034
|
+
actionNames: /* @__PURE__ */ x(tt),
|
|
2035
|
+
parser: /* @__PURE__ */ x(et)
|
|
2036
2036
|
});
|
|
2037
2037
|
// src/component/module/tool/delimitedText.ts
|
|
2038
|
-
async function
|
|
2039
|
-
let r =
|
|
2038
|
+
async function rt(e, t, n) {
|
|
2039
|
+
let r = it(e), { issues: i, parsedRecords: a, valueDelimiterId: o } = await at(e, t.valueDelimiterIds, t.isComplete, n);
|
|
2040
2040
|
return {
|
|
2041
2041
|
issues: i,
|
|
2042
2042
|
parsedRecords: a,
|
|
@@ -2044,16 +2044,16 @@ async function tt(e, t, n) {
|
|
|
2044
2044
|
valueDelimiterId: o
|
|
2045
2045
|
};
|
|
2046
2046
|
}
|
|
2047
|
-
function
|
|
2047
|
+
function it(e) {
|
|
2048
2048
|
let t = (e.match(/\r\n/g) ?? []).length, n = (e.match(/(?<!\r)\n/g) ?? []).length, r = (e.match(/\r(?!\n)/g) ?? []).length;
|
|
2049
2049
|
return t >= n && t >= r ? "\r\n" : n >= t && n >= r ? "\n" : r >= t && r >= n ? "\r" : "\n";
|
|
2050
2050
|
}
|
|
2051
|
-
async function
|
|
2051
|
+
async function at(e, t, n, r) {
|
|
2052
2052
|
let i, a, o, s = [], c, l = !1;
|
|
2053
2053
|
for (let u of t) {
|
|
2054
2054
|
let { issues: t, records: d } = await r(e, u, n);
|
|
2055
2055
|
if (t.length > 0) {
|
|
2056
|
-
c =
|
|
2056
|
+
c = ot(c, {
|
|
2057
2057
|
delimiter: u,
|
|
2058
2058
|
issues: t,
|
|
2059
2059
|
records: d
|
|
@@ -2061,7 +2061,7 @@ async function rt(e, t, n, r) {
|
|
|
2061
2061
|
continue;
|
|
2062
2062
|
}
|
|
2063
2063
|
if (l = !0, d.length === 0) continue;
|
|
2064
|
-
let { averageValueCount: f, sumOfValueCountDiffs: p } =
|
|
2064
|
+
let { averageValueCount: f, sumOfValueCountDiffs: p } = st(d);
|
|
2065
2065
|
(a === void 0 || a <= 1 || p <= (o ?? 0)) && (a === void 0 || f > a) && (i = u, a = f, o = p, s = d);
|
|
2066
2066
|
}
|
|
2067
2067
|
if (!l && c != null) {
|
|
@@ -2069,19 +2069,19 @@ async function rt(e, t, n, r) {
|
|
|
2069
2069
|
return {
|
|
2070
2070
|
issues: t,
|
|
2071
2071
|
parsedRecords: n,
|
|
2072
|
-
valueDelimiterId:
|
|
2072
|
+
valueDelimiterId: ct(n) ? e : void 0
|
|
2073
2073
|
};
|
|
2074
2074
|
}
|
|
2075
2075
|
return {
|
|
2076
2076
|
issues: [],
|
|
2077
2077
|
parsedRecords: s,
|
|
2078
|
-
valueDelimiterId: i != null &&
|
|
2078
|
+
valueDelimiterId: i != null && ct(s) ? i : void 0
|
|
2079
2079
|
};
|
|
2080
2080
|
}
|
|
2081
|
-
function
|
|
2081
|
+
function ot(e, t) {
|
|
2082
2082
|
return e == null || t.issues.length < e.issues.length ? t : e;
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2084
|
+
function st(e) {
|
|
2085
2085
|
let t = 0, n = 0, r;
|
|
2086
2086
|
for (let i of e) r != null && (n += Math.abs(i.length - r)), r = i.length, t += i.length;
|
|
2087
2087
|
return {
|
|
@@ -2089,39 +2089,39 @@ function at(e) {
|
|
|
2089
2089
|
sumOfValueCountDiffs: n
|
|
2090
2090
|
};
|
|
2091
2091
|
}
|
|
2092
|
-
function
|
|
2092
|
+
function ct(e) {
|
|
2093
2093
|
let t = /* @__PURE__ */ new Map();
|
|
2094
2094
|
for (let n of e) t.set(n.length, (t.get(n.length) ?? 0) + 1);
|
|
2095
2095
|
let [n = 0, r = 0] = [...t].toSorted((e, t) => t[1] - e[1])[0] ?? [];
|
|
2096
2096
|
return n > 1 && r * 2 > e.length;
|
|
2097
2097
|
}
|
|
2098
2098
|
// src/component/module/tool/index.ts
|
|
2099
|
-
var
|
|
2100
|
-
function
|
|
2099
|
+
var lt = "https://engine-eu.dpuse.app/tools", ut = { dtv: "dpuse-tool-rust-csv-core-parser" }, H = "dpuse-tool-";
|
|
2100
|
+
function U(e, t) {
|
|
2101
2101
|
return e.filter((e) => e.parser?.dataFormatIds.some((e) => e === t) === !0).toSorted((e, t) => e.id.localeCompare(t.id, "en"));
|
|
2102
2102
|
}
|
|
2103
|
-
function
|
|
2104
|
-
let r =
|
|
2103
|
+
function dt(e, t, n) {
|
|
2104
|
+
let r = U(e, t), [i] = r;
|
|
2105
2105
|
if (i === void 0) {
|
|
2106
2106
|
let n = {
|
|
2107
2107
|
availableToolIds: e.map((e) => e.id),
|
|
2108
2108
|
dataFormatId: t
|
|
2109
2109
|
};
|
|
2110
|
-
throw new
|
|
2110
|
+
throw new P(`No tool reads the '${t}' data format.`, "dpuse-shared.component.module.tool.resolveParserToolConfig", n);
|
|
2111
2111
|
}
|
|
2112
|
-
let a =
|
|
2112
|
+
let a = ut[t];
|
|
2113
2113
|
return r.find((e) => e.id === n) ?? r.find((e) => e.id === a) ?? i;
|
|
2114
2114
|
}
|
|
2115
|
-
async function
|
|
2116
|
-
let n = `${
|
|
2115
|
+
async function ft(e, t) {
|
|
2116
|
+
let n = `${H}${t}`, r = e.find((e) => e.id === n);
|
|
2117
2117
|
if (!r) {
|
|
2118
2118
|
let r = {
|
|
2119
2119
|
availableToolIds: e.map((e) => e.id),
|
|
2120
2120
|
toolName: n
|
|
2121
2121
|
};
|
|
2122
|
-
throw new
|
|
2122
|
+
throw new P(`Tool '${t}' not found.`, "dpuse-shared.component.module.tool.loadTool", r);
|
|
2123
2123
|
}
|
|
2124
|
-
let i = `${
|
|
2124
|
+
let i = `${lt}/${t}_v${r.version}/${n}.es.js`;
|
|
2125
2125
|
try {
|
|
2126
2126
|
return new (await (import(
|
|
2127
2127
|
/* @vite-ignore */
|
|
@@ -2133,12 +2133,12 @@ async function lt(e, t) {
|
|
|
2133
2133
|
url: i,
|
|
2134
2134
|
version: r.version
|
|
2135
2135
|
};
|
|
2136
|
-
throw new
|
|
2136
|
+
throw new P(`Failed to load tool '${n}' v${r.version}.`, "dpuse-shared.component.module.tool.loadTool", t, { cause: e });
|
|
2137
2137
|
}
|
|
2138
2138
|
}
|
|
2139
2139
|
// src/component/module/connector/objectParsing.ts
|
|
2140
|
-
var
|
|
2141
|
-
async function
|
|
2140
|
+
var pt = "\n", W = ",", G = new Set(fe.filter(({ isStructured: e }) => e).map(({ id: e }) => e)), mt = 13, K = 10, ht = 34, q = 1048576;
|
|
2141
|
+
async function gt(e) {
|
|
2142
2142
|
let { asAt: t, declaredColumnConfigs: n, declaredReadingConfig: r, filePreview: i, inferDataTypes: a, readingChoiceConfig: o, startedAt: s, toolConfigs: c } = e, { isComplete: l, text: u } = i, d = r != null, f = i.bytes.length, p = {
|
|
2143
2143
|
decodedEncodingId: i.decodedEncodingId,
|
|
2144
2144
|
replacementCharacterCount: i.replacementCharacterCount
|
|
@@ -2148,7 +2148,7 @@ async function mt(e) {
|
|
|
2148
2148
|
encodingSourceId: r?.encodingId == null ? i.encodingSourceId : void 0
|
|
2149
2149
|
};
|
|
2150
2150
|
if (f === 0) return {
|
|
2151
|
-
contentAuditConfig:
|
|
2151
|
+
contentAuditConfig: St({
|
|
2152
2152
|
asAt: t,
|
|
2153
2153
|
columns: [],
|
|
2154
2154
|
isComplete: !0,
|
|
@@ -2172,10 +2172,10 @@ async function mt(e) {
|
|
|
2172
2172
|
hasHeaders: !1,
|
|
2173
2173
|
parsedRecords: [],
|
|
2174
2174
|
parserId: void 0,
|
|
2175
|
-
recordDelimiterId:
|
|
2175
|
+
recordDelimiterId: pt,
|
|
2176
2176
|
size: 0,
|
|
2177
2177
|
text: void 0,
|
|
2178
|
-
valueDelimiterId:
|
|
2178
|
+
valueDelimiterId: W
|
|
2179
2179
|
},
|
|
2180
2180
|
readingConfig: {
|
|
2181
2181
|
dataFormatId: "dtv",
|
|
@@ -2185,91 +2185,109 @@ async function mt(e) {
|
|
|
2185
2185
|
hasHeaders: !1,
|
|
2186
2186
|
isDeclared: d,
|
|
2187
2187
|
parserId: void 0,
|
|
2188
|
-
recordDelimiterId:
|
|
2189
|
-
valueDelimiterId:
|
|
2188
|
+
recordDelimiterId: pt,
|
|
2189
|
+
valueDelimiterId: W
|
|
2190
2190
|
},
|
|
2191
2191
|
encodingCandidates: m
|
|
2192
2192
|
};
|
|
2193
|
-
let g = r?.dataFormatId ?? i.dataFormatId, _ = r?.valueDelimiterId, v = await
|
|
2193
|
+
let g = r?.dataFormatId ?? i.dataFormatId, _ = r?.valueDelimiterId, v = { duration: 0 }, y = await Ot({
|
|
2194
2194
|
dataFormatId: g,
|
|
2195
2195
|
filePreview: i,
|
|
2196
2196
|
parserId: void 0,
|
|
2197
|
+
parseTiming: v,
|
|
2197
2198
|
toolConfigs: c
|
|
2198
|
-
}),
|
|
2199
|
+
}), b = await Dt({
|
|
2199
2200
|
dataFormatId: g,
|
|
2200
2201
|
isComplete: l,
|
|
2201
2202
|
parserId: void 0,
|
|
2202
|
-
|
|
2203
|
-
|
|
2203
|
+
parseTiming: v,
|
|
2204
|
+
structureIndex: y,
|
|
2205
|
+
structurePath: y?.suggestedStructurePath,
|
|
2204
2206
|
text: u,
|
|
2205
2207
|
toolConfigs: c,
|
|
2206
2208
|
valueDelimiterId: _
|
|
2207
|
-
}),
|
|
2208
|
-
dataFormatId:
|
|
2209
|
+
}), x = o?.dataFormatId ?? g, S = o?.dataFormatId != null || o?.parserId != null, C = S || o?.valueDelimiterId != null || o?.structurePath != null, w = S ? await Ot({
|
|
2210
|
+
dataFormatId: x,
|
|
2209
2211
|
filePreview: i,
|
|
2210
2212
|
parserId: o.parserId,
|
|
2213
|
+
parseTiming: v,
|
|
2211
2214
|
toolConfigs: c
|
|
2212
|
-
}) :
|
|
2213
|
-
dataFormatId:
|
|
2215
|
+
}) : y, T = C ? await Dt({
|
|
2216
|
+
dataFormatId: x,
|
|
2214
2217
|
isComplete: l,
|
|
2215
2218
|
parserId: o.parserId,
|
|
2216
|
-
|
|
2217
|
-
|
|
2219
|
+
parseTiming: v,
|
|
2220
|
+
structureIndex: w,
|
|
2221
|
+
structurePath: o.structurePath ?? w?.suggestedStructurePath,
|
|
2218
2222
|
text: u,
|
|
2219
2223
|
toolConfigs: c,
|
|
2220
2224
|
valueDelimiterId: _ ?? o.valueDelimiterId
|
|
2221
|
-
}) :
|
|
2225
|
+
}) : b, E = T?.parseTextResult.parsedRecords ?? [], ee = T?.parseTextResult.hasHeaders ?? r?.hasHeaders, D = performance.now(), O = T == null ? void 0 : a(E, ee, n), te = C && b != null ? a(b.parseTextResult.parsedRecords, b.parseTextResult.hasHeaders ?? r?.hasHeaders, n) : O;
|
|
2222
2226
|
return {
|
|
2223
|
-
contentAuditConfig:
|
|
2227
|
+
contentAuditConfig: St({
|
|
2224
2228
|
asAt: t,
|
|
2225
|
-
|
|
2229
|
+
columnAuditDuration: performance.now() - D,
|
|
2230
|
+
columns: O?.columnConfigs ?? [],
|
|
2226
2231
|
isComplete: l,
|
|
2227
|
-
|
|
2232
|
+
parseDuration: v.duration,
|
|
2233
|
+
recordCount: Math.max(0, E.length - +(O?.hasHeaders === !0)),
|
|
2228
2234
|
size: f,
|
|
2229
2235
|
startedAt: s
|
|
2230
2236
|
}),
|
|
2231
2237
|
sampleConfig: {
|
|
2232
2238
|
...p,
|
|
2233
|
-
dataFormatId:
|
|
2234
|
-
hasHeaders:
|
|
2235
|
-
issues:
|
|
2236
|
-
parsedRecords:
|
|
2237
|
-
parserId:
|
|
2238
|
-
recordDelimiterId:
|
|
2239
|
+
dataFormatId: x ?? "unknown",
|
|
2240
|
+
hasHeaders: O?.hasHeaders,
|
|
2241
|
+
issues: T?.parseTextResult.issues ?? [],
|
|
2242
|
+
parsedRecords: E,
|
|
2243
|
+
parserId: T?.parserId,
|
|
2244
|
+
recordDelimiterId: T?.parseTextResult.recordDelimiterId,
|
|
2239
2245
|
size: f,
|
|
2240
|
-
structurePath:
|
|
2246
|
+
structurePath: T?.structurePath,
|
|
2241
2247
|
text: u,
|
|
2242
|
-
valueDelimiterId:
|
|
2248
|
+
valueDelimiterId: T?.valueDelimiterId
|
|
2243
2249
|
},
|
|
2244
2250
|
readingConfig: {
|
|
2245
2251
|
dataFormatId: g ?? "unknown",
|
|
2246
2252
|
dataFormatSourceId: r == null ? i.dataFormatSourceId : void 0,
|
|
2247
2253
|
...h,
|
|
2248
2254
|
fileType: i.fileTypeConfig,
|
|
2249
|
-
hasHeaders:
|
|
2255
|
+
hasHeaders: te?.hasHeaders,
|
|
2250
2256
|
isDeclared: d,
|
|
2251
|
-
parserId:
|
|
2252
|
-
recordDelimiterId:
|
|
2253
|
-
structurePath:
|
|
2254
|
-
valueDelimiterId:
|
|
2257
|
+
parserId: b?.parserId,
|
|
2258
|
+
recordDelimiterId: b?.parseTextResult.recordDelimiterId,
|
|
2259
|
+
structurePath: y?.suggestedStructurePath,
|
|
2260
|
+
valueDelimiterId: b?.valueDelimiterId
|
|
2255
2261
|
},
|
|
2256
2262
|
encodingCandidates: m,
|
|
2257
|
-
structureIndex:
|
|
2263
|
+
structureIndex: w
|
|
2258
2264
|
};
|
|
2259
2265
|
}
|
|
2260
|
-
async function*
|
|
2261
|
-
let { options: t, signal: n, stream: r, toolConfigs: i } = e, { encodingId: a, valueDelimiterId: o } =
|
|
2266
|
+
async function* _t(e) {
|
|
2267
|
+
let { options: t, signal: n, stream: r, toolConfigs: i } = e, { encodingId: a, valueDelimiterId: o } = xt(t), { parser: s } = await Y(i, t.dataFormatId, t.parserId), c = Et(r), l = s.parseStream(c.stream, {
|
|
2262
2268
|
abortSignal: n,
|
|
2263
2269
|
chunkSize: t.chunkSize,
|
|
2264
2270
|
dataFormatId: t.dataFormatId,
|
|
2265
2271
|
encodingId: a,
|
|
2266
2272
|
structurePath: t.structurePath,
|
|
2267
2273
|
valueDelimiterId: o
|
|
2268
|
-
});
|
|
2269
|
-
|
|
2274
|
+
}), u = kt(l), d = !1;
|
|
2275
|
+
try {
|
|
2276
|
+
let e = await u.readNext();
|
|
2277
|
+
for (; e.done !== !0;) yield e.value, e = await u.readNext();
|
|
2278
|
+
d = !0;
|
|
2279
|
+
let t = c.waitDuration();
|
|
2280
|
+
return {
|
|
2281
|
+
recordCount: e.value.recordCount,
|
|
2282
|
+
sourceWaitDuration: t,
|
|
2283
|
+
parseDuration: Math.max(0, u.duration() - t)
|
|
2284
|
+
};
|
|
2285
|
+
} finally {
|
|
2286
|
+
d || await l.return?.();
|
|
2287
|
+
}
|
|
2270
2288
|
}
|
|
2271
|
-
async function
|
|
2272
|
-
let { constructColumnAuditor: t, declaredColumnConfigs: n, onProgress: r, options: i, signal: a, stream: o, toolConfigs: s } = e, { encodingId: c, valueDelimiterId: l } =
|
|
2289
|
+
async function vt(e) {
|
|
2290
|
+
let { constructColumnAuditor: t, declaredColumnConfigs: n, onProgress: r, options: i, signal: a, stream: o, toolConfigs: s } = e, { encodingId: c, valueDelimiterId: l } = xt(i), u = Date.now(), d = performance.now(), f = t(i.hasHeaders, n), { parser: p } = await Y(s, i.dataFormatId, i.parserId), m = Et(o), h = G.has(i.dataFormatId), g = h ? Tt(m.stream) : Ct(m.stream, {
|
|
2273
2291
|
byteLimit: i.byteLimit,
|
|
2274
2292
|
encodingId: c,
|
|
2275
2293
|
stopSignal: i.stopSignal
|
|
@@ -2282,35 +2300,38 @@ async function gt(e) {
|
|
|
2282
2300
|
stopSignal: h ? i.stopSignal : void 0,
|
|
2283
2301
|
structurePath: i.structurePath,
|
|
2284
2302
|
valueDelimiterId: l
|
|
2285
|
-
}), v = await
|
|
2286
|
-
for (;
|
|
2303
|
+
}), v = kt(_), y = 0, b = await v.readNext();
|
|
2304
|
+
for (; b.done !== !0;) {
|
|
2287
2305
|
try {
|
|
2288
|
-
|
|
2306
|
+
let e = performance.now();
|
|
2307
|
+
f.auditRecords(b.value.records), y += performance.now() - e, r(b.value.records.length, g.byteCount());
|
|
2289
2308
|
} catch (e) {
|
|
2290
2309
|
throw await _.throw(e), e;
|
|
2291
2310
|
}
|
|
2292
|
-
|
|
2311
|
+
b = await v.readNext();
|
|
2293
2312
|
}
|
|
2294
|
-
let
|
|
2313
|
+
let x = b.value, S = m.waitDuration(), { columnConfigs: C, hasHeaders: w } = f.completeAudit();
|
|
2295
2314
|
return {
|
|
2296
2315
|
contentAuditConfig: {
|
|
2297
2316
|
asAt: u,
|
|
2298
2317
|
byteCount: g.byteCount(),
|
|
2299
|
-
columns:
|
|
2300
|
-
commentLineCount:
|
|
2318
|
+
columns: C,
|
|
2319
|
+
commentLineCount: x.commentLineCount,
|
|
2301
2320
|
duration: performance.now() - d,
|
|
2302
|
-
emptyLineCount:
|
|
2303
|
-
invalidFieldLengthCount:
|
|
2304
|
-
isComplete:
|
|
2305
|
-
lineCount:
|
|
2306
|
-
recordCount: Math.max(0,
|
|
2307
|
-
sourceWaitDuration:
|
|
2321
|
+
emptyLineCount: x.emptyLineCount,
|
|
2322
|
+
invalidFieldLengthCount: x.nonUniformRecordCount,
|
|
2323
|
+
isComplete: x.isComplete ?? g.isComplete(),
|
|
2324
|
+
lineCount: x.lineCount,
|
|
2325
|
+
recordCount: Math.max(0, x.recordCount - +!!w),
|
|
2326
|
+
sourceWaitDuration: S,
|
|
2327
|
+
parseDuration: Math.max(0, v.duration() - S),
|
|
2328
|
+
columnAuditDuration: y
|
|
2308
2329
|
},
|
|
2309
|
-
hasHeaders:
|
|
2330
|
+
hasHeaders: w
|
|
2310
2331
|
};
|
|
2311
2332
|
}
|
|
2312
|
-
async function
|
|
2313
|
-
let { onProgress: t, options: n, signal: r, stream: i, toolConfigs: a } = e, o = await
|
|
2333
|
+
async function yt(e) {
|
|
2334
|
+
let { onProgress: t, options: n, signal: r, stream: i, toolConfigs: a } = e, o = await X(a, n.dataFormatId, n.parserId), s = n.encodingId ?? "utf-8";
|
|
2314
2335
|
return await o.buildStructureIndex(i, {
|
|
2315
2336
|
abortSignal: r,
|
|
2316
2337
|
dataFormatId: n.dataFormatId,
|
|
@@ -2320,9 +2341,9 @@ async function _t(e) {
|
|
|
2320
2341
|
onProgress: t
|
|
2321
2342
|
});
|
|
2322
2343
|
}
|
|
2323
|
-
async function
|
|
2344
|
+
async function bt(e) {
|
|
2324
2345
|
let { options: t, signal: n, stream: r, toolConfigs: i } = e;
|
|
2325
|
-
return await (await
|
|
2346
|
+
return await (await X(i, t.dataFormatId, t.parserId)).listStructureEntries(r, {
|
|
2326
2347
|
abortSignal: n,
|
|
2327
2348
|
dataFormatId: t.dataFormatId,
|
|
2328
2349
|
entryCount: t.entryCount,
|
|
@@ -2331,32 +2352,34 @@ async function vt(e) {
|
|
|
2331
2352
|
path: t.structurePath
|
|
2332
2353
|
});
|
|
2333
2354
|
}
|
|
2334
|
-
function
|
|
2335
|
-
let t = e.valueDelimiterId ?? (
|
|
2355
|
+
function xt(e) {
|
|
2356
|
+
let t = e.valueDelimiterId ?? (G.has(e.dataFormatId) ? "" : void 0);
|
|
2336
2357
|
if (t == null || e.encodingId == null) throw Error(`'${e.path}' has no encoding or value delimiter, which a parser needs to read it.`);
|
|
2337
2358
|
return {
|
|
2338
2359
|
encodingId: e.encodingId,
|
|
2339
2360
|
valueDelimiterId: t
|
|
2340
2361
|
};
|
|
2341
2362
|
}
|
|
2342
|
-
function
|
|
2343
|
-
let { asAt: t,
|
|
2363
|
+
function St(e) {
|
|
2364
|
+
let { asAt: t, columnAuditDuration: n, columns: r, isComplete: i, parseDuration: a, recordCount: o, size: s, startedAt: c } = e;
|
|
2344
2365
|
return {
|
|
2345
2366
|
asAt: t,
|
|
2346
|
-
byteCount:
|
|
2347
|
-
columns:
|
|
2367
|
+
byteCount: s,
|
|
2368
|
+
columns: r,
|
|
2348
2369
|
commentLineCount: void 0,
|
|
2349
|
-
duration: performance.now() -
|
|
2370
|
+
duration: performance.now() - c,
|
|
2350
2371
|
emptyLineCount: void 0,
|
|
2351
2372
|
invalidFieldLengthCount: void 0,
|
|
2352
|
-
isComplete:
|
|
2373
|
+
isComplete: i,
|
|
2353
2374
|
lineCount: void 0,
|
|
2354
|
-
recordCount:
|
|
2355
|
-
sourceWaitDuration: void 0
|
|
2375
|
+
recordCount: o,
|
|
2376
|
+
sourceWaitDuration: void 0,
|
|
2377
|
+
parseDuration: a,
|
|
2378
|
+
columnAuditDuration: n
|
|
2356
2379
|
};
|
|
2357
2380
|
}
|
|
2358
|
-
function
|
|
2359
|
-
let n = e.getReader(), r =
|
|
2381
|
+
function Ct(e, t) {
|
|
2382
|
+
let n = e.getReader(), r = wt(t.encodingId), i = 0, a = !1, o;
|
|
2360
2383
|
return {
|
|
2361
2384
|
byteCount: () => i,
|
|
2362
2385
|
isComplete: () => a,
|
|
@@ -2371,8 +2394,8 @@ function xt(e, t) {
|
|
|
2371
2394
|
}
|
|
2372
2395
|
s = t.value;
|
|
2373
2396
|
}
|
|
2374
|
-
let c = s.subarray(0,
|
|
2375
|
-
o = s.length >
|
|
2397
|
+
let c = s.subarray(0, q);
|
|
2398
|
+
o = s.length > q ? s.subarray(q) : void 0;
|
|
2376
2399
|
let l = t.stopSignal?.aborted === !0 ? i : t.byteLimit ?? Infinity, u = r(c, i, l - i);
|
|
2377
2400
|
u == null ? (i += c.length, e.enqueue(c)) : (i += u, o = void 0, e.enqueue(c.subarray(0, u)), e.close(), await n.cancel());
|
|
2378
2401
|
},
|
|
@@ -2382,19 +2405,19 @@ function xt(e, t) {
|
|
|
2382
2405
|
}, { highWaterMark: 0 })
|
|
2383
2406
|
};
|
|
2384
2407
|
}
|
|
2385
|
-
function
|
|
2386
|
-
let t =
|
|
2408
|
+
function wt(e) {
|
|
2409
|
+
let t = Ze(e), n = t.startsWith("utf-16"), r = n ? 2 : 1, i = +(t === "utf-16be"), a = !1;
|
|
2387
2410
|
return (e, t, o) => {
|
|
2388
2411
|
for (let s = 0; s < e.length; s++) {
|
|
2389
2412
|
let c = e[s];
|
|
2390
|
-
if ((c ===
|
|
2391
|
-
if (c ===
|
|
2392
|
-
else if (!a && s >= o && (c ===
|
|
2413
|
+
if ((c === ht || c === K || c === mt) && (!n || (t + s) % 2 === i && e[s + 1 - 2 * i] === 0)) {
|
|
2414
|
+
if (c === ht) a = !a;
|
|
2415
|
+
else if (!a && s >= o && (c === K || e[s + r] !== K)) return s + r - i;
|
|
2393
2416
|
}
|
|
2394
2417
|
}
|
|
2395
2418
|
};
|
|
2396
2419
|
}
|
|
2397
|
-
function
|
|
2420
|
+
function Tt(e) {
|
|
2398
2421
|
let t = e.getReader(), n = 0, r = !1;
|
|
2399
2422
|
return {
|
|
2400
2423
|
byteCount: () => n,
|
|
@@ -2410,7 +2433,7 @@ function Ct(e) {
|
|
|
2410
2433
|
}, { highWaterMark: 0 })
|
|
2411
2434
|
};
|
|
2412
2435
|
}
|
|
2413
|
-
function
|
|
2436
|
+
function Et(e) {
|
|
2414
2437
|
let t = e.getReader(), n = 0;
|
|
2415
2438
|
return {
|
|
2416
2439
|
stream: new ReadableStream({
|
|
@@ -2425,16 +2448,16 @@ function wt(e) {
|
|
|
2425
2448
|
waitDuration: () => n
|
|
2426
2449
|
};
|
|
2427
2450
|
}
|
|
2428
|
-
async function
|
|
2429
|
-
let { dataFormatId: t, isComplete: n, parserId: r,
|
|
2430
|
-
if (t == null ||
|
|
2431
|
-
let { parser:
|
|
2432
|
-
if (
|
|
2433
|
-
let e =
|
|
2434
|
-
return e ||
|
|
2435
|
-
parserId:
|
|
2451
|
+
async function Dt(e) {
|
|
2452
|
+
let { dataFormatId: t, isComplete: n, parserId: r, parseTiming: i, structureIndex: a, structurePath: o, text: s, toolConfigs: c, valueDelimiterId: l } = e;
|
|
2453
|
+
if (t == null || s == null || U(c, t).length === 0) return;
|
|
2454
|
+
let { parser: u, parserId: d } = await Y(c, t, r);
|
|
2455
|
+
if (a != null) {
|
|
2456
|
+
let e = a.nodes.length === 0 && a.issues.length > 0;
|
|
2457
|
+
return e || o == null ? {
|
|
2458
|
+
parserId: d,
|
|
2436
2459
|
parseTextResult: {
|
|
2437
|
-
issues: e ?
|
|
2460
|
+
issues: e ? a.issues : [],
|
|
2438
2461
|
parsedRecords: [],
|
|
2439
2462
|
recordDelimiterId: "\n",
|
|
2440
2463
|
valueDelimiterId: void 0
|
|
@@ -2442,63 +2465,81 @@ async function Tt(e) {
|
|
|
2442
2465
|
structurePath: void 0,
|
|
2443
2466
|
valueDelimiterId: void 0
|
|
2444
2467
|
} : {
|
|
2445
|
-
parserId:
|
|
2446
|
-
parseTextResult: await
|
|
2468
|
+
parserId: d,
|
|
2469
|
+
parseTextResult: await J(i, () => u.parseText(s, {
|
|
2447
2470
|
dataFormatId: t,
|
|
2448
2471
|
isComplete: n,
|
|
2449
|
-
structurePath:
|
|
2472
|
+
structurePath: o,
|
|
2450
2473
|
valueDelimiterIds: []
|
|
2451
|
-
}),
|
|
2452
|
-
structurePath:
|
|
2474
|
+
})),
|
|
2475
|
+
structurePath: o,
|
|
2453
2476
|
valueDelimiterId: void 0
|
|
2454
2477
|
};
|
|
2455
2478
|
}
|
|
2456
|
-
let
|
|
2479
|
+
let f = l == null ? A.map(({ id: e }) => e) : [l], p = await J(i, () => u.parseText(s, {
|
|
2457
2480
|
dataFormatId: t,
|
|
2458
2481
|
isComplete: n,
|
|
2459
|
-
valueDelimiterIds:
|
|
2460
|
-
}),
|
|
2482
|
+
valueDelimiterIds: f
|
|
2483
|
+
})), m = t === "dtv", h = m && l == null && p.valueDelimiterId == null ? await J(i, () => u.parseText(s, {
|
|
2461
2484
|
dataFormatId: t,
|
|
2462
2485
|
isComplete: n,
|
|
2463
|
-
valueDelimiterIds: [
|
|
2464
|
-
}) :
|
|
2486
|
+
valueDelimiterIds: [W]
|
|
2487
|
+
})) : p;
|
|
2465
2488
|
return {
|
|
2466
|
-
parserId:
|
|
2467
|
-
parseTextResult:
|
|
2489
|
+
parserId: d,
|
|
2490
|
+
parseTextResult: h,
|
|
2468
2491
|
structurePath: void 0,
|
|
2469
|
-
valueDelimiterId:
|
|
2492
|
+
valueDelimiterId: m ? l ?? h.valueDelimiterId ?? W : h.valueDelimiterId
|
|
2470
2493
|
};
|
|
2471
2494
|
}
|
|
2472
|
-
async function
|
|
2473
|
-
let { dataFormatId: t, filePreview: n, parserId: r,
|
|
2474
|
-
if (!(t != null &&
|
|
2475
|
-
let
|
|
2476
|
-
return await
|
|
2495
|
+
async function Ot(e) {
|
|
2496
|
+
let { dataFormatId: t, filePreview: n, parserId: r, parseTiming: i, toolConfigs: a } = e;
|
|
2497
|
+
if (!(t != null && G.has(t) && U(a, t).length > 0 && dt(a, t, r).actionNames?.includes("buildStructureIndex") === !0)) return;
|
|
2498
|
+
let o = await X(a, t, r), s = new Blob([n.bytes]).stream(), c = n.decodedEncodingId ?? "utf-8";
|
|
2499
|
+
return await J(i, () => o.buildStructureIndex(s, {
|
|
2477
2500
|
abortSignal: new AbortController().signal,
|
|
2478
2501
|
dataFormatId: t,
|
|
2479
|
-
encodingId:
|
|
2502
|
+
encodingId: c,
|
|
2480
2503
|
isComplete: n.isComplete,
|
|
2481
2504
|
maxDepth: void 0,
|
|
2482
2505
|
onProgress: void 0
|
|
2483
|
-
});
|
|
2506
|
+
}));
|
|
2484
2507
|
}
|
|
2485
|
-
|
|
2486
|
-
let
|
|
2508
|
+
function kt(e) {
|
|
2509
|
+
let t = 0;
|
|
2487
2510
|
return {
|
|
2488
|
-
|
|
2511
|
+
duration: () => t,
|
|
2512
|
+
async readNext() {
|
|
2513
|
+
let n = performance.now(), r = await e.next();
|
|
2514
|
+
return t += performance.now() - n, r;
|
|
2515
|
+
}
|
|
2516
|
+
};
|
|
2517
|
+
}
|
|
2518
|
+
async function J(e, t) {
|
|
2519
|
+
let n = performance.now();
|
|
2520
|
+
try {
|
|
2521
|
+
return await t();
|
|
2522
|
+
} finally {
|
|
2523
|
+
e.duration += performance.now() - n;
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
async function Y(e, t, n) {
|
|
2527
|
+
let r = dt(e, t, n);
|
|
2528
|
+
return {
|
|
2529
|
+
parser: await ft(e, r.id.slice(H.length)),
|
|
2489
2530
|
parserId: r.id
|
|
2490
2531
|
};
|
|
2491
2532
|
}
|
|
2492
|
-
async function
|
|
2493
|
-
let { parser: r, parserId: i } = await
|
|
2494
|
-
if (!("buildStructureIndex" in r)) throw new
|
|
2533
|
+
async function X(e, t, n) {
|
|
2534
|
+
let { parser: r, parserId: i } = await Y(e, t, n);
|
|
2535
|
+
if (!("buildStructureIndex" in r)) throw new P(`Tool '${i}' does not map the structure of '${t}' items.`, "dpuse-shared.component.module.connector.objectParsing.loadStructuredParser");
|
|
2495
2536
|
return r;
|
|
2496
2537
|
}
|
|
2497
2538
|
// src/component/module/connector/storeErrors.ts
|
|
2498
|
-
function
|
|
2499
|
-
return new
|
|
2539
|
+
function At(e, t, n, r) {
|
|
2540
|
+
return new F(t, n, { storeErrorId: e }, r);
|
|
2500
2541
|
}
|
|
2501
|
-
function
|
|
2542
|
+
function jt(e) {
|
|
2502
2543
|
let t = /* @__PURE__ */ new Set();
|
|
2503
2544
|
for (let n = e; n instanceof Error && !t.has(n); n = n.cause) {
|
|
2504
2545
|
t.add(n);
|
|
@@ -2507,31 +2548,31 @@ function kt(e) {
|
|
|
2507
2548
|
}
|
|
2508
2549
|
}
|
|
2509
2550
|
// src/component/module/connector/storePath.ts
|
|
2510
|
-
var
|
|
2511
|
-
function
|
|
2551
|
+
var Mt = /^[\w-]+$/u;
|
|
2552
|
+
function Nt(e) {
|
|
2512
2553
|
if (!e.startsWith("/")) return {
|
|
2513
2554
|
databaseName: void 0,
|
|
2514
2555
|
tableName: e
|
|
2515
2556
|
};
|
|
2516
2557
|
let [, t, n, ...r] = e.split("/");
|
|
2517
|
-
if (t == null || n == null || n === "" || r.length > 0 || !
|
|
2558
|
+
if (t == null || n == null || n === "" || r.length > 0 || !Mt.test(t)) throw Error(`Encountered invalid store path '${e}'.`);
|
|
2518
2559
|
return {
|
|
2519
2560
|
databaseName: t,
|
|
2520
2561
|
tableName: n
|
|
2521
2562
|
};
|
|
2522
2563
|
}
|
|
2523
2564
|
// src/component/module/connector/storeValues.ts
|
|
2524
|
-
function
|
|
2565
|
+
function Pt(e) {
|
|
2525
2566
|
return e.map((e) => ({
|
|
2526
|
-
value:
|
|
2567
|
+
value: Ft(e),
|
|
2527
2568
|
valueWasQuoted: !1
|
|
2528
2569
|
}));
|
|
2529
2570
|
}
|
|
2530
|
-
function
|
|
2571
|
+
function Ft(e) {
|
|
2531
2572
|
return e == null ? null : e instanceof Date ? e.toISOString() : String(e);
|
|
2532
2573
|
}
|
|
2533
2574
|
// src/component/module/connector/webLock.ts
|
|
2534
|
-
async function
|
|
2575
|
+
async function It(e, t = {}) {
|
|
2535
2576
|
let n = Promise.withResolvers(), r = { isGranted: !1 }, i = navigator.locks.request(e, t.takeOver === !0 ? { steal: !0 } : { ifAvailable: !0 }, (e) => {
|
|
2536
2577
|
if (e == null) n.resolve(void 0);
|
|
2537
2578
|
else return r.isGranted = !0, new Promise((e) => {
|
|
@@ -2548,16 +2589,16 @@ async function Pt(e, t = {}) {
|
|
|
2548
2589
|
o(), await a;
|
|
2549
2590
|
};
|
|
2550
2591
|
}
|
|
2551
|
-
var
|
|
2592
|
+
var Lt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
2552
2593
|
format: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2553
2594
|
name: /* @__PURE__ */ w(),
|
|
2554
2595
|
title: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2555
2596
|
type: /* @__PURE__ */ x(/* @__PURE__ */ w())
|
|
2556
|
-
})) }),
|
|
2597
|
+
})) }), Rt = /* @__PURE__ */ v({
|
|
2557
2598
|
delimiter: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2558
2599
|
header: /* @__PURE__ */ x(/* @__PURE__ */ g()),
|
|
2559
2600
|
headerRows: /* @__PURE__ */ x(/* @__PURE__ */ h(/* @__PURE__ */ b()))
|
|
2560
|
-
}),
|
|
2601
|
+
}), zt = {
|
|
2561
2602
|
boolean: {
|
|
2562
2603
|
dataSubtypeId: void 0,
|
|
2563
2604
|
dataTypeId: "boolean"
|
|
@@ -2590,18 +2631,18 @@ var Ft = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
|
2590
2631
|
dataSubtypeId: "integer",
|
|
2591
2632
|
dataTypeId: "numeric"
|
|
2592
2633
|
}
|
|
2593
|
-
},
|
|
2634
|
+
}, Bt = {
|
|
2594
2635
|
email: "email",
|
|
2595
2636
|
uri: "url",
|
|
2596
2637
|
uuid: "uuid"
|
|
2597
2638
|
};
|
|
2598
|
-
function
|
|
2599
|
-
let t = /* @__PURE__ */
|
|
2600
|
-
if (!t.success) throw new
|
|
2601
|
-
let n = /* @__PURE__ */
|
|
2602
|
-
if (!n.success) throw new
|
|
2639
|
+
function Vt(e) {
|
|
2640
|
+
let t = /* @__PURE__ */ D(Lt, e.schema);
|
|
2641
|
+
if (!t.success) throw new P("The table schema is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2642
|
+
let n = /* @__PURE__ */ D(Rt, e.dialect ?? {});
|
|
2643
|
+
if (!n.success) throw new P("The table dialect is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2603
2644
|
let r = t.output.fields.map((e) => {
|
|
2604
|
-
let t =
|
|
2645
|
+
let t = Ht(e.type, e.format);
|
|
2605
2646
|
return {
|
|
2606
2647
|
name: e.name,
|
|
2607
2648
|
label: e.title,
|
|
@@ -2615,22 +2656,22 @@ function zt(e) {
|
|
|
2615
2656
|
dataFormatId: "dtv",
|
|
2616
2657
|
encodingId: e.encoding?.toLowerCase(),
|
|
2617
2658
|
hasHeaders: a && o.length > 0,
|
|
2618
|
-
valueDelimiterId:
|
|
2659
|
+
valueDelimiterId: A.find(({ character: e }) => e === i)?.id
|
|
2619
2660
|
}
|
|
2620
2661
|
};
|
|
2621
2662
|
}
|
|
2622
|
-
function
|
|
2623
|
-
let n = e == null ? void 0 :
|
|
2663
|
+
function Ht(e, t) {
|
|
2664
|
+
let n = e == null ? void 0 : zt[e];
|
|
2624
2665
|
return n == null ? {
|
|
2625
2666
|
dataSubtypeId: void 0,
|
|
2626
2667
|
dataTypeId: void 0
|
|
2627
2668
|
} : t == null || n.dataTypeId !== "string" ? n : {
|
|
2628
|
-
dataSubtypeId:
|
|
2669
|
+
dataSubtypeId: Bt[t] ?? "plain",
|
|
2629
2670
|
dataTypeId: "string"
|
|
2630
2671
|
};
|
|
2631
2672
|
}
|
|
2632
2673
|
// src/component/module/connector/index.ts
|
|
2633
|
-
var
|
|
2674
|
+
var Ut = [
|
|
2634
2675
|
{
|
|
2635
2676
|
id: "application",
|
|
2636
2677
|
label: {
|
|
@@ -2659,7 +2700,7 @@ var Vt = [
|
|
|
2659
2700
|
es: "Almacén de Archivos"
|
|
2660
2701
|
}
|
|
2661
2702
|
}
|
|
2662
|
-
],
|
|
2703
|
+
], Wt = [
|
|
2663
2704
|
{
|
|
2664
2705
|
id: "apiEndpoint",
|
|
2665
2706
|
label: {
|
|
@@ -2681,7 +2722,7 @@ var Vt = [
|
|
|
2681
2722
|
es: "Tabla"
|
|
2682
2723
|
}
|
|
2683
2724
|
}
|
|
2684
|
-
],
|
|
2725
|
+
], Gt = {
|
|
2685
2726
|
auditObjectContent: "Audit Object Content",
|
|
2686
2727
|
closeStore: "Close Store",
|
|
2687
2728
|
createObject: "Create Object",
|
|
@@ -2702,7 +2743,7 @@ var Vt = [
|
|
|
2702
2743
|
removeRecords: "Remove Records",
|
|
2703
2744
|
retrieveRecords: "Retrieve Records",
|
|
2704
2745
|
upsertRecords: "Upsert Records"
|
|
2705
|
-
},
|
|
2746
|
+
}, Kt = [
|
|
2706
2747
|
{
|
|
2707
2748
|
id: "bidirectional",
|
|
2708
2749
|
label: {
|
|
@@ -2731,13 +2772,13 @@ var Vt = [
|
|
|
2731
2772
|
es: "Desconocido"
|
|
2732
2773
|
}
|
|
2733
2774
|
}
|
|
2734
|
-
],
|
|
2775
|
+
], qt = /* @__PURE__ */ new Set([
|
|
2735
2776
|
"createObject",
|
|
2736
2777
|
"dropObject",
|
|
2737
2778
|
"loadObjectRecords",
|
|
2738
2779
|
"removeRecords",
|
|
2739
2780
|
"upsertRecords"
|
|
2740
|
-
]),
|
|
2781
|
+
]), Jt = /* @__PURE__ */ new Set([
|
|
2741
2782
|
"auditObjectContent",
|
|
2742
2783
|
"findObject",
|
|
2743
2784
|
"getInfo",
|
|
@@ -2751,13 +2792,13 @@ var Vt = [
|
|
|
2751
2792
|
"queryRecords",
|
|
2752
2793
|
"retrieveRecords"
|
|
2753
2794
|
]);
|
|
2754
|
-
function
|
|
2795
|
+
function Yt(e) {
|
|
2755
2796
|
let t = !1, n = !1;
|
|
2756
|
-
for (let r of e)
|
|
2797
|
+
for (let r of e) Jt.has(r) && (t = !0), qt.has(r) && (n = !0);
|
|
2757
2798
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
2758
2799
|
}
|
|
2759
|
-
var
|
|
2760
|
-
let i =
|
|
2800
|
+
var Xt = (e, t = "en") => {
|
|
2801
|
+
let i = Ut.find((t) => t.id === e);
|
|
2761
2802
|
return i ? {
|
|
2762
2803
|
label: r(n(i.label), t) ?? i.id,
|
|
2763
2804
|
description: ""
|
|
@@ -2765,8 +2806,8 @@ var Jt = (e, t = "en") => {
|
|
|
2765
2806
|
label: e,
|
|
2766
2807
|
description: ""
|
|
2767
2808
|
};
|
|
2768
|
-
},
|
|
2769
|
-
let i =
|
|
2809
|
+
}, Zt = (e, t = "en") => {
|
|
2810
|
+
let i = Wt.find((t) => t.id === e);
|
|
2770
2811
|
return i ? {
|
|
2771
2812
|
label: r(n(i.label), t) ?? i.id,
|
|
2772
2813
|
description: ""
|
|
@@ -2774,8 +2815,8 @@ var Jt = (e, t = "en") => {
|
|
|
2774
2815
|
label: e,
|
|
2775
2816
|
description: ""
|
|
2776
2817
|
};
|
|
2777
|
-
},
|
|
2778
|
-
let i =
|
|
2818
|
+
}, Qt = (e, t = "en") => {
|
|
2819
|
+
let i = Kt.find((t) => t.id === e);
|
|
2779
2820
|
return i ? {
|
|
2780
2821
|
label: r(n(i.label), t) ?? i.id,
|
|
2781
2822
|
description: ""
|
|
@@ -2784,36 +2825,36 @@ var Jt = (e, t = "en") => {
|
|
|
2784
2825
|
description: ""
|
|
2785
2826
|
};
|
|
2786
2827
|
};
|
|
2787
|
-
function
|
|
2828
|
+
function $t(e) {
|
|
2788
2829
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
2789
2830
|
n += "|:----|:-------:|\n";
|
|
2790
|
-
for (let e of Object.keys(
|
|
2831
|
+
for (let e of Object.keys(Gt)) n += `| ${Gt[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
2791
2832
|
return n;
|
|
2792
2833
|
}
|
|
2793
2834
|
// src/component/module/cookbook/cookbookConfig.schema.ts
|
|
2794
|
-
var
|
|
2795
|
-
...
|
|
2835
|
+
var en = k(["list"]), tn = /* @__PURE__ */ C({
|
|
2836
|
+
...j,
|
|
2796
2837
|
typeId: /* @__PURE__ */ _("cookbook"),
|
|
2797
|
-
actionNames: /* @__PURE__ */ h(
|
|
2798
|
-
recipes: /* @__PURE__ */ h(
|
|
2838
|
+
actionNames: /* @__PURE__ */ h(en),
|
|
2839
|
+
recipes: /* @__PURE__ */ h(se)
|
|
2799
2840
|
});
|
|
2800
2841
|
// src/component/module/engine/index.ts
|
|
2801
|
-
function
|
|
2842
|
+
function nn(e) {
|
|
2802
2843
|
return e.signal ?? new AbortController().signal;
|
|
2803
2844
|
}
|
|
2804
2845
|
// src/component/module/presenter/presenterConfig.schema.ts
|
|
2805
|
-
var
|
|
2846
|
+
var rn = k([
|
|
2806
2847
|
"list",
|
|
2807
2848
|
"render",
|
|
2808
2849
|
"setColorMode"
|
|
2809
|
-
]),
|
|
2810
|
-
...
|
|
2850
|
+
]), an = /* @__PURE__ */ C({
|
|
2851
|
+
...j,
|
|
2811
2852
|
typeId: /* @__PURE__ */ _("presenter"),
|
|
2812
|
-
actionNames: /* @__PURE__ */ h(
|
|
2813
|
-
presentations: /* @__PURE__ */ h(
|
|
2814
|
-
}),
|
|
2815
|
-
async function
|
|
2816
|
-
let i = e.id, a = `${
|
|
2853
|
+
actionNames: /* @__PURE__ */ h(rn),
|
|
2854
|
+
presentations: /* @__PURE__ */ h(se)
|
|
2855
|
+
}), on = "https://engine-eu.dpuse.app/presenters";
|
|
2856
|
+
async function sn(e, t, n, r) {
|
|
2857
|
+
let i = e.id, a = `${on}/${i.split("-").slice(2).join("-")}_v${e.version}/${i}.es.js`;
|
|
2817
2858
|
try {
|
|
2818
2859
|
return new (await (import(
|
|
2819
2860
|
/* @vite-ignore */
|
|
@@ -2825,11 +2866,11 @@ async function an(e, t, n, r) {
|
|
|
2825
2866
|
url: a,
|
|
2826
2867
|
version: e.version
|
|
2827
2868
|
};
|
|
2828
|
-
throw new
|
|
2869
|
+
throw new P(`Failed to load presenter '${i}' v${e.version}.`, "dpuse-shared.component.module.presenter.loadPresenter", n, { cause: t });
|
|
2829
2870
|
}
|
|
2830
2871
|
}
|
|
2831
2872
|
// src/locale/index.ts
|
|
2832
|
-
function
|
|
2873
|
+
function cn(e, t) {
|
|
2833
2874
|
return {
|
|
2834
2875
|
...e,
|
|
2835
2876
|
label: e.label[t] ?? e.id,
|
|
@@ -2837,7 +2878,7 @@ function on(e, t) {
|
|
|
2837
2878
|
verb: e.verb?.[t] ?? void 0
|
|
2838
2879
|
};
|
|
2839
2880
|
}
|
|
2840
|
-
function
|
|
2881
|
+
function ln(e, t, n = !1) {
|
|
2841
2882
|
let r = e.map((e) => ({
|
|
2842
2883
|
...e,
|
|
2843
2884
|
label: e.label[t] ?? e.id,
|
|
@@ -2846,7 +2887,7 @@ function sn(e, t, n = !1) {
|
|
|
2846
2887
|
}));
|
|
2847
2888
|
return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
|
|
2848
2889
|
}
|
|
2849
|
-
function
|
|
2890
|
+
function un(e, t) {
|
|
2850
2891
|
return {
|
|
2851
2892
|
...e,
|
|
2852
2893
|
label: e.label[t] ?? e.id,
|
|
@@ -2854,7 +2895,7 @@ function cn(e, t) {
|
|
|
2854
2895
|
};
|
|
2855
2896
|
}
|
|
2856
2897
|
// src/utilities/index.ts
|
|
2857
|
-
var
|
|
2898
|
+
var dn = /* @__PURE__ */ new Map([
|
|
2858
2899
|
["arrow", "application/vnd.apache.arrow.file"],
|
|
2859
2900
|
["avro", "application/vnd.apache.avro"],
|
|
2860
2901
|
["bin", "application/octet-stream"],
|
|
@@ -2881,14 +2922,14 @@ var ln = /* @__PURE__ */ new Map([
|
|
|
2881
2922
|
["minute", 6e4],
|
|
2882
2923
|
["second", 1e3],
|
|
2883
2924
|
["millisecond", 1]
|
|
2884
|
-
],
|
|
2925
|
+
], fn = [
|
|
2885
2926
|
["byte", 1],
|
|
2886
2927
|
["KiB", 1024],
|
|
2887
2928
|
["MiB", 1048576],
|
|
2888
2929
|
["GiB", 1073741824],
|
|
2889
2930
|
["TiB", 1099511627776]
|
|
2890
|
-
],
|
|
2891
|
-
function
|
|
2931
|
+
], pn = /* @__PURE__ */ new Map(), mn = /* @__PURE__ */ new Map();
|
|
2932
|
+
function hn(e, t = 2, n = t, r = Z) {
|
|
2892
2933
|
return e == null ? "" : $(r, {
|
|
2893
2934
|
localeMatcher: "best fit",
|
|
2894
2935
|
maximumFractionDigits: t,
|
|
@@ -2898,18 +2939,18 @@ function pn(e, t = 2, n = t, r = Z) {
|
|
|
2898
2939
|
useGrouping: !0
|
|
2899
2940
|
}).format(e);
|
|
2900
2941
|
}
|
|
2901
|
-
function
|
|
2902
|
-
return
|
|
2942
|
+
function gn(e, t = Z) {
|
|
2943
|
+
return hn(e, 0, 0, t);
|
|
2903
2944
|
}
|
|
2904
|
-
function
|
|
2945
|
+
function _n(e, t = 1, n = Z) {
|
|
2905
2946
|
return e == null || !Number.isFinite(e) ? "" : $(n, {
|
|
2906
2947
|
maximumFractionDigits: t,
|
|
2907
2948
|
notation: "compact"
|
|
2908
2949
|
}).format(e);
|
|
2909
2950
|
}
|
|
2910
|
-
function
|
|
2951
|
+
function vn(e, t = 1, n = Z) {
|
|
2911
2952
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2912
|
-
let [r, i] =
|
|
2953
|
+
let [r, i] = fn.find(([, n]) => Dn(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["TiB", 1099511627776];
|
|
2913
2954
|
return i === 1 ? $(n, {
|
|
2914
2955
|
maximumFractionDigits: 0,
|
|
2915
2956
|
style: "unit",
|
|
@@ -2917,7 +2958,7 @@ function gn(e, t = 1, n = Z) {
|
|
|
2917
2958
|
unitDisplay: "long"
|
|
2918
2959
|
}).format(e) : `${$(n, { maximumFractionDigits: t }).format(e / i)} ${r}`;
|
|
2919
2960
|
}
|
|
2920
|
-
function
|
|
2961
|
+
function yn(e, t = "millisecond", n = Z) {
|
|
2921
2962
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2922
2963
|
let r = Math.round(Math.abs(e)), i = Q.findIndex(([, e]) => r >= e), a = i === -1 ? Q.length - 1 : i, o = Q.findIndex(([e]) => e === t), s = Q.slice(a, Math.max(o, a) + 1), c = [];
|
|
2923
2964
|
for (let [t, i] of s) {
|
|
@@ -2931,25 +2972,25 @@ function _n(e, t = "millisecond", n = Z) {
|
|
|
2931
2972
|
unitDisplay: "short"
|
|
2932
2973
|
}).format(o));
|
|
2933
2974
|
}
|
|
2934
|
-
return
|
|
2975
|
+
return En(n).format(c);
|
|
2935
2976
|
}
|
|
2936
|
-
function
|
|
2977
|
+
function bn(e) {
|
|
2937
2978
|
if (!e) return;
|
|
2938
|
-
let t =
|
|
2979
|
+
let t = Tn(e);
|
|
2939
2980
|
return t === void 0 ? e : e.slice(0, t);
|
|
2940
2981
|
}
|
|
2941
|
-
function
|
|
2982
|
+
function xn(e) {
|
|
2942
2983
|
if (!e) return;
|
|
2943
|
-
let t =
|
|
2984
|
+
let t = Tn(e);
|
|
2944
2985
|
return t === void 0 ? void 0 : e.slice(t + 1);
|
|
2945
2986
|
}
|
|
2946
|
-
function
|
|
2947
|
-
return e != null &&
|
|
2987
|
+
function Sn(e) {
|
|
2988
|
+
return e != null && dn.has(e.toLowerCase());
|
|
2948
2989
|
}
|
|
2949
|
-
function
|
|
2950
|
-
return (e == null ? void 0 :
|
|
2990
|
+
function Cn(e) {
|
|
2991
|
+
return (e == null ? void 0 : dn.get(e.toLowerCase())) ?? "application/octet-stream";
|
|
2951
2992
|
}
|
|
2952
|
-
function
|
|
2993
|
+
function wn(e) {
|
|
2953
2994
|
switch (e) {
|
|
2954
2995
|
case "Edm.Boolean": return "boolean";
|
|
2955
2996
|
case "Edm.Byte":
|
|
@@ -2970,23 +3011,23 @@ function Sn(e) {
|
|
|
2970
3011
|
default: return "unknown";
|
|
2971
3012
|
}
|
|
2972
3013
|
}
|
|
2973
|
-
function
|
|
3014
|
+
function Tn(e) {
|
|
2974
3015
|
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
2975
3016
|
return n > t && n < e.length - 1 ? n : void 0;
|
|
2976
3017
|
}
|
|
2977
|
-
function
|
|
2978
|
-
let t =
|
|
3018
|
+
function En(e) {
|
|
3019
|
+
let t = pn.get(e);
|
|
2979
3020
|
return t || (t = new Intl.ListFormat(e, {
|
|
2980
3021
|
style: "narrow",
|
|
2981
3022
|
type: "unit"
|
|
2982
|
-
}),
|
|
3023
|
+
}), pn.set(e, t)), t;
|
|
2983
3024
|
}
|
|
2984
3025
|
function $(e, t) {
|
|
2985
|
-
let n = `${e}|${JSON.stringify(t)}`, r =
|
|
2986
|
-
return r || (r = new Intl.NumberFormat(e, t),
|
|
3026
|
+
let n = `${e}|${JSON.stringify(t)}`, r = mn.get(n);
|
|
3027
|
+
return r || (r = new Intl.NumberFormat(e, t), mn.set(n, r)), r;
|
|
2987
3028
|
}
|
|
2988
|
-
function
|
|
3029
|
+
function Dn(e, t) {
|
|
2989
3030
|
let n = 10 ** t;
|
|
2990
3031
|
return Math.round(e * n) / n;
|
|
2991
3032
|
}
|
|
2992
|
-
export {
|
|
3033
|
+
export { ke as APIError, P as AppError, F as ConnectorError, fe as DATA_FORMAT_CONFIGS, pe as DATA_TYPE_CONFIGS, me as DECIMAL_SEPARATOR_IDS, e as DEFAULT_LOCALE_ID, Ye as ENCODING_GROUP_CONFIG_MAP, V as ENCODING_TYPE_CONFIG_MAP, Ae as EngineError, I as FetchError, t as SUPPORTED_LANGUAGES, H as TOOL_NAME_PREFIX, A as VALUE_DELIMITER_CONFIGS, It as acquireWebLock, vt as auditObjectContentWithParser, je as buildFetchError, gt as buildPreviewObjectResult, le as componentInstanceConfigSchema, Me as concatenateSerialisedErrorMessages, Ce as connectorConfigSchema, Xt as constructConnectorCategoryConfig, Zt as constructConnectorItemTypeConfig, Qt as constructConnectorUsageConfig, At as constructStoreError, wn as convertODataTypeIdToUsageTypeId, Pt as convertStoreRecordToParsedRecord, Ft as convertStoreValueToText, tn as cookbookConfigSchema, n as createLabelMap, Yt as determineConnectorUsageId, xn as extractExtensionFromPath, bn as extractPathWithoutExtension, Ue as fetchObjectContentStream, jt as findStoreErrorId, hn as formatNumberAsDecimalNumber, yn as formatNumberAsDuration, _n as formatNumberAsSize, vn as formatNumberAsStorageSize, gn as formatNumberAsWholeNumber, de as getComponentStatus, $t as getConnectorActionsTable, Qe as getEncodingTypeConfigs, he as getValueDelimiterCharacter, Sn as hasMimeTypeForExtension, Ne as ignoreErrors, yt as indexObjectStructureWithParser, Xe as isEncodingTypeId, bt as listObjectStructureEntriesWithParser, U as listParserToolConfigs, sn as loadPresenter, ft as loadTool, cn as localiseConfig, ln as localiseConfigs, un as localiseReference, Cn as lookupMimeTypeForExtension, L as normalizeToError, rt as parseDelimitedText, an as presenterConfigSchema, Vt as readTableSchema, Ze as resolveDecoderId, r as resolveLabel, dt as resolveParserToolConfig, nn as resolveRequestSignal, Nt as resolveStorePath, _t as retrieveRecordsWithParser, Pe as serialiseError, nt as toolConfigSchema, Fe as unserialiseError };
|