@dpuse/dpuse-shared 1.0.240 → 1.0.242
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
|
@@ -449,7 +449,7 @@ function D(...e) {
|
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
451
|
/* @__NO_SIDE_EFFECTS__ */
|
|
452
|
-
function
|
|
452
|
+
function O(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 ee(e, t, n) {
|
|
|
459
459
|
};
|
|
460
460
|
}
|
|
461
461
|
// src/locale/locale.schema.ts
|
|
462
|
-
var
|
|
462
|
+
var k = /* @__PURE__ */ C({
|
|
463
463
|
en: /* @__PURE__ */ w(),
|
|
464
464
|
es: /* @__PURE__ */ w()
|
|
465
|
-
}),
|
|
465
|
+
}), A = {
|
|
466
466
|
id: /* @__PURE__ */ w(),
|
|
467
467
|
label: /* @__PURE__ */ C({
|
|
468
468
|
en: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
@@ -474,7 +474,7 @@ var O = /* @__PURE__ */ C({
|
|
|
474
474
|
}),
|
|
475
475
|
icon: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
476
476
|
iconDark: /* @__PURE__ */ y(/* @__PURE__ */ w())
|
|
477
|
-
},
|
|
477
|
+
}, j = (e) => /* @__PURE__ */ E(e.map((e) => /* @__PURE__ */ _(e))), ee = j([
|
|
478
478
|
"app",
|
|
479
479
|
"connector",
|
|
480
480
|
"connectorConnection",
|
|
@@ -496,32 +496,32 @@ var O = /* @__PURE__ */ C({
|
|
|
496
496
|
"presenter",
|
|
497
497
|
"presenterPresentation",
|
|
498
498
|
"tool"
|
|
499
|
-
]),
|
|
499
|
+
]), te = j([
|
|
500
500
|
"danger",
|
|
501
501
|
"success",
|
|
502
502
|
"warning"
|
|
503
|
-
]),
|
|
503
|
+
]), ne = j([
|
|
504
504
|
"alpha",
|
|
505
505
|
"beta",
|
|
506
506
|
"releaseCandidate",
|
|
507
507
|
"generalAvailability"
|
|
508
|
-
]),
|
|
509
|
-
color:
|
|
508
|
+
]), re = /* @__PURE__ */ C({
|
|
509
|
+
color: te,
|
|
510
510
|
label: /* @__PURE__ */ w()
|
|
511
|
-
}),
|
|
512
|
-
...
|
|
513
|
-
typeId:
|
|
514
|
-
},
|
|
515
|
-
...
|
|
511
|
+
}), ie = {
|
|
512
|
+
...A,
|
|
513
|
+
typeId: ee
|
|
514
|
+
}, ae = /* @__PURE__ */ C({
|
|
515
|
+
...ie,
|
|
516
516
|
order: /* @__PURE__ */ b(),
|
|
517
517
|
path: /* @__PURE__ */ w()
|
|
518
|
-
}),
|
|
519
|
-
...
|
|
518
|
+
}), oe = {
|
|
519
|
+
...ie,
|
|
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(re),
|
|
523
|
+
statusId: /* @__PURE__ */ y(ne)
|
|
524
|
+
}, se = /* @__PURE__ */ C({ ...oe }), ce = [
|
|
525
525
|
{
|
|
526
526
|
id: "alpha",
|
|
527
527
|
color: "danger",
|
|
@@ -555,8 +555,8 @@ var O = /* @__PURE__ */ C({
|
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
];
|
|
558
|
-
function
|
|
559
|
-
let n =
|
|
558
|
+
function le(e, t = "en") {
|
|
559
|
+
let n = ce.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 ue = [
|
|
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
|
+
], M = [
|
|
666
666
|
{
|
|
667
667
|
id: ",",
|
|
668
668
|
character: ","
|
|
@@ -699,7 +699,7 @@ var de = [
|
|
|
699
699
|
id: "0x1F",
|
|
700
700
|
character: ""
|
|
701
701
|
}
|
|
702
|
-
],
|
|
702
|
+
], de = [
|
|
703
703
|
{
|
|
704
704
|
id: "string",
|
|
705
705
|
defaultSubtypeId: "plain",
|
|
@@ -756,11 +756,11 @@ var de = [
|
|
|
756
756
|
isChoosable: !1,
|
|
757
757
|
subtypeIds: []
|
|
758
758
|
}
|
|
759
|
-
],
|
|
760
|
-
function
|
|
761
|
-
return
|
|
759
|
+
], fe = [",", "."];
|
|
760
|
+
function pe(e) {
|
|
761
|
+
return M.find(({ id: t }) => t === e)?.character ?? e;
|
|
762
762
|
}
|
|
763
|
-
|
|
763
|
+
j([
|
|
764
764
|
"app",
|
|
765
765
|
"engine",
|
|
766
766
|
"connector",
|
|
@@ -769,16 +769,16 @@ A([
|
|
|
769
769
|
"tool"
|
|
770
770
|
]);
|
|
771
771
|
// src/component/module/moduleConfig.schema.ts
|
|
772
|
-
var
|
|
773
|
-
...
|
|
772
|
+
var N = {
|
|
773
|
+
...oe,
|
|
774
774
|
vendorAccountURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
775
775
|
vendorDocumentationURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
776
776
|
vendorHomeURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
|
|
777
777
|
version: /* @__PURE__ */ w()
|
|
778
778
|
};
|
|
779
|
-
({ ...
|
|
779
|
+
({ ...N });
|
|
780
780
|
// src/component/module/connector/connectorConfig.schema.ts
|
|
781
|
-
var
|
|
781
|
+
var me = j([
|
|
782
782
|
"auditObjectContent",
|
|
783
783
|
"closeStore",
|
|
784
784
|
"createObject",
|
|
@@ -799,22 +799,22 @@ var he = A([
|
|
|
799
799
|
"removeRecords",
|
|
800
800
|
"retrieveRecords",
|
|
801
801
|
"upsertRecords"
|
|
802
|
-
]),
|
|
802
|
+
]), he = j([
|
|
803
803
|
"application",
|
|
804
804
|
"curatedDataset",
|
|
805
805
|
"database",
|
|
806
806
|
"fileStore"
|
|
807
|
-
]),
|
|
807
|
+
]), ge = /* @__PURE__ */ C({ label: k }), _e = j([
|
|
808
808
|
"apiEndpoint",
|
|
809
809
|
"file",
|
|
810
810
|
"table"
|
|
811
|
-
]),
|
|
811
|
+
]), ve = j([
|
|
812
812
|
"bidirectional",
|
|
813
813
|
"destination",
|
|
814
814
|
"source",
|
|
815
815
|
"unknown"
|
|
816
|
-
]),
|
|
817
|
-
authMethodId:
|
|
816
|
+
]), ye = /* @__PURE__ */ C({ label: k }), be = /* @__PURE__ */ C({
|
|
817
|
+
authMethodId: j([
|
|
818
818
|
"apiKey",
|
|
819
819
|
"disabled",
|
|
820
820
|
"oAuth2",
|
|
@@ -823,77 +823,77 @@ var he = A([
|
|
|
823
823
|
activeConnectionCount: /* @__PURE__ */ x(/* @__PURE__ */ b()),
|
|
824
824
|
canDescribe: /* @__PURE__ */ x(/* @__PURE__ */ g()),
|
|
825
825
|
id: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
826
|
-
label: /* @__PURE__ */ x(
|
|
826
|
+
label: /* @__PURE__ */ x(k),
|
|
827
827
|
maxConnectionCount: /* @__PURE__ */ y(/* @__PURE__ */ b()),
|
|
828
828
|
params: /* @__PURE__ */ x(/* @__PURE__ */ h(/* @__PURE__ */ S(/* @__PURE__ */ w(), /* @__PURE__ */ w())))
|
|
829
|
-
}),
|
|
830
|
-
...
|
|
829
|
+
}), xe = /* @__PURE__ */ C({
|
|
830
|
+
...N,
|
|
831
831
|
typeId: /* @__PURE__ */ _("connector"),
|
|
832
|
-
actionNames: /* @__PURE__ */ h(
|
|
833
|
-
category: /* @__PURE__ */ y(
|
|
834
|
-
categoryId:
|
|
835
|
-
implementations: /* @__PURE__ */ S(/* @__PURE__ */ w(),
|
|
836
|
-
itemTypeId:
|
|
837
|
-
usage: /* @__PURE__ */ y(
|
|
838
|
-
usageId: /* @__PURE__ */ y(
|
|
839
|
-
}),
|
|
832
|
+
actionNames: /* @__PURE__ */ h(me),
|
|
833
|
+
category: /* @__PURE__ */ y(ge),
|
|
834
|
+
categoryId: he,
|
|
835
|
+
implementations: /* @__PURE__ */ S(/* @__PURE__ */ w(), be),
|
|
836
|
+
itemTypeId: _e,
|
|
837
|
+
usage: /* @__PURE__ */ y(ye),
|
|
838
|
+
usageId: /* @__PURE__ */ y(ve)
|
|
839
|
+
}), Se = /* @__PURE__ */ new Set([
|
|
840
840
|
"APIError",
|
|
841
841
|
"AppError",
|
|
842
842
|
"ConnectorError",
|
|
843
843
|
"DPUseError",
|
|
844
844
|
"EngineError",
|
|
845
845
|
"FetchError"
|
|
846
|
-
]),
|
|
847
|
-
[/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${
|
|
848
|
-
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) =>
|
|
849
|
-
[/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () =>
|
|
850
|
-
[/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () =>
|
|
851
|
-
[/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () =>
|
|
852
|
-
],
|
|
846
|
+
]), Ce = 2048, P = "[REDACTED]", we = 10, Te = /api[-_]?key|authori[sz]ation|cookie|credential|passw(?:or)?d|private[-_]?key|secret|token/i, Ee = [
|
|
847
|
+
[/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${P}`],
|
|
848
|
+
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) => Te.test(t) && !/^(?:Basic|Bearer)$/i.test(r) ? `${t}${n}${P}` : e],
|
|
849
|
+
[/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () => P],
|
|
850
|
+
[/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () => P],
|
|
851
|
+
[/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () => P]
|
|
852
|
+
], F = class extends Error {
|
|
853
853
|
data;
|
|
854
854
|
locator;
|
|
855
855
|
constructor(e, t, n) {
|
|
856
856
|
super(e, n), this.name = "DPUseError", this.data = n?.data, this.locator = t;
|
|
857
857
|
}
|
|
858
|
-
},
|
|
858
|
+
}, I = class extends F {
|
|
859
859
|
constructor(e, t, n) {
|
|
860
860
|
super(e, t, n), this.name = "AppError";
|
|
861
861
|
}
|
|
862
|
-
},
|
|
862
|
+
}, De = class extends F {
|
|
863
863
|
constructor(e, t, n) {
|
|
864
864
|
super(e, t, n), this.name = "APIError";
|
|
865
865
|
}
|
|
866
|
-
},
|
|
866
|
+
}, Oe = class extends F {
|
|
867
867
|
constructor(e, t, n) {
|
|
868
868
|
super(e, t, n), this.name = "EngineError";
|
|
869
869
|
}
|
|
870
|
-
},
|
|
870
|
+
}, L = class extends F {
|
|
871
871
|
constructor(e, t, n) {
|
|
872
872
|
super(e, t, n), this.name = "ConnectorError";
|
|
873
873
|
}
|
|
874
|
-
},
|
|
874
|
+
}, ke = class extends F {
|
|
875
875
|
constructor(e, t, n) {
|
|
876
876
|
super(e, t, n), this.name = "FetchError";
|
|
877
877
|
}
|
|
878
878
|
};
|
|
879
|
-
async function
|
|
879
|
+
async function Ae(e, t, n) {
|
|
880
880
|
let r = ` - ${e.statusText}`, i = `${t} Response status '${String(e.status)}${e.statusText ? r : ""}' received.`, a;
|
|
881
881
|
try {
|
|
882
882
|
a = await e.text();
|
|
883
883
|
} catch (e) {
|
|
884
|
-
a = `<body unavailable: ${
|
|
884
|
+
a = `<body unavailable: ${R(e).message}>`;
|
|
885
885
|
}
|
|
886
|
-
return new
|
|
886
|
+
return new ke(i, n, { data: { body: Re(a) } });
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function je(e) {
|
|
889
889
|
return e.map((e) => e.message).join(" ");
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function Me(e) {
|
|
892
892
|
try {
|
|
893
893
|
e();
|
|
894
894
|
} catch {}
|
|
895
895
|
}
|
|
896
|
-
function
|
|
896
|
+
function R(e) {
|
|
897
897
|
if (e instanceof Error) return e;
|
|
898
898
|
if (typeof e == "string") return Error(e);
|
|
899
899
|
if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return Error(String(e));
|
|
@@ -905,24 +905,24 @@ function z(e) {
|
|
|
905
905
|
}
|
|
906
906
|
return /* @__PURE__ */ Error("Unknown error");
|
|
907
907
|
}
|
|
908
|
-
function
|
|
909
|
-
let t = /* @__PURE__ */ new Set(), n = [], r =
|
|
908
|
+
function Ne(e) {
|
|
909
|
+
let t = /* @__PURE__ */ new Set(), n = [], r = R(e);
|
|
910
910
|
for (; r != null && !t.has(r);) {
|
|
911
911
|
t.add(r);
|
|
912
|
-
let [e, i] =
|
|
912
|
+
let [e, i] = Be(r), a = Le(e);
|
|
913
913
|
/(?:\.{3}|[.!?])$/.test(a.message) || (a.message += "."), n.push(a), r = i;
|
|
914
914
|
}
|
|
915
915
|
return n;
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function Pe(e) {
|
|
918
918
|
let t;
|
|
919
919
|
for (let n of e.toReversed()) {
|
|
920
|
-
let e =
|
|
920
|
+
let e = Ie(n, t);
|
|
921
921
|
n.stack !== void 0 && (e.stack = n.stack), t = e;
|
|
922
922
|
}
|
|
923
923
|
return t ?? /* @__PURE__ */ Error("No error to unserialise.");
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function Fe(e) {
|
|
926
926
|
let t;
|
|
927
927
|
try {
|
|
928
928
|
t = JSON.stringify(e);
|
|
@@ -931,25 +931,25 @@ function Pe(e) {
|
|
|
931
931
|
}
|
|
932
932
|
return t === "" && (t = "Unknown error"), t;
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Ie(e, t) {
|
|
935
935
|
switch (e.name) {
|
|
936
|
-
case "APIError": return new
|
|
936
|
+
case "APIError": return new De(e.message, e.locator, {
|
|
937
937
|
data: e.data,
|
|
938
938
|
cause: t
|
|
939
939
|
});
|
|
940
|
-
case "AppError": return new
|
|
940
|
+
case "AppError": return new I(e.message, e.locator, {
|
|
941
941
|
data: e.data,
|
|
942
942
|
cause: t
|
|
943
943
|
});
|
|
944
|
-
case "ConnectorError": return new
|
|
944
|
+
case "ConnectorError": return new L(e.message, e.locator, {
|
|
945
945
|
data: e.data,
|
|
946
946
|
cause: t
|
|
947
947
|
});
|
|
948
|
-
case "EngineError": return new
|
|
948
|
+
case "EngineError": return new Oe(e.message, e.locator, {
|
|
949
949
|
data: e.data,
|
|
950
950
|
cause: t
|
|
951
951
|
});
|
|
952
|
-
case "FetchError": return new
|
|
952
|
+
case "FetchError": return new ke(e.message, e.locator, {
|
|
953
953
|
data: e.data,
|
|
954
954
|
cause: t
|
|
955
955
|
});
|
|
@@ -961,32 +961,32 @@ function Fe(e, t) {
|
|
|
961
961
|
}
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function Le(e) {
|
|
965
965
|
let { data: t, message: n, stack: r } = e;
|
|
966
966
|
return {
|
|
967
967
|
...e,
|
|
968
|
-
data: t === void 0 ? void 0 :
|
|
969
|
-
message:
|
|
970
|
-
stack: r === void 0 ? void 0 :
|
|
968
|
+
data: t === void 0 ? void 0 : B(t, /* @__PURE__ */ new WeakSet(), 0),
|
|
969
|
+
message: z(n),
|
|
970
|
+
stack: r === void 0 ? void 0 : z(r)
|
|
971
971
|
};
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function z(e) {
|
|
974
974
|
let t = e;
|
|
975
|
-
for (let [e, n] of
|
|
975
|
+
for (let [e, n] of Ee) t = t.replaceAll(e, (e, ...t) => n(e, ...t));
|
|
976
976
|
return t;
|
|
977
977
|
}
|
|
978
|
-
function
|
|
979
|
-
return typeof e == "string" ?
|
|
980
|
-
}
|
|
981
|
-
function Le(e) {
|
|
982
|
-
if (e != null && e !== "") return e.length > we ? `${e.slice(0, we)}... [truncated]` : e;
|
|
978
|
+
function B(e, t, n) {
|
|
979
|
+
return typeof e == "string" ? z(e) : typeof e != "object" || !e ? e : n >= we ? P : t.has(e) ? "[Circular]" : (t.add(e), Array.isArray(e) ? e.map((e) => B(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, r != null && Te.test(e) ? P : B(r, t, n + 1)])));
|
|
983
980
|
}
|
|
984
981
|
function Re(e) {
|
|
985
|
-
|
|
982
|
+
if (e != null && e !== "") return e.length > Ce ? `${e.slice(0, Ce)}... [truncated]` : e;
|
|
986
983
|
}
|
|
987
984
|
function ze(e) {
|
|
988
|
-
|
|
989
|
-
|
|
985
|
+
return e instanceof F || Se.has(e.name) && typeof e.locator == "string";
|
|
986
|
+
}
|
|
987
|
+
function Be(e) {
|
|
988
|
+
let t = e.cause == null ? null : R(e.cause);
|
|
989
|
+
if (ze(e)) return [{
|
|
990
990
|
data: e.data,
|
|
991
991
|
locator: e.locator,
|
|
992
992
|
message: e.message,
|
|
@@ -1003,46 +1003,60 @@ function ze(e) {
|
|
|
1003
1003
|
}, t] : [{
|
|
1004
1004
|
data: n,
|
|
1005
1005
|
locator: "",
|
|
1006
|
-
message:
|
|
1006
|
+
message: Fe(e),
|
|
1007
1007
|
name: "Error",
|
|
1008
1008
|
stack: void 0
|
|
1009
1009
|
}, null];
|
|
1010
1010
|
}
|
|
1011
1011
|
// src/component/module/connector/objectFetching.ts
|
|
1012
|
-
var
|
|
1013
|
-
async function
|
|
1014
|
-
if (
|
|
1012
|
+
var Ve = 16777216, V = 416;
|
|
1013
|
+
async function He(e, t) {
|
|
1014
|
+
if (Ue()) {
|
|
1015
1015
|
let n = await fetch(e, {
|
|
1016
1016
|
headers: t.headers ?? {},
|
|
1017
1017
|
signal: t.signal
|
|
1018
1018
|
});
|
|
1019
|
-
if (!n.ok) throw await
|
|
1020
|
-
return
|
|
1019
|
+
if (!n.ok) throw await Ae(n, `Failed to fetch '${t.path}' file.`, t.locator);
|
|
1020
|
+
return We(n, t);
|
|
1021
1021
|
}
|
|
1022
|
-
let n =
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1022
|
+
let n = new AbortController(), r = {
|
|
1023
|
+
...t,
|
|
1024
|
+
signal: AbortSignal.any([t.signal, n.signal])
|
|
1025
|
+
}, i = await Ke(e, 0, r);
|
|
1026
|
+
if (i.status !== 206 && i.status !== V) return We(i, t);
|
|
1027
|
+
let a = 0, o = Ge(Promise.resolve(i), t);
|
|
1028
|
+
return new ReadableStream({
|
|
1029
|
+
pull: async (n) => {
|
|
1030
|
+
let i = await o;
|
|
1031
|
+
if ("error" in i) throw i.error;
|
|
1032
|
+
let { bytes: s } = i;
|
|
1033
|
+
s != null && s.length > 0 && n.enqueue(s), s == null || s.length < Ve ? n.close() : (a += s.length, o = Ge(Ke(e, a, r), t));
|
|
1034
|
+
},
|
|
1035
|
+
cancel: () => {
|
|
1036
|
+
n.abort();
|
|
1030
1037
|
}
|
|
1031
|
-
|
|
1032
|
-
let o = new Uint8Array(await a.arrayBuffer());
|
|
1033
|
-
i += o.length, o.length > 0 && n.enqueue(o), o.length < Be && n.close();
|
|
1034
|
-
} }, { highWaterMark: 0 });
|
|
1038
|
+
}, { highWaterMark: 0 });
|
|
1035
1039
|
}
|
|
1036
|
-
function
|
|
1040
|
+
function Ue() {
|
|
1037
1041
|
let { userAgentData: e } = globalThis.navigator;
|
|
1038
1042
|
return e?.brands.some(({ brand: e }) => e === "Chromium") === !0;
|
|
1039
1043
|
}
|
|
1040
|
-
function
|
|
1041
|
-
if (e.body == null) throw new
|
|
1044
|
+
function We(e, t) {
|
|
1045
|
+
if (e.body == null) throw new L("Readable streams are not supported in this runtime.", `${t.locator}.unsupported`);
|
|
1042
1046
|
return e.body;
|
|
1043
1047
|
}
|
|
1044
|
-
async function
|
|
1045
|
-
|
|
1048
|
+
async function Ge(e, t) {
|
|
1049
|
+
try {
|
|
1050
|
+
let n = await e;
|
|
1051
|
+
if (n.status === V) return { bytes: void 0 };
|
|
1052
|
+
if (n.status !== 206) throw new L(`Failed to fetch part of '${t.path}' file.`, `${t.locator}.range`);
|
|
1053
|
+
return { bytes: new Uint8Array(await n.arrayBuffer()) };
|
|
1054
|
+
} catch (e) {
|
|
1055
|
+
return { error: e };
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
async function Ke(e, t, n) {
|
|
1059
|
+
let r = `bytes=${String(t)}-${String(t + Ve - 1)}`, i = await fetch(e, {
|
|
1046
1060
|
cache: "no-store",
|
|
1047
1061
|
headers: {
|
|
1048
1062
|
...n.headers,
|
|
@@ -1050,11 +1064,11 @@ async function We(e, t, n) {
|
|
|
1050
1064
|
},
|
|
1051
1065
|
signal: n.signal
|
|
1052
1066
|
});
|
|
1053
|
-
if (!i.ok && i.status !==
|
|
1067
|
+
if (!i.ok && i.status !== V) throw await Ae(i, `Failed to fetch '${n.path}' file.`, n.locator);
|
|
1054
1068
|
return i;
|
|
1055
1069
|
}
|
|
1056
1070
|
// src/encoding/index.ts
|
|
1057
|
-
var
|
|
1071
|
+
var qe = {
|
|
1058
1072
|
arabic: {
|
|
1059
1073
|
id: "arabic",
|
|
1060
1074
|
label: {
|
|
@@ -1209,7 +1223,7 @@ var Ge = {
|
|
|
1209
1223
|
es: "Occidental"
|
|
1210
1224
|
}
|
|
1211
1225
|
}
|
|
1212
|
-
},
|
|
1226
|
+
}, Je = {
|
|
1213
1227
|
"armscii-8": {
|
|
1214
1228
|
id: "armscii-8",
|
|
1215
1229
|
groupId: "armenian",
|
|
@@ -2001,16 +2015,16 @@ var Ge = {
|
|
|
2001
2015
|
textDecoderId: "windows-1257",
|
|
2002
2016
|
iconvLiteDecoderId: "windows1257"
|
|
2003
2017
|
}
|
|
2004
|
-
},
|
|
2005
|
-
function
|
|
2006
|
-
return Object.hasOwn(
|
|
2018
|
+
}, Ye = qe, H = Je;
|
|
2019
|
+
function Xe(e) {
|
|
2020
|
+
return Object.hasOwn(H, e);
|
|
2007
2021
|
}
|
|
2008
|
-
function
|
|
2009
|
-
return
|
|
2022
|
+
function U(e) {
|
|
2023
|
+
return Xe(e) ? H[e].textDecoderId ?? e : e;
|
|
2010
2024
|
}
|
|
2011
|
-
function
|
|
2012
|
-
return Array.from(Object.values(
|
|
2013
|
-
let o = t == null ? "" :
|
|
2025
|
+
function Ze(e = "en") {
|
|
2026
|
+
return Array.from(Object.values(H), ({ groupId: t, iconvLiteDecoderId: n, id: r, isDetectable: i, textDecoderId: a }) => {
|
|
2027
|
+
let o = t == null ? "" : Qe(t, e);
|
|
2014
2028
|
return {
|
|
2015
2029
|
id: r,
|
|
2016
2030
|
groupLabel: o,
|
|
@@ -2022,11 +2036,11 @@ function Ye(e = "en") {
|
|
|
2022
2036
|
};
|
|
2023
2037
|
}).toSorted((t, n) => t.groupLabel.localeCompare(n.groupLabel, e) || t.id.localeCompare(n.id, e, { numeric: !0 }));
|
|
2024
2038
|
}
|
|
2025
|
-
function
|
|
2026
|
-
let n =
|
|
2039
|
+
function Qe(e, t) {
|
|
2040
|
+
let n = Ye[e].label;
|
|
2027
2041
|
return n[t] ?? n.en ?? e;
|
|
2028
2042
|
}
|
|
2029
|
-
var
|
|
2043
|
+
var $e = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ D(/* @__PURE__ */ h(j([
|
|
2030
2044
|
"arrow",
|
|
2031
2045
|
"avro",
|
|
2032
2046
|
"dtv",
|
|
@@ -2039,19 +2053,19 @@ var Ze = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ D(/* @__PURE__ */ h(
|
|
|
2039
2053
|
"sqlite",
|
|
2040
2054
|
"xlsx",
|
|
2041
2055
|
"xml"
|
|
2042
|
-
])), /* @__PURE__ */ f(1)) }),
|
|
2043
|
-
...
|
|
2056
|
+
])), /* @__PURE__ */ f(1)) }), et = /* @__PURE__ */ h(/* @__PURE__ */ w()), tt = /* @__PURE__ */ C({
|
|
2057
|
+
...N,
|
|
2044
2058
|
typeId: /* @__PURE__ */ _("tool"),
|
|
2045
|
-
actionNames: /* @__PURE__ */ x(
|
|
2046
|
-
parser: /* @__PURE__ */ x(
|
|
2059
|
+
actionNames: /* @__PURE__ */ x(et),
|
|
2060
|
+
parser: /* @__PURE__ */ x($e)
|
|
2047
2061
|
});
|
|
2048
2062
|
// src/component/module/tool/delimitedText.ts
|
|
2049
|
-
async function
|
|
2050
|
-
let r = new TextDecoder(
|
|
2063
|
+
async function nt(e, t, n) {
|
|
2064
|
+
let r = new TextDecoder(U(t.encodingId)).decode(e), i = {
|
|
2051
2065
|
bytes: e,
|
|
2052
2066
|
encodingId: t.encodingId,
|
|
2053
2067
|
text: r
|
|
2054
|
-
}, a =
|
|
2068
|
+
}, a = rt(r), { issues: o, parsedRecords: s, valueDelimiterId: c } = await it(i, t.valueDelimiterIds, t.isComplete, n);
|
|
2055
2069
|
return {
|
|
2056
2070
|
issues: o,
|
|
2057
2071
|
parsedRecords: s,
|
|
@@ -2059,16 +2073,16 @@ async function et(e, t, n) {
|
|
|
2059
2073
|
valueDelimiterId: c
|
|
2060
2074
|
};
|
|
2061
2075
|
}
|
|
2062
|
-
function
|
|
2076
|
+
function rt(e) {
|
|
2063
2077
|
let t = (e.match(/\r\n/g) ?? []).length, n = (e.match(/(?<!\r)\n/g) ?? []).length, r = (e.match(/\r(?!\n)/g) ?? []).length;
|
|
2064
2078
|
return t >= n && t >= r ? "\r\n" : n >= t && n >= r ? "\n" : r >= t && r >= n ? "\r" : "\n";
|
|
2065
2079
|
}
|
|
2066
|
-
async function
|
|
2080
|
+
async function it(e, t, n, r) {
|
|
2067
2081
|
let i, a, o, s = [], c, l = !1;
|
|
2068
2082
|
for (let u of t) {
|
|
2069
2083
|
let { issues: t, records: d } = await r(e, u, n);
|
|
2070
2084
|
if (t.length > 0) {
|
|
2071
|
-
c =
|
|
2085
|
+
c = at(c, {
|
|
2072
2086
|
delimiter: u,
|
|
2073
2087
|
issues: t,
|
|
2074
2088
|
records: d
|
|
@@ -2076,7 +2090,7 @@ async function nt(e, t, n, r) {
|
|
|
2076
2090
|
continue;
|
|
2077
2091
|
}
|
|
2078
2092
|
if (l = !0, d.length === 0) continue;
|
|
2079
|
-
let { averageValueCount: f, sumOfValueCountDiffs: p } =
|
|
2093
|
+
let { averageValueCount: f, sumOfValueCountDiffs: p } = ot(d);
|
|
2080
2094
|
(a === void 0 || a <= 1 || p <= (o ?? 0)) && (a === void 0 || f > a) && (i = u, a = f, o = p, s = d);
|
|
2081
2095
|
}
|
|
2082
2096
|
if (!l && c != null) {
|
|
@@ -2084,19 +2098,19 @@ async function nt(e, t, n, r) {
|
|
|
2084
2098
|
return {
|
|
2085
2099
|
issues: t,
|
|
2086
2100
|
parsedRecords: n,
|
|
2087
|
-
valueDelimiterId:
|
|
2101
|
+
valueDelimiterId: st(n) ? e : void 0
|
|
2088
2102
|
};
|
|
2089
2103
|
}
|
|
2090
2104
|
return {
|
|
2091
2105
|
issues: [],
|
|
2092
2106
|
parsedRecords: s,
|
|
2093
|
-
valueDelimiterId: i != null &&
|
|
2107
|
+
valueDelimiterId: i != null && st(s) ? i : void 0
|
|
2094
2108
|
};
|
|
2095
2109
|
}
|
|
2096
|
-
function
|
|
2110
|
+
function at(e, t) {
|
|
2097
2111
|
return e == null || t.issues.length < e.issues.length ? t : e;
|
|
2098
2112
|
}
|
|
2099
|
-
function
|
|
2113
|
+
function ot(e) {
|
|
2100
2114
|
let t = 0, n = 0, r;
|
|
2101
2115
|
for (let i of e) r != null && (n += Math.abs(i.length - r)), r = i.length, t += i.length;
|
|
2102
2116
|
return {
|
|
@@ -2104,39 +2118,39 @@ function it(e) {
|
|
|
2104
2118
|
sumOfValueCountDiffs: n
|
|
2105
2119
|
};
|
|
2106
2120
|
}
|
|
2107
|
-
function
|
|
2121
|
+
function st(e) {
|
|
2108
2122
|
let t = /* @__PURE__ */ new Map();
|
|
2109
2123
|
for (let n of e) t.set(n.length, (t.get(n.length) ?? 0) + 1);
|
|
2110
2124
|
let [n = 0, r = 0] = [...t].toSorted((e, t) => t[1] - e[1])[0] ?? [];
|
|
2111
2125
|
return n > 1 && r * 2 > e.length;
|
|
2112
2126
|
}
|
|
2113
2127
|
// src/component/module/tool/index.ts
|
|
2114
|
-
var
|
|
2115
|
-
function
|
|
2128
|
+
var ct = "https://engine-eu.dpuse.app/tools", lt = { dtv: "dpuse-tool-rust-csv-core-parser" }, W = "dpuse-tool-";
|
|
2129
|
+
function G(e, t) {
|
|
2116
2130
|
return e.filter((e) => e.parser?.dataFormatIds.some((e) => e === t) === !0).toSorted((e, t) => e.id.localeCompare(t.id, "en"));
|
|
2117
2131
|
}
|
|
2118
|
-
function
|
|
2119
|
-
let r =
|
|
2132
|
+
function K(e, t, n) {
|
|
2133
|
+
let r = G(e, t), [i] = r;
|
|
2120
2134
|
if (i === void 0) {
|
|
2121
2135
|
let n = {
|
|
2122
2136
|
availableToolIds: e.map((e) => e.id),
|
|
2123
2137
|
dataFormatId: t
|
|
2124
2138
|
};
|
|
2125
|
-
throw new
|
|
2139
|
+
throw new I(`No tool reads the '${t}' data format.`, "dpuse-shared.component.module.tool.resolveParserToolConfig", { data: n });
|
|
2126
2140
|
}
|
|
2127
|
-
let a =
|
|
2141
|
+
let a = lt[t];
|
|
2128
2142
|
return r.find((e) => e.id === n) ?? r.find((e) => e.id === a) ?? i;
|
|
2129
2143
|
}
|
|
2130
|
-
async function
|
|
2131
|
-
let n = `${
|
|
2144
|
+
async function ut(e, t) {
|
|
2145
|
+
let n = `${W}${t}`, r = e.find((e) => e.id === n);
|
|
2132
2146
|
if (!r) {
|
|
2133
2147
|
let r = {
|
|
2134
2148
|
availableToolIds: e.map((e) => e.id),
|
|
2135
2149
|
toolName: n
|
|
2136
2150
|
};
|
|
2137
|
-
throw new
|
|
2151
|
+
throw new I(`Tool '${t}' not found.`, "dpuse-shared.component.module.tool.loadTool", { data: r });
|
|
2138
2152
|
}
|
|
2139
|
-
let i = `${
|
|
2153
|
+
let i = `${ct}/${t}_v${r.version}/${n}.es.js`;
|
|
2140
2154
|
try {
|
|
2141
2155
|
return new (await (import(
|
|
2142
2156
|
/* @vite-ignore */
|
|
@@ -2148,15 +2162,15 @@ async function ct(e, t) {
|
|
|
2148
2162
|
url: i,
|
|
2149
2163
|
version: r.version
|
|
2150
2164
|
};
|
|
2151
|
-
throw new
|
|
2165
|
+
throw new I(`Failed to load tool '${n}' v${r.version}.`, "dpuse-shared.component.module.tool.loadTool", {
|
|
2152
2166
|
data: t,
|
|
2153
2167
|
cause: e
|
|
2154
2168
|
});
|
|
2155
2169
|
}
|
|
2156
2170
|
}
|
|
2157
2171
|
// src/component/module/connector/objectParsing.ts
|
|
2158
|
-
var
|
|
2159
|
-
async function
|
|
2172
|
+
var dt = "\n", q = ",", ft = new Set(ue.filter(({ isStructured: e }) => e).map(({ id: e }) => e)), pt = 13, mt = 10, ht = 34, gt = 1048576;
|
|
2173
|
+
async function _t(e) {
|
|
2160
2174
|
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 = {
|
|
2161
2175
|
decodedEncodingId: i.decodedEncodingId,
|
|
2162
2176
|
replacementCharacterCount: i.replacementCharacterCount
|
|
@@ -2166,7 +2180,7 @@ async function ht(e) {
|
|
|
2166
2180
|
encodingSourceId: r?.encodingId == null ? i.encodingSourceId : void 0
|
|
2167
2181
|
};
|
|
2168
2182
|
if (f === 0) return {
|
|
2169
|
-
contentAuditConfig:
|
|
2183
|
+
contentAuditConfig: Ct({
|
|
2170
2184
|
asAt: t,
|
|
2171
2185
|
columns: [],
|
|
2172
2186
|
isComplete: !0,
|
|
@@ -2190,10 +2204,10 @@ async function ht(e) {
|
|
|
2190
2204
|
hasHeaders: !1,
|
|
2191
2205
|
parsedRecords: [],
|
|
2192
2206
|
parserId: void 0,
|
|
2193
|
-
recordDelimiterId:
|
|
2207
|
+
recordDelimiterId: dt,
|
|
2194
2208
|
size: 0,
|
|
2195
2209
|
text: void 0,
|
|
2196
|
-
valueDelimiterId:
|
|
2210
|
+
valueDelimiterId: q
|
|
2197
2211
|
},
|
|
2198
2212
|
readingConfig: {
|
|
2199
2213
|
dataFormatId: "dtv",
|
|
@@ -2203,18 +2217,18 @@ async function ht(e) {
|
|
|
2203
2217
|
hasHeaders: !1,
|
|
2204
2218
|
isDeclared: d,
|
|
2205
2219
|
parserId: void 0,
|
|
2206
|
-
recordDelimiterId:
|
|
2207
|
-
valueDelimiterId:
|
|
2220
|
+
recordDelimiterId: dt,
|
|
2221
|
+
valueDelimiterId: q
|
|
2208
2222
|
},
|
|
2209
2223
|
encodingCandidates: m
|
|
2210
2224
|
};
|
|
2211
|
-
let g = r?.dataFormatId ?? i.dataFormatId, _ = r?.valueDelimiterId, v = { duration: 0 }, y = await
|
|
2225
|
+
let g = r?.dataFormatId ?? i.dataFormatId, _ = r?.valueDelimiterId, v = { duration: 0 }, y = await kt({
|
|
2212
2226
|
dataFormatId: g,
|
|
2213
2227
|
filePreview: i,
|
|
2214
2228
|
parserId: void 0,
|
|
2215
2229
|
parseTiming: v,
|
|
2216
2230
|
toolConfigs: c
|
|
2217
|
-
}), b = i.decodedEncodingId ?? "utf-8", x = await
|
|
2231
|
+
}), b = i.decodedEncodingId ?? "utf-8", x = await Ot({
|
|
2218
2232
|
bytes: i.bytes,
|
|
2219
2233
|
dataFormatId: g,
|
|
2220
2234
|
encodingId: b,
|
|
@@ -2226,13 +2240,13 @@ async function ht(e) {
|
|
|
2226
2240
|
text: u,
|
|
2227
2241
|
toolConfigs: c,
|
|
2228
2242
|
valueDelimiterId: _
|
|
2229
|
-
}), S = o?.dataFormatId ?? g, C = o?.dataFormatId != null || o?.parserId != null, w = C || o?.valueDelimiterId != null || o?.structurePath != null, T = C ? await
|
|
2243
|
+
}), S = o?.dataFormatId ?? g, C = o?.dataFormatId != null || o?.parserId != null, w = C || o?.valueDelimiterId != null || o?.structurePath != null, T = C ? await kt({
|
|
2230
2244
|
dataFormatId: S,
|
|
2231
2245
|
filePreview: i,
|
|
2232
2246
|
parserId: o.parserId,
|
|
2233
2247
|
parseTiming: v,
|
|
2234
2248
|
toolConfigs: c
|
|
2235
|
-
}) : y, E = w ? await
|
|
2249
|
+
}) : y, E = w ? await Ot({
|
|
2236
2250
|
bytes: i.bytes,
|
|
2237
2251
|
dataFormatId: S,
|
|
2238
2252
|
encodingId: b,
|
|
@@ -2244,22 +2258,22 @@ async function ht(e) {
|
|
|
2244
2258
|
text: u,
|
|
2245
2259
|
toolConfigs: c,
|
|
2246
2260
|
valueDelimiterId: _ ?? o.valueDelimiterId
|
|
2247
|
-
}) : x, D = E?.parsePreviewResult.parsedRecords ?? [],
|
|
2261
|
+
}) : x, D = E?.parsePreviewResult.parsedRecords ?? [], O = E?.parsePreviewResult.hasHeaders ?? r?.hasHeaders, k = performance.now(), A = E == null ? void 0 : a(D, O, n), j = w && x != null ? a(x.parsePreviewResult.parsedRecords, x.parsePreviewResult.hasHeaders ?? r?.hasHeaders, n) : A;
|
|
2248
2262
|
return {
|
|
2249
|
-
contentAuditConfig:
|
|
2263
|
+
contentAuditConfig: Ct({
|
|
2250
2264
|
asAt: t,
|
|
2251
|
-
columnAuditDuration: performance.now() -
|
|
2252
|
-
columns:
|
|
2265
|
+
columnAuditDuration: performance.now() - k,
|
|
2266
|
+
columns: A?.columnConfigs ?? [],
|
|
2253
2267
|
isComplete: l,
|
|
2254
2268
|
parseDuration: v.duration,
|
|
2255
|
-
recordCount: Math.max(0, D.length - +(
|
|
2269
|
+
recordCount: Math.max(0, D.length - +(A?.hasHeaders === !0)),
|
|
2256
2270
|
size: f,
|
|
2257
2271
|
startedAt: s
|
|
2258
2272
|
}),
|
|
2259
2273
|
sampleConfig: {
|
|
2260
2274
|
...p,
|
|
2261
2275
|
dataFormatId: S ?? "unknown",
|
|
2262
|
-
hasHeaders:
|
|
2276
|
+
hasHeaders: A?.hasHeaders,
|
|
2263
2277
|
issues: E?.parsePreviewResult.issues ?? [],
|
|
2264
2278
|
parsedRecords: D,
|
|
2265
2279
|
parserId: E?.parserId,
|
|
@@ -2274,7 +2288,7 @@ async function ht(e) {
|
|
|
2274
2288
|
dataFormatSourceId: r == null ? i.dataFormatSourceId : void 0,
|
|
2275
2289
|
...h,
|
|
2276
2290
|
fileType: i.fileTypeConfig,
|
|
2277
|
-
hasHeaders:
|
|
2291
|
+
hasHeaders: j?.hasHeaders,
|
|
2278
2292
|
isDeclared: d,
|
|
2279
2293
|
parserId: x?.parserId,
|
|
2280
2294
|
recordDelimiterId: x?.parsePreviewResult.recordDelimiterId,
|
|
@@ -2285,15 +2299,15 @@ async function ht(e) {
|
|
|
2285
2299
|
structureIndex: T
|
|
2286
2300
|
};
|
|
2287
2301
|
}
|
|
2288
|
-
async function*
|
|
2289
|
-
let { options: t, signal: n, stream: r, toolConfigs: i } = e, { encodingId: a, valueDelimiterId: o } =
|
|
2302
|
+
async function* vt(e) {
|
|
2303
|
+
let { options: t, signal: n, stream: r, toolConfigs: i } = e, { encodingId: a, valueDelimiterId: o } = St(t), { parser: s } = await Y(i, t.dataFormatId, t.parserId), c = Dt(r), l = Et(c.stream), u = s.parseStream(l.stream, {
|
|
2290
2304
|
abortSignal: n,
|
|
2291
2305
|
chunkSize: t.chunkSize,
|
|
2292
2306
|
dataFormatId: t.dataFormatId,
|
|
2293
2307
|
encodingId: a,
|
|
2294
2308
|
structurePath: t.structurePath,
|
|
2295
2309
|
valueDelimiterId: o
|
|
2296
|
-
}), d =
|
|
2310
|
+
}), d = At(u), f = !1;
|
|
2297
2311
|
try {
|
|
2298
2312
|
let e = await d.readNext();
|
|
2299
2313
|
for (; e.done !== !0;) yield {
|
|
@@ -2311,8 +2325,8 @@ async function* gt(e) {
|
|
|
2311
2325
|
f || await u.return?.();
|
|
2312
2326
|
}
|
|
2313
2327
|
}
|
|
2314
|
-
async function
|
|
2315
|
-
let { constructColumnAuditor: t, declaredColumnConfigs: n, onProgress: r, options: i, signal: a, stream: o, toolConfigs: s } = e, { encodingId: c, valueDelimiterId: l } =
|
|
2328
|
+
async function yt(e) {
|
|
2329
|
+
let { constructColumnAuditor: t, declaredColumnConfigs: n, onProgress: r, options: i, signal: a, stream: o, toolConfigs: s } = e, { encodingId: c, valueDelimiterId: l } = St(i), u = Date.now(), d = performance.now(), f = t(i.hasHeaders, n), { parser: p } = await Y(s, i.dataFormatId, i.parserId), m = Dt(o), h = ft.has(i.dataFormatId), g = h ? Et(m.stream) : wt(m.stream, {
|
|
2316
2330
|
byteLimit: i.byteLimit,
|
|
2317
2331
|
encodingId: c,
|
|
2318
2332
|
stopSignal: i.stopSignal
|
|
@@ -2325,7 +2339,7 @@ async function _t(e) {
|
|
|
2325
2339
|
stopSignal: h ? i.stopSignal : void 0,
|
|
2326
2340
|
structurePath: i.structurePath,
|
|
2327
2341
|
valueDelimiterId: l
|
|
2328
|
-
}), v =
|
|
2342
|
+
}), v = At(_), y = 0, b = await v.readNext();
|
|
2329
2343
|
for (; b.done !== !0;) {
|
|
2330
2344
|
try {
|
|
2331
2345
|
let e = performance.now();
|
|
@@ -2355,8 +2369,8 @@ async function _t(e) {
|
|
|
2355
2369
|
hasHeaders: E
|
|
2356
2370
|
};
|
|
2357
2371
|
}
|
|
2358
|
-
async function
|
|
2359
|
-
let { onProgress: t, options: n, signal: r, stream: i, toolConfigs: a } = e, o = await
|
|
2372
|
+
async function bt(e) {
|
|
2373
|
+
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";
|
|
2360
2374
|
return await o.buildStructureIndex(i, {
|
|
2361
2375
|
abortSignal: r,
|
|
2362
2376
|
dataFormatId: n.dataFormatId,
|
|
@@ -2366,9 +2380,9 @@ async function vt(e) {
|
|
|
2366
2380
|
onProgress: t
|
|
2367
2381
|
});
|
|
2368
2382
|
}
|
|
2369
|
-
async function
|
|
2383
|
+
async function xt(e) {
|
|
2370
2384
|
let { options: t, signal: n, stream: r, toolConfigs: i } = e;
|
|
2371
|
-
return await (await
|
|
2385
|
+
return await (await X(i, t.dataFormatId, t.parserId)).listStructureEntries(r, {
|
|
2372
2386
|
abortSignal: n,
|
|
2373
2387
|
dataFormatId: t.dataFormatId,
|
|
2374
2388
|
entryCount: t.entryCount,
|
|
@@ -2377,15 +2391,15 @@ async function yt(e) {
|
|
|
2377
2391
|
path: t.structurePath
|
|
2378
2392
|
});
|
|
2379
2393
|
}
|
|
2380
|
-
function
|
|
2381
|
-
let t = e.valueDelimiterId ?? (
|
|
2394
|
+
function St(e) {
|
|
2395
|
+
let t = e.valueDelimiterId ?? (ft.has(e.dataFormatId) ? "" : void 0);
|
|
2382
2396
|
if (t == null || e.encodingId == null) throw Error(`'${e.path}' has no encoding or value delimiter, which a parser needs to read it.`);
|
|
2383
2397
|
return {
|
|
2384
2398
|
encodingId: e.encodingId,
|
|
2385
2399
|
valueDelimiterId: t
|
|
2386
2400
|
};
|
|
2387
2401
|
}
|
|
2388
|
-
function
|
|
2402
|
+
function Ct(e) {
|
|
2389
2403
|
let { asAt: t, columnAuditDuration: n, columns: r, isComplete: i, parseDuration: a, recordCount: o, size: s, startedAt: c } = e;
|
|
2390
2404
|
return {
|
|
2391
2405
|
asAt: t,
|
|
@@ -2403,8 +2417,8 @@ function xt(e) {
|
|
|
2403
2417
|
columnAuditDuration: n
|
|
2404
2418
|
};
|
|
2405
2419
|
}
|
|
2406
|
-
function
|
|
2407
|
-
let n = e.getReader(), r =
|
|
2420
|
+
function wt(e, t) {
|
|
2421
|
+
let n = e.getReader(), r = Tt(t.encodingId), i = 0, a = !1, o;
|
|
2408
2422
|
return {
|
|
2409
2423
|
byteCount: () => i,
|
|
2410
2424
|
isComplete: () => a,
|
|
@@ -2419,8 +2433,8 @@ function St(e, t) {
|
|
|
2419
2433
|
}
|
|
2420
2434
|
s = t.value;
|
|
2421
2435
|
}
|
|
2422
|
-
let c = s.subarray(0,
|
|
2423
|
-
o = s.length >
|
|
2436
|
+
let c = s.subarray(0, gt);
|
|
2437
|
+
o = s.length > gt ? s.subarray(gt) : void 0;
|
|
2424
2438
|
let l = t.stopSignal?.aborted === !0 ? i : t.byteLimit ?? Infinity, u = r(c, i, l - i);
|
|
2425
2439
|
u == null ? (i += c.length, e.enqueue(c)) : (i += u, o = void 0, e.enqueue(c.subarray(0, u)), e.close(), await n.cancel());
|
|
2426
2440
|
},
|
|
@@ -2430,19 +2444,19 @@ function St(e, t) {
|
|
|
2430
2444
|
}, { highWaterMark: 0 })
|
|
2431
2445
|
};
|
|
2432
2446
|
}
|
|
2433
|
-
function
|
|
2434
|
-
let t =
|
|
2447
|
+
function Tt(e) {
|
|
2448
|
+
let t = U(e), n = t.startsWith("utf-16"), r = n ? 2 : 1, i = +(t === "utf-16be"), a = !1;
|
|
2435
2449
|
return (e, t, o) => {
|
|
2436
2450
|
for (let s = 0; s < e.length; s++) {
|
|
2437
2451
|
let c = e[s];
|
|
2438
|
-
if ((c ===
|
|
2439
|
-
if (c ===
|
|
2440
|
-
else if (!a && s >= o && (c ===
|
|
2452
|
+
if ((c === ht || c === mt || c === pt) && (!n || (t + s) % 2 === i && e[s + 1 - 2 * i] === 0)) {
|
|
2453
|
+
if (c === ht) a = !a;
|
|
2454
|
+
else if (!a && s >= o && (c === mt || e[s + r] !== mt)) return s + r - i;
|
|
2441
2455
|
}
|
|
2442
2456
|
}
|
|
2443
2457
|
};
|
|
2444
2458
|
}
|
|
2445
|
-
function
|
|
2459
|
+
function Et(e) {
|
|
2446
2460
|
let t = e.getReader(), n = 0, r = !1;
|
|
2447
2461
|
return {
|
|
2448
2462
|
byteCount: () => n,
|
|
@@ -2458,7 +2472,7 @@ function wt(e) {
|
|
|
2458
2472
|
}, { highWaterMark: 0 })
|
|
2459
2473
|
};
|
|
2460
2474
|
}
|
|
2461
|
-
function
|
|
2475
|
+
function Dt(e) {
|
|
2462
2476
|
let t = e.getReader(), n = 0;
|
|
2463
2477
|
return {
|
|
2464
2478
|
stream: new ReadableStream({
|
|
@@ -2473,10 +2487,10 @@ function Tt(e) {
|
|
|
2473
2487
|
waitDuration: () => n
|
|
2474
2488
|
};
|
|
2475
2489
|
}
|
|
2476
|
-
async function
|
|
2490
|
+
async function Ot(e) {
|
|
2477
2491
|
let { bytes: t, dataFormatId: n, encodingId: r, isComplete: i, parserId: a, parseTiming: o, structureIndex: s, structurePath: c, text: l, toolConfigs: u, valueDelimiterId: d } = e;
|
|
2478
|
-
if (n == null || l == null ||
|
|
2479
|
-
let { parser: f, parserId: p } = await
|
|
2492
|
+
if (n == null || l == null || G(u, n).length === 0) return;
|
|
2493
|
+
let { parser: f, parserId: p } = await Y(u, n, a);
|
|
2480
2494
|
if (s != null) {
|
|
2481
2495
|
let e = s.nodes.length === 0 && s.issues.length > 0;
|
|
2482
2496
|
return e || c == null ? {
|
|
@@ -2491,7 +2505,7 @@ async function Et(e) {
|
|
|
2491
2505
|
valueDelimiterId: void 0
|
|
2492
2506
|
} : {
|
|
2493
2507
|
parserId: p,
|
|
2494
|
-
parsePreviewResult: await
|
|
2508
|
+
parsePreviewResult: await J(o, () => f.parsePreview(t, {
|
|
2495
2509
|
dataFormatId: n,
|
|
2496
2510
|
encodingId: r,
|
|
2497
2511
|
isComplete: i,
|
|
@@ -2502,29 +2516,29 @@ async function Et(e) {
|
|
|
2502
2516
|
valueDelimiterId: void 0
|
|
2503
2517
|
};
|
|
2504
2518
|
}
|
|
2505
|
-
let m = d == null ?
|
|
2519
|
+
let m = d == null ? M.map(({ id: e }) => e) : [d], h = await J(o, () => f.parsePreview(t, {
|
|
2506
2520
|
dataFormatId: n,
|
|
2507
2521
|
encodingId: r,
|
|
2508
2522
|
isComplete: i,
|
|
2509
2523
|
valueDelimiterIds: m
|
|
2510
|
-
})), g = n === "dtv", _ = g && d == null && h.valueDelimiterId == null ? await
|
|
2524
|
+
})), g = n === "dtv", _ = g && d == null && h.valueDelimiterId == null ? await J(o, () => f.parsePreview(t, {
|
|
2511
2525
|
dataFormatId: n,
|
|
2512
2526
|
encodingId: r,
|
|
2513
2527
|
isComplete: i,
|
|
2514
|
-
valueDelimiterIds: [
|
|
2528
|
+
valueDelimiterIds: [q]
|
|
2515
2529
|
})) : h;
|
|
2516
2530
|
return {
|
|
2517
2531
|
parserId: p,
|
|
2518
2532
|
parsePreviewResult: _,
|
|
2519
2533
|
structurePath: void 0,
|
|
2520
|
-
valueDelimiterId: g ? d ?? _.valueDelimiterId ??
|
|
2534
|
+
valueDelimiterId: g ? d ?? _.valueDelimiterId ?? q : _.valueDelimiterId
|
|
2521
2535
|
};
|
|
2522
2536
|
}
|
|
2523
|
-
async function
|
|
2537
|
+
async function kt(e) {
|
|
2524
2538
|
let { dataFormatId: t, filePreview: n, parserId: r, parseTiming: i, toolConfigs: a } = e;
|
|
2525
|
-
if (!(t != null &&
|
|
2526
|
-
let o = await
|
|
2527
|
-
return await
|
|
2539
|
+
if (!(t != null && ft.has(t) && G(a, t).length > 0 && K(a, t, r).actionNames?.includes("buildStructureIndex") === !0)) return;
|
|
2540
|
+
let o = await X(a, t, r), s = new Blob([n.bytes]).stream(), c = n.decodedEncodingId ?? "utf-8";
|
|
2541
|
+
return await J(i, () => o.buildStructureIndex(s, {
|
|
2528
2542
|
abortSignal: new AbortController().signal,
|
|
2529
2543
|
dataFormatId: t,
|
|
2530
2544
|
encodingId: c,
|
|
@@ -2533,7 +2547,7 @@ async function Dt(e) {
|
|
|
2533
2547
|
onProgress: void 0
|
|
2534
2548
|
}));
|
|
2535
2549
|
}
|
|
2536
|
-
function
|
|
2550
|
+
function At(e) {
|
|
2537
2551
|
let t = 0;
|
|
2538
2552
|
return {
|
|
2539
2553
|
duration: () => t,
|
|
@@ -2543,7 +2557,7 @@ function Ot(e) {
|
|
|
2543
2557
|
}
|
|
2544
2558
|
};
|
|
2545
2559
|
}
|
|
2546
|
-
async function
|
|
2560
|
+
async function J(e, t) {
|
|
2547
2561
|
let n = performance.now();
|
|
2548
2562
|
try {
|
|
2549
2563
|
return await t();
|
|
@@ -2551,26 +2565,26 @@ async function Y(e, t) {
|
|
|
2551
2565
|
e.duration += performance.now() - n;
|
|
2552
2566
|
}
|
|
2553
2567
|
}
|
|
2554
|
-
async function
|
|
2555
|
-
let r =
|
|
2568
|
+
async function Y(e, t, n) {
|
|
2569
|
+
let r = K(e, t, n);
|
|
2556
2570
|
return {
|
|
2557
|
-
parser: await
|
|
2571
|
+
parser: await ut(e, r.id.slice(W.length)),
|
|
2558
2572
|
parserId: r.id
|
|
2559
2573
|
};
|
|
2560
2574
|
}
|
|
2561
|
-
async function
|
|
2562
|
-
let { parser: r, parserId: i } = await
|
|
2563
|
-
if (!("buildStructureIndex" in r)) throw new
|
|
2575
|
+
async function X(e, t, n) {
|
|
2576
|
+
let { parser: r, parserId: i } = await Y(e, t, n);
|
|
2577
|
+
if (!("buildStructureIndex" in r)) throw new I(`Tool '${i}' does not map the structure of '${t}' items.`, "dpuse-shared.component.module.connector.objectParsing.loadStructuredParser");
|
|
2564
2578
|
return r;
|
|
2565
2579
|
}
|
|
2566
2580
|
// src/component/module/connector/storeErrors.ts
|
|
2567
|
-
function
|
|
2568
|
-
return new
|
|
2581
|
+
function jt(e, t, n, r) {
|
|
2582
|
+
return new L(t, n, {
|
|
2569
2583
|
data: { storeErrorId: e },
|
|
2570
2584
|
...r
|
|
2571
2585
|
});
|
|
2572
2586
|
}
|
|
2573
|
-
function
|
|
2587
|
+
function Mt(e) {
|
|
2574
2588
|
let t = /* @__PURE__ */ new Set();
|
|
2575
2589
|
for (let n = e; n instanceof Error && !t.has(n); n = n.cause) {
|
|
2576
2590
|
t.add(n);
|
|
@@ -2579,28 +2593,28 @@ function jt(e) {
|
|
|
2579
2593
|
}
|
|
2580
2594
|
}
|
|
2581
2595
|
// src/component/module/connector/storePath.ts
|
|
2582
|
-
var
|
|
2583
|
-
function
|
|
2596
|
+
var Nt = /^[\w-]+$/u;
|
|
2597
|
+
function Pt(e) {
|
|
2584
2598
|
if (!e.startsWith("/")) return {
|
|
2585
2599
|
databaseName: void 0,
|
|
2586
2600
|
tableName: e
|
|
2587
2601
|
};
|
|
2588
2602
|
let [, t, n, ...r] = e.split("/");
|
|
2589
|
-
if (t == null || n == null || n === "" || r.length > 0 || !
|
|
2603
|
+
if (t == null || n == null || n === "" || r.length > 0 || !Nt.test(t)) throw Error(`Encountered invalid store path '${e}'.`);
|
|
2590
2604
|
return {
|
|
2591
2605
|
databaseName: t,
|
|
2592
2606
|
tableName: n
|
|
2593
2607
|
};
|
|
2594
2608
|
}
|
|
2595
2609
|
// src/component/module/connector/storeValues.ts
|
|
2596
|
-
function Pt(e) {
|
|
2597
|
-
return e.map((e) => Ft(e));
|
|
2598
|
-
}
|
|
2599
2610
|
function Ft(e) {
|
|
2611
|
+
return e.map((e) => It(e));
|
|
2612
|
+
}
|
|
2613
|
+
function It(e) {
|
|
2600
2614
|
return e == null ? null : e instanceof Date ? e.toISOString() : String(e);
|
|
2601
2615
|
}
|
|
2602
2616
|
// src/component/module/connector/webLock.ts
|
|
2603
|
-
async function
|
|
2617
|
+
async function Lt(e, t = {}) {
|
|
2604
2618
|
let n = Promise.withResolvers(), r = { isGranted: !1 }, i = navigator.locks.request(e, t.takeOver === !0 ? { steal: !0 } : { ifAvailable: !0 }, (e) => {
|
|
2605
2619
|
if (e == null) n.resolve(void 0);
|
|
2606
2620
|
else return r.isGranted = !0, new Promise((e) => {
|
|
@@ -2617,16 +2631,16 @@ async function It(e, t = {}) {
|
|
|
2617
2631
|
o(), await a;
|
|
2618
2632
|
};
|
|
2619
2633
|
}
|
|
2620
|
-
var
|
|
2634
|
+
var Rt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
2621
2635
|
format: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2622
2636
|
name: /* @__PURE__ */ w(),
|
|
2623
2637
|
title: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2624
2638
|
type: /* @__PURE__ */ x(/* @__PURE__ */ w())
|
|
2625
|
-
})) }),
|
|
2639
|
+
})) }), zt = /* @__PURE__ */ v({
|
|
2626
2640
|
delimiter: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2627
2641
|
header: /* @__PURE__ */ x(/* @__PURE__ */ g()),
|
|
2628
2642
|
headerRows: /* @__PURE__ */ x(/* @__PURE__ */ h(/* @__PURE__ */ b()))
|
|
2629
|
-
}),
|
|
2643
|
+
}), Bt = {
|
|
2630
2644
|
boolean: {
|
|
2631
2645
|
dataSubtypeId: void 0,
|
|
2632
2646
|
dataTypeId: "boolean"
|
|
@@ -2659,18 +2673,18 @@ var Lt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
|
2659
2673
|
dataSubtypeId: "integer",
|
|
2660
2674
|
dataTypeId: "numeric"
|
|
2661
2675
|
}
|
|
2662
|
-
},
|
|
2676
|
+
}, Vt = {
|
|
2663
2677
|
email: "email",
|
|
2664
2678
|
uri: "url",
|
|
2665
2679
|
uuid: "uuid"
|
|
2666
2680
|
};
|
|
2667
|
-
function
|
|
2668
|
-
let t = /* @__PURE__ */
|
|
2669
|
-
if (!t.success) throw new
|
|
2670
|
-
let n = /* @__PURE__ */
|
|
2671
|
-
if (!n.success) throw new
|
|
2681
|
+
function Ht(e) {
|
|
2682
|
+
let t = /* @__PURE__ */ O(Rt, e.schema);
|
|
2683
|
+
if (!t.success) throw new I("The table schema is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2684
|
+
let n = /* @__PURE__ */ O(zt, e.dialect ?? {});
|
|
2685
|
+
if (!n.success) throw new I("The table dialect is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2672
2686
|
let r = t.output.fields.map((e) => {
|
|
2673
|
-
let t =
|
|
2687
|
+
let t = Ut(e.type, e.format);
|
|
2674
2688
|
return {
|
|
2675
2689
|
name: e.name,
|
|
2676
2690
|
label: e.title,
|
|
@@ -2684,22 +2698,22 @@ function Vt(e) {
|
|
|
2684
2698
|
dataFormatId: "dtv",
|
|
2685
2699
|
encodingId: e.encoding?.toLowerCase(),
|
|
2686
2700
|
hasHeaders: a && o.length > 0,
|
|
2687
|
-
valueDelimiterId:
|
|
2701
|
+
valueDelimiterId: M.find(({ character: e }) => e === i)?.id
|
|
2688
2702
|
}
|
|
2689
2703
|
};
|
|
2690
2704
|
}
|
|
2691
|
-
function
|
|
2692
|
-
let n = e == null ? void 0 :
|
|
2705
|
+
function Ut(e, t) {
|
|
2706
|
+
let n = e == null ? void 0 : Bt[e];
|
|
2693
2707
|
return n == null ? {
|
|
2694
2708
|
dataSubtypeId: void 0,
|
|
2695
2709
|
dataTypeId: void 0
|
|
2696
2710
|
} : t == null || n.dataTypeId !== "string" ? n : {
|
|
2697
|
-
dataSubtypeId:
|
|
2711
|
+
dataSubtypeId: Vt[t] ?? "plain",
|
|
2698
2712
|
dataTypeId: "string"
|
|
2699
2713
|
};
|
|
2700
2714
|
}
|
|
2701
2715
|
// src/component/module/connector/index.ts
|
|
2702
|
-
var
|
|
2716
|
+
var Wt = [
|
|
2703
2717
|
{
|
|
2704
2718
|
id: "application",
|
|
2705
2719
|
label: {
|
|
@@ -2728,7 +2742,7 @@ var Ut = [
|
|
|
2728
2742
|
es: "Almacén de Archivos"
|
|
2729
2743
|
}
|
|
2730
2744
|
}
|
|
2731
|
-
],
|
|
2745
|
+
], Gt = [
|
|
2732
2746
|
{
|
|
2733
2747
|
id: "apiEndpoint",
|
|
2734
2748
|
label: {
|
|
@@ -2750,7 +2764,7 @@ var Ut = [
|
|
|
2750
2764
|
es: "Tabla"
|
|
2751
2765
|
}
|
|
2752
2766
|
}
|
|
2753
|
-
],
|
|
2767
|
+
], Kt = {
|
|
2754
2768
|
auditObjectContent: "Audit Object Content",
|
|
2755
2769
|
closeStore: "Close Store",
|
|
2756
2770
|
createObject: "Create Object",
|
|
@@ -2771,7 +2785,7 @@ var Ut = [
|
|
|
2771
2785
|
removeRecords: "Remove Records",
|
|
2772
2786
|
retrieveRecords: "Retrieve Records",
|
|
2773
2787
|
upsertRecords: "Upsert Records"
|
|
2774
|
-
},
|
|
2788
|
+
}, qt = [
|
|
2775
2789
|
{
|
|
2776
2790
|
id: "bidirectional",
|
|
2777
2791
|
label: {
|
|
@@ -2800,13 +2814,13 @@ var Ut = [
|
|
|
2800
2814
|
es: "Desconocido"
|
|
2801
2815
|
}
|
|
2802
2816
|
}
|
|
2803
|
-
],
|
|
2817
|
+
], Jt = /* @__PURE__ */ new Set([
|
|
2804
2818
|
"createObject",
|
|
2805
2819
|
"dropObject",
|
|
2806
2820
|
"loadObjectRecords",
|
|
2807
2821
|
"removeRecords",
|
|
2808
2822
|
"upsertRecords"
|
|
2809
|
-
]),
|
|
2823
|
+
]), Yt = /* @__PURE__ */ new Set([
|
|
2810
2824
|
"auditObjectContent",
|
|
2811
2825
|
"findObject",
|
|
2812
2826
|
"getInfo",
|
|
@@ -2820,13 +2834,13 @@ var Ut = [
|
|
|
2820
2834
|
"queryRecords",
|
|
2821
2835
|
"retrieveRecords"
|
|
2822
2836
|
]);
|
|
2823
|
-
function
|
|
2837
|
+
function Xt(e) {
|
|
2824
2838
|
let t = !1, n = !1;
|
|
2825
|
-
for (let r of e)
|
|
2839
|
+
for (let r of e) Yt.has(r) && (t = !0), Jt.has(r) && (n = !0);
|
|
2826
2840
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
2827
2841
|
}
|
|
2828
|
-
var
|
|
2829
|
-
let i =
|
|
2842
|
+
var Zt = (e, t = "en") => {
|
|
2843
|
+
let i = Wt.find((t) => t.id === e);
|
|
2830
2844
|
return i ? {
|
|
2831
2845
|
label: r(n(i.label), t) ?? i.id,
|
|
2832
2846
|
description: ""
|
|
@@ -2834,8 +2848,8 @@ var Xt = (e, t = "en") => {
|
|
|
2834
2848
|
label: e,
|
|
2835
2849
|
description: ""
|
|
2836
2850
|
};
|
|
2837
|
-
},
|
|
2838
|
-
let i =
|
|
2851
|
+
}, Qt = (e, t = "en") => {
|
|
2852
|
+
let i = Gt.find((t) => t.id === e);
|
|
2839
2853
|
return i ? {
|
|
2840
2854
|
label: r(n(i.label), t) ?? i.id,
|
|
2841
2855
|
description: ""
|
|
@@ -2843,8 +2857,8 @@ var Xt = (e, t = "en") => {
|
|
|
2843
2857
|
label: e,
|
|
2844
2858
|
description: ""
|
|
2845
2859
|
};
|
|
2846
|
-
},
|
|
2847
|
-
let i =
|
|
2860
|
+
}, $t = (e, t = "en") => {
|
|
2861
|
+
let i = qt.find((t) => t.id === e);
|
|
2848
2862
|
return i ? {
|
|
2849
2863
|
label: r(n(i.label), t) ?? i.id,
|
|
2850
2864
|
description: ""
|
|
@@ -2853,36 +2867,36 @@ var Xt = (e, t = "en") => {
|
|
|
2853
2867
|
description: ""
|
|
2854
2868
|
};
|
|
2855
2869
|
};
|
|
2856
|
-
function
|
|
2870
|
+
function en(e) {
|
|
2857
2871
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
2858
2872
|
n += "|:----|:-------:|\n";
|
|
2859
|
-
for (let e of Object.keys(
|
|
2873
|
+
for (let e of Object.keys(Kt)) n += `| ${Kt[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
2860
2874
|
return n;
|
|
2861
2875
|
}
|
|
2862
2876
|
// src/component/module/cookbook/cookbookConfig.schema.ts
|
|
2863
|
-
var
|
|
2864
|
-
...
|
|
2877
|
+
var tn = j(["list"]), nn = /* @__PURE__ */ C({
|
|
2878
|
+
...N,
|
|
2865
2879
|
typeId: /* @__PURE__ */ _("cookbook"),
|
|
2866
|
-
actionNames: /* @__PURE__ */ h(
|
|
2867
|
-
recipes: /* @__PURE__ */ h(
|
|
2880
|
+
actionNames: /* @__PURE__ */ h(tn),
|
|
2881
|
+
recipes: /* @__PURE__ */ h(ae)
|
|
2868
2882
|
});
|
|
2869
2883
|
// src/component/module/engine/index.ts
|
|
2870
|
-
function
|
|
2884
|
+
function rn(e) {
|
|
2871
2885
|
return e.signal ?? new AbortController().signal;
|
|
2872
2886
|
}
|
|
2873
2887
|
// src/component/module/presenter/presenterConfig.schema.ts
|
|
2874
|
-
var
|
|
2888
|
+
var an = j([
|
|
2875
2889
|
"list",
|
|
2876
2890
|
"render",
|
|
2877
2891
|
"setColorMode"
|
|
2878
|
-
]),
|
|
2879
|
-
...
|
|
2892
|
+
]), on = /* @__PURE__ */ C({
|
|
2893
|
+
...N,
|
|
2880
2894
|
typeId: /* @__PURE__ */ _("presenter"),
|
|
2881
|
-
actionNames: /* @__PURE__ */ h(
|
|
2882
|
-
presentations: /* @__PURE__ */ h(
|
|
2883
|
-
}),
|
|
2884
|
-
async function
|
|
2885
|
-
let i = e.id, a = `${
|
|
2895
|
+
actionNames: /* @__PURE__ */ h(an),
|
|
2896
|
+
presentations: /* @__PURE__ */ h(ae)
|
|
2897
|
+
}), sn = "https://engine-eu.dpuse.app/presenters";
|
|
2898
|
+
async function cn(e, t, n, r) {
|
|
2899
|
+
let i = e.id, a = `${sn}/${i.split("-").slice(2).join("-")}_v${e.version}/${i}.es.js`;
|
|
2886
2900
|
try {
|
|
2887
2901
|
return new (await (import(
|
|
2888
2902
|
/* @vite-ignore */
|
|
@@ -2894,14 +2908,14 @@ async function sn(e, t, n, r) {
|
|
|
2894
2908
|
url: a,
|
|
2895
2909
|
version: e.version
|
|
2896
2910
|
};
|
|
2897
|
-
throw new
|
|
2911
|
+
throw new I(`Failed to load presenter '${i}' v${e.version}.`, "dpuse-shared.component.module.presenter.loadPresenter", {
|
|
2898
2912
|
data: n,
|
|
2899
2913
|
cause: t
|
|
2900
2914
|
});
|
|
2901
2915
|
}
|
|
2902
2916
|
}
|
|
2903
2917
|
// src/locale/index.ts
|
|
2904
|
-
function
|
|
2918
|
+
function ln(e, t) {
|
|
2905
2919
|
return {
|
|
2906
2920
|
...e,
|
|
2907
2921
|
label: e.label[t] ?? e.id,
|
|
@@ -2909,7 +2923,7 @@ function cn(e, t) {
|
|
|
2909
2923
|
verb: e.verb?.[t] ?? void 0
|
|
2910
2924
|
};
|
|
2911
2925
|
}
|
|
2912
|
-
function
|
|
2926
|
+
function un(e, t, n = !1) {
|
|
2913
2927
|
let r = e.map((e) => ({
|
|
2914
2928
|
...e,
|
|
2915
2929
|
label: e.label[t] ?? e.id,
|
|
@@ -2918,7 +2932,7 @@ function ln(e, t, n = !1) {
|
|
|
2918
2932
|
}));
|
|
2919
2933
|
return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
|
|
2920
2934
|
}
|
|
2921
|
-
function
|
|
2935
|
+
function dn(e, t) {
|
|
2922
2936
|
return {
|
|
2923
2937
|
...e,
|
|
2924
2938
|
label: e.label[t] ?? e.id,
|
|
@@ -2926,7 +2940,7 @@ function un(e, t) {
|
|
|
2926
2940
|
};
|
|
2927
2941
|
}
|
|
2928
2942
|
// src/utilities/index.ts
|
|
2929
|
-
var
|
|
2943
|
+
var fn = /* @__PURE__ */ new Map([
|
|
2930
2944
|
["arrow", "application/vnd.apache.arrow.file"],
|
|
2931
2945
|
["avro", "application/vnd.apache.avro"],
|
|
2932
2946
|
["bin", "application/octet-stream"],
|
|
@@ -2953,14 +2967,14 @@ var dn = /* @__PURE__ */ new Map([
|
|
|
2953
2967
|
["minute", 6e4],
|
|
2954
2968
|
["second", 1e3],
|
|
2955
2969
|
["millisecond", 1]
|
|
2956
|
-
],
|
|
2970
|
+
], pn = [
|
|
2957
2971
|
["byte", 1],
|
|
2958
2972
|
["KiB", 1024],
|
|
2959
2973
|
["MiB", 1048576],
|
|
2960
2974
|
["GiB", 1073741824],
|
|
2961
2975
|
["TiB", 1099511627776]
|
|
2962
|
-
],
|
|
2963
|
-
function
|
|
2976
|
+
], mn = /* @__PURE__ */ new Map(), hn = /* @__PURE__ */ new Map();
|
|
2977
|
+
function gn(e, t = 2, n = t, r = Z) {
|
|
2964
2978
|
return e == null ? "" : $(r, {
|
|
2965
2979
|
localeMatcher: "best fit",
|
|
2966
2980
|
maximumFractionDigits: t,
|
|
@@ -2970,18 +2984,18 @@ function hn(e, t = 2, n = t, r = Z) {
|
|
|
2970
2984
|
useGrouping: !0
|
|
2971
2985
|
}).format(e);
|
|
2972
2986
|
}
|
|
2973
|
-
function
|
|
2974
|
-
return
|
|
2987
|
+
function _n(e, t = Z) {
|
|
2988
|
+
return gn(e, 0, 0, t);
|
|
2975
2989
|
}
|
|
2976
|
-
function
|
|
2990
|
+
function vn(e, t = 1, n = Z) {
|
|
2977
2991
|
return e == null || !Number.isFinite(e) ? "" : $(n, {
|
|
2978
2992
|
maximumFractionDigits: t,
|
|
2979
2993
|
notation: "compact"
|
|
2980
2994
|
}).format(e);
|
|
2981
2995
|
}
|
|
2982
|
-
function
|
|
2996
|
+
function yn(e, t = 1, n = Z) {
|
|
2983
2997
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2984
|
-
let [r, i] =
|
|
2998
|
+
let [r, i] = pn.find(([, n]) => On(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["TiB", 1099511627776];
|
|
2985
2999
|
return i === 1 ? $(n, {
|
|
2986
3000
|
maximumFractionDigits: 0,
|
|
2987
3001
|
style: "unit",
|
|
@@ -2989,7 +3003,7 @@ function vn(e, t = 1, n = Z) {
|
|
|
2989
3003
|
unitDisplay: "long"
|
|
2990
3004
|
}).format(e) : `${$(n, { maximumFractionDigits: t }).format(e / i)} ${r}`;
|
|
2991
3005
|
}
|
|
2992
|
-
function
|
|
3006
|
+
function bn(e, t = "millisecond", n = Z) {
|
|
2993
3007
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2994
3008
|
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 = [];
|
|
2995
3009
|
for (let [t, i] of s) {
|
|
@@ -3003,25 +3017,25 @@ function yn(e, t = "millisecond", n = Z) {
|
|
|
3003
3017
|
unitDisplay: "short"
|
|
3004
3018
|
}).format(o));
|
|
3005
3019
|
}
|
|
3006
|
-
return
|
|
3020
|
+
return Dn(n).format(c);
|
|
3007
3021
|
}
|
|
3008
|
-
function
|
|
3022
|
+
function xn(e) {
|
|
3009
3023
|
if (!e) return;
|
|
3010
|
-
let t =
|
|
3024
|
+
let t = En(e);
|
|
3011
3025
|
return t === void 0 ? e : e.slice(0, t);
|
|
3012
3026
|
}
|
|
3013
|
-
function
|
|
3027
|
+
function Sn(e) {
|
|
3014
3028
|
if (!e) return;
|
|
3015
|
-
let t =
|
|
3029
|
+
let t = En(e);
|
|
3016
3030
|
return t === void 0 ? void 0 : e.slice(t + 1);
|
|
3017
3031
|
}
|
|
3018
|
-
function Sn(e) {
|
|
3019
|
-
return e != null && dn.has(e.toLowerCase());
|
|
3020
|
-
}
|
|
3021
3032
|
function Cn(e) {
|
|
3022
|
-
return
|
|
3033
|
+
return e != null && fn.has(e.toLowerCase());
|
|
3023
3034
|
}
|
|
3024
3035
|
function wn(e) {
|
|
3036
|
+
return (e == null ? void 0 : fn.get(e.toLowerCase())) ?? "application/octet-stream";
|
|
3037
|
+
}
|
|
3038
|
+
function Tn(e) {
|
|
3025
3039
|
switch (e) {
|
|
3026
3040
|
case "Edm.Boolean": return "boolean";
|
|
3027
3041
|
case "Edm.Byte":
|
|
@@ -3042,23 +3056,23 @@ function wn(e) {
|
|
|
3042
3056
|
default: return "unknown";
|
|
3043
3057
|
}
|
|
3044
3058
|
}
|
|
3045
|
-
function
|
|
3059
|
+
function En(e) {
|
|
3046
3060
|
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
3047
3061
|
return n > t && n < e.length - 1 ? n : void 0;
|
|
3048
3062
|
}
|
|
3049
|
-
function
|
|
3050
|
-
let t =
|
|
3063
|
+
function Dn(e) {
|
|
3064
|
+
let t = mn.get(e);
|
|
3051
3065
|
return t || (t = new Intl.ListFormat(e, {
|
|
3052
3066
|
style: "narrow",
|
|
3053
3067
|
type: "unit"
|
|
3054
|
-
}),
|
|
3068
|
+
}), mn.set(e, t)), t;
|
|
3055
3069
|
}
|
|
3056
3070
|
function $(e, t) {
|
|
3057
|
-
let n = `${e}|${JSON.stringify(t)}`, r =
|
|
3058
|
-
return r || (r = new Intl.NumberFormat(e, t),
|
|
3071
|
+
let n = `${e}|${JSON.stringify(t)}`, r = hn.get(n);
|
|
3072
|
+
return r || (r = new Intl.NumberFormat(e, t), hn.set(n, r)), r;
|
|
3059
3073
|
}
|
|
3060
|
-
function
|
|
3074
|
+
function On(e, t) {
|
|
3061
3075
|
let n = 10 ** t;
|
|
3062
3076
|
return Math.round(e * n) / n;
|
|
3063
3077
|
}
|
|
3064
|
-
export {
|
|
3078
|
+
export { De as APIError, I as AppError, L as ConnectorError, ue as DATA_FORMAT_CONFIGS, de as DATA_TYPE_CONFIGS, fe as DECIMAL_SEPARATOR_IDS, e as DEFAULT_LOCALE_ID, Ye as ENCODING_GROUP_CONFIG_MAP, H as ENCODING_TYPE_CONFIG_MAP, Oe as EngineError, ke as FetchError, t as SUPPORTED_LANGUAGES, W as TOOL_NAME_PREFIX, M as VALUE_DELIMITER_CONFIGS, Lt as acquireWebLock, yt as auditObjectContentWithParser, Ae as buildFetchError, _t as buildPreviewObjectResult, se as componentInstanceConfigSchema, je as concatenateSerialisedErrorMessages, xe as connectorConfigSchema, Zt as constructConnectorCategoryConfig, Qt as constructConnectorItemTypeConfig, $t as constructConnectorUsageConfig, jt as constructStoreError, Tn as convertODataTypeIdToUsageTypeId, Ft as convertStoreRecordToParsedRecord, It as convertStoreValueToText, nn as cookbookConfigSchema, n as createLabelMap, Xt as determineConnectorUsageId, Sn as extractExtensionFromPath, xn as extractPathWithoutExtension, He as fetchObjectContentStream, Mt as findStoreErrorId, gn as formatNumberAsDecimalNumber, bn as formatNumberAsDuration, vn as formatNumberAsSize, yn as formatNumberAsStorageSize, _n as formatNumberAsWholeNumber, le as getComponentStatus, en as getConnectorActionsTable, Ze as getEncodingTypeConfigs, pe as getValueDelimiterCharacter, Cn as hasMimeTypeForExtension, Me as ignoreErrors, bt as indexObjectStructureWithParser, Xe as isEncodingTypeId, xt as listObjectStructureEntriesWithParser, G as listParserToolConfigs, cn as loadPresenter, ut as loadTool, ln as localiseConfig, un as localiseConfigs, dn as localiseReference, wn as lookupMimeTypeForExtension, R as normalizeToError, nt as parseDelimitedPreview, on as presenterConfigSchema, Ht as readTableSchema, U as resolveDecoderId, r as resolveLabel, K as resolveParserToolConfig, rn as resolveRequestSignal, Pt as resolveStorePath, vt as retrieveRecordsWithParser, Ne as serialiseError, tt as toolConfigSchema, Pe as unserialiseError };
|