@dpuse/dpuse-shared 1.0.226 → 1.0.228
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,41 +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 =
|
|
2286
|
-
|
|
2287
|
-
return v += performance.now() - e, t;
|
|
2288
|
-
}, x = await b();
|
|
2289
|
-
for (; x.done !== !0;) {
|
|
2303
|
+
}), v = kt(_), y = 0, b = await v.readNext();
|
|
2304
|
+
for (; b.done !== !0;) {
|
|
2290
2305
|
try {
|
|
2291
2306
|
let e = performance.now();
|
|
2292
|
-
f.auditRecords(
|
|
2307
|
+
f.auditRecords(b.value.records), y += performance.now() - e, r(b.value.records.length, g.byteCount());
|
|
2293
2308
|
} catch (e) {
|
|
2294
2309
|
throw await _.throw(e), e;
|
|
2295
2310
|
}
|
|
2296
|
-
|
|
2311
|
+
b = await v.readNext();
|
|
2297
2312
|
}
|
|
2298
|
-
let
|
|
2299
|
-
return {
|
|
2313
|
+
let x = b.value, S = m.waitDuration(), C = performance.now(), { columnConfigs: w, hasHeaders: T } = f.completeAudit();
|
|
2314
|
+
return y += performance.now() - C, {
|
|
2300
2315
|
contentAuditConfig: {
|
|
2301
2316
|
asAt: u,
|
|
2302
2317
|
byteCount: g.byteCount(),
|
|
2303
2318
|
columns: w,
|
|
2304
|
-
commentLineCount:
|
|
2319
|
+
commentLineCount: x.commentLineCount,
|
|
2305
2320
|
duration: performance.now() - d,
|
|
2306
|
-
emptyLineCount:
|
|
2307
|
-
invalidFieldLengthCount:
|
|
2308
|
-
isComplete:
|
|
2309
|
-
lineCount:
|
|
2310
|
-
recordCount: Math.max(0,
|
|
2311
|
-
sourceWaitDuration:
|
|
2312
|
-
parseDuration: Math.max(0, v -
|
|
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 - +!!T),
|
|
2326
|
+
sourceWaitDuration: S,
|
|
2327
|
+
parseDuration: Math.max(0, v.duration() - S),
|
|
2313
2328
|
columnAuditDuration: y
|
|
2314
2329
|
},
|
|
2315
2330
|
hasHeaders: T
|
|
2316
2331
|
};
|
|
2317
2332
|
}
|
|
2318
|
-
async function
|
|
2319
|
-
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";
|
|
2320
2335
|
return await o.buildStructureIndex(i, {
|
|
2321
2336
|
abortSignal: r,
|
|
2322
2337
|
dataFormatId: n.dataFormatId,
|
|
@@ -2326,9 +2341,9 @@ async function _t(e) {
|
|
|
2326
2341
|
onProgress: t
|
|
2327
2342
|
});
|
|
2328
2343
|
}
|
|
2329
|
-
async function
|
|
2344
|
+
async function bt(e) {
|
|
2330
2345
|
let { options: t, signal: n, stream: r, toolConfigs: i } = e;
|
|
2331
|
-
return await (await
|
|
2346
|
+
return await (await X(i, t.dataFormatId, t.parserId)).listStructureEntries(r, {
|
|
2332
2347
|
abortSignal: n,
|
|
2333
2348
|
dataFormatId: t.dataFormatId,
|
|
2334
2349
|
entryCount: t.entryCount,
|
|
@@ -2337,32 +2352,34 @@ async function vt(e) {
|
|
|
2337
2352
|
path: t.structurePath
|
|
2338
2353
|
});
|
|
2339
2354
|
}
|
|
2340
|
-
function
|
|
2341
|
-
let t = e.valueDelimiterId ?? (
|
|
2355
|
+
function xt(e) {
|
|
2356
|
+
let t = e.valueDelimiterId ?? (G.has(e.dataFormatId) ? "" : void 0);
|
|
2342
2357
|
if (t == null || e.encodingId == null) throw Error(`'${e.path}' has no encoding or value delimiter, which a parser needs to read it.`);
|
|
2343
2358
|
return {
|
|
2344
2359
|
encodingId: e.encodingId,
|
|
2345
2360
|
valueDelimiterId: t
|
|
2346
2361
|
};
|
|
2347
2362
|
}
|
|
2348
|
-
function
|
|
2349
|
-
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;
|
|
2350
2365
|
return {
|
|
2351
2366
|
asAt: t,
|
|
2352
|
-
byteCount:
|
|
2353
|
-
columns:
|
|
2367
|
+
byteCount: s,
|
|
2368
|
+
columns: r,
|
|
2354
2369
|
commentLineCount: void 0,
|
|
2355
|
-
duration: performance.now() -
|
|
2370
|
+
duration: performance.now() - c,
|
|
2356
2371
|
emptyLineCount: void 0,
|
|
2357
2372
|
invalidFieldLengthCount: void 0,
|
|
2358
|
-
isComplete:
|
|
2373
|
+
isComplete: i,
|
|
2359
2374
|
lineCount: void 0,
|
|
2360
|
-
recordCount:
|
|
2361
|
-
sourceWaitDuration: void 0
|
|
2375
|
+
recordCount: o,
|
|
2376
|
+
sourceWaitDuration: void 0,
|
|
2377
|
+
parseDuration: a,
|
|
2378
|
+
columnAuditDuration: n
|
|
2362
2379
|
};
|
|
2363
2380
|
}
|
|
2364
|
-
function
|
|
2365
|
-
let n = e.getReader(), r =
|
|
2381
|
+
function Ct(e, t) {
|
|
2382
|
+
let n = e.getReader(), r = wt(t.encodingId), i = 0, a = !1, o;
|
|
2366
2383
|
return {
|
|
2367
2384
|
byteCount: () => i,
|
|
2368
2385
|
isComplete: () => a,
|
|
@@ -2377,8 +2394,8 @@ function xt(e, t) {
|
|
|
2377
2394
|
}
|
|
2378
2395
|
s = t.value;
|
|
2379
2396
|
}
|
|
2380
|
-
let c = s.subarray(0,
|
|
2381
|
-
o = s.length >
|
|
2397
|
+
let c = s.subarray(0, q);
|
|
2398
|
+
o = s.length > q ? s.subarray(q) : void 0;
|
|
2382
2399
|
let l = t.stopSignal?.aborted === !0 ? i : t.byteLimit ?? Infinity, u = r(c, i, l - i);
|
|
2383
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());
|
|
2384
2401
|
},
|
|
@@ -2388,19 +2405,19 @@ function xt(e, t) {
|
|
|
2388
2405
|
}, { highWaterMark: 0 })
|
|
2389
2406
|
};
|
|
2390
2407
|
}
|
|
2391
|
-
function
|
|
2392
|
-
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;
|
|
2393
2410
|
return (e, t, o) => {
|
|
2394
2411
|
for (let s = 0; s < e.length; s++) {
|
|
2395
2412
|
let c = e[s];
|
|
2396
|
-
if ((c ===
|
|
2397
|
-
if (c ===
|
|
2398
|
-
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;
|
|
2399
2416
|
}
|
|
2400
2417
|
}
|
|
2401
2418
|
};
|
|
2402
2419
|
}
|
|
2403
|
-
function
|
|
2420
|
+
function Tt(e) {
|
|
2404
2421
|
let t = e.getReader(), n = 0, r = !1;
|
|
2405
2422
|
return {
|
|
2406
2423
|
byteCount: () => n,
|
|
@@ -2416,7 +2433,7 @@ function Ct(e) {
|
|
|
2416
2433
|
}, { highWaterMark: 0 })
|
|
2417
2434
|
};
|
|
2418
2435
|
}
|
|
2419
|
-
function
|
|
2436
|
+
function Et(e) {
|
|
2420
2437
|
let t = e.getReader(), n = 0;
|
|
2421
2438
|
return {
|
|
2422
2439
|
stream: new ReadableStream({
|
|
@@ -2431,16 +2448,16 @@ function wt(e) {
|
|
|
2431
2448
|
waitDuration: () => n
|
|
2432
2449
|
};
|
|
2433
2450
|
}
|
|
2434
|
-
async function
|
|
2435
|
-
let { dataFormatId: t, isComplete: n, parserId: r,
|
|
2436
|
-
if (t == null ||
|
|
2437
|
-
let { parser:
|
|
2438
|
-
if (
|
|
2439
|
-
let e =
|
|
2440
|
-
return e ||
|
|
2441
|
-
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,
|
|
2442
2459
|
parseTextResult: {
|
|
2443
|
-
issues: e ?
|
|
2460
|
+
issues: e ? a.issues : [],
|
|
2444
2461
|
parsedRecords: [],
|
|
2445
2462
|
recordDelimiterId: "\n",
|
|
2446
2463
|
valueDelimiterId: void 0
|
|
@@ -2448,63 +2465,81 @@ async function Tt(e) {
|
|
|
2448
2465
|
structurePath: void 0,
|
|
2449
2466
|
valueDelimiterId: void 0
|
|
2450
2467
|
} : {
|
|
2451
|
-
parserId:
|
|
2452
|
-
parseTextResult: await
|
|
2468
|
+
parserId: d,
|
|
2469
|
+
parseTextResult: await J(i, () => u.parseText(s, {
|
|
2453
2470
|
dataFormatId: t,
|
|
2454
2471
|
isComplete: n,
|
|
2455
|
-
structurePath:
|
|
2472
|
+
structurePath: o,
|
|
2456
2473
|
valueDelimiterIds: []
|
|
2457
|
-
}),
|
|
2458
|
-
structurePath:
|
|
2474
|
+
})),
|
|
2475
|
+
structurePath: o,
|
|
2459
2476
|
valueDelimiterId: void 0
|
|
2460
2477
|
};
|
|
2461
2478
|
}
|
|
2462
|
-
let
|
|
2479
|
+
let f = l == null ? A.map(({ id: e }) => e) : [l], p = await J(i, () => u.parseText(s, {
|
|
2463
2480
|
dataFormatId: t,
|
|
2464
2481
|
isComplete: n,
|
|
2465
|
-
valueDelimiterIds:
|
|
2466
|
-
}),
|
|
2482
|
+
valueDelimiterIds: f
|
|
2483
|
+
})), m = t === "dtv", h = m && l == null && p.valueDelimiterId == null ? await J(i, () => u.parseText(s, {
|
|
2467
2484
|
dataFormatId: t,
|
|
2468
2485
|
isComplete: n,
|
|
2469
|
-
valueDelimiterIds: [
|
|
2470
|
-
}) :
|
|
2486
|
+
valueDelimiterIds: [W]
|
|
2487
|
+
})) : p;
|
|
2471
2488
|
return {
|
|
2472
|
-
parserId:
|
|
2473
|
-
parseTextResult:
|
|
2489
|
+
parserId: d,
|
|
2490
|
+
parseTextResult: h,
|
|
2474
2491
|
structurePath: void 0,
|
|
2475
|
-
valueDelimiterId:
|
|
2492
|
+
valueDelimiterId: m ? l ?? h.valueDelimiterId ?? W : h.valueDelimiterId
|
|
2476
2493
|
};
|
|
2477
2494
|
}
|
|
2478
|
-
async function
|
|
2479
|
-
let { dataFormatId: t, filePreview: n, parserId: r,
|
|
2480
|
-
if (!(t != null &&
|
|
2481
|
-
let
|
|
2482
|
-
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, {
|
|
2483
2500
|
abortSignal: new AbortController().signal,
|
|
2484
2501
|
dataFormatId: t,
|
|
2485
|
-
encodingId:
|
|
2502
|
+
encodingId: c,
|
|
2486
2503
|
isComplete: n.isComplete,
|
|
2487
2504
|
maxDepth: void 0,
|
|
2488
2505
|
onProgress: void 0
|
|
2489
|
-
});
|
|
2506
|
+
}));
|
|
2490
2507
|
}
|
|
2491
|
-
|
|
2492
|
-
let
|
|
2508
|
+
function kt(e) {
|
|
2509
|
+
let t = 0;
|
|
2510
|
+
return {
|
|
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);
|
|
2493
2528
|
return {
|
|
2494
|
-
parser: await
|
|
2529
|
+
parser: await ft(e, r.id.slice(H.length)),
|
|
2495
2530
|
parserId: r.id
|
|
2496
2531
|
};
|
|
2497
2532
|
}
|
|
2498
|
-
async function
|
|
2499
|
-
let { parser: r, parserId: i } = await
|
|
2500
|
-
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");
|
|
2501
2536
|
return r;
|
|
2502
2537
|
}
|
|
2503
2538
|
// src/component/module/connector/storeErrors.ts
|
|
2504
|
-
function
|
|
2505
|
-
return new
|
|
2539
|
+
function At(e, t, n, r) {
|
|
2540
|
+
return new F(t, n, { storeErrorId: e }, r);
|
|
2506
2541
|
}
|
|
2507
|
-
function
|
|
2542
|
+
function jt(e) {
|
|
2508
2543
|
let t = /* @__PURE__ */ new Set();
|
|
2509
2544
|
for (let n = e; n instanceof Error && !t.has(n); n = n.cause) {
|
|
2510
2545
|
t.add(n);
|
|
@@ -2513,31 +2548,28 @@ function kt(e) {
|
|
|
2513
2548
|
}
|
|
2514
2549
|
}
|
|
2515
2550
|
// src/component/module/connector/storePath.ts
|
|
2516
|
-
var
|
|
2517
|
-
function
|
|
2551
|
+
var Mt = /^[\w-]+$/u;
|
|
2552
|
+
function Nt(e) {
|
|
2518
2553
|
if (!e.startsWith("/")) return {
|
|
2519
2554
|
databaseName: void 0,
|
|
2520
2555
|
tableName: e
|
|
2521
2556
|
};
|
|
2522
2557
|
let [, t, n, ...r] = e.split("/");
|
|
2523
|
-
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}'.`);
|
|
2524
2559
|
return {
|
|
2525
2560
|
databaseName: t,
|
|
2526
2561
|
tableName: n
|
|
2527
2562
|
};
|
|
2528
2563
|
}
|
|
2529
2564
|
// src/component/module/connector/storeValues.ts
|
|
2530
|
-
function
|
|
2531
|
-
return e.map((e) => (
|
|
2532
|
-
value: Nt(e),
|
|
2533
|
-
valueWasQuoted: !1
|
|
2534
|
-
}));
|
|
2565
|
+
function Pt(e) {
|
|
2566
|
+
return e.map((e) => Ft(e));
|
|
2535
2567
|
}
|
|
2536
|
-
function
|
|
2568
|
+
function Ft(e) {
|
|
2537
2569
|
return e == null ? null : e instanceof Date ? e.toISOString() : String(e);
|
|
2538
2570
|
}
|
|
2539
2571
|
// src/component/module/connector/webLock.ts
|
|
2540
|
-
async function
|
|
2572
|
+
async function It(e, t = {}) {
|
|
2541
2573
|
let n = Promise.withResolvers(), r = { isGranted: !1 }, i = navigator.locks.request(e, t.takeOver === !0 ? { steal: !0 } : { ifAvailable: !0 }, (e) => {
|
|
2542
2574
|
if (e == null) n.resolve(void 0);
|
|
2543
2575
|
else return r.isGranted = !0, new Promise((e) => {
|
|
@@ -2554,16 +2586,16 @@ async function Pt(e, t = {}) {
|
|
|
2554
2586
|
o(), await a;
|
|
2555
2587
|
};
|
|
2556
2588
|
}
|
|
2557
|
-
var
|
|
2589
|
+
var Lt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
2558
2590
|
format: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2559
2591
|
name: /* @__PURE__ */ w(),
|
|
2560
2592
|
title: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2561
2593
|
type: /* @__PURE__ */ x(/* @__PURE__ */ w())
|
|
2562
|
-
})) }),
|
|
2594
|
+
})) }), Rt = /* @__PURE__ */ v({
|
|
2563
2595
|
delimiter: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2564
2596
|
header: /* @__PURE__ */ x(/* @__PURE__ */ g()),
|
|
2565
2597
|
headerRows: /* @__PURE__ */ x(/* @__PURE__ */ h(/* @__PURE__ */ b()))
|
|
2566
|
-
}),
|
|
2598
|
+
}), zt = {
|
|
2567
2599
|
boolean: {
|
|
2568
2600
|
dataSubtypeId: void 0,
|
|
2569
2601
|
dataTypeId: "boolean"
|
|
@@ -2596,18 +2628,18 @@ var Ft = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
|
2596
2628
|
dataSubtypeId: "integer",
|
|
2597
2629
|
dataTypeId: "numeric"
|
|
2598
2630
|
}
|
|
2599
|
-
},
|
|
2631
|
+
}, Bt = {
|
|
2600
2632
|
email: "email",
|
|
2601
2633
|
uri: "url",
|
|
2602
2634
|
uuid: "uuid"
|
|
2603
2635
|
};
|
|
2604
|
-
function
|
|
2605
|
-
let t = /* @__PURE__ */
|
|
2606
|
-
if (!t.success) throw new
|
|
2607
|
-
let n = /* @__PURE__ */
|
|
2608
|
-
if (!n.success) throw new
|
|
2636
|
+
function Vt(e) {
|
|
2637
|
+
let t = /* @__PURE__ */ D(Lt, e.schema);
|
|
2638
|
+
if (!t.success) throw new P("The table schema is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2639
|
+
let n = /* @__PURE__ */ D(Rt, e.dialect ?? {});
|
|
2640
|
+
if (!n.success) throw new P("The table dialect is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2609
2641
|
let r = t.output.fields.map((e) => {
|
|
2610
|
-
let t =
|
|
2642
|
+
let t = Ht(e.type, e.format);
|
|
2611
2643
|
return {
|
|
2612
2644
|
name: e.name,
|
|
2613
2645
|
label: e.title,
|
|
@@ -2621,22 +2653,22 @@ function zt(e) {
|
|
|
2621
2653
|
dataFormatId: "dtv",
|
|
2622
2654
|
encodingId: e.encoding?.toLowerCase(),
|
|
2623
2655
|
hasHeaders: a && o.length > 0,
|
|
2624
|
-
valueDelimiterId:
|
|
2656
|
+
valueDelimiterId: A.find(({ character: e }) => e === i)?.id
|
|
2625
2657
|
}
|
|
2626
2658
|
};
|
|
2627
2659
|
}
|
|
2628
|
-
function
|
|
2629
|
-
let n = e == null ? void 0 :
|
|
2660
|
+
function Ht(e, t) {
|
|
2661
|
+
let n = e == null ? void 0 : zt[e];
|
|
2630
2662
|
return n == null ? {
|
|
2631
2663
|
dataSubtypeId: void 0,
|
|
2632
2664
|
dataTypeId: void 0
|
|
2633
2665
|
} : t == null || n.dataTypeId !== "string" ? n : {
|
|
2634
|
-
dataSubtypeId:
|
|
2666
|
+
dataSubtypeId: Bt[t] ?? "plain",
|
|
2635
2667
|
dataTypeId: "string"
|
|
2636
2668
|
};
|
|
2637
2669
|
}
|
|
2638
2670
|
// src/component/module/connector/index.ts
|
|
2639
|
-
var
|
|
2671
|
+
var Ut = [
|
|
2640
2672
|
{
|
|
2641
2673
|
id: "application",
|
|
2642
2674
|
label: {
|
|
@@ -2665,7 +2697,7 @@ var Vt = [
|
|
|
2665
2697
|
es: "Almacén de Archivos"
|
|
2666
2698
|
}
|
|
2667
2699
|
}
|
|
2668
|
-
],
|
|
2700
|
+
], Wt = [
|
|
2669
2701
|
{
|
|
2670
2702
|
id: "apiEndpoint",
|
|
2671
2703
|
label: {
|
|
@@ -2687,7 +2719,7 @@ var Vt = [
|
|
|
2687
2719
|
es: "Tabla"
|
|
2688
2720
|
}
|
|
2689
2721
|
}
|
|
2690
|
-
],
|
|
2722
|
+
], Gt = {
|
|
2691
2723
|
auditObjectContent: "Audit Object Content",
|
|
2692
2724
|
closeStore: "Close Store",
|
|
2693
2725
|
createObject: "Create Object",
|
|
@@ -2708,7 +2740,7 @@ var Vt = [
|
|
|
2708
2740
|
removeRecords: "Remove Records",
|
|
2709
2741
|
retrieveRecords: "Retrieve Records",
|
|
2710
2742
|
upsertRecords: "Upsert Records"
|
|
2711
|
-
},
|
|
2743
|
+
}, Kt = [
|
|
2712
2744
|
{
|
|
2713
2745
|
id: "bidirectional",
|
|
2714
2746
|
label: {
|
|
@@ -2737,13 +2769,13 @@ var Vt = [
|
|
|
2737
2769
|
es: "Desconocido"
|
|
2738
2770
|
}
|
|
2739
2771
|
}
|
|
2740
|
-
],
|
|
2772
|
+
], qt = /* @__PURE__ */ new Set([
|
|
2741
2773
|
"createObject",
|
|
2742
2774
|
"dropObject",
|
|
2743
2775
|
"loadObjectRecords",
|
|
2744
2776
|
"removeRecords",
|
|
2745
2777
|
"upsertRecords"
|
|
2746
|
-
]),
|
|
2778
|
+
]), Jt = /* @__PURE__ */ new Set([
|
|
2747
2779
|
"auditObjectContent",
|
|
2748
2780
|
"findObject",
|
|
2749
2781
|
"getInfo",
|
|
@@ -2757,13 +2789,13 @@ var Vt = [
|
|
|
2757
2789
|
"queryRecords",
|
|
2758
2790
|
"retrieveRecords"
|
|
2759
2791
|
]);
|
|
2760
|
-
function
|
|
2792
|
+
function Yt(e) {
|
|
2761
2793
|
let t = !1, n = !1;
|
|
2762
|
-
for (let r of e)
|
|
2794
|
+
for (let r of e) Jt.has(r) && (t = !0), qt.has(r) && (n = !0);
|
|
2763
2795
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
2764
2796
|
}
|
|
2765
|
-
var
|
|
2766
|
-
let i =
|
|
2797
|
+
var Xt = (e, t = "en") => {
|
|
2798
|
+
let i = Ut.find((t) => t.id === e);
|
|
2767
2799
|
return i ? {
|
|
2768
2800
|
label: r(n(i.label), t) ?? i.id,
|
|
2769
2801
|
description: ""
|
|
@@ -2771,8 +2803,8 @@ var Jt = (e, t = "en") => {
|
|
|
2771
2803
|
label: e,
|
|
2772
2804
|
description: ""
|
|
2773
2805
|
};
|
|
2774
|
-
},
|
|
2775
|
-
let i =
|
|
2806
|
+
}, Zt = (e, t = "en") => {
|
|
2807
|
+
let i = Wt.find((t) => t.id === e);
|
|
2776
2808
|
return i ? {
|
|
2777
2809
|
label: r(n(i.label), t) ?? i.id,
|
|
2778
2810
|
description: ""
|
|
@@ -2780,8 +2812,8 @@ var Jt = (e, t = "en") => {
|
|
|
2780
2812
|
label: e,
|
|
2781
2813
|
description: ""
|
|
2782
2814
|
};
|
|
2783
|
-
},
|
|
2784
|
-
let i =
|
|
2815
|
+
}, Qt = (e, t = "en") => {
|
|
2816
|
+
let i = Kt.find((t) => t.id === e);
|
|
2785
2817
|
return i ? {
|
|
2786
2818
|
label: r(n(i.label), t) ?? i.id,
|
|
2787
2819
|
description: ""
|
|
@@ -2790,36 +2822,36 @@ var Jt = (e, t = "en") => {
|
|
|
2790
2822
|
description: ""
|
|
2791
2823
|
};
|
|
2792
2824
|
};
|
|
2793
|
-
function
|
|
2825
|
+
function $t(e) {
|
|
2794
2826
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
2795
2827
|
n += "|:----|:-------:|\n";
|
|
2796
|
-
for (let e of Object.keys(
|
|
2828
|
+
for (let e of Object.keys(Gt)) n += `| ${Gt[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
2797
2829
|
return n;
|
|
2798
2830
|
}
|
|
2799
2831
|
// src/component/module/cookbook/cookbookConfig.schema.ts
|
|
2800
|
-
var
|
|
2801
|
-
...
|
|
2832
|
+
var en = k(["list"]), tn = /* @__PURE__ */ C({
|
|
2833
|
+
...j,
|
|
2802
2834
|
typeId: /* @__PURE__ */ _("cookbook"),
|
|
2803
|
-
actionNames: /* @__PURE__ */ h(
|
|
2804
|
-
recipes: /* @__PURE__ */ h(
|
|
2835
|
+
actionNames: /* @__PURE__ */ h(en),
|
|
2836
|
+
recipes: /* @__PURE__ */ h(se)
|
|
2805
2837
|
});
|
|
2806
2838
|
// src/component/module/engine/index.ts
|
|
2807
|
-
function
|
|
2839
|
+
function nn(e) {
|
|
2808
2840
|
return e.signal ?? new AbortController().signal;
|
|
2809
2841
|
}
|
|
2810
2842
|
// src/component/module/presenter/presenterConfig.schema.ts
|
|
2811
|
-
var
|
|
2843
|
+
var rn = k([
|
|
2812
2844
|
"list",
|
|
2813
2845
|
"render",
|
|
2814
2846
|
"setColorMode"
|
|
2815
|
-
]),
|
|
2816
|
-
...
|
|
2847
|
+
]), an = /* @__PURE__ */ C({
|
|
2848
|
+
...j,
|
|
2817
2849
|
typeId: /* @__PURE__ */ _("presenter"),
|
|
2818
|
-
actionNames: /* @__PURE__ */ h(
|
|
2819
|
-
presentations: /* @__PURE__ */ h(
|
|
2820
|
-
}),
|
|
2821
|
-
async function
|
|
2822
|
-
let i = e.id, a = `${
|
|
2850
|
+
actionNames: /* @__PURE__ */ h(rn),
|
|
2851
|
+
presentations: /* @__PURE__ */ h(se)
|
|
2852
|
+
}), on = "https://engine-eu.dpuse.app/presenters";
|
|
2853
|
+
async function sn(e, t, n, r) {
|
|
2854
|
+
let i = e.id, a = `${on}/${i.split("-").slice(2).join("-")}_v${e.version}/${i}.es.js`;
|
|
2823
2855
|
try {
|
|
2824
2856
|
return new (await (import(
|
|
2825
2857
|
/* @vite-ignore */
|
|
@@ -2831,11 +2863,11 @@ async function an(e, t, n, r) {
|
|
|
2831
2863
|
url: a,
|
|
2832
2864
|
version: e.version
|
|
2833
2865
|
};
|
|
2834
|
-
throw new
|
|
2866
|
+
throw new P(`Failed to load presenter '${i}' v${e.version}.`, "dpuse-shared.component.module.presenter.loadPresenter", n, { cause: t });
|
|
2835
2867
|
}
|
|
2836
2868
|
}
|
|
2837
2869
|
// src/locale/index.ts
|
|
2838
|
-
function
|
|
2870
|
+
function cn(e, t) {
|
|
2839
2871
|
return {
|
|
2840
2872
|
...e,
|
|
2841
2873
|
label: e.label[t] ?? e.id,
|
|
@@ -2843,7 +2875,7 @@ function on(e, t) {
|
|
|
2843
2875
|
verb: e.verb?.[t] ?? void 0
|
|
2844
2876
|
};
|
|
2845
2877
|
}
|
|
2846
|
-
function
|
|
2878
|
+
function ln(e, t, n = !1) {
|
|
2847
2879
|
let r = e.map((e) => ({
|
|
2848
2880
|
...e,
|
|
2849
2881
|
label: e.label[t] ?? e.id,
|
|
@@ -2852,7 +2884,7 @@ function sn(e, t, n = !1) {
|
|
|
2852
2884
|
}));
|
|
2853
2885
|
return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
|
|
2854
2886
|
}
|
|
2855
|
-
function
|
|
2887
|
+
function un(e, t) {
|
|
2856
2888
|
return {
|
|
2857
2889
|
...e,
|
|
2858
2890
|
label: e.label[t] ?? e.id,
|
|
@@ -2860,7 +2892,7 @@ function cn(e, t) {
|
|
|
2860
2892
|
};
|
|
2861
2893
|
}
|
|
2862
2894
|
// src/utilities/index.ts
|
|
2863
|
-
var
|
|
2895
|
+
var dn = /* @__PURE__ */ new Map([
|
|
2864
2896
|
["arrow", "application/vnd.apache.arrow.file"],
|
|
2865
2897
|
["avro", "application/vnd.apache.avro"],
|
|
2866
2898
|
["bin", "application/octet-stream"],
|
|
@@ -2887,14 +2919,14 @@ var ln = /* @__PURE__ */ new Map([
|
|
|
2887
2919
|
["minute", 6e4],
|
|
2888
2920
|
["second", 1e3],
|
|
2889
2921
|
["millisecond", 1]
|
|
2890
|
-
],
|
|
2922
|
+
], fn = [
|
|
2891
2923
|
["byte", 1],
|
|
2892
2924
|
["KiB", 1024],
|
|
2893
2925
|
["MiB", 1048576],
|
|
2894
2926
|
["GiB", 1073741824],
|
|
2895
2927
|
["TiB", 1099511627776]
|
|
2896
|
-
],
|
|
2897
|
-
function
|
|
2928
|
+
], pn = /* @__PURE__ */ new Map(), mn = /* @__PURE__ */ new Map();
|
|
2929
|
+
function hn(e, t = 2, n = t, r = Z) {
|
|
2898
2930
|
return e == null ? "" : $(r, {
|
|
2899
2931
|
localeMatcher: "best fit",
|
|
2900
2932
|
maximumFractionDigits: t,
|
|
@@ -2904,18 +2936,18 @@ function pn(e, t = 2, n = t, r = Z) {
|
|
|
2904
2936
|
useGrouping: !0
|
|
2905
2937
|
}).format(e);
|
|
2906
2938
|
}
|
|
2907
|
-
function
|
|
2908
|
-
return
|
|
2939
|
+
function gn(e, t = Z) {
|
|
2940
|
+
return hn(e, 0, 0, t);
|
|
2909
2941
|
}
|
|
2910
|
-
function
|
|
2942
|
+
function _n(e, t = 1, n = Z) {
|
|
2911
2943
|
return e == null || !Number.isFinite(e) ? "" : $(n, {
|
|
2912
2944
|
maximumFractionDigits: t,
|
|
2913
2945
|
notation: "compact"
|
|
2914
2946
|
}).format(e);
|
|
2915
2947
|
}
|
|
2916
|
-
function
|
|
2948
|
+
function vn(e, t = 1, n = Z) {
|
|
2917
2949
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2918
|
-
let [r, i] =
|
|
2950
|
+
let [r, i] = fn.find(([, n]) => Dn(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["TiB", 1099511627776];
|
|
2919
2951
|
return i === 1 ? $(n, {
|
|
2920
2952
|
maximumFractionDigits: 0,
|
|
2921
2953
|
style: "unit",
|
|
@@ -2923,7 +2955,7 @@ function gn(e, t = 1, n = Z) {
|
|
|
2923
2955
|
unitDisplay: "long"
|
|
2924
2956
|
}).format(e) : `${$(n, { maximumFractionDigits: t }).format(e / i)} ${r}`;
|
|
2925
2957
|
}
|
|
2926
|
-
function
|
|
2958
|
+
function yn(e, t = "millisecond", n = Z) {
|
|
2927
2959
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2928
2960
|
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 = [];
|
|
2929
2961
|
for (let [t, i] of s) {
|
|
@@ -2937,25 +2969,25 @@ function _n(e, t = "millisecond", n = Z) {
|
|
|
2937
2969
|
unitDisplay: "short"
|
|
2938
2970
|
}).format(o));
|
|
2939
2971
|
}
|
|
2940
|
-
return
|
|
2972
|
+
return En(n).format(c);
|
|
2941
2973
|
}
|
|
2942
|
-
function
|
|
2974
|
+
function bn(e) {
|
|
2943
2975
|
if (!e) return;
|
|
2944
|
-
let t =
|
|
2976
|
+
let t = Tn(e);
|
|
2945
2977
|
return t === void 0 ? e : e.slice(0, t);
|
|
2946
2978
|
}
|
|
2947
|
-
function
|
|
2979
|
+
function xn(e) {
|
|
2948
2980
|
if (!e) return;
|
|
2949
|
-
let t =
|
|
2981
|
+
let t = Tn(e);
|
|
2950
2982
|
return t === void 0 ? void 0 : e.slice(t + 1);
|
|
2951
2983
|
}
|
|
2952
|
-
function
|
|
2953
|
-
return e != null &&
|
|
2984
|
+
function Sn(e) {
|
|
2985
|
+
return e != null && dn.has(e.toLowerCase());
|
|
2954
2986
|
}
|
|
2955
|
-
function
|
|
2956
|
-
return (e == null ? void 0 :
|
|
2987
|
+
function Cn(e) {
|
|
2988
|
+
return (e == null ? void 0 : dn.get(e.toLowerCase())) ?? "application/octet-stream";
|
|
2957
2989
|
}
|
|
2958
|
-
function
|
|
2990
|
+
function wn(e) {
|
|
2959
2991
|
switch (e) {
|
|
2960
2992
|
case "Edm.Boolean": return "boolean";
|
|
2961
2993
|
case "Edm.Byte":
|
|
@@ -2976,23 +3008,23 @@ function Sn(e) {
|
|
|
2976
3008
|
default: return "unknown";
|
|
2977
3009
|
}
|
|
2978
3010
|
}
|
|
2979
|
-
function
|
|
3011
|
+
function Tn(e) {
|
|
2980
3012
|
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
2981
3013
|
return n > t && n < e.length - 1 ? n : void 0;
|
|
2982
3014
|
}
|
|
2983
|
-
function
|
|
2984
|
-
let t =
|
|
3015
|
+
function En(e) {
|
|
3016
|
+
let t = pn.get(e);
|
|
2985
3017
|
return t || (t = new Intl.ListFormat(e, {
|
|
2986
3018
|
style: "narrow",
|
|
2987
3019
|
type: "unit"
|
|
2988
|
-
}),
|
|
3020
|
+
}), pn.set(e, t)), t;
|
|
2989
3021
|
}
|
|
2990
3022
|
function $(e, t) {
|
|
2991
|
-
let n = `${e}|${JSON.stringify(t)}`, r =
|
|
2992
|
-
return r || (r = new Intl.NumberFormat(e, t),
|
|
3023
|
+
let n = `${e}|${JSON.stringify(t)}`, r = mn.get(n);
|
|
3024
|
+
return r || (r = new Intl.NumberFormat(e, t), mn.set(n, r)), r;
|
|
2993
3025
|
}
|
|
2994
|
-
function
|
|
3026
|
+
function Dn(e, t) {
|
|
2995
3027
|
let n = 10 ** t;
|
|
2996
3028
|
return Math.round(e * n) / n;
|
|
2997
3029
|
}
|
|
2998
|
-
export {
|
|
3030
|
+
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 };
|