@dpuse/dpuse-shared 1.0.222 → 1.0.224
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
|
@@ -880,24 +880,24 @@ var he = A([
|
|
|
880
880
|
super(e, t, n, r), this.name = "FetchError";
|
|
881
881
|
}
|
|
882
882
|
};
|
|
883
|
-
async function
|
|
883
|
+
async function R(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: ${z(e).message}>`;
|
|
889
889
|
}
|
|
890
|
-
return new L(i, n, { body:
|
|
890
|
+
return new L(i, n, { body: Le(a) });
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function Ae(e) {
|
|
893
893
|
return e.map((e) => e.message).join(" ");
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function je(e) {
|
|
896
896
|
try {
|
|
897
897
|
e();
|
|
898
898
|
} catch {}
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function z(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 R(e) {
|
|
|
909
909
|
}
|
|
910
910
|
return /* @__PURE__ */ Error("Unknown error");
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
let t = /* @__PURE__ */ new Set(), n = [], r =
|
|
912
|
+
function Me(e) {
|
|
913
|
+
let t = /* @__PURE__ */ new Set(), n = [], r = z(e);
|
|
914
914
|
for (; r != null && !t.has(r);) {
|
|
915
915
|
t.add(r);
|
|
916
|
-
let [e, i] =
|
|
916
|
+
let [e, i] = ze(r), a = Ie(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 Ne(e) {
|
|
922
922
|
let t;
|
|
923
923
|
for (let n of e.toReversed()) {
|
|
924
|
-
let e =
|
|
924
|
+
let e = Fe(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 Pe(e) {
|
|
930
930
|
let t;
|
|
931
931
|
try {
|
|
932
932
|
t = JSON.stringify(e);
|
|
@@ -935,7 +935,7 @@ function Fe(e) {
|
|
|
935
935
|
}
|
|
936
936
|
return t === "" && (t = "Unknown error"), t;
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function Fe(e, t) {
|
|
939
939
|
switch (e.name) {
|
|
940
940
|
case "APIError": return new Oe(e.message, e.locator, e.data, { cause: t });
|
|
941
941
|
case "AppError": return new F(e.message, e.locator, e.data, { cause: t });
|
|
@@ -950,32 +950,32 @@ function Ie(e, t) {
|
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function Ie(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 : V(t, /* @__PURE__ */ new WeakSet(), 0),
|
|
958
|
+
message: B(n),
|
|
959
|
+
stack: r === void 0 ? void 0 : B(r)
|
|
960
960
|
};
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function B(e) {
|
|
963
963
|
let t = e;
|
|
964
964
|
for (let [e, n] of De) t = t.replaceAll(e, (e, ...t) => n(e, ...t));
|
|
965
965
|
return t;
|
|
966
966
|
}
|
|
967
|
-
function
|
|
968
|
-
return typeof e == "string" ?
|
|
967
|
+
function V(e, t, n) {
|
|
968
|
+
return typeof e == "string" ? B(e) : typeof e != "object" || !e ? e : n >= Te ? N : t.has(e) ? "[Circular]" : (t.add(e), Array.isArray(e) ? e.map((e) => V(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, r != null && Ee.test(e) ? N : V(r, t, n + 1)])));
|
|
969
969
|
}
|
|
970
|
-
function
|
|
970
|
+
function Le(e) {
|
|
971
971
|
if (e != null && e !== "") return e.length > we ? `${e.slice(0, we)}... [truncated]` : e;
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function Re(e) {
|
|
974
974
|
return e instanceof P || Ce.has(e.name) && typeof e.locator == "string";
|
|
975
975
|
}
|
|
976
|
-
function
|
|
977
|
-
let t = e.cause == null ? null :
|
|
978
|
-
if (
|
|
976
|
+
function ze(e) {
|
|
977
|
+
let t = e.cause == null ? null : z(e.cause);
|
|
978
|
+
if (Re(e)) return [{
|
|
979
979
|
data: e.data,
|
|
980
980
|
locator: e.locator,
|
|
981
981
|
message: e.message,
|
|
@@ -992,13 +992,58 @@ function Be(e) {
|
|
|
992
992
|
}, t] : [{
|
|
993
993
|
data: n,
|
|
994
994
|
locator: "",
|
|
995
|
-
message:
|
|
995
|
+
message: Pe(e),
|
|
996
996
|
name: "Error",
|
|
997
997
|
stack: void 0
|
|
998
998
|
}, null];
|
|
999
999
|
}
|
|
1000
|
+
// src/component/module/connector/objectFetching.ts
|
|
1001
|
+
var Be = 33554432, H = 416;
|
|
1002
|
+
async function Ve(e, t) {
|
|
1003
|
+
if (He()) {
|
|
1004
|
+
let n = await fetch(e, {
|
|
1005
|
+
headers: t.headers ?? {},
|
|
1006
|
+
signal: t.signal
|
|
1007
|
+
});
|
|
1008
|
+
if (!n.ok) throw await R(n, `Failed to fetch '${t.path}' file.`, t.locator);
|
|
1009
|
+
return Ue(n, t);
|
|
1010
|
+
}
|
|
1011
|
+
let n = await We(e, 0, t);
|
|
1012
|
+
if (n.status !== 206 && n.status !== H) return Ue(n, t);
|
|
1013
|
+
let r = n, i = 0;
|
|
1014
|
+
return new ReadableStream({ pull: async (n) => {
|
|
1015
|
+
let a = r ?? await We(e, i, t);
|
|
1016
|
+
if (r = void 0, a.status === H) {
|
|
1017
|
+
n.close();
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
if (a.status !== 206) throw new I(`Failed to fetch part of '${t.path}' file.`, `${t.locator}.range`);
|
|
1021
|
+
let o = new Uint8Array(await a.arrayBuffer());
|
|
1022
|
+
i += o.length, o.length > 0 && n.enqueue(o), o.length < Be && n.close();
|
|
1023
|
+
} }, { highWaterMark: 0 });
|
|
1024
|
+
}
|
|
1025
|
+
function He() {
|
|
1026
|
+
let { userAgentData: e } = globalThis.navigator;
|
|
1027
|
+
return e?.brands.some(({ brand: e }) => e === "Chromium") === !0;
|
|
1028
|
+
}
|
|
1029
|
+
function Ue(e, t) {
|
|
1030
|
+
if (e.body == null) throw new I("Readable streams are not supported in this runtime.", `${t.locator}.unsupported`);
|
|
1031
|
+
return e.body;
|
|
1032
|
+
}
|
|
1033
|
+
async function We(e, t, n) {
|
|
1034
|
+
let r = `bytes=${String(t)}-${String(t + Be - 1)}`, i = await fetch(e, {
|
|
1035
|
+
cache: "no-store",
|
|
1036
|
+
headers: {
|
|
1037
|
+
...n.headers,
|
|
1038
|
+
Range: r
|
|
1039
|
+
},
|
|
1040
|
+
signal: n.signal
|
|
1041
|
+
});
|
|
1042
|
+
if (!i.ok && i.status !== H) throw await R(i, `Failed to fetch '${n.path}' file.`, n.locator);
|
|
1043
|
+
return i;
|
|
1044
|
+
}
|
|
1000
1045
|
// src/encoding/index.ts
|
|
1001
|
-
var
|
|
1046
|
+
var Ge = {
|
|
1002
1047
|
arabic: {
|
|
1003
1048
|
id: "arabic",
|
|
1004
1049
|
label: {
|
|
@@ -1153,7 +1198,7 @@ var Ve = {
|
|
|
1153
1198
|
es: "Occidental"
|
|
1154
1199
|
}
|
|
1155
1200
|
}
|
|
1156
|
-
},
|
|
1201
|
+
}, Ke = {
|
|
1157
1202
|
"armscii-8": {
|
|
1158
1203
|
id: "armscii-8",
|
|
1159
1204
|
groupId: "armenian",
|
|
@@ -1945,16 +1990,16 @@ var Ve = {
|
|
|
1945
1990
|
textDecoderId: "windows-1257",
|
|
1946
1991
|
iconvLiteDecoderId: "windows1257"
|
|
1947
1992
|
}
|
|
1948
|
-
},
|
|
1949
|
-
function
|
|
1950
|
-
return Object.hasOwn(
|
|
1993
|
+
}, qe = Ge, U = Ke;
|
|
1994
|
+
function Je(e) {
|
|
1995
|
+
return Object.hasOwn(U, e);
|
|
1951
1996
|
}
|
|
1952
|
-
function
|
|
1953
|
-
return
|
|
1997
|
+
function Ye(e) {
|
|
1998
|
+
return Je(e) ? U[e].textDecoderId ?? e : e;
|
|
1954
1999
|
}
|
|
1955
|
-
function
|
|
1956
|
-
return Array.from(Object.values(
|
|
1957
|
-
let o = t == null ? "" :
|
|
2000
|
+
function Xe(e = "en") {
|
|
2001
|
+
return Array.from(Object.values(U), ({ groupId: t, iconvLiteDecoderId: n, id: r, isDetectable: i, textDecoderId: a }) => {
|
|
2002
|
+
let o = t == null ? "" : Ze(t, e);
|
|
1958
2003
|
return {
|
|
1959
2004
|
id: r,
|
|
1960
2005
|
groupLabel: o,
|
|
@@ -1966,11 +2011,11 @@ function Ke(e = "en") {
|
|
|
1966
2011
|
};
|
|
1967
2012
|
}).toSorted((t, n) => t.groupLabel.localeCompare(n.groupLabel, e) || t.id.localeCompare(n.id, e, { numeric: !0 }));
|
|
1968
2013
|
}
|
|
1969
|
-
function
|
|
1970
|
-
let n =
|
|
2014
|
+
function Ze(e, t) {
|
|
2015
|
+
let n = qe[e].label;
|
|
1971
2016
|
return n[t] ?? n.en ?? e;
|
|
1972
2017
|
}
|
|
1973
|
-
var
|
|
2018
|
+
var Qe = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ D(/* @__PURE__ */ h(A([
|
|
1974
2019
|
"arrow",
|
|
1975
2020
|
"avro",
|
|
1976
2021
|
"dtv",
|
|
@@ -1983,15 +2028,15 @@ var Je = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ D(/* @__PURE__ */ h(
|
|
|
1983
2028
|
"sqlite",
|
|
1984
2029
|
"xlsx",
|
|
1985
2030
|
"xml"
|
|
1986
|
-
])), /* @__PURE__ */ f(1)) }),
|
|
2031
|
+
])), /* @__PURE__ */ f(1)) }), $e = /* @__PURE__ */ h(/* @__PURE__ */ w()), et = /* @__PURE__ */ C({
|
|
1987
2032
|
...M,
|
|
1988
2033
|
typeId: /* @__PURE__ */ _("tool"),
|
|
1989
|
-
actionNames: /* @__PURE__ */ x(
|
|
1990
|
-
parser: /* @__PURE__ */ x(
|
|
2034
|
+
actionNames: /* @__PURE__ */ x($e),
|
|
2035
|
+
parser: /* @__PURE__ */ x(Qe)
|
|
1991
2036
|
});
|
|
1992
2037
|
// src/component/module/tool/delimitedText.ts
|
|
1993
|
-
async function
|
|
1994
|
-
let r =
|
|
2038
|
+
async function tt(e, t, n) {
|
|
2039
|
+
let r = nt(e), { issues: i, parsedRecords: a, valueDelimiterId: o } = await rt(e, t.valueDelimiterIds, t.isComplete, n);
|
|
1995
2040
|
return {
|
|
1996
2041
|
issues: i,
|
|
1997
2042
|
parsedRecords: a,
|
|
@@ -1999,16 +2044,16 @@ async function Ze(e, t, n) {
|
|
|
1999
2044
|
valueDelimiterId: o
|
|
2000
2045
|
};
|
|
2001
2046
|
}
|
|
2002
|
-
function
|
|
2047
|
+
function nt(e) {
|
|
2003
2048
|
let t = (e.match(/\r\n/g) ?? []).length, n = (e.match(/(?<!\r)\n/g) ?? []).length, r = (e.match(/\r(?!\n)/g) ?? []).length;
|
|
2004
2049
|
return t >= n && t >= r ? "\r\n" : n >= t && n >= r ? "\n" : r >= t && r >= n ? "\r" : "\n";
|
|
2005
2050
|
}
|
|
2006
|
-
async function
|
|
2051
|
+
async function rt(e, t, n, r) {
|
|
2007
2052
|
let i, a, o, s = [], c, l = !1;
|
|
2008
2053
|
for (let u of t) {
|
|
2009
2054
|
let { issues: t, records: d } = await r(e, u, n);
|
|
2010
2055
|
if (t.length > 0) {
|
|
2011
|
-
c =
|
|
2056
|
+
c = it(c, {
|
|
2012
2057
|
delimiter: u,
|
|
2013
2058
|
issues: t,
|
|
2014
2059
|
records: d
|
|
@@ -2016,7 +2061,7 @@ async function $e(e, t, n, r) {
|
|
|
2016
2061
|
continue;
|
|
2017
2062
|
}
|
|
2018
2063
|
if (l = !0, d.length === 0) continue;
|
|
2019
|
-
let { averageValueCount: f, sumOfValueCountDiffs: p } =
|
|
2064
|
+
let { averageValueCount: f, sumOfValueCountDiffs: p } = at(d);
|
|
2020
2065
|
(a === void 0 || a <= 1 || p <= (o ?? 0)) && (a === void 0 || f > a) && (i = u, a = f, o = p, s = d);
|
|
2021
2066
|
}
|
|
2022
2067
|
if (!l && c != null) {
|
|
@@ -2024,19 +2069,19 @@ async function $e(e, t, n, r) {
|
|
|
2024
2069
|
return {
|
|
2025
2070
|
issues: t,
|
|
2026
2071
|
parsedRecords: n,
|
|
2027
|
-
valueDelimiterId:
|
|
2072
|
+
valueDelimiterId: ot(n) ? e : void 0
|
|
2028
2073
|
};
|
|
2029
2074
|
}
|
|
2030
2075
|
return {
|
|
2031
2076
|
issues: [],
|
|
2032
2077
|
parsedRecords: s,
|
|
2033
|
-
valueDelimiterId: i != null &&
|
|
2078
|
+
valueDelimiterId: i != null && ot(s) ? i : void 0
|
|
2034
2079
|
};
|
|
2035
2080
|
}
|
|
2036
|
-
function
|
|
2081
|
+
function it(e, t) {
|
|
2037
2082
|
return e == null || t.issues.length < e.issues.length ? t : e;
|
|
2038
2083
|
}
|
|
2039
|
-
function
|
|
2084
|
+
function at(e) {
|
|
2040
2085
|
let t = 0, n = 0, r;
|
|
2041
2086
|
for (let i of e) r != null && (n += Math.abs(i.length - r)), r = i.length, t += i.length;
|
|
2042
2087
|
return {
|
|
@@ -2044,19 +2089,19 @@ function tt(e) {
|
|
|
2044
2089
|
sumOfValueCountDiffs: n
|
|
2045
2090
|
};
|
|
2046
2091
|
}
|
|
2047
|
-
function
|
|
2092
|
+
function ot(e) {
|
|
2048
2093
|
let t = /* @__PURE__ */ new Map();
|
|
2049
2094
|
for (let n of e) t.set(n.length, (t.get(n.length) ?? 0) + 1);
|
|
2050
2095
|
let [n = 0, r = 0] = [...t].toSorted((e, t) => t[1] - e[1])[0] ?? [];
|
|
2051
2096
|
return n > 1 && r * 2 > e.length;
|
|
2052
2097
|
}
|
|
2053
2098
|
// src/component/module/tool/index.ts
|
|
2054
|
-
var
|
|
2055
|
-
function
|
|
2099
|
+
var st = "https://engine-eu.dpuse.app/tools", ct = { dtv: "dpuse-tool-rust-csv-core-parser" }, W = "dpuse-tool-";
|
|
2100
|
+
function G(e, t) {
|
|
2056
2101
|
return e.filter((e) => e.parser?.dataFormatIds.some((e) => e === t) === !0).toSorted((e, t) => e.id.localeCompare(t.id, "en"));
|
|
2057
2102
|
}
|
|
2058
|
-
function
|
|
2059
|
-
let r =
|
|
2103
|
+
function K(e, t, n) {
|
|
2104
|
+
let r = G(e, t), [i] = r;
|
|
2060
2105
|
if (i === void 0) {
|
|
2061
2106
|
let n = {
|
|
2062
2107
|
availableToolIds: e.map((e) => e.id),
|
|
@@ -2064,11 +2109,11 @@ function W(e, t, n) {
|
|
|
2064
2109
|
};
|
|
2065
2110
|
throw new F(`No tool reads the '${t}' data format.`, "dpuse-shared.component.module.tool.resolveParserToolConfig", n);
|
|
2066
2111
|
}
|
|
2067
|
-
let a =
|
|
2112
|
+
let a = ct[t];
|
|
2068
2113
|
return r.find((e) => e.id === n) ?? r.find((e) => e.id === a) ?? i;
|
|
2069
2114
|
}
|
|
2070
|
-
async function
|
|
2071
|
-
let n = `${
|
|
2115
|
+
async function lt(e, t) {
|
|
2116
|
+
let n = `${W}${t}`, r = e.find((e) => e.id === n);
|
|
2072
2117
|
if (!r) {
|
|
2073
2118
|
let r = {
|
|
2074
2119
|
availableToolIds: e.map((e) => e.id),
|
|
@@ -2076,7 +2121,7 @@ async function at(e, t) {
|
|
|
2076
2121
|
};
|
|
2077
2122
|
throw new F(`Tool '${t}' not found.`, "dpuse-shared.component.module.tool.loadTool", r);
|
|
2078
2123
|
}
|
|
2079
|
-
let i = `${
|
|
2124
|
+
let i = `${st}/${t}_v${r.version}/${n}.es.js`;
|
|
2080
2125
|
try {
|
|
2081
2126
|
return new (await (import(
|
|
2082
2127
|
/* @vite-ignore */
|
|
@@ -2092,8 +2137,8 @@ async function at(e, t) {
|
|
|
2092
2137
|
}
|
|
2093
2138
|
}
|
|
2094
2139
|
// src/component/module/connector/objectParsing.ts
|
|
2095
|
-
var
|
|
2096
|
-
async function
|
|
2140
|
+
var ut = "\n", q = ",", J = new Set(de.filter(({ isStructured: e }) => e).map(({ id: e }) => e)), dt = 13, Y = 10, ft = 34, pt = 1048576;
|
|
2141
|
+
async function mt(e) {
|
|
2097
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 = {
|
|
2098
2143
|
decodedEncodingId: i.decodedEncodingId,
|
|
2099
2144
|
replacementCharacterCount: i.replacementCharacterCount
|
|
@@ -2103,7 +2148,7 @@ async function lt(e) {
|
|
|
2103
2148
|
encodingSourceId: r?.encodingId == null ? i.encodingSourceId : void 0
|
|
2104
2149
|
};
|
|
2105
2150
|
if (f === 0) return {
|
|
2106
|
-
contentAuditConfig:
|
|
2151
|
+
contentAuditConfig: bt({
|
|
2107
2152
|
asAt: t,
|
|
2108
2153
|
columns: [],
|
|
2109
2154
|
isComplete: !0,
|
|
@@ -2127,10 +2172,10 @@ async function lt(e) {
|
|
|
2127
2172
|
hasHeaders: !1,
|
|
2128
2173
|
parsedRecords: [],
|
|
2129
2174
|
parserId: void 0,
|
|
2130
|
-
recordDelimiterId:
|
|
2175
|
+
recordDelimiterId: ut,
|
|
2131
2176
|
size: 0,
|
|
2132
2177
|
text: void 0,
|
|
2133
|
-
valueDelimiterId:
|
|
2178
|
+
valueDelimiterId: q
|
|
2134
2179
|
},
|
|
2135
2180
|
readingConfig: {
|
|
2136
2181
|
dataFormatId: "dtv",
|
|
@@ -2140,17 +2185,17 @@ async function lt(e) {
|
|
|
2140
2185
|
hasHeaders: !1,
|
|
2141
2186
|
isDeclared: d,
|
|
2142
2187
|
parserId: void 0,
|
|
2143
|
-
recordDelimiterId:
|
|
2144
|
-
valueDelimiterId:
|
|
2188
|
+
recordDelimiterId: ut,
|
|
2189
|
+
valueDelimiterId: q
|
|
2145
2190
|
},
|
|
2146
2191
|
encodingCandidates: m
|
|
2147
2192
|
};
|
|
2148
|
-
let g = r?.dataFormatId ?? i.dataFormatId, _ = r?.valueDelimiterId, v = await
|
|
2193
|
+
let g = r?.dataFormatId ?? i.dataFormatId, _ = r?.valueDelimiterId, v = await Et({
|
|
2149
2194
|
dataFormatId: g,
|
|
2150
2195
|
filePreview: i,
|
|
2151
2196
|
parserId: void 0,
|
|
2152
2197
|
toolConfigs: c
|
|
2153
|
-
}), y = await
|
|
2198
|
+
}), y = await Tt({
|
|
2154
2199
|
dataFormatId: g,
|
|
2155
2200
|
isComplete: l,
|
|
2156
2201
|
parserId: void 0,
|
|
@@ -2159,12 +2204,12 @@ async function lt(e) {
|
|
|
2159
2204
|
text: u,
|
|
2160
2205
|
toolConfigs: c,
|
|
2161
2206
|
valueDelimiterId: _
|
|
2162
|
-
}), b = o?.dataFormatId ?? g, x = o?.dataFormatId != null || o?.parserId != null, S = x || o?.valueDelimiterId != null || o?.structurePath != null, C = x ? await
|
|
2207
|
+
}), b = o?.dataFormatId ?? g, x = o?.dataFormatId != null || o?.parserId != null, S = x || o?.valueDelimiterId != null || o?.structurePath != null, C = x ? await Et({
|
|
2163
2208
|
dataFormatId: b,
|
|
2164
2209
|
filePreview: i,
|
|
2165
2210
|
parserId: o.parserId,
|
|
2166
2211
|
toolConfigs: c
|
|
2167
|
-
}) : v, w = S ? await
|
|
2212
|
+
}) : v, w = S ? await Tt({
|
|
2168
2213
|
dataFormatId: b,
|
|
2169
2214
|
isComplete: l,
|
|
2170
2215
|
parserId: o.parserId,
|
|
@@ -2175,7 +2220,7 @@ async function lt(e) {
|
|
|
2175
2220
|
valueDelimiterId: _ ?? o.valueDelimiterId
|
|
2176
2221
|
}) : y, T = w?.parseTextResult.parsedRecords ?? [], E = w?.parseTextResult.hasHeaders ?? r?.hasHeaders, D = w == null ? void 0 : a(T, E, n), O = S && y != null ? a(y.parseTextResult.parsedRecords, y.parseTextResult.hasHeaders ?? r?.hasHeaders, n) : D;
|
|
2177
2222
|
return {
|
|
2178
|
-
contentAuditConfig:
|
|
2223
|
+
contentAuditConfig: bt({
|
|
2179
2224
|
asAt: t,
|
|
2180
2225
|
columns: D?.columnConfigs ?? [],
|
|
2181
2226
|
isComplete: l,
|
|
@@ -2212,8 +2257,8 @@ async function lt(e) {
|
|
|
2212
2257
|
structureIndex: C
|
|
2213
2258
|
};
|
|
2214
2259
|
}
|
|
2215
|
-
async function*
|
|
2216
|
-
let { options: t, signal: n, stream: r, toolConfigs: i } = e, { encodingId: a, valueDelimiterId: o } =
|
|
2260
|
+
async function* ht(e) {
|
|
2261
|
+
let { options: t, signal: n, stream: r, toolConfigs: i } = e, { encodingId: a, valueDelimiterId: o } = yt(t), { parser: s } = await X(i, t.dataFormatId, t.parserId), { recordCount: c } = yield* s.parseStream(r, {
|
|
2217
2262
|
abortSignal: n,
|
|
2218
2263
|
chunkSize: t.chunkSize,
|
|
2219
2264
|
dataFormatId: t.dataFormatId,
|
|
@@ -2223,8 +2268,8 @@ async function* ut(e) {
|
|
|
2223
2268
|
});
|
|
2224
2269
|
return { recordCount: c };
|
|
2225
2270
|
}
|
|
2226
|
-
async function
|
|
2227
|
-
let { constructColumnAuditor: t, declaredColumnConfigs: n, onProgress: r, options: i, signal: a, stream: o, toolConfigs: s } = e, { encodingId: c, valueDelimiterId: l } =
|
|
2271
|
+
async function gt(e) {
|
|
2272
|
+
let { constructColumnAuditor: t, declaredColumnConfigs: n, onProgress: r, options: i, signal: a, stream: o, toolConfigs: s } = e, { encodingId: c, valueDelimiterId: l } = yt(i), u = Date.now(), d = performance.now(), f = t(i.hasHeaders, n), { parser: p } = await X(s, i.dataFormatId, i.parserId), m = wt(o), h = J.has(i.dataFormatId), g = h ? Ct(m.stream) : xt(m.stream, {
|
|
2228
2273
|
byteLimit: i.byteLimit,
|
|
2229
2274
|
encodingId: c,
|
|
2230
2275
|
stopSignal: i.stopSignal
|
|
@@ -2264,8 +2309,8 @@ async function dt(e) {
|
|
|
2264
2309
|
hasHeaders: x
|
|
2265
2310
|
};
|
|
2266
2311
|
}
|
|
2267
|
-
async function
|
|
2268
|
-
let { onProgress: t, options: n, signal: r, stream: i, toolConfigs: a } = e, o = await
|
|
2312
|
+
async function _t(e) {
|
|
2313
|
+
let { onProgress: t, options: n, signal: r, stream: i, toolConfigs: a } = e, o = await Dt(a, n.dataFormatId, n.parserId), s = n.encodingId ?? "utf-8";
|
|
2269
2314
|
return await o.buildStructureIndex(i, {
|
|
2270
2315
|
abortSignal: r,
|
|
2271
2316
|
dataFormatId: n.dataFormatId,
|
|
@@ -2275,9 +2320,9 @@ async function ft(e) {
|
|
|
2275
2320
|
onProgress: t
|
|
2276
2321
|
});
|
|
2277
2322
|
}
|
|
2278
|
-
async function
|
|
2323
|
+
async function vt(e) {
|
|
2279
2324
|
let { options: t, signal: n, stream: r, toolConfigs: i } = e;
|
|
2280
|
-
return await (await
|
|
2325
|
+
return await (await Dt(i, t.dataFormatId, t.parserId)).listStructureEntries(r, {
|
|
2281
2326
|
abortSignal: n,
|
|
2282
2327
|
dataFormatId: t.dataFormatId,
|
|
2283
2328
|
entryCount: t.entryCount,
|
|
@@ -2286,15 +2331,15 @@ async function pt(e) {
|
|
|
2286
2331
|
path: t.structurePath
|
|
2287
2332
|
});
|
|
2288
2333
|
}
|
|
2289
|
-
function
|
|
2290
|
-
let t = e.valueDelimiterId ?? (
|
|
2334
|
+
function yt(e) {
|
|
2335
|
+
let t = e.valueDelimiterId ?? (J.has(e.dataFormatId) ? "" : void 0);
|
|
2291
2336
|
if (t == null || e.encodingId == null) throw Error(`'${e.path}' has no encoding or value delimiter, which a parser needs to read it.`);
|
|
2292
2337
|
return {
|
|
2293
2338
|
encodingId: e.encodingId,
|
|
2294
2339
|
valueDelimiterId: t
|
|
2295
2340
|
};
|
|
2296
2341
|
}
|
|
2297
|
-
function
|
|
2342
|
+
function bt(e) {
|
|
2298
2343
|
let { asAt: t, columns: n, isComplete: r, recordCount: i, size: a, startedAt: o } = e;
|
|
2299
2344
|
return {
|
|
2300
2345
|
asAt: t,
|
|
@@ -2310,8 +2355,8 @@ function ht(e) {
|
|
|
2310
2355
|
sourceWaitDuration: void 0
|
|
2311
2356
|
};
|
|
2312
2357
|
}
|
|
2313
|
-
function
|
|
2314
|
-
let n = e.getReader(), r =
|
|
2358
|
+
function xt(e, t) {
|
|
2359
|
+
let n = e.getReader(), r = St(t.encodingId), i = 0, a = !1, o;
|
|
2315
2360
|
return {
|
|
2316
2361
|
byteCount: () => i,
|
|
2317
2362
|
isComplete: () => a,
|
|
@@ -2326,8 +2371,8 @@ function gt(e, t) {
|
|
|
2326
2371
|
}
|
|
2327
2372
|
s = t.value;
|
|
2328
2373
|
}
|
|
2329
|
-
let c = s.subarray(0,
|
|
2330
|
-
o = s.length >
|
|
2374
|
+
let c = s.subarray(0, pt);
|
|
2375
|
+
o = s.length > pt ? s.subarray(pt) : void 0;
|
|
2331
2376
|
let l = t.stopSignal?.aborted === !0 ? i : t.byteLimit ?? Infinity, u = r(c, i, l - i);
|
|
2332
2377
|
u == null ? (i += c.length, e.enqueue(c)) : (i += u, o = void 0, e.enqueue(c.subarray(0, u)), e.close(), await n.cancel());
|
|
2333
2378
|
},
|
|
@@ -2337,19 +2382,19 @@ function gt(e, t) {
|
|
|
2337
2382
|
}, { highWaterMark: 0 })
|
|
2338
2383
|
};
|
|
2339
2384
|
}
|
|
2340
|
-
function
|
|
2341
|
-
let t =
|
|
2385
|
+
function St(e) {
|
|
2386
|
+
let t = Ye(e), n = t.startsWith("utf-16"), r = n ? 2 : 1, i = +(t === "utf-16be"), a = !1;
|
|
2342
2387
|
return (e, t, o) => {
|
|
2343
2388
|
for (let s = 0; s < e.length; s++) {
|
|
2344
2389
|
let c = e[s];
|
|
2345
|
-
if ((c ===
|
|
2346
|
-
if (c ===
|
|
2347
|
-
else if (!a && s >= o && (c ===
|
|
2390
|
+
if ((c === ft || c === Y || c === dt) && (!n || (t + s) % 2 === i && e[s + 1 - 2 * i] === 0)) {
|
|
2391
|
+
if (c === ft) a = !a;
|
|
2392
|
+
else if (!a && s >= o && (c === Y || e[s + r] !== Y)) return s + r - i;
|
|
2348
2393
|
}
|
|
2349
2394
|
}
|
|
2350
2395
|
};
|
|
2351
2396
|
}
|
|
2352
|
-
function
|
|
2397
|
+
function Ct(e) {
|
|
2353
2398
|
let t = e.getReader(), n = 0, r = !1;
|
|
2354
2399
|
return {
|
|
2355
2400
|
byteCount: () => n,
|
|
@@ -2365,7 +2410,7 @@ function vt(e) {
|
|
|
2365
2410
|
}, { highWaterMark: 0 })
|
|
2366
2411
|
};
|
|
2367
2412
|
}
|
|
2368
|
-
function
|
|
2413
|
+
function wt(e) {
|
|
2369
2414
|
let t = e.getReader(), n = 0;
|
|
2370
2415
|
return {
|
|
2371
2416
|
stream: new ReadableStream({
|
|
@@ -2380,10 +2425,10 @@ function yt(e) {
|
|
|
2380
2425
|
waitDuration: () => n
|
|
2381
2426
|
};
|
|
2382
2427
|
}
|
|
2383
|
-
async function
|
|
2428
|
+
async function Tt(e) {
|
|
2384
2429
|
let { dataFormatId: t, isComplete: n, parserId: r, structureIndex: i, structurePath: a, text: o, toolConfigs: s, valueDelimiterId: c } = e;
|
|
2385
|
-
if (t == null || o == null ||
|
|
2386
|
-
let { parser: l, parserId: u } = await
|
|
2430
|
+
if (t == null || o == null || G(s, t).length === 0) return;
|
|
2431
|
+
let { parser: l, parserId: u } = await X(s, t, r);
|
|
2387
2432
|
if (i != null) {
|
|
2388
2433
|
let e = i.nodes.length === 0 && i.issues.length > 0;
|
|
2389
2434
|
return e || a == null ? {
|
|
@@ -2415,19 +2460,19 @@ async function bt(e) {
|
|
|
2415
2460
|
}), p = t === "dtv", m = p && c == null && f.valueDelimiterId == null ? await l.parseText(o, {
|
|
2416
2461
|
dataFormatId: t,
|
|
2417
2462
|
isComplete: n,
|
|
2418
|
-
valueDelimiterIds: [
|
|
2463
|
+
valueDelimiterIds: [q]
|
|
2419
2464
|
}) : f;
|
|
2420
2465
|
return {
|
|
2421
2466
|
parserId: u,
|
|
2422
2467
|
parseTextResult: m,
|
|
2423
2468
|
structurePath: void 0,
|
|
2424
|
-
valueDelimiterId: p ? c ?? m.valueDelimiterId ??
|
|
2469
|
+
valueDelimiterId: p ? c ?? m.valueDelimiterId ?? q : m.valueDelimiterId
|
|
2425
2470
|
};
|
|
2426
2471
|
}
|
|
2427
|
-
async function
|
|
2472
|
+
async function Et(e) {
|
|
2428
2473
|
let { dataFormatId: t, filePreview: n, parserId: r, toolConfigs: i } = e;
|
|
2429
|
-
if (!(t != null &&
|
|
2430
|
-
let a = await
|
|
2474
|
+
if (!(t != null && J.has(t) && G(i, t).length > 0 && K(i, t, r).actionNames?.includes("buildStructureIndex") === !0)) return;
|
|
2475
|
+
let a = await Dt(i, t, r), o = new Blob([n.bytes]).stream(), s = n.decodedEncodingId ?? "utf-8";
|
|
2431
2476
|
return await a.buildStructureIndex(o, {
|
|
2432
2477
|
abortSignal: new AbortController().signal,
|
|
2433
2478
|
dataFormatId: t,
|
|
@@ -2437,23 +2482,23 @@ async function xt(e) {
|
|
|
2437
2482
|
onProgress: void 0
|
|
2438
2483
|
});
|
|
2439
2484
|
}
|
|
2440
|
-
async function
|
|
2441
|
-
let r =
|
|
2485
|
+
async function X(e, t, n) {
|
|
2486
|
+
let r = K(e, t, n);
|
|
2442
2487
|
return {
|
|
2443
|
-
parser: await
|
|
2488
|
+
parser: await lt(e, r.id.slice(W.length)),
|
|
2444
2489
|
parserId: r.id
|
|
2445
2490
|
};
|
|
2446
2491
|
}
|
|
2447
|
-
async function
|
|
2448
|
-
let { parser: r, parserId: i } = await
|
|
2492
|
+
async function Dt(e, t, n) {
|
|
2493
|
+
let { parser: r, parserId: i } = await X(e, t, n);
|
|
2449
2494
|
if (!("buildStructureIndex" in r)) throw new F(`Tool '${i}' does not map the structure of '${t}' items.`, "dpuse-shared.component.module.connector.objectParsing.loadStructuredParser");
|
|
2450
2495
|
return r;
|
|
2451
2496
|
}
|
|
2452
2497
|
// src/component/module/connector/storeErrors.ts
|
|
2453
|
-
function
|
|
2498
|
+
function Ot(e, t, n, r) {
|
|
2454
2499
|
return new I(t, n, { storeErrorId: e }, r);
|
|
2455
2500
|
}
|
|
2456
|
-
function
|
|
2501
|
+
function kt(e) {
|
|
2457
2502
|
let t = /* @__PURE__ */ new Set();
|
|
2458
2503
|
for (let n = e; n instanceof Error && !t.has(n); n = n.cause) {
|
|
2459
2504
|
t.add(n);
|
|
@@ -2462,31 +2507,31 @@ function Ct(e) {
|
|
|
2462
2507
|
}
|
|
2463
2508
|
}
|
|
2464
2509
|
// src/component/module/connector/storePath.ts
|
|
2465
|
-
var
|
|
2466
|
-
function
|
|
2510
|
+
var At = /^[\w-]+$/u;
|
|
2511
|
+
function jt(e) {
|
|
2467
2512
|
if (!e.startsWith("/")) return {
|
|
2468
2513
|
databaseName: void 0,
|
|
2469
2514
|
tableName: e
|
|
2470
2515
|
};
|
|
2471
2516
|
let [, t, n, ...r] = e.split("/");
|
|
2472
|
-
if (t == null || n == null || n === "" || r.length > 0 || !
|
|
2517
|
+
if (t == null || n == null || n === "" || r.length > 0 || !At.test(t)) throw Error(`Encountered invalid store path '${e}'.`);
|
|
2473
2518
|
return {
|
|
2474
2519
|
databaseName: t,
|
|
2475
2520
|
tableName: n
|
|
2476
2521
|
};
|
|
2477
2522
|
}
|
|
2478
2523
|
// src/component/module/connector/storeValues.ts
|
|
2479
|
-
function
|
|
2524
|
+
function Mt(e) {
|
|
2480
2525
|
return e.map((e) => ({
|
|
2481
|
-
value:
|
|
2526
|
+
value: Nt(e),
|
|
2482
2527
|
valueWasQuoted: !1
|
|
2483
2528
|
}));
|
|
2484
2529
|
}
|
|
2485
|
-
function
|
|
2530
|
+
function Nt(e) {
|
|
2486
2531
|
return e == null ? null : e instanceof Date ? e.toISOString() : String(e);
|
|
2487
2532
|
}
|
|
2488
2533
|
// src/component/module/connector/webLock.ts
|
|
2489
|
-
async function
|
|
2534
|
+
async function Pt(e, t = {}) {
|
|
2490
2535
|
let n = Promise.withResolvers(), r = { isGranted: !1 }, i = navigator.locks.request(e, t.takeOver === !0 ? { steal: !0 } : { ifAvailable: !0 }, (e) => {
|
|
2491
2536
|
if (e == null) n.resolve(void 0);
|
|
2492
2537
|
else return r.isGranted = !0, new Promise((e) => {
|
|
@@ -2503,16 +2548,16 @@ async function Ot(e, t = {}) {
|
|
|
2503
2548
|
o(), await a;
|
|
2504
2549
|
};
|
|
2505
2550
|
}
|
|
2506
|
-
var
|
|
2551
|
+
var Ft = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
2507
2552
|
format: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2508
2553
|
name: /* @__PURE__ */ w(),
|
|
2509
2554
|
title: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2510
2555
|
type: /* @__PURE__ */ x(/* @__PURE__ */ w())
|
|
2511
|
-
})) }),
|
|
2556
|
+
})) }), It = /* @__PURE__ */ v({
|
|
2512
2557
|
delimiter: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2513
2558
|
header: /* @__PURE__ */ x(/* @__PURE__ */ g()),
|
|
2514
2559
|
headerRows: /* @__PURE__ */ x(/* @__PURE__ */ h(/* @__PURE__ */ b()))
|
|
2515
|
-
}),
|
|
2560
|
+
}), Lt = {
|
|
2516
2561
|
boolean: {
|
|
2517
2562
|
dataSubtypeId: void 0,
|
|
2518
2563
|
dataTypeId: "boolean"
|
|
@@ -2545,18 +2590,18 @@ var kt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
|
2545
2590
|
dataSubtypeId: "integer",
|
|
2546
2591
|
dataTypeId: "numeric"
|
|
2547
2592
|
}
|
|
2548
|
-
},
|
|
2593
|
+
}, Rt = {
|
|
2549
2594
|
email: "email",
|
|
2550
2595
|
uri: "url",
|
|
2551
2596
|
uuid: "uuid"
|
|
2552
2597
|
};
|
|
2553
|
-
function
|
|
2554
|
-
let t = /* @__PURE__ */ O(
|
|
2598
|
+
function zt(e) {
|
|
2599
|
+
let t = /* @__PURE__ */ O(Ft, e.schema);
|
|
2555
2600
|
if (!t.success) throw new F("The table schema is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2556
|
-
let n = /* @__PURE__ */ O(
|
|
2601
|
+
let n = /* @__PURE__ */ O(It, e.dialect ?? {});
|
|
2557
2602
|
if (!n.success) throw new F("The table dialect is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2558
2603
|
let r = t.output.fields.map((e) => {
|
|
2559
|
-
let t =
|
|
2604
|
+
let t = Bt(e.type, e.format);
|
|
2560
2605
|
return {
|
|
2561
2606
|
name: e.name,
|
|
2562
2607
|
label: e.title,
|
|
@@ -2574,18 +2619,18 @@ function Nt(e) {
|
|
|
2574
2619
|
}
|
|
2575
2620
|
};
|
|
2576
2621
|
}
|
|
2577
|
-
function
|
|
2578
|
-
let n = e == null ? void 0 :
|
|
2622
|
+
function Bt(e, t) {
|
|
2623
|
+
let n = e == null ? void 0 : Lt[e];
|
|
2579
2624
|
return n == null ? {
|
|
2580
2625
|
dataSubtypeId: void 0,
|
|
2581
2626
|
dataTypeId: void 0
|
|
2582
2627
|
} : t == null || n.dataTypeId !== "string" ? n : {
|
|
2583
|
-
dataSubtypeId:
|
|
2628
|
+
dataSubtypeId: Rt[t] ?? "plain",
|
|
2584
2629
|
dataTypeId: "string"
|
|
2585
2630
|
};
|
|
2586
2631
|
}
|
|
2587
2632
|
// src/component/module/connector/index.ts
|
|
2588
|
-
var
|
|
2633
|
+
var Vt = [
|
|
2589
2634
|
{
|
|
2590
2635
|
id: "application",
|
|
2591
2636
|
label: {
|
|
@@ -2614,7 +2659,7 @@ var Ft = [
|
|
|
2614
2659
|
es: "Almacén de Archivos"
|
|
2615
2660
|
}
|
|
2616
2661
|
}
|
|
2617
|
-
],
|
|
2662
|
+
], Ht = [
|
|
2618
2663
|
{
|
|
2619
2664
|
id: "apiEndpoint",
|
|
2620
2665
|
label: {
|
|
@@ -2636,7 +2681,7 @@ var Ft = [
|
|
|
2636
2681
|
es: "Tabla"
|
|
2637
2682
|
}
|
|
2638
2683
|
}
|
|
2639
|
-
],
|
|
2684
|
+
], Ut = {
|
|
2640
2685
|
auditObjectContent: "Audit Object Content",
|
|
2641
2686
|
closeStore: "Close Store",
|
|
2642
2687
|
createObject: "Create Object",
|
|
@@ -2657,7 +2702,7 @@ var Ft = [
|
|
|
2657
2702
|
removeRecords: "Remove Records",
|
|
2658
2703
|
retrieveRecords: "Retrieve Records",
|
|
2659
2704
|
upsertRecords: "Upsert Records"
|
|
2660
|
-
},
|
|
2705
|
+
}, Wt = [
|
|
2661
2706
|
{
|
|
2662
2707
|
id: "bidirectional",
|
|
2663
2708
|
label: {
|
|
@@ -2686,13 +2731,13 @@ var Ft = [
|
|
|
2686
2731
|
es: "Desconocido"
|
|
2687
2732
|
}
|
|
2688
2733
|
}
|
|
2689
|
-
],
|
|
2734
|
+
], Gt = /* @__PURE__ */ new Set([
|
|
2690
2735
|
"createObject",
|
|
2691
2736
|
"dropObject",
|
|
2692
2737
|
"loadObjectRecords",
|
|
2693
2738
|
"removeRecords",
|
|
2694
2739
|
"upsertRecords"
|
|
2695
|
-
]),
|
|
2740
|
+
]), Kt = /* @__PURE__ */ new Set([
|
|
2696
2741
|
"auditObjectContent",
|
|
2697
2742
|
"findObject",
|
|
2698
2743
|
"getInfo",
|
|
@@ -2706,13 +2751,13 @@ var Ft = [
|
|
|
2706
2751
|
"queryRecords",
|
|
2707
2752
|
"retrieveRecords"
|
|
2708
2753
|
]);
|
|
2709
|
-
function
|
|
2754
|
+
function qt(e) {
|
|
2710
2755
|
let t = !1, n = !1;
|
|
2711
|
-
for (let r of e)
|
|
2756
|
+
for (let r of e) Kt.has(r) && (t = !0), Gt.has(r) && (n = !0);
|
|
2712
2757
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
2713
2758
|
}
|
|
2714
|
-
var
|
|
2715
|
-
let i =
|
|
2759
|
+
var Jt = (e, t = "en") => {
|
|
2760
|
+
let i = Vt.find((t) => t.id === e);
|
|
2716
2761
|
return i ? {
|
|
2717
2762
|
label: r(n(i.label), t) ?? i.id,
|
|
2718
2763
|
description: ""
|
|
@@ -2720,8 +2765,8 @@ var Ht = (e, t = "en") => {
|
|
|
2720
2765
|
label: e,
|
|
2721
2766
|
description: ""
|
|
2722
2767
|
};
|
|
2723
|
-
},
|
|
2724
|
-
let i =
|
|
2768
|
+
}, Yt = (e, t = "en") => {
|
|
2769
|
+
let i = Ht.find((t) => t.id === e);
|
|
2725
2770
|
return i ? {
|
|
2726
2771
|
label: r(n(i.label), t) ?? i.id,
|
|
2727
2772
|
description: ""
|
|
@@ -2729,8 +2774,8 @@ var Ht = (e, t = "en") => {
|
|
|
2729
2774
|
label: e,
|
|
2730
2775
|
description: ""
|
|
2731
2776
|
};
|
|
2732
|
-
},
|
|
2733
|
-
let i =
|
|
2777
|
+
}, Xt = (e, t = "en") => {
|
|
2778
|
+
let i = Wt.find((t) => t.id === e);
|
|
2734
2779
|
return i ? {
|
|
2735
2780
|
label: r(n(i.label), t) ?? i.id,
|
|
2736
2781
|
description: ""
|
|
@@ -2739,36 +2784,36 @@ var Ht = (e, t = "en") => {
|
|
|
2739
2784
|
description: ""
|
|
2740
2785
|
};
|
|
2741
2786
|
};
|
|
2742
|
-
function
|
|
2787
|
+
function Zt(e) {
|
|
2743
2788
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
2744
2789
|
n += "|:----|:-------:|\n";
|
|
2745
|
-
for (let e of Object.keys(
|
|
2790
|
+
for (let e of Object.keys(Ut)) n += `| ${Ut[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
2746
2791
|
return n;
|
|
2747
2792
|
}
|
|
2748
2793
|
// src/component/module/cookbook/cookbookConfig.schema.ts
|
|
2749
|
-
var
|
|
2794
|
+
var Qt = A(["list"]), $t = /* @__PURE__ */ C({
|
|
2750
2795
|
...M,
|
|
2751
2796
|
typeId: /* @__PURE__ */ _("cookbook"),
|
|
2752
|
-
actionNames: /* @__PURE__ */ h(
|
|
2797
|
+
actionNames: /* @__PURE__ */ h(Qt),
|
|
2753
2798
|
recipes: /* @__PURE__ */ h(oe)
|
|
2754
2799
|
});
|
|
2755
2800
|
// src/component/module/engine/index.ts
|
|
2756
|
-
function
|
|
2801
|
+
function en(e) {
|
|
2757
2802
|
return e.signal ?? new AbortController().signal;
|
|
2758
2803
|
}
|
|
2759
2804
|
// src/component/module/presenter/presenterConfig.schema.ts
|
|
2760
|
-
var
|
|
2805
|
+
var tn = A([
|
|
2761
2806
|
"list",
|
|
2762
2807
|
"render",
|
|
2763
2808
|
"setColorMode"
|
|
2764
|
-
]),
|
|
2809
|
+
]), nn = /* @__PURE__ */ C({
|
|
2765
2810
|
...M,
|
|
2766
2811
|
typeId: /* @__PURE__ */ _("presenter"),
|
|
2767
|
-
actionNames: /* @__PURE__ */ h(
|
|
2812
|
+
actionNames: /* @__PURE__ */ h(tn),
|
|
2768
2813
|
presentations: /* @__PURE__ */ h(oe)
|
|
2769
|
-
}),
|
|
2770
|
-
async function
|
|
2771
|
-
let i = e.id, a = `${
|
|
2814
|
+
}), rn = "https://engine-eu.dpuse.app/presenters";
|
|
2815
|
+
async function an(e, t, n, r) {
|
|
2816
|
+
let i = e.id, a = `${rn}/${i.split("-").slice(2).join("-")}_v${e.version}/${i}.es.js`;
|
|
2772
2817
|
try {
|
|
2773
2818
|
return new (await (import(
|
|
2774
2819
|
/* @vite-ignore */
|
|
@@ -2784,7 +2829,7 @@ async function Qt(e, t, n, r) {
|
|
|
2784
2829
|
}
|
|
2785
2830
|
}
|
|
2786
2831
|
// src/locale/index.ts
|
|
2787
|
-
function
|
|
2832
|
+
function on(e, t) {
|
|
2788
2833
|
return {
|
|
2789
2834
|
...e,
|
|
2790
2835
|
label: e.label[t] ?? e.id,
|
|
@@ -2792,7 +2837,7 @@ function $t(e, t) {
|
|
|
2792
2837
|
verb: e.verb?.[t] ?? void 0
|
|
2793
2838
|
};
|
|
2794
2839
|
}
|
|
2795
|
-
function
|
|
2840
|
+
function sn(e, t, n = !1) {
|
|
2796
2841
|
let r = e.map((e) => ({
|
|
2797
2842
|
...e,
|
|
2798
2843
|
label: e.label[t] ?? e.id,
|
|
@@ -2801,7 +2846,7 @@ function en(e, t, n = !1) {
|
|
|
2801
2846
|
}));
|
|
2802
2847
|
return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
|
|
2803
2848
|
}
|
|
2804
|
-
function
|
|
2849
|
+
function cn(e, t) {
|
|
2805
2850
|
return {
|
|
2806
2851
|
...e,
|
|
2807
2852
|
label: e.label[t] ?? e.id,
|
|
@@ -2809,7 +2854,7 @@ function tn(e, t) {
|
|
|
2809
2854
|
};
|
|
2810
2855
|
}
|
|
2811
2856
|
// src/utilities/index.ts
|
|
2812
|
-
var
|
|
2857
|
+
var ln = /* @__PURE__ */ new Map([
|
|
2813
2858
|
["arrow", "application/vnd.apache.arrow.file"],
|
|
2814
2859
|
["avro", "application/vnd.apache.avro"],
|
|
2815
2860
|
["bin", "application/octet-stream"],
|
|
@@ -2836,14 +2881,14 @@ var nn = /* @__PURE__ */ new Map([
|
|
|
2836
2881
|
["minute", 6e4],
|
|
2837
2882
|
["second", 1e3],
|
|
2838
2883
|
["millisecond", 1]
|
|
2839
|
-
],
|
|
2884
|
+
], un = [
|
|
2840
2885
|
["byte", 1],
|
|
2841
2886
|
["KiB", 1024],
|
|
2842
2887
|
["MiB", 1048576],
|
|
2843
2888
|
["GiB", 1073741824],
|
|
2844
2889
|
["TiB", 1099511627776]
|
|
2845
|
-
],
|
|
2846
|
-
function
|
|
2890
|
+
], dn = /* @__PURE__ */ new Map(), fn = /* @__PURE__ */ new Map();
|
|
2891
|
+
function pn(e, t = 2, n = t, r = Z) {
|
|
2847
2892
|
return e == null ? "" : $(r, {
|
|
2848
2893
|
localeMatcher: "best fit",
|
|
2849
2894
|
maximumFractionDigits: t,
|
|
@@ -2853,18 +2898,18 @@ function sn(e, t = 2, n = t, r = Z) {
|
|
|
2853
2898
|
useGrouping: !0
|
|
2854
2899
|
}).format(e);
|
|
2855
2900
|
}
|
|
2856
|
-
function
|
|
2857
|
-
return
|
|
2901
|
+
function mn(e, t = Z) {
|
|
2902
|
+
return pn(e, 0, 0, t);
|
|
2858
2903
|
}
|
|
2859
|
-
function
|
|
2904
|
+
function hn(e, t = 1, n = Z) {
|
|
2860
2905
|
return e == null || !Number.isFinite(e) ? "" : $(n, {
|
|
2861
2906
|
maximumFractionDigits: t,
|
|
2862
2907
|
notation: "compact"
|
|
2863
2908
|
}).format(e);
|
|
2864
2909
|
}
|
|
2865
|
-
function
|
|
2910
|
+
function gn(e, t = 1, n = Z) {
|
|
2866
2911
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2867
|
-
let [r, i] =
|
|
2912
|
+
let [r, i] = un.find(([, n]) => Tn(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["TiB", 1099511627776];
|
|
2868
2913
|
return i === 1 ? $(n, {
|
|
2869
2914
|
maximumFractionDigits: 0,
|
|
2870
2915
|
style: "unit",
|
|
@@ -2872,7 +2917,7 @@ function un(e, t = 1, n = Z) {
|
|
|
2872
2917
|
unitDisplay: "long"
|
|
2873
2918
|
}).format(e) : `${$(n, { maximumFractionDigits: t }).format(e / i)} ${r}`;
|
|
2874
2919
|
}
|
|
2875
|
-
function
|
|
2920
|
+
function _n(e, t = "millisecond", n = Z) {
|
|
2876
2921
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2877
2922
|
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 = [];
|
|
2878
2923
|
for (let [t, i] of s) {
|
|
@@ -2886,25 +2931,25 @@ function dn(e, t = "millisecond", n = Z) {
|
|
|
2886
2931
|
unitDisplay: "short"
|
|
2887
2932
|
}).format(o));
|
|
2888
2933
|
}
|
|
2889
|
-
return
|
|
2934
|
+
return wn(n).format(c);
|
|
2890
2935
|
}
|
|
2891
|
-
function
|
|
2936
|
+
function vn(e) {
|
|
2892
2937
|
if (!e) return;
|
|
2893
|
-
let t =
|
|
2938
|
+
let t = Cn(e);
|
|
2894
2939
|
return t === void 0 ? e : e.slice(0, t);
|
|
2895
2940
|
}
|
|
2896
|
-
function
|
|
2941
|
+
function yn(e) {
|
|
2897
2942
|
if (!e) return;
|
|
2898
|
-
let t =
|
|
2943
|
+
let t = Cn(e);
|
|
2899
2944
|
return t === void 0 ? void 0 : e.slice(t + 1);
|
|
2900
2945
|
}
|
|
2901
|
-
function
|
|
2902
|
-
return e != null &&
|
|
2946
|
+
function bn(e) {
|
|
2947
|
+
return e != null && ln.has(e.toLowerCase());
|
|
2903
2948
|
}
|
|
2904
|
-
function
|
|
2905
|
-
return (e == null ? void 0 :
|
|
2949
|
+
function xn(e) {
|
|
2950
|
+
return (e == null ? void 0 : ln.get(e.toLowerCase())) ?? "application/octet-stream";
|
|
2906
2951
|
}
|
|
2907
|
-
function
|
|
2952
|
+
function Sn(e) {
|
|
2908
2953
|
switch (e) {
|
|
2909
2954
|
case "Edm.Boolean": return "boolean";
|
|
2910
2955
|
case "Edm.Byte":
|
|
@@ -2925,23 +2970,23 @@ function gn(e) {
|
|
|
2925
2970
|
default: return "unknown";
|
|
2926
2971
|
}
|
|
2927
2972
|
}
|
|
2928
|
-
function
|
|
2973
|
+
function Cn(e) {
|
|
2929
2974
|
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
2930
2975
|
return n > t && n < e.length - 1 ? n : void 0;
|
|
2931
2976
|
}
|
|
2932
|
-
function
|
|
2933
|
-
let t =
|
|
2977
|
+
function wn(e) {
|
|
2978
|
+
let t = dn.get(e);
|
|
2934
2979
|
return t || (t = new Intl.ListFormat(e, {
|
|
2935
2980
|
style: "narrow",
|
|
2936
2981
|
type: "unit"
|
|
2937
|
-
}),
|
|
2982
|
+
}), dn.set(e, t)), t;
|
|
2938
2983
|
}
|
|
2939
2984
|
function $(e, t) {
|
|
2940
|
-
let n = `${e}|${JSON.stringify(t)}`, r =
|
|
2941
|
-
return r || (r = new Intl.NumberFormat(e, t),
|
|
2985
|
+
let n = `${e}|${JSON.stringify(t)}`, r = fn.get(n);
|
|
2986
|
+
return r || (r = new Intl.NumberFormat(e, t), fn.set(n, r)), r;
|
|
2942
2987
|
}
|
|
2943
|
-
function
|
|
2988
|
+
function Tn(e, t) {
|
|
2944
2989
|
let n = 10 ** t;
|
|
2945
2990
|
return Math.round(e * n) / n;
|
|
2946
2991
|
}
|
|
2947
|
-
export { Oe as APIError, F as AppError, I as ConnectorError, de as DATA_FORMAT_CONFIGS, fe as DATA_TYPE_CONFIGS, pe as DECIMAL_SEPARATOR_IDS, e as DEFAULT_LOCALE_ID,
|
|
2992
|
+
export { Oe as APIError, F as AppError, I as ConnectorError, de as DATA_FORMAT_CONFIGS, fe as DATA_TYPE_CONFIGS, pe as DECIMAL_SEPARATOR_IDS, e as DEFAULT_LOCALE_ID, qe as ENCODING_GROUP_CONFIG_MAP, U as ENCODING_TYPE_CONFIG_MAP, ke as EngineError, L as FetchError, t as SUPPORTED_LANGUAGES, W as TOOL_NAME_PREFIX, j as VALUE_DELIMITER_CONFIGS, Pt as acquireWebLock, gt as auditObjectContentWithParser, R as buildFetchError, mt as buildPreviewObjectResult, ce as componentInstanceConfigSchema, Ae as concatenateSerialisedErrorMessages, Se as connectorConfigSchema, Jt as constructConnectorCategoryConfig, Yt as constructConnectorItemTypeConfig, Xt as constructConnectorUsageConfig, Ot as constructStoreError, Sn as convertODataTypeIdToUsageTypeId, Mt as convertStoreRecordToParsedRecord, Nt as convertStoreValueToText, $t as cookbookConfigSchema, n as createLabelMap, qt as determineConnectorUsageId, yn as extractExtensionFromPath, vn as extractPathWithoutExtension, Ve as fetchObjectContentStream, kt as findStoreErrorId, pn as formatNumberAsDecimalNumber, _n as formatNumberAsDuration, hn as formatNumberAsSize, gn as formatNumberAsStorageSize, mn as formatNumberAsWholeNumber, ue as getComponentStatus, Zt as getConnectorActionsTable, Xe as getEncodingTypeConfigs, me as getValueDelimiterCharacter, bn as hasMimeTypeForExtension, je as ignoreErrors, _t as indexObjectStructureWithParser, Je as isEncodingTypeId, vt as listObjectStructureEntriesWithParser, G as listParserToolConfigs, an as loadPresenter, lt as loadTool, on as localiseConfig, sn as localiseConfigs, cn as localiseReference, xn as lookupMimeTypeForExtension, z as normalizeToError, tt as parseDelimitedText, nn as presenterConfigSchema, zt as readTableSchema, Ye as resolveDecoderId, r as resolveLabel, K as resolveParserToolConfig, en as resolveRequestSignal, jt as resolveStorePath, ht as retrieveRecordsWithParser, Me as serialiseError, et as toolConfigSchema, Ne as unserialiseError };
|