@sinequa/atomic 2.3.2 → 2.5.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.
Files changed (50) hide show
  1. package/README.md +117 -54
  2. package/dist/atomic.cjs +1 -1
  3. package/dist/atomic.js +2 -2
  4. package/dist/client/create-api.d.ts +4 -4
  5. package/dist/configurations/auth-mode.d.ts +2 -2
  6. package/dist/configurations/global.config.d.ts +33 -2
  7. package/dist/configurations/global.config.d.ts.map +1 -1
  8. package/dist/helpers/aggregation-count.d.ts +68 -0
  9. package/dist/helpers/aggregation-count.d.ts.map +1 -0
  10. package/dist/helpers/column-resolver.d.ts.map +1 -1
  11. package/dist/helpers/index.d.ts +1 -0
  12. package/dist/helpers/index.d.ts.map +1 -1
  13. package/dist/helpers/utils.d.ts +42 -7
  14. package/dist/helpers/utils.d.ts.map +1 -1
  15. package/dist/spfx/index.cjs +1 -1
  16. package/dist/spfx/index.js +2 -2
  17. package/dist/src-BcyahlCg.cjs +1 -0
  18. package/dist/{src-QHeKpRHd.js → src-vDryIxd0.js} +632 -583
  19. package/dist/types/search/Article.d.ts +8 -0
  20. package/dist/types/search/Article.d.ts.map +1 -1
  21. package/dist/types/search/DidYouMeanItem.d.ts +29 -1
  22. package/dist/types/search/DidYouMeanItem.d.ts.map +1 -1
  23. package/dist/types/search/QueryIntent.d.ts +8 -1
  24. package/dist/types/search/QueryIntent.d.ts.map +1 -1
  25. package/dist/types/search/QueryIntentDatasets.d.ts +0 -3
  26. package/dist/types/search/QueryIntentDatasets.d.ts.map +1 -1
  27. package/dist/types/search/index.d.ts +3 -1
  28. package/dist/types/search/index.d.ts.map +1 -1
  29. package/dist/utils/date.d.ts +10 -2
  30. package/dist/utils/date.d.ts.map +1 -1
  31. package/dist/utils/index.d.ts +1 -0
  32. package/dist/utils/index.d.ts.map +1 -1
  33. package/dist/utils/query-params.d.ts +20 -3
  34. package/dist/utils/query-params.d.ts.map +1 -1
  35. package/dist/web-api/helpers/handle-response.d.ts.map +1 -1
  36. package/dist/web-api/helpers/methods/send-request.d.ts +0 -4
  37. package/dist/web-api/helpers/methods/send-request.d.ts.map +1 -1
  38. package/dist/web-api/v1/fetch-aggregation.d.ts +26 -5
  39. package/dist/web-api/v1/fetch-aggregation.d.ts.map +1 -1
  40. package/dist/web-api/v1/fetch-labels.d.ts.map +1 -1
  41. package/dist/web-api/v1/fetch-preview.d.ts +11 -4
  42. package/dist/web-api/v1/fetch-preview.d.ts.map +1 -1
  43. package/dist/web-api/v1/fetch-query.d.ts +10 -3
  44. package/dist/web-api/v1/fetch-query.d.ts.map +1 -1
  45. package/dist/web-api/v2/fetch-forgot-password.d.ts +5 -1
  46. package/dist/web-api/v2/fetch-forgot-password.d.ts.map +1 -1
  47. package/package.json +2 -1
  48. package/dist/src-DQYL0h7T.cjs +0 -1
  49. package/dist/types/interfaces/json.d.ts +0 -7
  50. package/dist/types/interfaces/json.d.ts.map +0 -1
@@ -114,7 +114,7 @@ Object.defineProperties(m, {
114
114
  }
115
115
  });
116
116
  function ie(e) {
117
- ae(m, e);
117
+ ae(m, e), e.logLevel !== void 0 && d({ level: e.logLevel });
118
118
  }
119
119
  function ae(e, t) {
120
120
  let { useCredentials: n, useSSO: r, useSAML: i, authMode: a, ...o } = t;
@@ -328,9 +328,9 @@ var O = class extends Error {
328
328
  //#endregion
329
329
  //#region src/web-api/helpers/handle-response.ts
330
330
  async function Te(e, t = "json") {
331
- return j(g, e, t);
331
+ return Ee(g, e, t);
332
332
  }
333
- async function j(e, t, n = "json", r = t.url ?? "") {
333
+ async function Ee(e, t, n = "json", r = t.url ?? "") {
334
334
  let i = t.headers.get("sinequa-jwt-refresh");
335
335
  if (i !== null && A(e, i), t.status >= 200 && t.status < 300) {
336
336
  if (n === "response") return t;
@@ -349,16 +349,25 @@ async function j(e, t, n = "json", r = t.url ?? "") {
349
349
  try {
350
350
  n = await (t.clone?.() ?? t).json();
351
351
  } catch {}
352
- throw _(e).warn("Unauthorized access attempt with user override", {
352
+ _(e).warn("Unauthorized access attempt with user override", {
353
353
  endpoint: t.url ?? "",
354
354
  error: n
355
- }), new k(n.errorMessage ?? n.message ?? "Unauthorized... User override failed.");
355
+ });
356
+ let i = new k(n.errorMessage ?? n.message ?? "Unauthorized... User override failed.");
357
+ throw e.events.emit("requestFailed", {
358
+ endpoint: r,
359
+ status: 401,
360
+ error: i
361
+ }), e.events.emit("unauthorized", {
362
+ endpoint: r,
363
+ error: i
364
+ }), i;
356
365
  }
357
- return await Ee(e, t, 401, r);
366
+ return await De(e, t, 401, r);
358
367
  }
359
- return t.status === 500 ? (_(e).error("Server error occurred", { endpoint: r }), await Ee(e, t, 500, r)) : (_(e).warn(`Unexpected response status: ${t.status}`, { endpoint: r }), await Ee(e, t, t.status, r));
368
+ return t.status === 500 ? (_(e).error("Server error occurred", { endpoint: r }), await De(e, t, 500, r)) : (_(e).warn(`Unexpected response status: ${t.status}`, { endpoint: r }), await De(e, t, t.status, r));
360
369
  }
361
- async function Ee(e, t, n, r) {
370
+ async function De(e, t, n, r) {
362
371
  let i = "";
363
372
  try {
364
373
  i = await t.text() ?? "";
@@ -383,17 +392,17 @@ async function Ee(e, t, n, r) {
383
392
  }
384
393
  //#endregion
385
394
  //#region src/web-api/helpers/utils/resolve-no-auto-authentication.ts
386
- function M(e) {
395
+ function j(e) {
387
396
  return e.config.authMode?.kind !== "sso";
388
397
  }
389
- function De() {
390
- return M(g);
398
+ function Oe() {
399
+ return j(g);
391
400
  }
392
401
  //#endregion
393
402
  //#region src/web-api/helpers/methods/send-request.ts
394
- var Oe = /* @__PURE__ */ new WeakMap();
395
- function ke(e, t, n) {
396
- let r = Oe.get(e);
403
+ var ke = /* @__PURE__ */ new WeakMap();
404
+ function Ae(e, t, n) {
405
+ let r = ke.get(e);
397
406
  if (r) return r;
398
407
  if (ve(e)) return _(e).debug(`Skipping session recovery for ${t}: the user signed out`), Promise.resolve(!1);
399
408
  let i = e.config.auth?.recoverFromUnauthorized;
@@ -401,78 +410,81 @@ function ke(e, t, n) {
401
410
  let a = Promise.resolve(i({
402
411
  endpoint: t,
403
412
  error: n
404
- })).catch((t) => (_(e).debug("Session recovery failed", t), !1)).finally(() => Oe.delete(e));
405
- return Oe.set(e, a), a;
413
+ })).catch((t) => (_(e).debug("Session recovery failed", t), !1)).finally(() => ke.delete(e));
414
+ return ke.set(e, a), a;
406
415
  }
407
- async function Ae(e, t, n, r) {
416
+ async function je(e, t, n, r) {
408
417
  let i = e.resolveHttpAdapter();
409
- return i ? j(e, await i.fetch(t, {
418
+ return i ? Ee(e, await i.fetch(t, {
410
419
  ...n,
411
420
  signal: r?.signal
412
- }), r?.responseType, t) : j(e, await me(e)(t, {
421
+ }), r?.responseType, t) : Ee(e, await me(e)(t, {
413
422
  ...n,
414
423
  credentials: he(e),
415
424
  signal: r?.signal,
416
425
  redirect: r?.redirect
417
426
  }), r?.responseType, t);
418
427
  }
419
- async function N(e, t, n, r) {
428
+ async function M(e, t, n, r) {
420
429
  try {
421
- return await Ae(e, t, n, r);
430
+ return await je(e, t, n, r);
422
431
  } catch (i) {
423
- if (!(i instanceof k) || r?.noRecovery || !await ke(e, t, i)) throw i;
432
+ if (!(i instanceof k) || r?.noRecovery || !await Ae(e, t, i)) throw i;
424
433
  _(e).debug("Session recovered — replaying the request once");
425
434
  let a = new Headers(n.headers), o = T(e);
426
- return o && a.set("Sinequa-csrf-token", o), Ae(e, t, {
435
+ return o && a.set("Sinequa-csrf-token", o), je(e, t, {
427
436
  ...n,
428
437
  headers: a
429
438
  }, r);
430
439
  }
431
440
  }
432
- function P(e, t, n) {
441
+ function Me() {
442
+ return typeof navigator > "u" ? void 0 : navigator.language;
443
+ }
444
+ function N(e, t, n) {
433
445
  let { uiLanguage: r } = e.config;
434
446
  return JSON.stringify({
435
447
  app: e.config.app,
436
448
  ...t,
437
- locale: t.locale || r || navigator.language,
449
+ locale: t.locale || r || Me(),
438
450
  ...r ? { "ui-language": r } : {},
439
451
  noUserOverride: !e.config.userOverrideActive,
440
- noAutoAuthentication: n?.noAutoAuthentication ?? M(e)
452
+ noAutoAuthentication: n?.noAutoAuthentication ?? j(e)
441
453
  });
442
454
  }
443
455
  //#endregion
444
456
  //#region src/web-api/helpers/methods/post.ts
445
- async function F(e, t, n, r) {
457
+ async function P(e, t, n, r) {
446
458
  let i = E(e, r?.headers);
447
459
  i.has("Content-Type") || i.set("Content-Type", "application/json");
448
460
  let a = D(e, t);
449
461
  _(e).debug(`Making POST request to: ${a}`);
450
462
  try {
451
- return await N(e, a, {
463
+ return await M(e, a, {
452
464
  method: "POST",
453
465
  headers: i,
454
- body: P(e, n, r)
466
+ body: N(e, n, r)
455
467
  }, r);
456
468
  } catch (t) {
457
469
  throw _(e).error("Error making POST request:", t), t;
458
470
  }
459
471
  }
460
- async function je(e, t, n) {
461
- return F(g, e, t, n);
472
+ async function Ne(e, t, n) {
473
+ return P(g, e, t, n);
462
474
  }
463
475
  //#endregion
464
476
  //#region src/web-api/helpers/errors/timeout-error.ts
465
- var Me = class extends O {
477
+ var Pe = class extends O {
466
478
  constructor(e = "Request timed out") {
467
479
  super(e, 408), this.name = "TimeoutError";
468
480
  }
469
481
  };
470
482
  //#endregion
471
483
  //#region src/web-api/helpers/utils/create-timeout-controller.ts
472
- function I(e) {
484
+ function F(e) {
473
485
  let t = new AbortController(), { signal: n } = t;
474
486
  return e && setTimeout(() => {
475
- n.aborted || t.abort(new Me(`Request timed out after ${e}ms`));
487
+ n.aborted || t.abort(new Pe(`Request timed out after ${e}ms`));
476
488
  }, e), {
477
489
  controller: t,
478
490
  signal: n
@@ -480,7 +492,7 @@ function I(e) {
480
492
  }
481
493
  //#endregion
482
494
  //#region src/authentication/providers/redirect-to-identity-provider.ts
483
- var Ne = {
495
+ var Fe = {
484
496
  oauth: {
485
497
  label: "OAuth",
486
498
  endpoint: "api/v1/security.oauth",
@@ -492,8 +504,8 @@ var Ne = {
492
504
  action: "getresponse"
493
505
  }
494
506
  };
495
- async function Pe(e, { kind: t, provider: n }) {
496
- let { label: r, endpoint: i, action: a } = Ne[t], o = typeof window < "u", s = v(e, "session"), c = y(e, w);
507
+ async function Ie(e, { kind: t, provider: n }) {
508
+ let { label: r, endpoint: i, action: a } = Fe[t], o = typeof window < "u", s = v(e, "session"), c = y(e, w);
497
509
  if (o && s.get(c)) throw Error(`${r} sign-in with provider "${n}" did not establish a session — its callback is likely not authorized for this application.`);
498
510
  let l = {
499
511
  action: a,
@@ -502,8 +514,8 @@ async function Pe(e, { kind: t, provider: n }) {
502
514
  originalUrl: typeof window > "u" ? "http://localhost" : window.location.href
503
515
  }, u;
504
516
  try {
505
- let { signal: t } = I(S(e));
506
- u = await F(e, i, l, { signal: t });
517
+ let { signal: t } = F(S(e));
518
+ u = await P(e, i, l, { signal: t });
507
519
  } catch (t) {
508
520
  throw _(e).error(`Failed to authenticate with ${r}`, t), t;
509
521
  }
@@ -513,24 +525,24 @@ async function Pe(e, { kind: t, provider: n }) {
513
525
  }
514
526
  //#endregion
515
527
  //#region src/authentication/providers/oauth-authentication.ts
516
- var Fe = async (e) => {
528
+ var Le = async (e) => {
517
529
  let t = ee(e.config);
518
530
  if (!t) throw Error("No OAuth provider configured: set `authMode: AuthMode.oauth(provider)`, or the `autoOAuthProvider` key.");
519
- return Pe(e, {
531
+ return Ie(e, {
520
532
  kind: "oauth",
521
533
  provider: t
522
534
  });
523
- }, Ie = () => Fe(g), Le = async (e) => {
535
+ }, Re = () => Le(g), ze = async (e) => {
524
536
  let t = te(e.config);
525
537
  if (!t) throw Error("No SAML provider configured: set `authMode: AuthMode.saml(provider)`, or the `autoSAMLProvider` key.");
526
- return Pe(e, {
538
+ return Ie(e, {
527
539
  kind: "saml",
528
540
  provider: t
529
541
  });
530
- }, Re = () => Le(g);
542
+ }, Be = () => ze(g);
531
543
  //#endregion
532
544
  //#region src/authentication/session/detect-auth-mode.ts
533
- function ze(e, t) {
545
+ function Ve(e, t) {
534
546
  if (e.authMode && e.authMode.kind !== "unknown") return e.authMode;
535
547
  if (e.bearerToken) return f.bearer(e.bearerToken);
536
548
  let n = e.autoOAuthProvider || t?.autoOAuthProvider;
@@ -540,13 +552,13 @@ function ze(e, t) {
540
552
  }
541
553
  //#endregion
542
554
  //#region src/web-api/helpers/methods/get.ts
543
- async function L(e, t, n, r) {
555
+ async function I(e, t, n, r) {
544
556
  let i = E(e, r?.headers), a = n;
545
557
  r?.noAutoAuthentication !== void 0 && (a = new URLSearchParams(n), a.set("noAutoAuthentication", String(r.noAutoAuthentication)));
546
558
  let o = D(e, t, a);
547
559
  _(e).debug(`Making GET request to: ${o}`);
548
560
  try {
549
- return await N(e, o, {
561
+ return await M(e, o, {
550
562
  method: "GET",
551
563
  headers: i
552
564
  }, r);
@@ -554,16 +566,16 @@ async function L(e, t, n, r) {
554
566
  throw _(e).error("Error making GET request:", t), t;
555
567
  }
556
568
  }
557
- async function Be(e, t, n) {
558
- return L(g, e, t, n);
569
+ async function He(e, t, n) {
570
+ return I(g, e, t, n);
559
571
  }
560
572
  //#endregion
561
573
  //#region src/authentication/tokens/get-csrf-token.ts
562
- var Ve = async (e) => {
574
+ var Ue = async (e) => {
563
575
  let t;
564
576
  try {
565
- let { signal: n } = I(S(e));
566
- t = await L(e, "api/v1/challenge?action=getCsrfToken&suppressErrors=true", void 0, {
577
+ let { signal: n } = F(S(e));
578
+ t = await I(e, "api/v1/challenge?action=getCsrfToken&suppressErrors=true", void 0, {
567
579
  signal: n,
568
580
  noRecovery: !0
569
581
  });
@@ -571,32 +583,32 @@ var Ve = async (e) => {
571
583
  throw _(e).warn("CSRF token fetch failed", t), t;
572
584
  }
573
585
  return t?.csrfToken ? (A(e, t.csrfToken), t.csrfToken) : null;
574
- }, He = () => Ve(g);
586
+ }, We = () => Ue(g);
575
587
  //#endregion
576
588
  //#region src/authentication/session/has-session.ts
577
- async function Ue(e) {
578
- if (T(e)) return _(e).info("Existing session (stored token)"), We(e), !0;
589
+ async function Ge(e) {
590
+ if (T(e)) return _(e).info("Existing session (stored token)"), Ke(e), !0;
579
591
  try {
580
- return _(e).info("Checking for an existing session via CSRF token retrieval"), await Ve(e) === null ? !1 : (We(e), !0);
592
+ return _(e).info("Checking for an existing session via CSRF token retrieval"), await Ue(e) === null ? !1 : (Ke(e), !0);
581
593
  } catch (t) {
582
594
  return _(e).debug("CSRF session probe failed — treated as no existing session", t), !1;
583
595
  }
584
596
  }
585
- function We(e) {
597
+ function Ke(e) {
586
598
  v(e, "session").remove(y(e, w));
587
599
  }
588
- var Ge = () => Ue(g);
600
+ var qe = () => Ge(g);
589
601
  //#endregion
590
602
  //#region src/helpers/ts-helper.ts
591
- function Ke(e) {
603
+ function Je(e) {
592
604
  throw Error(`Unexpected value: ${JSON.stringify(e)}`);
593
605
  }
594
606
  //#endregion
595
607
  //#region src/authentication/tokens/get-jwt-token.ts
596
- async function qe(e, t, n) {
608
+ async function Ye(e, t, n) {
597
609
  if (t) {
598
610
  let { username: n, password: r } = t;
599
- return Xe(e, {
611
+ return Qe(e, {
600
612
  action: "get",
601
613
  tokenInCookie: !0,
602
614
  user: n,
@@ -604,18 +616,18 @@ async function qe(e, t, n) {
604
616
  }, !0, "Failed to get JWT");
605
617
  }
606
618
  if (!p(e.config)) throw Error("A bearer token is required for credential-less authentication: set `authMode: AuthMode.bearer(token)`, or the legacy `bearerToken` key.");
607
- return Xe(e, {
619
+ return Qe(e, {
608
620
  action: "get",
609
621
  tokenInCookie: !0
610
622
  }, !1, "Failed to get JWT without credentials", n?.recoverable);
611
623
  }
612
- async function Je(e) {
613
- return qe(g, e);
624
+ async function Xe(e) {
625
+ return Ye(g, e);
614
626
  }
615
- var Ye = Je;
616
- async function Xe(e, t, n, r, i = !1) {
627
+ var Ze = Xe;
628
+ async function Qe(e, t, n, r, i = !1) {
617
629
  try {
618
- let { signal: r } = I(S(e)), i = await F(e, "api/v1/security.webtoken", t, {
630
+ let { signal: r } = F(S(e)), i = await P(e, "api/v1/security.webtoken", t, {
619
631
  signal: r,
620
632
  noAutoAuthentication: n,
621
633
  noRecovery: !0
@@ -627,25 +639,25 @@ async function Xe(e, t, n, r, i = !1) {
627
639
  }
628
640
  //#endregion
629
641
  //#region src/authentication/session/auth-mode-marker.ts
630
- var Ze = (e) => ({
642
+ var $e = (e) => ({
631
643
  storage: v(e, "local"),
632
644
  key: y(e, C.lastAuthMode)
633
- }), Qe = (e) => {
634
- let { storage: t, key: n } = Ze(e);
645
+ }), et = (e) => {
646
+ let { storage: t, key: n } = $e(e);
635
647
  t.set(n, "credentials");
636
- }, $e = (e) => {
637
- let { storage: t, key: n } = Ze(e);
648
+ }, tt = (e) => {
649
+ let { storage: t, key: n } = $e(e);
638
650
  return t.get(n) === "credentials";
639
- }, et = (e) => {
640
- let { storage: t, key: n } = Ze(e);
651
+ }, nt = (e) => {
652
+ let { storage: t, key: n } = $e(e);
641
653
  t.remove(n);
642
- }, tt = (e, t) => {
654
+ }, rt = (e, t) => {
643
655
  let n = v(e, "session"), r = y(e, C.authenticated);
644
656
  t ? n.set(r, "true") : n.remove(r);
645
- }, nt = (e) => v(e, "session").get(y(e, C.authenticated)) === "true", rt = "api/v1/principal", it = async (e) => {
657
+ }, it = (e) => v(e, "session").get(y(e, C.authenticated)) === "true", at = "api/v1/principal", ot = async (e) => {
646
658
  try {
647
- let { signal: t } = I(S(e));
648
- return await L(e, e.config.auth?.probeEndpoint ?? rt, new URLSearchParams({ action: "get" }), {
659
+ let { signal: t } = F(S(e));
660
+ return await I(e, e.config.auth?.probeEndpoint ?? at, new URLSearchParams({ action: "get" }), {
649
661
  signal: t,
650
662
  redirect: "manual",
651
663
  noRecovery: !0
@@ -653,46 +665,46 @@ var Ze = (e) => ({
653
665
  } catch (t) {
654
666
  return _(e).debug("Protected-endpoint probe failed — not authenticated", t), !1;
655
667
  }
656
- }, at = () => it(g), ot = (e) => e.resolveHttpAdapter() ? f.sso() : $e(e) ? f.credentials() : f.sso(), st = (e, t) => {
668
+ }, st = () => ot(g), ct = (e) => e.resolveHttpAdapter() ? f.sso() : tt(e) ? f.credentials() : f.sso(), lt = (e, t) => {
657
669
  if (v(e, "session").remove(y(e, w)), t.kind === "unknown") {
658
- let t = ot(e);
670
+ let t = ct(e);
659
671
  _(e).info(`Ambiguous auth mode resolved to "${t.kind}"`), b(e, { authMode: t });
660
672
  }
661
673
  return x(e, !0), !0;
662
- }, ct = async (e) => await it(e) ? (_(e).info("User authenticated by the server (ambient SSO / OIDC)"), await Ve(e).catch((t) => _(e).debug("Best-effort CSRF refresh after auto-authentication failed", t)), tt(e, !0), !0) : !1, lt = async (e, t) => {
674
+ }, ut = async (e) => await ot(e) ? (_(e).info("User authenticated by the server (ambient SSO / OIDC)"), await Ue(e).catch((t) => _(e).debug("Best-effort CSRF refresh after auto-authentication failed", t)), rt(e, !0), !0) : !1, dt = async (e, t) => {
663
675
  if (t) {
664
676
  let { username: n, password: r } = t;
665
- return !n || !r ? (_(e).error("Credentials are required for authentication"), x(e, !1), !1) : dt(e, {
677
+ return !n || !r ? (_(e).error("Credentials are required for authentication"), x(e, !1), !1) : pt(e, {
666
678
  username: n,
667
679
  password: r
668
680
  });
669
681
  }
670
682
  let n = e.config.authMode ?? f.unknown();
671
- if (n.kind === "bearer") return ft(e, n);
672
- if (await Ue(e)) return _(e).info("User already authenticated (existing session)"), st(e, n);
683
+ if (n.kind === "bearer") return mt(e, n);
684
+ if (await Ge(e)) return _(e).info("User already authenticated (existing session)"), lt(e, n);
673
685
  switch (n.kind) {
674
686
  case "credentials": return x(e, !1), !1;
675
- case "oauth": return _(e).info("Initiating OAuth authentication flow"), await Fe(e), x(e, !1), !1;
676
- case "saml": return _(e).info("Initiating SAML authentication flow"), await Le(e), x(e, !1), !1;
677
- case "sso": return _(e).info("Letting the server authenticate the request (ambient SSO)"), await ct(e) ? st(e, n) : (x(e, !1), !1);
687
+ case "oauth": return _(e).info("Initiating OAuth authentication flow"), await Le(e), x(e, !1), !1;
688
+ case "saml": return _(e).info("Initiating SAML authentication flow"), await ze(e), x(e, !1), !1;
689
+ case "sso": return _(e).info("Letting the server authenticate the request (ambient SSO)"), await ut(e) ? lt(e, n) : (x(e, !1), !1);
678
690
  case "unknown":
679
- if (_(e).info("No provider declared — probing for server-side auto-authentication"), await ct(e)) {
691
+ if (_(e).info("No provider declared — probing for server-side auto-authentication"), await ut(e)) {
680
692
  let t = f.sso();
681
- return b(e, { authMode: t }), st(e, t);
693
+ return b(e, { authMode: t }), lt(e, t);
682
694
  }
683
695
  return _(e).info("No provider, no session and no server-side authentication — falling back to the credentials form"), b(e, { authMode: f.credentials() }), x(e, !1), !1;
684
- default: return Ke(n);
696
+ default: return Je(n);
685
697
  }
686
- }, ut = (e) => lt(g, e);
687
- async function dt(e, t) {
688
- _(e).info("Attempting authentication using credentials"), b(e, { authMode: f.credentials() }), Qe(e);
698
+ }, ft = (e) => dt(g, e);
699
+ async function pt(e, t) {
700
+ _(e).info("Attempting authentication using credentials"), b(e, { authMode: f.credentials() }), et(e);
689
701
  let { userOverrideActive: n, userOverride: r } = e.config;
690
702
  b(e, {
691
703
  userOverrideActive: !1,
692
704
  userOverride: void 0
693
705
  });
694
706
  try {
695
- await qe(e, t);
707
+ await Ye(e, t);
696
708
  } catch (t) {
697
709
  throw x(e, !1), t;
698
710
  } finally {
@@ -703,63 +715,63 @@ async function dt(e, t) {
703
715
  }
704
716
  return x(e, !0), !0;
705
717
  }
706
- async function ft(e, t) {
718
+ async function mt(e, t) {
707
719
  if (_(e).info("Attempting authentication using bearer token"), !p(e.config)) throw x(e, !1), Error("Bearer mode requires a token: set `authMode: AuthMode.bearer(token)`, or the legacy `bearerToken` key.");
708
720
  if (t.sessionCookie !== !1) try {
709
- if (await qe(e, void 0, { recoverable: !0 })) return _(e).info("Bearer token exchanged for a server session"), x(e, !0), !0;
721
+ if (await Ye(e, void 0, { recoverable: !0 })) return _(e).info("Bearer token exchanged for a server session"), x(e, !0), !0;
710
722
  } catch (t) {
711
723
  _(e).info("The server refused to exchange the bearer token for a session — continuing with the token alone. Requests this library issues stay authenticated, but what the browser loads by itself (document previews and their sub-resources, thumbnails, /xdownload links) cannot be. Allow the `webtoken` JSON method for this access token to get a session cookie, or set `AuthMode.bearer(token, { sessionCookie: false })` to stop asking.", t);
712
724
  }
713
- if (!await it(e)) throw x(e, !1), Error("The server refused the configured bearer token: it may be expired or revoked, or its JSON method rules may not allow the probe endpoint (see `auth.probeEndpoint`).");
714
- return tt(e, !0), x(e, !0), !0;
725
+ if (!await ot(e)) throw x(e, !1), Error("The server refused the configured bearer token: it may be expired or revoked, or its JSON method rules may not allow the probe endpoint (see `auth.probeEndpoint`).");
726
+ return rt(e, !0), x(e, !0), !0;
715
727
  }
716
728
  //#endregion
717
729
  //#region src/authentication/tokens/delete-web-token-cookie.ts
718
- var pt = async (e) => {
730
+ var ht = async (e) => {
719
731
  let t = new URLSearchParams({
720
732
  action: "deleteWebTokenCookie",
721
733
  noUserOverride: "true"
722
- }), { signal: n } = I(S(e));
723
- return L(e, "api/v1/challenge", t, {
734
+ }), { signal: n } = F(S(e));
735
+ return I(e, "api/v1/challenge", t, {
724
736
  signal: n,
725
737
  noAutoAuthentication: !0,
726
738
  noRecovery: !0
727
739
  });
728
- }, mt = () => pt(g);
740
+ }, gt = () => ht(g);
729
741
  //#endregion
730
742
  //#region src/authentication/session/logout.ts
731
- async function ht(e) {
743
+ async function _t(e) {
732
744
  let { userOverrideActive: t } = e.config;
733
- if (_t(e), et(e), v(e, "session").remove(y(e, w)), _e(e), e.events.emit("loggedOut", {}), !t) try {
734
- let { methodresult: t, logoutUrl: n } = await pt(e);
745
+ if (yt(e), nt(e), v(e, "session").remove(y(e, w)), _e(e), e.events.emit("loggedOut", {}), !t) try {
746
+ let { methodresult: t, logoutUrl: n } = await ht(e);
735
747
  if (t === "ok") return n;
736
748
  _(e).error("logout failed");
737
749
  } catch (t) {
738
750
  _(e).error("logout failed", t);
739
751
  }
740
752
  }
741
- async function gt() {
742
- return ht(g);
753
+ async function vt() {
754
+ return _t(g);
743
755
  }
744
- function _t(e) {
745
- v(e, "local").remove(y(e, C.legacyCsrfToken)), v(e, "session").remove(y(e, C.credentials)), tt(e, !1), x(e, !1);
756
+ function yt(e) {
757
+ v(e, "local").remove(y(e, C.legacyCsrfToken)), v(e, "session").remove(y(e, C.credentials)), rt(e, !1), x(e, !1);
746
758
  }
747
- function vt() {
748
- _t(g);
759
+ function bt() {
760
+ yt(g);
749
761
  }
750
762
  //#endregion
751
763
  //#region src/authentication/session/redirect-guard.ts
752
- function yt(e) {
764
+ function xt(e) {
753
765
  return v(e, "session").get(y(e, w)) !== null;
754
766
  }
755
- var bt = () => yt(g), xt = (e) => !!T(e) || nt(e), St = () => xt(g);
767
+ var St = () => xt(g), Ct = (e) => !!T(e) || it(e), wt = () => Ct(g);
756
768
  //#endregion
757
769
  //#region src/web-api/helpers/methods/del.ts
758
- async function R(e, t, n, r) {
770
+ async function L(e, t, n, r) {
759
771
  let i = E(e, r?.headers), a = D(e, t, n), o;
760
- r?.body && (i.has("Content-Type") || i.set("Content-Type", "application/json"), o = P(e, r.body, r)), _(e).debug(`Making DELETE request to: ${a}`);
772
+ r?.body && (i.has("Content-Type") || i.set("Content-Type", "application/json"), o = N(e, r.body, r)), _(e).debug(`Making DELETE request to: ${a}`);
761
773
  try {
762
- return await N(e, a, {
774
+ return await M(e, a, {
763
775
  method: "DELETE",
764
776
  headers: i,
765
777
  body: o
@@ -768,63 +780,63 @@ async function R(e, t, n, r) {
768
780
  throw _(e).error("Error making DELETE request:", t), t;
769
781
  }
770
782
  }
771
- async function Ct(e, t, n) {
772
- return R(g, e, t, n);
783
+ async function Tt(e, t, n) {
784
+ return L(g, e, t, n);
773
785
  }
774
786
  //#endregion
775
787
  //#region src/web-api/helpers/methods/patch.ts
776
- async function z(e, t, n, r) {
788
+ async function R(e, t, n, r) {
777
789
  let i = E(e, r?.headers);
778
790
  i.append("content-type", "application/json");
779
791
  let a = D(e, t);
780
792
  _(e).debug(`Making PATCH request to: ${a}`);
781
793
  try {
782
- return await N(e, a, {
794
+ return await M(e, a, {
783
795
  method: "PATCH",
784
796
  headers: i,
785
- body: P(e, n, r)
797
+ body: N(e, n, r)
786
798
  }, r);
787
799
  } catch (t) {
788
800
  throw _(e).error("Error making PATCH request:", t), t;
789
801
  }
790
802
  }
791
- async function wt(e, t, n) {
792
- return z(g, e, t, n);
803
+ async function Et(e, t, n) {
804
+ return R(g, e, t, n);
793
805
  }
794
806
  //#endregion
795
807
  //#region src/web-api/helpers/methods/put.ts
796
- async function B(e, t, n, r) {
808
+ async function z(e, t, n, r) {
797
809
  let i = E(e, r?.headers);
798
810
  i.has("Content-Type") || i.set("Content-Type", "application/json");
799
811
  let a = D(e, t);
800
812
  _(e).debug(`Making PUT request to: ${a}`);
801
813
  try {
802
- return await N(e, a, {
814
+ return await M(e, a, {
803
815
  method: "PUT",
804
816
  headers: i,
805
- body: P(e, n, r)
817
+ body: N(e, n, r)
806
818
  }, r);
807
819
  } catch (t) {
808
820
  throw _(e).error("Error making PUT request:", t), t;
809
821
  }
810
822
  }
811
- async function Tt(e, t, n) {
812
- return B(g, e, t, n);
823
+ async function Dt(e, t, n) {
824
+ return z(g, e, t, n);
813
825
  }
814
826
  //#endregion
815
827
  //#region src/web-api/v1/fetch-app.ts
816
- async function Et(e, t = g) {
828
+ async function Ot(e, t = g) {
817
829
  let n = e || t.config.app;
818
- return L(t, "api/v1/app", new URLSearchParams({ app: n || "" }));
830
+ return I(t, "api/v1/app", new URLSearchParams({ app: n || "" }));
819
831
  }
820
- async function Dt(e = g) {
832
+ async function kt(e = g) {
821
833
  let { app: t } = e.config;
822
- return L(e, "api/v1/app", new URLSearchParams({
834
+ return I(e, "api/v1/app", new URLSearchParams({
823
835
  app: t || "",
824
836
  preLogin: "true"
825
837
  }));
826
838
  }
827
- function Ot(e = g) {
839
+ function At(e = g) {
828
840
  let { backendUrl: t, app: n } = e.config;
829
841
  if (typeof window < "u") {
830
842
  if (t ||= window.location.origin, !n) {
@@ -841,47 +853,33 @@ function Ot(e = g) {
841
853
  autoOAuthProvider: void 0,
842
854
  autoSAMLProvider: void 0,
843
855
  bearerToken: void 0
844
- }), Promise.resolve({})) : Dt(e).then((t) => (b(e, {
845
- authMode: ze(e.config, t),
856
+ }), Promise.resolve({})) : kt(e).then((t) => (b(e, {
857
+ authMode: Ve(e.config, t),
846
858
  autoOAuthProvider: e.config.autoOAuthProvider || t.autoOAuthProvider,
847
859
  autoSAMLProvider: e.config.autoSAMLProvider || t.autoSAMLProvider
848
860
  }), t)).catch((t) => {
849
861
  throw _(e).error("atomic:fetchAppPreLogin error", t), t;
850
862
  });
851
863
  }
852
- var kt = Ot;
853
- //#endregion
854
- //#region src/web-api/helpers/utils/date-utils.ts
855
- function At(e) {
856
- if (!e) return;
857
- let t = new Date(e);
858
- return Number.isNaN(t.getTime()) ? void 0 : t;
859
- }
860
- function jt(e) {
861
- let t = At(e);
862
- return !!t && t.getTime() <= Date.now();
864
+ var jt = At, Mt = 10;
865
+ function Nt(e, t) {
866
+ let n = t?.aggregations;
867
+ if (!n || Array.isArray(n)) return;
868
+ let r = n[e]?.count;
869
+ return typeof r == "number" ? r : void 0;
863
870
  }
864
- function Mt(e, t = 7) {
865
- let n = At(e);
866
- if (!n) return !1;
867
- let r = Date.now(), i = r + t * 24 * 60 * 60 * 1e3, a = n.getTime();
868
- return a > r && a <= i;
871
+ function Pt(e, t, n) {
872
+ let r = Nt(e, t);
873
+ if (r !== void 0) return r;
874
+ let i = n?.[e];
875
+ return typeof i == "number" ? i : 10;
869
876
  }
870
- //#endregion
871
- //#region src/web-api/helpers/utils/with-retry.ts
872
- async function Nt(e, t = 0, n = 1e3) {
873
- let r;
874
- for (let i = 0; i <= t; i++) try {
875
- return await e();
876
- } catch (e) {
877
- if (r = e, e instanceof O && e.status >= 400 && e.status < 500 && e.status !== 429 || e instanceof DOMException && e.name === "AbortError") throw e;
878
- i < t && (c(`Retrying request (${i + 1}/${t})`, { error: e }), await new Promise((e) => setTimeout(e, n)));
879
- }
880
- throw r;
877
+ function Ft(e, t) {
878
+ return e.isDistribution || e.isTree || !e.items ? !1 : e.items.length > t;
881
879
  }
882
880
  //#endregion
883
881
  //#region src/helpers/column-resolver.ts
884
- function Pt(e, t, n) {
882
+ function It(e, t, n) {
885
883
  if (!e || !t) return;
886
884
  if (n) {
887
885
  let r = Object.keys(t.queries).find((e) => e === n?.toLowerCase()), i;
@@ -889,98 +887,100 @@ function Pt(e, t, n) {
889
887
  let a = (i?.columnsInfo?.columns || [])?.find((t) => t.aliases?.split(",")?.includes(e));
890
888
  if (a) return a.name;
891
889
  }
892
- let r = t.indexes?._?.columns, i = Object.entries(r).find((t) => t[1].aliases?.includes(e));
890
+ let r = t.indexes?._?.columns;
891
+ if (!r) return;
892
+ let i = Object.entries(r).find((t) => t[1].aliases?.includes(e));
893
893
  if (i) return i[0];
894
894
  }
895
895
  //#endregion
896
896
  //#region src/types/audit/AuditEventType.ts
897
- var V = /* @__PURE__ */ function(e) {
897
+ var B = /* @__PURE__ */ function(e) {
898
898
  return e.None = "None", e.Search_FirstPage = "Search_FirstPage", e.Search_Text = "Search_Text", e.Search_Refine = "Search_Refine", e.Search_Select_Item = "Search_Select_Item", e.Search_Select_Custom = "Search_Select_Custom", e.Search_Select_Concept = "Search_Select_Concept", e.Search_Select_Correction = "Search_Select_Correction", e.Search_GotoPage = "Search_GotoPage", e.Search_GotoTab = "Search_GotoTab", e.Search_DisplayResult = "Search_DisplayResult", e.Search_RemoveResult = "Search_RemoveResult", e.Search_RemoveAdvanced = "Search_RemoveAdvanced", e.Search_SavedQuery = "Search_SavedQuery", e.Search_WebService = "Search_WebService", e.Search_DidYouMean_Original = "Search_DidYouMean_Original", e.Search_DidYouMean_Correction = "Search_DidYouMean_Correction", e.Search_ExportCSV = "Search_ExportCSV", e.Search_SavedQuery_ExportCSV = "Search_SavedQuery_ExportCSV", e.Search_Selection_ExportCSV = "Search_Selection_ExportCSV", e.Search_AlertQuery = "Search_AlertQuery", e.Search_Select_AnalyticsItem = "Search_Select_AnalyticsItem", e.Search_Sort = "Search_Sort", e.Search_Exit_Logout = "Search_Exit_Logout", e.Search_Timeline_Usage = "Search_Timeline_Usage", e.Search_AutoComplete = "Search_Autocomplete", e.Search_Login_Success = "Login_Success_Form", e.Search_QueryIntent_Detected = "Search_QueryIntent_Detected", e.SavedQuery_Add = "SavedQuery_Add", e.SavedQuery_Delete = "SavedQuery_Delete", e.SavedQuery_DeleteAll = "SavedQuery_DeleteAll", e.SavedQuery_Rename = "SavedQuery_Rename", e.Alert_Edit = "Alert_Edit", e.Alert_Delete = "Alert_Delete", e.Alert_DeleteAll = "Alert_DeleteAll", e.Link_Display = "Link_Display", e.Link_Click = "Link_Click", e.Basket_Add = "Basket_Add", e.Basket_Delete = "Basket_Delete", e.Basket_DeleteAll = "Basket_DeleteAll", e.Basket_Rename = "Basket_Rename", e.Basket_AddDoc = "Basket_AddDoc", e.Basket_RemoveDoc = "Basket_RemoveDoc", e.Basket_Open = "Basket_Open", e.Basket_ExportCSV = "Basket_ExportCSV", e.Label_Add = "Label_Add", e.Label_Delete = "Label_Delete", e.Label_Rename = "Label_Rename", e.Label_Open = "Label_Open", e.Label_AddDoc = "Label_AddDoc", e.Label_RemoveDoc = "Label_RemoveDoc", e.Label_ExportCSV = "Label_ExportCSV", e.Label_Menu_ExportCSV = "Label_Menu_ExportCSV", e.Rating_Set = "Rating_Set", e.Rating_Delete = "Rating_Delete", e.Doc_Preview = "Doc_Preview", e.Doc_CacheHtml = "Doc_CacheHtml", e.Doc_CachePdf = "Doc_CachePdf", e.Doc_CacheOriginal = "Doc_CacheOriginal", e.Doc_Url1 = "Doc_Url1", e.Doc_Url2 = "Doc_Url2", e.Preview_Close = "Preview_Close", e.Click_ResultLink = "Click_ResultLink", e.Click_ResultLink1 = "Click_ResultLink1", e.Click_ResultLink2 = "Click_ResultLink2", e.Click_ResultLink3 = "Click_ResultLink3", e.Click_ResultLink4 = "Click_ResultLink4", e.Click_ResultLink5 = "Click_ResultLink5", e.Click_ResultLink6 = "Click_ResultLink6", e.Click_ResultLink7 = "Click_ResultLink7", e.Click_ResultLink8 = "Click_ResultLink8", e.Click_ResultLink9 = "Click_ResultLink9", e.Click_ResultLink10 = "Click_ResultLink10", e.Click_PreviewLink1 = "Click_PreviewLink1", e.Click_PreviewLink2 = "Click_PreviewLink2", e.Click_PreviewLink3 = "Click_PreviewLink3", e.Click_PreviewLink4 = "Click_PreviewLink4", e.Click_PreviewLink5 = "Click_PreviewLink5", e.Click_PreviewLink6 = "Click_PreviewLink6", e.Click_PreviewLink7 = "Click_PreviewLink7", e.Click_PreviewLink8 = "Click_PreviewLink8", e.Click_PreviewLink9 = "Click_PreviewLink9", e.Click_PreviewLink10 = "Click_PreviewLink10", e.RFM_ClickSet = "RFM_ClickSet", e.RFM_ClickReset = "RFM_ClickReset", e.RFM_Like = "RFM_Like", e.RFM_LikeReset = "RFM_LikeReset", e.RFM_Dislike = "RFM_Dislike", e.RFM_Important = "RFM_Important", e.RFM_ImportantReset = "RFM_ImportantReset", e.RFM_Ban = "RFM_Ban", e.Navigation_Exit = "Navigation_Exit", e.Navigation_Return = "Navigation_Return", e.Navigation_Route = "Navigation_Route", e.Answer_Display = "Answer_Display", e.Answer_Click = "Answer_Click", e.Answer_Result = "Answer_Result", e.Answer_Liked = "Answer_Liked", e.Answer_Disliked = "Answer_Disliked", e.Answer_Liked_Cancelled = "Answer_Liked_Cancelled", e.Answer_Disliked_Cancelled = "Answer_Disliked_Cancelled", e.TopPassages_Display = "TopPassages_Display", e.TopPassages_Click = "TopPassages_Click", e.UserSettings_Reset = "UserSettings_Reset", e.Change_Password_Failed = "change.password.failed", e.Change_Password_Success_Form = "change.password.success.form", e.Forgot_Password_Request = "forgot.password.request", e.Login_Denied = "login.denied", e.Login_Success_Form = "login.success.form", e.Send_Reset_Password_Link = "send.reset.password.link", e.Xrest_ChangePassword = "xrest.changepassword", e;
899
- }({}), H = /* @__PURE__ */ function(e) {
899
+ }({}), V = /* @__PURE__ */ function(e) {
900
900
  return e[e.none = 0] = "none", e[e.bool = 1] = "bool", e[e.date = 2] = "date", e[e.dateTime = 3] = "dateTime", e[e.time = 4] = "time", e[e.unsigned = 5] = "unsigned", e[e.integer = 6] = "integer", e[e.float = 7] = "float", e[e.double = 8] = "double", e[e.dates = 9] = "dates", e[e.dateTimes = 10] = "dateTimes", e[e.times = 11] = "times", e[e.varchar = 12] = "varchar", e[e.binary = 13] = "binary", e[e.string = 14] = "string", e[e.csv = 15] = "csv", e;
901
- }({}), U = /* @__PURE__ */ function(e) {
901
+ }({}), H = /* @__PURE__ */ function(e) {
902
902
  return e[e.none = 0] = "none", e[e.a = 2053] = "a", e[e.c = 4] = "c", e[e.d = 8] = "d", e[e.e = 2068] = "e", e[e.i = 256] = "i", e[e.l = 2052] = "l", e[e.n = 8192] = "n", e[e.t = 524292] = "t", e[e.x = 8388608] = "x", e[e.z = 33554432] = "z", e[e.f_ordinal = 8192] = "f_ordinal", e[e.f_multidates = 8192] = "f_multidates", e[e.f_varchar = 33554432] = "f_varchar", e[e.f_binary = 33562624] = "f_binary", e[e.f_string = 33562888] = "f_string", e[e.f_csv = 42477853] = "f_csv", e[e.f_overridable = 33554696] = "f_overridable", e;
903
- }({}), Ft = "1.0", It = /* @__PURE__ */ function(e) {
903
+ }({}), Lt = "1.0", Rt = /* @__PURE__ */ function(e) {
904
904
  return e[e.Original = 0] = "Original", e[e.Corrected = 1] = "Corrected", e;
905
- }({}), Lt = /* @__PURE__ */ function(e) {
905
+ }({}), zt = /* @__PURE__ */ function(e) {
906
906
  return e[e.none = 0] = "none", e[e.positiveRate = 1] = "positiveRate", e[e.mainlyPosRate = 2] = "mainlyPosRate", e[e.unrate = 4] = "unrate", e[e.mainlyNegRate = 8] = "mainlyNegRate", e[e.negativeRate = 16] = "negativeRate", e[e.all = 31] = "all", e[e.positiveOnly = 7] = "positiveOnly", e[e.negativeOnly = 28] = "negativeOnly", e[e.personalAll = 21] = "personalAll", e[e.personalPosOnly = 5] = "personalPosOnly", e[e.personalNegOnly = 20] = "personalNegOnly", e;
907
907
  }({});
908
908
  //#endregion
909
909
  //#region src/helpers/columns.ts
910
- function Rt(e) {
911
- if (!e) return H.none;
910
+ function Bt(e) {
911
+ if (!e) return V.none;
912
912
  switch (e.toLocaleLowerCase()) {
913
913
  case "bool":
914
- case "boolean": return H.bool;
915
- case "date": return H.date;
916
- case "datetime": return H.dateTime;
917
- case "time": return H.time;
918
- case "unsigned": return H.unsigned;
919
- case "integer": return H.integer;
920
- case "float": return H.float;
921
- case "double": return H.double;
922
- case "dates": return H.dates;
923
- case "datetimes": return H.dateTimes;
924
- case "times": return H.times;
925
- case "varchar": return H.varchar;
926
- case "binary": return H.binary;
927
- case "string": return H.string;
928
- case "csv": return H.csv;
929
- default: return H.none;
914
+ case "boolean": return V.bool;
915
+ case "date": return V.date;
916
+ case "datetime": return V.dateTime;
917
+ case "time": return V.time;
918
+ case "unsigned": return V.unsigned;
919
+ case "integer": return V.integer;
920
+ case "float": return V.float;
921
+ case "double": return V.double;
922
+ case "dates": return V.dates;
923
+ case "datetimes": return V.dateTimes;
924
+ case "times": return V.times;
925
+ case "varchar": return V.varchar;
926
+ case "binary": return V.binary;
927
+ case "string": return V.string;
928
+ case "csv": return V.csv;
929
+ default: return V.none;
930
930
  }
931
931
  }
932
- function zt(e) {
932
+ function Vt(e) {
933
933
  switch (e) {
934
- case "a": return U.a;
935
- case "c": return U.c;
936
- case "d": return U.d;
937
- case "e": return U.e;
938
- case "i": return U.i;
939
- case "l": return U.l;
940
- case "n": return U.n;
941
- case "t": return U.t;
942
- case "x": return U.x;
943
- case "z": return U.z;
944
- default: return U.none;
934
+ case "a": return H.a;
935
+ case "c": return H.c;
936
+ case "d": return H.d;
937
+ case "e": return H.e;
938
+ case "i": return H.i;
939
+ case "l": return H.l;
940
+ case "n": return H.n;
941
+ case "t": return H.t;
942
+ case "x": return H.x;
943
+ case "z": return H.z;
944
+ default: return H.none;
945
945
  }
946
946
  }
947
- function Bt(e) {
948
- let t = U.none;
949
- if (e) for (let n of e) t |= zt(n);
947
+ function Ht(e) {
948
+ let t = H.none;
949
+ if (e) for (let n of e) t |= Vt(n);
950
950
  return t;
951
951
  }
952
- function W(e, t, n, r) {
952
+ function U(e, t, n, r) {
953
953
  return {
954
954
  name: e,
955
955
  type: t,
956
956
  typeModifier: n,
957
- eType: Rt(t),
958
- eTypeModifier: Bt(n || ""),
957
+ eType: Bt(t),
958
+ eTypeModifier: Ht(n || ""),
959
959
  aliases: r
960
960
  };
961
961
  }
962
- var Vt = {
963
- id: W("id", "string"),
964
- text: W("text", "varchar"),
965
- documentlanguages: W("documentlanguages", "csv", "ci", ["language"]),
966
- databasealias: W("databasealias", "varchar"),
967
- globalrelevance: W("globalrelevance", "double"),
968
- matchingpartnames: W("matchingpartnames", "csv"),
969
- matchlocations: W("matchlocations", "csv"),
970
- matchlocationsperpartname: W("matchlocationsperpartname", "varchar"),
971
- extracts: W("extracts", "csv"),
972
- extractsperpartname: W("extractsperpartname", "varchar"),
973
- extractslocations: W("extractslocations", "csv"),
974
- documentweight: W("documentweight", "varchar"),
975
- groupcount: W("groupcount", "integer"),
976
- accesslists: W("accesslists", "varchar", void 0, ["accessLists"])
962
+ var Ut = {
963
+ id: U("id", "string"),
964
+ text: U("text", "varchar"),
965
+ documentlanguages: U("documentlanguages", "csv", "ci", ["language"]),
966
+ databasealias: U("databasealias", "varchar"),
967
+ globalrelevance: U("globalrelevance", "double"),
968
+ matchingpartnames: U("matchingpartnames", "csv"),
969
+ matchlocations: U("matchlocations", "csv"),
970
+ matchlocationsperpartname: U("matchlocationsperpartname", "varchar"),
971
+ extracts: U("extracts", "csv"),
972
+ extractsperpartname: U("extractsperpartname", "varchar"),
973
+ extractslocations: U("extractslocations", "csv"),
974
+ documentweight: U("documentweight", "varchar"),
975
+ groupcount: U("groupcount", "integer"),
976
+ accesslists: U("accesslists", "varchar", void 0, ["accessLists"])
977
977
  };
978
978
  //#endregion
979
979
  //#region src/helpers/filters.ts
980
- function Ht(e) {
980
+ function Wt(e) {
981
981
  return e.filter((e) => !!e);
982
982
  }
983
- var G = {
983
+ var W = {
984
984
  eq: (e, t) => ({
985
985
  field: e,
986
986
  operator: "eq",
@@ -1051,44 +1051,44 @@ var G = {
1051
1051
  if (!n) return;
1052
1052
  let r = n.split(" AND ").map((e) => e.trim()).filter(Boolean).map((t) => {
1053
1053
  let n = t.substring(t.search(/\s/) + 1).trim();
1054
- return t.startsWith(">=") ? G.gte(e, n) : t.startsWith(">") ? G.gt(e, n) : t.startsWith("<=") ? G.lte(e, n) : G.lt(e, n);
1054
+ return t.startsWith(">=") ? W.gte(e, n) : t.startsWith(">") ? W.gt(e, n) : t.startsWith("<=") ? W.lte(e, n) : W.lt(e, n);
1055
1055
  });
1056
- return G.and(...r);
1056
+ return W.and(...r);
1057
1057
  },
1058
- and: (...e) => Ut("and", e),
1059
- or: (...e) => Ut("or", e),
1058
+ and: (...e) => Gt("and", e),
1059
+ or: (...e) => Gt("or", e),
1060
1060
  not: (...e) => {
1061
- let t = Ht(e);
1061
+ let t = Wt(e);
1062
1062
  return t.length ? {
1063
1063
  operator: "not",
1064
1064
  filters: t
1065
1065
  } : void 0;
1066
1066
  }
1067
1067
  };
1068
- function Ut(e, t) {
1069
- let n = Ht(t);
1068
+ function Gt(e, t) {
1069
+ let n = Wt(t);
1070
1070
  if (n.length !== 0) return n.length === 1 ? n[0] : {
1071
1071
  operator: e,
1072
1072
  filters: n
1073
1073
  };
1074
1074
  }
1075
- function Wt(e) {
1075
+ function Kt(e) {
1076
1076
  if (!e) return;
1077
1077
  let { operator: t, field: n } = e;
1078
1078
  switch (t) {
1079
1079
  case "and":
1080
1080
  case "or": {
1081
- let n = (e.filters ?? []).map((e) => Wt(e));
1082
- return t === "and" ? G.and(...n) : G.or(...n);
1081
+ let n = (e.filters ?? []).map((e) => Kt(e));
1082
+ return t === "and" ? W.and(...n) : W.or(...n);
1083
1083
  }
1084
1084
  case "not": {
1085
- let t = (e.filters ?? []).map((e) => Wt(e));
1086
- return G.not(...t);
1085
+ let t = (e.filters ?? []).map((e) => Kt(e));
1086
+ return W.not(...t);
1087
1087
  }
1088
- case "in": return n && e.values?.length ? G.in(n, e.values) : void 0;
1089
- case "between": return n && e.start !== void 0 && e.end !== void 0 ? G.between(n, e.start, e.end) : void 0;
1090
- case "null": return n ? G.isNull(n) : void 0;
1091
- case "notnull": return n ? G.isNotNull(n) : void 0;
1088
+ case "in": return n && e.values?.length ? W.in(n, e.values) : void 0;
1089
+ case "between": return n && e.start !== void 0 && e.end !== void 0 ? W.between(n, e.start, e.end) : void 0;
1090
+ case "null": return n ? W.isNull(n) : void 0;
1091
+ case "notnull": return n ? W.isNotNull(n) : void 0;
1092
1092
  case "eq":
1093
1093
  case "neq":
1094
1094
  case "gt":
@@ -1097,21 +1097,21 @@ function Wt(e) {
1097
1097
  case "lte":
1098
1098
  case "like":
1099
1099
  case "contains":
1100
- case "regex": return n && e.value !== void 0 ? G[t](n, e.value) : void 0;
1101
- case void 0: return n && e.value !== void 0 ? G.eq(n, e.value) : void 0;
1100
+ case "regex": return n && e.value !== void 0 ? W[t](n, e.value) : void 0;
1101
+ case void 0: return n && e.value !== void 0 ? W.eq(n, e.value) : void 0;
1102
1102
  default: return;
1103
1103
  }
1104
1104
  }
1105
1105
  //#endregion
1106
1106
  //#region src/helpers/metadata.ts
1107
- function Gt(e, t) {
1107
+ function qt(e, t) {
1108
1108
  let n = e[t];
1109
1109
  return n === void 0 ? [] : (typeof n == "string" && (n = String(n).split(",")), Array.isArray(n) ? n.map((e) => {
1110
1110
  if (typeof e == "string") return e.trim();
1111
1111
  if (typeof e == "object" && e && "display" in e) return e.display.trim();
1112
1112
  }).filter((e) => e !== void 0) : [String(n).trim()]);
1113
1113
  }
1114
- function Kt(e, t) {
1114
+ function Jt(e, t) {
1115
1115
  let n = e[t];
1116
1116
  if (n === void 0) return [];
1117
1117
  if (typeof n == "string" && (n = String(n).split(",")), Array.isArray(n)) return n.map((e) => {
@@ -1135,7 +1135,7 @@ function Kt(e, t) {
1135
1135
  }
1136
1136
  //#endregion
1137
1137
  //#region src/helpers/pagination.ts
1138
- function qt(e) {
1138
+ function Yt(e) {
1139
1139
  let { page: t, pageSize: n, rowCount: r } = e;
1140
1140
  return t === void 0 || !n || r === void 0 ? {
1141
1141
  nextPage: void 0,
@@ -1147,35 +1147,35 @@ function qt(e) {
1147
1147
  }
1148
1148
  //#endregion
1149
1149
  //#region src/helpers/utils.ts
1150
- function K(e) {
1150
+ function G(e) {
1151
1151
  return typeof e == "object" && !!e;
1152
1152
  }
1153
- function Jt(e) {
1154
- return K(e) && Object.prototype.toString.call(e) === "[object ArrayBuffer]";
1155
- }
1156
- function Yt(e) {
1157
- return K(e) && Object.prototype.toString.call(e) === "[object Blob]";
1158
- }
1159
1153
  function Xt(e) {
1160
- return Object.prototype.toString.call(e) === "[object Date]";
1154
+ return G(e) && Object.prototype.toString.call(e) === "[object ArrayBuffer]";
1161
1155
  }
1162
1156
  function Zt(e) {
1163
- return typeof e == "string";
1157
+ return G(e) && Object.prototype.toString.call(e) === "[object Blob]";
1164
1158
  }
1165
1159
  function Qt(e) {
1166
- return (K(e) || Array.isArray(e)) && !Jt(e) && !Yt(e) && !Zt(e);
1160
+ return Object.prototype.toString.call(e) === "[object Date]";
1167
1161
  }
1168
1162
  function $t(e) {
1163
+ return typeof e == "string";
1164
+ }
1165
+ function en(e) {
1166
+ return (G(e) || Array.isArray(e)) && !Xt(e) && !Zt(e) && !$t(e);
1167
+ }
1168
+ function tn(e) {
1169
1169
  return e ? (e.getHours() * 60 * 60 + e.getMinutes() * 60 + e.getSeconds()) * 1e3 + e.getMilliseconds() : 0;
1170
1170
  }
1171
- function en(e = !0) {
1171
+ function nn(e = !0) {
1172
1172
  let t = Date.now();
1173
1173
  return (e ? "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" : "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx").replace(/[xy]/g, (e) => {
1174
1174
  let n = (t + Math.random() * 16) % 16 | 0;
1175
1175
  return t = Math.floor(t / 16), (e === "x" ? n : n & 3 | 8).toString(16);
1176
1176
  });
1177
1177
  }
1178
- function tn(e) {
1178
+ function rn(e) {
1179
1179
  if (!e) return "``";
1180
1180
  if (e = String(e), e.search(/[\\`]/) === -1) return `\`${e}\``;
1181
1181
  let t = ["`"];
@@ -1185,104 +1185,104 @@ function tn(e) {
1185
1185
  }
1186
1186
  return t.push("`"), t.join("");
1187
1187
  }
1188
- function nn(e) {
1189
- if (typeof crypto < "u" && crypto.subtle && typeof crypto.subtle.digest == "function") try {
1190
- return crypto.subtle.digest("SHA-512", new TextEncoder().encode(e)).then((e) => Array.prototype.map.call(new Uint8Array(e), (e) => `00${e.toString(16)}`.slice(-2)).join("")).catch(() => Promise.resolve(rn(e)));
1191
- } catch {
1192
- return Promise.resolve(rn(e));
1188
+ async function an(e) {
1189
+ let t = globalThis.crypto?.subtle;
1190
+ 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
+ let n = await t.digest("SHA-512", new TextEncoder().encode(e));
1192
+ return Array.from(new Uint8Array(n), (e) => e.toString(16).padStart(2, "0")).join("");
1193
+ }
1194
+ function on(e, t = 0) {
1195
+ let n = 3735928559 ^ t, r = 1103547991 ^ t;
1196
+ for (let t = 0; t < e.length; t++) {
1197
+ let i = e.charCodeAt(t);
1198
+ n = Math.imul(n ^ i, 2654435761), r = Math.imul(r ^ i, 1597334677);
1193
1199
  }
1194
- return Promise.resolve(rn(e));
1195
- }
1196
- function rn(e) {
1197
- let t = 2166136261;
1198
- for (let n = 0; n < e.length; n++) t ^= e.charCodeAt(n), t = t * 16777619 >>> 0;
1199
- let n = t.toString(16).padStart(8, "0"), r = ((t ^ 2863311530) >>> 0).toString(16).padStart(8, "0"), i = ((t ^ 1431655765) >>> 0).toString(16).padStart(8, "0"), a = ((t ^ 3435973836) >>> 0).toString(16).padStart(8, "0"), o = n + r + i + a;
1200
- return (o + o + o + o).substring(0, 128);
1200
+ return n = Math.imul(n ^ n >>> 16, 2246822507) ^ Math.imul(r ^ r >>> 13, 3266489909), r = Math.imul(r ^ r >>> 16, 2246822507) ^ Math.imul(n ^ n >>> 13, 3266489909), (4294967296 * (2097151 & r) + (n >>> 0)).toString(16);
1201
1201
  }
1202
1202
  //#endregion
1203
1203
  //#region src/web-api/v1/fetch-audit.ts
1204
- var an, on;
1205
- function q(e, t = !0) {
1206
- let n = sn(e.$auditRecord);
1207
- n && (cn(n), t && ln(n)), e.$auditRecord = n;
1204
+ var sn, cn;
1205
+ function K(e, t = !0) {
1206
+ let n = ln(e.$auditRecord);
1207
+ n && (un(n), t && dn(n)), e.$auditRecord = n;
1208
1208
  }
1209
- function sn(e) {
1209
+ function ln(e) {
1210
1210
  if (!e) return;
1211
1211
  let t;
1212
1212
  if (Array.isArray(e)) t = e;
1213
- else if (K(e)) {
1213
+ else if (G(e)) {
1214
1214
  let n = e;
1215
1215
  if (n.auditEvents || n.mlAuditEvents) return n;
1216
1216
  t = [e];
1217
1217
  }
1218
1218
  return { auditEvents: t };
1219
1219
  }
1220
- function cn(e) {
1221
- let t = un();
1220
+ function un(e) {
1221
+ let t = fn();
1222
1222
  return e.auditEvents?.forEach((e) => {
1223
1223
  e.detail ||= {}, e.detail.sessionid = t;
1224
1224
  }), e;
1225
1225
  }
1226
- function ln(e) {
1226
+ function dn(e) {
1227
1227
  let t = typeof window < "u" ? decodeURIComponent(window.location.href) : "http://localhost";
1228
1228
  return e?.auditEvents?.forEach((e) => {
1229
1229
  e.detail ||= {}, e.detail.url = t;
1230
1230
  }), e;
1231
1231
  }
1232
- function un() {
1233
- return (!an || dn()) && (an = en()), on = /* @__PURE__ */ new Date(), an;
1232
+ function fn() {
1233
+ return (!sn || pn()) && (sn = nn()), cn = /* @__PURE__ */ new Date(), sn;
1234
1234
  }
1235
- function dn() {
1236
- return Date.now() - on.getTime() > 600 * 1e3;
1235
+ function pn() {
1236
+ return Date.now() - cn.getTime() > 600 * 1e3;
1237
1237
  }
1238
- async function fn(e, t = !0, n = g) {
1238
+ async function mn(e, t = !0, n = g) {
1239
1239
  let r = {
1240
- event: V.None,
1240
+ event: B.None,
1241
1241
  $auditRecord: e
1242
1242
  };
1243
- return q(r, t), F(n, "api/v1/audit.notify", r, { noRecovery: !0 });
1243
+ return K(r, t), P(n, "api/v1/audit.notify", r, { noRecovery: !0 });
1244
1244
  }
1245
- var pn = { notify: fn };
1245
+ var hn = { notify: mn };
1246
1246
  //#endregion
1247
1247
  //#region src/web-api/v1/fetch-aggregation.ts
1248
- async function mn(e, t, n, r = g) {
1249
- let i = e.items?.length || 0, a = {
1248
+ async function gn(e, t, n, r, i = g) {
1249
+ let a = r ?? Pt(e.name, t, i.config.aggregationCounts), o = e.items?.length || 0, s = {
1250
1250
  query: {
1251
1251
  ...t,
1252
1252
  action: "aggregate",
1253
1253
  aggregations: { [e.name]: {
1254
- skip: i,
1255
- count: 10
1254
+ skip: o,
1255
+ count: a
1256
1256
  } }
1257
1257
  },
1258
- $auditRecord: { auditEvents: [n] }
1258
+ ...n ? { $auditRecord: { auditEvents: [n] } } : {}
1259
1259
  };
1260
- q(a);
1261
- let { aggregations: o } = await Te(await F(r, "api/v1/query", a)), s = o[0];
1262
- return s.$hasMore = s.items.length > 10, s.items = [...e.items, ...s.items], Promise.resolve(s);
1260
+ K(s);
1261
+ let c = (await P(i, "api/v1/query", s)).aggregations[0];
1262
+ return c.$hasMore = Ft(c, a), c.items = [...e.items ?? [], ...c.items ?? []], Promise.resolve(c);
1263
1263
  }
1264
1264
  //#endregion
1265
1265
  //#region src/web-api/v1/fetch-dataset.ts
1266
- async function hn(e, t, n = {}, r = g) {
1267
- let i = await F(r, `api/v1/search.dataset/${e}/${t}`, { parameters: n }), a = t[0].toLowerCase() + t.slice(1), o = i.datasets[a];
1266
+ async function _n(e, t, n = {}, r = g) {
1267
+ 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
1268
  if ("errorCode" in o && "errorMessage" in o) throw Error(o.errorMessage);
1269
1269
  return o;
1270
1270
  }
1271
- async function gn(e, t, n = g) {
1271
+ async function vn(e, t, n = g) {
1272
1272
  let r = `api/v1/search.dataset/${e}`, { parameters: i = {}, datasets: a = [] } = t;
1273
- return (await F(n, r, {
1273
+ return (await P(n, r, {
1274
1274
  parameters: i,
1275
1275
  datasets: a
1276
1276
  })).datasets;
1277
1277
  }
1278
- async function _n(e, t = g) {
1279
- return await L(t, `api/v1/search.dataset/${e}`);
1278
+ async function yn(e, t = g) {
1279
+ return await I(t, `api/v1/search.dataset/${e}`);
1280
1280
  }
1281
1281
  //#endregion
1282
1282
  //#region src/web-api/v1/fetch-labels.ts
1283
- async function vn(e, t = !0, n, r = g) {
1283
+ async function bn(e, t = !0, n, r = g) {
1284
1284
  try {
1285
- return (await F(r, "api/v1/labels", {
1285
+ return (await P(r, "api/v1/labels", {
1286
1286
  action: "list",
1287
1287
  q: e,
1288
1288
  public: t,
@@ -1293,10 +1293,10 @@ async function vn(e, t = !0, n, r = g) {
1293
1293
  throw l("Error in fetchLabels", e), e;
1294
1294
  }
1295
1295
  }
1296
- async function yn(e = g) {
1296
+ async function xn(e = g) {
1297
1297
  try {
1298
1298
  let { app: t = "" } = e.config;
1299
- return L(e, "api/v1/labels", new URLSearchParams({
1299
+ return await I(e, "api/v1/labels", new URLSearchParams({
1300
1300
  app: t,
1301
1301
  action: "getUserRights"
1302
1302
  }));
@@ -1304,16 +1304,16 @@ async function yn(e = g) {
1304
1304
  throw l("Error in getUserRights", e), e;
1305
1305
  }
1306
1306
  }
1307
- async function bn(e, t, n = !0, r = g) {
1307
+ async function Sn(e, t, n = !0, r = g) {
1308
1308
  try {
1309
- return F(r, "api/v1/labels", {
1309
+ let i = {
1310
1310
  action: "add",
1311
1311
  labels: e,
1312
1312
  ids: t,
1313
1313
  public: n,
1314
1314
  $auditRecord: {
1315
1315
  auditEvents: [{
1316
- type: V.Label_AddDoc,
1316
+ type: B.Label_AddDoc,
1317
1317
  detail: {
1318
1318
  public: n,
1319
1319
  label: e ? e.toString() : null,
@@ -1325,21 +1325,22 @@ async function bn(e, t, n = !0, r = g) {
1325
1325
  documentIds: t
1326
1326
  }]
1327
1327
  }
1328
- });
1328
+ };
1329
+ return K(i), await P(r, "api/v1/labels", i);
1329
1330
  } catch (e) {
1330
1331
  throw l("Error in add", e), e;
1331
1332
  }
1332
1333
  }
1333
- async function xn(e, t, n = !0, r = g) {
1334
+ async function Cn(e, t, n = !0, r = g) {
1334
1335
  try {
1335
- return F(r, "api/v1/labels", {
1336
+ let i = {
1336
1337
  action: "remove",
1337
1338
  labels: e,
1338
1339
  ids: t,
1339
1340
  public: n,
1340
1341
  $auditRecord: {
1341
1342
  auditEvents: [{
1342
- type: V.Label_RemoveDoc,
1343
+ type: B.Label_RemoveDoc,
1343
1344
  detail: {
1344
1345
  public: n,
1345
1346
  label: e ? e.toString() : null,
@@ -1351,108 +1352,113 @@ async function xn(e, t, n = !0, r = g) {
1351
1352
  documentIds: t
1352
1353
  }]
1353
1354
  }
1354
- });
1355
+ };
1356
+ return K(i), await P(r, "api/v1/labels", i);
1355
1357
  } catch (e) {
1356
1358
  throw l("Error in remove", e), e;
1357
1359
  }
1358
1360
  }
1359
- async function Sn(e, t, n = !0, r = g) {
1361
+ async function wn(e, t, n = !0, r = g) {
1360
1362
  try {
1361
- return F(r, "api/v1/labels", {
1363
+ let i = {
1362
1364
  action: "rename",
1363
1365
  labels: e,
1364
1366
  newLabel: t,
1365
1367
  public: n,
1366
- auditEvents: {
1367
- type: V.Label_Rename,
1368
+ $auditRecord: { auditEvents: [{
1369
+ type: B.Label_Rename,
1368
1370
  detail: {
1369
1371
  public: n,
1370
1372
  oldlabel: e ? e.toString() : null,
1371
1373
  label: t
1372
1374
  }
1373
- }
1374
- });
1375
+ }] }
1376
+ };
1377
+ return K(i), await P(r, "api/v1/labels", i);
1375
1378
  } catch (e) {
1376
1379
  throw l("Error in rename", e), e;
1377
1380
  }
1378
1381
  }
1379
- async function Cn(e, t = !0, n = g) {
1382
+ async function Tn(e, t = !0, n = g) {
1380
1383
  try {
1381
- return F(n, "api/v1/labels", {
1384
+ let r = {
1382
1385
  action: "delete",
1383
1386
  labels: e,
1384
1387
  public: t,
1385
- auditEvents: {
1386
- type: V.Label_Delete,
1388
+ $auditRecord: { auditEvents: [{
1389
+ type: B.Label_Delete,
1387
1390
  detail: {
1388
1391
  public: t,
1389
1392
  label: e ? e.toString() : null
1390
1393
  }
1391
- }
1392
- });
1394
+ }] }
1395
+ };
1396
+ return K(r), await P(n, "api/v1/labels", r);
1393
1397
  } catch (e) {
1394
1398
  throw l("Error in deleteLabels", e), e;
1395
1399
  }
1396
1400
  }
1397
- async function wn(e, t, n = !0, r = g) {
1401
+ async function En(e, t, n = !0, r = g) {
1398
1402
  try {
1399
- return F(r, "api/v1/labels", {
1403
+ let i = {
1400
1404
  action: "bulkAdd",
1401
1405
  labels: e,
1402
1406
  query: t,
1403
1407
  public: n,
1404
- auditEvents: {
1405
- type: V.Label_Add,
1408
+ $auditRecord: { auditEvents: [{
1409
+ type: B.Label_Add,
1406
1410
  detail: {
1407
1411
  public: n,
1408
1412
  label: e ? e.toString() : null,
1409
1413
  query: t === null ? null : t.name
1410
1414
  }
1411
- }
1412
- });
1415
+ }] }
1416
+ };
1417
+ return K(i), await P(r, "api/v1/labels", i);
1413
1418
  } catch (e) {
1414
1419
  throw l("Error in bulkAdd", e), e;
1415
1420
  }
1416
1421
  }
1417
- async function Tn(e, t, n = !0, r = g) {
1422
+ async function Dn(e, t, n = !0, r = g) {
1418
1423
  try {
1419
- return F(r, "api/v1/labels", {
1424
+ let i = {
1420
1425
  action: "bulkRemove",
1421
1426
  labels: e,
1422
1427
  query: t,
1423
1428
  public: n,
1424
- auditEvents: {
1425
- type: V.Label_Delete,
1429
+ $auditRecord: { auditEvents: [{
1430
+ type: B.Label_Delete,
1426
1431
  detail: {
1427
1432
  public: n,
1428
1433
  label: e ? e.toString() : null,
1429
1434
  query: t === null ? null : t.name
1430
1435
  }
1431
- }
1432
- });
1436
+ }] }
1437
+ };
1438
+ return K(i), await P(r, "api/v1/labels", i);
1433
1439
  } catch (e) {
1434
1440
  throw l("Error in bulkRemove", e), e;
1435
1441
  }
1436
1442
  }
1437
- var J = {
1438
- getUserRights: yn,
1439
- add: bn,
1440
- remove: xn,
1441
- rename: Sn,
1442
- delete: Cn,
1443
- bulkAdd: wn,
1444
- bulkRemove: Tn
1443
+ var q = {
1444
+ getUserRights: xn,
1445
+ add: Sn,
1446
+ remove: Cn,
1447
+ rename: wn,
1448
+ delete: Tn,
1449
+ bulkAdd: En,
1450
+ bulkRemove: Dn
1445
1451
  };
1446
1452
  //#endregion
1447
1453
  //#region src/web-api/v1/fetch-preview.ts
1448
- async function En(e, t, n = g) {
1449
- if (typeof window > "u") return F(n, "api/v1/preview", {
1454
+ async function On(e, t, n = g) {
1455
+ if (typeof window > "u") return P(n, "api/v1/preview", {
1450
1456
  action: "get",
1451
1457
  id: e,
1452
1458
  query: t
1453
1459
  });
1454
1460
  let r = `${window.location.origin}${window.location.pathname}`;
1455
- return F(n, "api/v1/preview", {
1461
+ return P(n, "api/v1/preview", {
1456
1462
  action: "get",
1457
1463
  id: e,
1458
1464
  query: {
@@ -1462,61 +1468,66 @@ async function En(e, t, n = g) {
1462
1468
  browserUrl: r
1463
1469
  });
1464
1470
  }
1465
- async function Dn(e) {
1466
- let t = new Headers();
1467
- t.append("content-type", "text"), Te(await fetch(e, {
1471
+ async function kn(e, t = g) {
1472
+ return M(t, /^[a-z][a-z0-9+.-]*:\/\//i.test(e) ? e : D(t, e.replace(/^\//, "")), {
1468
1473
  method: "GET",
1469
- headers: t
1470
- }));
1474
+ headers: E(t)
1475
+ }, { responseType: "text" });
1471
1476
  }
1472
1477
  //#endregion
1473
1478
  //#region src/web-api/v1/fetch-principal.ts
1474
- async function On(e, t = g) {
1475
- return L(t, "api/v1/principal", new URLSearchParams({ action: "get" }), {
1476
- noAutoAuthentication: M(t),
1479
+ async function An(e, t = g) {
1480
+ return I(t, "api/v1/principal", new URLSearchParams({ action: "get" }), {
1481
+ noAutoAuthentication: j(t),
1477
1482
  ...e
1478
1483
  });
1479
1484
  }
1480
- async function kn(e, t = g) {
1485
+ async function jn(e, t = g) {
1481
1486
  let n = new URLSearchParams();
1482
1487
  return Object.entries(e).forEach(([e, t]) => {
1483
1488
  t !== void 0 && n.append(e, String(t));
1484
- }), L(t, "api/v1/principal/list", n, { noAutoAuthentication: M(t) });
1489
+ }), I(t, "api/v1/principal/list", n, { noAutoAuthentication: j(t) });
1485
1490
  }
1486
- async function An(e, t = g) {
1487
- return e ? L(t, "api/v1/principal", new URLSearchParams({
1491
+ async function Mn(e, t = g) {
1492
+ return e ? I(t, "api/v1/principal", new URLSearchParams({
1488
1493
  action: "userid",
1489
1494
  userid: e
1490
- }), { noAutoAuthentication: M(t) }) : Promise.reject(/* @__PURE__ */ Error("userid is required"));
1495
+ }), { noAutoAuthentication: j(t) }) : Promise.reject(/* @__PURE__ */ Error("userid is required"));
1496
+ }
1497
+ async function Nn(e, t = g) {
1498
+ 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
+ }
1500
+ var Pn = { principal: {
1501
+ get: An,
1502
+ list: jn,
1503
+ userid: Mn,
1504
+ userids: Nn
1505
+ } };
1506
+ //#endregion
1507
+ //#region src/web-api/v1/fetch-query.ts
1508
+ function Fn(e, t, n) {
1509
+ let r = n.config.aggregationCounts;
1510
+ e.aggregations?.forEach((e) => {
1511
+ e.$hasMore = Ft(e, Pt(e.name, t, r)), e.isTree && Rn(e);
1512
+ });
1491
1513
  }
1492
- async function jn(e, t = g) {
1493
- return e.length === 0 ? Promise.reject(/* @__PURE__ */ Error("userids is required")) : L(t, "api/v1/principal/userids", new URLSearchParams({ userids: [...e].join(",") }), { noAutoAuthentication: M(t) });
1494
- }
1495
- var Mn = { principal: {
1496
- get: On,
1497
- list: kn,
1498
- userid: An,
1499
- userids: jn
1500
- } }, Nn = 11;
1501
- async function Pn(e, t, n, r = g) {
1502
- let i = await F(r, "api/v1/query", {
1514
+ async function In(e, t, n, r = g) {
1515
+ let i = await P(r, "api/v1/query", {
1503
1516
  query: e,
1504
1517
  $auditRecord: t,
1505
1518
  queryIntentData: n
1506
1519
  });
1507
- i.aggregations.forEach((e) => {
1508
- e.$hasMore = !1, !e.isDistribution && !e.isTree && e.items && (e.$hasMore = e.items.length === Nn), e.isTree && e.items && Y(e);
1509
- }), i.records?.map((e) => Object.assign(e, {
1520
+ Fn(i, e, r), i.records?.map((e) => Object.assign(e, {
1510
1521
  value: e.title,
1511
1522
  type: "default"
1512
1523
  }));
1513
1524
  let a = {
1514
1525
  ...i,
1515
- ...qt(i)
1526
+ ...Yt(i)
1516
1527
  };
1517
1528
  return Promise.resolve(a);
1518
1529
  }
1519
- async function Fn(e, t, n, r = g) {
1530
+ async function Ln(e, t, n, r = g) {
1520
1531
  let { app: i = "" } = r.config, a = {
1521
1532
  methods: [],
1522
1533
  mode: t,
@@ -1528,11 +1539,9 @@ async function Fn(e, t, n, r = g) {
1528
1539
  app: i,
1529
1540
  query: t
1530
1541
  });
1531
- let o = await F(r, "api/v1/multi", a);
1532
- o.results.forEach((e) => {
1533
- e.aggregations.forEach((e) => {
1534
- e.$hasMore = !1, !e.isDistribution && !e.isTree && e.items && (e.$hasMore = e.items.length === Nn), e.isTree && Y(e);
1535
- });
1542
+ let o = await P(r, "api/v1/multi", a);
1543
+ o.results.forEach((t, n) => {
1544
+ Fn(t, e[n], r);
1536
1545
  }), o.results.forEach((e) => {
1537
1546
  e.records?.map((e) => Object.assign(e, {
1538
1547
  value: e.title,
@@ -1541,23 +1550,23 @@ async function Fn(e, t, n, r = g) {
1541
1550
  });
1542
1551
  let s = o.results.map((e) => ({
1543
1552
  ...e,
1544
- ...qt(e)
1553
+ ...Yt(e)
1545
1554
  }));
1546
1555
  return Promise.resolve(s);
1547
1556
  }
1548
- function Y(e, t = "", n = 0) {
1557
+ function Rn(e, t = "", n = 0) {
1549
1558
  let r = [];
1550
1559
  return e.items && e.items.forEach((e) => {
1551
1560
  let i = t ? `${t}/${e.value}` : e.value, a = n + 1;
1552
1561
  r.push({
1553
1562
  path: i,
1554
1563
  level: a
1555
- }), e.$path = i, e.$level = a, e.hasChildren ? r = r.concat(Y(e, i, a)) : e.hasChildren = !1;
1564
+ }), e.$path = i, e.$level = a, e.hasChildren ? r = r.concat(Rn(e, i, a)) : e.hasChildren = !1;
1556
1565
  }), r;
1557
1566
  }
1558
1567
  //#endregion
1559
1568
  //#region src/web-api/v1/fetch-query-export.ts
1560
- async function In({ model: e, appName: t, query: n, article: r }, i = g) {
1569
+ async function zn({ model: e, appName: t, query: n, article: r }, i = g) {
1561
1570
  let { webservice: a, format: o, maxcount: s, exportedColumns: c, export: l } = e, u = {
1562
1571
  app: t,
1563
1572
  webservice: a,
@@ -1571,30 +1580,30 @@ async function In({ model: e, appName: t, query: n, article: r }, i = g) {
1571
1580
  detail: { resultid: r ? r.id : void 0 }
1572
1581
  }] }
1573
1582
  };
1574
- return q(u), await F(i, "api/v1/search.queryexport", u, { responseType: "blob" });
1583
+ return K(u), await P(i, "api/v1/search.queryexport", u, { responseType: "blob" });
1575
1584
  }
1576
1585
  //#endregion
1577
1586
  //#region src/web-api/v1/fetch-query-intent.ts
1578
- async function Ln(e, t = g) {
1579
- return (await F(t, "api/v1/queryintent", { query: e }))?.intents;
1587
+ async function Bn(e, t = g) {
1588
+ return (await P(t, "api/v1/queryintent", { query: e }))?.intents;
1580
1589
  }
1581
1590
  //#endregion
1582
1591
  //#region src/web-api/v1/fetch-security-principal.ts
1583
- function Rn(e, t, n = g) {
1584
- return F(n, "api/v1/security.principal", e, { signal: t });
1592
+ function Vn(e, t, n = g) {
1593
+ return P(n, "api/v1/security.principal", e, { signal: t });
1585
1594
  }
1586
1595
  //#endregion
1587
1596
  //#region src/web-api/v1/fetch-similar-documents.ts
1588
- async function zn(e, t, n, r = g) {
1589
- return (await F(r, "api/v1/similardocuments", {
1597
+ async function Hn(e, t, n, r = g) {
1598
+ return (await P(r, "api/v1/similardocuments", {
1590
1599
  sourceDocumentId: e,
1591
1600
  query: { name: t }
1592
1601
  }, { signal: n })).data;
1593
1602
  }
1594
1603
  //#endregion
1595
1604
  //#region src/web-api/v1/fetch-sponsored-links.ts
1596
- async function Bn(e, t, n = g) {
1597
- return (await F(n, "api/v1/query.links", {
1605
+ async function Un(e, t, n = g) {
1606
+ return (await P(n, "api/v1/query.links", {
1598
1607
  webservice: e,
1599
1608
  query: t
1600
1609
  }))?.links?.map((e) => ({
@@ -1604,9 +1613,9 @@ async function Bn(e, t, n = g) {
1604
1613
  }
1605
1614
  //#endregion
1606
1615
  //#region src/utils/to-sql.ts
1607
- function Vn(e, t) {
1616
+ function Wn(e, t) {
1608
1617
  if (typeof e == "number") return `${e}`;
1609
- if (Xt(e)) return t ? `'${Hn(e)}'` : Hn(e);
1618
+ if (Qt(e)) return t ? `'${Gn(e)}'` : Gn(e);
1610
1619
  if (typeof e == "boolean") return e ? "true" : "false";
1611
1620
  if (e === null) return "null";
1612
1621
  if (Array.isArray(e)) {
@@ -1617,10 +1626,10 @@ function Vn(e, t) {
1617
1626
  }
1618
1627
  return t ? `'${e}'` : e;
1619
1628
  }
1620
- function Hn(e) {
1629
+ function Gn(e) {
1621
1630
  if (!e) return "";
1622
1631
  try {
1623
- return $t(e) === 0 ? new Intl.DateTimeFormat("en-CA", {
1632
+ return tn(e) === 0 ? new Intl.DateTimeFormat("en-CA", {
1624
1633
  year: "numeric",
1625
1634
  month: "2-digit",
1626
1635
  day: "2-digit"
@@ -1636,7 +1645,7 @@ function Hn(e) {
1636
1645
  }
1637
1646
  //#endregion
1638
1647
  //#region src/web-api/v1/fetch-suggest.ts
1639
- async function Un(e, t, n, r, i, a = g) {
1648
+ async function Kn(e, t, n, r, i, a = g) {
1640
1649
  let { app: o } = a.config, s = {
1641
1650
  app: o || "",
1642
1651
  suggestQuery: e,
@@ -1646,14 +1655,14 @@ async function Un(e, t, n, r, i, a = g) {
1646
1655
  showSource: i
1647
1656
  };
1648
1657
  try {
1649
- return (await F(a, "api/v1/search.suggest", s)).suggests;
1658
+ return (await P(a, "api/v1/search.suggest", s)).suggests;
1650
1659
  } catch (e) {
1651
1660
  throw console.error("Error fetching suggestions:", e), e;
1652
1661
  }
1653
1662
  }
1654
- async function Wn(e, t, n, r, i = g) {
1663
+ async function qn(e, t, n, r, i = g) {
1655
1664
  let { app: a } = i.config;
1656
- return (await F(i, "api/v1/suggestquery", {
1665
+ return (await P(i, "api/v1/suggestquery", {
1657
1666
  app: a || "",
1658
1667
  suggestQuery: e,
1659
1668
  text: t,
@@ -1661,22 +1670,22 @@ async function Wn(e, t, n, r, i = g) {
1661
1670
  kinds: r
1662
1671
  })).suggests;
1663
1672
  }
1664
- async function Gn(e, t, n, r = g) {
1673
+ async function Jn(e, t, n, r = g) {
1665
1674
  if (!t) return Promise.resolve([]);
1666
- let { app: i } = r.config, a = await F(r, "api/v1/suggestfield", {
1675
+ let { app: i } = r.config, a = await P(r, "api/v1/suggestfield", {
1667
1676
  app: i || "",
1668
1677
  text: e,
1669
1678
  fields: t,
1670
1679
  query: n
1671
1680
  });
1672
1681
  return a.suggests.forEach((e) => {
1673
- e.display = Vn(e.display);
1682
+ e.display = Wn(e.display);
1674
1683
  }), a.suggests;
1675
1684
  }
1676
1685
  //#endregion
1677
1686
  //#region src/web-api/v1/fetch-text-chunk.ts
1678
- async function Kn(e, t, n, r, i, a, o = g) {
1679
- return F(o, "api/v1/doc.textchunks", {
1687
+ async function Yn(e, t, n, r, i, a, o = g) {
1688
+ return P(o, "api/v1/doc.textchunks", {
1680
1689
  id: e,
1681
1690
  textChunks: t,
1682
1691
  highlights: n,
@@ -1687,228 +1696,233 @@ async function Kn(e, t, n, r, i, a, o = g) {
1687
1696
  }
1688
1697
  //#endregion
1689
1698
  //#region src/web-api/v1/fetch-user-settings.ts
1690
- async function qn(e = g) {
1699
+ async function Xn(e = g) {
1691
1700
  let { app: t } = e.config;
1692
- return L(e, "api/v1/usersettings", new URLSearchParams({
1701
+ return I(e, "api/v1/usersettings", new URLSearchParams({
1693
1702
  app: t || "",
1694
1703
  action: "load"
1695
1704
  }));
1696
1705
  }
1697
- async function Jn(e, t, n = g) {
1706
+ async function Zn(e, t, n = g) {
1698
1707
  let r = {
1699
1708
  action: "save",
1700
1709
  userSettings: e,
1701
1710
  $auditRecord: { auditEvents: [t] }
1702
1711
  };
1703
- return q(r), F(n, "api/v1/usersettings", r);
1712
+ return K(r), P(n, "api/v1/usersettings", r);
1704
1713
  }
1705
- async function Yn(e, t, n = g) {
1714
+ async function Qn(e, t, n = g) {
1706
1715
  let r = {
1707
1716
  action: "patch",
1708
1717
  userSettings: e,
1709
1718
  $auditRecord: t ? { auditEvents: [t] } : void 0
1710
1719
  };
1711
- return q(r), F(n, "api/v1/usersettings", r);
1720
+ return K(r), P(n, "api/v1/usersettings", r);
1712
1721
  }
1713
- async function Xn(e = g) {
1714
- return Jn({}, { type: "UserSettings_Reset" }, e);
1722
+ async function $n(e = g) {
1723
+ return Zn({}, { type: "UserSettings_Reset" }, e);
1715
1724
  }
1716
1725
  //#endregion
1717
1726
  //#region src/web-api/v2/fetch-change-password.ts
1718
- async function Zn(e, t, n = g) {
1719
- return F(n, "api/v2/security/password/change", {
1727
+ async function er(e, t, n = g) {
1728
+ return P(n, "api/v2/security/password/change", {
1720
1729
  newPassword: e,
1721
1730
  currentPassword: t
1722
1731
  });
1723
1732
  }
1724
1733
  //#endregion
1725
1734
  //#region src/web-api/v2/fetch-document-upload-container.ts
1726
- var X = "api/v2/document-upload/container";
1727
- function Qn(e) {
1735
+ var J = "api/v2/document-upload/container";
1736
+ function tr(e) {
1728
1737
  let t = new URLSearchParams();
1729
1738
  return e.page !== void 0 && t.set("page", String(e.page)), e.pageSize !== void 0 && t.set("pageSize", String(e.pageSize)), t;
1730
1739
  }
1731
- function $n(e = {}, t = g) {
1732
- return L(t, X, Qn(e));
1740
+ function nr(e = {}, t = g) {
1741
+ return I(t, J, tr(e));
1733
1742
  }
1734
- function er(e, t = g) {
1735
- return L(t, `${X}/${encodeURIComponent(e)}`);
1743
+ function rr(e, t = g) {
1744
+ return I(t, `${J}/${encodeURIComponent(e)}`);
1736
1745
  }
1737
- function tr(e, t = g) {
1738
- return F(t, X, e);
1746
+ function ir(e, t = g) {
1747
+ return P(t, J, e);
1739
1748
  }
1740
- function nr(e, t, n = g) {
1741
- return B(n, `${X}/${encodeURIComponent(e)}`, t);
1749
+ function ar(e, t, n = g) {
1750
+ return z(n, `${J}/${encodeURIComponent(e)}`, t);
1742
1751
  }
1743
- async function rr(e, t = g) {
1744
- let n = (await R(t, "api/v2/document-upload/containers", void 0, { body: { containerIds: e } }))?.failed ?? [], r = new Set(n.map((e) => e.containerId));
1752
+ async function or(e, t = g) {
1753
+ let n = (await L(t, "api/v2/document-upload/containers", void 0, { body: { containerIds: e } }))?.failed ?? [], r = new Set(n.map((e) => e.containerId));
1745
1754
  return {
1746
1755
  succeeded: e.filter((e) => !r.has(e)),
1747
1756
  failed: n
1748
1757
  };
1749
1758
  }
1750
- function ir(e, t = {}, n = g) {
1751
- return L(n, `${X}/${encodeURIComponent(e)}/documents`, Qn(t));
1759
+ function sr(e, t = {}, n = g) {
1760
+ return I(n, `${J}/${encodeURIComponent(e)}/documents`, tr(t));
1752
1761
  }
1753
- function ar(e, t, n = g) {
1754
- return R(n, `${X}/${encodeURIComponent(e)}/documents`, void 0, { body: { fileIds: t } });
1762
+ function cr(e, t, n = g) {
1763
+ return L(n, `${J}/${encodeURIComponent(e)}/documents`, void 0, { body: { fileIds: t } });
1755
1764
  }
1756
1765
  //#endregion
1757
1766
  //#region src/web-api/v2/fetch-forgot-password.ts
1758
- async function or(e, t = g) {
1759
- return F(t, "api/v2/security/password/ask-reset-email", {
1760
- changePasswordRedirectUrl: `${window.location.origin}/login?mode=changepassword`,
1767
+ function lr() {
1768
+ return typeof window > "u" ? void 0 : `${window.location.origin}/login?mode=changepassword`;
1769
+ }
1770
+ async function ur(e, t, n = g) {
1771
+ let r = t ?? lr();
1772
+ 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
+ return P(n, "api/v2/security/password/ask-reset-email", {
1774
+ changePasswordRedirectUrl: r,
1761
1775
  userName: e
1762
1776
  });
1763
1777
  }
1764
1778
  //#endregion
1765
1779
  //#region src/web-api/v2/fetch-user-profile.ts
1766
- async function sr(e, t = g) {
1767
- return await L(t, `api/v2/user-profile/${e}`);
1780
+ async function dr(e, t = g) {
1781
+ return await I(t, `api/v2/user-profile/${e}`);
1768
1782
  }
1769
- async function cr(e, t = g) {
1770
- return await F(t, "api/v2/user-profile", e);
1783
+ async function fr(e, t = g) {
1784
+ return await P(t, "api/v2/user-profile", e);
1771
1785
  }
1772
- async function lr(e, t, n, r = g) {
1773
- return await z(r, `api/v2/user-profile/${e.data?.id}/${t}/${n}`, e);
1786
+ async function pr(e, t, n, r = g) {
1787
+ return await R(r, `api/v2/user-profile/${e.data?.id}/${t}/${n}`, e);
1774
1788
  }
1775
- async function ur(e, t, n, r = g) {
1776
- return (await R(r, `api/v2/user-profile/${e.data?.id}/${t}/${n}`)).success === !0;
1789
+ async function mr(e, t, n, r = g) {
1790
+ return (await L(r, `api/v2/user-profile/${e.data?.id}/${t}/${n}`)).success === !0;
1777
1791
  }
1778
1792
  //#endregion
1779
1793
  //#region src/web-api/v2/fetch-version.ts
1780
- async function dr(e = g) {
1781
- return await L(e, "api/v2/version");
1794
+ async function hr(e = g) {
1795
+ return await I(e, "api/v2/version");
1782
1796
  }
1783
1797
  //#endregion
1784
1798
  //#region src/client/create-api.ts
1785
- var Z = (e, t) => (...n) => {
1799
+ var Y = (e, t) => (...n) => {
1786
1800
  let r = Array(Math.max(0, e.length - n.length)).fill(void 0);
1787
1801
  return e(...n, ...r, t);
1788
1802
  };
1789
- function fr(e) {
1803
+ function gr(e) {
1790
1804
  return {
1791
1805
  app: {
1792
- get: Z(Et, e),
1793
- preLogin: Z(Dt, e)
1806
+ get: Y(Ot, e),
1807
+ preLogin: Y(kt, e)
1794
1808
  },
1795
1809
  principal: {
1796
- get: Z(On, e),
1797
- list: Z(kn, e),
1798
- userid: Z(An, e),
1799
- userids: Z(jn, e),
1800
- search: Z(Rn, e)
1810
+ get: Y(An, e),
1811
+ list: Y(jn, e),
1812
+ userid: Y(Mn, e),
1813
+ userids: Y(Nn, e),
1814
+ search: Y(Vn, e)
1801
1815
  },
1802
1816
  query: {
1803
- search: Z(Pn, e),
1804
- bulk: Z(Fn, e),
1805
- intent: Z(Ln, e),
1806
- export: Z(In, e),
1807
- aggregate: Z(mn, e),
1808
- sponsoredLinks: Z(Bn, e),
1809
- similarDocuments: Z(zn, e)
1817
+ search: Y(In, e),
1818
+ bulk: Y(Ln, e),
1819
+ intent: Y(Bn, e),
1820
+ export: Y(zn, e),
1821
+ aggregate: Y(gn, e),
1822
+ sponsoredLinks: Y(Un, e),
1823
+ similarDocuments: Y(Hn, e)
1810
1824
  },
1811
1825
  suggest: {
1812
- get: Z(Un, e),
1813
- query: Z(Wn, e),
1814
- field: Z(Gn, e)
1826
+ get: Y(Kn, e),
1827
+ query: Y(qn, e),
1828
+ field: Y(Jn, e)
1815
1829
  },
1816
1830
  preview: {
1817
- get: Z(En, e),
1818
- textChunks: Z(Kn, e)
1831
+ get: Y(On, e),
1832
+ textChunks: Y(Yn, e)
1819
1833
  },
1820
1834
  labels: {
1821
- get: Z(vn, e),
1822
- rights: Z(J.getUserRights, e),
1823
- add: Z(J.add, e),
1824
- remove: Z(J.remove, e),
1825
- rename: Z(J.rename, e),
1826
- delete: Z(J.delete, e),
1827
- bulkAdd: Z(J.bulkAdd, e),
1828
- bulkRemove: Z(J.bulkRemove, e)
1835
+ get: Y(bn, e),
1836
+ rights: Y(q.getUserRights, e),
1837
+ add: Y(q.add, e),
1838
+ remove: Y(q.remove, e),
1839
+ rename: Y(q.rename, e),
1840
+ delete: Y(q.delete, e),
1841
+ bulkAdd: Y(q.bulkAdd, e),
1842
+ bulkRemove: Y(q.bulkRemove, e)
1829
1843
  },
1830
1844
  dataset: {
1831
- get: Z(hn, e),
1832
- getMany: Z(gn, e),
1833
- list: Z(_n, e)
1845
+ get: Y(_n, e),
1846
+ getMany: Y(vn, e),
1847
+ list: Y(yn, e)
1834
1848
  },
1835
1849
  userSettings: {
1836
- get: Z(qn, e),
1837
- save: Z(Jn, e),
1838
- patch: Z(Yn, e),
1839
- reset: Z(Xn, e)
1850
+ get: Y(Xn, e),
1851
+ save: Y(Zn, e),
1852
+ patch: Y(Qn, e),
1853
+ reset: Y($n, e)
1840
1854
  },
1841
1855
  userProfile: {
1842
- get: Z(sr, e),
1843
- create: Z(cr, e),
1844
- patch: Z(lr, e),
1845
- deleteProperty: Z(ur, e)
1856
+ get: Y(dr, e),
1857
+ create: Y(fr, e),
1858
+ patch: Y(pr, e),
1859
+ deleteProperty: Y(mr, e)
1846
1860
  },
1847
1861
  containers: {
1848
- list: Z($n, e),
1849
- get: Z(er, e),
1850
- create: Z(tr, e),
1851
- update: Z(nr, e),
1852
- delete: Z(rr, e),
1853
- listDocuments: Z(ir, e),
1854
- deleteDocuments: Z(ar, e)
1862
+ list: Y(nr, e),
1863
+ get: Y(rr, e),
1864
+ create: Y(ir, e),
1865
+ update: Y(ar, e),
1866
+ delete: Y(or, e),
1867
+ listDocuments: Y(sr, e),
1868
+ deleteDocuments: Y(cr, e)
1855
1869
  },
1856
1870
  password: {
1857
- change: Z(Zn, e),
1858
- sendResetEmail: Z(or, e)
1871
+ change: Y(er, e),
1872
+ sendResetEmail: Y(ur, e)
1859
1873
  },
1860
- version: Z(dr, e)
1874
+ version: Y(hr, e)
1861
1875
  };
1862
1876
  }
1863
1877
  //#endregion
1864
1878
  //#region src/client/create-atomic-client.ts
1865
- function pr(e) {
1879
+ function _r(e) {
1866
1880
  return {
1867
1881
  config: e.config,
1868
1882
  storagePrefix: e.storagePrefix,
1869
1883
  configure: (t) => b(e, t),
1870
- initializeConfig: () => Ot(e),
1884
+ initializeConfig: () => At(e),
1871
1885
  auth: {
1872
- login: (t) => lt(e, t),
1873
- logout: () => ht(e),
1874
- isAuthenticated: () => xt(e),
1875
- hasSession: () => Ue(e),
1876
- isRedirectPending: () => yt(e),
1877
- clearSession: () => _t(e),
1886
+ login: (t) => dt(e, t),
1887
+ logout: () => _t(e),
1888
+ isAuthenticated: () => Ct(e),
1889
+ hasSession: () => Ge(e),
1890
+ isRedirectPending: () => xt(e),
1891
+ clearSession: () => yt(e),
1878
1892
  getToken: () => T(e),
1879
1893
  setToken: (t) => A(e, t),
1880
1894
  on: (t, n) => e.events.on(t, n)
1881
1895
  },
1882
1896
  http: {
1883
- get: (t, n, r) => L(e, t, n, r),
1884
- post: (t, n, r) => F(e, t, n, r),
1885
- put: (t, n, r) => B(e, t, n, r),
1886
- patch: (t, n, r) => z(e, t, n, r),
1887
- del: (t, n, r) => R(e, t, n, r)
1897
+ get: (t, n, r) => I(e, t, n, r),
1898
+ post: (t, n, r) => P(e, t, n, r),
1899
+ put: (t, n, r) => z(e, t, n, r),
1900
+ patch: (t, n, r) => R(e, t, n, r),
1901
+ del: (t, n, r) => L(e, t, n, r)
1888
1902
  },
1889
- api: fr(e),
1903
+ api: gr(e),
1890
1904
  context: e
1891
1905
  };
1892
1906
  }
1893
- function mr(e) {
1907
+ function vr(e) {
1894
1908
  let { httpAdapter: t, storagePrefix: n, ...r } = e, i = pe({
1895
1909
  config: {},
1896
1910
  storagePrefix: n,
1897
1911
  httpAdapter: t
1898
1912
  });
1899
- return b(i, r), pr(i);
1913
+ return b(i, r), _r(i);
1900
1914
  }
1901
- var hr = pr(g);
1902
- function gr() {
1903
- return hr;
1915
+ var yr = _r(g);
1916
+ function br() {
1917
+ return yr;
1904
1918
  }
1905
1919
  //#endregion
1906
1920
  //#region src/utils/aggregations.ts
1907
- var _r = /.*:\(?([><=\d\-.AND ]+)\)?/;
1908
- function vr(e, t) {
1921
+ var xr = /.*:\(?([><=\d\-.AND ]+)\)?/;
1922
+ function Sr(e, t) {
1909
1923
  return !e?.items || e?.items?.length === 0 ? [] : e.items.reduce((n, r) => {
1910
1924
  if (!r.value || r.value === "") return n;
1911
- let i = yr(r, e.column);
1925
+ let i = Cr(r, e.column);
1912
1926
  return n.push({
1913
1927
  operator: i.operator,
1914
1928
  value: i.value,
@@ -1919,8 +1933,8 @@ function vr(e, t) {
1919
1933
  }), n;
1920
1934
  }, []);
1921
1935
  }
1922
- function yr(e, t) {
1923
- let n = t, r = e.value.match(_r);
1936
+ function Cr(e, t) {
1937
+ let n = t, r = e.value.match(xr);
1924
1938
  if (r?.[1]) {
1925
1939
  let t = (r?.[1].split(" AND ")).map((t) => ({
1926
1940
  field: n,
@@ -1948,26 +1962,26 @@ function yr(e, t) {
1948
1962
  display: e.display
1949
1963
  };
1950
1964
  }
1951
- function br(e, t, n) {
1965
+ function wr(e, t, n) {
1952
1966
  return e.valuesAreExpressions ? t.display === n.display : t.value === n.value;
1953
1967
  }
1954
- function xr(e) {
1955
- return e.items &&= e.items.map((e) => xr(e)), e.items?.some((e) => e.$selected || e.$opened) && (e.$opened = !0), e;
1968
+ function Tr(e) {
1969
+ return e.items &&= e.items.map((e) => Tr(e)), e.items?.some((e) => e.$selected || e.$opened) && (e.$opened = !0), e;
1956
1970
  }
1957
- function Sr(e, t) {
1971
+ function Er(e, t) {
1958
1972
  let n = [];
1959
1973
  if (e.length > 0) {
1960
1974
  let r = /* @__PURE__ */ new Map(), i = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g, ""), a = RegExp(`\\b${i}`, "i");
1961
1975
  e.forEach((e) => {
1962
1976
  if (e.display.length > 1) {
1963
1977
  let i = e.display.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), o = a.exec(i);
1964
- Cr(n, r, "/", e.display, +(e.frequency || 0), 1, (o?.index || 0) + t.length);
1978
+ Dr(n, r, "/", e.display, +(e.frequency || 0), 1, (o?.index || 0) + t.length);
1965
1979
  }
1966
1980
  });
1967
1981
  }
1968
1982
  return n;
1969
1983
  }
1970
- function Cr(e, t, n, r, i, a, o) {
1984
+ function Dr(e, t, n, r, i, a, o) {
1971
1985
  let s = r.indexOf("/", n.length), c = r.substring(0, s + 1), l = t.get(c);
1972
1986
  if (!l) {
1973
1987
  let u = c.replace(/^\/|\/$/g, "");
@@ -1981,11 +1995,11 @@ function Cr(e, t, n, r, i, a, o) {
1981
1995
  $path: u
1982
1996
  }, t.set(c, l), e.push(l);
1983
1997
  }
1984
- c.length < r.length && (l.hasChildren = !0, Cr(l.items, t, c, r, i, a + 1, o));
1998
+ c.length < r.length && (l.hasChildren = !0, Dr(l.items, t, c, r, i, a + 1, o));
1985
1999
  }
1986
2000
  //#endregion
1987
2001
  //#region src/utils/bisect.ts
1988
- function wr(e, t) {
2002
+ function Or(e, t) {
1989
2003
  return e.reduce((e, n) => (t(n) ? e.true.push(n) : e.false.push(n), e), {
1990
2004
  true: [],
1991
2005
  false: []
@@ -1993,34 +2007,34 @@ function wr(e, t) {
1993
2007
  }
1994
2008
  //#endregion
1995
2009
  //#region src/utils/concepts.ts
1996
- var Tr = /(([+-])?\(([^)]+)\))|(([+-])?\[([^\]]+)\])|(([+-])?"([^"]+)")|(([+-])?\/([^/]+)\/)|(([+-])?(\S+))/g, Er = 2, Dr = 3, Or = 5, kr = 6, Ar = 8, jr = 9, Mr = 11, Nr = 12, Pr = 14, Fr = 15;
1997
- function Q(e) {
2010
+ var kr = /(([+-])?\(([^)]+)\))|(([+-])?\[([^\]]+)\])|(([+-])?"([^"]+)")|(([+-])?\/([^/]+)\/)|(([+-])?(\S+))/g, Ar = 2, jr = 3, Mr = 5, Nr = 6, Pr = 8, Fr = 9, Ir = 11, Lr = 12, Rr = 14, zr = 15;
2011
+ function X(e) {
1998
2012
  if (!e) return [];
1999
- let t = [], n = e.matchAll(Tr);
2000
- for (let e of n) e[Dr] ? t.push({
2013
+ let t = [], n = e.matchAll(kr);
2014
+ for (let e of n) e[jr] ? t.push({
2001
2015
  type: "group",
2002
- value: e[Dr],
2003
- op: e[Er]
2004
- }) : e[kr] ? t.push({
2005
- type: "adjacent",
2006
- value: e[kr],
2007
- op: e[Or]
2008
- }) : e[jr] ? t.push({
2009
- type: "exact",
2010
2016
  value: e[jr],
2011
2017
  op: e[Ar]
2012
2018
  }) : e[Nr] ? t.push({
2013
- type: "regex",
2019
+ type: "adjacent",
2014
2020
  value: e[Nr],
2015
2021
  op: e[Mr]
2016
- }) : e[Fr] && t.push({
2017
- type: "token",
2022
+ }) : e[Fr] ? t.push({
2023
+ type: "exact",
2018
2024
  value: e[Fr],
2019
2025
  op: e[Pr]
2026
+ }) : e[Lr] ? t.push({
2027
+ type: "regex",
2028
+ value: e[Lr],
2029
+ op: e[Ir]
2030
+ }) : e[zr] && t.push({
2031
+ type: "token",
2032
+ value: e[zr],
2033
+ op: e[Rr]
2020
2034
  });
2021
2035
  return t;
2022
2036
  }
2023
- function Ir(e) {
2037
+ function Z(e) {
2024
2038
  return e.map((e) => {
2025
2039
  let t = e.op || "";
2026
2040
  switch (e.type) {
@@ -2033,48 +2047,54 @@ function Ir(e) {
2033
2047
  }
2034
2048
  }).join(" ");
2035
2049
  }
2036
- function Lr(e, t, n) {
2037
- let r = Q(e);
2050
+ function Br(e, t, n) {
2051
+ let r = X(e);
2038
2052
  for (let e of t) r.push({
2039
2053
  type: "adjacent",
2040
2054
  value: e,
2041
2055
  op: n
2042
2056
  });
2043
- return Ir(r);
2057
+ return Z(r);
2044
2058
  }
2045
- function Rr(e, t) {
2046
- let n = Q(t), r = n.findIndex((t) => t.value === e);
2047
- return r === -1 ? t : (n.splice(r, 1), Ir(n));
2059
+ function Vr(e, t) {
2060
+ let n = X(t), r = n.findIndex((t) => t.value === e);
2061
+ return r === -1 ? t : (n.splice(r, 1), Z(n));
2048
2062
  }
2049
- function zr(e) {
2050
- return Ir(Q(e).filter((e) => e.type !== "adjacent"));
2063
+ function Hr(e) {
2064
+ return Z(X(e).filter((e) => e.type !== "adjacent"));
2051
2065
  }
2052
- function Br(e) {
2053
- return Q(e).filter((e) => e.type === "adjacent").map((e) => e.value);
2066
+ function Ur(e) {
2067
+ return X(e).filter((e) => e.type === "adjacent").map((e) => e.value);
2054
2068
  }
2055
2069
  //#endregion
2056
2070
  //#region src/utils/date.ts
2057
- function Vr(e, t, n) {
2058
- let r = new Intl.RelativeTimeFormat(e, { numeric: "auto" }), { offset: i, unit: a, isFuture: o } = Hr(t, n);
2071
+ function Wr(e, t, n) {
2072
+ let r = new Intl.RelativeTimeFormat(e, { numeric: "auto" }), { offset: i, unit: a, isFuture: o } = Kr(t, n);
2059
2073
  return r.format(i * (o ? 1 : -1), a);
2060
2074
  }
2061
- function Hr(e, t) {
2062
- let n = new Date(e), r = t ? new Date(t) : /* @__PURE__ */ new Date(), i = Math.abs(r.getTime() - n.getTime());
2075
+ var Gr = [
2076
+ ["year", 365],
2077
+ ["month", 30],
2078
+ ["week", 7],
2079
+ ["day", 1]
2080
+ ];
2081
+ function Kr(e, t) {
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] = Gr.find(([, e]) => a >= e) ?? ["day", 1];
2063
2083
  return {
2064
- offset: Math.floor(i / (1e3 * 60 * 60 * 24)),
2065
- unit: "day",
2084
+ offset: Math.floor(a / s),
2085
+ unit: o,
2066
2086
  isFuture: n > r
2067
2087
  };
2068
2088
  }
2069
2089
  //#endregion
2070
2090
  //#region src/utils/is-not-input-event.ts
2071
- function Ur(e) {
2091
+ function qr(e) {
2072
2092
  let t = e.target;
2073
2093
  return t && t.nodeName !== "INPUT" && t.nodeName !== "TEXTAREA";
2074
2094
  }
2075
2095
  //#endregion
2076
2096
  //#region src/utils/notification.ts
2077
- function Wr(e) {
2097
+ function Q(e) {
2078
2098
  let t = new CustomEvent("notification", {
2079
2099
  bubbles: !0,
2080
2100
  cancelable: !1,
@@ -2082,30 +2102,30 @@ function Wr(e) {
2082
2102
  });
2083
2103
  dispatchEvent(t);
2084
2104
  }
2085
- var Gr = {
2105
+ var Jr = {
2086
2106
  success: (e, t) => {
2087
- Wr({
2107
+ Q({
2088
2108
  type: "success",
2089
2109
  message: e,
2090
2110
  options: t
2091
2111
  });
2092
2112
  },
2093
2113
  info: (e, t) => {
2094
- Wr({
2114
+ Q({
2095
2115
  type: "info",
2096
2116
  message: e,
2097
2117
  options: t
2098
2118
  });
2099
2119
  },
2100
2120
  warning: (e, t) => {
2101
- Wr({
2121
+ Q({
2102
2122
  type: "warning",
2103
2123
  message: e,
2104
2124
  options: t
2105
2125
  });
2106
2126
  },
2107
2127
  error: (e, t) => {
2108
- Wr({
2128
+ Q({
2109
2129
  type: "error",
2110
2130
  message: e,
2111
2131
  options: t
@@ -2114,13 +2134,13 @@ var Gr = {
2114
2134
  };
2115
2135
  //#endregion
2116
2136
  //#region src/utils/query-params.ts
2117
- function Kr(e) {
2137
+ function Yr(e) {
2118
2138
  if (e === void 0) return;
2119
2139
  let { q: t, f: n, p: r, s: i, t: a, n: o, b: s } = $(e), [c] = e.split("?");
2120
2140
  return {
2121
2141
  path: c,
2122
2142
  text: t,
2123
- filters: n ? Yr(n) : void 0,
2143
+ filters: n ? Qr(n) : void 0,
2124
2144
  page: r ? parseInt(r, 10) : void 0,
2125
2145
  sort: i,
2126
2146
  tab: a,
@@ -2128,17 +2148,17 @@ function Kr(e) {
2128
2148
  basket: s
2129
2149
  };
2130
2150
  }
2131
- function qr(e) {
2151
+ function Xr(e) {
2132
2152
  if (!e) return "";
2133
2153
  let { text: t, filters: n, page: r, sort: i, tab: a, name: o, basket: s } = e, c = {};
2134
2154
  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() || "";
2135
2155
  }
2136
- function Jr(e) {
2156
+ function Zr(e) {
2137
2157
  if (e === void 0) return [];
2138
2158
  let { f: t } = $(e);
2139
- return Yr(t);
2159
+ return Qr(t);
2140
2160
  }
2141
- function Yr(e) {
2161
+ function Qr(e) {
2142
2162
  let t = decodeURIComponent(e);
2143
2163
  try {
2144
2164
  return JSON.parse(t ?? "[]");
@@ -2152,41 +2172,41 @@ function $(e) {
2152
2172
  let n = new URLSearchParams(t);
2153
2173
  return Object.fromEntries(n);
2154
2174
  }
2155
- function Xr(e) {
2175
+ function $r(e) {
2156
2176
  let { q: t = "" } = $(e);
2157
2177
  return t;
2158
2178
  }
2159
- function Zr(e) {
2179
+ function ei(e) {
2160
2180
  let { id: t } = $(e);
2161
- return decodeURIComponent(t);
2181
+ return t === void 0 ? void 0 : decodeURIComponent(t);
2162
2182
  }
2163
- function Qr(e) {
2183
+ function ti(e) {
2164
2184
  let { p: t = "0" } = $(e);
2165
2185
  return parseInt(t, 10);
2166
2186
  }
2167
- function $r(e) {
2187
+ function ni(e) {
2168
2188
  let { t } = $(e);
2169
2189
  return t;
2170
2190
  }
2171
2191
  //#endregion
2172
2192
  //#region src/utils/syslang.ts
2173
- function ei(e, t) {
2193
+ function ri(e, t) {
2174
2194
  if (!e) return e;
2175
2195
  let n = 0, r = e.length, i = 0;
2176
2196
  if (e[i] === "[") {
2177
2197
  for (; i < r && /[0-9]/.test(e[i]);) i++;
2178
2198
  e[i] === "]" && (n = i + 1);
2179
2199
  }
2180
- let a = ti(e, n, !1);
2200
+ let a = ii(e, n, !1);
2181
2201
  if (!a) return e;
2182
2202
  let o = t.charCodeAt(0), s = t.charCodeAt(1), c = a;
2183
2203
  for (; c;) if (o === c.lang1 && s === c.lang2) {
2184
- let t = ti(e, c.end + 4, !0);
2204
+ let t = ii(e, c.end + 4, !0);
2185
2205
  return e.substring(t.start, t.end);
2186
- } else c = ti(e, c.end + 4, !1);
2206
+ } else c = ii(e, c.end + 4, !1);
2187
2207
  return e.substring(a.start, a.end) || e;
2188
2208
  }
2189
- function ti(e, t, n) {
2209
+ function ii(e, t, n) {
2190
2210
  for (let n = t, r = e.length - 3; n < r; n++) if (e[n] === "[" && e[n + 3] === "]") return {
2191
2211
  start: t,
2192
2212
  end: n,
@@ -2202,7 +2222,7 @@ function ti(e, t, n) {
2202
2222
  }
2203
2223
  //#endregion
2204
2224
  //#region src/utils/utilities.ts
2205
- function ni(e, t) {
2225
+ function ai(e, t) {
2206
2226
  let { useLocale: n, useLocaleAsPrefix: r, indexFile: i, path: a, folder: o } = t, s = n ? `${e}/` : null, c = r ? `${e}.${i}` : i ?? "";
2207
2227
  return [
2208
2228
  a,
@@ -2211,4 +2231,33 @@ function ni(e, t) {
2211
2231
  ].filter((e) => e !== void 0).join("/");
2212
2232
  }
2213
2233
  //#endregion
2214
- export { Bn as $, r as $n, Et as $t, gr as A, M as An, Qt as At, er as B, be as Bn, W as Bt, _r as C, Re as Cn, ln as Ct, Sr as D, je as Dn, Jt as Dt, yr as E, Me as En, en as Et, lr as F, k as Fn, Gt as Ft, Xn as G, m as Gn, H as Gt, $n as H, h as Hn, It as Ht, or as I, O as In, Kt as It, Jn as J, ne as Jn, Nt as Jt, qn as K, ie as Kn, V as Kt, tr as L, Se as Ln, G as Lt, cr as M, j as Mn, Zt as Mt, ur as N, we as Nn, nn as Nt, vr as O, F as On, Yt as Ot, sr as P, Ce as Pn, qt as Pt, Wn as Q, te as Qn, kt as Qt, ar as R, E as Rn, Wt as Rt, wr as S, ze as Sn, cn as St, xr as T, I as Tn, $t as Tt, nr as U, ue as Un, Ft as Ut, ir as V, de as Vn, Lt as Vt, Zn as W, ae as Wn, U as Wt, Un as X, p as Xn, jt as Xt, Kn as Y, re as Yn, Mt as Yt, Gn as Z, ee as Zn, At as Zt, Br as _, Ke as _n, _n as _t, Zr as a, z as an, n as ar, Fn as at, zr as b, Be as bn, pn as bt, $r as c, St as cn, On as ct, $ as d, gt as dn, jn as dt, Dt as en, d as er, zn as et, Gr as f, mt as fn, En as ft, Lr as g, Je as gn, hn as gt, Vr as h, Ye as hn, J as ht, Jr as i, wt as in, c as ir, Y as it, dr as j, Te as jn, K as jt, mr as k, De as kn, Xt as kt, Xr as l, bt as ln, kn as lt, Hr as m, at as mn, vn as mt, ei as n, Tt as nn, l as nr, Ln as nt, Qr as o, Ct as on, Pn as ot, Ur as p, ut as pn, Dn as pt, Yn as q, f as qn, Pt as qt, Yr as r, B as rn, s as rr, In as rt, Kr as s, R as sn, Mn as st, ni as t, Ot as tn, o as tr, Rn as tt, qr as u, vt as un, An as ut, Q as v, Ge as vn, gn as vt, br as w, Ie as wn, tn as wt, Ir as x, L as xn, q as xt, Rr as y, He as yn, mn as yt, rr as z, xe as zn, Vt as zt };
2234
+ //#region src/web-api/helpers/utils/date-utils.ts
2235
+ function oi(e) {
2236
+ if (!e) return;
2237
+ let t = new Date(e);
2238
+ return Number.isNaN(t.getTime()) ? void 0 : t;
2239
+ }
2240
+ function si(e) {
2241
+ let t = oi(e);
2242
+ return !!t && t.getTime() <= Date.now();
2243
+ }
2244
+ function ci(e, t = 7) {
2245
+ let n = oi(e);
2246
+ if (!n) return !1;
2247
+ let r = Date.now(), i = r + t * 24 * 60 * 60 * 1e3, a = n.getTime();
2248
+ return a > r && a <= i;
2249
+ }
2250
+ //#endregion
2251
+ //#region src/web-api/helpers/utils/with-retry.ts
2252
+ async function li(e, t = 0, n = 1e3) {
2253
+ let r;
2254
+ for (let i = 0; i <= t; i++) try {
2255
+ return await e();
2256
+ } catch (e) {
2257
+ if (r = e, e instanceof O && e.status >= 400 && e.status < 500 && e.status !== 429 || e instanceof DOMException && e.name === "AbortError") throw e;
2258
+ i < t && (c(`Retrying request (${i + 1}/${t})`, { error: e }), await new Promise((e) => setTimeout(e, n)));
2259
+ }
2260
+ throw r;
2261
+ }
2262
+ //#endregion
2263
+ export { Yn as $, ne as $n, It as $t, Cr as A, F as An, tn as At, ur as B, k as Bn, Yt as Bt, Vr as C, qe as Cn, vn as Ct, xr as D, Ve as Dn, un as Dt, Or as E, I as En, K as Et, hr as F, j as Fn, Qt as Ft, sr as G, be as Gn, Ut as Gt, cr as H, Se as Hn, Jt as Ht, fr as I, Te as In, en as It, er as J, ue as Jn, Rt as Jt, nr as K, de as Kn, U as Kt, mr as L, Ee as Ln, G as Lt, Sr as M, Ne as Mn, on as Mt, vr as N, P as Nn, Xt as Nt, wr as O, Be as On, dn as Ot, br as P, Oe as Pn, Zt as Pt, Zn as Q, f as Qn, B as Qt, dr as R, we as Rn, $t as Rt, X as S, Je as Sn, yn as St, Z as T, He as Tn, hn as Tt, or as U, E as Un, W as Ut, ir as V, O as Vn, qt as Vt, rr as W, xe as Wn, Kt as Wt, Xn as X, m as Xn, H as Xt, $n as Y, ae as Yn, Lt as Yt, Qn as Z, ie as Zn, V as Zt, qr as _, gt as _n, On as _t, ai as a, kt as an, d as ar, Hn as at, Br as b, Ze as bn, q as bt, Zr as c, z as cn, s as cr, zn as ct, Yr as d, Tt as dn, In as dt, Mt as en, re as er, Kn as et, ni as f, L as fn, Pn as ft, Jr as g, vt as gn, Nn as gt, $ as h, bt as hn, Mn as ht, oi as i, Ot as in, r as ir, Un as it, Er as j, Pe as jn, nn as jt, Tr as k, Re as kn, rn as kt, ei as l, Et as ln, c as lr, Rn as lt, Xr as m, St as mn, jn as mt, ci as n, Pt as nn, ee as nr, qn as nt, ri as o, At as on, o as or, Vn as ot, $r as p, wt as pn, An as pt, ar as q, h as qn, zt as qt, si as r, jt as rn, te as rr, Wn as rt, Qr as s, Dt as sn, l as sr, Bn as st, li as t, Ft as tn, p as tr, Jn as tt, ti as u, R as un, n as ur, Ln as ut, Kr as v, ft as vn, kn as vt, Hr as w, We as wn, gn as wt, Ur as x, Xe as xn, _n as xt, Wr as y, st as yn, bn as yt, pr as z, Ce as zn, an as zt };