@dpuse/dpuse-shared 1.0.220 → 1.0.222
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
|
@@ -790,6 +790,7 @@ var he = A([
|
|
|
790
790
|
"dropObject",
|
|
791
791
|
"findObject",
|
|
792
792
|
"getInfo",
|
|
793
|
+
"getObject",
|
|
793
794
|
"getReadableStream",
|
|
794
795
|
"getRecord",
|
|
795
796
|
"indexObjectStructure",
|
|
@@ -839,9 +840,16 @@ var he = A([
|
|
|
839
840
|
itemTypeId: ve,
|
|
840
841
|
usage: /* @__PURE__ */ y(be),
|
|
841
842
|
usageId: /* @__PURE__ */ y(ye)
|
|
842
|
-
}), Ce =
|
|
843
|
+
}), Ce = /* @__PURE__ */ new Set([
|
|
844
|
+
"APIError",
|
|
845
|
+
"AppError",
|
|
846
|
+
"ConnectorError",
|
|
847
|
+
"DPUseError",
|
|
848
|
+
"EngineError",
|
|
849
|
+
"FetchError"
|
|
850
|
+
]), we = 2048, N = "[REDACTED]", Te = 10, Ee = /api[-_]?key|authori[sz]ation|cookie|credential|passw(?:or)?d|private[-_]?key|secret|token/i, De = [
|
|
843
851
|
[/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${N}`],
|
|
844
|
-
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) =>
|
|
852
|
+
[/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) => Ee.test(t) && !/^(?:Basic|Bearer)$/i.test(r) ? `${t}${n}${N}` : e],
|
|
845
853
|
[/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () => N],
|
|
846
854
|
[/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () => N],
|
|
847
855
|
[/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () => N]
|
|
@@ -855,11 +863,11 @@ var he = A([
|
|
|
855
863
|
constructor(e, t, n, r) {
|
|
856
864
|
super(e, t, n, r), this.name = "AppError";
|
|
857
865
|
}
|
|
858
|
-
},
|
|
866
|
+
}, Oe = class extends P {
|
|
859
867
|
constructor(e, t, n, r) {
|
|
860
868
|
super(e, t, n, r), this.name = "APIError";
|
|
861
869
|
}
|
|
862
|
-
},
|
|
870
|
+
}, ke = class extends P {
|
|
863
871
|
constructor(e, t, n, r) {
|
|
864
872
|
super(e, t, n, r), this.name = "EngineError";
|
|
865
873
|
}
|
|
@@ -872,19 +880,19 @@ var he = A([
|
|
|
872
880
|
super(e, t, n, r), this.name = "FetchError";
|
|
873
881
|
}
|
|
874
882
|
};
|
|
875
|
-
async function
|
|
883
|
+
async function Ae(e, t, n) {
|
|
876
884
|
let r = ` - ${e.statusText}`, i = `${t} Response status '${String(e.status)}${e.statusText ? r : ""}' received.`, a;
|
|
877
885
|
try {
|
|
878
886
|
a = await e.text();
|
|
879
887
|
} catch (e) {
|
|
880
888
|
a = `<body unavailable: ${R(e).message}>`;
|
|
881
889
|
}
|
|
882
|
-
return new L(i, n, { body:
|
|
890
|
+
return new L(i, n, { body: Re(a) });
|
|
883
891
|
}
|
|
884
|
-
function
|
|
892
|
+
function je(e) {
|
|
885
893
|
return e.map((e) => e.message).join(" ");
|
|
886
894
|
}
|
|
887
|
-
function
|
|
895
|
+
function Me(e) {
|
|
888
896
|
try {
|
|
889
897
|
e();
|
|
890
898
|
} catch {}
|
|
@@ -901,24 +909,24 @@ function R(e) {
|
|
|
901
909
|
}
|
|
902
910
|
return /* @__PURE__ */ Error("Unknown error");
|
|
903
911
|
}
|
|
904
|
-
function
|
|
912
|
+
function Ne(e) {
|
|
905
913
|
let t = /* @__PURE__ */ new Set(), n = [], r = R(e);
|
|
906
914
|
for (; r != null && !t.has(r);) {
|
|
907
915
|
t.add(r);
|
|
908
|
-
let [e, i] =
|
|
916
|
+
let [e, i] = Be(r), a = Le(e);
|
|
909
917
|
/(?:\.{3}|[.!?])$/.test(a.message) || (a.message += "."), n.push(a), r = i;
|
|
910
918
|
}
|
|
911
919
|
return n;
|
|
912
920
|
}
|
|
913
|
-
function
|
|
921
|
+
function Pe(e) {
|
|
914
922
|
let t;
|
|
915
923
|
for (let n of e.toReversed()) {
|
|
916
|
-
let e =
|
|
924
|
+
let e = Ie(n, t);
|
|
917
925
|
n.stack !== void 0 && (e.stack = n.stack), t = e;
|
|
918
926
|
}
|
|
919
927
|
return t ?? /* @__PURE__ */ Error("No error to unserialise.");
|
|
920
928
|
}
|
|
921
|
-
function
|
|
929
|
+
function Fe(e) {
|
|
922
930
|
let t;
|
|
923
931
|
try {
|
|
924
932
|
t = JSON.stringify(e);
|
|
@@ -927,12 +935,12 @@ function Pe(e) {
|
|
|
927
935
|
}
|
|
928
936
|
return t === "" && (t = "Unknown error"), t;
|
|
929
937
|
}
|
|
930
|
-
function
|
|
938
|
+
function Ie(e, t) {
|
|
931
939
|
switch (e.name) {
|
|
932
|
-
case "APIError": return new
|
|
940
|
+
case "APIError": return new Oe(e.message, e.locator, e.data, { cause: t });
|
|
933
941
|
case "AppError": return new F(e.message, e.locator, e.data, { cause: t });
|
|
934
942
|
case "ConnectorError": return new I(e.message, e.locator, e.data, { cause: t });
|
|
935
|
-
case "EngineError": return new
|
|
943
|
+
case "EngineError": return new ke(e.message, e.locator, e.data, { cause: t });
|
|
936
944
|
case "FetchError": return new L(e.message, e.locator, e.data, { cause: t });
|
|
937
945
|
default: {
|
|
938
946
|
let n = e.name;
|
|
@@ -942,7 +950,7 @@ function Fe(e, t) {
|
|
|
942
950
|
}
|
|
943
951
|
}
|
|
944
952
|
}
|
|
945
|
-
function
|
|
953
|
+
function Le(e) {
|
|
946
954
|
let { data: t, message: n, stack: r } = e;
|
|
947
955
|
return {
|
|
948
956
|
...e,
|
|
@@ -953,18 +961,21 @@ function Ie(e) {
|
|
|
953
961
|
}
|
|
954
962
|
function z(e) {
|
|
955
963
|
let t = e;
|
|
956
|
-
for (let [e, n] of
|
|
964
|
+
for (let [e, n] of De) t = t.replaceAll(e, (e, ...t) => n(e, ...t));
|
|
957
965
|
return t;
|
|
958
966
|
}
|
|
959
967
|
function B(e, t, n) {
|
|
960
|
-
return typeof e == "string" ? z(e) : typeof e != "object" || !e ? e : n >=
|
|
961
|
-
}
|
|
962
|
-
function Le(e) {
|
|
963
|
-
if (e != null && e !== "") return e.length > Ce ? `${e.slice(0, Ce)}... [truncated]` : e;
|
|
968
|
+
return typeof e == "string" ? z(e) : typeof e != "object" || !e ? e : n >= Te ? N : 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 && Ee.test(e) ? N : B(r, t, n + 1)])));
|
|
964
969
|
}
|
|
965
970
|
function Re(e) {
|
|
971
|
+
if (e != null && e !== "") return e.length > we ? `${e.slice(0, we)}... [truncated]` : e;
|
|
972
|
+
}
|
|
973
|
+
function ze(e) {
|
|
974
|
+
return e instanceof P || Ce.has(e.name) && typeof e.locator == "string";
|
|
975
|
+
}
|
|
976
|
+
function Be(e) {
|
|
966
977
|
let t = e.cause == null ? null : R(e.cause);
|
|
967
|
-
if (e
|
|
978
|
+
if (ze(e)) return [{
|
|
968
979
|
data: e.data,
|
|
969
980
|
locator: e.locator,
|
|
970
981
|
message: e.message,
|
|
@@ -981,13 +992,13 @@ function Re(e) {
|
|
|
981
992
|
}, t] : [{
|
|
982
993
|
data: n,
|
|
983
994
|
locator: "",
|
|
984
|
-
message:
|
|
995
|
+
message: Fe(e),
|
|
985
996
|
name: "Error",
|
|
986
997
|
stack: void 0
|
|
987
998
|
}, null];
|
|
988
999
|
}
|
|
989
1000
|
// src/encoding/index.ts
|
|
990
|
-
var
|
|
1001
|
+
var Ve = {
|
|
991
1002
|
arabic: {
|
|
992
1003
|
id: "arabic",
|
|
993
1004
|
label: {
|
|
@@ -1142,7 +1153,7 @@ var ze = {
|
|
|
1142
1153
|
es: "Occidental"
|
|
1143
1154
|
}
|
|
1144
1155
|
}
|
|
1145
|
-
},
|
|
1156
|
+
}, He = {
|
|
1146
1157
|
"armscii-8": {
|
|
1147
1158
|
id: "armscii-8",
|
|
1148
1159
|
groupId: "armenian",
|
|
@@ -1934,16 +1945,16 @@ var ze = {
|
|
|
1934
1945
|
textDecoderId: "windows-1257",
|
|
1935
1946
|
iconvLiteDecoderId: "windows1257"
|
|
1936
1947
|
}
|
|
1937
|
-
},
|
|
1938
|
-
function
|
|
1948
|
+
}, Ue = Ve, V = He;
|
|
1949
|
+
function We(e) {
|
|
1939
1950
|
return Object.hasOwn(V, e);
|
|
1940
1951
|
}
|
|
1941
|
-
function
|
|
1942
|
-
return
|
|
1952
|
+
function Ge(e) {
|
|
1953
|
+
return We(e) ? V[e].textDecoderId ?? e : e;
|
|
1943
1954
|
}
|
|
1944
|
-
function
|
|
1955
|
+
function Ke(e = "en") {
|
|
1945
1956
|
return Array.from(Object.values(V), ({ groupId: t, iconvLiteDecoderId: n, id: r, isDetectable: i, textDecoderId: a }) => {
|
|
1946
|
-
let o = t == null ? "" :
|
|
1957
|
+
let o = t == null ? "" : qe(t, e);
|
|
1947
1958
|
return {
|
|
1948
1959
|
id: r,
|
|
1949
1960
|
groupLabel: o,
|
|
@@ -1955,11 +1966,11 @@ function We(e = "en") {
|
|
|
1955
1966
|
};
|
|
1956
1967
|
}).toSorted((t, n) => t.groupLabel.localeCompare(n.groupLabel, e) || t.id.localeCompare(n.id, e, { numeric: !0 }));
|
|
1957
1968
|
}
|
|
1958
|
-
function
|
|
1959
|
-
let n =
|
|
1969
|
+
function qe(e, t) {
|
|
1970
|
+
let n = Ue[e].label;
|
|
1960
1971
|
return n[t] ?? n.en ?? e;
|
|
1961
1972
|
}
|
|
1962
|
-
var
|
|
1973
|
+
var Je = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ D(/* @__PURE__ */ h(A([
|
|
1963
1974
|
"arrow",
|
|
1964
1975
|
"avro",
|
|
1965
1976
|
"dtv",
|
|
@@ -1972,15 +1983,15 @@ var Ke = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ D(/* @__PURE__ */ h(
|
|
|
1972
1983
|
"sqlite",
|
|
1973
1984
|
"xlsx",
|
|
1974
1985
|
"xml"
|
|
1975
|
-
])), /* @__PURE__ */ f(1)) }),
|
|
1986
|
+
])), /* @__PURE__ */ f(1)) }), Ye = /* @__PURE__ */ h(/* @__PURE__ */ w()), Xe = /* @__PURE__ */ C({
|
|
1976
1987
|
...M,
|
|
1977
1988
|
typeId: /* @__PURE__ */ _("tool"),
|
|
1978
|
-
actionNames: /* @__PURE__ */ x(
|
|
1979
|
-
parser: /* @__PURE__ */ x(
|
|
1989
|
+
actionNames: /* @__PURE__ */ x(Ye),
|
|
1990
|
+
parser: /* @__PURE__ */ x(Je)
|
|
1980
1991
|
});
|
|
1981
1992
|
// src/component/module/tool/delimitedText.ts
|
|
1982
|
-
async function
|
|
1983
|
-
let r =
|
|
1993
|
+
async function Ze(e, t, n) {
|
|
1994
|
+
let r = Qe(e), { issues: i, parsedRecords: a, valueDelimiterId: o } = await $e(e, t.valueDelimiterIds, t.isComplete, n);
|
|
1984
1995
|
return {
|
|
1985
1996
|
issues: i,
|
|
1986
1997
|
parsedRecords: a,
|
|
@@ -1988,16 +1999,16 @@ async function Ye(e, t, n) {
|
|
|
1988
1999
|
valueDelimiterId: o
|
|
1989
2000
|
};
|
|
1990
2001
|
}
|
|
1991
|
-
function
|
|
2002
|
+
function Qe(e) {
|
|
1992
2003
|
let t = (e.match(/\r\n/g) ?? []).length, n = (e.match(/(?<!\r)\n/g) ?? []).length, r = (e.match(/\r(?!\n)/g) ?? []).length;
|
|
1993
2004
|
return t >= n && t >= r ? "\r\n" : n >= t && n >= r ? "\n" : r >= t && r >= n ? "\r" : "\n";
|
|
1994
2005
|
}
|
|
1995
|
-
async function
|
|
2006
|
+
async function $e(e, t, n, r) {
|
|
1996
2007
|
let i, a, o, s = [], c, l = !1;
|
|
1997
2008
|
for (let u of t) {
|
|
1998
2009
|
let { issues: t, records: d } = await r(e, u, n);
|
|
1999
2010
|
if (t.length > 0) {
|
|
2000
|
-
c =
|
|
2011
|
+
c = et(c, {
|
|
2001
2012
|
delimiter: u,
|
|
2002
2013
|
issues: t,
|
|
2003
2014
|
records: d
|
|
@@ -2005,7 +2016,7 @@ async function Ze(e, t, n, r) {
|
|
|
2005
2016
|
continue;
|
|
2006
2017
|
}
|
|
2007
2018
|
if (l = !0, d.length === 0) continue;
|
|
2008
|
-
let { averageValueCount: f, sumOfValueCountDiffs: p } =
|
|
2019
|
+
let { averageValueCount: f, sumOfValueCountDiffs: p } = tt(d);
|
|
2009
2020
|
(a === void 0 || a <= 1 || p <= (o ?? 0)) && (a === void 0 || f > a) && (i = u, a = f, o = p, s = d);
|
|
2010
2021
|
}
|
|
2011
2022
|
if (!l && c != null) {
|
|
@@ -2013,19 +2024,19 @@ async function Ze(e, t, n, r) {
|
|
|
2013
2024
|
return {
|
|
2014
2025
|
issues: t,
|
|
2015
2026
|
parsedRecords: n,
|
|
2016
|
-
valueDelimiterId:
|
|
2027
|
+
valueDelimiterId: nt(n) ? e : void 0
|
|
2017
2028
|
};
|
|
2018
2029
|
}
|
|
2019
2030
|
return {
|
|
2020
2031
|
issues: [],
|
|
2021
2032
|
parsedRecords: s,
|
|
2022
|
-
valueDelimiterId: i != null &&
|
|
2033
|
+
valueDelimiterId: i != null && nt(s) ? i : void 0
|
|
2023
2034
|
};
|
|
2024
2035
|
}
|
|
2025
|
-
function
|
|
2036
|
+
function et(e, t) {
|
|
2026
2037
|
return e == null || t.issues.length < e.issues.length ? t : e;
|
|
2027
2038
|
}
|
|
2028
|
-
function
|
|
2039
|
+
function tt(e) {
|
|
2029
2040
|
let t = 0, n = 0, r;
|
|
2030
2041
|
for (let i of e) r != null && (n += Math.abs(i.length - r)), r = i.length, t += i.length;
|
|
2031
2042
|
return {
|
|
@@ -2033,14 +2044,14 @@ function $e(e) {
|
|
|
2033
2044
|
sumOfValueCountDiffs: n
|
|
2034
2045
|
};
|
|
2035
2046
|
}
|
|
2036
|
-
function
|
|
2047
|
+
function nt(e) {
|
|
2037
2048
|
let t = /* @__PURE__ */ new Map();
|
|
2038
2049
|
for (let n of e) t.set(n.length, (t.get(n.length) ?? 0) + 1);
|
|
2039
2050
|
let [n = 0, r = 0] = [...t].toSorted((e, t) => t[1] - e[1])[0] ?? [];
|
|
2040
2051
|
return n > 1 && r * 2 > e.length;
|
|
2041
2052
|
}
|
|
2042
2053
|
// src/component/module/tool/index.ts
|
|
2043
|
-
var
|
|
2054
|
+
var rt = "https://engine-eu.dpuse.app/tools", it = { dtv: "dpuse-tool-rust-csv-core-parser" }, H = "dpuse-tool-";
|
|
2044
2055
|
function U(e, t) {
|
|
2045
2056
|
return e.filter((e) => e.parser?.dataFormatIds.some((e) => e === t) === !0).toSorted((e, t) => e.id.localeCompare(t.id, "en"));
|
|
2046
2057
|
}
|
|
@@ -2053,10 +2064,10 @@ function W(e, t, n) {
|
|
|
2053
2064
|
};
|
|
2054
2065
|
throw new F(`No tool reads the '${t}' data format.`, "dpuse-shared.component.module.tool.resolveParserToolConfig", n);
|
|
2055
2066
|
}
|
|
2056
|
-
let a =
|
|
2067
|
+
let a = it[t];
|
|
2057
2068
|
return r.find((e) => e.id === n) ?? r.find((e) => e.id === a) ?? i;
|
|
2058
2069
|
}
|
|
2059
|
-
async function
|
|
2070
|
+
async function at(e, t) {
|
|
2060
2071
|
let n = `${H}${t}`, r = e.find((e) => e.id === n);
|
|
2061
2072
|
if (!r) {
|
|
2062
2073
|
let r = {
|
|
@@ -2065,7 +2076,7 @@ async function rt(e, t) {
|
|
|
2065
2076
|
};
|
|
2066
2077
|
throw new F(`Tool '${t}' not found.`, "dpuse-shared.component.module.tool.loadTool", r);
|
|
2067
2078
|
}
|
|
2068
|
-
let i = `${
|
|
2079
|
+
let i = `${rt}/${t}_v${r.version}/${n}.es.js`;
|
|
2069
2080
|
try {
|
|
2070
2081
|
return new (await (import(
|
|
2071
2082
|
/* @vite-ignore */
|
|
@@ -2081,8 +2092,8 @@ async function rt(e, t) {
|
|
|
2081
2092
|
}
|
|
2082
2093
|
}
|
|
2083
2094
|
// src/component/module/connector/objectParsing.ts
|
|
2084
|
-
var
|
|
2085
|
-
async function
|
|
2095
|
+
var ot = "\n", G = ",", K = new Set(de.filter(({ isStructured: e }) => e).map(({ id: e }) => e)), st = 13, q = 10, ct = 34, J = 1048576;
|
|
2096
|
+
async function lt(e) {
|
|
2086
2097
|
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 = {
|
|
2087
2098
|
decodedEncodingId: i.decodedEncodingId,
|
|
2088
2099
|
replacementCharacterCount: i.replacementCharacterCount
|
|
@@ -2092,7 +2103,7 @@ async function st(e) {
|
|
|
2092
2103
|
encodingSourceId: r?.encodingId == null ? i.encodingSourceId : void 0
|
|
2093
2104
|
};
|
|
2094
2105
|
if (f === 0) return {
|
|
2095
|
-
contentAuditConfig:
|
|
2106
|
+
contentAuditConfig: ht({
|
|
2096
2107
|
asAt: t,
|
|
2097
2108
|
columns: [],
|
|
2098
2109
|
isComplete: !0,
|
|
@@ -2116,7 +2127,7 @@ async function st(e) {
|
|
|
2116
2127
|
hasHeaders: !1,
|
|
2117
2128
|
parsedRecords: [],
|
|
2118
2129
|
parserId: void 0,
|
|
2119
|
-
recordDelimiterId:
|
|
2130
|
+
recordDelimiterId: ot,
|
|
2120
2131
|
size: 0,
|
|
2121
2132
|
text: void 0,
|
|
2122
2133
|
valueDelimiterId: G
|
|
@@ -2129,17 +2140,17 @@ async function st(e) {
|
|
|
2129
2140
|
hasHeaders: !1,
|
|
2130
2141
|
isDeclared: d,
|
|
2131
2142
|
parserId: void 0,
|
|
2132
|
-
recordDelimiterId:
|
|
2143
|
+
recordDelimiterId: ot,
|
|
2133
2144
|
valueDelimiterId: G
|
|
2134
2145
|
},
|
|
2135
2146
|
encodingCandidates: m
|
|
2136
2147
|
};
|
|
2137
|
-
let g = r?.dataFormatId ?? i.dataFormatId, _ = r?.valueDelimiterId, v = await
|
|
2148
|
+
let g = r?.dataFormatId ?? i.dataFormatId, _ = r?.valueDelimiterId, v = await xt({
|
|
2138
2149
|
dataFormatId: g,
|
|
2139
2150
|
filePreview: i,
|
|
2140
2151
|
parserId: void 0,
|
|
2141
2152
|
toolConfigs: c
|
|
2142
|
-
}), y = await
|
|
2153
|
+
}), y = await bt({
|
|
2143
2154
|
dataFormatId: g,
|
|
2144
2155
|
isComplete: l,
|
|
2145
2156
|
parserId: void 0,
|
|
@@ -2148,12 +2159,12 @@ async function st(e) {
|
|
|
2148
2159
|
text: u,
|
|
2149
2160
|
toolConfigs: c,
|
|
2150
2161
|
valueDelimiterId: _
|
|
2151
|
-
}), b = o?.dataFormatId ?? g, x = o?.dataFormatId != null || o?.parserId != null, S = x || o?.valueDelimiterId != null || o?.structurePath != null, C = x ? await
|
|
2162
|
+
}), b = o?.dataFormatId ?? g, x = o?.dataFormatId != null || o?.parserId != null, S = x || o?.valueDelimiterId != null || o?.structurePath != null, C = x ? await xt({
|
|
2152
2163
|
dataFormatId: b,
|
|
2153
2164
|
filePreview: i,
|
|
2154
2165
|
parserId: o.parserId,
|
|
2155
2166
|
toolConfigs: c
|
|
2156
|
-
}) : v, w = S ? await
|
|
2167
|
+
}) : v, w = S ? await bt({
|
|
2157
2168
|
dataFormatId: b,
|
|
2158
2169
|
isComplete: l,
|
|
2159
2170
|
parserId: o.parserId,
|
|
@@ -2164,7 +2175,7 @@ async function st(e) {
|
|
|
2164
2175
|
valueDelimiterId: _ ?? o.valueDelimiterId
|
|
2165
2176
|
}) : 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;
|
|
2166
2177
|
return {
|
|
2167
|
-
contentAuditConfig:
|
|
2178
|
+
contentAuditConfig: ht({
|
|
2168
2179
|
asAt: t,
|
|
2169
2180
|
columns: D?.columnConfigs ?? [],
|
|
2170
2181
|
isComplete: l,
|
|
@@ -2201,8 +2212,8 @@ async function st(e) {
|
|
|
2201
2212
|
structureIndex: C
|
|
2202
2213
|
};
|
|
2203
2214
|
}
|
|
2204
|
-
async function*
|
|
2205
|
-
let { options: t, signal: n, stream: r, toolConfigs: i } = e, { encodingId: a, valueDelimiterId: o } =
|
|
2215
|
+
async function* ut(e) {
|
|
2216
|
+
let { options: t, signal: n, stream: r, toolConfigs: i } = e, { encodingId: a, valueDelimiterId: o } = mt(t), { parser: s } = await Y(i, t.dataFormatId, t.parserId), { recordCount: c } = yield* s.parseStream(r, {
|
|
2206
2217
|
abortSignal: n,
|
|
2207
2218
|
chunkSize: t.chunkSize,
|
|
2208
2219
|
dataFormatId: t.dataFormatId,
|
|
@@ -2212,8 +2223,8 @@ async function* ct(e) {
|
|
|
2212
2223
|
});
|
|
2213
2224
|
return { recordCount: c };
|
|
2214
2225
|
}
|
|
2215
|
-
async function
|
|
2216
|
-
let { constructColumnAuditor: t, declaredColumnConfigs: n, onProgress: r, options: i, signal: a, stream: o, toolConfigs: s } = e, { encodingId: c, valueDelimiterId: l } =
|
|
2226
|
+
async function dt(e) {
|
|
2227
|
+
let { constructColumnAuditor: t, declaredColumnConfigs: n, onProgress: r, options: i, signal: a, stream: o, toolConfigs: s } = e, { encodingId: c, valueDelimiterId: l } = mt(i), u = Date.now(), d = performance.now(), f = t(i.hasHeaders, n), { parser: p } = await Y(s, i.dataFormatId, i.parserId), m = yt(o), h = K.has(i.dataFormatId), g = h ? vt(m.stream) : gt(m.stream, {
|
|
2217
2228
|
byteLimit: i.byteLimit,
|
|
2218
2229
|
encodingId: c,
|
|
2219
2230
|
stopSignal: i.stopSignal
|
|
@@ -2253,7 +2264,7 @@ async function lt(e) {
|
|
|
2253
2264
|
hasHeaders: x
|
|
2254
2265
|
};
|
|
2255
2266
|
}
|
|
2256
|
-
async function
|
|
2267
|
+
async function ft(e) {
|
|
2257
2268
|
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";
|
|
2258
2269
|
return await o.buildStructureIndex(i, {
|
|
2259
2270
|
abortSignal: r,
|
|
@@ -2264,7 +2275,7 @@ async function ut(e) {
|
|
|
2264
2275
|
onProgress: t
|
|
2265
2276
|
});
|
|
2266
2277
|
}
|
|
2267
|
-
async function
|
|
2278
|
+
async function pt(e) {
|
|
2268
2279
|
let { options: t, signal: n, stream: r, toolConfigs: i } = e;
|
|
2269
2280
|
return await (await X(i, t.dataFormatId, t.parserId)).listStructureEntries(r, {
|
|
2270
2281
|
abortSignal: n,
|
|
@@ -2275,7 +2286,7 @@ async function dt(e) {
|
|
|
2275
2286
|
path: t.structurePath
|
|
2276
2287
|
});
|
|
2277
2288
|
}
|
|
2278
|
-
function
|
|
2289
|
+
function mt(e) {
|
|
2279
2290
|
let t = e.valueDelimiterId ?? (K.has(e.dataFormatId) ? "" : void 0);
|
|
2280
2291
|
if (t == null || e.encodingId == null) throw Error(`'${e.path}' has no encoding or value delimiter, which a parser needs to read it.`);
|
|
2281
2292
|
return {
|
|
@@ -2283,7 +2294,7 @@ function ft(e) {
|
|
|
2283
2294
|
valueDelimiterId: t
|
|
2284
2295
|
};
|
|
2285
2296
|
}
|
|
2286
|
-
function
|
|
2297
|
+
function ht(e) {
|
|
2287
2298
|
let { asAt: t, columns: n, isComplete: r, recordCount: i, size: a, startedAt: o } = e;
|
|
2288
2299
|
return {
|
|
2289
2300
|
asAt: t,
|
|
@@ -2299,8 +2310,8 @@ function pt(e) {
|
|
|
2299
2310
|
sourceWaitDuration: void 0
|
|
2300
2311
|
};
|
|
2301
2312
|
}
|
|
2302
|
-
function
|
|
2303
|
-
let n = e.getReader(), r =
|
|
2313
|
+
function gt(e, t) {
|
|
2314
|
+
let n = e.getReader(), r = _t(t.encodingId), i = 0, a = !1, o;
|
|
2304
2315
|
return {
|
|
2305
2316
|
byteCount: () => i,
|
|
2306
2317
|
isComplete: () => a,
|
|
@@ -2326,19 +2337,19 @@ function mt(e, t) {
|
|
|
2326
2337
|
}, { highWaterMark: 0 })
|
|
2327
2338
|
};
|
|
2328
2339
|
}
|
|
2329
|
-
function
|
|
2330
|
-
let t =
|
|
2340
|
+
function _t(e) {
|
|
2341
|
+
let t = Ge(e), n = t.startsWith("utf-16"), r = n ? 2 : 1, i = +(t === "utf-16be"), a = !1;
|
|
2331
2342
|
return (e, t, o) => {
|
|
2332
2343
|
for (let s = 0; s < e.length; s++) {
|
|
2333
2344
|
let c = e[s];
|
|
2334
|
-
if ((c ===
|
|
2335
|
-
if (c ===
|
|
2345
|
+
if ((c === ct || c === q || c === st) && (!n || (t + s) % 2 === i && e[s + 1 - 2 * i] === 0)) {
|
|
2346
|
+
if (c === ct) a = !a;
|
|
2336
2347
|
else if (!a && s >= o && (c === q || e[s + r] !== q)) return s + r - i;
|
|
2337
2348
|
}
|
|
2338
2349
|
}
|
|
2339
2350
|
};
|
|
2340
2351
|
}
|
|
2341
|
-
function
|
|
2352
|
+
function vt(e) {
|
|
2342
2353
|
let t = e.getReader(), n = 0, r = !1;
|
|
2343
2354
|
return {
|
|
2344
2355
|
byteCount: () => n,
|
|
@@ -2354,7 +2365,7 @@ function gt(e) {
|
|
|
2354
2365
|
}, { highWaterMark: 0 })
|
|
2355
2366
|
};
|
|
2356
2367
|
}
|
|
2357
|
-
function
|
|
2368
|
+
function yt(e) {
|
|
2358
2369
|
let t = e.getReader(), n = 0;
|
|
2359
2370
|
return {
|
|
2360
2371
|
stream: new ReadableStream({
|
|
@@ -2369,7 +2380,7 @@ function _t(e) {
|
|
|
2369
2380
|
waitDuration: () => n
|
|
2370
2381
|
};
|
|
2371
2382
|
}
|
|
2372
|
-
async function
|
|
2383
|
+
async function bt(e) {
|
|
2373
2384
|
let { dataFormatId: t, isComplete: n, parserId: r, structureIndex: i, structurePath: a, text: o, toolConfigs: s, valueDelimiterId: c } = e;
|
|
2374
2385
|
if (t == null || o == null || U(s, t).length === 0) return;
|
|
2375
2386
|
let { parser: l, parserId: u } = await Y(s, t, r);
|
|
@@ -2413,7 +2424,7 @@ async function vt(e) {
|
|
|
2413
2424
|
valueDelimiterId: p ? c ?? m.valueDelimiterId ?? G : m.valueDelimiterId
|
|
2414
2425
|
};
|
|
2415
2426
|
}
|
|
2416
|
-
async function
|
|
2427
|
+
async function xt(e) {
|
|
2417
2428
|
let { dataFormatId: t, filePreview: n, parserId: r, toolConfigs: i } = e;
|
|
2418
2429
|
if (!(t != null && K.has(t) && U(i, t).length > 0 && W(i, t, r).actionNames?.includes("buildStructureIndex") === !0)) return;
|
|
2419
2430
|
let a = await X(i, t, r), o = new Blob([n.bytes]).stream(), s = n.decodedEncodingId ?? "utf-8";
|
|
@@ -2429,7 +2440,7 @@ async function yt(e) {
|
|
|
2429
2440
|
async function Y(e, t, n) {
|
|
2430
2441
|
let r = W(e, t, n);
|
|
2431
2442
|
return {
|
|
2432
|
-
parser: await
|
|
2443
|
+
parser: await at(e, r.id.slice(H.length)),
|
|
2433
2444
|
parserId: r.id
|
|
2434
2445
|
};
|
|
2435
2446
|
}
|
|
@@ -2439,10 +2450,10 @@ async function X(e, t, n) {
|
|
|
2439
2450
|
return r;
|
|
2440
2451
|
}
|
|
2441
2452
|
// src/component/module/connector/storeErrors.ts
|
|
2442
|
-
function
|
|
2453
|
+
function St(e, t, n, r) {
|
|
2443
2454
|
return new I(t, n, { storeErrorId: e }, r);
|
|
2444
2455
|
}
|
|
2445
|
-
function
|
|
2456
|
+
function Ct(e) {
|
|
2446
2457
|
let t = /* @__PURE__ */ new Set();
|
|
2447
2458
|
for (let n = e; n instanceof Error && !t.has(n); n = n.cause) {
|
|
2448
2459
|
t.add(n);
|
|
@@ -2451,31 +2462,31 @@ function xt(e) {
|
|
|
2451
2462
|
}
|
|
2452
2463
|
}
|
|
2453
2464
|
// src/component/module/connector/storePath.ts
|
|
2454
|
-
var
|
|
2455
|
-
function
|
|
2465
|
+
var wt = /^[\w-]+$/u;
|
|
2466
|
+
function Tt(e) {
|
|
2456
2467
|
if (!e.startsWith("/")) return {
|
|
2457
2468
|
databaseName: void 0,
|
|
2458
2469
|
tableName: e
|
|
2459
2470
|
};
|
|
2460
2471
|
let [, t, n, ...r] = e.split("/");
|
|
2461
|
-
if (t == null || n == null || n === "" || r.length > 0 || !
|
|
2472
|
+
if (t == null || n == null || n === "" || r.length > 0 || !wt.test(t)) throw Error(`Encountered invalid store path '${e}'.`);
|
|
2462
2473
|
return {
|
|
2463
2474
|
databaseName: t,
|
|
2464
2475
|
tableName: n
|
|
2465
2476
|
};
|
|
2466
2477
|
}
|
|
2467
2478
|
// src/component/module/connector/storeValues.ts
|
|
2468
|
-
function
|
|
2479
|
+
function Et(e) {
|
|
2469
2480
|
return e.map((e) => ({
|
|
2470
|
-
value:
|
|
2481
|
+
value: Dt(e),
|
|
2471
2482
|
valueWasQuoted: !1
|
|
2472
2483
|
}));
|
|
2473
2484
|
}
|
|
2474
|
-
function
|
|
2485
|
+
function Dt(e) {
|
|
2475
2486
|
return e == null ? null : e instanceof Date ? e.toISOString() : String(e);
|
|
2476
2487
|
}
|
|
2477
2488
|
// src/component/module/connector/webLock.ts
|
|
2478
|
-
async function
|
|
2489
|
+
async function Ot(e, t = {}) {
|
|
2479
2490
|
let n = Promise.withResolvers(), r = { isGranted: !1 }, i = navigator.locks.request(e, t.takeOver === !0 ? { steal: !0 } : { ifAvailable: !0 }, (e) => {
|
|
2480
2491
|
if (e == null) n.resolve(void 0);
|
|
2481
2492
|
else return r.isGranted = !0, new Promise((e) => {
|
|
@@ -2492,16 +2503,16 @@ async function Et(e, t = {}) {
|
|
|
2492
2503
|
o(), await a;
|
|
2493
2504
|
};
|
|
2494
2505
|
}
|
|
2495
|
-
var
|
|
2506
|
+
var kt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
2496
2507
|
format: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2497
2508
|
name: /* @__PURE__ */ w(),
|
|
2498
2509
|
title: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2499
2510
|
type: /* @__PURE__ */ x(/* @__PURE__ */ w())
|
|
2500
|
-
})) }),
|
|
2511
|
+
})) }), At = /* @__PURE__ */ v({
|
|
2501
2512
|
delimiter: /* @__PURE__ */ x(/* @__PURE__ */ w()),
|
|
2502
2513
|
header: /* @__PURE__ */ x(/* @__PURE__ */ g()),
|
|
2503
2514
|
headerRows: /* @__PURE__ */ x(/* @__PURE__ */ h(/* @__PURE__ */ b()))
|
|
2504
|
-
}),
|
|
2515
|
+
}), jt = {
|
|
2505
2516
|
boolean: {
|
|
2506
2517
|
dataSubtypeId: void 0,
|
|
2507
2518
|
dataTypeId: "boolean"
|
|
@@ -2534,18 +2545,18 @@ var Dt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
|
|
|
2534
2545
|
dataSubtypeId: "integer",
|
|
2535
2546
|
dataTypeId: "numeric"
|
|
2536
2547
|
}
|
|
2537
|
-
},
|
|
2548
|
+
}, Mt = {
|
|
2538
2549
|
email: "email",
|
|
2539
2550
|
uri: "url",
|
|
2540
2551
|
uuid: "uuid"
|
|
2541
2552
|
};
|
|
2542
|
-
function
|
|
2543
|
-
let t = /* @__PURE__ */ O(
|
|
2553
|
+
function Nt(e) {
|
|
2554
|
+
let t = /* @__PURE__ */ O(kt, e.schema);
|
|
2544
2555
|
if (!t.success) throw new F("The table schema is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2545
|
-
let n = /* @__PURE__ */ O(
|
|
2556
|
+
let n = /* @__PURE__ */ O(At, e.dialect ?? {});
|
|
2546
2557
|
if (!n.success) throw new F("The table dialect is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
|
|
2547
2558
|
let r = t.output.fields.map((e) => {
|
|
2548
|
-
let t =
|
|
2559
|
+
let t = Pt(e.type, e.format);
|
|
2549
2560
|
return {
|
|
2550
2561
|
name: e.name,
|
|
2551
2562
|
label: e.title,
|
|
@@ -2563,18 +2574,18 @@ function jt(e) {
|
|
|
2563
2574
|
}
|
|
2564
2575
|
};
|
|
2565
2576
|
}
|
|
2566
|
-
function
|
|
2567
|
-
let n = e == null ? void 0 :
|
|
2577
|
+
function Pt(e, t) {
|
|
2578
|
+
let n = e == null ? void 0 : jt[e];
|
|
2568
2579
|
return n == null ? {
|
|
2569
2580
|
dataSubtypeId: void 0,
|
|
2570
2581
|
dataTypeId: void 0
|
|
2571
2582
|
} : t == null || n.dataTypeId !== "string" ? n : {
|
|
2572
|
-
dataSubtypeId:
|
|
2583
|
+
dataSubtypeId: Mt[t] ?? "plain",
|
|
2573
2584
|
dataTypeId: "string"
|
|
2574
2585
|
};
|
|
2575
2586
|
}
|
|
2576
2587
|
// src/component/module/connector/index.ts
|
|
2577
|
-
var
|
|
2588
|
+
var Ft = [
|
|
2578
2589
|
{
|
|
2579
2590
|
id: "application",
|
|
2580
2591
|
label: {
|
|
@@ -2603,7 +2614,7 @@ var Nt = [
|
|
|
2603
2614
|
es: "Almacén de Archivos"
|
|
2604
2615
|
}
|
|
2605
2616
|
}
|
|
2606
|
-
],
|
|
2617
|
+
], It = [
|
|
2607
2618
|
{
|
|
2608
2619
|
id: "apiEndpoint",
|
|
2609
2620
|
label: {
|
|
@@ -2625,7 +2636,7 @@ var Nt = [
|
|
|
2625
2636
|
es: "Tabla"
|
|
2626
2637
|
}
|
|
2627
2638
|
}
|
|
2628
|
-
],
|
|
2639
|
+
], Lt = {
|
|
2629
2640
|
auditObjectContent: "Audit Object Content",
|
|
2630
2641
|
closeStore: "Close Store",
|
|
2631
2642
|
createObject: "Create Object",
|
|
@@ -2633,6 +2644,7 @@ var Nt = [
|
|
|
2633
2644
|
dropObject: "Drop Object",
|
|
2634
2645
|
findObject: "Find Object",
|
|
2635
2646
|
getInfo: "Get Info",
|
|
2647
|
+
getObject: "Get Object",
|
|
2636
2648
|
getReadableStream: "Get Readable Stream",
|
|
2637
2649
|
getRecord: "Get Record",
|
|
2638
2650
|
indexObjectStructure: "Index Object Structure",
|
|
@@ -2645,7 +2657,7 @@ var Nt = [
|
|
|
2645
2657
|
removeRecords: "Remove Records",
|
|
2646
2658
|
retrieveRecords: "Retrieve Records",
|
|
2647
2659
|
upsertRecords: "Upsert Records"
|
|
2648
|
-
},
|
|
2660
|
+
}, Rt = [
|
|
2649
2661
|
{
|
|
2650
2662
|
id: "bidirectional",
|
|
2651
2663
|
label: {
|
|
@@ -2674,16 +2686,17 @@ var Nt = [
|
|
|
2674
2686
|
es: "Desconocido"
|
|
2675
2687
|
}
|
|
2676
2688
|
}
|
|
2677
|
-
],
|
|
2689
|
+
], zt = /* @__PURE__ */ new Set([
|
|
2678
2690
|
"createObject",
|
|
2679
2691
|
"dropObject",
|
|
2680
2692
|
"loadObjectRecords",
|
|
2681
2693
|
"removeRecords",
|
|
2682
2694
|
"upsertRecords"
|
|
2683
|
-
]),
|
|
2695
|
+
]), Bt = /* @__PURE__ */ new Set([
|
|
2684
2696
|
"auditObjectContent",
|
|
2685
2697
|
"findObject",
|
|
2686
2698
|
"getInfo",
|
|
2699
|
+
"getObject",
|
|
2687
2700
|
"getReadableStream",
|
|
2688
2701
|
"getRecord",
|
|
2689
2702
|
"indexObjectStructure",
|
|
@@ -2693,13 +2706,13 @@ var Nt = [
|
|
|
2693
2706
|
"queryRecords",
|
|
2694
2707
|
"retrieveRecords"
|
|
2695
2708
|
]);
|
|
2696
|
-
function
|
|
2709
|
+
function Vt(e) {
|
|
2697
2710
|
let t = !1, n = !1;
|
|
2698
|
-
for (let r of e)
|
|
2711
|
+
for (let r of e) Bt.has(r) && (t = !0), zt.has(r) && (n = !0);
|
|
2699
2712
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
2700
2713
|
}
|
|
2701
|
-
var
|
|
2702
|
-
let i =
|
|
2714
|
+
var Ht = (e, t = "en") => {
|
|
2715
|
+
let i = Ft.find((t) => t.id === e);
|
|
2703
2716
|
return i ? {
|
|
2704
2717
|
label: r(n(i.label), t) ?? i.id,
|
|
2705
2718
|
description: ""
|
|
@@ -2707,8 +2720,8 @@ var Bt = (e, t = "en") => {
|
|
|
2707
2720
|
label: e,
|
|
2708
2721
|
description: ""
|
|
2709
2722
|
};
|
|
2710
|
-
},
|
|
2711
|
-
let i =
|
|
2723
|
+
}, Ut = (e, t = "en") => {
|
|
2724
|
+
let i = It.find((t) => t.id === e);
|
|
2712
2725
|
return i ? {
|
|
2713
2726
|
label: r(n(i.label), t) ?? i.id,
|
|
2714
2727
|
description: ""
|
|
@@ -2716,8 +2729,8 @@ var Bt = (e, t = "en") => {
|
|
|
2716
2729
|
label: e,
|
|
2717
2730
|
description: ""
|
|
2718
2731
|
};
|
|
2719
|
-
},
|
|
2720
|
-
let i =
|
|
2732
|
+
}, Wt = (e, t = "en") => {
|
|
2733
|
+
let i = Rt.find((t) => t.id === e);
|
|
2721
2734
|
return i ? {
|
|
2722
2735
|
label: r(n(i.label), t) ?? i.id,
|
|
2723
2736
|
description: ""
|
|
@@ -2726,36 +2739,36 @@ var Bt = (e, t = "en") => {
|
|
|
2726
2739
|
description: ""
|
|
2727
2740
|
};
|
|
2728
2741
|
};
|
|
2729
|
-
function
|
|
2742
|
+
function Gt(e) {
|
|
2730
2743
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
2731
2744
|
n += "|:----|:-------:|\n";
|
|
2732
|
-
for (let e of Object.keys(
|
|
2745
|
+
for (let e of Object.keys(Lt)) n += `| ${Lt[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
2733
2746
|
return n;
|
|
2734
2747
|
}
|
|
2735
2748
|
// src/component/module/cookbook/cookbookConfig.schema.ts
|
|
2736
|
-
var
|
|
2749
|
+
var Kt = A(["list"]), qt = /* @__PURE__ */ C({
|
|
2737
2750
|
...M,
|
|
2738
2751
|
typeId: /* @__PURE__ */ _("cookbook"),
|
|
2739
|
-
actionNames: /* @__PURE__ */ h(
|
|
2752
|
+
actionNames: /* @__PURE__ */ h(Kt),
|
|
2740
2753
|
recipes: /* @__PURE__ */ h(oe)
|
|
2741
2754
|
});
|
|
2742
2755
|
// src/component/module/engine/index.ts
|
|
2743
|
-
function
|
|
2756
|
+
function Jt(e) {
|
|
2744
2757
|
return e.signal ?? new AbortController().signal;
|
|
2745
2758
|
}
|
|
2746
2759
|
// src/component/module/presenter/presenterConfig.schema.ts
|
|
2747
|
-
var
|
|
2760
|
+
var Yt = A([
|
|
2748
2761
|
"list",
|
|
2749
2762
|
"render",
|
|
2750
2763
|
"setColorMode"
|
|
2751
|
-
]),
|
|
2764
|
+
]), Xt = /* @__PURE__ */ C({
|
|
2752
2765
|
...M,
|
|
2753
2766
|
typeId: /* @__PURE__ */ _("presenter"),
|
|
2754
|
-
actionNames: /* @__PURE__ */ h(
|
|
2767
|
+
actionNames: /* @__PURE__ */ h(Yt),
|
|
2755
2768
|
presentations: /* @__PURE__ */ h(oe)
|
|
2756
|
-
}),
|
|
2757
|
-
async function
|
|
2758
|
-
let i = e.id, a = `${
|
|
2769
|
+
}), Zt = "https://engine-eu.dpuse.app/presenters";
|
|
2770
|
+
async function Qt(e, t, n, r) {
|
|
2771
|
+
let i = e.id, a = `${Zt}/${i.split("-").slice(2).join("-")}_v${e.version}/${i}.es.js`;
|
|
2759
2772
|
try {
|
|
2760
2773
|
return new (await (import(
|
|
2761
2774
|
/* @vite-ignore */
|
|
@@ -2771,7 +2784,7 @@ async function Xt(e, t, n, r) {
|
|
|
2771
2784
|
}
|
|
2772
2785
|
}
|
|
2773
2786
|
// src/locale/index.ts
|
|
2774
|
-
function
|
|
2787
|
+
function $t(e, t) {
|
|
2775
2788
|
return {
|
|
2776
2789
|
...e,
|
|
2777
2790
|
label: e.label[t] ?? e.id,
|
|
@@ -2779,7 +2792,7 @@ function Zt(e, t) {
|
|
|
2779
2792
|
verb: e.verb?.[t] ?? void 0
|
|
2780
2793
|
};
|
|
2781
2794
|
}
|
|
2782
|
-
function
|
|
2795
|
+
function en(e, t, n = !1) {
|
|
2783
2796
|
let r = e.map((e) => ({
|
|
2784
2797
|
...e,
|
|
2785
2798
|
label: e.label[t] ?? e.id,
|
|
@@ -2788,7 +2801,7 @@ function Qt(e, t, n = !1) {
|
|
|
2788
2801
|
}));
|
|
2789
2802
|
return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
|
|
2790
2803
|
}
|
|
2791
|
-
function
|
|
2804
|
+
function tn(e, t) {
|
|
2792
2805
|
return {
|
|
2793
2806
|
...e,
|
|
2794
2807
|
label: e.label[t] ?? e.id,
|
|
@@ -2796,7 +2809,7 @@ function $t(e, t) {
|
|
|
2796
2809
|
};
|
|
2797
2810
|
}
|
|
2798
2811
|
// src/utilities/index.ts
|
|
2799
|
-
var
|
|
2812
|
+
var nn = /* @__PURE__ */ new Map([
|
|
2800
2813
|
["arrow", "application/vnd.apache.arrow.file"],
|
|
2801
2814
|
["avro", "application/vnd.apache.avro"],
|
|
2802
2815
|
["bin", "application/octet-stream"],
|
|
@@ -2823,14 +2836,14 @@ var en = /* @__PURE__ */ new Map([
|
|
|
2823
2836
|
["minute", 6e4],
|
|
2824
2837
|
["second", 1e3],
|
|
2825
2838
|
["millisecond", 1]
|
|
2826
|
-
],
|
|
2839
|
+
], rn = [
|
|
2827
2840
|
["byte", 1],
|
|
2828
2841
|
["KiB", 1024],
|
|
2829
2842
|
["MiB", 1048576],
|
|
2830
2843
|
["GiB", 1073741824],
|
|
2831
2844
|
["TiB", 1099511627776]
|
|
2832
|
-
],
|
|
2833
|
-
function
|
|
2845
|
+
], an = /* @__PURE__ */ new Map(), on = /* @__PURE__ */ new Map();
|
|
2846
|
+
function sn(e, t = 2, n = t, r = Z) {
|
|
2834
2847
|
return e == null ? "" : $(r, {
|
|
2835
2848
|
localeMatcher: "best fit",
|
|
2836
2849
|
maximumFractionDigits: t,
|
|
@@ -2840,18 +2853,18 @@ function an(e, t = 2, n = t, r = Z) {
|
|
|
2840
2853
|
useGrouping: !0
|
|
2841
2854
|
}).format(e);
|
|
2842
2855
|
}
|
|
2843
|
-
function
|
|
2844
|
-
return
|
|
2856
|
+
function cn(e, t = Z) {
|
|
2857
|
+
return sn(e, 0, 0, t);
|
|
2845
2858
|
}
|
|
2846
|
-
function
|
|
2859
|
+
function ln(e, t = 1, n = Z) {
|
|
2847
2860
|
return e == null || !Number.isFinite(e) ? "" : $(n, {
|
|
2848
2861
|
maximumFractionDigits: t,
|
|
2849
2862
|
notation: "compact"
|
|
2850
2863
|
}).format(e);
|
|
2851
2864
|
}
|
|
2852
|
-
function
|
|
2865
|
+
function un(e, t = 1, n = Z) {
|
|
2853
2866
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2854
|
-
let [r, i] =
|
|
2867
|
+
let [r, i] = rn.find(([, n]) => yn(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["TiB", 1099511627776];
|
|
2855
2868
|
return i === 1 ? $(n, {
|
|
2856
2869
|
maximumFractionDigits: 0,
|
|
2857
2870
|
style: "unit",
|
|
@@ -2859,7 +2872,7 @@ function cn(e, t = 1, n = Z) {
|
|
|
2859
2872
|
unitDisplay: "long"
|
|
2860
2873
|
}).format(e) : `${$(n, { maximumFractionDigits: t }).format(e / i)} ${r}`;
|
|
2861
2874
|
}
|
|
2862
|
-
function
|
|
2875
|
+
function dn(e, t = "millisecond", n = Z) {
|
|
2863
2876
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2864
2877
|
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 = [];
|
|
2865
2878
|
for (let [t, i] of s) {
|
|
@@ -2873,25 +2886,25 @@ function ln(e, t = "millisecond", n = Z) {
|
|
|
2873
2886
|
unitDisplay: "short"
|
|
2874
2887
|
}).format(o));
|
|
2875
2888
|
}
|
|
2876
|
-
return
|
|
2889
|
+
return vn(n).format(c);
|
|
2877
2890
|
}
|
|
2878
|
-
function
|
|
2891
|
+
function fn(e) {
|
|
2879
2892
|
if (!e) return;
|
|
2880
|
-
let t =
|
|
2893
|
+
let t = _n(e);
|
|
2881
2894
|
return t === void 0 ? e : e.slice(0, t);
|
|
2882
2895
|
}
|
|
2883
|
-
function
|
|
2896
|
+
function pn(e) {
|
|
2884
2897
|
if (!e) return;
|
|
2885
|
-
let t =
|
|
2898
|
+
let t = _n(e);
|
|
2886
2899
|
return t === void 0 ? void 0 : e.slice(t + 1);
|
|
2887
2900
|
}
|
|
2888
|
-
function
|
|
2889
|
-
return e != null &&
|
|
2901
|
+
function mn(e) {
|
|
2902
|
+
return e != null && nn.has(e.toLowerCase());
|
|
2890
2903
|
}
|
|
2891
|
-
function
|
|
2892
|
-
return (e == null ? void 0 :
|
|
2904
|
+
function hn(e) {
|
|
2905
|
+
return (e == null ? void 0 : nn.get(e.toLowerCase())) ?? "application/octet-stream";
|
|
2893
2906
|
}
|
|
2894
|
-
function
|
|
2907
|
+
function gn(e) {
|
|
2895
2908
|
switch (e) {
|
|
2896
2909
|
case "Edm.Boolean": return "boolean";
|
|
2897
2910
|
case "Edm.Byte":
|
|
@@ -2912,23 +2925,23 @@ function mn(e) {
|
|
|
2912
2925
|
default: return "unknown";
|
|
2913
2926
|
}
|
|
2914
2927
|
}
|
|
2915
|
-
function
|
|
2928
|
+
function _n(e) {
|
|
2916
2929
|
let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
|
|
2917
2930
|
return n > t && n < e.length - 1 ? n : void 0;
|
|
2918
2931
|
}
|
|
2919
|
-
function
|
|
2920
|
-
let t =
|
|
2932
|
+
function vn(e) {
|
|
2933
|
+
let t = an.get(e);
|
|
2921
2934
|
return t || (t = new Intl.ListFormat(e, {
|
|
2922
2935
|
style: "narrow",
|
|
2923
2936
|
type: "unit"
|
|
2924
|
-
}),
|
|
2937
|
+
}), an.set(e, t)), t;
|
|
2925
2938
|
}
|
|
2926
2939
|
function $(e, t) {
|
|
2927
|
-
let n = `${e}|${JSON.stringify(t)}`, r =
|
|
2928
|
-
return r || (r = new Intl.NumberFormat(e, t),
|
|
2940
|
+
let n = `${e}|${JSON.stringify(t)}`, r = on.get(n);
|
|
2941
|
+
return r || (r = new Intl.NumberFormat(e, t), on.set(n, r)), r;
|
|
2929
2942
|
}
|
|
2930
|
-
function
|
|
2943
|
+
function yn(e, t) {
|
|
2931
2944
|
let n = 10 ** t;
|
|
2932
2945
|
return Math.round(e * n) / n;
|
|
2933
2946
|
}
|
|
2934
|
-
export {
|
|
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, Ue as ENCODING_GROUP_CONFIG_MAP, V as ENCODING_TYPE_CONFIG_MAP, ke as EngineError, L as FetchError, t as SUPPORTED_LANGUAGES, H as TOOL_NAME_PREFIX, j as VALUE_DELIMITER_CONFIGS, Ot as acquireWebLock, dt as auditObjectContentWithParser, Ae as buildFetchError, lt as buildPreviewObjectResult, ce as componentInstanceConfigSchema, je as concatenateSerialisedErrorMessages, Se as connectorConfigSchema, Ht as constructConnectorCategoryConfig, Ut as constructConnectorItemTypeConfig, Wt as constructConnectorUsageConfig, St as constructStoreError, gn as convertODataTypeIdToUsageTypeId, Et as convertStoreRecordToParsedRecord, Dt as convertStoreValueToText, qt as cookbookConfigSchema, n as createLabelMap, Vt as determineConnectorUsageId, pn as extractExtensionFromPath, fn as extractPathWithoutExtension, Ct as findStoreErrorId, sn as formatNumberAsDecimalNumber, dn as formatNumberAsDuration, ln as formatNumberAsSize, un as formatNumberAsStorageSize, cn as formatNumberAsWholeNumber, ue as getComponentStatus, Gt as getConnectorActionsTable, Ke as getEncodingTypeConfigs, me as getValueDelimiterCharacter, mn as hasMimeTypeForExtension, Me as ignoreErrors, ft as indexObjectStructureWithParser, We as isEncodingTypeId, pt as listObjectStructureEntriesWithParser, U as listParserToolConfigs, Qt as loadPresenter, at as loadTool, $t as localiseConfig, en as localiseConfigs, tn as localiseReference, hn as lookupMimeTypeForExtension, R as normalizeToError, Ze as parseDelimitedText, Xt as presenterConfigSchema, Nt as readTableSchema, Ge as resolveDecoderId, r as resolveLabel, W as resolveParserToolConfig, Jt as resolveRequestSignal, Tt as resolveStorePath, ut as retrieveRecordsWithParser, Ne as serialiseError, Xe as toolConfigSchema, Pe as unserialiseError };
|