@uxland/primary-shell 7.47.1 → 7.47.3

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.
@@ -1,7 +1,25 @@
1
- import { i as ft, n as K, C as Ir, g as Er, a as Ze, D as P, k as h, r as q, b as L, h as W, t as j, Q as ae, c as kt, d as re, e as Fr, f as Or, j as Pr, l as Mr, m as Js, o as Jt, p as kr, P as Ar } from "./index-352_YRza.js";
1
+ import { d as ye, i as Ze, a as Ue, n as K, C as $r, g as Ir, D as M, k as h, r as q, b as L, h as W, t as j, Q as oe, c as kt, e as ie, f as Er, j as Fr, l as Or, m as Mr, o as Ks, p as Jt, q as Pr, P as kr } from "./index-COaCoudK.js";
2
2
  import "react";
3
- const Hr = (e, t) => (s, i) => {
4
- t.bind(i).to(i).inTransientScope(), ft()(i);
3
+ const Ar = ({ primaryApi: e, store: t }) => {
4
+ class s {
5
+ constructor(o) {
6
+ this.api = o;
7
+ }
8
+ }
9
+ ye(Ze(), s), ye(Ue(e), s, 0);
10
+ class i {
11
+ constructor(o) {
12
+ this.store = o;
13
+ }
14
+ }
15
+ class r {
16
+ constructor(o, a) {
17
+ this.store = o, this.api = a;
18
+ }
19
+ }
20
+ return t && (ye(Ze(), i), ye(Ue(t), i, 0), ye(Ze(), r), ye(Ue(t), r, 0), ye(Ue(e), r, 1)), { ApiBaseHandler: s, BaseHandler: r, StoreBaseHandler: i };
21
+ }, Hr = (e, t) => (s, i) => {
22
+ t.bind(i).to(i).inTransientScope(), Ze()(i);
5
23
  const r = e.broker.registerRequest(s, (n) => t.get(i).handle(n));
6
24
  return {
7
25
  dispose: () => {
@@ -62,19 +80,19 @@ const Nr = {
62
80
  derivations: "DER",
63
81
  petitions: "PETITIONS"
64
82
  };
65
- var Oe = /* @__PURE__ */ ((e) => (e.Checkbox = "checkbox", e.Switch = "switch", e))(Oe || {});
66
- const z = {
83
+ var Me = /* @__PURE__ */ ((e) => (e.Checkbox = "checkbox", e.Switch = "switch", e))(Me || {});
84
+ const V = {
67
85
  primaryApi: Symbol.for("primaryApi"),
68
86
  store: Symbol.for("store")
69
87
  };
70
88
  function R(e) {
71
89
  return `Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
72
90
  }
73
- var Br = typeof Symbol == "function" && Symbol.observable || "@@observable", _s = Br, Et = () => Math.random().toString(36).substring(7).split("").join("."), qr = {
91
+ var Br = typeof Symbol == "function" && Symbol.observable || "@@observable", xs = Br, Et = () => Math.random().toString(36).substring(7).split("").join("."), qr = {
74
92
  INIT: `@@redux/INIT${/* @__PURE__ */ Et()}`,
75
93
  REPLACE: `@@redux/REPLACE${/* @__PURE__ */ Et()}`,
76
94
  PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${Et()}`
77
- }, et = qr;
95
+ }, st = qr;
78
96
  function Zt(e) {
79
97
  if (typeof e != "object" || e === null)
80
98
  return !1;
@@ -83,7 +101,7 @@ function Zt(e) {
83
101
  t = Object.getPrototypeOf(t);
84
102
  return Object.getPrototypeOf(e) === t || Object.getPrototypeOf(e) === null;
85
103
  }
86
- function Zs(e, t, s) {
104
+ function Js(e, t, s) {
87
105
  if (typeof e != "function")
88
106
  throw new Error(R(2));
89
107
  if (typeof t == "function" && typeof s == "function" || typeof s == "function" && typeof arguments[3] == "function")
@@ -91,7 +109,7 @@ function Zs(e, t, s) {
91
109
  if (typeof t == "function" && typeof s > "u" && (s = t, t = void 0), typeof s < "u") {
92
110
  if (typeof s != "function")
93
111
  throw new Error(R(1));
94
- return s(Zs)(e, t);
112
+ return s(Js)(e, t);
95
113
  }
96
114
  let i = e, r = t, n = /* @__PURE__ */ new Map(), o = n, a = 0, l = !1;
97
115
  function d() {
@@ -142,7 +160,7 @@ function Zs(e, t, s) {
142
160
  if (typeof p != "function")
143
161
  throw new Error(R(10));
144
162
  i = p, y({
145
- type: et.REPLACE
163
+ type: st.REPLACE
146
164
  });
147
165
  }
148
166
  function m() {
@@ -167,30 +185,30 @@ function Zs(e, t, s) {
167
185
  unsubscribe: p(g)
168
186
  };
169
187
  },
170
- [_s]() {
188
+ [xs]() {
171
189
  return this;
172
190
  }
173
191
  };
174
192
  }
175
193
  return y({
176
- type: et.INIT
194
+ type: st.INIT
177
195
  }), {
178
196
  dispatch: y,
179
197
  subscribe: u,
180
198
  getState: c,
181
199
  replaceReducer: f,
182
- [_s]: m
200
+ [xs]: m
183
201
  };
184
202
  }
185
203
  function Lr(e) {
186
204
  Object.keys(e).forEach((t) => {
187
205
  const s = e[t];
188
206
  if (typeof s(void 0, {
189
- type: et.INIT
207
+ type: st.INIT
190
208
  }) > "u")
191
209
  throw new Error(R(12));
192
210
  if (typeof s(void 0, {
193
- type: et.PROBE_UNKNOWN_ACTION()
211
+ type: st.PROBE_UNKNOWN_ACTION()
194
212
  }) > "u")
195
213
  throw new Error(R(13));
196
214
  });
@@ -222,7 +240,7 @@ function Wr(e) {
222
240
  return l = l || i.length !== Object.keys(o).length, l ? d : o;
223
241
  };
224
242
  }
225
- function tt(...e) {
243
+ function it(...e) {
226
244
  return e.length === 0 ? (t) => t : e.length === 1 ? e[0] : e.reduce((t, s) => (...i) => t(s(...i)));
227
245
  }
228
246
  function jr(...e) {
@@ -235,7 +253,7 @@ function jr(...e) {
235
253
  getState: r.getState,
236
254
  dispatch: (l, ...d) => n(l, ...d)
237
255
  }, a = e.map((l) => l(o));
238
- return n = tt(...a)(r.dispatch), {
256
+ return n = it(...a)(r.dispatch), {
239
257
  ...r,
240
258
  dispatch: n
241
259
  };
@@ -244,7 +262,7 @@ function jr(...e) {
244
262
  function Yr(e) {
245
263
  return Zt(e) && "type" in e && typeof e.type == "string";
246
264
  }
247
- var ei = Symbol.for("immer-nothing"), Ss = Symbol.for("immer-draftable"), N = Symbol.for("immer-state");
265
+ var Zs = Symbol.for("immer-nothing"), _s = Symbol.for("immer-draftable"), N = Symbol.for("immer-state");
248
266
  function X(e, ...t) {
249
267
  throw new Error(
250
268
  `[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`
@@ -254,11 +272,11 @@ var Pe = Object.getPrototypeOf;
254
272
  function xe(e) {
255
273
  return !!e && !!e[N];
256
274
  }
257
- function ce(e) {
258
- return e ? ti(e) || Array.isArray(e) || !!e[Ss] || !!e.constructor?.[Ss] || mt(e) || gt(e) : !1;
275
+ function le(e) {
276
+ return e ? ei(e) || Array.isArray(e) || !!e[_s] || !!e.constructor?.[_s] || mt(e) || gt(e) : !1;
259
277
  }
260
278
  var Qr = Object.prototype.constructor.toString();
261
- function ti(e) {
279
+ function ei(e) {
262
280
  if (!e || typeof e != "object")
263
281
  return !1;
264
282
  const t = Pe(e);
@@ -267,7 +285,7 @@ function ti(e) {
267
285
  const s = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
268
286
  return s === Object ? !0 : typeof s == "function" && Function.toString.call(s) === Qr;
269
287
  }
270
- function st(e, t) {
288
+ function rt(e, t) {
271
289
  pt(e) === 0 ? Reflect.ownKeys(e).forEach((s) => {
272
290
  t(s, e[s], e);
273
291
  }) : e.forEach((s, i) => t(i, s, e));
@@ -279,7 +297,7 @@ function pt(e) {
279
297
  function At(e, t) {
280
298
  return pt(e) === 2 ? e.has(t) : Object.prototype.hasOwnProperty.call(e, t);
281
299
  }
282
- function si(e, t, s) {
300
+ function ti(e, t, s) {
283
301
  const i = pt(e);
284
302
  i === 2 ? e.set(t, s) : i === 3 ? e.add(s) : e[t] = s;
285
303
  }
@@ -302,7 +320,7 @@ function Ht(e, t) {
302
320
  return new Set(e);
303
321
  if (Array.isArray(e))
304
322
  return Array.prototype.slice.call(e);
305
- const s = ti(e);
323
+ const s = ei(e);
306
324
  if (t === !0 || t === "class_only" && !s) {
307
325
  const i = Object.getOwnPropertyDescriptors(e);
308
326
  delete i[N];
@@ -327,7 +345,7 @@ function Ht(e, t) {
327
345
  }
328
346
  }
329
347
  function es(e, t = !1) {
330
- return yt(e) || xe(e) || !ce(e) || (pt(e) > 1 && (e.set = e.add = e.clear = e.delete = Xr), Object.freeze(e), t && Object.entries(e).forEach(([s, i]) => es(i, !0))), e;
348
+ return yt(e) || xe(e) || !le(e) || (pt(e) > 1 && (e.set = e.add = e.clear = e.delete = Xr), Object.freeze(e), t && Object.entries(e).forEach(([s, i]) => es(i, !0))), e;
331
349
  }
332
350
  function Xr() {
333
351
  X(2);
@@ -340,9 +358,9 @@ function _e(e) {
340
358
  const t = Kr[e];
341
359
  return t || X(0, e), t;
342
360
  }
343
- var We;
344
- function ii() {
345
- return We;
361
+ var je;
362
+ function si() {
363
+ return je;
346
364
  }
347
365
  function Jr(e, t) {
348
366
  return {
@@ -355,53 +373,53 @@ function Jr(e, t) {
355
373
  unfinalizedDrafts_: 0
356
374
  };
357
375
  }
358
- function Cs(e, t) {
376
+ function Ss(e, t) {
359
377
  t && (_e("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
360
378
  }
361
379
  function Rt(e) {
362
380
  zt(e), e.drafts_.forEach(Zr), e.drafts_ = null;
363
381
  }
364
382
  function zt(e) {
365
- e === We && (We = e.parent_);
383
+ e === je && (je = e.parent_);
366
384
  }
367
- function Ds(e) {
368
- return We = Jr(We, e);
385
+ function Cs(e) {
386
+ return je = Jr(je, e);
369
387
  }
370
388
  function Zr(e) {
371
389
  const t = e[N];
372
390
  t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
373
391
  }
374
- function Ts(e, t) {
392
+ function Ds(e, t) {
375
393
  t.unfinalizedDrafts_ = t.drafts_.length;
376
394
  const s = t.drafts_[0];
377
- return e !== void 0 && e !== s ? (s[N].modified_ && (Rt(t), X(4)), ce(e) && (e = it(t, e), t.parent_ || rt(t, e)), t.patches_ && _e("Patches").generateReplacementPatches_(
395
+ return e !== void 0 && e !== s ? (s[N].modified_ && (Rt(t), X(4)), le(e) && (e = nt(t, e), t.parent_ || ot(t, e)), t.patches_ && _e("Patches").generateReplacementPatches_(
378
396
  s[N].base_,
379
397
  e,
380
398
  t.patches_,
381
399
  t.inversePatches_
382
- )) : e = it(t, s, []), Rt(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e !== ei ? e : void 0;
400
+ )) : e = nt(t, s, []), Rt(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e !== Zs ? e : void 0;
383
401
  }
384
- function it(e, t, s) {
402
+ function nt(e, t, s) {
385
403
  if (yt(t))
386
404
  return t;
387
405
  const i = t[N];
388
406
  if (!i)
389
- return st(
407
+ return rt(
390
408
  t,
391
- (r, n) => $s(e, i, t, r, n, s)
409
+ (r, n) => Ts(e, i, t, r, n, s)
392
410
  ), t;
393
411
  if (i.scope_ !== e)
394
412
  return t;
395
413
  if (!i.modified_)
396
- return rt(e, i.base_, !0), i.base_;
414
+ return ot(e, i.base_, !0), i.base_;
397
415
  if (!i.finalized_) {
398
416
  i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
399
417
  const r = i.copy_;
400
418
  let n = r, o = !1;
401
- i.type_ === 3 && (n = new Set(r), r.clear(), o = !0), st(
419
+ i.type_ === 3 && (n = new Set(r), r.clear(), o = !0), rt(
402
420
  n,
403
- (a, l) => $s(e, i, r, a, l, s, o)
404
- ), rt(e, r, !1), s && e.patches_ && _e("Patches").generatePatches_(
421
+ (a, l) => Ts(e, i, r, a, l, s, o)
422
+ ), ot(e, r, !1), s && e.patches_ && _e("Patches").generatePatches_(
405
423
  i,
406
424
  s,
407
425
  e.patches_,
@@ -410,29 +428,29 @@ function it(e, t, s) {
410
428
  }
411
429
  return i.copy_;
412
430
  }
413
- function $s(e, t, s, i, r, n, o) {
431
+ function Ts(e, t, s, i, r, n, o) {
414
432
  if (xe(r)) {
415
433
  const a = n && t && t.type_ !== 3 && // Set objects are atomic since they have no keys.
416
- !At(t.assigned_, i) ? n.concat(i) : void 0, l = it(e, r, a);
417
- if (si(s, i, l), xe(l))
434
+ !At(t.assigned_, i) ? n.concat(i) : void 0, l = nt(e, r, a);
435
+ if (ti(s, i, l), xe(l))
418
436
  e.canAutoFreeze_ = !1;
419
437
  else
420
438
  return;
421
439
  } else o && s.add(r);
422
- if (ce(r) && !yt(r)) {
440
+ if (le(r) && !yt(r)) {
423
441
  if (!e.immer_.autoFreeze_ && e.unfinalizedDrafts_ < 1)
424
442
  return;
425
- it(e, r), (!t || !t.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(s, i) && rt(e, r);
443
+ nt(e, r), (!t || !t.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(s, i) && ot(e, r);
426
444
  }
427
445
  }
428
- function rt(e, t, s = !1) {
446
+ function ot(e, t, s = !1) {
429
447
  !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && es(t, s);
430
448
  }
431
449
  function en(e, t) {
432
450
  const s = Array.isArray(e), i = {
433
451
  type_: s ? 1 : 0,
434
452
  // Track which produce call this is associated with.
435
- scope_: t ? t.scope_ : ii(),
453
+ scope_: t ? t.scope_ : si(),
436
454
  // True for both shallow and deep changes.
437
455
  modified_: !1,
438
456
  // Used during finalization.
@@ -453,7 +471,7 @@ function en(e, t) {
453
471
  isManual_: !1
454
472
  };
455
473
  let r = i, n = ts;
456
- s && (r = [i], n = je);
474
+ s && (r = [i], n = Ye);
457
475
  const { revoke: o, proxy: a } = Proxy.revocable(r, n);
458
476
  return i.draft_ = a, i.revoke_ = o, a;
459
477
  }
@@ -465,7 +483,7 @@ var ts = {
465
483
  if (!At(s, t))
466
484
  return tn(e, s, t);
467
485
  const i = s[t];
468
- return e.finalized_ || !ce(i) ? i : i === Ft(e.base_, t) ? (Ot(e), e.copy_[t] = Vt(i, e)) : i;
486
+ return e.finalized_ || !le(i) ? i : i === Ft(e.base_, t) ? (Ot(e), e.copy_[t] = Vt(i, e)) : i;
469
487
  },
470
488
  has(e, t) {
471
489
  return t in be(e);
@@ -474,7 +492,7 @@ var ts = {
474
492
  return Reflect.ownKeys(be(e));
475
493
  },
476
494
  set(e, t, s) {
477
- const i = ri(be(e), t);
495
+ const i = ii(be(e), t);
478
496
  if (i?.set)
479
497
  return i.set.call(e.draft_, s), !0;
480
498
  if (!e.modified_) {
@@ -512,16 +530,16 @@ var ts = {
512
530
  setPrototypeOf() {
513
531
  X(12);
514
532
  }
515
- }, je = {};
516
- st(ts, (e, t) => {
517
- je[e] = function() {
533
+ }, Ye = {};
534
+ rt(ts, (e, t) => {
535
+ Ye[e] = function() {
518
536
  return arguments[0] = arguments[0][0], t.apply(this, arguments);
519
537
  };
520
538
  });
521
- je.deleteProperty = function(e, t) {
522
- return je.set.call(this, e, t, void 0);
539
+ Ye.deleteProperty = function(e, t) {
540
+ return Ye.set.call(this, e, t, void 0);
523
541
  };
524
- je.set = function(e, t, s) {
542
+ Ye.set = function(e, t, s) {
525
543
  return ts.set.call(this, e[0], t, s, e[0]);
526
544
  };
527
545
  function Ft(e, t) {
@@ -529,14 +547,14 @@ function Ft(e, t) {
529
547
  return (s ? be(s) : e)[t];
530
548
  }
531
549
  function tn(e, t, s) {
532
- const i = ri(t, s);
550
+ const i = ii(t, s);
533
551
  return i ? "value" in i ? i.value : (
534
552
  // This is a very special case, if the prop is a getter defined by the
535
553
  // prototype, we should invoke it with the draft as context!
536
554
  i.get?.call(e.draft_)
537
555
  ) : void 0;
538
556
  }
539
- function ri(e, t) {
557
+ function ii(e, t) {
540
558
  if (!(t in e))
541
559
  return;
542
560
  let s = Pe(e);
@@ -569,17 +587,17 @@ var sn = class {
569
587
  }
570
588
  typeof s != "function" && X(6), i !== void 0 && typeof i != "function" && X(7);
571
589
  let r;
572
- if (ce(t)) {
573
- const n = Ds(this), o = Vt(t, void 0);
590
+ if (le(t)) {
591
+ const n = Cs(this), o = Vt(t, void 0);
574
592
  let a = !0;
575
593
  try {
576
594
  r = s(o), a = !1;
577
595
  } finally {
578
596
  a ? Rt(n) : zt(n);
579
597
  }
580
- return Cs(n, i), Ts(r, n);
598
+ return Ss(n, i), Ds(r, n);
581
599
  } else if (!t || typeof t != "object") {
582
- if (r = s(t), r === void 0 && (r = t), r === ei && (r = void 0), this.autoFreeze_ && es(r, !0), i) {
600
+ if (r = s(t), r === void 0 && (r = t), r === Zs && (r = void 0), this.autoFreeze_ && es(r, !0), i) {
583
601
  const n = [], o = [];
584
602
  _e("Patches").generateReplacementPatches_(t, r, n, o), i(n, o);
585
603
  }
@@ -596,15 +614,15 @@ var sn = class {
596
614
  }, typeof e?.autoFreeze == "boolean" && this.setAutoFreeze(e.autoFreeze), typeof e?.useStrictShallowCopy == "boolean" && this.setUseStrictShallowCopy(e.useStrictShallowCopy);
597
615
  }
598
616
  createDraft(e) {
599
- ce(e) || X(8), xe(e) && (e = rn(e));
600
- const t = Ds(this), s = Vt(e, void 0);
617
+ le(e) || X(8), xe(e) && (e = rn(e));
618
+ const t = Cs(this), s = Vt(e, void 0);
601
619
  return s[N].isManual_ = !0, zt(t), s;
602
620
  }
603
621
  finishDraft(e, t) {
604
622
  const s = e && e[N];
605
623
  (!s || !s.isManual_) && X(9);
606
624
  const { scope_: i } = s;
607
- return Cs(i, t), Ts(void 0, i);
625
+ return Ss(i, t), Ds(void 0, i);
608
626
  }
609
627
  /**
610
628
  * Pass true to automatically freeze all copies created by Immer.
@@ -641,13 +659,13 @@ var sn = class {
641
659
  };
642
660
  function Vt(e, t) {
643
661
  const s = mt(e) ? _e("MapSet").proxyMap_(e, t) : gt(e) ? _e("MapSet").proxySet_(e, t) : en(e, t);
644
- return (t ? t.scope_ : ii()).drafts_.push(s), s;
662
+ return (t ? t.scope_ : si()).drafts_.push(s), s;
645
663
  }
646
664
  function rn(e) {
647
- return xe(e) || X(10, e), ni(e);
665
+ return xe(e) || X(10, e), ri(e);
648
666
  }
649
- function ni(e) {
650
- if (!ce(e) || yt(e))
667
+ function ri(e) {
668
+ if (!le(e) || yt(e))
651
669
  return e;
652
670
  const t = e[N];
653
671
  let s;
@@ -657,11 +675,11 @@ function ni(e) {
657
675
  t.finalized_ = !0, s = Ht(e, t.scope_.immer_.useStrictShallowCopy_);
658
676
  } else
659
677
  s = Ht(e, !0);
660
- return st(s, (i, r) => {
661
- si(s, i, ni(r));
678
+ return rt(s, (i, r) => {
679
+ ti(s, i, ri(r));
662
680
  }), t && (t.finalized_ = !1), s;
663
681
  }
664
- var B = new sn(), oi = B.produce;
682
+ var B = new sn(), ni = B.produce;
665
683
  B.produceWithPatches.bind(
666
684
  B
667
685
  );
@@ -686,7 +704,7 @@ function an(e, t = "expected all items to be functions, instead received the fol
686
704
  throw new TypeError(`${t}[${s}]`);
687
705
  }
688
706
  }
689
- var Is = (e) => Array.isArray(e) ? e : [e];
707
+ var $s = (e) => Array.isArray(e) ? e : [e];
690
708
  function ln(e) {
691
709
  const t = Array.isArray(e[0]) ? e[0] : e;
692
710
  return an(
@@ -707,8 +725,8 @@ var dn = class {
707
725
  deref() {
708
726
  return this.value;
709
727
  }
710
- }, un = typeof WeakRef < "u" ? WeakRef : dn, hn = 0, Es = 1;
711
- function Qe() {
728
+ }, un = typeof WeakRef < "u" ? WeakRef : dn, hn = 0, Is = 1;
729
+ function Xe() {
712
730
  return {
713
731
  s: hn,
714
732
  v: void 0,
@@ -716,8 +734,8 @@ function Qe() {
716
734
  p: null
717
735
  };
718
736
  }
719
- function ai(e, t = {}) {
720
- let s = Qe();
737
+ function oi(e, t = {}) {
738
+ let s = Xe();
721
739
  const { resultEqualityCheck: i } = t;
722
740
  let r, n = 0;
723
741
  function o() {
@@ -729,26 +747,26 @@ function ai(e, t = {}) {
729
747
  let m = a.o;
730
748
  m === null && (a.o = m = /* @__PURE__ */ new WeakMap());
731
749
  const D = m.get(f);
732
- D === void 0 ? (a = Qe(), m.set(f, a)) : a = D;
750
+ D === void 0 ? (a = Xe(), m.set(f, a)) : a = D;
733
751
  } else {
734
752
  let m = a.p;
735
753
  m === null && (a.p = m = /* @__PURE__ */ new Map());
736
754
  const D = m.get(f);
737
- D === void 0 ? (a = Qe(), m.set(f, a)) : a = D;
755
+ D === void 0 ? (a = Xe(), m.set(f, a)) : a = D;
738
756
  }
739
757
  }
740
758
  const d = a;
741
759
  let c;
742
- if (a.s === Es)
760
+ if (a.s === Is)
743
761
  c = a.v;
744
762
  else if (c = e.apply(null, arguments), n++, i) {
745
763
  const u = r?.deref?.() ?? r;
746
764
  u != null && i(u, c) && (c = u, n !== 0 && n--), r = typeof c == "object" && c !== null || typeof c == "function" ? new un(c) : c;
747
765
  }
748
- return d.s = Es, d.v = c, c;
766
+ return d.s = Is, d.v = c, c;
749
767
  }
750
768
  return o.clearCache = () => {
751
- s = Qe(), o.resetResultsCount();
769
+ s = Xe(), o.resetResultsCount();
752
770
  }, o.resultsCount = () => n, o.resetResultsCount = () => {
753
771
  n = 0;
754
772
  }, o;
@@ -769,9 +787,9 @@ function fn(e, ...t) {
769
787
  }, {
770
788
  memoize: u,
771
789
  memoizeOptions: y = [],
772
- argsMemoize: f = ai,
790
+ argsMemoize: f = oi,
773
791
  argsMemoizeOptions: m = []
774
- } = c, D = Is(y), p = Is(m), b = ln(r), g = u(function() {
792
+ } = c, D = $s(y), p = $s(m), b = ln(r), g = u(function() {
775
793
  return n++, d.apply(
776
794
  null,
777
795
  arguments
@@ -805,7 +823,7 @@ function fn(e, ...t) {
805
823
  withTypes: () => i
806
824
  }), i;
807
825
  }
808
- var $ = /* @__PURE__ */ fn(ai), pn = Object.assign(
826
+ var $ = /* @__PURE__ */ fn(oi), pn = Object.assign(
809
827
  (e, t = $) => {
810
828
  on(
811
829
  e,
@@ -821,19 +839,19 @@ var $ = /* @__PURE__ */ fn(ai), pn = Object.assign(
821
839
  },
822
840
  { withTypes: () => pn }
823
841
  );
824
- function li(e) {
842
+ function ai(e) {
825
843
  return ({ dispatch: s, getState: i }) => (r) => (n) => typeof n == "function" ? n(s, i, e) : r(n);
826
844
  }
827
- var mn = li(), gn = li, yn = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() {
845
+ var mn = ai(), gn = ai, yn = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() {
828
846
  if (arguments.length !== 0)
829
- return typeof arguments[0] == "object" ? tt : tt.apply(null, arguments);
847
+ return typeof arguments[0] == "object" ? it : it.apply(null, arguments);
830
848
  };
831
- function Fs(e, t) {
849
+ function Es(e, t) {
832
850
  function s(...i) {
833
851
  if (t) {
834
852
  let r = t(...i);
835
853
  if (!r)
836
- throw new Error(le(0));
854
+ throw new Error(ae(0));
837
855
  return {
838
856
  type: e,
839
857
  payload: r.payload,
@@ -852,25 +870,25 @@ function Fs(e, t) {
852
870
  }
853
871
  return s.toString = () => `${e}`, s.type = e, s.match = (i) => Yr(i) && i.type === e, s;
854
872
  }
855
- var ci = class qe extends Array {
873
+ var li = class Le extends Array {
856
874
  constructor(...t) {
857
- super(...t), Object.setPrototypeOf(this, qe.prototype);
875
+ super(...t), Object.setPrototypeOf(this, Le.prototype);
858
876
  }
859
877
  static get [Symbol.species]() {
860
- return qe;
878
+ return Le;
861
879
  }
862
880
  concat(...t) {
863
881
  return super.concat.apply(this, t);
864
882
  }
865
883
  prepend(...t) {
866
- return t.length === 1 && Array.isArray(t[0]) ? new qe(...t[0].concat(this)) : new qe(...t.concat(this));
884
+ return t.length === 1 && Array.isArray(t[0]) ? new Le(...t[0].concat(this)) : new Le(...t.concat(this));
867
885
  }
868
886
  };
869
- function Os(e) {
870
- return ce(e) ? oi(e, () => {
887
+ function Fs(e) {
888
+ return le(e) ? ni(e, () => {
871
889
  }) : e;
872
890
  }
873
- function Ps(e, t, s) {
891
+ function Os(e, t, s) {
874
892
  return e.has(t) ? e.get(t) : e.set(t, s(t)).get(t);
875
893
  }
876
894
  function vn(e) {
@@ -883,7 +901,7 @@ var bn = () => function(t) {
883
901
  serializableCheck: r = !0,
884
902
  actionCreatorCheck: n = !0
885
903
  } = t ?? {};
886
- let o = new ci();
904
+ let o = new li();
887
905
  return s && (vn(s) ? o.push(mn) : o.push(gn(s.extraArgument))), o;
888
906
  }, wn = "RTK_autoBatch", Ms = (e) => (t) => {
889
907
  setTimeout(t, e);
@@ -921,7 +939,7 @@ var bn = () => function(t) {
921
939
  const {
922
940
  autoBatch: i = !0
923
941
  } = s ?? {};
924
- let r = new ci(e);
942
+ let r = new li(e);
925
943
  return i && r.push(xn(typeof i == "object" ? i : void 0)), r;
926
944
  };
927
945
  function Sn(e) {
@@ -938,10 +956,10 @@ function Sn(e) {
938
956
  else if (Zt(s))
939
957
  a = Wr(s);
940
958
  else
941
- throw new Error(le(1));
959
+ throw new Error(ae(1));
942
960
  let l;
943
961
  typeof i == "function" ? l = i(t) : l = t();
944
- let d = tt;
962
+ let d = it;
945
963
  r && (d = yn({
946
964
  // Enable capture of stack traces for dispatched Redux actions
947
965
  trace: !1,
@@ -950,18 +968,18 @@ function Sn(e) {
950
968
  const c = jr(...l), u = _n(c);
951
969
  let y = typeof o == "function" ? o(u) : u();
952
970
  const f = d(...y);
953
- return Zs(a, n, f);
971
+ return Js(a, n, f);
954
972
  }
955
- function di(e) {
973
+ function ci(e) {
956
974
  const t = {}, s = [];
957
975
  let i;
958
976
  const r = {
959
977
  addCase(n, o) {
960
978
  const a = typeof n == "string" ? n : n.type;
961
979
  if (!a)
962
- throw new Error(le(28));
980
+ throw new Error(ae(28));
963
981
  if (a in t)
964
- throw new Error(le(29));
982
+ throw new Error(ae(29));
965
983
  return t[a] = o, r;
966
984
  },
967
985
  addMatcher(n, o) {
@@ -980,11 +998,11 @@ function Cn(e) {
980
998
  return typeof e == "function";
981
999
  }
982
1000
  function Dn(e, t) {
983
- let [s, i, r] = di(t), n;
1001
+ let [s, i, r] = ci(t), n;
984
1002
  if (Cn(e))
985
- n = () => Os(e());
1003
+ n = () => Fs(e());
986
1004
  else {
987
- const a = Os(e);
1005
+ const a = Fs(e);
988
1006
  n = () => a;
989
1007
  }
990
1008
  function o(a = n(), l) {
@@ -999,8 +1017,8 @@ function Dn(e, t) {
999
1017
  const f = u(c, l);
1000
1018
  return f === void 0 ? c : f;
1001
1019
  } else {
1002
- if (ce(c))
1003
- return oi(c, (y) => u(y, l));
1020
+ if (le(c))
1021
+ return ni(c, (y) => u(y, l));
1004
1022
  {
1005
1023
  const y = u(c, l);
1006
1024
  if (y === void 0) {
@@ -1030,7 +1048,7 @@ function In({
1030
1048
  reducerPath: n = r
1031
1049
  } = i;
1032
1050
  if (!r)
1033
- throw new Error(le(11));
1051
+ throw new Error(ae(11));
1034
1052
  const o = (typeof i.reducers == "function" ? i.reducers(Fn()) : i.reducers) || {}, a = Object.keys(o), l = {
1035
1053
  sliceCaseReducersByName: {},
1036
1054
  sliceCaseReducersByType: {},
@@ -1040,9 +1058,9 @@ function In({
1040
1058
  addCase(g, w) {
1041
1059
  const C = typeof g == "string" ? g : g.type;
1042
1060
  if (!C)
1043
- throw new Error(le(12));
1061
+ throw new Error(ae(12));
1044
1062
  if (C in l.sliceCaseReducersByType)
1045
- throw new Error(le(13));
1063
+ throw new Error(ae(13));
1046
1064
  return l.sliceCaseReducersByType[C] = w, d;
1047
1065
  },
1048
1066
  addMatcher(g, w) {
@@ -1064,10 +1082,10 @@ function In({
1064
1082
  type: $n(r, g),
1065
1083
  createNotation: typeof i.reducers == "function"
1066
1084
  };
1067
- Pn(w) ? kn(C, w, d, t) : On(C, w, d);
1085
+ Mn(w) ? kn(C, w, d, t) : On(C, w, d);
1068
1086
  });
1069
1087
  function c() {
1070
- const [g = {}, w = [], C = void 0] = typeof i.extraReducers == "function" ? di(i.extraReducers) : [i.extraReducers], k = {
1088
+ const [g = {}, w = [], C = void 0] = typeof i.extraReducers == "function" ? ci(i.extraReducers) : [i.extraReducers], k = {
1071
1089
  ...g,
1072
1090
  ...l.sliceCaseReducersByType
1073
1091
  };
@@ -1095,12 +1113,12 @@ function In({
1095
1113
  return typeof H > "u" && w && (H = D()), H;
1096
1114
  }
1097
1115
  function k(O = u) {
1098
- const H = Ps(y, w, () => /* @__PURE__ */ new WeakMap());
1099
- return Ps(H, O, () => {
1100
- const xs = {};
1101
- for (const [Tr, $r] of Object.entries(i.selectors ?? {}))
1102
- xs[Tr] = En($r, O, D, w);
1103
- return xs;
1116
+ const H = Os(y, w, () => /* @__PURE__ */ new WeakMap());
1117
+ return Os(H, O, () => {
1118
+ const ws = {};
1119
+ for (const [Dr, Tr] of Object.entries(i.selectors ?? {}))
1120
+ ws[Dr] = En(Tr, O, D, w);
1121
+ return ws;
1104
1122
  });
1105
1123
  }
1106
1124
  return {
@@ -1143,7 +1161,7 @@ function En(e, t, s, i) {
1143
1161
  }
1144
1162
  return r.unwrapped = e, r;
1145
1163
  }
1146
- var ui = /* @__PURE__ */ In();
1164
+ var di = /* @__PURE__ */ In();
1147
1165
  function Fn() {
1148
1166
  function e(t, s) {
1149
1167
  return {
@@ -1182,17 +1200,17 @@ function On({
1182
1200
  }, i, r) {
1183
1201
  let n, o;
1184
1202
  if ("reducer" in i) {
1185
- if (s && !Mn(i))
1186
- throw new Error(le(17));
1203
+ if (s && !Pn(i))
1204
+ throw new Error(ae(17));
1187
1205
  n = i.reducer, o = i.prepare;
1188
1206
  } else
1189
1207
  n = i;
1190
- r.addCase(e, n).exposeCaseReducer(t, n).exposeAction(t, o ? Fs(e, o) : Fs(e));
1208
+ r.addCase(e, n).exposeCaseReducer(t, n).exposeAction(t, o ? Es(e, o) : Es(e));
1191
1209
  }
1192
- function Pn(e) {
1210
+ function Mn(e) {
1193
1211
  return e._reducerDefinitionType === "asyncThunk";
1194
1212
  }
1195
- function Mn(e) {
1213
+ function Pn(e) {
1196
1214
  return e._reducerDefinitionType === "reducerWithPrepare";
1197
1215
  }
1198
1216
  function kn({
@@ -1200,7 +1218,7 @@ function kn({
1200
1218
  reducerName: t
1201
1219
  }, s, i, r) {
1202
1220
  if (!r)
1203
- throw new Error(le(18));
1221
+ throw new Error(ae(18));
1204
1222
  const {
1205
1223
  payloadCreator: n,
1206
1224
  fulfilled: o,
@@ -1210,25 +1228,25 @@ function kn({
1210
1228
  options: c
1211
1229
  } = s, u = r(e, n, c);
1212
1230
  i.exposeAction(t, u), o && i.addCase(u.fulfilled, o), a && i.addCase(u.pending, a), l && i.addCase(u.rejected, l), d && i.addMatcher(u.settled, d), i.exposeCaseReducer(t, {
1213
- fulfilled: o || Ue,
1214
- pending: a || Ue,
1215
- rejected: l || Ue,
1216
- settled: d || Ue
1231
+ fulfilled: o || Ke,
1232
+ pending: a || Ke,
1233
+ rejected: l || Ke,
1234
+ settled: d || Ke
1217
1235
  });
1218
1236
  }
1219
- function Ue() {
1237
+ function Ke() {
1220
1238
  }
1221
- function le(e) {
1239
+ function ae(e) {
1222
1240
  return `Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
1223
1241
  }
1224
- const hi = (e, t, s, i, r, n) => e[t] ? {
1242
+ const ui = (e, t, s, i, r, n) => e[t] ? {
1225
1243
  ...e,
1226
1244
  [t]: {
1227
1245
  ...e[t],
1228
1246
  items: [...e[t]?.items || [], ...s],
1229
1247
  historyDataImporterRules: n ?? e[t]?.historyDataImporterRules
1230
1248
  }
1231
- } : { ...e, [t]: { id: t, items: s, componentFactory: i, searchPredicate: r, historyDataImporterRules: n } }, An = (e, t, s, i) => hi(e, t, [s], i);
1249
+ } : { ...e, [t]: { id: t, items: s, componentFactory: i, searchPredicate: r, historyDataImporterRules: n } }, An = (e, t, s, i) => ui(e, t, [s], i);
1232
1250
  function Hn(e, t) {
1233
1251
  const { id: s, item: i, componentFactory: r } = t.payload;
1234
1252
  e.collections = An(e.collections, s, i, r);
@@ -1237,7 +1255,7 @@ function Rn(e, t) {
1237
1255
  const { id: s, items: i, componentFactory: r, searchPredicate: n, historyDataImporterRules: o } = t.payload;
1238
1256
  return {
1239
1257
  ...e,
1240
- collections: hi(e.collections, s, i, r, n, o)
1258
+ collections: ui(e.collections, s, i, r, n, o)
1241
1259
  };
1242
1260
  }
1243
1261
  function zn(e, t) {
@@ -1289,7 +1307,7 @@ function jn(e, t) {
1289
1307
  const { id: s, item: i } = t.payload;
1290
1308
  e.collections = Wn(e.collections, s, i);
1291
1309
  }
1292
- const ge = ui({
1310
+ const pe = di({
1293
1311
  name: "activity-history-collections",
1294
1312
  initialState: {
1295
1313
  busy: [],
@@ -1311,23 +1329,23 @@ const ge = ui({
1311
1329
  function Yn(e, t) {
1312
1330
  e.searchString = t.payload;
1313
1331
  }
1314
- const Ce = (e) => e.type === Oe.Switch, fi = (e) => Ce(e) ? !!e.enabled : !!e.enabledValues?.length, vt = (e) => e.filters.some(fi), ss = (e) => e.kind === "common", Me = (e) => e.kind === "diagnostics", is = (e) => e.kind === "custom", Qn = "history-diagnostics", pi = "history-relevant", mi = "history-own", bt = "history-deleted", gi = [
1332
+ const Ce = (e) => e.type === Me.Switch, hi = (e) => Ce(e) ? !!e.enabled : !!e.enabledValues?.length, vt = (e) => e.filters.some(hi), ss = (e) => e.kind === "common", ke = (e) => e.kind === "diagnostics", is = (e) => e.kind === "custom", Qn = "history-diagnostics", fi = "history-relevant", pi = "history-own", bt = "history-deleted", mi = [
1315
1333
  {
1316
1334
  kind: "common",
1317
1335
  id: "common",
1318
1336
  title: "Comuns",
1319
1337
  filters: [
1320
1338
  {
1321
- id: pi,
1339
+ id: fi,
1322
1340
  title: "Només rellevants",
1323
1341
  enabled: !1,
1324
- type: Oe.Switch
1342
+ type: Me.Switch
1325
1343
  },
1326
1344
  {
1327
- id: mi,
1345
+ id: pi,
1328
1346
  title: "Només els meus",
1329
1347
  enabled: !1,
1330
- type: Oe.Switch
1348
+ type: Me.Switch
1331
1349
  },
1332
1350
  {
1333
1351
  // Filtre global: substitueix els "Veure eliminats" que cada plugin
@@ -1336,7 +1354,7 @@ const Ce = (e) => e.type === Oe.Switch, fi = (e) => Ce(e) ? !!e.enabled : !!e.en
1336
1354
  id: bt,
1337
1355
  title: "Veure eliminats",
1338
1356
  enabled: !1,
1339
- type: Oe.Switch,
1357
+ type: Me.Switch,
1340
1358
  inverted: !0
1341
1359
  }
1342
1360
  ]
@@ -1374,8 +1392,8 @@ const Zn = (e, { optionId: t, enabled: s }) => {
1374
1392
  return s ? i.includes(t) ? e : { ...e, enabledValues: [...i, t] } : { ...e, enabledValues: i.filter((r) => r !== t) };
1375
1393
  };
1376
1394
  function eo(e, t) {
1377
- e.filters.some(Me) && (e.filters = [...e.filters].map((i) => {
1378
- if (Me(i)) {
1395
+ e.filters.some(ke) && (e.filters = [...e.filters].map((i) => {
1396
+ if (ke(i)) {
1379
1397
  const r = i.enabledValues.filter((n) => {
1380
1398
  if (n.codi === t.payload.diagnosticCodi)
1381
1399
  return !1;
@@ -1392,8 +1410,8 @@ function eo(e, t) {
1392
1410
  }));
1393
1411
  }
1394
1412
  function to(e, t) {
1395
- if (e.filters.some(Me))
1396
- e.filters = [...e.filters].map((i) => Me(i) ? { ...i, enabledValues: t.payload } : i);
1413
+ if (e.filters.some(ke))
1414
+ e.filters = [...e.filters].map((i) => ke(i) ? { ...i, enabledValues: t.payload } : i);
1397
1415
  else {
1398
1416
  const i = {
1399
1417
  kind: "diagnostics",
@@ -1412,7 +1430,7 @@ function so(e, t) {
1412
1430
  };
1413
1431
  }
1414
1432
  function io(e) {
1415
- e.globalFilterSelection = {}, e.filters = e.filters.map((t) => ss(t) ? gi[0] : Me(t) ? {
1433
+ e.globalFilterSelection = {}, e.filters = e.filters.map((t) => ss(t) ? mi[0] : ke(t) ? {
1416
1434
  ...t,
1417
1435
  enabledValues: []
1418
1436
  } : {
@@ -1420,11 +1438,11 @@ function io(e) {
1420
1438
  filters: t.filters.map((s) => Ce(s) ? { ...s, enabled: !1 } : { ...s, enabledValues: [] })
1421
1439
  });
1422
1440
  }
1423
- const ne = ui({
1441
+ const re = di({
1424
1442
  name: "activity-history-filters",
1425
1443
  initialState: {
1426
1444
  searchString: "",
1427
- filters: [...gi],
1445
+ filters: [...mi],
1428
1446
  /** Valors triats a cada filtre global. Les seves opcions no viuen a
1429
1447
  * l'estat: es deriven dels ítems injectats (veure `global-filters`). */
1430
1448
  globalFilterSelection: {}
@@ -1442,8 +1460,8 @@ const ne = ui({
1442
1460
  }
1443
1461
  }), wt = Sn({
1444
1462
  reducer: {
1445
- activityHistoryCollections: ge.reducer,
1446
- activityHistoryFilters: ne.reducer
1463
+ activityHistoryCollections: pe.reducer,
1464
+ activityHistoryFilters: re.reducer
1447
1465
  },
1448
1466
  devTools: {
1449
1467
  name: "activity-history"
@@ -1455,45 +1473,11 @@ const ne = ui({
1455
1473
  });
1456
1474
  wt.dispatch;
1457
1475
  wt.getState;
1458
- const Se = new Ir(), { lazyInject: De } = Er(Se), ro = (e) => {
1459
- Se.bind(z.primaryApi).toConstantValue(e), Se.bind(z.store).toConstantValue(wt);
1476
+ const Se = new $r(), { lazyInject: De } = Ir(Se), ro = (e) => {
1477
+ Se.bind(V.primaryApi).toConstantValue(e), Se.bind(V.store).toConstantValue(wt);
1460
1478
  }, no = () => {
1461
- Se.unbind(z.primaryApi), Se.unbind(z.store);
1462
- };
1463
- var oo = Object.getOwnPropertyDescriptor, rs = (e, t, s, i) => {
1464
- for (var r = i > 1 ? void 0 : i ? oo(t, s) : t, n = e.length - 1, o; n >= 0; n--)
1465
- (o = e[n]) && (r = o(r) || r);
1466
- return r;
1467
- }, nt = (e, t) => (s, i) => t(s, i, e);
1468
- let de = class {
1469
- constructor(e) {
1470
- this.store = e;
1471
- }
1472
- };
1473
- de = rs([
1474
- ft(),
1475
- nt(0, Ze(z.store))
1476
- ], de);
1477
- let Nt = class {
1478
- constructor(e) {
1479
- this.api = e;
1480
- }
1481
- };
1482
- Nt = rs([
1483
- ft(),
1484
- nt(0, Ze(z.primaryApi))
1485
- ], Nt);
1486
- let te = class {
1487
- constructor(e, t) {
1488
- this.store = e, this.api = t;
1489
- }
1490
- };
1491
- te = rs([
1492
- ft(),
1493
- nt(0, Ze(z.store)),
1494
- nt(1, Ze(z.primaryApi))
1495
- ], te);
1496
- const { addBusyHistoryItem: ao, removeBusyHistoryItem: lo } = ge.actions, { addErrorHistoryItem: co, removeErrorHistoryItem: uo } = ge.actions, ho = (e, t) => {
1479
+ Se.unbind(V.primaryApi), Se.unbind(V.store);
1480
+ }, { ApiBaseHandler: oo, BaseHandler: me, StoreBaseHandler: Te } = Ar(V), { addBusyHistoryItem: ao, removeBusyHistoryItem: lo } = pe.actions, { addErrorHistoryItem: co, removeErrorHistoryItem: uo } = pe.actions, ho = (e, t) => {
1497
1481
  if (e.filters) {
1498
1482
  if (e.entityId !== e.filters.id) throw new Error("entityId and filters.id must be the same");
1499
1483
  if (!e.filters.title) throw new Error("filters.title is required");
@@ -1504,7 +1488,7 @@ const { addBusyHistoryItem: ao, removeBusyHistoryItem: lo } = ge.actions, { addE
1504
1488
  if (t == null) throw new Error("items is required");
1505
1489
  if (!Array.isArray(t)) throw new Error("items must be an array");
1506
1490
  };
1507
- class fo extends te {
1491
+ class fo extends me {
1508
1492
  async handle(t) {
1509
1493
  this.store.dispatch(ao(t.entityId));
1510
1494
  try {
@@ -1531,19 +1515,19 @@ class fo extends te {
1531
1515
  }
1532
1516
  }
1533
1517
  }
1534
- let yi;
1518
+ let gi;
1535
1519
  const po = (e, t) => {
1536
- yi = e.registerRequest(
1520
+ gi = e.registerRequest(
1537
1521
  t.broker.events.activityHistory.injectAsyncHistoryItemsRequest,
1538
1522
  fo
1539
1523
  );
1540
1524
  }, mo = () => {
1541
- yi?.dispose();
1525
+ gi?.dispose();
1542
1526
  };
1543
- let Bt;
1527
+ let Nt;
1544
1528
  const go = async (e) => {
1545
- Bt = await e.createLocaleManager(yo);
1546
- }, v = (e) => Bt ? Bt.translate(e) : e, yo = {
1529
+ Nt = await e.createLocaleManager(yo);
1530
+ }, v = (e) => Nt ? Nt.translate(e) : e, yo = {
1547
1531
  ca: {
1548
1532
  "activity-history": {
1549
1533
  activityHistory: "Històric d’activitat",
@@ -1640,16 +1624,16 @@ const go = async (e) => {
1640
1624
  }
1641
1625
  }
1642
1626
  }
1643
- }, vi = (e, t, s) => {
1627
+ }, yi = (e, t, s) => {
1644
1628
  const i = e?.[t];
1645
1629
  return i?.items ? i.items.some((r) => r.id === s) : !1;
1646
1630
  }, vo = (e) => typeof e == "string" && e.trim() !== "", bo = (e) => {
1647
1631
  if (typeof e != "string" || e.trim() === "") return !1;
1648
1632
  const t = new Date(e);
1649
1633
  return t instanceof Date && !Number.isNaN(t.getTime());
1650
- }, bi = (e) => e && vo(e.id) && // Verifica que "id" esté informado
1651
- bo(e.date), wi = (e) => {
1652
- if (!e.every(bi))
1634
+ }, vi = (e) => e && vo(e.id) && // Verifica que "id" esté informado
1635
+ bo(e.date), bi = (e) => {
1636
+ if (!e.every(vi))
1653
1637
  throw console.error("Invalid activity history items", e), new Error("Invalid activity history items");
1654
1638
  return e;
1655
1639
  }, wo = (e) => {
@@ -1657,15 +1641,15 @@ bo(e.date), wi = (e) => {
1657
1641
  }, xo = (e) => {
1658
1642
  const t = [];
1659
1643
  for (const s of e)
1660
- bi(s) ? t.push(s) : wo(s);
1644
+ vi(s) ? t.push(s) : wo(s);
1661
1645
  return t;
1662
- }, { addActivityHistoryItem: _o } = ge.actions;
1663
- class So extends te {
1646
+ }, { addActivityHistoryItem: _o } = pe.actions;
1647
+ class So extends me {
1664
1648
  async handle(t) {
1665
1649
  try {
1666
- wi([t.item]);
1650
+ bi([t.item]);
1667
1651
  const s = this.store.getState();
1668
- if (vi(s.activityHistoryCollections?.collections, t.entityId, t.item.id))
1652
+ if (yi(s.activityHistoryCollections?.collections, t.entityId, t.item.id))
1669
1653
  throw new Error(v("error.itemAlreadyExists"));
1670
1654
  this.store.dispatch(
1671
1655
  _o({
@@ -1679,19 +1663,19 @@ class So extends te {
1679
1663
  }
1680
1664
  }
1681
1665
  }
1682
- let xi;
1666
+ let wi;
1683
1667
  const Co = (e, t) => {
1684
- xi = e.registerRequest(t.broker.events.activityHistory.addHistoryItemRequest, So);
1668
+ wi = e.registerRequest(t.broker.events.activityHistory.addHistoryItemRequest, So);
1685
1669
  }, Do = () => {
1686
- xi?.dispose();
1670
+ wi?.dispose();
1687
1671
  };
1688
- class _i {
1672
+ class xi {
1689
1673
  constructor(t) {
1690
1674
  this.payload = t;
1691
1675
  }
1692
1676
  }
1693
- const { addActivityHistoryItems: To } = ge.actions;
1694
- class $o extends te {
1677
+ const { addActivityHistoryItems: To } = pe.actions;
1678
+ class $o extends me {
1695
1679
  async handle(t) {
1696
1680
  try {
1697
1681
  const s = xo(t.items), i = this.filterDuplicateItems(s, t.entityId);
@@ -1703,7 +1687,7 @@ class $o extends te {
1703
1687
  searchPredicate: t.searchPredicate,
1704
1688
  historyDataImporterRules: t.historyDataImporterRules
1705
1689
  })
1706
- ), t.filters && this.api.broker.send(new _i(t.filters));
1690
+ ), t.filters && this.api.broker.send(new xi(t.filters));
1707
1691
  } catch (s) {
1708
1692
  this.api.notificationService.error(s.message);
1709
1693
  }
@@ -1712,54 +1696,54 @@ class $o extends te {
1712
1696
  if (t.length === 0)
1713
1697
  return [];
1714
1698
  const i = this.store.getState(), r = t.filter(
1715
- (n) => !vi(i.activityHistoryCollections?.collections, s, n.id)
1699
+ (n) => !yi(i.activityHistoryCollections?.collections, s, n.id)
1716
1700
  );
1717
1701
  if (r.length === 0 && t.length > 0)
1718
1702
  throw new Error(v("error.allItemsAlreadyExist"));
1719
1703
  return r.length < t.length && this.api.notificationService.warning(v("warning.someItemsAlreadyExist")), r;
1720
1704
  }
1721
1705
  }
1722
- let Si;
1706
+ let _i;
1723
1707
  const Io = (e, t) => {
1724
- Si = e.registerRequest(t.broker.events.activityHistory.addHistoryItemsRequest, $o);
1708
+ _i = e.registerRequest(t.broker.events.activityHistory.addHistoryItemsRequest, $o);
1725
1709
  }, Eo = () => {
1726
- Si?.dispose();
1710
+ _i?.dispose();
1727
1711
  };
1728
1712
  function S(e, t = {}) {
1729
1713
  return Vr(wt)(e, t);
1730
1714
  }
1731
- const xt = (e) => e.activityHistoryCollections.busy.length > 0, _t = (e) => Object.values(e.activityHistoryCollections.collections) && xt(e), Fo = (e) => !Object.values(e.activityHistoryCollections.collections)?.length && xt(e), Oo = ".spinner-container{display:flex;flex-direction:row;align-items:center;gap:24px;justify-content:center;padding-top:16px}.skeleton-container{padding:20px;height:100%}", Po = (e) => e.isEmptyDataAndOtherLoading ? h`<div class="skeleton-container">${e.skeletons}</div>` : e.isSomeCollectionLoadedAndOtherLoading ? h`<div class="spinner-container"><dss-spinner size="sm"></dss-spinner><div class="busy-description">${v("busyEntriesLoading")}</div></div>` : P;
1732
- var Mo = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, ns = (e, t, s, i) => {
1715
+ const xt = (e) => e.activityHistoryCollections.busy.length > 0, _t = (e) => Object.values(e.activityHistoryCollections.collections) && xt(e), Fo = (e) => !Object.values(e.activityHistoryCollections.collections)?.length && xt(e), Oo = ".spinner-container{display:flex;flex-direction:row;align-items:center;gap:24px;justify-content:center;padding-top:16px}.skeleton-container{padding:20px;height:100%}", Mo = (e) => e.isEmptyDataAndOtherLoading ? h`<div class="skeleton-container">${e.skeletons}</div>` : e.isSomeCollectionLoadedAndOtherLoading ? h`<div class="spinner-container"><dss-spinner size="sm"></dss-spinner><div class="busy-description">${v("busyEntriesLoading")}</div></div>` : M;
1716
+ var Po = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, rs = (e, t, s, i) => {
1733
1717
  for (var r = i > 1 ? void 0 : i ? ko(t, s) : t, n = e.length - 1, o; n >= 0; n--)
1734
1718
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
1735
- return i && r && Mo(t, s, r), r;
1719
+ return i && r && Po(t, s, r), r;
1736
1720
  };
1737
- let Ye = class extends W {
1721
+ let Qe = class extends W {
1738
1722
  render() {
1739
- return h`${Po(this)}`;
1723
+ return h`${Mo(this)}`;
1740
1724
  }
1741
1725
  get skeletons() {
1742
1726
  return Array.from({ length: 12 }, () => h`<dss-skeleton width="100" height="10"></dss-skeleton>`);
1743
1727
  }
1744
1728
  };
1745
- Ye.styles = L`
1729
+ Qe.styles = L`
1746
1730
  ${q(Oo)}
1747
1731
  `;
1748
- ns([
1732
+ rs([
1749
1733
  S(_t)
1750
- ], Ye.prototype, "isSomeCollectionLoadedAndOtherLoading", 2);
1751
- ns([
1734
+ ], Qe.prototype, "isSomeCollectionLoadedAndOtherLoading", 2);
1735
+ rs([
1752
1736
  S(Fo)
1753
- ], Ye.prototype, "isEmptyDataAndOtherLoading", 2);
1754
- Ye = ns([
1737
+ ], Qe.prototype, "isEmptyDataAndOtherLoading", 2);
1738
+ Qe = rs([
1755
1739
  j("activity-history-busy")
1756
- ], Ye);
1757
- class os {
1740
+ ], Qe);
1741
+ class ns {
1758
1742
  constructor(t) {
1759
1743
  this.entities = t;
1760
1744
  }
1761
1745
  }
1762
- class Ao extends te {
1746
+ class Ao extends me {
1763
1747
  async handle(t) {
1764
1748
  try {
1765
1749
  const s = t.entities.map((i) => i.entityId);
@@ -1773,11 +1757,11 @@ class Ao extends te {
1773
1757
  this.store.dispatch(uo(s));
1774
1758
  }
1775
1759
  }
1776
- let Ci;
1760
+ let Si;
1777
1761
  const Ho = (e) => {
1778
- Di(), Ci = e.registerRequest(os, Ao);
1779
- }, Di = () => {
1780
- Ci?.dispose();
1762
+ Ci(), Si = e.registerRequest(ns, Ao);
1763
+ }, Ci = () => {
1764
+ Si?.dispose();
1781
1765
  }, Ro = ".wrapper{display:flex;flex-direction:column;align-items:center;gap:24px;width:484px;height:auto}.wrapper .content-options{display:flex;flex-direction:column;align-items:center;gap:16px}.wrapper .selector-options{display:flex;flex-direction:row;gap:16px}.wrapper .content-date{display:flex;flex-direction:column;align-items:center;gap:16px;height:124px}.wrapper .datepicker-canvas{display:flex;flex-direction:row;justify-content:center;align-content:center;gap:16px}.wrapper .actions{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:16px}dss-datepicker{width:234px;height:48px;border-radius:var(--dss-radius-sm);border:var(--dss-border-width-sm);padding:var(--dss-spacing-sm);gap:var(--dss-spacing-xs);color:var(--color-neutral-100)}", zo = (e) => {
1782
1766
  const { arrayElements: t, text: s } = e;
1783
1767
  return h`
@@ -1817,15 +1801,15 @@ const Ho = (e) => {
1817
1801
  <input slot="input-range-end" id="myDatepickerRangeEnd" type="text" class="dss-input">
1818
1802
  </dss-datepicker-range>
1819
1803
  </div>
1820
- </div>` : P}
1804
+ </div>` : M}
1821
1805
  </div>`;
1822
1806
  };
1823
- var Go = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, Re = (e, t, s, i) => {
1807
+ var Go = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, ze = (e, t, s, i) => {
1824
1808
  for (var r = i > 1 ? void 0 : i ? Vo(t, s) : t, n = e.length - 1, o; n >= 0; n--)
1825
1809
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
1826
1810
  return i && r && Go(t, s, r), r;
1827
1811
  };
1828
- let he = class extends W {
1812
+ let de = class extends W {
1829
1813
  constructor() {
1830
1814
  super(...arguments), this.arrayElements = [
1831
1815
  { label: "Element 1", value: "1" },
@@ -1851,28 +1835,28 @@ let he = class extends W {
1851
1835
  );
1852
1836
  }
1853
1837
  };
1854
- Re([
1838
+ ze([
1855
1839
  K()
1856
- ], he.prototype, "selectedRadioOption", 2);
1857
- Re([
1840
+ ], de.prototype, "selectedRadioOption", 2);
1841
+ ze([
1858
1842
  K()
1859
- ], he.prototype, "text", 2);
1860
- Re([
1843
+ ], de.prototype, "text", 2);
1844
+ ze([
1861
1845
  K()
1862
- ], he.prototype, "selectedVisibilityLevelElement", 2);
1863
- Re([
1846
+ ], de.prototype, "selectedVisibilityLevelElement", 2);
1847
+ ze([
1864
1848
  K()
1865
- ], he.prototype, "selectedPeriodDate", 2);
1866
- Re([
1849
+ ], de.prototype, "selectedPeriodDate", 2);
1850
+ ze([
1867
1851
  K({ type: Array })
1868
- ], he.prototype, "arrayElements", 2);
1869
- he = Re([
1852
+ ], de.prototype, "arrayElements", 2);
1853
+ de = ze([
1870
1854
  j("export-pdf-modal")
1871
- ], he);
1872
- class No extends Nt {
1855
+ ], de);
1856
+ class No extends oo {
1873
1857
  async handle() {
1874
1858
  try {
1875
- this.api.interactionService.confirm(void 0, { component: he }, {
1859
+ this.api.interactionService.confirm(void 0, { component: de }, {
1876
1860
  title: v("modal.selectExportOption"),
1877
1861
  confirmButtonText: "Exportar",
1878
1862
  cancelButtonText: "Cancelar"
@@ -1887,13 +1871,13 @@ class No extends Nt {
1887
1871
  );
1888
1872
  }
1889
1873
  }
1890
- class as {
1874
+ class os {
1891
1875
  }
1892
- let Ti;
1876
+ let Di;
1893
1877
  const Bo = (e) => {
1894
- Ti = e.registerRequest(as, No);
1878
+ Di = e.registerRequest(os, No);
1895
1879
  }, qo = () => {
1896
- Ti?.dispose();
1880
+ Di?.dispose();
1897
1881
  };
1898
1882
  function Lo(e, t, s, i) {
1899
1883
  const r = `Sense ${i.toLocaleLowerCase()}`, n = /* @__PURE__ */ new Map();
@@ -1907,7 +1891,7 @@ function Lo(e, t, s, i) {
1907
1891
  );
1908
1892
  return o && a.push({ id: "", title: r }), a;
1909
1893
  }
1910
- class V {
1894
+ class G {
1911
1895
  and(t) {
1912
1896
  return new Wo(this, t);
1913
1897
  }
@@ -1918,7 +1902,7 @@ class V {
1918
1902
  return new Yo(this);
1919
1903
  }
1920
1904
  }
1921
- class Wo extends V {
1905
+ class Wo extends G {
1922
1906
  constructor(t, s) {
1923
1907
  super(), this.left = t, this.right = s;
1924
1908
  }
@@ -1926,7 +1910,7 @@ class Wo extends V {
1926
1910
  return this.left.isSatisfiedBy(t) && this.right.isSatisfiedBy(t);
1927
1911
  }
1928
1912
  }
1929
- class jo extends V {
1913
+ class jo extends G {
1930
1914
  constructor(t, s) {
1931
1915
  super(), this.left = t, this.right = s;
1932
1916
  }
@@ -1934,7 +1918,7 @@ class jo extends V {
1934
1918
  return this.left.isSatisfiedBy(t) || this.right.isSatisfiedBy(t);
1935
1919
  }
1936
1920
  }
1937
- class Yo extends V {
1921
+ class Yo extends G {
1938
1922
  constructor(t) {
1939
1923
  super(), this.spec = t;
1940
1924
  }
@@ -1942,43 +1926,43 @@ class Yo extends V {
1942
1926
  return !this.spec.isSatisfiedBy(t);
1943
1927
  }
1944
1928
  }
1945
- class Qo extends V {
1929
+ class Qo extends G {
1946
1930
  isSatisfiedBy(t) {
1947
1931
  return !t?.deleted;
1948
1932
  }
1949
1933
  }
1950
- let qt = null;
1951
- const $i = (e) => {
1952
- qt = e;
1934
+ let Bt = null;
1935
+ const Ti = (e) => {
1936
+ Bt = e;
1953
1937
  };
1954
- class Uo extends V {
1938
+ class Uo extends G {
1955
1939
  isSatisfiedBy(t) {
1956
- if (!qt)
1940
+ if (!Bt)
1957
1941
  return !1;
1958
1942
  try {
1959
- const s = qt.globalStateManager.getData("userInfo");
1943
+ const s = Bt.globalStateManager.getData("userInfo");
1960
1944
  return t?.professional?.id === s?.userId;
1961
1945
  } catch {
1962
1946
  return !1;
1963
1947
  }
1964
1948
  }
1965
1949
  }
1966
- class Xo extends V {
1950
+ class Xo extends G {
1967
1951
  isSatisfiedBy(t) {
1968
1952
  return t?.relevant ?? !1;
1969
1953
  }
1970
1954
  }
1971
1955
  const Ko = {
1972
- [pi]: Xo,
1973
- [mi]: Uo,
1956
+ [fi]: Xo,
1957
+ [pi]: Uo,
1974
1958
  [bt]: Qo
1975
1959
  };
1976
- class Jo extends V {
1960
+ class Jo extends G {
1977
1961
  isSatisfiedBy() {
1978
1962
  return !0;
1979
1963
  }
1980
1964
  }
1981
- class Zo extends V {
1965
+ class Zo extends G {
1982
1966
  constructor(t) {
1983
1967
  super(), this.commonFilters = t;
1984
1968
  }
@@ -1989,12 +1973,12 @@ class Zo extends V {
1989
1973
  }, new Jo()).isSatisfiedBy(t);
1990
1974
  }
1991
1975
  }
1992
- class ea extends V {
1976
+ class ea extends G {
1993
1977
  isSatisfiedBy() {
1994
1978
  return !1;
1995
1979
  }
1996
1980
  }
1997
- class ks extends V {
1981
+ class Ps extends G {
1998
1982
  constructor(t, s) {
1999
1983
  super(), this.propPath = t, this.value = s;
2000
1984
  }
@@ -2002,21 +1986,21 @@ class ks extends V {
2002
1986
  return this.propPath.reduce((i, r) => i?.[r], t) === this.value;
2003
1987
  }
2004
1988
  }
2005
- class ta extends V {
1989
+ class ta extends G {
2006
1990
  constructor(t) {
2007
1991
  super(), this.group = t;
2008
1992
  }
2009
1993
  isSatisfiedBy(t) {
2010
- return t.type !== this.group.id ? !1 : this.group.filters.filter(fi).every((s) => this.satisfies(t, s));
1994
+ return t.type !== this.group.id ? !1 : this.group.filters.filter(hi).every((s) => this.satisfies(t, s));
2011
1995
  }
2012
1996
  satisfies(t, s) {
2013
- return Ce(s) ? new ks(s.propPathValue, !0).isSatisfiedBy(t) : (s.enabledValues ?? []).reduce(
2014
- (r, n) => r.or(new ks(s.propPathValue, n)),
1997
+ return Ce(s) ? new Ps(s.propPathValue, !0).isSatisfiedBy(t) : (s.enabledValues ?? []).reduce(
1998
+ (r, n) => r.or(new Ps(s.propPathValue, n)),
2015
1999
  new ea()
2016
2000
  ).isSatisfiedBy(t);
2017
2001
  }
2018
2002
  }
2019
- class sa extends V {
2003
+ class sa extends G {
2020
2004
  constructor(t) {
2021
2005
  super(), this.diagnosticCodes = this.extractAllCodes(t);
2022
2006
  }
@@ -2036,7 +2020,7 @@ class sa extends V {
2036
2020
  return this.diagnosticCodes?.length ? (t.diagnostics ?? []).some((i) => this.diagnosticCodes.includes(i.codi)) : !0;
2037
2021
  }
2038
2022
  }
2039
- const ia = "history-up", ra = "history-professional-role", na = "history-speciality", oa = "history-professional", aa = "history-service", ls = "history-note-type", Ii = [
2023
+ const ia = "history-up", ra = "history-professional-role", na = "history-speciality", oa = "history-professional", aa = "history-service", as = "history-note-type", $i = [
2040
2024
  {
2041
2025
  id: ia,
2042
2026
  title: "UP",
@@ -2070,7 +2054,7 @@ const ia = "history-up", ra = "history-professional-role", na = "history-special
2070
2054
  {
2071
2055
  // Els tipus de nota es fusionen pel seu id, vinguin de la iniciativa que
2072
2056
  // vinguin: dues iniciatives que injectin "ECON" comparteixen casella.
2073
- id: ls,
2057
+ id: as,
2074
2058
  title: "Tipus de nota",
2075
2059
  valuePath: ["noteType", "id"],
2076
2060
  descriptionPath: ["noteType", "description"],
@@ -2080,20 +2064,20 @@ const ia = "history-up", ra = "history-professional-role", na = "history-special
2080
2064
  }
2081
2065
  }
2082
2066
  ];
2083
- class la extends V {
2067
+ class la extends G {
2084
2068
  constructor(t) {
2085
2069
  super(), this.filters = t;
2086
2070
  }
2087
2071
  isSatisfiedBy(t) {
2088
2072
  return (this.filters ?? []).filter((i) => i.enabledValues?.length).every((i) => {
2089
- const r = Ii.find((o) => o.id === i.id);
2073
+ const r = $i.find((o) => o.id === i.id);
2090
2074
  if (!r) return !0;
2091
2075
  const n = r.valuePath.reduce((o, a) => o?.[a], t);
2092
2076
  return i.enabledValues.includes(n);
2093
2077
  });
2094
2078
  }
2095
2079
  }
2096
- class ca extends V {
2080
+ class ca extends G {
2097
2081
  constructor(t) {
2098
2082
  super(), this.noteTypeIds = t;
2099
2083
  }
@@ -2101,7 +2085,7 @@ class ca extends V {
2101
2085
  return this.noteTypeIds.includes(t.noteType?.id ?? "");
2102
2086
  }
2103
2087
  }
2104
- class da extends V {
2088
+ class da extends G {
2105
2089
  constructor(t, s) {
2106
2090
  super(), this.clauses = t, this.showDeleted = s;
2107
2091
  }
@@ -2109,8 +2093,8 @@ class da extends V {
2109
2093
  return this.clauses.length === 0 || this.showDeleted && t.deleted ? !0 : this.clauses.some((s) => s.isSatisfiedBy(t));
2110
2094
  }
2111
2095
  }
2112
- const As = (e) => e == null ? "" : String(e).normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLocaleLowerCase(), ve = (e, t) => {
2113
- const s = As(e), i = As(t);
2096
+ const ks = (e) => e == null ? "" : String(e).normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLocaleLowerCase(), ve = (e, t) => {
2097
+ const s = ks(e), i = ks(t);
2114
2098
  return s.toString().toLowerCase().indexOf(i) !== -1 || s.toString().indexOf(i) !== -1;
2115
2099
  }, ua = (e, t) => {
2116
2100
  const s = e.professional?.name && ve(e.professional?.name, t), i = e.center?.description && ve(e.center.description, t), r = e.professional?.speciality?.description && ve(e.professional?.speciality.description, t), n = e.professional?.role?.description && ve(e.professional?.role.description, t), o = e.service?.description && ve(e.service.description, t), a = e.up?.description && ve(e.up.description, t), l = e.diagnostics?.some(
@@ -2118,7 +2102,7 @@ const As = (e) => e == null ? "" : String(e).normalize("NFD").replace(/[\u0300-\
2118
2102
  );
2119
2103
  return s || i || r || n || o || a || l;
2120
2104
  };
2121
- class ha extends V {
2105
+ class ha extends G {
2122
2106
  constructor(t, s) {
2123
2107
  super(), this.searchString = t, this.searchPredicate = s;
2124
2108
  }
@@ -2135,37 +2119,37 @@ class ha extends V {
2135
2119
  return !!(s || i);
2136
2120
  }
2137
2121
  }
2138
- const cs = (e) => e.activityHistoryFilters.filters, St = $(
2139
- cs,
2122
+ const ls = (e) => e.activityHistoryFilters.filters, St = $(
2123
+ ls,
2140
2124
  (e) => e.find(ss)?.filters || []
2141
- ), Ei = $(
2125
+ ), Ii = $(
2142
2126
  St,
2143
2127
  (e) => e.find((t) => t.id === bt)
2144
- ), fa = $(Ei, (e) => !!e?.enabled), pa = $(
2128
+ ), fa = $(Ii, (e) => !!e?.enabled), pa = $(
2145
2129
  St,
2146
2130
  (e) => e.filter((t) => t.id !== bt)
2147
- ), Fi = $(
2131
+ ), Ei = $(
2148
2132
  St,
2149
2133
  (e) => e.filter((t) => t.enabled)
2150
- ), ma = $(Fi, (e) => !!e.length), Ct = $(
2151
- cs,
2134
+ ), ma = $(Ei, (e) => !!e.length), Ct = $(
2135
+ ls,
2152
2136
  (e) => e.filter(is).sort(ga)
2153
2137
  ), ga = (e, t) => Number(e.sort) - Number(t.sort), ya = $(
2154
2138
  Ct,
2155
2139
  (e) => e.some(vt)
2156
- ), Oi = $(
2157
- cs,
2158
- (e) => e.find(Me)
2159
- ), ds = $(
2160
- Oi,
2140
+ ), Fi = $(
2141
+ ls,
2142
+ (e) => e.find(ke)
2143
+ ), cs = $(
2144
+ Fi,
2161
2145
  (e) => e?.enabledValues || []
2162
2146
  ), va = $(
2163
- ds,
2147
+ cs,
2164
2148
  (e) => !!e.length
2165
- ), Hs = (e, t) => t.reduce((s, i) => s?.[i], e), ba = (e, t) => {
2166
- const s = Hs(e, t.valuePath);
2149
+ ), As = (e, t) => t.reduce((s, i) => s?.[i], e), ba = (e, t) => {
2150
+ const s = As(e, t.valuePath);
2167
2151
  if (typeof s != "string" || !s.trim()) return;
2168
- const i = Hs(e, t.descriptionPath);
2152
+ const i = As(e, t.descriptionPath);
2169
2153
  return { value: s, label: typeof i == "string" && i.trim() ? i : s };
2170
2154
  }, wa = (e, t) => e.label.localeCompare(t.label, "ca", { sensitivity: "base" }), xa = (e, t) => {
2171
2155
  const s = /* @__PURE__ */ new Map();
@@ -2177,7 +2161,7 @@ const cs = (e) => e.activityHistoryFilters.filters, St = $(
2177
2161
  }, _a = (e, t, { title: s, excludedValues: i }) => {
2178
2162
  const r = e.filter((a) => !i.includes(a.value)), n = e.filter((a) => i.includes(a.value));
2179
2163
  return { groups: r.length > 0 ? [{ id: `${t.id}-group`, title: s, values: r }] : [], values: [...r, ...n] };
2180
- }, Sa = (e, t = {}) => Ii.map((s) => {
2164
+ }, Sa = (e, t = {}) => $i.map((s) => {
2181
2165
  const i = xa(e, s), { groups: r, values: n } = s.optionGroup ? _a(i, s, s.optionGroup) : { groups: [], values: i };
2182
2166
  return { definition: s, groups: r, values: n };
2183
2167
  }).filter(({ values: s }) => s.length > 0).map(({ definition: s, groups: i, values: r }) => ({
@@ -2186,7 +2170,7 @@ const cs = (e) => e.activityHistoryFilters.filters, St = $(
2186
2170
  values: r,
2187
2171
  groups: i,
2188
2172
  enabledValues: (t[s.id] ?? []).filter((n) => r.some((o) => o.value === n))
2189
- })), Ca = (e) => e.activityHistoryCollections.collections, Da = (e) => e.activityHistoryFilters.globalFilterSelection, us = $(
2173
+ })), Ca = (e) => e.activityHistoryCollections.collections, Da = (e) => e.activityHistoryFilters.globalFilterSelection, ds = $(
2190
2174
  Ca,
2191
2175
  Da,
2192
2176
  (e, t) => {
@@ -2195,27 +2179,27 @@ const cs = (e) => e.activityHistoryFilters.filters, St = $(
2195
2179
  );
2196
2180
  return Sa(s, t);
2197
2181
  }
2198
- ), hs = $(
2199
- us,
2182
+ ), us = $(
2183
+ ds,
2200
2184
  (e) => e.filter((t) => t.enabledValues.length > 0)
2201
- ), Ta = $(hs, (e) => !!e.length), $a = $(
2202
- us,
2203
- (e) => e.find((t) => t.id === ls)
2185
+ ), Ta = $(us, (e) => !!e.length), $a = $(
2186
+ ds,
2187
+ (e) => e.find((t) => t.id === as)
2204
2188
  ), Ia = $(
2205
- hs,
2206
- (e) => e.filter((t) => t.id !== ls)
2189
+ us,
2190
+ (e) => e.filter((t) => t.id !== as)
2207
2191
  ), Ea = (e, t) => {
2208
2192
  if (e.length !== t.length)
2209
2193
  return !1;
2210
2194
  const s = e.map((r) => r.codi).sort(), i = t.map((r) => r.codi).sort();
2211
2195
  return s.every((r, n) => r === i[n]);
2212
- }, Fa = (e) => e != null && typeof e.codi == "string" && (typeof e.cataleg == "string" || e.cataleg === null) && typeof e.descripcio == "string", Oa = (e) => e == null ? !0 : Array.isArray(e) && e.every(Fa), Ke = /* @__PURE__ */ new Map(), Je = /* @__PURE__ */ new Map(), Pa = (e) => (Ke.has(e) || Ke.set(e, new Date(e).toDateString()), Ke.get(e)), J = (e) => (Je.has(e) || Je.set(e, new Date(e)), Je.get(e)), Lt = (e) => {
2213
- const t = `${e.professional?.id || "null"}-${e.professional?.role?.id || "null"}-${e.professional?.speciality?.id || "null"}`, s = `${e.ep?.id || "null"}-${e.up?.id || "null"}-${e.center?.id || "null"}`, i = Pa(e.date);
2196
+ }, Fa = (e) => e != null && typeof e.codi == "string" && (typeof e.cataleg == "string" || e.cataleg === null) && typeof e.descripcio == "string", Oa = (e) => e == null ? !0 : Array.isArray(e) && e.every(Fa), et = /* @__PURE__ */ new Map(), tt = /* @__PURE__ */ new Map(), Ma = (e) => (et.has(e) || et.set(e, new Date(e).toDateString()), et.get(e)), J = (e) => (tt.has(e) || tt.set(e, new Date(e)), tt.get(e)), qt = (e) => {
2197
+ const t = `${e.professional?.id || "null"}-${e.professional?.role?.id || "null"}-${e.professional?.speciality?.id || "null"}`, s = `${e.ep?.id || "null"}-${e.up?.id || "null"}-${e.center?.id || "null"}`, i = Ma(e.date);
2214
2198
  return `${t}|${s}|${i}`;
2215
- }, Rs = (e) => e.service?.id != null && e.service.id !== "", Ma = (e, t) => {
2216
- const s = Lt(e), i = Lt(t);
2217
- return s !== i ? !1 : !Rs(e) || !Rs(t) ? !0 : e.service?.id === t.service?.id;
2218
- }, zs = (e, t) => {
2199
+ }, Hs = (e) => e.service?.id != null && e.service.id !== "", Pa = (e, t) => {
2200
+ const s = qt(e), i = qt(t);
2201
+ return s !== i ? !1 : !Hs(e) || !Hs(t) ? !0 : e.service?.id === t.service?.id;
2202
+ }, Rs = (e, t) => {
2219
2203
  const s = J(e).getTime(), i = J(t).getTime();
2220
2204
  return Math.abs(s - i) <= 480 * 60 * 1e3;
2221
2205
  };
@@ -2244,17 +2228,17 @@ function ka(e) {
2244
2228
  }
2245
2229
  const Aa = (e) => {
2246
2230
  if (!e?.length) return [];
2247
- Ke.clear(), Je.clear();
2231
+ et.clear(), tt.clear();
2248
2232
  const t = [...e].sort(
2249
2233
  (r, n) => J(n.date).getTime() - J(r.date).getTime()
2250
2234
  ), s = /* @__PURE__ */ new Map(), i = [];
2251
2235
  for (const r of t) {
2252
- const n = Lt(r), o = J(r.date).getTime();
2236
+ const n = qt(r), o = J(r.date).getTime();
2253
2237
  let a = !1;
2254
2238
  const l = s.get(n) || [];
2255
2239
  for (const d of l) {
2256
2240
  const c = d.items[0], u = d.items[d.items.length - 1];
2257
- if (!(!c || !u) && Ma(c, r) && zs(c.date, r.date) && zs(u.date, r.date)) {
2241
+ if (!(!c || !u) && Pa(c, r) && Rs(c.date, r.date) && Rs(u.date, r.date)) {
2258
2242
  const y = J(u.date).getTime(), f = J(c.date).getTime(), m = Math.min(y, o), D = Math.max(f, o);
2259
2243
  let p = !1;
2260
2244
  for (const [b, g] of s)
@@ -2292,19 +2276,19 @@ const Aa = (e) => {
2292
2276
  const o = r.items[0], a = n.items[0];
2293
2277
  return !o || !a ? 0 : J(a.date).getTime() - J(o.date).getTime();
2294
2278
  }), ka(i), i;
2295
- }, Pi = (e) => e.reduce((t, s) => {
2279
+ }, Oi = (e) => e.reduce((t, s) => {
2296
2280
  const i = new Date(s.date);
2297
2281
  return i > t ? i : t;
2298
- }, /* @__PURE__ */ new Date(0)), Wt = (e) => Pi(e.items), jt = (e) => {
2299
- const t = e.items.length > 0 ? [Pi(e.items)] : [], s = e.subGroups.map(Wt), i = [...t, ...s];
2282
+ }, /* @__PURE__ */ new Date(0)), Lt = (e) => Oi(e.items), Wt = (e) => {
2283
+ const t = e.items.length > 0 ? [Oi(e.items)] : [], s = e.subGroups.map(Lt), i = [...t, ...s];
2300
2284
  return i.length > 0 ? new Date(Math.max(...i.map((r) => r.getTime()))) : /* @__PURE__ */ new Date(0);
2301
2285
  }, Ha = (e) => {
2302
2286
  const t = (s) => s.sort((i, r) => new Date(r.date).getTime() - new Date(i.date).getTime());
2303
2287
  return e.forEach((s) => {
2304
2288
  s.items = t(s.items), s.subGroups.forEach((i) => {
2305
2289
  i.items = t(i.items);
2306
- }), s.subGroups.sort((i, r) => Wt(r).getTime() - Wt(i).getTime());
2307
- }), e.sort((s, i) => jt(i).getTime() - jt(s).getTime());
2290
+ }), s.subGroups.sort((i, r) => Lt(r).getTime() - Lt(i).getTime());
2291
+ }), e.sort((s, i) => Wt(i).getTime() - Wt(s).getTime());
2308
2292
  }, Dt = (e) => e.activityHistoryFilters.searchString, Tt = (e) => e.activityHistoryCollections.collections, Ra = $(
2309
2293
  Tt,
2310
2294
  (e) => {
@@ -2358,7 +2342,7 @@ const Aa = (e) => {
2358
2342
  Dt,
2359
2343
  St,
2360
2344
  Ct,
2361
- ds,
2345
+ cs,
2362
2346
  Ia,
2363
2347
  Va,
2364
2348
  fa,
@@ -2372,21 +2356,21 @@ const Aa = (e) => {
2372
2356
  );
2373
2357
  return e.filter((y) => new ha(t, y.searchPredicate).and(l).and(d).and(c).and(u).isSatisfiedBy(y));
2374
2358
  }
2375
- ), fs = $(
2359
+ ), hs = $(
2376
2360
  Na,
2377
2361
  (e) => Ha(Aa(e))
2378
2362
  );
2379
- class ps {
2363
+ class fs {
2380
2364
  constructor(t) {
2381
2365
  this.payload = t;
2382
2366
  }
2383
2367
  }
2384
- class ms {
2368
+ class ps {
2385
2369
  constructor(t) {
2386
2370
  this.payload = t;
2387
2371
  }
2388
2372
  }
2389
- class gs {
2373
+ class ms {
2390
2374
  constructor(t) {
2391
2375
  this.payload = t;
2392
2376
  }
@@ -2395,11 +2379,11 @@ const Ba = ".filters-sidebar{padding:8px 4px;border-right:1px solid rgb(189,189,
2395
2379
  <dss-input-switch size="sm" @onChangeValue=${(r) => i(r.detail)} .checked=${s}>
2396
2380
  <input slot="input" id=${e} aria-label=${t} type="checkbox">
2397
2381
  <label slot="label" for=${e}>${t}</label>
2398
- </dss-input-switch>`, ki = ({ id: e, title: t, checked: s, onChange: i }) => h`
2382
+ </dss-input-switch>`, Pi = ({ id: e, title: t, checked: s, onChange: i }) => h`
2399
2383
  <dss-checkbox variant="default" @onChange=${(r) => i(r.detail)}>
2400
2384
  <input slot="input" id=${e} type="checkbox" .checked=${s}>
2401
2385
  <label slot="label" for=${e}>${t}</label>
2402
- </dss-checkbox>`, Yt = (e, t) => e === Oe.Switch ? qa(t) : ki(t), Gs = (e, t) => Yt(e.type, {
2386
+ </dss-checkbox>`, jt = (e, t) => e === Me.Switch ? qa(t) : Pi(t), zs = (e, t) => jt(e.type, {
2403
2387
  id: `common-filter-${e.id}`,
2404
2388
  title: e.title,
2405
2389
  checked: e.enabled,
@@ -2415,19 +2399,19 @@ const Ba = ".filters-sidebar{padding:8px 4px;border-right:1px solid rgb(189,189,
2415
2399
  </div>
2416
2400
  </primaria-accordion>
2417
2401
  </div>`
2418
- ), Wa = (e, t, s) => Ce(e) ? Yt(e.type, {
2402
+ ), Wa = (e, t, s) => Ce(e) ? jt(e.type, {
2419
2403
  id: `custom-filter-${t.id}-${e.id}`,
2420
2404
  title: e.title,
2421
2405
  checked: !!e.enabled,
2422
2406
  onChange: (i) => s._onChangeCustomFilterValue(t.id, e.id, null, i)
2423
2407
  }) : e.options.map(
2424
- (i, r) => Yt(e.type, {
2408
+ (i, r) => jt(e.type, {
2425
2409
  id: `custom-filter-${t.id}-${e.id}-${r}`,
2426
2410
  title: i.title || i.id,
2427
2411
  checked: !!e.enabledValues?.includes(i.id),
2428
2412
  onChange: (n) => s._onChangeCustomFilterValue(t.id, e.id, i.id, n)
2429
2413
  })
2430
- ), Ai = (e, t, s) => ki({
2414
+ ), ki = (e, t, s) => Pi({
2431
2415
  id: `global-filter-${e.id}-${t.value}`,
2432
2416
  title: t.label || t.value,
2433
2417
  checked: e.enabledValues.includes(t.value),
@@ -2440,7 +2424,7 @@ const Ba = ".filters-sidebar{padding:8px 4px;border-right:1px solid rgb(189,189,
2440
2424
  <label slot="label" for=${r}>${t.title}</label>
2441
2425
  </dss-checkbox>
2442
2426
  <div class="filter-options filter-options--nested">
2443
- ${t.values.map((n) => Ai(e, n, s))}
2427
+ ${t.values.map((n) => ki(e, n, s))}
2444
2428
  </div>`;
2445
2429
  }, Ya = (e, t) => {
2446
2430
  const s = new Set(e.groups.flatMap((r) => r.values.map((n) => n.value))), i = e.values.filter((r) => !s.has(r.value));
@@ -2450,7 +2434,7 @@ const Ba = ".filters-sidebar{padding:8px 4px;border-right:1px solid rgb(189,189,
2450
2434
  <dss-typography slot="title" tag="p" variant="subtitle-3">${e.title}</dss-typography>
2451
2435
  <div class="filter-options" slot="content">
2452
2436
  ${e.groups.map((r) => ja(e, r, t))}
2453
- ${i.map((r) => Ai(e, r, t))}
2437
+ ${i.map((r) => ki(e, r, t))}
2454
2438
  </div>
2455
2439
  </primaria-accordion>
2456
2440
  </div>`;
@@ -2458,40 +2442,40 @@ const Ba = ".filters-sidebar{padding:8px 4px;border-right:1px solid rgb(189,189,
2458
2442
  <div class="filters-sidebar" ?expanded=${e.filtersExpanded} >
2459
2443
  ${e.filtersExpanded ? h`<div class="filters-sidebar-opened">${v("filters.filters")}<dss-icon-button ?hidden=${e.wrapperMaximized} @click=${() => e._toggleFilters()} size="md" variant="primary" icon="keyboard_double_arrow_left"></dss-icon-button></div>
2460
2444
  <div class="filter-container">
2461
- ${ae(
2445
+ ${oe(
2462
2446
  e.commonFilters,
2463
2447
  (t) => t.id,
2464
- (t) => h`<div class="filter">${Gs(t, e)}</div> `
2448
+ (t) => h`<div class="filter">${zs(t, e)}</div> `
2465
2449
  )}
2466
2450
  <!-- Regió per al filtre de diagnostics extern -->
2467
2451
  <div class="filter">
2468
2452
  <primaria-region name=${e.api.regionManager.regions.activityHistory.customFilters}></primaria-region>
2469
2453
  </div>
2470
2454
  <!-- Filtres globals: opcions derivades dels ítems de tots els plugins -->
2471
- ${ae(
2455
+ ${oe(
2472
2456
  e.globalFilters,
2473
2457
  (t) => t.id,
2474
2458
  (t) => Ya(t, e)
2475
2459
  )}
2476
2460
  <!-- Filtres propis de cada plugin -->
2477
- ${ae(
2461
+ ${oe(
2478
2462
  e.customFilterGroups,
2479
2463
  (t) => t.id,
2480
2464
  (t) => La(t, e)
2481
2465
  )}
2482
2466
  <!-- Toggle global d'eliminats: sempre l'últim de la llista -->
2483
- ${e.deletedFilter ? h`<div class="filter filter-deleted-toggle">${Gs(e.deletedFilter, e)}</div>` : P}
2467
+ ${e.deletedFilter ? h`<div class="filter filter-deleted-toggle">${zs(e.deletedFilter, e)}</div>` : M}
2484
2468
  </div> ` : h`
2485
2469
  <dss-icon-button tooltipFixed label=${v("filters.filters")} @click=${() => e._toggleFilters()} size="md" variant="primary" icon="filter_list"></dss-icon-button>
2486
2470
  `}
2487
2471
  </div>
2488
2472
  `;
2489
- var Ua = Object.defineProperty, Xa = Object.getOwnPropertyDescriptor, ye = (e, t, s, i) => {
2473
+ var Ua = Object.defineProperty, Xa = Object.getOwnPropertyDescriptor, ge = (e, t, s, i) => {
2490
2474
  for (var r = i > 1 ? void 0 : i ? Xa(t, s) : t, n = e.length - 1, o; n >= 0; n--)
2491
2475
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
2492
2476
  return i && r && Ua(t, s, r), r;
2493
2477
  };
2494
- let se = class extends W {
2478
+ let te = class extends W {
2495
2479
  constructor() {
2496
2480
  super(...arguments), this.filtersExpanded = !1;
2497
2481
  }
@@ -2505,11 +2489,11 @@ let se = class extends W {
2505
2489
  this.filtersExpanded = !this.filtersExpanded;
2506
2490
  }
2507
2491
  _onChangeCommonFilterValue(e, t) {
2508
- this.api.broker.send(new ps({ id: e, enabled: t }));
2492
+ this.api.broker.send(new fs({ id: e, enabled: t }));
2509
2493
  }
2510
2494
  _onChangeCustomFilterValue(e, t, s, i) {
2511
2495
  this.api.broker.send(
2512
- new ms({
2496
+ new ps({
2513
2497
  filterGroupId: e,
2514
2498
  filterId: t,
2515
2499
  optionId: s,
@@ -2533,38 +2517,38 @@ let se = class extends W {
2533
2517
  const i = this.globalFilters.find((n) => n.id === e);
2534
2518
  if (!i) return;
2535
2519
  const r = s ? [.../* @__PURE__ */ new Set([...i.enabledValues, ...t])] : i.enabledValues.filter((n) => !t.includes(n));
2536
- this.api.broker.send(new gs({ id: e, values: r }));
2520
+ this.api.broker.send(new ms({ id: e, values: r }));
2537
2521
  }
2538
2522
  };
2539
- se.styles = L`
2523
+ te.styles = L`
2540
2524
  ${q(Ba)}
2541
2525
  `;
2542
- ye([
2526
+ ge([
2543
2527
  S(pa)
2544
- ], se.prototype, "commonFilters", 2);
2545
- ye([
2546
- S(Ei)
2547
- ], se.prototype, "deletedFilter", 2);
2548
- ye([
2528
+ ], te.prototype, "commonFilters", 2);
2529
+ ge([
2530
+ S(Ii)
2531
+ ], te.prototype, "deletedFilter", 2);
2532
+ ge([
2549
2533
  S(Mi)
2550
- ], se.prototype, "customFilterGroups", 2);
2551
- ye([
2552
- S(us)
2553
- ], se.prototype, "globalFilters", 2);
2554
- ye([
2555
- De(z.primaryApi)
2556
- ], se.prototype, "api", 2);
2557
- ye([
2558
- re()
2559
- ], se.prototype, "filtersExpanded", 2);
2560
- ye([
2534
+ ], te.prototype, "customFilterGroups", 2);
2535
+ ge([
2536
+ S(ds)
2537
+ ], te.prototype, "globalFilters", 2);
2538
+ ge([
2539
+ De(V.primaryApi)
2540
+ ], te.prototype, "api", 2);
2541
+ ge([
2542
+ ie()
2543
+ ], te.prototype, "filtersExpanded", 2);
2544
+ ge([
2561
2545
  K({ type: Boolean })
2562
- ], se.prototype, "wrapperMaximized", 2);
2563
- se = ye([
2546
+ ], te.prototype, "wrapperMaximized", 2);
2547
+ te = ge([
2564
2548
  j("activity-history-filters")
2565
- ], se);
2566
- const { setCommonFilterValue: Ka } = ne.actions;
2567
- class Ja extends de {
2549
+ ], te);
2550
+ const { setCommonFilterValue: Ka } = re.actions;
2551
+ class Ja extends Te {
2568
2552
  async handle(t) {
2569
2553
  try {
2570
2554
  this.store.dispatch(Ka(t.payload));
@@ -2573,13 +2557,13 @@ class Ja extends de {
2573
2557
  }
2574
2558
  }
2575
2559
  }
2576
- let Hi;
2560
+ let Ai;
2577
2561
  const Za = (e) => {
2578
- Hi = e.registerRequest(ps, Ja);
2562
+ Ai = e.registerRequest(fs, Ja);
2579
2563
  }, el = () => {
2580
- Hi?.dispose();
2581
- }, { addCustomFilters: tl } = ne.actions;
2582
- class sl extends de {
2564
+ Ai?.dispose();
2565
+ }, { addCustomFilters: tl } = re.actions;
2566
+ class sl extends Te {
2583
2567
  async handle(t) {
2584
2568
  try {
2585
2569
  this.store.dispatch(tl(t.payload));
@@ -2588,13 +2572,13 @@ class sl extends de {
2588
2572
  }
2589
2573
  }
2590
2574
  }
2591
- let Ri;
2575
+ let Hi;
2592
2576
  const il = (e) => {
2593
- Ri = e.registerRequest(_i, sl);
2577
+ Hi = e.registerRequest(xi, sl);
2594
2578
  }, rl = () => {
2595
- Ri?.dispose();
2596
- }, { setCustomFilterValue: nl } = ne.actions;
2597
- class ol extends de {
2579
+ Hi?.dispose();
2580
+ }, { setCustomFilterValue: nl } = re.actions;
2581
+ class ol extends Te {
2598
2582
  async handle(t) {
2599
2583
  try {
2600
2584
  this.store.dispatch(nl(t.payload));
@@ -2603,16 +2587,16 @@ class ol extends de {
2603
2587
  }
2604
2588
  }
2605
2589
  }
2606
- let zi;
2590
+ let Ri;
2607
2591
  const al = (e) => {
2608
- zi = e.registerRequest(ms, ol);
2592
+ Ri = e.registerRequest(ps, ol);
2609
2593
  }, ll = () => {
2610
- zi?.dispose();
2611
- }, { deleteDiagnosticFilterValue: cl } = ne.actions;
2612
- class dl extends te {
2594
+ Ri?.dispose();
2595
+ }, { deleteDiagnosticFilterValue: cl } = re.actions;
2596
+ class dl extends me {
2613
2597
  async handle(t) {
2614
2598
  try {
2615
- const i = ds(this.store.getState()).find((r) => r.codi === t.payload.diagnosticCodi);
2599
+ const i = cs(this.store.getState()).find((r) => r.codi === t.payload.diagnosticCodi);
2616
2600
  if (i) {
2617
2601
  const { evolucions: r, relacions: n, ...o } = i;
2618
2602
  this.api.broker.publish(this.api.broker.events.activityHistory.diagnosticFilterDeactivated, {
@@ -2625,18 +2609,18 @@ class dl extends te {
2625
2609
  }
2626
2610
  }
2627
2611
  }
2628
- class Gi {
2612
+ class zi {
2629
2613
  constructor(t) {
2630
2614
  this.payload = t;
2631
2615
  }
2632
2616
  }
2633
- let Vi;
2617
+ let Gi;
2634
2618
  const ul = (e) => {
2635
- Vi = e.registerRequest(Gi, dl);
2619
+ Gi = e.registerRequest(zi, dl);
2636
2620
  }, hl = () => {
2637
- Vi?.dispose();
2638
- }, { setDiagnosticFilterValues: fl } = ne.actions;
2639
- class pl extends de {
2621
+ Gi?.dispose();
2622
+ }, { setDiagnosticFilterValues: fl } = re.actions;
2623
+ class pl extends Te {
2640
2624
  async handle(t) {
2641
2625
  try {
2642
2626
  this.store.dispatch(fl(t.payload.diagnostics));
@@ -2645,89 +2629,89 @@ class pl extends de {
2645
2629
  }
2646
2630
  }
2647
2631
  }
2648
- class Ni {
2632
+ class Vi {
2649
2633
  constructor(t) {
2650
2634
  this.payload = t;
2651
2635
  }
2652
2636
  }
2653
- let Bi;
2637
+ let Ni;
2654
2638
  const ml = (e) => {
2655
- Bi = e.registerRequest(Ni, pl);
2639
+ Ni = e.registerRequest(Vi, pl);
2656
2640
  }, gl = () => {
2657
- Bi?.dispose();
2658
- }, yl = (e) => {
2659
- e.broker.subscribe("cipds_diagnostic_filter_historic_requested", (t) => {
2660
- e.broker.send(new Ni(t));
2661
- });
2662
- };
2663
- class qi {
2664
- }
2665
- const { resetFilters: vl } = ne.actions;
2666
- class bl extends te {
2641
+ Ni?.dispose();
2642
+ }, yl = (e) => e.broker.subscribe("cipds_diagnostic_filter_historic_requested", (t) => {
2643
+ e.broker.send(new Vi(t));
2644
+ }), { setGlobalFilterValues: vl } = re.actions;
2645
+ class bl extends Te {
2667
2646
  async handle(t) {
2668
2647
  try {
2669
- this.api.broker.publish(this.api.broker.events.activityHistory.filtersCleaned), this.store.dispatch(vl());
2648
+ this.store.dispatch(vl(t.payload));
2670
2649
  } catch (s) {
2671
2650
  console.error(s.message);
2672
2651
  }
2673
2652
  }
2674
2653
  }
2675
- let Li;
2654
+ let Bi;
2676
2655
  const wl = (e) => {
2677
- Li = e.registerRequest(qi, bl);
2656
+ Bi = e.registerRequest(ms, bl);
2678
2657
  }, xl = () => {
2679
- Li?.dispose();
2680
- }, { setGlobalFilterValues: _l } = ne.actions;
2681
- class Sl extends de {
2658
+ Bi?.dispose();
2659
+ };
2660
+ class qi {
2661
+ }
2662
+ const { resetFilters: _l } = re.actions;
2663
+ class Sl extends me {
2682
2664
  async handle(t) {
2683
2665
  try {
2684
- this.store.dispatch(_l(t.payload));
2666
+ this.api.broker.publish(this.api.broker.events.activityHistory.filtersCleaned), this.store.dispatch(_l());
2685
2667
  } catch (s) {
2686
2668
  console.error(s.message);
2687
2669
  }
2688
2670
  }
2689
2671
  }
2690
- let Wi;
2672
+ let Li;
2691
2673
  const Cl = (e) => {
2692
- Wi = e.registerRequest(gs, Sl);
2674
+ Li = e.registerRequest(qi, Sl);
2693
2675
  }, Dl = () => {
2694
- Wi?.dispose();
2695
- }, Tl = (e, t) => {
2696
- Za(e), il(e), al(e), ml(e), ul(e), Cl(e), wl(e), yl(t);
2676
+ Li?.dispose();
2677
+ };
2678
+ let Yt = null;
2679
+ const Tl = (e, t) => {
2680
+ Za(e), il(e), al(e), ml(e), ul(e), wl(e), Cl(e), Yt = yl(t);
2697
2681
  }, $l = () => {
2698
- el(), rl(), ll(), gl(), hl(), Dl(), xl();
2699
- }, ji = 6048e5, Il = 864e5, El = 6e4, Fl = 36e5, Ol = 1e3, Vs = Symbol.for("constructDateFrom");
2682
+ Yt?.dispose(), Yt = null, el(), rl(), ll(), gl(), hl(), xl(), Dl();
2683
+ }, Wi = 6048e5, Il = 864e5, El = 6e4, Fl = 36e5, Ol = 1e3, Gs = Symbol.for("constructDateFrom");
2700
2684
  function A(e, t) {
2701
- return typeof e == "function" ? e(t) : e && typeof e == "object" && Vs in e ? e[Vs](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
2685
+ return typeof e == "function" ? e(t) : e && typeof e == "object" && Gs in e ? e[Gs](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
2702
2686
  }
2703
- function M(e, t) {
2687
+ function P(e, t) {
2704
2688
  return A(t || e, e);
2705
2689
  }
2706
- function Yi(e, t, s) {
2707
- const i = M(e, s?.in);
2690
+ function ji(e, t, s) {
2691
+ const i = P(e, s?.in);
2708
2692
  return isNaN(t) ? A(s?.in || e, NaN) : (t && i.setDate(i.getDate() + t), i);
2709
2693
  }
2710
- let Pl = {};
2711
- function ze() {
2712
- return Pl;
2694
+ let Ml = {};
2695
+ function Ge() {
2696
+ return Ml;
2713
2697
  }
2714
- function fe(e, t) {
2715
- const s = ze(), i = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? s.weekStartsOn ?? s.locale?.options?.weekStartsOn ?? 0, r = M(e, t?.in), n = r.getDay(), o = (n < i ? 7 : 0) + n - i;
2698
+ function ue(e, t) {
2699
+ const s = Ge(), i = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? s.weekStartsOn ?? s.locale?.options?.weekStartsOn ?? 0, r = P(e, t?.in), n = r.getDay(), o = (n < i ? 7 : 0) + n - i;
2716
2700
  return r.setDate(r.getDate() - o), r.setHours(0, 0, 0, 0), r;
2717
2701
  }
2718
- function ke(e, t) {
2719
- return fe(e, { ...t, weekStartsOn: 1 });
2702
+ function Ae(e, t) {
2703
+ return ue(e, { ...t, weekStartsOn: 1 });
2720
2704
  }
2721
- function Qi(e, t) {
2722
- const s = M(e, t?.in), i = s.getFullYear(), r = A(s, 0);
2705
+ function Yi(e, t) {
2706
+ const s = P(e, t?.in), i = s.getFullYear(), r = A(s, 0);
2723
2707
  r.setFullYear(i + 1, 0, 4), r.setHours(0, 0, 0, 0);
2724
- const n = ke(r), o = A(s, 0);
2708
+ const n = Ae(r), o = A(s, 0);
2725
2709
  o.setFullYear(i, 0, 4), o.setHours(0, 0, 0, 0);
2726
- const a = ke(o);
2710
+ const a = Ae(o);
2727
2711
  return s.getTime() >= n.getTime() ? i + 1 : s.getTime() >= a.getTime() ? i : i - 1;
2728
2712
  }
2729
- function ot(e) {
2730
- const t = M(e), s = new Date(
2713
+ function at(e) {
2714
+ const t = P(e), s = new Date(
2731
2715
  Date.UTC(
2732
2716
  t.getFullYear(),
2733
2717
  t.getMonth(),
@@ -2740,37 +2724,37 @@ function ot(e) {
2740
2724
  );
2741
2725
  return s.setUTCFullYear(t.getFullYear()), +e - +s;
2742
2726
  }
2743
- function Ml(e, ...t) {
2727
+ function Pl(e, ...t) {
2744
2728
  const s = A.bind(
2745
2729
  null,
2746
2730
  t.find((i) => typeof i == "object")
2747
2731
  );
2748
2732
  return t.map(s);
2749
2733
  }
2750
- function at(e, t) {
2751
- const s = M(e, t?.in);
2734
+ function lt(e, t) {
2735
+ const s = P(e, t?.in);
2752
2736
  return s.setHours(0, 0, 0, 0), s;
2753
2737
  }
2754
2738
  function kl(e, t, s) {
2755
- const [i, r] = Ml(
2739
+ const [i, r] = Pl(
2756
2740
  s?.in,
2757
2741
  e,
2758
2742
  t
2759
- ), n = at(i), o = at(r), a = +n - ot(n), l = +o - ot(o);
2743
+ ), n = lt(i), o = lt(r), a = +n - at(n), l = +o - at(o);
2760
2744
  return Math.round((a - l) / Il);
2761
2745
  }
2762
2746
  function Al(e, t) {
2763
- const s = Qi(e, t), i = A(e, 0);
2764
- return i.setFullYear(s, 0, 4), i.setHours(0, 0, 0, 0), ke(i);
2747
+ const s = Yi(e, t), i = A(e, 0);
2748
+ return i.setFullYear(s, 0, 4), i.setHours(0, 0, 0, 0), Ae(i);
2765
2749
  }
2766
2750
  function Hl(e) {
2767
2751
  return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
2768
2752
  }
2769
- function Ui(e) {
2770
- return !(!Hl(e) && typeof e != "number" || isNaN(+M(e)));
2753
+ function Qi(e) {
2754
+ return !(!Hl(e) && typeof e != "number" || isNaN(+P(e)));
2771
2755
  }
2772
2756
  function Rl(e, t) {
2773
- const s = M(e, t?.in);
2757
+ const s = P(e, t?.in);
2774
2758
  return s.setFullYear(s.getFullYear(), 0, 1), s.setHours(0, 0, 0, 0), s;
2775
2759
  }
2776
2760
  const zl = {
@@ -2840,7 +2824,7 @@ const zl = {
2840
2824
  const r = zl[e];
2841
2825
  return typeof r == "string" ? i = r : t === 1 ? i = r.one : i = r.other.replace("{{count}}", t.toString()), s?.addSuffix ? s.comparison && s.comparison > 0 ? "in " + i : i + " ago" : i;
2842
2826
  };
2843
- function Pt(e) {
2827
+ function Mt(e) {
2844
2828
  return (t = {}) => {
2845
2829
  const s = t.width ? String(t.width) : e.defaultWidth;
2846
2830
  return e.formats[s] || e.formats[e.defaultWidth];
@@ -2862,15 +2846,15 @@ const Vl = {
2862
2846
  medium: "{{date}}, {{time}}",
2863
2847
  short: "{{date}}, {{time}}"
2864
2848
  }, ql = {
2865
- date: Pt({
2849
+ date: Mt({
2866
2850
  formats: Vl,
2867
2851
  defaultWidth: "full"
2868
2852
  }),
2869
- time: Pt({
2853
+ time: Mt({
2870
2854
  formats: Nl,
2871
2855
  defaultWidth: "full"
2872
2856
  }),
2873
- dateTime: Pt({
2857
+ dateTime: Mt({
2874
2858
  formats: Bl,
2875
2859
  defaultWidth: "full"
2876
2860
  })
@@ -2882,7 +2866,7 @@ const Vl = {
2882
2866
  nextWeek: "eeee 'at' p",
2883
2867
  other: "P"
2884
2868
  }, Wl = (e, t, s, i) => Ll[e];
2885
- function Ne(e) {
2869
+ function Be(e) {
2886
2870
  return (t, s) => {
2887
2871
  const i = s?.context ? String(s.context) : "standalone";
2888
2872
  let r;
@@ -3024,31 +3008,31 @@ const jl = {
3024
3008
  return s + "th";
3025
3009
  }, Zl = {
3026
3010
  ordinalNumber: Jl,
3027
- era: Ne({
3011
+ era: Be({
3028
3012
  values: jl,
3029
3013
  defaultWidth: "wide"
3030
3014
  }),
3031
- quarter: Ne({
3015
+ quarter: Be({
3032
3016
  values: Yl,
3033
3017
  defaultWidth: "wide",
3034
3018
  argumentCallback: (e) => e - 1
3035
3019
  }),
3036
- month: Ne({
3020
+ month: Be({
3037
3021
  values: Ql,
3038
3022
  defaultWidth: "wide"
3039
3023
  }),
3040
- day: Ne({
3024
+ day: Be({
3041
3025
  values: Ul,
3042
3026
  defaultWidth: "wide"
3043
3027
  }),
3044
- dayPeriod: Ne({
3028
+ dayPeriod: Be({
3045
3029
  values: Xl,
3046
3030
  defaultWidth: "wide",
3047
3031
  formattingValues: Kl,
3048
3032
  defaultFormattingWidth: "wide"
3049
3033
  })
3050
3034
  };
3051
- function Be(e) {
3035
+ function qe(e) {
3052
3036
  return (t, s = {}) => {
3053
3037
  const i = s.width, r = i && e.matchPatterns[i] || e.matchPatterns[e.defaultMatchWidth], n = t.match(r);
3054
3038
  if (!n)
@@ -3161,38 +3145,38 @@ const ic = /^(\d+)(th|st|nd|rd)?/i, rc = /\d+/i, nc = {
3161
3145
  parsePattern: rc,
3162
3146
  valueCallback: (e) => parseInt(e, 10)
3163
3147
  }),
3164
- era: Be({
3148
+ era: qe({
3165
3149
  matchPatterns: nc,
3166
3150
  defaultMatchWidth: "wide",
3167
3151
  parsePatterns: oc,
3168
3152
  defaultParseWidth: "any"
3169
3153
  }),
3170
- quarter: Be({
3154
+ quarter: qe({
3171
3155
  matchPatterns: ac,
3172
3156
  defaultMatchWidth: "wide",
3173
3157
  parsePatterns: lc,
3174
3158
  defaultParseWidth: "any",
3175
3159
  valueCallback: (e) => e + 1
3176
3160
  }),
3177
- month: Be({
3161
+ month: qe({
3178
3162
  matchPatterns: cc,
3179
3163
  defaultMatchWidth: "wide",
3180
3164
  parsePatterns: dc,
3181
3165
  defaultParseWidth: "any"
3182
3166
  }),
3183
- day: Be({
3167
+ day: qe({
3184
3168
  matchPatterns: uc,
3185
3169
  defaultMatchWidth: "wide",
3186
3170
  parsePatterns: hc,
3187
3171
  defaultParseWidth: "any"
3188
3172
  }),
3189
- dayPeriod: Be({
3173
+ dayPeriod: qe({
3190
3174
  matchPatterns: fc,
3191
3175
  defaultMatchWidth: "any",
3192
3176
  parsePatterns: pc,
3193
3177
  defaultParseWidth: "any"
3194
3178
  })
3195
- }, Xi = {
3179
+ }, Ui = {
3196
3180
  code: "en-US",
3197
3181
  formatDistance: Gl,
3198
3182
  formatLong: ql,
@@ -3205,34 +3189,34 @@ const ic = /^(\d+)(th|st|nd|rd)?/i, rc = /\d+/i, nc = {
3205
3189
  }
3206
3190
  };
3207
3191
  function gc(e, t) {
3208
- const s = M(e, t?.in);
3192
+ const s = P(e, t?.in);
3209
3193
  return kl(s, Rl(s)) + 1;
3210
3194
  }
3211
- function Ki(e, t) {
3212
- const s = M(e, t?.in), i = +ke(s) - +Al(s);
3213
- return Math.round(i / ji) + 1;
3195
+ function Xi(e, t) {
3196
+ const s = P(e, t?.in), i = +Ae(s) - +Al(s);
3197
+ return Math.round(i / Wi) + 1;
3214
3198
  }
3215
- function ys(e, t) {
3216
- const s = M(e, t?.in), i = s.getFullYear(), r = ze(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = A(t?.in || e, 0);
3199
+ function gs(e, t) {
3200
+ const s = P(e, t?.in), i = s.getFullYear(), r = Ge(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = A(t?.in || e, 0);
3217
3201
  o.setFullYear(i + 1, 0, n), o.setHours(0, 0, 0, 0);
3218
- const a = fe(o, t), l = A(t?.in || e, 0);
3202
+ const a = ue(o, t), l = A(t?.in || e, 0);
3219
3203
  l.setFullYear(i, 0, n), l.setHours(0, 0, 0, 0);
3220
- const d = fe(l, t);
3204
+ const d = ue(l, t);
3221
3205
  return +s >= +a ? i + 1 : +s >= +d ? i : i - 1;
3222
3206
  }
3223
3207
  function yc(e, t) {
3224
- const s = ze(), i = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? s.firstWeekContainsDate ?? s.locale?.options?.firstWeekContainsDate ?? 1, r = ys(e, t), n = A(t?.in || e, 0);
3225
- return n.setFullYear(r, 0, i), n.setHours(0, 0, 0, 0), fe(n, t);
3208
+ const s = Ge(), i = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? s.firstWeekContainsDate ?? s.locale?.options?.firstWeekContainsDate ?? 1, r = gs(e, t), n = A(t?.in || e, 0);
3209
+ return n.setFullYear(r, 0, i), n.setHours(0, 0, 0, 0), ue(n, t);
3226
3210
  }
3227
- function Ji(e, t) {
3228
- const s = M(e, t?.in), i = +fe(s, t) - +yc(s, t);
3229
- return Math.round(i / ji) + 1;
3211
+ function Ki(e, t) {
3212
+ const s = P(e, t?.in), i = +ue(s, t) - +yc(s, t);
3213
+ return Math.round(i / Wi) + 1;
3230
3214
  }
3231
3215
  function _(e, t) {
3232
3216
  const s = e < 0 ? "-" : "", i = Math.abs(e).toString().padStart(t, "0");
3233
3217
  return s + i;
3234
3218
  }
3235
- const ue = {
3219
+ const ce = {
3236
3220
  // Year
3237
3221
  y(e, t) {
3238
3222
  const s = e.getFullYear(), i = s > 0 ? s : 1 - s;
@@ -3286,14 +3270,14 @@ const ue = {
3286
3270
  );
3287
3271
  return _(r, t.length);
3288
3272
  }
3289
- }, $e = {
3273
+ }, Ie = {
3290
3274
  midnight: "midnight",
3291
3275
  noon: "noon",
3292
3276
  morning: "morning",
3293
3277
  afternoon: "afternoon",
3294
3278
  evening: "evening",
3295
3279
  night: "night"
3296
- }, Ns = {
3280
+ }, Vs = {
3297
3281
  // Era
3298
3282
  G: function(e, t, s) {
3299
3283
  const i = e.getFullYear() > 0 ? 1 : 0;
@@ -3318,11 +3302,11 @@ const ue = {
3318
3302
  const i = e.getFullYear(), r = i > 0 ? i : 1 - i;
3319
3303
  return s.ordinalNumber(r, { unit: "year" });
3320
3304
  }
3321
- return ue.y(e, t);
3305
+ return ce.y(e, t);
3322
3306
  },
3323
3307
  // Local week-numbering year
3324
3308
  Y: function(e, t, s, i) {
3325
- const r = ys(e, i), n = r > 0 ? r : 1 - r;
3309
+ const r = gs(e, i), n = r > 0 ? r : 1 - r;
3326
3310
  if (t === "YY") {
3327
3311
  const o = n % 100;
3328
3312
  return _(o, 2);
@@ -3331,7 +3315,7 @@ const ue = {
3331
3315
  },
3332
3316
  // ISO week-numbering year
3333
3317
  R: function(e, t) {
3334
- const s = Qi(e);
3318
+ const s = Yi(e);
3335
3319
  return _(s, t.length);
3336
3320
  },
3337
3321
  // Extended year. This is a single number designating the year of this calendar system.
@@ -3421,7 +3405,7 @@ const ue = {
3421
3405
  switch (t) {
3422
3406
  case "M":
3423
3407
  case "MM":
3424
- return ue.M(e, t);
3408
+ return ce.M(e, t);
3425
3409
  // 1st, 2nd, ..., 12th
3426
3410
  case "Mo":
3427
3411
  return s.ordinalNumber(i + 1, { unit: "month" });
@@ -3476,17 +3460,17 @@ const ue = {
3476
3460
  },
3477
3461
  // Local week of year
3478
3462
  w: function(e, t, s, i) {
3479
- const r = Ji(e, i);
3463
+ const r = Ki(e, i);
3480
3464
  return t === "wo" ? s.ordinalNumber(r, { unit: "week" }) : _(r, t.length);
3481
3465
  },
3482
3466
  // ISO week of year
3483
3467
  I: function(e, t, s) {
3484
- const i = Ki(e);
3468
+ const i = Xi(e);
3485
3469
  return t === "Io" ? s.ordinalNumber(i, { unit: "week" }) : _(i, t.length);
3486
3470
  },
3487
3471
  // Day of the month
3488
3472
  d: function(e, t, s) {
3489
- return t === "do" ? s.ordinalNumber(e.getDate(), { unit: "date" }) : ue.d(e, t);
3473
+ return t === "do" ? s.ordinalNumber(e.getDate(), { unit: "date" }) : ce.d(e, t);
3490
3474
  },
3491
3475
  // Day of year
3492
3476
  D: function(e, t, s) {
@@ -3676,7 +3660,7 @@ const ue = {
3676
3660
  b: function(e, t, s) {
3677
3661
  const i = e.getHours();
3678
3662
  let r;
3679
- switch (i === 12 ? r = $e.noon : i === 0 ? r = $e.midnight : r = i / 12 >= 1 ? "pm" : "am", t) {
3663
+ switch (i === 12 ? r = Ie.noon : i === 0 ? r = Ie.midnight : r = i / 12 >= 1 ? "pm" : "am", t) {
3680
3664
  case "b":
3681
3665
  case "bb":
3682
3666
  return s.dayPeriod(r, {
@@ -3705,7 +3689,7 @@ const ue = {
3705
3689
  B: function(e, t, s) {
3706
3690
  const i = e.getHours();
3707
3691
  let r;
3708
- switch (i >= 17 ? r = $e.evening : i >= 12 ? r = $e.afternoon : i >= 4 ? r = $e.morning : r = $e.night, t) {
3692
+ switch (i >= 17 ? r = Ie.evening : i >= 12 ? r = Ie.afternoon : i >= 4 ? r = Ie.morning : r = Ie.night, t) {
3709
3693
  case "B":
3710
3694
  case "BB":
3711
3695
  case "BBB":
@@ -3732,11 +3716,11 @@ const ue = {
3732
3716
  let i = e.getHours() % 12;
3733
3717
  return i === 0 && (i = 12), s.ordinalNumber(i, { unit: "hour" });
3734
3718
  }
3735
- return ue.h(e, t);
3719
+ return ce.h(e, t);
3736
3720
  },
3737
3721
  // Hour [0-23]
3738
3722
  H: function(e, t, s) {
3739
- return t === "Ho" ? s.ordinalNumber(e.getHours(), { unit: "hour" }) : ue.H(e, t);
3723
+ return t === "Ho" ? s.ordinalNumber(e.getHours(), { unit: "hour" }) : ce.H(e, t);
3740
3724
  },
3741
3725
  // Hour [0-11]
3742
3726
  K: function(e, t, s) {
@@ -3750,15 +3734,15 @@ const ue = {
3750
3734
  },
3751
3735
  // Minute
3752
3736
  m: function(e, t, s) {
3753
- return t === "mo" ? s.ordinalNumber(e.getMinutes(), { unit: "minute" }) : ue.m(e, t);
3737
+ return t === "mo" ? s.ordinalNumber(e.getMinutes(), { unit: "minute" }) : ce.m(e, t);
3754
3738
  },
3755
3739
  // Second
3756
3740
  s: function(e, t, s) {
3757
- return t === "so" ? s.ordinalNumber(e.getSeconds(), { unit: "second" }) : ue.s(e, t);
3741
+ return t === "so" ? s.ordinalNumber(e.getSeconds(), { unit: "second" }) : ce.s(e, t);
3758
3742
  },
3759
3743
  // Fraction of second
3760
3744
  S: function(e, t) {
3761
- return ue.S(e, t);
3745
+ return ce.S(e, t);
3762
3746
  },
3763
3747
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
3764
3748
  X: function(e, t, s) {
@@ -3768,7 +3752,7 @@ const ue = {
3768
3752
  switch (t) {
3769
3753
  // Hours and optional minutes
3770
3754
  case "X":
3771
- return qs(i);
3755
+ return Bs(i);
3772
3756
  // Hours, minutes and optional seconds without `:` delimiter
3773
3757
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
3774
3758
  // so this token always has the same output as `XX`
@@ -3791,7 +3775,7 @@ const ue = {
3791
3775
  switch (t) {
3792
3776
  // Hours and optional minutes
3793
3777
  case "x":
3794
- return qs(i);
3778
+ return Bs(i);
3795
3779
  // Hours, minutes and optional seconds without `:` delimiter
3796
3780
  // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
3797
3781
  // so this token always has the same output as `xx`
@@ -3816,7 +3800,7 @@ const ue = {
3816
3800
  case "O":
3817
3801
  case "OO":
3818
3802
  case "OOO":
3819
- return "GMT" + Bs(i, ":");
3803
+ return "GMT" + Ns(i, ":");
3820
3804
  // Long
3821
3805
  case "OOOO":
3822
3806
  default:
@@ -3831,7 +3815,7 @@ const ue = {
3831
3815
  case "z":
3832
3816
  case "zz":
3833
3817
  case "zzz":
3834
- return "GMT" + Bs(i, ":");
3818
+ return "GMT" + Ns(i, ":");
3835
3819
  // Long
3836
3820
  case "zzzz":
3837
3821
  default:
@@ -3848,18 +3832,18 @@ const ue = {
3848
3832
  return _(+e, t.length);
3849
3833
  }
3850
3834
  };
3851
- function Bs(e, t = "") {
3835
+ function Ns(e, t = "") {
3852
3836
  const s = e > 0 ? "-" : "+", i = Math.abs(e), r = Math.trunc(i / 60), n = i % 60;
3853
3837
  return n === 0 ? s + String(r) : s + String(r) + t + _(n, 2);
3854
3838
  }
3855
- function qs(e, t) {
3839
+ function Bs(e, t) {
3856
3840
  return e % 60 === 0 ? (e > 0 ? "-" : "+") + _(Math.abs(e) / 60, 2) : we(e, t);
3857
3841
  }
3858
3842
  function we(e, t = "") {
3859
3843
  const s = e > 0 ? "-" : "+", i = Math.abs(e), r = _(Math.trunc(i / 60), 2), n = _(i % 60, 2);
3860
3844
  return s + r + t + n;
3861
3845
  }
3862
- const Ls = (e, t) => {
3846
+ const qs = (e, t) => {
3863
3847
  switch (e) {
3864
3848
  case "P":
3865
3849
  return t.date({ width: "short" });
@@ -3871,7 +3855,7 @@ const Ls = (e, t) => {
3871
3855
  default:
3872
3856
  return t.date({ width: "full" });
3873
3857
  }
3874
- }, Zi = (e, t) => {
3858
+ }, Ji = (e, t) => {
3875
3859
  switch (e) {
3876
3860
  case "p":
3877
3861
  return t.time({ width: "short" });
@@ -3886,7 +3870,7 @@ const Ls = (e, t) => {
3886
3870
  }, vc = (e, t) => {
3887
3871
  const s = e.match(/(P+)(p+)?/) || [], i = s[1], r = s[2];
3888
3872
  if (!r)
3889
- return Ls(e, t);
3873
+ return qs(e, t);
3890
3874
  let n;
3891
3875
  switch (i) {
3892
3876
  case "P":
@@ -3903,15 +3887,15 @@ const Ls = (e, t) => {
3903
3887
  n = t.dateTime({ width: "full" });
3904
3888
  break;
3905
3889
  }
3906
- return n.replace("{{date}}", Ls(i, t)).replace("{{time}}", Zi(r, t));
3890
+ return n.replace("{{date}}", qs(i, t)).replace("{{time}}", Ji(r, t));
3907
3891
  }, Qt = {
3908
- p: Zi,
3892
+ p: Ji,
3909
3893
  P: vc
3910
3894
  }, bc = /^D+$/, wc = /^Y+$/, xc = ["D", "DD", "YY", "YYYY"];
3911
- function er(e) {
3895
+ function Zi(e) {
3912
3896
  return bc.test(e);
3913
3897
  }
3914
- function tr(e) {
3898
+ function er(e) {
3915
3899
  return wc.test(e);
3916
3900
  }
3917
3901
  function Ut(e, t, s) {
@@ -3923,9 +3907,9 @@ function _c(e, t, s) {
3923
3907
  return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${i} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
3924
3908
  }
3925
3909
  const Sc = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Cc = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Dc = /^'([^]*?)'?$/, Tc = /''/g, $c = /[a-zA-Z]/;
3926
- function sr(e, t, s) {
3927
- const i = ze(), r = i.locale ?? Xi, n = i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, o = i.weekStartsOn ?? i.locale?.options?.weekStartsOn ?? 0, a = M(e, s?.in);
3928
- if (!Ui(a))
3910
+ function tr(e, t, s) {
3911
+ const i = Ge(), r = i.locale ?? Ui, n = i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, o = i.weekStartsOn ?? i.locale?.options?.weekStartsOn ?? 0, a = P(e, s?.in);
3912
+ if (!Qi(a))
3929
3913
  throw new RangeError("Invalid time value");
3930
3914
  let l = t.match(Cc).map((c) => {
3931
3915
  const u = c[0];
@@ -3940,7 +3924,7 @@ function sr(e, t, s) {
3940
3924
  const u = c[0];
3941
3925
  if (u === "'")
3942
3926
  return { isToken: !1, value: Ic(c) };
3943
- if (Ns[u])
3927
+ if (Vs[u])
3944
3928
  return { isToken: !0, value: c };
3945
3929
  if (u.match($c))
3946
3930
  throw new RangeError(
@@ -3957,8 +3941,8 @@ function sr(e, t, s) {
3957
3941
  return l.map((c) => {
3958
3942
  if (!c.isToken) return c.value;
3959
3943
  const u = c.value;
3960
- (tr(u) || er(u)) && Ut(u, t, String(e));
3961
- const y = Ns[u[0]];
3944
+ (er(u) || Zi(u)) && Ut(u, t, String(e));
3945
+ const y = Vs[u[0]];
3962
3946
  return y(a, u, r.localize, d);
3963
3947
  }).join("");
3964
3948
  }
@@ -3967,14 +3951,14 @@ function Ic(e) {
3967
3951
  return t ? t[1].replace(Tc, "'") : e;
3968
3952
  }
3969
3953
  function Ec() {
3970
- return Object.assign({}, ze());
3954
+ return Object.assign({}, Ge());
3971
3955
  }
3972
3956
  function Fc(e, t) {
3973
- const s = M(e, t?.in).getDay();
3957
+ const s = P(e, t?.in).getDay();
3974
3958
  return s === 0 ? 7 : s;
3975
3959
  }
3976
3960
  function Oc(e, t) {
3977
- const s = Pc(t) ? new t(0) : A(t, 0);
3961
+ const s = Mc(t) ? new t(0) : A(t, 0);
3978
3962
  return s.setFullYear(e.getFullYear(), e.getMonth(), e.getDate()), s.setHours(
3979
3963
  e.getHours(),
3980
3964
  e.getMinutes(),
@@ -3982,17 +3966,17 @@ function Oc(e, t) {
3982
3966
  e.getMilliseconds()
3983
3967
  ), s;
3984
3968
  }
3985
- function Pc(e) {
3969
+ function Mc(e) {
3986
3970
  return typeof e == "function" && e.prototype?.constructor === e;
3987
3971
  }
3988
- const Mc = 10;
3989
- class ir {
3972
+ const Pc = 10;
3973
+ class sr {
3990
3974
  subPriority = 0;
3991
3975
  validate(t, s) {
3992
3976
  return !0;
3993
3977
  }
3994
3978
  }
3995
- class kc extends ir {
3979
+ class kc extends sr {
3996
3980
  constructor(t, s, i, r, n) {
3997
3981
  super(), this.value = t, this.validateValue = s, this.setValue = i, this.priority = r, n && (this.subPriority = n);
3998
3982
  }
@@ -4003,8 +3987,8 @@ class kc extends ir {
4003
3987
  return this.setValue(t, s, this.value, i);
4004
3988
  }
4005
3989
  }
4006
- class Ac extends ir {
4007
- priority = Mc;
3990
+ class Ac extends sr {
3991
+ priority = Pc;
4008
3992
  subPriority = -1;
4009
3993
  constructor(t, s) {
4010
3994
  super(), this.context = t || ((i) => A(s, i));
@@ -4127,7 +4111,7 @@ function ee(e, t) {
4127
4111
  rest: t.slice(s[0].length)
4128
4112
  };
4129
4113
  }
4130
- function rr(e) {
4114
+ function ir(e) {
4131
4115
  return T(E.anyDigitsSigned, e);
4132
4116
  }
4133
4117
  function I(e, t) {
@@ -4144,7 +4128,7 @@ function I(e, t) {
4144
4128
  return T(new RegExp("^\\d{1," + e + "}"), t);
4145
4129
  }
4146
4130
  }
4147
- function lt(e, t) {
4131
+ function ct(e, t) {
4148
4132
  switch (e) {
4149
4133
  case 1:
4150
4134
  return T(E.singleDigitSigned, t);
@@ -4158,7 +4142,7 @@ function lt(e, t) {
4158
4142
  return T(new RegExp("^-?\\d{1," + e + "}"), t);
4159
4143
  }
4160
4144
  }
4161
- function vs(e) {
4145
+ function ys(e) {
4162
4146
  switch (e) {
4163
4147
  case "morning":
4164
4148
  return 4;
@@ -4175,7 +4159,7 @@ function vs(e) {
4175
4159
  return 0;
4176
4160
  }
4177
4161
  }
4178
- function nr(e, t) {
4162
+ function rr(e, t) {
4179
4163
  const s = t > 0, i = s ? t : 1 - t;
4180
4164
  let r;
4181
4165
  if (i <= 50)
@@ -4186,7 +4170,7 @@ function nr(e, t) {
4186
4170
  }
4187
4171
  return s ? r : 1 - r;
4188
4172
  }
4189
- function or(e) {
4173
+ function nr(e) {
4190
4174
  return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
4191
4175
  }
4192
4176
  class Rc extends x {
@@ -4217,7 +4201,7 @@ class Rc extends x {
4217
4201
  set(t, s, i) {
4218
4202
  const r = t.getFullYear();
4219
4203
  if (i.isTwoDigitYear) {
4220
- const o = nr(
4204
+ const o = rr(
4221
4205
  i.year,
4222
4206
  r
4223
4207
  );
@@ -4252,9 +4236,9 @@ class zc extends x {
4252
4236
  return s.isTwoDigitYear || s.year > 0;
4253
4237
  }
4254
4238
  set(t, s, i, r) {
4255
- const n = ys(t, r);
4239
+ const n = gs(t, r);
4256
4240
  if (i.isTwoDigitYear) {
4257
- const a = nr(
4241
+ const a = rr(
4258
4242
  i.year,
4259
4243
  n
4260
4244
  );
@@ -4262,10 +4246,10 @@ class zc extends x {
4262
4246
  a,
4263
4247
  0,
4264
4248
  r.firstWeekContainsDate
4265
- ), t.setHours(0, 0, 0, 0), fe(t, r);
4249
+ ), t.setHours(0, 0, 0, 0), ue(t, r);
4266
4250
  }
4267
4251
  const o = !("era" in s) || s.era === 1 ? i.year : 1 - i.year;
4268
- return t.setFullYear(o, 0, r.firstWeekContainsDate), t.setHours(0, 0, 0, 0), fe(t, r);
4252
+ return t.setFullYear(o, 0, r.firstWeekContainsDate), t.setHours(0, 0, 0, 0), ue(t, r);
4269
4253
  }
4270
4254
  incompatibleTokens = [
4271
4255
  "y",
@@ -4286,11 +4270,11 @@ class zc extends x {
4286
4270
  class Gc extends x {
4287
4271
  priority = 130;
4288
4272
  parse(t, s) {
4289
- return lt(s === "R" ? 4 : s.length, t);
4273
+ return ct(s === "R" ? 4 : s.length, t);
4290
4274
  }
4291
4275
  set(t, s, i) {
4292
4276
  const r = A(t, 0);
4293
- return r.setFullYear(i, 0, 4), r.setHours(0, 0, 0, 0), ke(r);
4277
+ return r.setFullYear(i, 0, 4), r.setHours(0, 0, 0, 0), Ae(r);
4294
4278
  }
4295
4279
  incompatibleTokens = [
4296
4280
  "G",
@@ -4313,7 +4297,7 @@ class Gc extends x {
4313
4297
  class Vc extends x {
4314
4298
  priority = 130;
4315
4299
  parse(t, s) {
4316
- return lt(s === "u" ? 4 : s.length, t);
4300
+ return ct(s === "u" ? 4 : s.length, t);
4317
4301
  }
4318
4302
  set(t, s, i) {
4319
4303
  return t.setFullYear(i, 0, 1), t.setHours(0, 0, 0, 0), t;
@@ -4579,8 +4563,8 @@ class Lc extends x {
4579
4563
  ];
4580
4564
  }
4581
4565
  function Wc(e, t, s) {
4582
- const i = M(e, s?.in), r = Ji(i, s) - t;
4583
- return i.setDate(i.getDate() - r * 7), M(i, s?.in);
4566
+ const i = P(e, s?.in), r = Ki(i, s) - t;
4567
+ return i.setDate(i.getDate() - r * 7), P(i, s?.in);
4584
4568
  }
4585
4569
  class jc extends x {
4586
4570
  priority = 100;
@@ -4598,7 +4582,7 @@ class jc extends x {
4598
4582
  return s >= 1 && s <= 53;
4599
4583
  }
4600
4584
  set(t, s, i, r) {
4601
- return fe(Wc(t, i, r), r);
4585
+ return ue(Wc(t, i, r), r);
4602
4586
  }
4603
4587
  incompatibleTokens = [
4604
4588
  "y",
@@ -4617,7 +4601,7 @@ class jc extends x {
4617
4601
  ];
4618
4602
  }
4619
4603
  function Yc(e, t, s) {
4620
- const i = M(e, s?.in), r = Ki(i, s) - t;
4604
+ const i = P(e, s?.in), r = Xi(i, s) - t;
4621
4605
  return i.setDate(i.getDate() - r * 7), i;
4622
4606
  }
4623
4607
  class Qc extends x {
@@ -4636,7 +4620,7 @@ class Qc extends x {
4636
4620
  return s >= 1 && s <= 53;
4637
4621
  }
4638
4622
  set(t, s, i) {
4639
- return ke(Yc(t, i));
4623
+ return Ae(Yc(t, i));
4640
4624
  }
4641
4625
  incompatibleTokens = [
4642
4626
  "y",
@@ -4683,7 +4667,7 @@ class Kc extends x {
4683
4667
  }
4684
4668
  }
4685
4669
  validate(t, s) {
4686
- const i = t.getFullYear(), r = or(i), n = t.getMonth();
4670
+ const i = t.getFullYear(), r = nr(i), n = t.getMonth();
4687
4671
  return r ? s >= 1 && s <= Xc[n] : s >= 1 && s <= Uc[n];
4688
4672
  }
4689
4673
  set(t, s, i) {
@@ -4720,7 +4704,7 @@ class Jc extends x {
4720
4704
  }
4721
4705
  validate(t, s) {
4722
4706
  const i = t.getFullYear();
4723
- return or(i) ? s >= 1 && s <= 366 : s >= 1 && s <= 365;
4707
+ return nr(i) ? s >= 1 && s <= 366 : s >= 1 && s <= 365;
4724
4708
  }
4725
4709
  set(t, s, i) {
4726
4710
  return t.setMonth(0, i), t.setHours(0, 0, 0, 0), t;
@@ -4743,9 +4727,9 @@ class Jc extends x {
4743
4727
  "T"
4744
4728
  ];
4745
4729
  }
4746
- function bs(e, t, s) {
4747
- const i = ze(), r = s?.weekStartsOn ?? s?.locale?.options?.weekStartsOn ?? i.weekStartsOn ?? i.locale?.options?.weekStartsOn ?? 0, n = M(e, s?.in), o = n.getDay(), l = (t % 7 + 7) % 7, d = 7 - r, c = t < 0 || t > 6 ? t - (o + d) % 7 : (l + d) % 7 - (o + d) % 7;
4748
- return Yi(n, c, s);
4730
+ function vs(e, t, s) {
4731
+ const i = Ge(), r = s?.weekStartsOn ?? s?.locale?.options?.weekStartsOn ?? i.weekStartsOn ?? i.locale?.options?.weekStartsOn ?? 0, n = P(e, s?.in), o = n.getDay(), l = (t % 7 + 7) % 7, d = 7 - r, c = t < 0 || t > 6 ? t - (o + d) % 7 : (l + d) % 7 - (o + d) % 7;
4732
+ return ji(n, c, s);
4749
4733
  }
4750
4734
  class Zc extends x {
4751
4735
  priority = 90;
@@ -4781,7 +4765,7 @@ class Zc extends x {
4781
4765
  return s >= 0 && s <= 6;
4782
4766
  }
4783
4767
  set(t, s, i, r) {
4784
- return t = bs(t, i, r), t.setHours(0, 0, 0, 0), t;
4768
+ return t = vs(t, i, r), t.setHours(0, 0, 0, 0), t;
4785
4769
  }
4786
4770
  incompatibleTokens = ["D", "i", "e", "c", "t", "T"];
4787
4771
  }
@@ -4833,7 +4817,7 @@ class ed extends x {
4833
4817
  return s >= 0 && s <= 6;
4834
4818
  }
4835
4819
  set(t, s, i, r) {
4836
- return t = bs(t, i, r), t.setHours(0, 0, 0, 0), t;
4820
+ return t = vs(t, i, r), t.setHours(0, 0, 0, 0), t;
4837
4821
  }
4838
4822
  incompatibleTokens = [
4839
4823
  "y",
@@ -4901,7 +4885,7 @@ class td extends x {
4901
4885
  return s >= 0 && s <= 6;
4902
4886
  }
4903
4887
  set(t, s, i, r) {
4904
- return t = bs(t, i, r), t.setHours(0, 0, 0, 0), t;
4888
+ return t = vs(t, i, r), t.setHours(0, 0, 0, 0), t;
4905
4889
  }
4906
4890
  incompatibleTokens = [
4907
4891
  "y",
@@ -4922,8 +4906,8 @@ class td extends x {
4922
4906
  ];
4923
4907
  }
4924
4908
  function sd(e, t, s) {
4925
- const i = M(e, s?.in), r = Fc(i, s), n = t - r;
4926
- return Yi(i, n, s);
4909
+ const i = P(e, s?.in), r = Fc(i, s), n = t - r;
4910
+ return ji(i, n, s);
4927
4911
  }
4928
4912
  class id extends x {
4929
4913
  priority = 90;
@@ -5052,7 +5036,7 @@ class rd extends x {
5052
5036
  }
5053
5037
  }
5054
5038
  set(t, s, i) {
5055
- return t.setHours(vs(i), 0, 0, 0), t;
5039
+ return t.setHours(ys(i), 0, 0, 0), t;
5056
5040
  }
5057
5041
  incompatibleTokens = ["b", "B", "H", "k", "t", "T"];
5058
5042
  }
@@ -5090,7 +5074,7 @@ class nd extends x {
5090
5074
  }
5091
5075
  }
5092
5076
  set(t, s, i) {
5093
- return t.setHours(vs(i), 0, 0, 0), t;
5077
+ return t.setHours(ys(i), 0, 0, 0), t;
5094
5078
  }
5095
5079
  incompatibleTokens = ["a", "B", "H", "k", "t", "T"];
5096
5080
  }
@@ -5128,7 +5112,7 @@ class od extends x {
5128
5112
  }
5129
5113
  }
5130
5114
  set(t, s, i) {
5131
- return t.setHours(vs(i), 0, 0, 0), t;
5115
+ return t.setHours(ys(i), 0, 0, 0), t;
5132
5116
  }
5133
5117
  incompatibleTokens = ["a", "b", "t", "T"];
5134
5118
  }
@@ -5294,7 +5278,7 @@ class pd extends x {
5294
5278
  set(t, s, i) {
5295
5279
  return s.timestampIsSet ? t : A(
5296
5280
  t,
5297
- t.getTime() - ot(t) - i
5281
+ t.getTime() - at(t) - i
5298
5282
  );
5299
5283
  }
5300
5284
  incompatibleTokens = ["t", "T", "x"];
@@ -5328,7 +5312,7 @@ class md extends x {
5328
5312
  set(t, s, i) {
5329
5313
  return s.timestampIsSet ? t : A(
5330
5314
  t,
5331
- t.getTime() - ot(t) - i
5315
+ t.getTime() - at(t) - i
5332
5316
  );
5333
5317
  }
5334
5318
  incompatibleTokens = ["t", "T", "X"];
@@ -5336,7 +5320,7 @@ class md extends x {
5336
5320
  class gd extends x {
5337
5321
  priority = 40;
5338
5322
  parse(t) {
5339
- return rr(t);
5323
+ return ir(t);
5340
5324
  }
5341
5325
  set(t, s, i) {
5342
5326
  return [A(t, i * 1e3), { timestampIsSet: !0 }];
@@ -5346,7 +5330,7 @@ class gd extends x {
5346
5330
  class yd extends x {
5347
5331
  priority = 20;
5348
5332
  parse(t) {
5349
- return rr(t);
5333
+ return ir(t);
5350
5334
  }
5351
5335
  set(t, s, i) {
5352
5336
  return [A(t, i), { timestampIsSet: !0 }];
@@ -5387,7 +5371,7 @@ const vd = {
5387
5371
  T: new yd()
5388
5372
  }, bd = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, wd = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, xd = /^'([^]*?)'?$/, _d = /''/g, Sd = /\S/, Cd = /[a-zA-Z]/;
5389
5373
  function Dd(e, t, s, i) {
5390
- const r = () => A(s, NaN), n = Ec(), o = n.locale ?? Xi, a = n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, l = n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, d = {
5374
+ const r = () => A(s, NaN), n = Ec(), o = n.locale ?? Ui, a = n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, l = n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, d = {
5391
5375
  firstWeekContainsDate: a,
5392
5376
  weekStartsOn: l,
5393
5377
  locale: o
@@ -5400,7 +5384,7 @@ function Dd(e, t, s, i) {
5400
5384
  return p;
5401
5385
  }).join("").match(bd), y = [];
5402
5386
  for (let p of u) {
5403
- tr(p) && Ut(p, t, e), er(p) && Ut(p, t, e);
5387
+ er(p) && Ut(p, t, e), Zi(p) && Ut(p, t, e);
5404
5388
  const b = p[0], g = vd[b];
5405
5389
  if (g) {
5406
5390
  const { incompatibleTokens: w } = g;
@@ -5442,7 +5426,7 @@ function Dd(e, t, s, i) {
5442
5426
  const f = c.map((p) => p.priority).sort((p, b) => b - p).filter((p, b, g) => g.indexOf(p) === b).map(
5443
5427
  (p) => c.filter((b) => b.priority === p).sort((b, g) => g.subPriority - b.subPriority)
5444
5428
  ).map((p) => p[0]);
5445
- let m = M(s, i?.in);
5429
+ let m = P(s, i?.in);
5446
5430
  if (isNaN(+m)) return r();
5447
5431
  const D = {};
5448
5432
  for (const p of f) {
@@ -5456,59 +5440,59 @@ function Dd(e, t, s, i) {
5456
5440
  function Td(e) {
5457
5441
  return e.match(xd)[1].replace(_d, "'");
5458
5442
  }
5459
- const Ws = 88, $d = 64, Id = 44, Ed = (e) => {
5460
- if (!e) return Ws;
5443
+ const Ls = 88, $d = 64, Id = 44, Ed = (e) => {
5444
+ if (!e) return Ls;
5461
5445
  const t = e.items?.length ?? 0, s = e.subGroups ?? [], i = s.reduce((r, n) => r + (n.items?.length ?? 0), 0);
5462
- return Ws + (t + i) * $d + s.length * Id;
5446
+ return Ls + (t + i) * $d + s.length * Id;
5463
5447
  }, Fd = ":host{min-height:1px;display:flex;flex-direction:column;flex:1 1 0%}.virtual-container{height:100%;position:relative}.virtual-viewport{height:100%;overflow:auto;padding-inline:16px;overflow-anchor:none}.virtual-content{position:relative;width:100%}.virtual-items{position:relative}.container{min-height:1px;height:100%}.visit:first-child{margin-top:var(--dss-spacing-md)}.visit{width:calc(100% - var(--dss-spacing-md) - var(--dss-spacing-md));display:flex;flex-direction:column;gap:var(--dss-spacing-sm);background-color:#fff;border-radius:var(--dss-radius-sm);padding:var(--dss-spacing-sm);margin-bottom:var(--dss-spacing-md)}.visit .visit__header{display:flex;flex-direction:row;align-items:center;gap:16px}.visit .visit__header .title{flex:1;font-size:14px;line-height:24px;display:flex;flex-direction:row;gap:12px;color:var(--color-neutral-800)}.visit .visit__header .title-date{font-weight:700}.visit .visit__header .title-description{font-weight:600;display:flex;flex-direction:row;gap:4px}.visit .visit__header .highlight{background-color:#ff0;font-weight:700}.visit .visit__items{display:flex;flex-direction:column;gap:var(--dss-spacing-sm)}.visit .visit__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .visit__items .item[has-divider]:last-of-type{border:none}.visit .diagnostics{display:flex;flex-direction:column;gap:var(--dss-spacing-sm);border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .diagnostics:last-of-type{border:none}.visit .diagnostics .diagnostics__header{display:flex;flex-direction:row;align-items:center;gap:16px;flex-wrap:wrap}.visit .diagnostics .diagnostics__items{display:flex;flex-direction:column}.visit .diagnostics .diagnostics__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .diagnostics .diagnostics__items .item[has-divider]:last-of-type{border:none}.feedback{width:100%;height:100%;display:flex;align-items:center;justify-content:center}";
5464
5448
  /**
5465
5449
  * @license
5466
5450
  * Copyright 2017 Google LLC
5467
5451
  * SPDX-License-Identifier: BSD-3-Clause
5468
5452
  */
5469
- const Le = (e, t) => {
5453
+ const We = (e, t) => {
5470
5454
  const s = e._$AN;
5471
5455
  if (s === void 0) return !1;
5472
- for (const i of s) i._$AO?.(t, !1), Le(i, t);
5456
+ for (const i of s) i._$AO?.(t, !1), We(i, t);
5473
5457
  return !0;
5474
- }, ct = (e) => {
5458
+ }, dt = (e) => {
5475
5459
  let t, s;
5476
5460
  do {
5477
5461
  if ((t = e._$AM) === void 0) break;
5478
5462
  s = t._$AN, s.delete(e), e = t;
5479
5463
  } while (s?.size === 0);
5480
- }, ar = (e) => {
5464
+ }, or = (e) => {
5481
5465
  for (let t; t = e._$AM; e = t) {
5482
5466
  let s = t._$AN;
5483
5467
  if (s === void 0) t._$AN = s = /* @__PURE__ */ new Set();
5484
5468
  else if (s.has(e)) break;
5485
- s.add(e), Md(t);
5469
+ s.add(e), Pd(t);
5486
5470
  }
5487
5471
  };
5488
5472
  function Od(e) {
5489
- this._$AN !== void 0 ? (ct(this), this._$AM = e, ar(this)) : this._$AM = e;
5473
+ this._$AN !== void 0 ? (dt(this), this._$AM = e, or(this)) : this._$AM = e;
5490
5474
  }
5491
- function Pd(e, t = !1, s = 0) {
5475
+ function Md(e, t = !1, s = 0) {
5492
5476
  const i = this._$AH, r = this._$AN;
5493
- if (r !== void 0 && r.size !== 0) if (t) if (Array.isArray(i)) for (let n = s; n < i.length; n++) Le(i[n], !1), ct(i[n]);
5494
- else i != null && (Le(i, !1), ct(i));
5495
- else Le(this, e);
5477
+ if (r !== void 0 && r.size !== 0) if (t) if (Array.isArray(i)) for (let n = s; n < i.length; n++) We(i[n], !1), dt(i[n]);
5478
+ else i != null && (We(i, !1), dt(i));
5479
+ else We(this, e);
5496
5480
  }
5497
- const Md = (e) => {
5498
- e.type == Pr.CHILD && (e._$AP ??= Pd, e._$AQ ??= Od);
5481
+ const Pd = (e) => {
5482
+ e.type == Or.CHILD && (e._$AP ??= Md, e._$AQ ??= Od);
5499
5483
  };
5500
- class kd extends Fr {
5484
+ class kd extends Er {
5501
5485
  constructor() {
5502
5486
  super(...arguments), this._$AN = void 0;
5503
5487
  }
5504
5488
  _$AT(t, s, i) {
5505
- super._$AT(t, s, i), ar(this), this.isConnected = t._$AU;
5489
+ super._$AT(t, s, i), or(this), this.isConnected = t._$AU;
5506
5490
  }
5507
5491
  _$AO(t, s = !0) {
5508
- t !== this.isConnected && (this.isConnected = t, t ? this.reconnected?.() : this.disconnected?.()), s && (Le(this, t), ct(this));
5492
+ t !== this.isConnected && (this.isConnected = t, t ? this.reconnected?.() : this.disconnected?.()), s && (We(this, t), dt(this));
5509
5493
  }
5510
5494
  setValue(t) {
5511
- if (Or(this.t)) this.t._$AI(t, this);
5495
+ if (Fr(this.t)) this.t._$AI(t, this);
5512
5496
  else {
5513
5497
  const s = [...this.t._$AH];
5514
5498
  s[this.i] = t, this.t._$AI(s, this, 0);
@@ -5519,23 +5503,23 @@ class kd extends Fr {
5519
5503
  reconnected() {
5520
5504
  }
5521
5505
  }
5522
- const Mt = /* @__PURE__ */ new WeakMap(), lr = Mr(class extends kd {
5506
+ const Pt = /* @__PURE__ */ new WeakMap(), ar = Mr(class extends kd {
5523
5507
  render(e) {
5524
- return P;
5508
+ return M;
5525
5509
  }
5526
5510
  update(e, [t]) {
5527
5511
  const s = t !== this.Y;
5528
- return s && this.Y !== void 0 && this.rt(void 0), (s || this.lt !== this.ct) && (this.Y = t, this.ht = e.options?.host, this.rt(this.ct = e.element)), P;
5512
+ return s && this.Y !== void 0 && this.rt(void 0), (s || this.lt !== this.ct) && (this.Y = t, this.ht = e.options?.host, this.rt(this.ct = e.element)), M;
5529
5513
  }
5530
5514
  rt(e) {
5531
5515
  if (this.isConnected || (e = void 0), typeof this.Y == "function") {
5532
5516
  const t = this.ht ?? globalThis;
5533
- let s = Mt.get(t);
5534
- s === void 0 && (s = /* @__PURE__ */ new WeakMap(), Mt.set(t, s)), s.get(this.Y) !== void 0 && this.Y.call(this.ht, void 0), s.set(this.Y, e), e !== void 0 && this.Y.call(this.ht, e);
5517
+ let s = Pt.get(t);
5518
+ s === void 0 && (s = /* @__PURE__ */ new WeakMap(), Pt.set(t, s)), s.get(this.Y) !== void 0 && this.Y.call(this.ht, void 0), s.set(this.Y, e), e !== void 0 && this.Y.call(this.ht, e);
5535
5519
  } else this.Y.value = e;
5536
5520
  }
5537
5521
  get lt() {
5538
- return typeof this.Y == "function" ? Mt.get(this.ht ?? globalThis)?.get(this.Y) : this.Y?.value;
5522
+ return typeof this.Y == "function" ? Pt.get(this.ht ?? globalThis)?.get(this.Y) : this.Y?.value;
5539
5523
  }
5540
5524
  disconnected() {
5541
5525
  this.lt === this.ct && this.rt(void 0);
@@ -5565,13 +5549,13 @@ Xt.styles = L`
5565
5549
  Xt = zd([
5566
5550
  j("activity-history-is-grouping-busy")
5567
5551
  ], Xt);
5568
- function cr(e) {
5552
+ function lr(e) {
5569
5553
  return !e.professional?.speciality?.description;
5570
5554
  }
5571
5555
  const Kt = (e, t) => {
5572
5556
  const s = t.findIndex((i) => i.id === e.id);
5573
5557
  return s === -1 ? !1 : s === t.length - 1 ? !0 : !e.diagnostics?.length;
5574
- }, dr = (e) => {
5558
+ }, cr = (e) => {
5575
5559
  const t = e?.items.map((i) => ({
5576
5560
  type: "item",
5577
5561
  date: new Date(i.date),
@@ -5592,18 +5576,18 @@ const Kt = (e, t) => {
5592
5576
  <div class="virtual-viewport" @scroll=${e._onScroll}>
5593
5577
  <div class="virtual-content" style="height: ${e._totalHeight}px;">
5594
5578
  <div class="virtual-items" style="transform: translateY(${e._containerOffset}px)">
5595
- ${ae(
5579
+ ${oe(
5596
5580
  e._visibleRows,
5597
5581
  (t) => t.group?.items?.[0]?.id || t.group?.subGroups?.[0]?.items?.[0]?.id,
5598
5582
  ({ index: t, group: s }) => h`
5599
5583
  <div class="visit"
5600
5584
  data-index=${t}
5601
- ${lr(e._measureElement)}
5602
- data-date=${Js(s?.items[0]?.date || s?.subGroups[0]?.items[0]?.date)}>
5585
+ ${ar(e._measureElement)}
5586
+ data-date=${Ks(s?.items[0]?.date || s?.subGroups[0]?.items[0]?.date)}>
5603
5587
  ${Nd(e, s?.items[0] || s?.subGroups[0]?.items[0], s)}
5604
5588
  <div class="visit__items">
5605
- ${ae(
5606
- dr(s),
5589
+ ${oe(
5590
+ cr(s),
5607
5591
  (i) => i.type === "item" ? i.item.id : i.subGroup.id,
5608
5592
  (i) => {
5609
5593
  if (i.type === "item") {
@@ -5622,7 +5606,7 @@ const Kt = (e, t) => {
5622
5606
  <div class="diagnostics">
5623
5607
  ${Ld(r?.items[0])}
5624
5608
  <div class="diagnostics__items">
5625
- ${ae(
5609
+ ${oe(
5626
5610
  r?.items,
5627
5611
  (n) => n.id,
5628
5612
  (n) => h`
@@ -5659,11 +5643,11 @@ ${e.searchString?.length > 1 ? h`
5659
5643
  status="empty"
5660
5644
  title=${v("noData.title")}
5661
5645
  description=${v("noData.description")}>
5662
- </dss-user-feedback>` : P}`, Nd = (e, t, s) => t ? h`
5646
+ </dss-user-feedback>` : M}`, Nd = (e, t, s) => t ? h`
5663
5647
  <div class="visit__header">
5664
5648
  <div class="title">
5665
5649
  <div class="title-date">
5666
- <div>${sr(new Date(t.date), "dd/MM/yyyy")}</div>
5650
+ <div>${tr(new Date(t.date), "dd/MM/yyyy")}</div>
5667
5651
  </div>
5668
5652
  <div class="title-description">
5669
5653
  <div>
@@ -5672,7 +5656,7 @@ ${e.searchString?.length > 1 ? h`
5672
5656
  </div>
5673
5657
  </div>
5674
5658
  </div>
5675
- ` : P, Bd = (e) => {
5659
+ ` : M, Bd = (e) => {
5676
5660
  if (e) {
5677
5661
  for (const t of e.items || [])
5678
5662
  if (t.service?.id) return t.service;
@@ -5681,8 +5665,8 @@ ${e.searchString?.length > 1 ? h`
5681
5665
  if (s.service?.id) return s.service;
5682
5666
  }
5683
5667
  }, qd = (e, t, s) => {
5684
- if (!t.professional) return P;
5685
- const i = cr(t), r = [];
5668
+ if (!t.professional) return M;
5669
+ const i = lr(t), r = [];
5686
5670
  r.push(e.highlighted(t.professional.name)), i && t.professional?.role?.description && r.push(e.highlighted(t.professional.role.description)), t.professional?.speciality?.description && r.push(e.highlighted(t.professional.speciality.description)), t.up?.description && r.push(e.highlighted(t.up.description));
5687
5671
  const n = t.service?.description ? t.service : Bd(s);
5688
5672
  return n?.description && r.push(e.highlighted(n.description)), r.map((o, a) => h`${o}${a < r.length - 1 ? " | " : ""}`);
@@ -5693,7 +5677,7 @@ ${e.searchString?.length > 1 ? h`
5693
5677
  )}
5694
5678
  </div>
5695
5679
  `;
5696
- function Ie(e, t, s) {
5680
+ function Ee(e, t, s) {
5697
5681
  let i = s.initialDeps ?? [], r, n = !0;
5698
5682
  function o() {
5699
5683
  var a, l, d;
@@ -5728,7 +5712,7 @@ function Ie(e, t, s) {
5728
5712
  i = a;
5729
5713
  }, o;
5730
5714
  }
5731
- function js(e, t) {
5715
+ function Ws(e, t) {
5732
5716
  if (e === void 0)
5733
5717
  throw new Error("Unexpected undefined");
5734
5718
  return e;
@@ -5738,7 +5722,7 @@ const Wd = (e, t) => Math.abs(e - t) < 1.01, jd = (e, t, s) => {
5738
5722
  return function(...r) {
5739
5723
  e.clearTimeout(i), i = e.setTimeout(() => t.apply(this, r), s);
5740
5724
  };
5741
- }, Ys = (e) => {
5725
+ }, js = (e) => {
5742
5726
  const { offsetWidth: t, offsetHeight: s } = e;
5743
5727
  return { width: t, height: s };
5744
5728
  }, Yd = (e) => e, Qd = (e) => {
@@ -5757,7 +5741,7 @@ const Wd = (e, t) => Math.abs(e - t) < 1.01, jd = (e, t, s) => {
5757
5741
  const { width: a, height: l } = o;
5758
5742
  t({ width: Math.round(a), height: Math.round(l) });
5759
5743
  };
5760
- if (r(Ys(s)), !i.ResizeObserver)
5744
+ if (r(js(s)), !i.ResizeObserver)
5761
5745
  return () => {
5762
5746
  };
5763
5747
  const n = new i.ResizeObserver((o) => {
@@ -5770,16 +5754,16 @@ const Wd = (e, t) => Math.abs(e - t) < 1.01, jd = (e, t, s) => {
5770
5754
  return;
5771
5755
  }
5772
5756
  }
5773
- r(Ys(s));
5757
+ r(js(s));
5774
5758
  };
5775
5759
  e.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(a) : a();
5776
5760
  });
5777
5761
  return n.observe(s, { box: "border-box" }), () => {
5778
5762
  n.unobserve(s);
5779
5763
  };
5780
- }, Qs = {
5764
+ }, Ys = {
5781
5765
  passive: !0
5782
- }, Us = typeof window > "u" ? !0 : "onscrollend" in window, Xd = (e, t) => {
5766
+ }, Qs = typeof window > "u" ? !0 : "onscrollend" in window, Xd = (e, t) => {
5783
5767
  const s = e.scrollElement;
5784
5768
  if (!s)
5785
5769
  return;
@@ -5787,7 +5771,7 @@ const Wd = (e, t) => Math.abs(e - t) < 1.01, jd = (e, t, s) => {
5787
5771
  if (!i)
5788
5772
  return;
5789
5773
  let r = 0;
5790
- const n = e.options.useScrollendEvent && Us ? () => {
5774
+ const n = e.options.useScrollendEvent && Qs ? () => {
5791
5775
  } : jd(
5792
5776
  i,
5793
5777
  () => {
@@ -5798,9 +5782,9 @@ const Wd = (e, t) => Math.abs(e - t) < 1.01, jd = (e, t, s) => {
5798
5782
  const { horizontal: u, isRtl: y } = e.options;
5799
5783
  r = u ? s.scrollLeft * (y && -1 || 1) : s.scrollTop, n(), t(r, c);
5800
5784
  }, a = o(!0), l = o(!1);
5801
- s.addEventListener("scroll", a, Qs);
5802
- const d = e.options.useScrollendEvent && Us;
5803
- return d && s.addEventListener("scrollend", l, Qs), () => {
5785
+ s.addEventListener("scroll", a, Ys);
5786
+ const d = e.options.useScrollendEvent && Qs;
5787
+ return d && s.addEventListener("scrollend", l, Ys), () => {
5804
5788
  s.removeEventListener("scroll", a), d && s.removeEventListener("scrollend", l);
5805
5789
  };
5806
5790
  }, Kd = (e, t, s) => {
@@ -5894,7 +5878,7 @@ class Zd {
5894
5878
  }, this.notify = (s) => {
5895
5879
  var i, r;
5896
5880
  (r = (i = this.options).onChange) == null || r.call(i, this, s);
5897
- }, this.maybeNotify = Ie(
5881
+ }, this.maybeNotify = Ee(
5898
5882
  () => (this.calculateRange(), [
5899
5883
  this.isScrolling,
5900
5884
  this.range ? this.range.startIndex : null,
@@ -5952,7 +5936,7 @@ class Zd {
5952
5936
  break;
5953
5937
  }
5954
5938
  return n.size === this.options.lanes ? Array.from(n.values()).sort((o, a) => o.end === a.end ? o.index - a.index : o.end - a.end)[0] : void 0;
5955
- }, this.getMeasurementOptions = Ie(
5939
+ }, this.getMeasurementOptions = Ee(
5956
5940
  () => [
5957
5941
  this.options.count,
5958
5942
  this.options.paddingStart,
@@ -5974,7 +5958,7 @@ class Zd {
5974
5958
  {
5975
5959
  key: !1
5976
5960
  }
5977
- ), this.getMeasurements = Ie(
5961
+ ), this.getMeasurements = Ee(
5978
5962
  () => [this.getMeasurementOptions(), this.itemSizeCache],
5979
5963
  ({
5980
5964
  count: s,
@@ -6030,7 +6014,7 @@ class Zd {
6030
6014
  key: !1,
6031
6015
  debug: () => this.options.debug
6032
6016
  }
6033
- ), this.calculateRange = Ie(
6017
+ ), this.calculateRange = Ee(
6034
6018
  () => [
6035
6019
  this.getMeasurements(),
6036
6020
  this.getSize(),
@@ -6047,7 +6031,7 @@ class Zd {
6047
6031
  key: !1,
6048
6032
  debug: () => this.options.debug
6049
6033
  }
6050
- ), this.getVirtualIndexes = Ie(
6034
+ ), this.getVirtualIndexes = Ee(
6051
6035
  () => {
6052
6036
  let s = null, i = null;
6053
6037
  const r = this.calculateRange();
@@ -6108,7 +6092,7 @@ class Zd {
6108
6092
  adjustments: this.scrollAdjustments += a,
6109
6093
  behavior: void 0
6110
6094
  }), this.pendingMeasuredCacheIndexes.push(n.index), this.itemSizeCache = new Map(this.itemSizeCache.set(n.key, i)), this.notify(!1));
6111
- }, this.getVirtualItems = Ie(
6095
+ }, this.getVirtualItems = Ee(
6112
6096
  () => [this.getVirtualIndexes(), this.getMeasurements()],
6113
6097
  (s, i) => {
6114
6098
  const r = [];
@@ -6125,11 +6109,11 @@ class Zd {
6125
6109
  ), this.getVirtualItemForOffset = (s) => {
6126
6110
  const i = this.getMeasurements();
6127
6111
  if (i.length !== 0)
6128
- return js(
6129
- i[ur(
6112
+ return Ws(
6113
+ i[dr(
6130
6114
  0,
6131
6115
  i.length - 1,
6132
- (r) => js(i[r]).start,
6116
+ (r) => Ws(i[r]).start,
6133
6117
  s
6134
6118
  )]
6135
6119
  );
@@ -6261,7 +6245,7 @@ class Zd {
6261
6245
  this.scheduleScrollReconcile();
6262
6246
  }
6263
6247
  }
6264
- const ur = (e, t, s, i) => {
6248
+ const dr = (e, t, s, i) => {
6265
6249
  for (; e <= t; ) {
6266
6250
  const r = (e + t) / 2 | 0, n = s(r);
6267
6251
  if (n < i)
@@ -6285,7 +6269,7 @@ function eu({
6285
6269
  startIndex: 0,
6286
6270
  endIndex: r
6287
6271
  };
6288
- let o = ur(
6272
+ let o = dr(
6289
6273
  0,
6290
6274
  r,
6291
6275
  n,
@@ -6313,7 +6297,7 @@ const tu = (e) => {
6313
6297
  const t = e.getBoundingClientRect().height, s = window.getComputedStyle(e), i = Number.parseFloat(s.marginTop) || 0, r = Number.parseFloat(s.marginBottom) || 0;
6314
6298
  return Math.round(t + i + r);
6315
6299
  };
6316
- class hr {
6300
+ class ur {
6317
6301
  constructor(t) {
6318
6302
  this._lastVisibleState = { virtualItems: [], totalHeight: 0 }, this._savedScrollTop = 0, this._viewportWasHidden = !1, this._options = t;
6319
6303
  }
@@ -6392,7 +6376,7 @@ class hr {
6392
6376
  }), this._lastVisibleState;
6393
6377
  }
6394
6378
  }
6395
- var su = Object.defineProperty, iu = Object.getOwnPropertyDescriptor, oe = (e, t, s, i) => {
6379
+ var su = Object.defineProperty, iu = Object.getOwnPropertyDescriptor, ne = (e, t, s, i) => {
6396
6380
  for (var r = i > 1 ? void 0 : i ? iu(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6397
6381
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
6398
6382
  return i && r && su(t, s, r), r;
@@ -6446,7 +6430,7 @@ let Q = class extends W {
6446
6430
  return e.replace(s, '<span class="highlight">$1</span>');
6447
6431
  }
6448
6432
  highlighted(e) {
6449
- return e ? kr(this.highlightMatch(e, this.searchString)) : null;
6433
+ return e ? Pr(this.highlightMatch(e, this.searchString)) : null;
6450
6434
  }
6451
6435
  // Public API: scroll the timeline to a given date ("Anar a data").
6452
6436
  //
@@ -6462,7 +6446,7 @@ let Q = class extends W {
6462
6446
  if (!this._virtualScroller || !this._viewport) return;
6463
6447
  const t = this.historyGroups ?? [];
6464
6448
  if (!t.length) return;
6465
- const s = at(e).getTime(), i = (n) => at(jt(n)).getTime();
6449
+ const s = lt(e).getTime(), i = (n) => lt(Wt(n)).getTime();
6466
6450
  let r = t.findIndex((n) => i(n) <= s);
6467
6451
  r === -1 && (r = t.length - 1), this._viewport.scrollTop = this._virtualScroller.getOffsetForIndex(r), this._alignGroupTop(r, 0);
6468
6452
  }
@@ -6485,7 +6469,7 @@ let Q = class extends W {
6485
6469
  }
6486
6470
  // === VIRTUAL SCROLLER LOGIC ===
6487
6471
  _setupVirtualScroller() {
6488
- !this._viewport || this._virtualScroller || (this._virtualScroller = new hr({
6472
+ !this._viewport || this._virtualScroller || (this._virtualScroller = new ur({
6489
6473
  items: this.historyGroups || [],
6490
6474
  overscan: 8,
6491
6475
  estimateItemHeight: (e) => Ed(this.historyGroups?.[e])
@@ -6518,78 +6502,78 @@ let Q = class extends W {
6518
6502
  Q.styles = L`
6519
6503
  ${q(Fd)}
6520
6504
  `;
6521
- oe([
6522
- S(fs)
6505
+ ne([
6506
+ S(hs)
6523
6507
  ], Q.prototype, "historyGroups", 2);
6524
- oe([
6508
+ ne([
6525
6509
  S(_t)
6526
6510
  ], Q.prototype, "isSomeCollectionLoadedAndOtherLoading", 2);
6527
- oe([
6511
+ ne([
6528
6512
  S(xt)
6529
6513
  ], Q.prototype, "isAnyCollectionBusy", 2);
6530
- oe([
6514
+ ne([
6531
6515
  S(Dt)
6532
6516
  ], Q.prototype, "searchString", 2);
6533
- oe([
6534
- De(z.primaryApi)
6517
+ ne([
6518
+ De(V.primaryApi)
6535
6519
  ], Q.prototype, "api", 2);
6536
- oe([
6520
+ ne([
6537
6521
  Jt(".virtual-container")
6538
6522
  ], Q.prototype, "_virtualContainer", 2);
6539
- oe([
6523
+ ne([
6540
6524
  Jt(".virtual-viewport")
6541
6525
  ], Q.prototype, "_viewport", 2);
6542
- oe([
6543
- re()
6526
+ ne([
6527
+ ie()
6544
6528
  ], Q.prototype, "_virtualScrollerState", 2);
6545
- oe([
6546
- re()
6529
+ ne([
6530
+ ie()
6547
6531
  ], Q.prototype, "_canShowNoDataMessage", 2);
6548
- Q = oe([
6532
+ Q = ne([
6549
6533
  j("activity-history-timeline")
6550
6534
  ], Q);
6551
6535
  const ru = (e) => {
6552
6536
  const t = e.areCustomFiltersActive || e.areCommonFiltersActive || e.areDiagnosticFiltersActive || e.areGlobalFiltersActive;
6553
- return !t && e.searchString.length < 1 ? P : h`
6537
+ return !t && e.searchString.length < 1 ? M : h`
6554
6538
  <div class="active-filters-header">
6555
6539
  ${kt(t, () => h`<active-filters-badges></active-filters-badges>`)}
6556
6540
  ${kt(e.searchString.length > 1, () => h`<activity-history-search-results searchQuery=${e.searchString}></activity-history-search-results>`)}
6557
6541
  </div>
6558
6542
  `;
6559
6543
  }, nu = ".active-filters-header{display:flex;flex-direction:column;border-width:0px 0px 1px 0px;border-style:solid;border-color:#d8d8d8;background-color:#fff;padding:var(--dss-spacing-sm) var(--dss-spacing-md);gap:var(--dss-spacing-xs);font-size:14px;line-height:24px}";
6560
- var ou = Object.defineProperty, au = Object.getOwnPropertyDescriptor, Ge = (e, t, s, i) => {
6544
+ var ou = Object.defineProperty, au = Object.getOwnPropertyDescriptor, Ve = (e, t, s, i) => {
6561
6545
  for (var r = i > 1 ? void 0 : i ? au(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6562
6546
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
6563
6547
  return i && r && ou(t, s, r), r;
6564
6548
  };
6565
- let pe = class extends W {
6549
+ let he = class extends W {
6566
6550
  render() {
6567
6551
  return h`${ru(this)}`;
6568
6552
  }
6569
6553
  };
6570
- pe.styles = L`
6554
+ he.styles = L`
6571
6555
  ${q(nu)}
6572
6556
  `;
6573
- Ge([
6557
+ Ve([
6574
6558
  S(Dt)
6575
- ], pe.prototype, "searchString", 2);
6576
- Ge([
6559
+ ], he.prototype, "searchString", 2);
6560
+ Ve([
6577
6561
  S(ya)
6578
- ], pe.prototype, "areCustomFiltersActive", 2);
6579
- Ge([
6562
+ ], he.prototype, "areCustomFiltersActive", 2);
6563
+ Ve([
6580
6564
  S(ma)
6581
- ], pe.prototype, "areCommonFiltersActive", 2);
6582
- Ge([
6565
+ ], he.prototype, "areCommonFiltersActive", 2);
6566
+ Ve([
6583
6567
  S(va)
6584
- ], pe.prototype, "areDiagnosticFiltersActive", 2);
6585
- Ge([
6568
+ ], he.prototype, "areDiagnosticFiltersActive", 2);
6569
+ Ve([
6586
6570
  S(Ta)
6587
- ], pe.prototype, "areGlobalFiltersActive", 2);
6588
- pe = Ge([
6571
+ ], he.prototype, "areGlobalFiltersActive", 2);
6572
+ he = Ve([
6589
6573
  j("active-filters-header")
6590
- ], pe);
6574
+ ], he);
6591
6575
  const lu = ":host{width:100%}.container{display:flex;align-items:center;flex-direction:column;height:100%;justify-content:center}", cu = (e) => h`
6592
- ${e.isAllDataFailedToLoad ? du(e) : P}
6576
+ ${e.isAllDataFailedToLoad ? du(e) : M}
6593
6577
  `, du = (e) => h`
6594
6578
  <div class="container">
6595
6579
  <dss-user-feedback status="error" variant="default" size="lg" title=${v("error.title")} description=${v("error.general.title")} hasdetails="" detailslabel=${v("error.viewDetails")}>
@@ -6599,16 +6583,16 @@ const lu = ":host{width:100%}.container{display:flex;align-items:center;flex-dir
6599
6583
  <dss-button @onClick=${e.handleClickFeedback} label=${v("error.general.refresh")} size="lg"></dss-button>
6600
6584
  </dss-user-feedback>
6601
6585
  </div>
6602
- `, fr = (e) => e.activityHistoryCollections.error.length > 0, uu = (e) => {
6586
+ `, hr = (e) => e.activityHistoryCollections.error.length > 0, uu = (e) => {
6603
6587
  const t = e.activityHistoryCollections.collections;
6604
6588
  return Object.values(t).every((s) => !s.items || s.items.length === 0);
6605
- }, hu = (e) => !_t(e) && fr(e) && uu(e), pr = (e) => e.activityHistoryCollections.error;
6589
+ }, hu = (e) => !_t(e) && hr(e) && uu(e), fr = (e) => e.activityHistoryCollections.error;
6606
6590
  var fu = Object.defineProperty, pu = Object.getOwnPropertyDescriptor, $t = (e, t, s, i) => {
6607
6591
  for (var r = i > 1 ? void 0 : i ? pu(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6608
6592
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
6609
6593
  return i && r && fu(t, s, r), r;
6610
6594
  };
6611
- let Ae = class extends W {
6595
+ let He = class extends W {
6612
6596
  constructor() {
6613
6597
  super(...arguments), this.errorMessages = [];
6614
6598
  }
@@ -6616,28 +6600,28 @@ let Ae = class extends W {
6616
6600
  return h`${cu(this)}`;
6617
6601
  }
6618
6602
  handleClickFeedback() {
6619
- this.api.broker.send(new os(this.errorMessages));
6603
+ this.api.broker.send(new ns(this.errorMessages));
6620
6604
  }
6621
6605
  };
6622
- Ae.styles = L`
6606
+ He.styles = L`
6623
6607
  ${q(lu)}
6624
6608
  `;
6625
6609
  $t([
6626
6610
  S(hu)
6627
- ], Ae.prototype, "isAllDataFailedToLoad", 2);
6611
+ ], He.prototype, "isAllDataFailedToLoad", 2);
6628
6612
  $t([
6629
- S(pr)
6630
- ], Ae.prototype, "errorMessages", 2);
6613
+ S(fr)
6614
+ ], He.prototype, "errorMessages", 2);
6631
6615
  $t([
6632
- De(z.primaryApi)
6633
- ], Ae.prototype, "api", 2);
6634
- Ae = $t([
6616
+ De(V.primaryApi)
6617
+ ], He.prototype, "api", 2);
6618
+ He = $t([
6635
6619
  j("activity-history-full-data-error")
6636
- ], Ae);
6620
+ ], He);
6637
6621
  const mu = ":host{width:100%}.container{display:flex;align-items:center;flex-direction:column;padding-top:16px;padding-inline:16px}", gu = (e) => {
6638
6622
  const t = e.getCombinedMessage();
6639
6623
  return h`
6640
- ${e.isErrorOccurred ? yu(e, t) : P}
6624
+ ${e.isErrorOccurred ? yu(e, t) : M}
6641
6625
  `;
6642
6626
  }, yu = (e, t) => h`
6643
6627
  <div class="container">
@@ -6649,7 +6633,7 @@ var vu = Object.defineProperty, bu = Object.getOwnPropertyDescriptor, It = (e, t
6649
6633
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
6650
6634
  return i && r && vu(t, s, r), r;
6651
6635
  };
6652
- let He = class extends W {
6636
+ let Re = class extends W {
6653
6637
  constructor() {
6654
6638
  super(...arguments), this.errorMessages = [];
6655
6639
  }
@@ -6657,43 +6641,43 @@ let He = class extends W {
6657
6641
  return h`${gu(this)}`;
6658
6642
  }
6659
6643
  handleClickAlert() {
6660
- this.api.broker.send(new os(this.errorMessages));
6644
+ this.api.broker.send(new ns(this.errorMessages));
6661
6645
  }
6662
6646
  getCombinedMessage() {
6663
6647
  const e = v("error.partial.title"), t = this.errorMessages.length > 0 ? this.errorMessages.map((s) => s.entityDescription) : [];
6664
6648
  return t.length > 0 ? `${e} ${t[0]}${t.length > 1 ? ` i ${t.slice(1).join(" i ")}` : ""}` : e;
6665
6649
  }
6666
6650
  };
6667
- He.styles = L`
6651
+ Re.styles = L`
6668
6652
  ${q(mu)}
6669
6653
  `;
6670
6654
  It([
6671
- S(fr)
6672
- ], He.prototype, "isErrorOccurred", 2);
6655
+ S(hr)
6656
+ ], Re.prototype, "isErrorOccurred", 2);
6673
6657
  It([
6674
- S(pr)
6675
- ], He.prototype, "errorMessages", 2);
6658
+ S(fr)
6659
+ ], Re.prototype, "errorMessages", 2);
6676
6660
  It([
6677
- De(z.primaryApi)
6678
- ], He.prototype, "api", 2);
6679
- He = It([
6661
+ De(V.primaryApi)
6662
+ ], Re.prototype, "api", 2);
6663
+ Re = It([
6680
6664
  j("activity-history-partial-data-error")
6681
- ], He);
6682
- const { clearActivityHistoryCollections: wu } = ge.actions;
6683
- class xu extends te {
6665
+ ], Re);
6666
+ const { clearActivityHistoryCollections: wu } = pe.actions;
6667
+ class xu extends me {
6684
6668
  async handle() {
6685
- this.store.dispatch(ne.actions.clearCustomFilters()), this.store.dispatch(wu()), this.api.broker.publish(this.api.broker.events.activityHistory.refreshDataRequested);
6669
+ this.store.dispatch(re.actions.clearCustomFilters()), this.store.dispatch(wu()), this.api.broker.publish(this.api.broker.events.activityHistory.refreshDataRequested);
6686
6670
  }
6687
6671
  }
6688
- class mr {
6672
+ class pr {
6689
6673
  }
6690
- let gr;
6674
+ let mr;
6691
6675
  const _u = (e) => {
6692
- Su(), gr = e.registerRequest(mr, xu);
6676
+ Su(), mr = e.registerRequest(pr, xu);
6693
6677
  }, Su = () => {
6694
- gr?.dispose();
6695
- }, { removeActivityHistoryItem: Cu } = ge.actions;
6696
- class Du extends de {
6678
+ mr?.dispose();
6679
+ }, { removeActivityHistoryItem: Cu } = pe.actions;
6680
+ class Du extends Te {
6697
6681
  async handle(t) {
6698
6682
  try {
6699
6683
  this.store.dispatch(
@@ -6707,13 +6691,13 @@ class Du extends de {
6707
6691
  }
6708
6692
  }
6709
6693
  }
6710
- let yr;
6694
+ let gr;
6711
6695
  const Tu = (e) => {
6712
- yr = e.registerRequest("remove_history_item_request", Du);
6696
+ gr = e.registerRequest("remove_history_item_request", Du);
6713
6697
  }, $u = () => {
6714
- yr?.dispose();
6715
- }, { setSearchString: Iu } = ne.actions;
6716
- class Eu extends te {
6698
+ gr?.dispose();
6699
+ }, { setSearchString: Iu } = re.actions;
6700
+ class Eu extends me {
6717
6701
  async handle(t) {
6718
6702
  try {
6719
6703
  this.store.dispatch(Iu(t.searchString)), setTimeout(() => {
@@ -6726,7 +6710,7 @@ class Eu extends te {
6726
6710
  }
6727
6711
  }
6728
6712
  }
6729
- class dt {
6713
+ class ut {
6730
6714
  constructor(t) {
6731
6715
  this.searchString = t, this.searchString = t;
6732
6716
  }
@@ -6734,12 +6718,12 @@ class dt {
6734
6718
  const Fu = ".search-header{color:var(--color-neutral-900);font-weight:600}", Ou = (e) => h`<div class="search-header">
6735
6719
  ${v("searchBarResults")} “${e.searchQuery}”
6736
6720
  </div>`;
6737
- var Pu = Object.defineProperty, Mu = Object.getOwnPropertyDescriptor, vr = (e, t, s, i) => {
6738
- for (var r = i > 1 ? void 0 : i ? Mu(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6721
+ var Mu = Object.defineProperty, Pu = Object.getOwnPropertyDescriptor, yr = (e, t, s, i) => {
6722
+ for (var r = i > 1 ? void 0 : i ? Pu(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6739
6723
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
6740
- return i && r && Pu(t, s, r), r;
6724
+ return i && r && Mu(t, s, r), r;
6741
6725
  };
6742
- let ut = class extends W {
6726
+ let ht = class extends W {
6743
6727
  constructor() {
6744
6728
  super(...arguments), this.searchQuery = "";
6745
6729
  }
@@ -6747,25 +6731,25 @@ let ut = class extends W {
6747
6731
  return h`${Ou(this)}`;
6748
6732
  }
6749
6733
  };
6750
- ut.styles = L`
6734
+ ht.styles = L`
6751
6735
  ${q(Fu)}
6752
6736
  `;
6753
- vr([
6737
+ yr([
6754
6738
  K()
6755
- ], ut.prototype, "searchQuery", 2);
6756
- ut = vr([
6739
+ ], ht.prototype, "searchQuery", 2);
6740
+ ht = yr([
6757
6741
  j("activity-history-search-results")
6758
- ], ut);
6742
+ ], ht);
6759
6743
  const ku = ".search-header{padding-inline:16px;padding-top:12px;padding-bottom:12px;gap:var(--dss-spacing-xs);border-width:0px 0px 1px 0px;border-style:solid;border-color:#d8d8d8;background-color:#fff;color:var(--color-neutral-900);font-weight:600;font-size:14px;line-height:24px}", Au = (e) => h`<dss-search-bar dropdownStyle=${"display: none"} @onSearchChange=${e._handleSearchChange} icon="search" inputsize="md" threshold="2" recentsearchestext="" emptydropdowntext="">
6760
6744
  <label slot="label" for="searchbar1" aria-hidden="false"></label>
6761
6745
  <input slot="input" id="searchbar1" type="text" value=${e.searchQuery} @input=${(t) => e._handleSearchChange({ detail: [t.target.value] })}>
6762
6746
  </dss-search-bar>`;
6763
- var Hu = Object.defineProperty, Ru = Object.getOwnPropertyDescriptor, br = (e, t, s, i) => {
6747
+ var Hu = Object.defineProperty, Ru = Object.getOwnPropertyDescriptor, vr = (e, t, s, i) => {
6764
6748
  for (var r = i > 1 ? void 0 : i ? Ru(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6765
6749
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
6766
6750
  return i && r && Hu(t, s, r), r;
6767
6751
  };
6768
- let ht = class extends W {
6752
+ let ft = class extends W {
6769
6753
  constructor() {
6770
6754
  super(...arguments), this.searchQuery = "";
6771
6755
  }
@@ -6777,15 +6761,15 @@ let ht = class extends W {
6777
6761
  this.dispatchEvent(new CustomEvent("onSearchChange", { detail: i }));
6778
6762
  }
6779
6763
  };
6780
- ht.styles = L`
6764
+ ft.styles = L`
6781
6765
  ${q(ku)}
6782
6766
  `;
6783
- br([
6767
+ vr([
6784
6768
  K()
6785
- ], ht.prototype, "searchQuery", 2);
6786
- ht = br([
6769
+ ], ft.prototype, "searchQuery", 2);
6770
+ ft = vr([
6787
6771
  j("activity-history-search-bar")
6788
- ], ht);
6772
+ ], ft);
6789
6773
  const zu = ":host{display:flex;justify-content:space-between}.filters-container{display:flex;gap:var(--dss-spacing-md)}.filters-header{font-weight:700}.filter-groups{display:flex;flex-wrap:wrap;gap:var(--dss-spacing-xs)}.filter-group{display:flex;gap:var(--dss-spacing-xs);color:var(--color-neutral-600);font-weight:600}.clean-filters{display:flex}.clean-filters .separator{padding:0 8px}.popover-content{box-sizing:border-box;display:flex;flex-wrap:wrap;gap:var(--dss-spacing-xs);padding:10px;max-width:368px;max-height:336px;overflow:auto}", Gu = (e) => {
6790
6774
  const t = new Set(e.enabledValues), s = e.groups.filter(
6791
6775
  (r) => r.values.length > 0 && r.values.every((n) => t.has(n.value))
@@ -6794,7 +6778,7 @@ const zu = ":host{display:flex;justify-content:space-between}.filters-container{
6794
6778
  groups: s,
6795
6779
  options: e.values.filter((r) => t.has(r.value) && !i.has(r.value))
6796
6780
  };
6797
- }, Vu = (e, t) => e === "" ? Nu(t) : e, Nu = (e) => `${v("chipHeader.without")} ${e.toLowerCase()}`, Xe = 5, Xs = (e, t, s, i) => h`
6781
+ }, Vu = (e, t) => e === "" ? Nu(t) : e, Nu = (e) => `${v("chipHeader.without")} ${e.toLowerCase()}`, Je = 5, Us = (e, t, s, i) => h`
6798
6782
  <dss-chip
6799
6783
  label=${Vu(s.title, t.title)}
6800
6784
  size="sm"
@@ -6839,8 +6823,8 @@ const zu = ":host{display:flex;justify-content:space-between}.filters-container{
6839
6823
  @click=${() => s._onDeleteGlobalFilterGroup(e, t.id)}
6840
6824
  @onDelete=${() => s._onDeleteGlobalFilterGroup(e, t.id)}
6841
6825
  ></dss-chip>
6842
- `, Ee = (e) => h`<div class="filter-title">${`${e}:`}</div>`, ju = (e) => {
6843
- if (!(e.enabledCommonFilters.length > 0 || (e.diagnosticFilterEnabled?.enabledValues?.length ?? 0) > 0 || e.activeGlobalFilters.length > 0 || e.customFilterGroups.some(vt))) return P;
6826
+ `, Fe = (e) => h`<div class="filter-title">${`${e}:`}</div>`, ju = (e) => {
6827
+ if (!(e.enabledCommonFilters.length > 0 || (e.diagnosticFilterEnabled?.enabledValues?.length ?? 0) > 0 || e.activeGlobalFilters.length > 0 || e.customFilterGroups.some(vt))) return M;
6844
6828
  let s = 0;
6845
6829
  const i = [], r = [], n = [], o = e.diagnosticFilterEnabled;
6846
6830
  if (o) {
@@ -6849,7 +6833,7 @@ const zu = ":host{display:flex;justify-content:space-between}.filters-container{
6849
6833
  let d = !1, c = !1;
6850
6834
  for (const u of l) {
6851
6835
  const y = qu(u.codi, u.descripcio, e);
6852
- s < Xe ? (d || (i.push(Ee(a)), d = !0), i.push(y), s++) : (c || (r.push(Ee(a)), c = !0), r.push(y), n.push(y));
6836
+ s < Je ? (d || (i.push(Fe(a)), d = !0), i.push(y), s++) : (c || (r.push(Fe(a)), c = !0), r.push(y), n.push(y));
6853
6837
  }
6854
6838
  }
6855
6839
  }
@@ -6860,25 +6844,25 @@ const zu = ":host{display:flex;justify-content:space-between}.filters-container{
6860
6844
  ];
6861
6845
  let y = !1, f = !1;
6862
6846
  for (const m of u)
6863
- s < Xe ? (y || (i.push(Ee(d)), y = !0), i.push(m), s++) : (f || (r.push(Ee(d)), f = !0), r.push(m), n.push(m));
6847
+ s < Je ? (y || (i.push(Fe(d)), y = !0), i.push(m), s++) : (f || (r.push(Fe(d)), f = !0), r.push(m), n.push(m));
6864
6848
  }
6865
6849
  for (const a of e.enabledCommonFilters) {
6866
6850
  const l = Bu(a, e);
6867
- s < Xe ? (i.push(l), s++) : (r.push(l), n.push(l));
6851
+ s < Je ? (i.push(l), s++) : (r.push(l), n.push(l));
6868
6852
  }
6869
6853
  for (const { title: a, id: l, filters: d } of e.customFilterGroups) {
6870
6854
  let c = !1, u = !1;
6871
6855
  const y = (f) => {
6872
- s < Xe ? (c || (i.push(Ee(a)), c = !0), i.push(f), s++) : (u || (r.push(Ee(a)), u = !0), r.push(f), n.push(f));
6856
+ s < Je ? (c || (i.push(Fe(a)), c = !0), i.push(f), s++) : (u || (r.push(Fe(a)), u = !0), r.push(f), n.push(f));
6873
6857
  };
6874
6858
  for (const f of d) {
6875
6859
  if (Ce(f)) {
6876
- f.enabled && y(Xs(l, f, { id: null, title: f.title }, e));
6860
+ f.enabled && y(Us(l, f, { id: null, title: f.title }, e));
6877
6861
  continue;
6878
6862
  }
6879
6863
  for (const m of new Set(f.enabledValues ?? [])) {
6880
6864
  const D = f.options.find((p) => p.id === m);
6881
- y(Xs(l, f, { id: m, title: D?.title || m }, e));
6865
+ y(Us(l, f, { id: m, title: D?.title || m }, e));
6882
6866
  }
6883
6867
  }
6884
6868
  }
@@ -6898,7 +6882,7 @@ const zu = ":host{display:flex;justify-content:space-between}.filters-container{
6898
6882
  </dss-popover-body>
6899
6883
  </dss-popover>
6900
6884
  </div>
6901
- ` : P}
6885
+ ` : M}
6902
6886
  </div>
6903
6887
  </div>
6904
6888
  <div class="clean-filters">
@@ -6907,18 +6891,18 @@ const zu = ":host{display:flex;justify-content:space-between}.filters-container{
6907
6891
  </div>
6908
6892
  `;
6909
6893
  };
6910
- var Yu = Object.defineProperty, Qu = Object.getOwnPropertyDescriptor, Ve = (e, t, s, i) => {
6894
+ var Yu = Object.defineProperty, Qu = Object.getOwnPropertyDescriptor, Ne = (e, t, s, i) => {
6911
6895
  for (var r = i > 1 ? void 0 : i ? Qu(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6912
6896
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
6913
6897
  return i && r && Yu(t, s, r), r;
6914
6898
  };
6915
- let me = class extends W {
6899
+ let fe = class extends W {
6916
6900
  render() {
6917
6901
  return h`${ju(this)}`;
6918
6902
  }
6919
6903
  _onDeleteFilterValue(e, t, s, i) {
6920
6904
  this.api.broker.send(
6921
- new ms({
6905
+ new ps({
6922
6906
  filterGroupId: e,
6923
6907
  filterId: t,
6924
6908
  optionId: s,
@@ -6927,10 +6911,10 @@ let me = class extends W {
6927
6911
  );
6928
6912
  }
6929
6913
  _onDeleteCommonFilterValue(e) {
6930
- this.api.broker.send(new ps({ id: e, enabled: !1 }));
6914
+ this.api.broker.send(new fs({ id: e, enabled: !1 }));
6931
6915
  }
6932
6916
  _onDeleteDiagnosticFilterValue(e) {
6933
- this.api.broker.send(new Gi({ diagnosticCodi: e }));
6917
+ this.api.broker.send(new zi({ diagnosticCodi: e }));
6934
6918
  }
6935
6919
  _onDeleteGlobalFilterGroup(e, t) {
6936
6920
  const s = this.activeGlobalFilters.find((r) => r.id === e)?.groups.find((r) => r.id === t);
@@ -6943,43 +6927,43 @@ let me = class extends W {
6943
6927
  }
6944
6928
  _setGlobalFilterValues(e, t) {
6945
6929
  const s = this.activeGlobalFilters.find((i) => i.id === e);
6946
- s && this.api.broker.send(new gs({ id: e, values: t(s) }));
6930
+ s && this.api.broker.send(new ms({ id: e, values: t(s) }));
6947
6931
  }
6948
6932
  resetFilters() {
6949
6933
  this.api.broker.send(new qi());
6950
6934
  }
6951
6935
  };
6952
- me.styles = L`
6936
+ fe.styles = L`
6953
6937
  ${q(zu)}
6954
6938
  `;
6955
- Ve([
6956
- De(z.primaryApi)
6957
- ], me.prototype, "api", 2);
6958
- Ve([
6959
- S(Fi)
6960
- ], me.prototype, "enabledCommonFilters", 2);
6961
- Ve([
6939
+ Ne([
6940
+ De(V.primaryApi)
6941
+ ], fe.prototype, "api", 2);
6942
+ Ne([
6943
+ S(Ei)
6944
+ ], fe.prototype, "enabledCommonFilters", 2);
6945
+ Ne([
6962
6946
  S(Mi)
6963
- ], me.prototype, "customFilterGroups", 2);
6964
- Ve([
6965
- S(Oi)
6966
- ], me.prototype, "diagnosticFilterEnabled", 2);
6967
- Ve([
6968
- S(hs)
6969
- ], me.prototype, "activeGlobalFilters", 2);
6970
- me = Ve([
6947
+ ], fe.prototype, "customFilterGroups", 2);
6948
+ Ne([
6949
+ S(Fi)
6950
+ ], fe.prototype, "diagnosticFilterEnabled", 2);
6951
+ Ne([
6952
+ S(us)
6953
+ ], fe.prototype, "activeGlobalFilters", 2);
6954
+ fe = Ne([
6971
6955
  j("active-filters-badges")
6972
- ], me);
6973
- let wr;
6956
+ ], fe);
6957
+ let br;
6974
6958
  const Uu = (e) => {
6975
- wr = e.registerRequest(dt, Eu);
6959
+ br = e.registerRequest(ut, Eu);
6976
6960
  }, Xu = () => {
6977
- wr?.dispose();
6978
- }, { updateActivityHistoryItem: Ku } = ge.actions;
6979
- class Ju extends de {
6961
+ br?.dispose();
6962
+ }, { updateActivityHistoryItem: Ku } = pe.actions;
6963
+ class Ju extends Te {
6980
6964
  async handle(t) {
6981
6965
  try {
6982
- wi([t.item]), this.store.dispatch(
6966
+ bi([t.item]), this.store.dispatch(
6983
6967
  Ku({
6984
6968
  id: t.entityId,
6985
6969
  item: t.item
@@ -6990,17 +6974,17 @@ class Ju extends de {
6990
6974
  }
6991
6975
  }
6992
6976
  }
6993
- let xr;
6977
+ let wr;
6994
6978
  const Zu = (e) => {
6995
- xr = e.registerRequest("update_history_item_request", Ju);
6979
+ wr = e.registerRequest("update_history_item_request", Ju);
6996
6980
  }, eh = () => {
6997
- xr?.dispose();
6981
+ wr?.dispose();
6998
6982
  };
6999
6983
  let U;
7000
6984
  const th = (e) => {
7001
6985
  U = Rr(e, Se), po(U, e), Co(U, e), Io(U, e), Ho(U), _u(U), Zu(U), Bo(U), Tl(U, e), Uu(U), Tu(U);
7002
6986
  }, sh = () => {
7003
- mo(), Do(), Eo(), Di(), eh(), qo(), $l(), Xu(), $u();
6987
+ mo(), Do(), Eo(), Ci(), eh(), qo(), $l(), Xu(), $u();
7004
6988
  }, ih = "activity-history", rh = async (e) => {
7005
6989
  const t = (s) => Promise.all(
7006
6990
  s.map(async (i) => ({
@@ -7020,7 +7004,7 @@ const th = (e) => {
7020
7004
  )
7021
7005
  }))
7022
7006
  );
7023
- }, _r = {
7007
+ }, xr = {
7024
7008
  virtualItems: [],
7025
7009
  totalHeight: 0
7026
7010
  };
@@ -7028,10 +7012,10 @@ class nh {
7028
7012
  /** Setup or update the scroller with the current items. No-op until the
7029
7013
  * viewport and content elements exist. Detects viewport swaps and re-setups. */
7030
7014
  sync({ viewport: t, items: s, onStateChange: i, estimateItemHeight: r }) {
7031
- return t ? (this._scroller && t !== this._lastViewport && this.teardown(), this._scroller ? this._scroller.updateItems(s, i) : (this._scroller = new hr({
7015
+ return t ? (this._scroller && t !== this._lastViewport && this.teardown(), this._scroller ? this._scroller.updateItems(s, i) : (this._scroller = new ur({
7032
7016
  items: s,
7033
7017
  estimateItemHeight: r
7034
- }), this._cleanup = this._scroller.setup(t, i)), this._lastViewport = t, this._scroller.getState()) : this._scroller?.getState() ?? _r;
7018
+ }), this._cleanup = this._scroller.setup(t, i)), this._lastViewport = t, this._scroller.getState()) : this._scroller?.getState() ?? xr;
7035
7019
  }
7036
7020
  teardown() {
7037
7021
  this._cleanup?.(), this._cleanup = void 0, this._scroller = void 0, this._lastViewport = void 0;
@@ -7054,14 +7038,14 @@ const oh = (e) => {
7054
7038
  }, dh = (e) => {
7055
7039
  const t = e.items?.[0] || e.subGroups?.[0]?.items?.[0];
7056
7040
  return ah(t);
7057
- }, Sr = (e, t) => ({
7041
+ }, _r = (e, t) => ({
7058
7042
  ...e,
7059
7043
  items: (e.items || []).filter(t),
7060
7044
  subGroups: (e.subGroups || []).map((s) => ({ ...s, items: s.items.filter(t) })).filter((s) => s.items.length > 0)
7061
- }), uh = (e, t) => Sr(e, (s) => lh(s, t)), Ks = (e) => e.items.length > 0 || e.subGroups.length > 0, hh = (e, { todayOnly: t, selectedDiagnosticCodes: s }, i = {}) => {
7062
- const r = e.map((a) => Sr(a, (l) => ch(l, i))).filter(Ks), n = t, o = s.length > 0;
7063
- return !n && !o ? r : r.map((a) => n && dh(a) ? a : o ? uh(a, s) : null).filter((a) => a !== null && Ks(a));
7064
- }, Fe = (e) => {
7045
+ }), uh = (e, t) => _r(e, (s) => lh(s, t)), Xs = (e) => e.items.length > 0 || e.subGroups.length > 0, hh = (e, { todayOnly: t, selectedDiagnosticCodes: s }, i = {}) => {
7046
+ const r = e.map((a) => _r(a, (l) => ch(l, i))).filter(Xs), n = t, o = s.length > 0;
7047
+ return !n && !o ? r : r.map((a) => n && dh(a) ? a : o ? uh(a, s) : null).filter((a) => a !== null && Xs(a));
7048
+ }, Oe = (e) => {
7065
7049
  const t = [];
7066
7050
  for (const s of e) {
7067
7051
  for (const i of s.items || []) t.push(i);
@@ -7069,11 +7053,11 @@ const oh = (e) => {
7069
7053
  for (const r of i.items) t.push(r);
7070
7054
  }
7071
7055
  return t;
7072
- }, fh = ":host{display:block;height:100%;width:100%}.importer{display:flex;flex-direction:column;gap:12px;height:100%;min-height:0;overflow:hidden}.importer__header{display:flex;align-items:center;justify-content:space-between;gap:8px}.importer__search{display:block}.importer__filters{display:flex;flex-wrap:wrap;align-items:center;gap:16px;padding-bottom:8px;border-bottom:1px solid var(--color-neutral-200)}.importer__filters-label{color:var(--color-neutral-700);font-size:13px}.importer__empty{color:var(--color-neutral-600);font-size:13px;padding:24px 0;text-align:center}.virtual-container{flex:1;min-height:0;position:relative}.virtual-viewport{height:100%;overflow:auto}.virtual-content{position:relative;width:100%}.virtual-items{position:relative}.visit:first-child{margin-top:var(--dss-spacing-xs)}.visit{display:flex;flex-direction:column;gap:var(--dss-spacing-sm);background-color:#fff;padding:var(--dss-spacing-sm);margin-bottom:var(--dss-spacing-xs);border-bottom:2px solid var(--color-neutral-300)}.visit:last-child{border-bottom:none}.visit__items,.diagnostics{padding-left:var(--dss-spacing-md)}.visit__header{display:flex;flex-direction:row;align-items:center;gap:16px}.visit__header .title{flex:1;font-size:14px;line-height:24px;display:flex;flex-direction:row;gap:12px;color:var(--color-neutral-800)}.visit__header .title-date{font-weight:700}.visit__header .title-description{font-weight:600;display:flex;flex-direction:row;gap:4px}.visit__items{display:flex;flex-direction:column;gap:var(--dss-spacing-sm)}.visit__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit__items .item[has-divider]:last-of-type{border:none}.diagnostics{display:flex;flex-direction:column;gap:var(--dss-spacing-sm);border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.diagnostics:last-of-type{border:none}.diagnostics__header{display:flex;flex-direction:row;align-items:center;gap:16px;flex-wrap:wrap}.diagnostics__items{display:flex;flex-direction:column}.diagnostics__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.diagnostics__items .item[has-divider]:last-of-type{border:none}.item{display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:start}.item__check{margin-top:4px}", ws = (e) => ({
7056
+ }, fh = ":host{display:block;height:100%;width:100%}.importer{display:flex;flex-direction:column;gap:12px;height:100%;min-height:0;overflow:hidden}.importer__header{display:flex;align-items:center;justify-content:space-between;gap:8px}.importer__search{display:block}.importer__filters{display:flex;flex-wrap:wrap;align-items:center;gap:16px;padding-bottom:8px;border-bottom:1px solid var(--color-neutral-200)}.importer__filters-label{color:var(--color-neutral-700);font-size:13px}.importer__empty{color:var(--color-neutral-600);font-size:13px;padding:24px 0;text-align:center}.virtual-container{flex:1;min-height:0;position:relative}.virtual-viewport{height:100%;overflow:auto}.virtual-content{position:relative;width:100%}.virtual-items{position:relative}.visit:first-child{margin-top:var(--dss-spacing-xs)}.visit{display:flex;flex-direction:column;gap:var(--dss-spacing-sm);background-color:#fff;padding:var(--dss-spacing-sm);margin-bottom:var(--dss-spacing-xs);border-bottom:2px solid var(--color-neutral-300)}.visit:last-child{border-bottom:none}.visit__items,.diagnostics{padding-left:var(--dss-spacing-md)}.visit__header{display:flex;flex-direction:row;align-items:center;gap:16px}.visit__header .title{flex:1;font-size:14px;line-height:24px;display:flex;flex-direction:row;gap:12px;color:var(--color-neutral-800)}.visit__header .title-date{font-weight:700}.visit__header .title-description{font-weight:600;display:flex;flex-direction:row;gap:4px}.visit__items{display:flex;flex-direction:column;gap:var(--dss-spacing-sm)}.visit__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit__items .item[has-divider]:last-of-type{border:none}.diagnostics{display:flex;flex-direction:column;gap:var(--dss-spacing-sm);border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.diagnostics:last-of-type{border:none}.diagnostics__header{display:flex;flex-direction:row;align-items:center;gap:16px;flex-wrap:wrap}.diagnostics__items{display:flex;flex-direction:column}.diagnostics__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.diagnostics__items .item[has-divider]:last-of-type{border:none}.item{display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:start}.item__check{margin-top:4px}", bs = (e) => ({
7073
7057
  checked: e === "all",
7074
7058
  indeterminate: e === "some"
7075
7059
  }), ph = (e) => {
7076
- const t = ws(e.allState());
7060
+ const t = bs(e.allState());
7077
7061
  return h`
7078
7062
  <div class="importer">
7079
7063
  ${mh(e)} ${gh(e)} ${yh(e, t)} ${vh(e)}
@@ -7119,14 +7103,14 @@ const oh = (e) => {
7119
7103
  .elements=${e.diagnosticsOptions()}
7120
7104
  @value-changed=${(s) => e._onDiagnosticsChanged(s)}
7121
7105
  ></dss-form-select>
7122
- ` : P}
7106
+ ` : M}
7123
7107
  </div>
7124
7108
  `, vh = (e) => e.filteredGroups?.length ? h`
7125
7109
  <div class="virtual-container">
7126
7110
  <div class="virtual-viewport">
7127
7111
  <div class="virtual-content" style="height: ${e._totalHeight}px;">
7128
7112
  <div class="virtual-items" style="transform: translateY(${e._containerOffset}px)">
7129
- ${ae(
7113
+ ${oe(
7130
7114
  e._visibleRows,
7131
7115
  (t) => t.group.idGroup,
7132
7116
  (t) => bh(e, t.group, t.index)
@@ -7136,9 +7120,9 @@ const oh = (e) => {
7136
7120
  </div>
7137
7121
  </div>
7138
7122
  ` : h`<div class="importer__empty">${v("importer.noResults")}</div>`, bh = (e, t, s) => {
7139
- const i = t.items?.[0] || t.subGroups?.[0]?.items?.[0], r = ws(e.visitState(t));
7123
+ const i = t.items?.[0] || t.subGroups?.[0]?.items?.[0], r = bs(e.visitState(t));
7140
7124
  return h`
7141
- <div class="visit" data-index=${s} ${lr(e._measureElement)} data-date=${Js(i?.date)}>
7125
+ <div class="visit" data-index=${s} ${ar(e._measureElement)} data-date=${Ks(i?.date)}>
7142
7126
  <div class="visit__header">
7143
7127
  <dss-form-checkbox
7144
7128
  .checked=${r.checked}
@@ -7149,21 +7133,21 @@ const oh = (e) => {
7149
7133
  ${wh(i)}
7150
7134
  </div>
7151
7135
  <div class="visit__items">
7152
- ${ae(
7153
- dr(t),
7136
+ ${oe(
7137
+ cr(t),
7154
7138
  (n) => n.type === "item" ? n.item.id : n.subGroup.idSubGroup,
7155
- (n) => n.type === "item" ? Cr(e, n.item, t.items) : xh(e, n.subGroup)
7139
+ (n) => n.type === "item" ? Sr(e, n.item, t.items) : xh(e, n.subGroup)
7156
7140
  )}
7157
7141
  </div>
7158
7142
  </div>
7159
7143
  `;
7160
7144
  }, wh = (e) => {
7161
- if (!e) return P;
7162
- const t = cr(e), s = [];
7145
+ if (!e) return M;
7146
+ const t = lr(e), s = [];
7163
7147
  return e.professional?.name && s.push(e.professional.name), t && e.professional?.role?.description && s.push(e.professional.role.description), e.professional?.speciality?.description && s.push(e.professional.speciality.description), e.up?.description && s.push(e.up.description), e.service?.description && s.push(e.service.description), h`
7164
7148
  <div class="title">
7165
7149
  <div class="title-date">
7166
- <div>${sr(new Date(e.date), "dd/MM/yyyy")}</div>
7150
+ <div>${tr(new Date(e.date), "dd/MM/yyyy")}</div>
7167
7151
  </div>
7168
7152
  <div class="title-description">
7169
7153
  <div>${s.map((i, r) => h`${i}${r < s.length - 1 ? " | " : ""}`)}</div>
@@ -7171,7 +7155,7 @@ const oh = (e) => {
7171
7155
  </div>
7172
7156
  `;
7173
7157
  }, xh = (e, t) => {
7174
- const s = ws(e.subGroupState(t.items));
7158
+ const s = bs(e.subGroupState(t.items));
7175
7159
  return h`
7176
7160
  <div class="diagnostics">
7177
7161
  <div class="diagnostics__header">
@@ -7184,15 +7168,15 @@ const oh = (e) => {
7184
7168
  ${_h(t.items?.[0])}
7185
7169
  </div>
7186
7170
  <div class="diagnostics__items">
7187
- ${ae(
7171
+ ${oe(
7188
7172
  t.items,
7189
7173
  (i) => i.id,
7190
- (i) => Cr(e, i, t.items)
7174
+ (i) => Sr(e, i, t.items)
7191
7175
  )}
7192
7176
  </div>
7193
7177
  </div>
7194
7178
  `;
7195
- }, Cr = (e, t, s) => h`
7179
+ }, Sr = (e, t, s) => h`
7196
7180
  <div class="item" ?has-divider=${Kt(t, s)}>
7197
7181
  <dss-form-checkbox
7198
7182
  class="item__check"
@@ -7225,9 +7209,9 @@ const Dh = (e) => {
7225
7209
 
7226
7210
  `), html: s.join("") };
7227
7211
  };
7228
- let G = class extends W {
7212
+ let z = class extends W {
7229
7213
  constructor() {
7230
- super(...arguments), this.historyGroups = [], this.searchString = "", this.rulesByCollectionId = {}, this.todayOnly = !1, this.selectedDiagnosticCodes = [], this.availableDiagnostics = [], this.filteredGroups = [], this.totalCount = 0, this.selectedIds = [], this._virtualScrollerState = _r, this._scrollerController = new nh(), this._searchTimeout = null, this._didInitialPreselect = !1, this._measureElement = (e) => {
7214
+ super(...arguments), this.historyGroups = [], this.searchString = "", this.rulesByCollectionId = {}, this.todayOnly = !1, this.selectedDiagnosticCodes = [], this.availableDiagnostics = [], this.filteredGroups = [], this.totalCount = 0, this.selectedIds = [], this._virtualScrollerState = xr, this._scrollerController = new nh(), this._searchTimeout = null, this._didInitialPreselect = !1, this._measureElement = (e) => {
7231
7215
  e && this._scrollerController.measureElement(e);
7232
7216
  };
7233
7217
  }
@@ -7241,7 +7225,7 @@ let G = class extends W {
7241
7225
  this.availableDiagnostics = e?.diagnostics ?? [];
7242
7226
  }
7243
7227
  disconnectedCallback() {
7244
- super.disconnectedCallback(), this._scrollerController.teardown(), this._clearSearchTimeout(), this.api.broker.send(new dt(""));
7228
+ super.disconnectedCallback(), this._scrollerController.teardown(), this._clearSearchTimeout(), this.api.broker.send(new ut(""));
7245
7229
  }
7246
7230
  updated(e) {
7247
7231
  super.updated(e), (e.has("historyGroups") || e.has("todayOnly") || e.has("selectedDiagnosticCodes")) && this._recomputeFiltered(), !this._didInitialPreselect && this.historyGroups?.length && (this._didInitialPreselect = !0, this._preselectMatchingItems()), e.has("filteredGroups") && this._syncVirtualScroller(), e.has("selectedIds") && this._publishSelection();
@@ -7249,7 +7233,7 @@ let G = class extends W {
7249
7233
  // ── Event handlers ──────────────────────────────────────────────────────
7250
7234
  _onSearchChange(e) {
7251
7235
  typeof e.detail == "string" && (this._clearSearchTimeout(), this._searchTimeout = window.setTimeout(() => {
7252
- this.api.broker.send(new dt(e.detail));
7236
+ this.api.broker.send(new ut(e.detail));
7253
7237
  }, 300));
7254
7238
  }
7255
7239
  _onToggleToday(e) {
@@ -7264,7 +7248,7 @@ let G = class extends W {
7264
7248
  }
7265
7249
  _toggleVisit(e, t) {
7266
7250
  this._setSelection(
7267
- Fe([e]).map((s) => s.id),
7251
+ Oe([e]).map((s) => s.id),
7268
7252
  t
7269
7253
  );
7270
7254
  }
@@ -7276,7 +7260,7 @@ let G = class extends W {
7276
7260
  }
7277
7261
  _toggleAll(e) {
7278
7262
  this._setSelection(
7279
- Fe(this.filteredGroups).map((t) => t.id),
7263
+ Oe(this.filteredGroups).map((t) => t.id),
7280
7264
  e.target.checked
7281
7265
  );
7282
7266
  }
@@ -7285,13 +7269,13 @@ let G = class extends W {
7285
7269
  return this.selectedIds.includes(e);
7286
7270
  }
7287
7271
  visitState(e) {
7288
- return this._tristate(Fe([e]).map((t) => t.id));
7272
+ return this._tristate(Oe([e]).map((t) => t.id));
7289
7273
  }
7290
7274
  subGroupState(e) {
7291
7275
  return this._tristate(e.map((t) => t.id));
7292
7276
  }
7293
7277
  allState() {
7294
- return this._tristate(Fe(this.filteredGroups).map((e) => e.id));
7278
+ return this._tristate(Oe(this.filteredGroups).map((e) => e.id));
7295
7279
  }
7296
7280
  hasDiagnosticsFilter() {
7297
7281
  return this.availableDiagnostics.length > 0;
@@ -7356,7 +7340,7 @@ let G = class extends W {
7356
7340
  todayOnly: this.todayOnly,
7357
7341
  selectedDiagnosticCodes: this.selectedDiagnosticCodes
7358
7342
  }, t = hh(this.historyGroups || [], e, this.rulesByCollectionId);
7359
- this.filteredGroups = await rh(t), this.totalCount = Fe(this.filteredGroups).length;
7343
+ this.filteredGroups = await rh(t), this.totalCount = Oe(this.filteredGroups).length;
7360
7344
  }
7361
7345
  _syncVirtualScroller() {
7362
7346
  this._virtualScrollerState = this._scrollerController.sync({
@@ -7396,54 +7380,54 @@ let G = class extends W {
7396
7380
  this.api.importDataManager.selectItems({
7397
7381
  pluginId: ih,
7398
7382
  data: t,
7399
- text: Eh(Fe(t))
7383
+ text: Eh(Oe(t))
7400
7384
  });
7401
7385
  }
7402
7386
  };
7403
- G.styles = L`
7387
+ z.styles = L`
7404
7388
  ${q(fh)}
7405
7389
  `;
7406
7390
  Y([
7407
- De(z.primaryApi)
7408
- ], G.prototype, "api", 2);
7391
+ De(V.primaryApi)
7392
+ ], z.prototype, "api", 2);
7409
7393
  Y([
7410
- S(fs)
7411
- ], G.prototype, "historyGroups", 2);
7394
+ S(hs)
7395
+ ], z.prototype, "historyGroups", 2);
7412
7396
  Y([
7413
7397
  S(Dt)
7414
- ], G.prototype, "searchString", 2);
7398
+ ], z.prototype, "searchString", 2);
7415
7399
  Y([
7416
7400
  S(Ra)
7417
- ], G.prototype, "rulesByCollectionId", 2);
7401
+ ], z.prototype, "rulesByCollectionId", 2);
7418
7402
  Y([
7419
- re()
7420
- ], G.prototype, "todayOnly", 2);
7403
+ ie()
7404
+ ], z.prototype, "todayOnly", 2);
7421
7405
  Y([
7422
- re()
7423
- ], G.prototype, "selectedDiagnosticCodes", 2);
7406
+ ie()
7407
+ ], z.prototype, "selectedDiagnosticCodes", 2);
7424
7408
  Y([
7425
- re()
7426
- ], G.prototype, "availableDiagnostics", 2);
7409
+ ie()
7410
+ ], z.prototype, "availableDiagnostics", 2);
7427
7411
  Y([
7428
- re()
7429
- ], G.prototype, "filteredGroups", 2);
7412
+ ie()
7413
+ ], z.prototype, "filteredGroups", 2);
7430
7414
  Y([
7431
- re()
7432
- ], G.prototype, "totalCount", 2);
7415
+ ie()
7416
+ ], z.prototype, "totalCount", 2);
7433
7417
  Y([
7434
- re()
7435
- ], G.prototype, "selectedIds", 2);
7418
+ ie()
7419
+ ], z.prototype, "selectedIds", 2);
7436
7420
  Y([
7437
7421
  Jt(".virtual-viewport")
7438
- ], G.prototype, "_viewport", 2);
7422
+ ], z.prototype, "_viewport", 2);
7439
7423
  Y([
7440
- re()
7441
- ], G.prototype, "_virtualScrollerState", 2);
7442
- G = Y([
7424
+ ie()
7425
+ ], z.prototype, "_virtualScrollerState", 2);
7426
+ z = Y([
7443
7427
  j("activity-history-importer")
7444
- ], G);
7428
+ ], z);
7445
7429
  const Fh = ":host{display:flex;min-height:1px;height:100%;width:100%}.container{display:flex;flex-direction:column;width:100%;border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm)}.container[maximized]{position:absolute;background:#fff;top:0;left:0;bottom:0;border:none}.container[maximized] .header-maximized-container{display:flex;flex-direction:column}.container[maximized] .header-maximized-container .header__maximized{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:24px;padding-top:12px;padding-bottom:12px;padding-inline:40px}.container[maximized] .header-maximized-container .header__maximized .header__maximized__search{flex:1;border-radius:8px;border:1px solid rgb(189,189,189);padding:8px;width:300px}.container[maximized] .header-maximized-container .header__maximized .title{color:var(--color-neutral-900);font-weight:700;font-size:20px;line-height:30px;white-space:nowrap}.container[maximized] .header-maximized-container .header__maximized .options{display:flex;align-items:center;color:var(--color-primary-400);font-weight:600;font-size:14px;line-height:24px;cursor:pointer}.container[maximized] .header-maximized-container .header__maximized .header__maximized__left{display:flex;flex-direction:row;gap:24px;align-items:center;width:100%}.container[maximized] .header-maximized-container .header__maximized .header__maximized__right{display:flex;flex-direction:row;gap:16px;align-items:center}.container[maximized] .wrapper{height:calc(100vh - 175px);border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm);margin-bottom:24px;margin-inline:40px;width:calc(100% - 80px)}.container .header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid rgb(189,189,189);gap:16px}.container .header .header__left{display:flex;flex-direction:row;align-items:center;flex:1;gap:16px}.container .header .header__left .title{color:var(--color-neutral-800);font-weight:700;font-size:16px;line-height:24px;white-space:nowrap}.container .header .header__right{display:flex;flex-direction:row;align-items:center;gap:8px}.container .header .header__right .action-icons{display:flex;align-items:center}.container .wrapper{display:flex;flex-direction:row;min-height:1px;width:100%;height:100%}.container .wrapper[maximized] .content{width:100%;background:var(--color-neutral-50);border-top-right-radius:var(--dss-radius-sm);display:flex;flex-direction:column}.container .wrapper .content{width:100%;background:var(--color-neutral-50);border-bottom-right-radius:var(--dss-radius-sm);overflow:hidden;display:flex;flex-direction:column}", Oh = (e) => h`<div class="container" ?maximized=${e.maximized}>
7446
- ${e.maximized ? h`${Ph(e)}` : h`<div class="header">
7430
+ ${e.maximized ? h`${Mh(e)}` : h`<div class="header">
7447
7431
  <div class="header__left">
7448
7432
  <div class="title">${v("activityHistory")}</div>
7449
7433
  <activity-history-search-bar @onSearchChange=${e._handleSearchChange} .searchQuery=${e.searchQuery}></activity-history-search-bar>
@@ -7457,12 +7441,12 @@ const Fh = ":host{display:flex;min-height:1px;height:100%;width:100%}.container{
7457
7441
  <dss-icon-button tooltipFixed @click=${() => e._refreshHistory()} size="md" variant="primary" icon="refresh" label=${v("actions.refresh")}></dss-icon-button>
7458
7442
  <div>|</div>
7459
7443
  <dss-icon-button tooltipFixed @click=${() => e._maximize()} size="md" variant="primary" icon="open_in_full" label=${v("actions.maximizeButton")}></dss-icon-button>
7460
- ${e.isAdministrative ? P : h`<div>|</div>
7444
+ ${e.isAdministrative ? M : h`<div>|</div>
7461
7445
  <div>
7462
7446
  <dss-icon-button tooltipFixed size="md" variant="primary" icon="more_vert" label=${v("actions.menuButton")}></dss-icon-button>
7463
7447
  <dss-action-menu position="bottom-start">
7464
7448
  <dss-action-menu-item lefticon="view_timeline" label=${v("actions.cronogram")} @click=${e._raiseEcapCronogramEvent}></dss-action-menu-item>
7465
- <!-- <dss-action-menu-item lefticon="file_download" label=${v("actions.exportPdf")} @click=${() => e.api.broker.send(new as())}></dss-action-menu-item> -->
7449
+ <!-- <dss-action-menu-item lefticon="file_download" label=${v("actions.exportPdf")} @click=${() => e.api.broker.send(new os())}></dss-action-menu-item> -->
7466
7450
  <!-- <dss-action-menu-item lefticon="info" label=${v("actions.entryLegend")}></dss-action-menu-item> -->
7467
7451
  </dss-action-menu>
7468
7452
  </div>`}
@@ -7472,11 +7456,11 @@ const Fh = ":host{display:flex;min-height:1px;height:100%;width:100%}.container{
7472
7456
  <activity-history-filters .wrapperMaximized=${e.maximized}></activity-history-filters>
7473
7457
  <div class="content">
7474
7458
  <active-filters-header></active-filters-header>
7475
- ${e.isAnyCollectionBusy ? h`<activity-history-busy></activity-history-busy>` : P}
7476
- ${e.historyGroups?.length || !e.isAnyCollectionBusy ? h`<activity-history-timeline></activity-history-timeline>` : P}
7459
+ ${e.isAnyCollectionBusy ? h`<activity-history-busy></activity-history-busy>` : M}
7460
+ ${e.historyGroups?.length || !e.isAnyCollectionBusy ? h`<activity-history-timeline></activity-history-timeline>` : M}
7477
7461
  </div>
7478
7462
  </div>
7479
- </div>`, Ph = (e) => h`
7463
+ </div>`, Mh = (e) => h`
7480
7464
  <div class="header-maximized-container">
7481
7465
  <div class="header__maximized">
7482
7466
  <div class="header__maximized__left">
@@ -7491,22 +7475,22 @@ const Fh = ":host{display:flex;min-height:1px;height:100%;width:100%}.container{
7491
7475
  <!-- <div>
7492
7476
  <dss-button variant="subtle" size="md" label="${v("actions.moreOptions")}" icon="more_horiz" iconposition="left"></dss-button>
7493
7477
  <dss-action-menu position="bottom-start">
7494
- <dss-action-menu-item @click=${() => e.api.broker.send(new as())} lefticon="file_download" label=${v("actions.exportPdf")}></dss-action-menu-item>
7478
+ <dss-action-menu-item @click=${() => e.api.broker.send(new os())} lefticon="file_download" label=${v("actions.exportPdf")}></dss-action-menu-item>
7495
7479
  </dss-action-menu>
7496
7480
  </div> -->
7497
7481
  <!-- <dss-button label="${v("actions.entryLegend")}" size="md" variant="secondary" icon="info"></dss-button> -->
7498
- ${e.isAdministrative ? P : h`<dss-button label="${v("actions.cronogram")}" size="md" variant="primary" icon="view_timeline" @click=${e._raiseEcapCronogramEvent}></dss-button>`}
7482
+ ${e.isAdministrative ? M : h`<dss-button label="${v("actions.cronogram")}" size="md" variant="primary" icon="view_timeline" @click=${e._raiseEcapCronogramEvent}></dss-button>`}
7499
7483
  <dss-icon-button tooltipFixed @click=${() => e._minimize()} size="md" variant="primary" icon="close_fullscreen" label=${v("actions.minimizeButton")}></dss-icon-button>
7500
7484
  </div>
7501
7485
  </div>
7502
7486
  </div>
7503
7487
  `;
7504
- var Mh = Object.defineProperty, kh = Object.getOwnPropertyDescriptor, Te = (e, t, s, i) => {
7488
+ var Ph = Object.defineProperty, kh = Object.getOwnPropertyDescriptor, $e = (e, t, s, i) => {
7505
7489
  for (var r = i > 1 ? void 0 : i ? kh(t, s) : t, n = e.length - 1, o; n >= 0; n--)
7506
7490
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
7507
- return i && r && Mh(t, s, r), r;
7491
+ return i && r && Ph(t, s, r), r;
7508
7492
  };
7509
- let ie = class extends Ar(W) {
7493
+ let se = class extends kr(W) {
7510
7494
  constructor() {
7511
7495
  super(...arguments), this.subscriptions = [], this._searchTimeout = null, this.maximized = !1, this.searchQuery = "";
7512
7496
  }
@@ -7545,11 +7529,11 @@ let ie = class extends Ar(W) {
7545
7529
  }
7546
7530
  _handleSelectDate(e) {
7547
7531
  const t = Dd(e, "dd/MM/yyyy", /* @__PURE__ */ new Date());
7548
- Ui(t) && this.scrollToClosestDate(t);
7532
+ Qi(t) && this.scrollToClosestDate(t);
7549
7533
  }
7550
7534
  _handleSearchChange(e) {
7551
7535
  typeof e.detail == "string" && (this.searchQuery = e.detail, this._searchTimeout && clearTimeout(this._searchTimeout), this._searchTimeout = setTimeout(() => {
7552
- this.api.broker.send(new dt(this.searchQuery));
7536
+ this.api.broker.send(new ut(this.searchQuery));
7553
7537
  }, 300));
7554
7538
  }
7555
7539
  async _raiseEcapCronogramEvent() {
@@ -7561,52 +7545,52 @@ let ie = class extends Ar(W) {
7561
7545
  this.shadowRoot.querySelector("activity-history-timeline")._scrollIntoDate(t);
7562
7546
  }
7563
7547
  _refreshHistory() {
7564
- this.api.broker.send(new mr());
7548
+ this.api.broker.send(new pr());
7565
7549
  }
7566
7550
  };
7567
- ie.styles = L`
7551
+ se.styles = L`
7568
7552
  ${q(Fh)}
7569
7553
  `;
7570
- Te([
7554
+ $e([
7571
7555
  K({ type: Boolean, reflect: !0 })
7572
- ], ie.prototype, "maximized", 2);
7573
- Te([
7574
- De(z.primaryApi)
7575
- ], ie.prototype, "api", 2);
7576
- Te([
7577
- S(fs)
7578
- ], ie.prototype, "historyGroups", 2);
7579
- Te([
7556
+ ], se.prototype, "maximized", 2);
7557
+ $e([
7558
+ De(V.primaryApi)
7559
+ ], se.prototype, "api", 2);
7560
+ $e([
7561
+ S(hs)
7562
+ ], se.prototype, "historyGroups", 2);
7563
+ $e([
7580
7564
  S(_t)
7581
- ], ie.prototype, "isSomeCollectionLoadedAndOtherLoading", 2);
7582
- Te([
7565
+ ], se.prototype, "isSomeCollectionLoadedAndOtherLoading", 2);
7566
+ $e([
7583
7567
  S(xt)
7584
- ], ie.prototype, "isAnyCollectionBusy", 2);
7585
- Te([
7568
+ ], se.prototype, "isAnyCollectionBusy", 2);
7569
+ $e([
7586
7570
  K()
7587
- ], ie.prototype, "searchQuery", 2);
7588
- ie = Te([
7571
+ ], se.prototype, "searchQuery", 2);
7572
+ se = $e([
7589
7573
  j("activity-history-main")
7590
- ], ie);
7591
- const Dr = "activity-history-importer", Ah = (e) => {
7574
+ ], se);
7575
+ const Cr = "activity-history-importer", Ah = (e) => {
7592
7576
  e.regionManager.registerView(e.regionManager.regions.clinicalMonitoring.content, {
7593
7577
  id: e.pluginInfo.pluginId,
7594
- factory: () => Promise.resolve(new ie())
7578
+ factory: () => Promise.resolve(new se())
7595
7579
  }), e.regionManager.registerView(e.regionManager.regions.shell.importDataActivityHistory, {
7596
- id: Dr,
7597
- factory: () => Promise.resolve(new G()),
7580
+ id: Cr,
7581
+ factory: () => Promise.resolve(new z()),
7598
7582
  sortHint: "0020"
7599
7583
  });
7600
7584
  }, Hh = () => {
7601
- const e = Se.get(z.primaryApi);
7602
- e.regionManager.removeView(e.regionManager.regions.clinicalMonitoring.content, e.pluginInfo.pluginId), e.regionManager.removeView(e.regionManager.regions.shell.importDataActivityHistory, Dr);
7585
+ const e = Se.get(V.primaryApi);
7586
+ e.regionManager.removeView(e.regionManager.regions.clinicalMonitoring.content, e.pluginInfo.pluginId), e.regionManager.removeView(e.regionManager.regions.shell.importDataActivityHistory, Cr);
7603
7587
  }, Rh = (e) => {
7604
7588
  th(e);
7605
7589
  }, zh = () => {
7606
7590
  sh();
7607
- }, Nh = async (e) => ($i(e), Ah(e), await go(e), ro(e), Rh(e), Promise.resolve()), Bh = () => ($i(null), zh(), Hh(), no(), Promise.resolve());
7591
+ }, Nh = async (e) => (Ti(e), Ah(e), await go(e), ro(e), Rh(e), Promise.resolve()), Bh = () => (Ti(null), zh(), Hh(), no(), Promise.resolve());
7608
7592
  export {
7609
7593
  Bh as dispose,
7610
7594
  Nh as initialize
7611
7595
  };
7612
- //# sourceMappingURL=plugin-CdZ1Y5f4.js.map
7596
+ //# sourceMappingURL=plugin-Bt7PVg3Z.js.map