@sinequa/atomic 2.5.0 → 2.6.0
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/atomic.cjs +1 -1
- package/dist/atomic.js +2 -2
- package/dist/helpers/filters.d.ts +23 -0
- package/dist/helpers/filters.d.ts.map +1 -1
- package/dist/spfx/index.cjs +1 -1
- package/dist/spfx/index.js +2 -2
- package/dist/src-C_FBvs_m.cjs +1 -0
- package/dist/{src-vDryIxd0.js → src-DWffZxoZ.js} +223 -216
- package/package.json +1 -1
- package/dist/src-BcyahlCg.cjs +0 -1
|
@@ -1102,16 +1102,23 @@ function Kt(e) {
|
|
|
1102
1102
|
default: return;
|
|
1103
1103
|
}
|
|
1104
1104
|
}
|
|
1105
|
+
function qt(e) {
|
|
1106
|
+
let t = [];
|
|
1107
|
+
function n(e) {
|
|
1108
|
+
for (let r of e) r.value ? (t.push(r.value), r.display && t.push(r.display)) : r.values && t.push(...r.values), r.filters && n(r.filters);
|
|
1109
|
+
}
|
|
1110
|
+
return n(e), t;
|
|
1111
|
+
}
|
|
1105
1112
|
//#endregion
|
|
1106
1113
|
//#region src/helpers/metadata.ts
|
|
1107
|
-
function
|
|
1114
|
+
function Jt(e, t) {
|
|
1108
1115
|
let n = e[t];
|
|
1109
1116
|
return n === void 0 ? [] : (typeof n == "string" && (n = String(n).split(",")), Array.isArray(n) ? n.map((e) => {
|
|
1110
1117
|
if (typeof e == "string") return e.trim();
|
|
1111
1118
|
if (typeof e == "object" && e && "display" in e) return e.display.trim();
|
|
1112
1119
|
}).filter((e) => e !== void 0) : [String(n).trim()]);
|
|
1113
1120
|
}
|
|
1114
|
-
function
|
|
1121
|
+
function Yt(e, t) {
|
|
1115
1122
|
let n = e[t];
|
|
1116
1123
|
if (n === void 0) return [];
|
|
1117
1124
|
if (typeof n == "string" && (n = String(n).split(",")), Array.isArray(n)) return n.map((e) => {
|
|
@@ -1135,7 +1142,7 @@ function Jt(e, t) {
|
|
|
1135
1142
|
}
|
|
1136
1143
|
//#endregion
|
|
1137
1144
|
//#region src/helpers/pagination.ts
|
|
1138
|
-
function
|
|
1145
|
+
function Xt(e) {
|
|
1139
1146
|
let { page: t, pageSize: n, rowCount: r } = e;
|
|
1140
1147
|
return t === void 0 || !n || r === void 0 ? {
|
|
1141
1148
|
nextPage: void 0,
|
|
@@ -1150,32 +1157,32 @@ function Yt(e) {
|
|
|
1150
1157
|
function G(e) {
|
|
1151
1158
|
return typeof e == "object" && !!e;
|
|
1152
1159
|
}
|
|
1153
|
-
function Xt(e) {
|
|
1154
|
-
return G(e) && Object.prototype.toString.call(e) === "[object ArrayBuffer]";
|
|
1155
|
-
}
|
|
1156
1160
|
function Zt(e) {
|
|
1157
|
-
return G(e) && Object.prototype.toString.call(e) === "[object
|
|
1161
|
+
return G(e) && Object.prototype.toString.call(e) === "[object ArrayBuffer]";
|
|
1158
1162
|
}
|
|
1159
1163
|
function Qt(e) {
|
|
1160
|
-
return Object.prototype.toString.call(e) === "[object
|
|
1164
|
+
return G(e) && Object.prototype.toString.call(e) === "[object Blob]";
|
|
1161
1165
|
}
|
|
1162
1166
|
function $t(e) {
|
|
1163
|
-
return
|
|
1167
|
+
return Object.prototype.toString.call(e) === "[object Date]";
|
|
1164
1168
|
}
|
|
1165
1169
|
function en(e) {
|
|
1166
|
-
return
|
|
1170
|
+
return typeof e == "string";
|
|
1167
1171
|
}
|
|
1168
1172
|
function tn(e) {
|
|
1173
|
+
return (G(e) || Array.isArray(e)) && !Zt(e) && !Qt(e) && !en(e);
|
|
1174
|
+
}
|
|
1175
|
+
function nn(e) {
|
|
1169
1176
|
return e ? (e.getHours() * 60 * 60 + e.getMinutes() * 60 + e.getSeconds()) * 1e3 + e.getMilliseconds() : 0;
|
|
1170
1177
|
}
|
|
1171
|
-
function
|
|
1178
|
+
function rn(e = !0) {
|
|
1172
1179
|
let t = Date.now();
|
|
1173
1180
|
return (e ? "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" : "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx").replace(/[xy]/g, (e) => {
|
|
1174
1181
|
let n = (t + Math.random() * 16) % 16 | 0;
|
|
1175
1182
|
return t = Math.floor(t / 16), (e === "x" ? n : n & 3 | 8).toString(16);
|
|
1176
1183
|
});
|
|
1177
1184
|
}
|
|
1178
|
-
function
|
|
1185
|
+
function an(e) {
|
|
1179
1186
|
if (!e) return "``";
|
|
1180
1187
|
if (e = String(e), e.search(/[\\`]/) === -1) return `\`${e}\``;
|
|
1181
1188
|
let t = ["`"];
|
|
@@ -1185,13 +1192,13 @@ function rn(e) {
|
|
|
1185
1192
|
}
|
|
1186
1193
|
return t.push("`"), t.join("");
|
|
1187
1194
|
}
|
|
1188
|
-
async function
|
|
1195
|
+
async function on(e) {
|
|
1189
1196
|
let t = globalThis.crypto?.subtle;
|
|
1190
1197
|
if (typeof t?.digest != "function") throw Error("sha512 requires the Web Crypto API, and `crypto.subtle` is unavailable here. That usually means an insecure context: it is exposed over HTTPS and on localhost, but not over plain HTTP. Serve the application over HTTPS.");
|
|
1191
1198
|
let n = await t.digest("SHA-512", new TextEncoder().encode(e));
|
|
1192
1199
|
return Array.from(new Uint8Array(n), (e) => e.toString(16).padStart(2, "0")).join("");
|
|
1193
1200
|
}
|
|
1194
|
-
function
|
|
1201
|
+
function sn(e, t = 0) {
|
|
1195
1202
|
let n = 3735928559 ^ t, r = 1103547991 ^ t;
|
|
1196
1203
|
for (let t = 0; t < e.length; t++) {
|
|
1197
1204
|
let i = e.charCodeAt(t);
|
|
@@ -1201,12 +1208,12 @@ function on(e, t = 0) {
|
|
|
1201
1208
|
}
|
|
1202
1209
|
//#endregion
|
|
1203
1210
|
//#region src/web-api/v1/fetch-audit.ts
|
|
1204
|
-
var
|
|
1211
|
+
var cn, ln;
|
|
1205
1212
|
function K(e, t = !0) {
|
|
1206
|
-
let n =
|
|
1207
|
-
n && (
|
|
1213
|
+
let n = un(e.$auditRecord);
|
|
1214
|
+
n && (dn(n), t && fn(n)), e.$auditRecord = n;
|
|
1208
1215
|
}
|
|
1209
|
-
function
|
|
1216
|
+
function un(e) {
|
|
1210
1217
|
if (!e) return;
|
|
1211
1218
|
let t;
|
|
1212
1219
|
if (Array.isArray(e)) t = e;
|
|
@@ -1217,35 +1224,35 @@ function ln(e) {
|
|
|
1217
1224
|
}
|
|
1218
1225
|
return { auditEvents: t };
|
|
1219
1226
|
}
|
|
1220
|
-
function
|
|
1221
|
-
let t =
|
|
1227
|
+
function dn(e) {
|
|
1228
|
+
let t = pn();
|
|
1222
1229
|
return e.auditEvents?.forEach((e) => {
|
|
1223
1230
|
e.detail ||= {}, e.detail.sessionid = t;
|
|
1224
1231
|
}), e;
|
|
1225
1232
|
}
|
|
1226
|
-
function
|
|
1233
|
+
function fn(e) {
|
|
1227
1234
|
let t = typeof window < "u" ? decodeURIComponent(window.location.href) : "http://localhost";
|
|
1228
1235
|
return e?.auditEvents?.forEach((e) => {
|
|
1229
1236
|
e.detail ||= {}, e.detail.url = t;
|
|
1230
1237
|
}), e;
|
|
1231
1238
|
}
|
|
1232
|
-
function fn() {
|
|
1233
|
-
return (!sn || pn()) && (sn = nn()), cn = /* @__PURE__ */ new Date(), sn;
|
|
1234
|
-
}
|
|
1235
1239
|
function pn() {
|
|
1236
|
-
return
|
|
1240
|
+
return (!cn || mn()) && (cn = rn()), ln = /* @__PURE__ */ new Date(), cn;
|
|
1237
1241
|
}
|
|
1238
|
-
|
|
1242
|
+
function mn() {
|
|
1243
|
+
return Date.now() - ln.getTime() > 600 * 1e3;
|
|
1244
|
+
}
|
|
1245
|
+
async function hn(e, t = !0, n = g) {
|
|
1239
1246
|
let r = {
|
|
1240
1247
|
event: B.None,
|
|
1241
1248
|
$auditRecord: e
|
|
1242
1249
|
};
|
|
1243
1250
|
return K(r, t), P(n, "api/v1/audit.notify", r, { noRecovery: !0 });
|
|
1244
1251
|
}
|
|
1245
|
-
var
|
|
1252
|
+
var gn = { notify: hn };
|
|
1246
1253
|
//#endregion
|
|
1247
1254
|
//#region src/web-api/v1/fetch-aggregation.ts
|
|
1248
|
-
async function
|
|
1255
|
+
async function _n(e, t, n, r, i = g) {
|
|
1249
1256
|
let a = r ?? Pt(e.name, t, i.config.aggregationCounts), o = e.items?.length || 0, s = {
|
|
1250
1257
|
query: {
|
|
1251
1258
|
...t,
|
|
@@ -1263,24 +1270,24 @@ async function gn(e, t, n, r, i = g) {
|
|
|
1263
1270
|
}
|
|
1264
1271
|
//#endregion
|
|
1265
1272
|
//#region src/web-api/v1/fetch-dataset.ts
|
|
1266
|
-
async function
|
|
1273
|
+
async function vn(e, t, n = {}, r = g) {
|
|
1267
1274
|
let i = await P(r, `api/v1/search.dataset/${e}/${t}`, { parameters: n }), a = t[0].toLowerCase() + t.slice(1), o = i.datasets[a];
|
|
1268
1275
|
if ("errorCode" in o && "errorMessage" in o) throw Error(o.errorMessage);
|
|
1269
1276
|
return o;
|
|
1270
1277
|
}
|
|
1271
|
-
async function
|
|
1278
|
+
async function yn(e, t, n = g) {
|
|
1272
1279
|
let r = `api/v1/search.dataset/${e}`, { parameters: i = {}, datasets: a = [] } = t;
|
|
1273
1280
|
return (await P(n, r, {
|
|
1274
1281
|
parameters: i,
|
|
1275
1282
|
datasets: a
|
|
1276
1283
|
})).datasets;
|
|
1277
1284
|
}
|
|
1278
|
-
async function
|
|
1285
|
+
async function bn(e, t = g) {
|
|
1279
1286
|
return await I(t, `api/v1/search.dataset/${e}`);
|
|
1280
1287
|
}
|
|
1281
1288
|
//#endregion
|
|
1282
1289
|
//#region src/web-api/v1/fetch-labels.ts
|
|
1283
|
-
async function
|
|
1290
|
+
async function xn(e, t = !0, n, r = g) {
|
|
1284
1291
|
try {
|
|
1285
1292
|
return (await P(r, "api/v1/labels", {
|
|
1286
1293
|
action: "list",
|
|
@@ -1293,7 +1300,7 @@ async function bn(e, t = !0, n, r = g) {
|
|
|
1293
1300
|
throw l("Error in fetchLabels", e), e;
|
|
1294
1301
|
}
|
|
1295
1302
|
}
|
|
1296
|
-
async function
|
|
1303
|
+
async function Sn(e = g) {
|
|
1297
1304
|
try {
|
|
1298
1305
|
let { app: t = "" } = e.config;
|
|
1299
1306
|
return await I(e, "api/v1/labels", new URLSearchParams({
|
|
@@ -1304,7 +1311,7 @@ async function xn(e = g) {
|
|
|
1304
1311
|
throw l("Error in getUserRights", e), e;
|
|
1305
1312
|
}
|
|
1306
1313
|
}
|
|
1307
|
-
async function
|
|
1314
|
+
async function Cn(e, t, n = !0, r = g) {
|
|
1308
1315
|
try {
|
|
1309
1316
|
let i = {
|
|
1310
1317
|
action: "add",
|
|
@@ -1331,7 +1338,7 @@ async function Sn(e, t, n = !0, r = g) {
|
|
|
1331
1338
|
throw l("Error in add", e), e;
|
|
1332
1339
|
}
|
|
1333
1340
|
}
|
|
1334
|
-
async function
|
|
1341
|
+
async function wn(e, t, n = !0, r = g) {
|
|
1335
1342
|
try {
|
|
1336
1343
|
let i = {
|
|
1337
1344
|
action: "remove",
|
|
@@ -1358,7 +1365,7 @@ async function Cn(e, t, n = !0, r = g) {
|
|
|
1358
1365
|
throw l("Error in remove", e), e;
|
|
1359
1366
|
}
|
|
1360
1367
|
}
|
|
1361
|
-
async function
|
|
1368
|
+
async function Tn(e, t, n = !0, r = g) {
|
|
1362
1369
|
try {
|
|
1363
1370
|
let i = {
|
|
1364
1371
|
action: "rename",
|
|
@@ -1379,7 +1386,7 @@ async function wn(e, t, n = !0, r = g) {
|
|
|
1379
1386
|
throw l("Error in rename", e), e;
|
|
1380
1387
|
}
|
|
1381
1388
|
}
|
|
1382
|
-
async function
|
|
1389
|
+
async function En(e, t = !0, n = g) {
|
|
1383
1390
|
try {
|
|
1384
1391
|
let r = {
|
|
1385
1392
|
action: "delete",
|
|
@@ -1398,7 +1405,7 @@ async function Tn(e, t = !0, n = g) {
|
|
|
1398
1405
|
throw l("Error in deleteLabels", e), e;
|
|
1399
1406
|
}
|
|
1400
1407
|
}
|
|
1401
|
-
async function
|
|
1408
|
+
async function Dn(e, t, n = !0, r = g) {
|
|
1402
1409
|
try {
|
|
1403
1410
|
let i = {
|
|
1404
1411
|
action: "bulkAdd",
|
|
@@ -1419,7 +1426,7 @@ async function En(e, t, n = !0, r = g) {
|
|
|
1419
1426
|
throw l("Error in bulkAdd", e), e;
|
|
1420
1427
|
}
|
|
1421
1428
|
}
|
|
1422
|
-
async function
|
|
1429
|
+
async function On(e, t, n = !0, r = g) {
|
|
1423
1430
|
try {
|
|
1424
1431
|
let i = {
|
|
1425
1432
|
action: "bulkRemove",
|
|
@@ -1441,17 +1448,17 @@ async function Dn(e, t, n = !0, r = g) {
|
|
|
1441
1448
|
}
|
|
1442
1449
|
}
|
|
1443
1450
|
var q = {
|
|
1444
|
-
getUserRights:
|
|
1445
|
-
add:
|
|
1446
|
-
remove:
|
|
1447
|
-
rename:
|
|
1448
|
-
delete:
|
|
1449
|
-
bulkAdd:
|
|
1450
|
-
bulkRemove:
|
|
1451
|
+
getUserRights: Sn,
|
|
1452
|
+
add: Cn,
|
|
1453
|
+
remove: wn,
|
|
1454
|
+
rename: Tn,
|
|
1455
|
+
delete: En,
|
|
1456
|
+
bulkAdd: Dn,
|
|
1457
|
+
bulkRemove: On
|
|
1451
1458
|
};
|
|
1452
1459
|
//#endregion
|
|
1453
1460
|
//#region src/web-api/v1/fetch-preview.ts
|
|
1454
|
-
async function
|
|
1461
|
+
async function kn(e, t, n = g) {
|
|
1455
1462
|
if (typeof window > "u") return P(n, "api/v1/preview", {
|
|
1456
1463
|
action: "get",
|
|
1457
1464
|
id: e,
|
|
@@ -1468,7 +1475,7 @@ async function On(e, t, n = g) {
|
|
|
1468
1475
|
browserUrl: r
|
|
1469
1476
|
});
|
|
1470
1477
|
}
|
|
1471
|
-
async function
|
|
1478
|
+
async function An(e, t = g) {
|
|
1472
1479
|
return M(t, /^[a-z][a-z0-9+.-]*:\/\//i.test(e) ? e : D(t, e.replace(/^\//, "")), {
|
|
1473
1480
|
method: "GET",
|
|
1474
1481
|
headers: E(t)
|
|
@@ -1476,58 +1483,58 @@ async function kn(e, t = g) {
|
|
|
1476
1483
|
}
|
|
1477
1484
|
//#endregion
|
|
1478
1485
|
//#region src/web-api/v1/fetch-principal.ts
|
|
1479
|
-
async function
|
|
1486
|
+
async function jn(e, t = g) {
|
|
1480
1487
|
return I(t, "api/v1/principal", new URLSearchParams({ action: "get" }), {
|
|
1481
1488
|
noAutoAuthentication: j(t),
|
|
1482
1489
|
...e
|
|
1483
1490
|
});
|
|
1484
1491
|
}
|
|
1485
|
-
async function
|
|
1492
|
+
async function Mn(e, t = g) {
|
|
1486
1493
|
let n = new URLSearchParams();
|
|
1487
1494
|
return Object.entries(e).forEach(([e, t]) => {
|
|
1488
1495
|
t !== void 0 && n.append(e, String(t));
|
|
1489
1496
|
}), I(t, "api/v1/principal/list", n, { noAutoAuthentication: j(t) });
|
|
1490
1497
|
}
|
|
1491
|
-
async function
|
|
1498
|
+
async function Nn(e, t = g) {
|
|
1492
1499
|
return e ? I(t, "api/v1/principal", new URLSearchParams({
|
|
1493
1500
|
action: "userid",
|
|
1494
1501
|
userid: e
|
|
1495
1502
|
}), { noAutoAuthentication: j(t) }) : Promise.reject(/* @__PURE__ */ Error("userid is required"));
|
|
1496
1503
|
}
|
|
1497
|
-
async function
|
|
1504
|
+
async function Pn(e, t = g) {
|
|
1498
1505
|
return e.length === 0 ? Promise.reject(/* @__PURE__ */ Error("userids is required")) : I(t, "api/v1/principal/userids", new URLSearchParams({ userids: [...e].join(",") }), { noAutoAuthentication: j(t) });
|
|
1499
1506
|
}
|
|
1500
|
-
var
|
|
1501
|
-
get:
|
|
1502
|
-
list:
|
|
1503
|
-
userid:
|
|
1504
|
-
userids:
|
|
1507
|
+
var Fn = { principal: {
|
|
1508
|
+
get: jn,
|
|
1509
|
+
list: Mn,
|
|
1510
|
+
userid: Nn,
|
|
1511
|
+
userids: Pn
|
|
1505
1512
|
} };
|
|
1506
1513
|
//#endregion
|
|
1507
1514
|
//#region src/web-api/v1/fetch-query.ts
|
|
1508
|
-
function
|
|
1515
|
+
function In(e, t, n) {
|
|
1509
1516
|
let r = n.config.aggregationCounts;
|
|
1510
1517
|
e.aggregations?.forEach((e) => {
|
|
1511
|
-
e.$hasMore = Ft(e, Pt(e.name, t, r)), e.isTree &&
|
|
1518
|
+
e.$hasMore = Ft(e, Pt(e.name, t, r)), e.isTree && zn(e);
|
|
1512
1519
|
});
|
|
1513
1520
|
}
|
|
1514
|
-
async function
|
|
1521
|
+
async function Ln(e, t, n, r = g) {
|
|
1515
1522
|
let i = await P(r, "api/v1/query", {
|
|
1516
1523
|
query: e,
|
|
1517
1524
|
$auditRecord: t,
|
|
1518
1525
|
queryIntentData: n
|
|
1519
1526
|
});
|
|
1520
|
-
|
|
1527
|
+
In(i, e, r), i.records?.map((e) => Object.assign(e, {
|
|
1521
1528
|
value: e.title,
|
|
1522
1529
|
type: "default"
|
|
1523
1530
|
}));
|
|
1524
1531
|
let a = {
|
|
1525
1532
|
...i,
|
|
1526
|
-
...
|
|
1533
|
+
...Xt(i)
|
|
1527
1534
|
};
|
|
1528
1535
|
return Promise.resolve(a);
|
|
1529
1536
|
}
|
|
1530
|
-
async function
|
|
1537
|
+
async function Rn(e, t, n, r = g) {
|
|
1531
1538
|
let { app: i = "" } = r.config, a = {
|
|
1532
1539
|
methods: [],
|
|
1533
1540
|
mode: t,
|
|
@@ -1541,7 +1548,7 @@ async function Ln(e, t, n, r = g) {
|
|
|
1541
1548
|
});
|
|
1542
1549
|
let o = await P(r, "api/v1/multi", a);
|
|
1543
1550
|
o.results.forEach((t, n) => {
|
|
1544
|
-
|
|
1551
|
+
In(t, e[n], r);
|
|
1545
1552
|
}), o.results.forEach((e) => {
|
|
1546
1553
|
e.records?.map((e) => Object.assign(e, {
|
|
1547
1554
|
value: e.title,
|
|
@@ -1550,23 +1557,23 @@ async function Ln(e, t, n, r = g) {
|
|
|
1550
1557
|
});
|
|
1551
1558
|
let s = o.results.map((e) => ({
|
|
1552
1559
|
...e,
|
|
1553
|
-
...
|
|
1560
|
+
...Xt(e)
|
|
1554
1561
|
}));
|
|
1555
1562
|
return Promise.resolve(s);
|
|
1556
1563
|
}
|
|
1557
|
-
function
|
|
1564
|
+
function zn(e, t = "", n = 0) {
|
|
1558
1565
|
let r = [];
|
|
1559
1566
|
return e.items && e.items.forEach((e) => {
|
|
1560
1567
|
let i = t ? `${t}/${e.value}` : e.value, a = n + 1;
|
|
1561
1568
|
r.push({
|
|
1562
1569
|
path: i,
|
|
1563
1570
|
level: a
|
|
1564
|
-
}), e.$path = i, e.$level = a, e.hasChildren ? r = r.concat(
|
|
1571
|
+
}), e.$path = i, e.$level = a, e.hasChildren ? r = r.concat(zn(e, i, a)) : e.hasChildren = !1;
|
|
1565
1572
|
}), r;
|
|
1566
1573
|
}
|
|
1567
1574
|
//#endregion
|
|
1568
1575
|
//#region src/web-api/v1/fetch-query-export.ts
|
|
1569
|
-
async function
|
|
1576
|
+
async function Bn({ model: e, appName: t, query: n, article: r }, i = g) {
|
|
1570
1577
|
let { webservice: a, format: o, maxcount: s, exportedColumns: c, export: l } = e, u = {
|
|
1571
1578
|
app: t,
|
|
1572
1579
|
webservice: a,
|
|
@@ -1584,17 +1591,17 @@ async function zn({ model: e, appName: t, query: n, article: r }, i = g) {
|
|
|
1584
1591
|
}
|
|
1585
1592
|
//#endregion
|
|
1586
1593
|
//#region src/web-api/v1/fetch-query-intent.ts
|
|
1587
|
-
async function
|
|
1594
|
+
async function Vn(e, t = g) {
|
|
1588
1595
|
return (await P(t, "api/v1/queryintent", { query: e }))?.intents;
|
|
1589
1596
|
}
|
|
1590
1597
|
//#endregion
|
|
1591
1598
|
//#region src/web-api/v1/fetch-security-principal.ts
|
|
1592
|
-
function
|
|
1599
|
+
function Hn(e, t, n = g) {
|
|
1593
1600
|
return P(n, "api/v1/security.principal", e, { signal: t });
|
|
1594
1601
|
}
|
|
1595
1602
|
//#endregion
|
|
1596
1603
|
//#region src/web-api/v1/fetch-similar-documents.ts
|
|
1597
|
-
async function
|
|
1604
|
+
async function Un(e, t, n, r = g) {
|
|
1598
1605
|
return (await P(r, "api/v1/similardocuments", {
|
|
1599
1606
|
sourceDocumentId: e,
|
|
1600
1607
|
query: { name: t }
|
|
@@ -1602,7 +1609,7 @@ async function Hn(e, t, n, r = g) {
|
|
|
1602
1609
|
}
|
|
1603
1610
|
//#endregion
|
|
1604
1611
|
//#region src/web-api/v1/fetch-sponsored-links.ts
|
|
1605
|
-
async function
|
|
1612
|
+
async function Wn(e, t, n = g) {
|
|
1606
1613
|
return (await P(n, "api/v1/query.links", {
|
|
1607
1614
|
webservice: e,
|
|
1608
1615
|
query: t
|
|
@@ -1613,9 +1620,9 @@ async function Un(e, t, n = g) {
|
|
|
1613
1620
|
}
|
|
1614
1621
|
//#endregion
|
|
1615
1622
|
//#region src/utils/to-sql.ts
|
|
1616
|
-
function
|
|
1623
|
+
function Gn(e, t) {
|
|
1617
1624
|
if (typeof e == "number") return `${e}`;
|
|
1618
|
-
if (
|
|
1625
|
+
if ($t(e)) return t ? `'${Kn(e)}'` : Kn(e);
|
|
1619
1626
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
1620
1627
|
if (e === null) return "null";
|
|
1621
1628
|
if (Array.isArray(e)) {
|
|
@@ -1626,10 +1633,10 @@ function Wn(e, t) {
|
|
|
1626
1633
|
}
|
|
1627
1634
|
return t ? `'${e}'` : e;
|
|
1628
1635
|
}
|
|
1629
|
-
function
|
|
1636
|
+
function Kn(e) {
|
|
1630
1637
|
if (!e) return "";
|
|
1631
1638
|
try {
|
|
1632
|
-
return
|
|
1639
|
+
return nn(e) === 0 ? new Intl.DateTimeFormat("en-CA", {
|
|
1633
1640
|
year: "numeric",
|
|
1634
1641
|
month: "2-digit",
|
|
1635
1642
|
day: "2-digit"
|
|
@@ -1645,7 +1652,7 @@ function Gn(e) {
|
|
|
1645
1652
|
}
|
|
1646
1653
|
//#endregion
|
|
1647
1654
|
//#region src/web-api/v1/fetch-suggest.ts
|
|
1648
|
-
async function
|
|
1655
|
+
async function qn(e, t, n, r, i, a = g) {
|
|
1649
1656
|
let { app: o } = a.config, s = {
|
|
1650
1657
|
app: o || "",
|
|
1651
1658
|
suggestQuery: e,
|
|
@@ -1660,7 +1667,7 @@ async function Kn(e, t, n, r, i, a = g) {
|
|
|
1660
1667
|
throw console.error("Error fetching suggestions:", e), e;
|
|
1661
1668
|
}
|
|
1662
1669
|
}
|
|
1663
|
-
async function
|
|
1670
|
+
async function Jn(e, t, n, r, i = g) {
|
|
1664
1671
|
let { app: a } = i.config;
|
|
1665
1672
|
return (await P(i, "api/v1/suggestquery", {
|
|
1666
1673
|
app: a || "",
|
|
@@ -1670,7 +1677,7 @@ async function qn(e, t, n, r, i = g) {
|
|
|
1670
1677
|
kinds: r
|
|
1671
1678
|
})).suggests;
|
|
1672
1679
|
}
|
|
1673
|
-
async function
|
|
1680
|
+
async function Yn(e, t, n, r = g) {
|
|
1674
1681
|
if (!t) return Promise.resolve([]);
|
|
1675
1682
|
let { app: i } = r.config, a = await P(r, "api/v1/suggestfield", {
|
|
1676
1683
|
app: i || "",
|
|
@@ -1679,12 +1686,12 @@ async function Jn(e, t, n, r = g) {
|
|
|
1679
1686
|
query: n
|
|
1680
1687
|
});
|
|
1681
1688
|
return a.suggests.forEach((e) => {
|
|
1682
|
-
e.display =
|
|
1689
|
+
e.display = Gn(e.display);
|
|
1683
1690
|
}), a.suggests;
|
|
1684
1691
|
}
|
|
1685
1692
|
//#endregion
|
|
1686
1693
|
//#region src/web-api/v1/fetch-text-chunk.ts
|
|
1687
|
-
async function
|
|
1694
|
+
async function Xn(e, t, n, r, i, a, o = g) {
|
|
1688
1695
|
return P(o, "api/v1/doc.textchunks", {
|
|
1689
1696
|
id: e,
|
|
1690
1697
|
textChunks: t,
|
|
@@ -1696,14 +1703,14 @@ async function Yn(e, t, n, r, i, a, o = g) {
|
|
|
1696
1703
|
}
|
|
1697
1704
|
//#endregion
|
|
1698
1705
|
//#region src/web-api/v1/fetch-user-settings.ts
|
|
1699
|
-
async function
|
|
1706
|
+
async function Zn(e = g) {
|
|
1700
1707
|
let { app: t } = e.config;
|
|
1701
1708
|
return I(e, "api/v1/usersettings", new URLSearchParams({
|
|
1702
1709
|
app: t || "",
|
|
1703
1710
|
action: "load"
|
|
1704
1711
|
}));
|
|
1705
1712
|
}
|
|
1706
|
-
async function
|
|
1713
|
+
async function Qn(e, t, n = g) {
|
|
1707
1714
|
let r = {
|
|
1708
1715
|
action: "save",
|
|
1709
1716
|
userSettings: e,
|
|
@@ -1711,7 +1718,7 @@ async function Zn(e, t, n = g) {
|
|
|
1711
1718
|
};
|
|
1712
1719
|
return K(r), P(n, "api/v1/usersettings", r);
|
|
1713
1720
|
}
|
|
1714
|
-
async function
|
|
1721
|
+
async function $n(e, t, n = g) {
|
|
1715
1722
|
let r = {
|
|
1716
1723
|
action: "patch",
|
|
1717
1724
|
userSettings: e,
|
|
@@ -1719,12 +1726,12 @@ async function Qn(e, t, n = g) {
|
|
|
1719
1726
|
};
|
|
1720
1727
|
return K(r), P(n, "api/v1/usersettings", r);
|
|
1721
1728
|
}
|
|
1722
|
-
async function
|
|
1723
|
-
return
|
|
1729
|
+
async function er(e = g) {
|
|
1730
|
+
return Qn({}, { type: "UserSettings_Reset" }, e);
|
|
1724
1731
|
}
|
|
1725
1732
|
//#endregion
|
|
1726
1733
|
//#region src/web-api/v2/fetch-change-password.ts
|
|
1727
|
-
async function
|
|
1734
|
+
async function tr(e, t, n = g) {
|
|
1728
1735
|
return P(n, "api/v2/security/password/change", {
|
|
1729
1736
|
newPassword: e,
|
|
1730
1737
|
currentPassword: t
|
|
@@ -1733,42 +1740,42 @@ async function er(e, t, n = g) {
|
|
|
1733
1740
|
//#endregion
|
|
1734
1741
|
//#region src/web-api/v2/fetch-document-upload-container.ts
|
|
1735
1742
|
var J = "api/v2/document-upload/container";
|
|
1736
|
-
function
|
|
1743
|
+
function nr(e) {
|
|
1737
1744
|
let t = new URLSearchParams();
|
|
1738
1745
|
return e.page !== void 0 && t.set("page", String(e.page)), e.pageSize !== void 0 && t.set("pageSize", String(e.pageSize)), t;
|
|
1739
1746
|
}
|
|
1740
|
-
function
|
|
1741
|
-
return I(t, J,
|
|
1747
|
+
function rr(e = {}, t = g) {
|
|
1748
|
+
return I(t, J, nr(e));
|
|
1742
1749
|
}
|
|
1743
|
-
function
|
|
1750
|
+
function ir(e, t = g) {
|
|
1744
1751
|
return I(t, `${J}/${encodeURIComponent(e)}`);
|
|
1745
1752
|
}
|
|
1746
|
-
function
|
|
1753
|
+
function ar(e, t = g) {
|
|
1747
1754
|
return P(t, J, e);
|
|
1748
1755
|
}
|
|
1749
|
-
function
|
|
1756
|
+
function or(e, t, n = g) {
|
|
1750
1757
|
return z(n, `${J}/${encodeURIComponent(e)}`, t);
|
|
1751
1758
|
}
|
|
1752
|
-
async function
|
|
1759
|
+
async function sr(e, t = g) {
|
|
1753
1760
|
let n = (await L(t, "api/v2/document-upload/containers", void 0, { body: { containerIds: e } }))?.failed ?? [], r = new Set(n.map((e) => e.containerId));
|
|
1754
1761
|
return {
|
|
1755
1762
|
succeeded: e.filter((e) => !r.has(e)),
|
|
1756
1763
|
failed: n
|
|
1757
1764
|
};
|
|
1758
1765
|
}
|
|
1759
|
-
function
|
|
1760
|
-
return I(n, `${J}/${encodeURIComponent(e)}/documents`,
|
|
1766
|
+
function cr(e, t = {}, n = g) {
|
|
1767
|
+
return I(n, `${J}/${encodeURIComponent(e)}/documents`, nr(t));
|
|
1761
1768
|
}
|
|
1762
|
-
function
|
|
1769
|
+
function lr(e, t, n = g) {
|
|
1763
1770
|
return L(n, `${J}/${encodeURIComponent(e)}/documents`, void 0, { body: { fileIds: t } });
|
|
1764
1771
|
}
|
|
1765
1772
|
//#endregion
|
|
1766
1773
|
//#region src/web-api/v2/fetch-forgot-password.ts
|
|
1767
|
-
function
|
|
1774
|
+
function ur() {
|
|
1768
1775
|
return typeof window > "u" ? void 0 : `${window.location.origin}/login?mode=changepassword`;
|
|
1769
1776
|
}
|
|
1770
|
-
async function
|
|
1771
|
-
let r = t ??
|
|
1777
|
+
async function dr(e, t, n = g) {
|
|
1778
|
+
let r = t ?? ur();
|
|
1772
1779
|
if (!r) throw Error("fetchSendPasswordResetEmail needs a changePasswordRedirectUrl outside a browser: there is no page origin to derive it from. Pass the URL the reset email should link to.");
|
|
1773
1780
|
return P(n, "api/v2/security/password/ask-reset-email", {
|
|
1774
1781
|
changePasswordRedirectUrl: r,
|
|
@@ -1777,21 +1784,21 @@ async function ur(e, t, n = g) {
|
|
|
1777
1784
|
}
|
|
1778
1785
|
//#endregion
|
|
1779
1786
|
//#region src/web-api/v2/fetch-user-profile.ts
|
|
1780
|
-
async function
|
|
1787
|
+
async function fr(e, t = g) {
|
|
1781
1788
|
return await I(t, `api/v2/user-profile/${e}`);
|
|
1782
1789
|
}
|
|
1783
|
-
async function
|
|
1790
|
+
async function pr(e, t = g) {
|
|
1784
1791
|
return await P(t, "api/v2/user-profile", e);
|
|
1785
1792
|
}
|
|
1786
|
-
async function
|
|
1793
|
+
async function mr(e, t, n, r = g) {
|
|
1787
1794
|
return await R(r, `api/v2/user-profile/${e.data?.id}/${t}/${n}`, e);
|
|
1788
1795
|
}
|
|
1789
|
-
async function
|
|
1796
|
+
async function hr(e, t, n, r = g) {
|
|
1790
1797
|
return (await L(r, `api/v2/user-profile/${e.data?.id}/${t}/${n}`)).success === !0;
|
|
1791
1798
|
}
|
|
1792
1799
|
//#endregion
|
|
1793
1800
|
//#region src/web-api/v2/fetch-version.ts
|
|
1794
|
-
async function
|
|
1801
|
+
async function gr(e = g) {
|
|
1795
1802
|
return await I(e, "api/v2/version");
|
|
1796
1803
|
}
|
|
1797
1804
|
//#endregion
|
|
@@ -1800,39 +1807,39 @@ var Y = (e, t) => (...n) => {
|
|
|
1800
1807
|
let r = Array(Math.max(0, e.length - n.length)).fill(void 0);
|
|
1801
1808
|
return e(...n, ...r, t);
|
|
1802
1809
|
};
|
|
1803
|
-
function
|
|
1810
|
+
function _r(e) {
|
|
1804
1811
|
return {
|
|
1805
1812
|
app: {
|
|
1806
1813
|
get: Y(Ot, e),
|
|
1807
1814
|
preLogin: Y(kt, e)
|
|
1808
1815
|
},
|
|
1809
1816
|
principal: {
|
|
1810
|
-
get: Y(
|
|
1811
|
-
list: Y(
|
|
1812
|
-
userid: Y(
|
|
1813
|
-
userids: Y(
|
|
1814
|
-
search: Y(
|
|
1817
|
+
get: Y(jn, e),
|
|
1818
|
+
list: Y(Mn, e),
|
|
1819
|
+
userid: Y(Nn, e),
|
|
1820
|
+
userids: Y(Pn, e),
|
|
1821
|
+
search: Y(Hn, e)
|
|
1815
1822
|
},
|
|
1816
1823
|
query: {
|
|
1817
|
-
search: Y(
|
|
1818
|
-
bulk: Y(
|
|
1819
|
-
intent: Y(
|
|
1820
|
-
export: Y(
|
|
1821
|
-
aggregate: Y(
|
|
1822
|
-
sponsoredLinks: Y(
|
|
1823
|
-
similarDocuments: Y(
|
|
1824
|
+
search: Y(Ln, e),
|
|
1825
|
+
bulk: Y(Rn, e),
|
|
1826
|
+
intent: Y(Vn, e),
|
|
1827
|
+
export: Y(Bn, e),
|
|
1828
|
+
aggregate: Y(_n, e),
|
|
1829
|
+
sponsoredLinks: Y(Wn, e),
|
|
1830
|
+
similarDocuments: Y(Un, e)
|
|
1824
1831
|
},
|
|
1825
1832
|
suggest: {
|
|
1826
|
-
get: Y(
|
|
1827
|
-
query: Y(
|
|
1828
|
-
field: Y(
|
|
1833
|
+
get: Y(qn, e),
|
|
1834
|
+
query: Y(Jn, e),
|
|
1835
|
+
field: Y(Yn, e)
|
|
1829
1836
|
},
|
|
1830
1837
|
preview: {
|
|
1831
|
-
get: Y(
|
|
1832
|
-
textChunks: Y(
|
|
1838
|
+
get: Y(kn, e),
|
|
1839
|
+
textChunks: Y(Xn, e)
|
|
1833
1840
|
},
|
|
1834
1841
|
labels: {
|
|
1835
|
-
get: Y(
|
|
1842
|
+
get: Y(xn, e),
|
|
1836
1843
|
rights: Y(q.getUserRights, e),
|
|
1837
1844
|
add: Y(q.add, e),
|
|
1838
1845
|
remove: Y(q.remove, e),
|
|
@@ -1842,41 +1849,41 @@ function gr(e) {
|
|
|
1842
1849
|
bulkRemove: Y(q.bulkRemove, e)
|
|
1843
1850
|
},
|
|
1844
1851
|
dataset: {
|
|
1845
|
-
get: Y(
|
|
1846
|
-
getMany: Y(
|
|
1847
|
-
list: Y(
|
|
1852
|
+
get: Y(vn, e),
|
|
1853
|
+
getMany: Y(yn, e),
|
|
1854
|
+
list: Y(bn, e)
|
|
1848
1855
|
},
|
|
1849
1856
|
userSettings: {
|
|
1850
|
-
get: Y(
|
|
1851
|
-
save: Y(
|
|
1852
|
-
patch: Y(
|
|
1853
|
-
reset: Y(
|
|
1857
|
+
get: Y(Zn, e),
|
|
1858
|
+
save: Y(Qn, e),
|
|
1859
|
+
patch: Y($n, e),
|
|
1860
|
+
reset: Y(er, e)
|
|
1854
1861
|
},
|
|
1855
1862
|
userProfile: {
|
|
1856
|
-
get: Y(
|
|
1857
|
-
create: Y(
|
|
1858
|
-
patch: Y(
|
|
1859
|
-
deleteProperty: Y(
|
|
1863
|
+
get: Y(fr, e),
|
|
1864
|
+
create: Y(pr, e),
|
|
1865
|
+
patch: Y(mr, e),
|
|
1866
|
+
deleteProperty: Y(hr, e)
|
|
1860
1867
|
},
|
|
1861
1868
|
containers: {
|
|
1862
|
-
list: Y(
|
|
1863
|
-
get: Y(
|
|
1864
|
-
create: Y(
|
|
1865
|
-
update: Y(
|
|
1866
|
-
delete: Y(
|
|
1867
|
-
listDocuments: Y(
|
|
1868
|
-
deleteDocuments: Y(
|
|
1869
|
+
list: Y(rr, e),
|
|
1870
|
+
get: Y(ir, e),
|
|
1871
|
+
create: Y(ar, e),
|
|
1872
|
+
update: Y(or, e),
|
|
1873
|
+
delete: Y(sr, e),
|
|
1874
|
+
listDocuments: Y(cr, e),
|
|
1875
|
+
deleteDocuments: Y(lr, e)
|
|
1869
1876
|
},
|
|
1870
1877
|
password: {
|
|
1871
|
-
change: Y(
|
|
1872
|
-
sendResetEmail: Y(
|
|
1878
|
+
change: Y(tr, e),
|
|
1879
|
+
sendResetEmail: Y(dr, e)
|
|
1873
1880
|
},
|
|
1874
|
-
version: Y(
|
|
1881
|
+
version: Y(gr, e)
|
|
1875
1882
|
};
|
|
1876
1883
|
}
|
|
1877
1884
|
//#endregion
|
|
1878
1885
|
//#region src/client/create-atomic-client.ts
|
|
1879
|
-
function
|
|
1886
|
+
function vr(e) {
|
|
1880
1887
|
return {
|
|
1881
1888
|
config: e.config,
|
|
1882
1889
|
storagePrefix: e.storagePrefix,
|
|
@@ -1900,29 +1907,29 @@ function _r(e) {
|
|
|
1900
1907
|
patch: (t, n, r) => R(e, t, n, r),
|
|
1901
1908
|
del: (t, n, r) => L(e, t, n, r)
|
|
1902
1909
|
},
|
|
1903
|
-
api:
|
|
1910
|
+
api: _r(e),
|
|
1904
1911
|
context: e
|
|
1905
1912
|
};
|
|
1906
1913
|
}
|
|
1907
|
-
function
|
|
1914
|
+
function yr(e) {
|
|
1908
1915
|
let { httpAdapter: t, storagePrefix: n, ...r } = e, i = pe({
|
|
1909
1916
|
config: {},
|
|
1910
1917
|
storagePrefix: n,
|
|
1911
1918
|
httpAdapter: t
|
|
1912
1919
|
});
|
|
1913
|
-
return b(i, r),
|
|
1920
|
+
return b(i, r), vr(i);
|
|
1914
1921
|
}
|
|
1915
|
-
var
|
|
1916
|
-
function
|
|
1917
|
-
return
|
|
1922
|
+
var br = vr(g);
|
|
1923
|
+
function xr() {
|
|
1924
|
+
return br;
|
|
1918
1925
|
}
|
|
1919
1926
|
//#endregion
|
|
1920
1927
|
//#region src/utils/aggregations.ts
|
|
1921
|
-
var
|
|
1922
|
-
function
|
|
1928
|
+
var Sr = /.*:\(?([><=\d\-.AND ]+)\)?/;
|
|
1929
|
+
function Cr(e, t) {
|
|
1923
1930
|
return !e?.items || e?.items?.length === 0 ? [] : e.items.reduce((n, r) => {
|
|
1924
1931
|
if (!r.value || r.value === "") return n;
|
|
1925
|
-
let i =
|
|
1932
|
+
let i = wr(r, e.column);
|
|
1926
1933
|
return n.push({
|
|
1927
1934
|
operator: i.operator,
|
|
1928
1935
|
value: i.value,
|
|
@@ -1933,8 +1940,8 @@ function Sr(e, t) {
|
|
|
1933
1940
|
}), n;
|
|
1934
1941
|
}, []);
|
|
1935
1942
|
}
|
|
1936
|
-
function
|
|
1937
|
-
let n = t, r = e.value.match(
|
|
1943
|
+
function wr(e, t) {
|
|
1944
|
+
let n = t, r = e.value.match(Sr);
|
|
1938
1945
|
if (r?.[1]) {
|
|
1939
1946
|
let t = (r?.[1].split(" AND ")).map((t) => ({
|
|
1940
1947
|
field: n,
|
|
@@ -1962,26 +1969,26 @@ function Cr(e, t) {
|
|
|
1962
1969
|
display: e.display
|
|
1963
1970
|
};
|
|
1964
1971
|
}
|
|
1965
|
-
function
|
|
1972
|
+
function Tr(e, t, n) {
|
|
1966
1973
|
return e.valuesAreExpressions ? t.display === n.display : t.value === n.value;
|
|
1967
1974
|
}
|
|
1968
|
-
function
|
|
1969
|
-
return e.items &&= e.items.map((e) =>
|
|
1975
|
+
function Er(e) {
|
|
1976
|
+
return e.items &&= e.items.map((e) => Er(e)), e.items?.some((e) => e.$selected || e.$opened) && (e.$opened = !0), e;
|
|
1970
1977
|
}
|
|
1971
|
-
function
|
|
1978
|
+
function Dr(e, t) {
|
|
1972
1979
|
let n = [];
|
|
1973
1980
|
if (e.length > 0) {
|
|
1974
1981
|
let r = /* @__PURE__ */ new Map(), i = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g, ""), a = RegExp(`\\b${i}`, "i");
|
|
1975
1982
|
e.forEach((e) => {
|
|
1976
1983
|
if (e.display.length > 1) {
|
|
1977
1984
|
let i = e.display.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), o = a.exec(i);
|
|
1978
|
-
|
|
1985
|
+
Or(n, r, "/", e.display, +(e.frequency || 0), 1, (o?.index || 0) + t.length);
|
|
1979
1986
|
}
|
|
1980
1987
|
});
|
|
1981
1988
|
}
|
|
1982
1989
|
return n;
|
|
1983
1990
|
}
|
|
1984
|
-
function
|
|
1991
|
+
function Or(e, t, n, r, i, a, o) {
|
|
1985
1992
|
let s = r.indexOf("/", n.length), c = r.substring(0, s + 1), l = t.get(c);
|
|
1986
1993
|
if (!l) {
|
|
1987
1994
|
let u = c.replace(/^\/|\/$/g, "");
|
|
@@ -1995,11 +2002,11 @@ function Dr(e, t, n, r, i, a, o) {
|
|
|
1995
2002
|
$path: u
|
|
1996
2003
|
}, t.set(c, l), e.push(l);
|
|
1997
2004
|
}
|
|
1998
|
-
c.length < r.length && (l.hasChildren = !0,
|
|
2005
|
+
c.length < r.length && (l.hasChildren = !0, Or(l.items, t, c, r, i, a + 1, o));
|
|
1999
2006
|
}
|
|
2000
2007
|
//#endregion
|
|
2001
2008
|
//#region src/utils/bisect.ts
|
|
2002
|
-
function
|
|
2009
|
+
function kr(e, t) {
|
|
2003
2010
|
return e.reduce((e, n) => (t(n) ? e.true.push(n) : e.false.push(n), e), {
|
|
2004
2011
|
true: [],
|
|
2005
2012
|
false: []
|
|
@@ -2007,30 +2014,30 @@ function Or(e, t) {
|
|
|
2007
2014
|
}
|
|
2008
2015
|
//#endregion
|
|
2009
2016
|
//#region src/utils/concepts.ts
|
|
2010
|
-
var
|
|
2017
|
+
var Ar = /(([+-])?\(([^)]+)\))|(([+-])?\[([^\]]+)\])|(([+-])?"([^"]+)")|(([+-])?\/([^/]+)\/)|(([+-])?(\S+))/g, jr = 2, Mr = 3, Nr = 5, Pr = 6, Fr = 8, Ir = 9, Lr = 11, Rr = 12, zr = 14, Br = 15;
|
|
2011
2018
|
function X(e) {
|
|
2012
2019
|
if (!e) return [];
|
|
2013
|
-
let t = [], n = e.matchAll(
|
|
2014
|
-
for (let e of n) e[
|
|
2020
|
+
let t = [], n = e.matchAll(Ar);
|
|
2021
|
+
for (let e of n) e[Mr] ? t.push({
|
|
2015
2022
|
type: "group",
|
|
2016
|
-
value: e[
|
|
2017
|
-
op: e[
|
|
2018
|
-
}) : e[
|
|
2023
|
+
value: e[Mr],
|
|
2024
|
+
op: e[jr]
|
|
2025
|
+
}) : e[Pr] ? t.push({
|
|
2019
2026
|
type: "adjacent",
|
|
2020
|
-
value: e[
|
|
2021
|
-
op: e[
|
|
2022
|
-
}) : e[
|
|
2027
|
+
value: e[Pr],
|
|
2028
|
+
op: e[Nr]
|
|
2029
|
+
}) : e[Ir] ? t.push({
|
|
2023
2030
|
type: "exact",
|
|
2024
|
-
value: e[
|
|
2025
|
-
op: e[
|
|
2026
|
-
}) : e[
|
|
2031
|
+
value: e[Ir],
|
|
2032
|
+
op: e[Fr]
|
|
2033
|
+
}) : e[Rr] ? t.push({
|
|
2027
2034
|
type: "regex",
|
|
2028
|
-
value: e[
|
|
2029
|
-
op: e[
|
|
2030
|
-
}) : e[
|
|
2035
|
+
value: e[Rr],
|
|
2036
|
+
op: e[Lr]
|
|
2037
|
+
}) : e[Br] && t.push({
|
|
2031
2038
|
type: "token",
|
|
2032
|
-
value: e[
|
|
2033
|
-
op: e[
|
|
2039
|
+
value: e[Br],
|
|
2040
|
+
op: e[zr]
|
|
2034
2041
|
});
|
|
2035
2042
|
return t;
|
|
2036
2043
|
}
|
|
@@ -2047,7 +2054,7 @@ function Z(e) {
|
|
|
2047
2054
|
}
|
|
2048
2055
|
}).join(" ");
|
|
2049
2056
|
}
|
|
2050
|
-
function
|
|
2057
|
+
function Vr(e, t, n) {
|
|
2051
2058
|
let r = X(e);
|
|
2052
2059
|
for (let e of t) r.push({
|
|
2053
2060
|
type: "adjacent",
|
|
@@ -2056,30 +2063,30 @@ function Br(e, t, n) {
|
|
|
2056
2063
|
});
|
|
2057
2064
|
return Z(r);
|
|
2058
2065
|
}
|
|
2059
|
-
function
|
|
2066
|
+
function Hr(e, t) {
|
|
2060
2067
|
let n = X(t), r = n.findIndex((t) => t.value === e);
|
|
2061
2068
|
return r === -1 ? t : (n.splice(r, 1), Z(n));
|
|
2062
2069
|
}
|
|
2063
|
-
function
|
|
2070
|
+
function Ur(e) {
|
|
2064
2071
|
return Z(X(e).filter((e) => e.type !== "adjacent"));
|
|
2065
2072
|
}
|
|
2066
|
-
function
|
|
2073
|
+
function Wr(e) {
|
|
2067
2074
|
return X(e).filter((e) => e.type === "adjacent").map((e) => e.value);
|
|
2068
2075
|
}
|
|
2069
2076
|
//#endregion
|
|
2070
2077
|
//#region src/utils/date.ts
|
|
2071
|
-
function
|
|
2072
|
-
let r = new Intl.RelativeTimeFormat(e, { numeric: "auto" }), { offset: i, unit: a, isFuture: o } =
|
|
2078
|
+
function Gr(e, t, n) {
|
|
2079
|
+
let r = new Intl.RelativeTimeFormat(e, { numeric: "auto" }), { offset: i, unit: a, isFuture: o } = qr(t, n);
|
|
2073
2080
|
return r.format(i * (o ? 1 : -1), a);
|
|
2074
2081
|
}
|
|
2075
|
-
var
|
|
2082
|
+
var Kr = [
|
|
2076
2083
|
["year", 365],
|
|
2077
2084
|
["month", 30],
|
|
2078
2085
|
["week", 7],
|
|
2079
2086
|
["day", 1]
|
|
2080
2087
|
];
|
|
2081
|
-
function
|
|
2082
|
-
let n = new Date(e), r = t ? new Date(t) : /* @__PURE__ */ new Date(), i = Math.abs(r.getTime() - n.getTime()), a = Math.floor(i / (1e3 * 60 * 60 * 24)), [o, s] =
|
|
2088
|
+
function qr(e, t) {
|
|
2089
|
+
let n = new Date(e), r = t ? new Date(t) : /* @__PURE__ */ new Date(), i = Math.abs(r.getTime() - n.getTime()), a = Math.floor(i / (1e3 * 60 * 60 * 24)), [o, s] = Kr.find(([, e]) => a >= e) ?? ["day", 1];
|
|
2083
2090
|
return {
|
|
2084
2091
|
offset: Math.floor(a / s),
|
|
2085
2092
|
unit: o,
|
|
@@ -2088,7 +2095,7 @@ function Kr(e, t) {
|
|
|
2088
2095
|
}
|
|
2089
2096
|
//#endregion
|
|
2090
2097
|
//#region src/utils/is-not-input-event.ts
|
|
2091
|
-
function
|
|
2098
|
+
function Jr(e) {
|
|
2092
2099
|
let t = e.target;
|
|
2093
2100
|
return t && t.nodeName !== "INPUT" && t.nodeName !== "TEXTAREA";
|
|
2094
2101
|
}
|
|
@@ -2102,7 +2109,7 @@ function Q(e) {
|
|
|
2102
2109
|
});
|
|
2103
2110
|
dispatchEvent(t);
|
|
2104
2111
|
}
|
|
2105
|
-
var
|
|
2112
|
+
var Yr = {
|
|
2106
2113
|
success: (e, t) => {
|
|
2107
2114
|
Q({
|
|
2108
2115
|
type: "success",
|
|
@@ -2134,13 +2141,13 @@ var Jr = {
|
|
|
2134
2141
|
};
|
|
2135
2142
|
//#endregion
|
|
2136
2143
|
//#region src/utils/query-params.ts
|
|
2137
|
-
function
|
|
2144
|
+
function Xr(e) {
|
|
2138
2145
|
if (e === void 0) return;
|
|
2139
2146
|
let { q: t, f: n, p: r, s: i, t: a, n: o, b: s } = $(e), [c] = e.split("?");
|
|
2140
2147
|
return {
|
|
2141
2148
|
path: c,
|
|
2142
2149
|
text: t,
|
|
2143
|
-
filters: n ?
|
|
2150
|
+
filters: n ? $r(n) : void 0,
|
|
2144
2151
|
page: r ? parseInt(r, 10) : void 0,
|
|
2145
2152
|
sort: i,
|
|
2146
2153
|
tab: a,
|
|
@@ -2148,17 +2155,17 @@ function Yr(e) {
|
|
|
2148
2155
|
basket: s
|
|
2149
2156
|
};
|
|
2150
2157
|
}
|
|
2151
|
-
function
|
|
2158
|
+
function Zr(e) {
|
|
2152
2159
|
if (!e) return "";
|
|
2153
2160
|
let { text: t, filters: n, page: r, sort: i, tab: a, name: o, basket: s } = e, c = {};
|
|
2154
2161
|
return t && (c.q = t), n && (c.f = JSON.stringify(n)), r && (c.p = r.toString()), i && (c.s = i), a && (c.t = a), o && (c.n = o), s && (c.b = s), new URLSearchParams(c).toString() || "";
|
|
2155
2162
|
}
|
|
2156
|
-
function
|
|
2163
|
+
function Qr(e) {
|
|
2157
2164
|
if (e === void 0) return [];
|
|
2158
2165
|
let { f: t } = $(e);
|
|
2159
|
-
return
|
|
2166
|
+
return $r(t);
|
|
2160
2167
|
}
|
|
2161
|
-
function
|
|
2168
|
+
function $r(e) {
|
|
2162
2169
|
let t = decodeURIComponent(e);
|
|
2163
2170
|
try {
|
|
2164
2171
|
return JSON.parse(t ?? "[]");
|
|
@@ -2172,41 +2179,41 @@ function $(e) {
|
|
|
2172
2179
|
let n = new URLSearchParams(t);
|
|
2173
2180
|
return Object.fromEntries(n);
|
|
2174
2181
|
}
|
|
2175
|
-
function
|
|
2182
|
+
function ei(e) {
|
|
2176
2183
|
let { q: t = "" } = $(e);
|
|
2177
2184
|
return t;
|
|
2178
2185
|
}
|
|
2179
|
-
function
|
|
2186
|
+
function ti(e) {
|
|
2180
2187
|
let { id: t } = $(e);
|
|
2181
2188
|
return t === void 0 ? void 0 : decodeURIComponent(t);
|
|
2182
2189
|
}
|
|
2183
|
-
function
|
|
2190
|
+
function ni(e) {
|
|
2184
2191
|
let { p: t = "0" } = $(e);
|
|
2185
2192
|
return parseInt(t, 10);
|
|
2186
2193
|
}
|
|
2187
|
-
function
|
|
2194
|
+
function ri(e) {
|
|
2188
2195
|
let { t } = $(e);
|
|
2189
2196
|
return t;
|
|
2190
2197
|
}
|
|
2191
2198
|
//#endregion
|
|
2192
2199
|
//#region src/utils/syslang.ts
|
|
2193
|
-
function
|
|
2200
|
+
function ii(e, t) {
|
|
2194
2201
|
if (!e) return e;
|
|
2195
2202
|
let n = 0, r = e.length, i = 0;
|
|
2196
2203
|
if (e[i] === "[") {
|
|
2197
2204
|
for (; i < r && /[0-9]/.test(e[i]);) i++;
|
|
2198
2205
|
e[i] === "]" && (n = i + 1);
|
|
2199
2206
|
}
|
|
2200
|
-
let a =
|
|
2207
|
+
let a = ai(e, n, !1);
|
|
2201
2208
|
if (!a) return e;
|
|
2202
2209
|
let o = t.charCodeAt(0), s = t.charCodeAt(1), c = a;
|
|
2203
2210
|
for (; c;) if (o === c.lang1 && s === c.lang2) {
|
|
2204
|
-
let t =
|
|
2211
|
+
let t = ai(e, c.end + 4, !0);
|
|
2205
2212
|
return e.substring(t.start, t.end);
|
|
2206
|
-
} else c =
|
|
2213
|
+
} else c = ai(e, c.end + 4, !1);
|
|
2207
2214
|
return e.substring(a.start, a.end) || e;
|
|
2208
2215
|
}
|
|
2209
|
-
function
|
|
2216
|
+
function ai(e, t, n) {
|
|
2210
2217
|
for (let n = t, r = e.length - 3; n < r; n++) if (e[n] === "[" && e[n + 3] === "]") return {
|
|
2211
2218
|
start: t,
|
|
2212
2219
|
end: n,
|
|
@@ -2222,7 +2229,7 @@ function ii(e, t, n) {
|
|
|
2222
2229
|
}
|
|
2223
2230
|
//#endregion
|
|
2224
2231
|
//#region src/utils/utilities.ts
|
|
2225
|
-
function
|
|
2232
|
+
function oi(e, t) {
|
|
2226
2233
|
let { useLocale: n, useLocaleAsPrefix: r, indexFile: i, path: a, folder: o } = t, s = n ? `${e}/` : null, c = r ? `${e}.${i}` : i ?? "";
|
|
2227
2234
|
return [
|
|
2228
2235
|
a,
|
|
@@ -2232,24 +2239,24 @@ function ai(e, t) {
|
|
|
2232
2239
|
}
|
|
2233
2240
|
//#endregion
|
|
2234
2241
|
//#region src/web-api/helpers/utils/date-utils.ts
|
|
2235
|
-
function
|
|
2242
|
+
function si(e) {
|
|
2236
2243
|
if (!e) return;
|
|
2237
2244
|
let t = new Date(e);
|
|
2238
2245
|
return Number.isNaN(t.getTime()) ? void 0 : t;
|
|
2239
2246
|
}
|
|
2240
|
-
function
|
|
2241
|
-
let t =
|
|
2247
|
+
function ci(e) {
|
|
2248
|
+
let t = si(e);
|
|
2242
2249
|
return !!t && t.getTime() <= Date.now();
|
|
2243
2250
|
}
|
|
2244
|
-
function
|
|
2245
|
-
let n =
|
|
2251
|
+
function li(e, t = 7) {
|
|
2252
|
+
let n = si(e);
|
|
2246
2253
|
if (!n) return !1;
|
|
2247
2254
|
let r = Date.now(), i = r + t * 24 * 60 * 60 * 1e3, a = n.getTime();
|
|
2248
2255
|
return a > r && a <= i;
|
|
2249
2256
|
}
|
|
2250
2257
|
//#endregion
|
|
2251
2258
|
//#region src/web-api/helpers/utils/with-retry.ts
|
|
2252
|
-
async function
|
|
2259
|
+
async function ui(e, t = 0, n = 1e3) {
|
|
2253
2260
|
let r;
|
|
2254
2261
|
for (let i = 0; i <= t; i++) try {
|
|
2255
2262
|
return await e();
|
|
@@ -2260,4 +2267,4 @@ async function li(e, t = 0, n = 1e3) {
|
|
|
2260
2267
|
throw r;
|
|
2261
2268
|
}
|
|
2262
2269
|
//#endregion
|
|
2263
|
-
export {
|
|
2270
|
+
export { Xn as $, f as $n, B as $t, wr as A, Re as An, nn as At, dr as B, Ce as Bn, Xt as Bt, Hr as C, Je as Cn, yn as Ct, Sr as D, I as Dn, dn as Dt, kr as E, He as En, K as Et, gr as F, Oe as Fn, $t as Ft, cr as G, xe as Gn, Kt as Gt, lr as H, O as Hn, Yt as Ht, pr as I, j as In, tn as It, tr as J, h as Jn, zt as Jt, rr as K, be as Kn, Ut as Kt, hr as L, Te as Ln, G as Lt, Cr as M, Pe as Mn, sn as Mt, yr as N, Ne as Nn, Zt as Nt, Tr as O, Ve as On, fn as Ot, xr as P, P as Pn, Qt as Pt, Qn as Q, ie as Qn, V as Qt, fr as R, Ee as Rn, en as Rt, X as S, Xe as Sn, bn as St, Z as T, We as Tn, gn as Tt, sr as U, Se as Un, W as Ut, ar as V, k as Vn, Jt as Vt, ir as W, E as Wn, qt as Wt, Zn as X, ae as Xn, Lt as Xt, er as Y, ue as Yn, Rt as Yt, $n as Z, m as Zn, H as Zt, Jr as _, vt as _n, kn as _t, oi as a, Ot as an, r as ar, Un as at, Vr as b, st as bn, q as bt, Qr as c, Dt as cn, l as cr, Bn as ct, Xr as d, R as dn, n as dr, Ln as dt, It as en, ne as er, qn as et, ri as f, Tt as fn, Fn as ft, Yr as g, bt as gn, Pn as gt, $ as h, St as hn, Nn as ht, si as i, jt as in, te as ir, Wn as it, Dr as j, F as jn, rn as jt, Er as k, Be as kn, an as kt, ti as l, z as ln, s as lr, zn as lt, Zr as m, wt as mn, Mn as mt, li as n, Ft as nn, p as nr, Jn as nt, ii as o, kt as on, d as or, Hn as ot, ei as p, L as pn, jn as pt, or as q, de as qn, U as qt, ci as r, Pt as rn, ee as rr, Gn as rt, $r as s, At as sn, o as sr, Vn as st, ui as t, Mt as tn, re as tr, Yn as tt, ni as u, Et as un, c as ur, Rn as ut, qr as v, gt as vn, An as vt, Ur as w, qe as wn, _n as wt, Wr as x, Ze as xn, vn as xt, Gr as y, ft as yn, xn as yt, mr as z, we as zn, on as zt };
|