@uxland/primary-shell 7.49.2 → 7.50.1

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,4 +1,4 @@
1
- import { d as ge, i as Ze, a as Qe, n as K, C as Dr, g as Tr, D as O, k as h, r as q, b as W, h as L, t as j, Q as ne, c as Ot, e as se, f as Ir, j as $r, l as Er, m as Fr, o as js, p as Qt, q as Or, P as Mr } from "./index-BjHmySvD.js";
1
+ import { d as ge, i as Ze, a as Qe, n as K, C as Dr, g as Tr, D as O, k as h, r as q, b as W, h as L, t as j, Q as ne, c as Ot, e as se, f as Ir, j as $r, l as Er, m as Fr, o as js, p as Qt, q as Or, P as Mr } from "./index-D9hfKjLi.js";
2
2
  import "react";
3
3
  const Pr = ({ primaryApi: e, store: t }) => {
4
4
  class s {
@@ -5642,7 +5642,13 @@ const Yt = (e, t) => {
5642
5642
  <div class="virtual-items" style="transform: translateY(${e._containerOffset}px)">
5643
5643
  ${ne(
5644
5644
  e._visibleRows,
5645
- (t) => t.group?.items?.[0]?.id || t.group?.subGroups?.[0]?.items?.[0]?.id,
5645
+ // `idGroup` i prou: identifica el grup sempre i és únic.
5646
+ // Derivar la clau del primer item donava `undefined` per
5647
+ // un grup sense items directes i sense items als
5648
+ // subgrups, i dues files així col·lidien: Lit no les pot
5649
+ // reconciliar i destrueix i reconstrueix el DOM de la
5650
+ // llista a cada render.
5651
+ (t) => t.group.idGroup,
5646
5652
  ({ index: t, group: s }) => h`
5647
5653
  <div class="visit"
5648
5654
  data-index=${t}
@@ -6360,10 +6366,10 @@ function su({
6360
6366
  const iu = (e) => {
6361
6367
  const t = e.getBoundingClientRect().height, s = window.getComputedStyle(e), i = Number.parseFloat(s.marginTop) || 0, r = Number.parseFloat(s.marginBottom) || 0;
6362
6368
  return Math.round(t + i + r);
6363
- };
6369
+ }, ru = 2;
6364
6370
  class lr {
6365
6371
  constructor(t) {
6366
- this._lastVisibleState = { virtualItems: [], totalHeight: 0 }, this._savedScrollTop = 0, this._viewportWasHidden = !1, this._options = t;
6372
+ this._lastVisibleState = { virtualItems: [], totalHeight: 0 }, this._savedScrollTop = 0, this._viewportWasHidden = !1, this._pendingMeasurements = /* @__PURE__ */ new Set(), this._options = t;
6367
6373
  }
6368
6374
  setup(t, s) {
6369
6375
  return this._viewport = t, this._virtualizer = new tu({
@@ -6379,7 +6385,7 @@ class lr {
6379
6385
  this._trackViewportVisibility(), s(this.getState());
6380
6386
  }
6381
6387
  }), this._cleanup = this._virtualizer._didMount(), this._virtualizer._willUpdate(), s(this.getState()), () => {
6382
- this._cleanup?.();
6388
+ this._cancelPendingMeasurements(), this._cleanup?.();
6383
6389
  };
6384
6390
  }
6385
6391
  willUpdate() {
@@ -6391,8 +6397,31 @@ class lr {
6391
6397
  count: t.length
6392
6398
  }), this._virtualizer._willUpdate()), s && s(this.getState());
6393
6399
  }
6400
+ /**
6401
+ * Encola l'element per mesurar-lo al frame següent, mai durant el render.
6402
+ *
6403
+ * El `ref` directive de Lit crida el seu callback *dins* del commit del
6404
+ * template, no després, com sí que fa el `ref` de React (que és el patró que
6405
+ * documenta tanstack). Cridar `virtualizer.measureElement` aquí de forma
6406
+ * síncrona acabava a `resizeItem` -> `notify()` -> `requestUpdate()` amb el
6407
+ * render encara en curs, i Lit encadenava un update darrere l'altre per
6408
+ * microtask sense cedir mai al navegador: a PRE, 188 layouts forçats per
6409
+ * segon i la pestanya morta abans d'arribar a pintar.
6410
+ *
6411
+ * Acumulant els elements i mesurant-los un sol cop per frame, el `notify` cau
6412
+ * fora del cicle d'update i el navegador pot pintar entre passades.
6413
+ */
6394
6414
  measureElement(t) {
6395
- this._virtualizer?.measureElement(t);
6415
+ this._pendingMeasurements.add(t), this._measurementFlushHandle == null && (this._measurementFlushHandle = requestAnimationFrame(() => {
6416
+ this._measurementFlushHandle = void 0;
6417
+ const s = [...this._pendingMeasurements];
6418
+ this._pendingMeasurements.clear();
6419
+ for (const i of s)
6420
+ i.isConnected && this._virtualizer?.measureElement(i);
6421
+ }));
6422
+ }
6423
+ _cancelPendingMeasurements() {
6424
+ this._measurementFlushHandle != null && (cancelAnimationFrame(this._measurementFlushHandle), this._measurementFlushHandle = void 0), this._pendingMeasurements.clear();
6396
6425
  }
6397
6426
  scrollToIndex(t, s = "smooth", i = "auto") {
6398
6427
  this._virtualizer?.scrollToIndex(t, { behavior: s, align: i });
@@ -6412,11 +6441,11 @@ class lr {
6412
6441
  // "corrections", shifting every offset. Reuse the cached measurement (or the
6413
6442
  // estimate) so sizes survive the hide/show cycle.
6414
6443
  _measureItem(t) {
6415
- if (t.getBoundingClientRect().height === 0) {
6416
- const s = Number(t.getAttribute("data-index"));
6417
- return this._virtualizer?.measurementsCache[s]?.size ?? this._options.estimateItemHeight(s);
6418
- }
6419
- return (this._options.measureElement ?? iu)(t);
6444
+ const s = Number(t.getAttribute("data-index")), i = this._virtualizer?.measurementsCache[s]?.size;
6445
+ if (t.getBoundingClientRect().height === 0)
6446
+ return i ?? this._options.estimateItemHeight(s);
6447
+ const r = (this._options.measureElement ?? iu)(t);
6448
+ return i != null && Math.abs(r - i) <= ru ? i : r;
6420
6449
  }
6421
6450
  // Deactivated region views are hidden with display:none: the viewport
6422
6451
  // measures 0px, the virtualizer nulls its range (empty virtualItems) and the
@@ -6440,10 +6469,10 @@ class lr {
6440
6469
  }), this._lastVisibleState;
6441
6470
  }
6442
6471
  }
6443
- var ru = Object.defineProperty, nu = Object.getOwnPropertyDescriptor, re = (e, t, s, i) => {
6444
- for (var r = i > 1 ? void 0 : i ? nu(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6472
+ var nu = Object.defineProperty, ou = Object.getOwnPropertyDescriptor, re = (e, t, s, i) => {
6473
+ for (var r = i > 1 ? void 0 : i ? ou(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6445
6474
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
6446
- return i && r && ru(t, s, r), r;
6475
+ return i && r && nu(t, s, r), r;
6447
6476
  };
6448
6477
  let Q = class extends L {
6449
6478
  constructor() {
@@ -6583,7 +6612,7 @@ re([
6583
6612
  Q = re([
6584
6613
  j("activity-history-timeline")
6585
6614
  ], Q);
6586
- const ou = (e) => {
6615
+ const au = (e) => {
6587
6616
  const t = e.areCustomFiltersActive || e.areCommonFiltersActive || e.areDiagnosticFiltersActive || e.areGlobalFiltersActive;
6588
6617
  return !t && e.searchString.length < 1 ? O : h`
6589
6618
  <div class="active-filters-header">
@@ -6591,19 +6620,19 @@ const ou = (e) => {
6591
6620
  ${Ot(e.searchString.length > 1, () => h`<activity-history-search-results searchQuery=${e.searchString}></activity-history-search-results>`)}
6592
6621
  </div>
6593
6622
  `;
6594
- }, au = ".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}";
6595
- var lu = Object.defineProperty, cu = Object.getOwnPropertyDescriptor, ze = (e, t, s, i) => {
6596
- for (var r = i > 1 ? void 0 : i ? cu(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6623
+ }, lu = ".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}";
6624
+ var cu = Object.defineProperty, du = Object.getOwnPropertyDescriptor, ze = (e, t, s, i) => {
6625
+ for (var r = i > 1 ? void 0 : i ? du(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6597
6626
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
6598
- return i && r && lu(t, s, r), r;
6627
+ return i && r && cu(t, s, r), r;
6599
6628
  };
6600
6629
  let ue = class extends L {
6601
6630
  render() {
6602
- return h`${ou(this)}`;
6631
+ return h`${au(this)}`;
6603
6632
  }
6604
6633
  };
6605
6634
  ue.styles = W`
6606
- ${q(au)}
6635
+ ${q(lu)}
6607
6636
  `;
6608
6637
  ze([
6609
6638
  S(_t)
@@ -6623,9 +6652,9 @@ ze([
6623
6652
  ue = ze([
6624
6653
  j("active-filters-header")
6625
6654
  ], ue);
6626
- const du = ":host{width:100%}.container{display:flex;align-items:center;flex-direction:column;height:100%;justify-content:center}", uu = (e) => h`
6627
- ${e.isAllDataFailedToLoad ? hu(e) : O}
6628
- `, hu = (e) => h`
6655
+ const uu = ":host{width:100%}.container{display:flex;align-items:center;flex-direction:column;height:100%;justify-content:center}", hu = (e) => h`
6656
+ ${e.isAllDataFailedToLoad ? fu(e) : O}
6657
+ `, fu = (e) => h`
6629
6658
  <div class="container">
6630
6659
  <dss-user-feedback status="error" variant="default" size="lg" title=${v("error.title")} description=${v("error.general.title")} hasdetails="" detailslabel=${v("error.viewDetails")}>
6631
6660
  <div slot="details">
@@ -6634,31 +6663,31 @@ const du = ":host{width:100%}.container{display:flex;align-items:center;flex-dir
6634
6663
  <dss-button @onClick=${e.handleClickFeedback} label=${v("error.general.refresh")} size="lg"></dss-button>
6635
6664
  </dss-user-feedback>
6636
6665
  </div>
6637
- `, cr = (e) => e.activityHistoryCollections.error.length > 0, fu = (e) => {
6666
+ `, cr = (e) => e.activityHistoryCollections.error.length > 0, pu = (e) => {
6638
6667
  const t = e.activityHistoryCollections.collections;
6639
6668
  return Object.values(t).every((s) => !s.items || s.items.length === 0);
6640
- }, pu = (e) => !bt(e) && cr(e) && fu(e), dr = (e) => e.activityHistoryCollections.error;
6641
- var mu = Object.defineProperty, gu = Object.getOwnPropertyDescriptor, Ct = (e, t, s, i) => {
6642
- for (var r = i > 1 ? void 0 : i ? gu(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6669
+ }, mu = (e) => !bt(e) && cr(e) && pu(e), dr = (e) => e.activityHistoryCollections.error;
6670
+ var gu = Object.defineProperty, yu = Object.getOwnPropertyDescriptor, Ct = (e, t, s, i) => {
6671
+ for (var r = i > 1 ? void 0 : i ? yu(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6643
6672
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
6644
- return i && r && mu(t, s, r), r;
6673
+ return i && r && gu(t, s, r), r;
6645
6674
  };
6646
6675
  let ke = class extends L {
6647
6676
  constructor() {
6648
6677
  super(...arguments), this.errorMessages = [];
6649
6678
  }
6650
6679
  render() {
6651
- return h`${uu(this)}`;
6680
+ return h`${hu(this)}`;
6652
6681
  }
6653
6682
  handleClickFeedback() {
6654
6683
  this.api.broker.send(new ts(this.errorMessages));
6655
6684
  }
6656
6685
  };
6657
6686
  ke.styles = W`
6658
- ${q(du)}
6687
+ ${q(uu)}
6659
6688
  `;
6660
6689
  Ct([
6661
- S(pu)
6690
+ S(mu)
6662
6691
  ], ke.prototype, "isAllDataFailedToLoad", 2);
6663
6692
  Ct([
6664
6693
  S(dr)
@@ -6669,27 +6698,27 @@ Ct([
6669
6698
  ke = Ct([
6670
6699
  j("activity-history-full-data-error")
6671
6700
  ], ke);
6672
- const yu = ":host{width:100%}.container{display:flex;align-items:center;flex-direction:column;padding-top:16px;padding-inline:16px}", vu = (e) => {
6701
+ const vu = ":host{width:100%}.container{display:flex;align-items:center;flex-direction:column;padding-top:16px;padding-inline:16px}", bu = (e) => {
6673
6702
  const t = e.getCombinedMessage();
6674
6703
  return h`
6675
- ${e.isErrorOccurred ? bu(e, t) : O}
6704
+ ${e.isErrorOccurred ? wu(e, t) : O}
6676
6705
  `;
6677
- }, bu = (e, t) => h`
6706
+ }, wu = (e, t) => h`
6678
6707
  <div class="container">
6679
6708
  <dss-alert @onButtonClick=${e.handleClickAlert} state="warning" size="lg" message="${t}" buttonLabel=${v("error.partial.refresh")} hasbutton></dss-alert>
6680
6709
  </div>
6681
6710
  `;
6682
- var wu = Object.defineProperty, xu = Object.getOwnPropertyDescriptor, Dt = (e, t, s, i) => {
6683
- for (var r = i > 1 ? void 0 : i ? xu(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6711
+ var xu = Object.defineProperty, _u = Object.getOwnPropertyDescriptor, Dt = (e, t, s, i) => {
6712
+ for (var r = i > 1 ? void 0 : i ? _u(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6684
6713
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
6685
- return i && r && wu(t, s, r), r;
6714
+ return i && r && xu(t, s, r), r;
6686
6715
  };
6687
6716
  let Ae = class extends L {
6688
6717
  constructor() {
6689
6718
  super(...arguments), this.errorMessages = [];
6690
6719
  }
6691
6720
  render() {
6692
- return h`${vu(this)}`;
6721
+ return h`${bu(this)}`;
6693
6722
  }
6694
6723
  handleClickAlert() {
6695
6724
  this.api.broker.send(new ts(this.errorMessages));
@@ -6700,7 +6729,7 @@ let Ae = class extends L {
6700
6729
  }
6701
6730
  };
6702
6731
  Ae.styles = W`
6703
- ${q(yu)}
6732
+ ${q(vu)}
6704
6733
  `;
6705
6734
  Dt([
6706
6735
  S(cr)
@@ -6714,25 +6743,25 @@ Dt([
6714
6743
  Ae = Dt([
6715
6744
  j("activity-history-partial-data-error")
6716
6745
  ], Ae);
6717
- const { clearActivityHistoryCollections: _u } = fe.actions;
6718
- class Su extends pe {
6746
+ const { clearActivityHistoryCollections: Su } = fe.actions;
6747
+ class Cu extends pe {
6719
6748
  async handle() {
6720
- this.store.dispatch(ie.actions.clearCustomFilters()), this.store.dispatch(_u()), this.api.broker.publish(this.api.broker.events.activityHistory.refreshDataRequested);
6749
+ this.store.dispatch(ie.actions.clearCustomFilters()), this.store.dispatch(Su()), this.api.broker.publish(this.api.broker.events.activityHistory.refreshDataRequested);
6721
6750
  }
6722
6751
  }
6723
6752
  class ur {
6724
6753
  }
6725
6754
  let hr;
6726
- const Cu = (e) => {
6727
- Du(), hr = e.registerRequest(ur, Su);
6728
- }, Du = () => {
6755
+ const Du = (e) => {
6756
+ Tu(), hr = e.registerRequest(ur, Cu);
6757
+ }, Tu = () => {
6729
6758
  hr?.dispose();
6730
- }, { removeActivityHistoryItem: Tu } = fe.actions;
6731
- class Iu extends De {
6759
+ }, { removeActivityHistoryItem: Iu } = fe.actions;
6760
+ class $u extends De {
6732
6761
  async handle(t) {
6733
6762
  try {
6734
6763
  this.store.dispatch(
6735
- Tu({
6764
+ Iu({
6736
6765
  id: t.entityId,
6737
6766
  itemId: t.itemId
6738
6767
  })
@@ -6743,15 +6772,15 @@ class Iu extends De {
6743
6772
  }
6744
6773
  }
6745
6774
  let fr;
6746
- const $u = (e) => {
6747
- fr = e.registerRequest("remove_history_item_request", Iu);
6748
- }, Eu = () => {
6775
+ const Eu = (e) => {
6776
+ fr = e.registerRequest("remove_history_item_request", $u);
6777
+ }, Fu = () => {
6749
6778
  fr?.dispose();
6750
- }, { setSearchString: Fu } = ie.actions;
6751
- class Ou extends pe {
6779
+ }, { setSearchString: Ou } = ie.actions;
6780
+ class Mu extends pe {
6752
6781
  async handle(t) {
6753
6782
  try {
6754
- this.store.dispatch(Fu(t.searchString)), setTimeout(() => {
6783
+ this.store.dispatch(Ou(t.searchString)), setTimeout(() => {
6755
6784
  this.api.broker.publish(this.api.broker.events.activityHistory.searched, {
6756
6785
  searchQuery: t.searchString
6757
6786
  });
@@ -6766,24 +6795,24 @@ class ct {
6766
6795
  this.searchString = t, this.searchString = t;
6767
6796
  }
6768
6797
  }
6769
- const Mu = ".search-header{color:var(--color-neutral-900);font-weight:600}", Pu = (e) => h`<div class="search-header">
6798
+ const Pu = ".search-header{color:var(--color-neutral-900);font-weight:600}", ku = (e) => h`<div class="search-header">
6770
6799
  ${v("searchBarResults")} “${e.searchQuery}”
6771
6800
  </div>`;
6772
- var ku = Object.defineProperty, Au = Object.getOwnPropertyDescriptor, pr = (e, t, s, i) => {
6773
- for (var r = i > 1 ? void 0 : i ? Au(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6801
+ var Au = Object.defineProperty, Hu = Object.getOwnPropertyDescriptor, pr = (e, t, s, i) => {
6802
+ for (var r = i > 1 ? void 0 : i ? Hu(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6774
6803
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
6775
- return i && r && ku(t, s, r), r;
6804
+ return i && r && Au(t, s, r), r;
6776
6805
  };
6777
6806
  let dt = class extends L {
6778
6807
  constructor() {
6779
6808
  super(...arguments), this.searchQuery = "";
6780
6809
  }
6781
6810
  render() {
6782
- return h`${Pu(this)}`;
6811
+ return h`${ku(this)}`;
6783
6812
  }
6784
6813
  };
6785
6814
  dt.styles = W`
6786
- ${q(Mu)}
6815
+ ${q(Pu)}
6787
6816
  `;
6788
6817
  pr([
6789
6818
  K()
@@ -6791,21 +6820,21 @@ pr([
6791
6820
  dt = pr([
6792
6821
  j("activity-history-search-results")
6793
6822
  ], dt);
6794
- const Hu = ".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}", Ru = (e) => h`<dss-search-bar dropdownStyle=${"display: none"} @onSearchChange=${e._handleSearchChange} icon="search" inputsize="md" threshold="2" recentsearchestext="" emptydropdowntext="">
6823
+ const Ru = ".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}", zu = (e) => h`<dss-search-bar dropdownStyle=${"display: none"} @onSearchChange=${e._handleSearchChange} icon="search" inputsize="md" threshold="2" recentsearchestext="" emptydropdowntext="">
6795
6824
  <label slot="label" for="searchbar1" aria-hidden="false"></label>
6796
6825
  <input slot="input" id="searchbar1" type="text" value=${e.searchQuery} @input=${(t) => e._handleSearchChange({ detail: [t.target.value] })}>
6797
6826
  </dss-search-bar>`;
6798
- var zu = Object.defineProperty, Gu = Object.getOwnPropertyDescriptor, mr = (e, t, s, i) => {
6799
- for (var r = i > 1 ? void 0 : i ? Gu(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6827
+ var Gu = Object.defineProperty, Vu = Object.getOwnPropertyDescriptor, mr = (e, t, s, i) => {
6828
+ for (var r = i > 1 ? void 0 : i ? Vu(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6800
6829
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
6801
- return i && r && zu(t, s, r), r;
6830
+ return i && r && Gu(t, s, r), r;
6802
6831
  };
6803
6832
  let ut = class extends L {
6804
6833
  constructor() {
6805
6834
  super(...arguments), this.searchQuery = "";
6806
6835
  }
6807
6836
  render() {
6808
- return h`${Ru(this)}`;
6837
+ return h`${zu(this)}`;
6809
6838
  }
6810
6839
  _handleSearchChange(e) {
6811
6840
  const t = e.detail || [], s = t.length > 0 ? t.join(" ") : "", i = s.length > 1 ? s : "";
@@ -6813,7 +6842,7 @@ let ut = class extends L {
6813
6842
  }
6814
6843
  };
6815
6844
  ut.styles = W`
6816
- ${q(Hu)}
6845
+ ${q(Ru)}
6817
6846
  `;
6818
6847
  mr([
6819
6848
  K()
@@ -6821,7 +6850,7 @@ mr([
6821
6850
  ut = mr([
6822
6851
  j("activity-history-search-bar")
6823
6852
  ], ut);
6824
- const Vu = ":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}", Bu = (e) => {
6853
+ const Bu = ":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}", Nu = (e) => {
6825
6854
  const t = new Set(e.enabledValues), s = e.groups.filter(
6826
6855
  (r) => r.values.length > 0 && r.values.every((n) => t.has(n.value))
6827
6856
  ), i = new Set(s.flatMap((r) => r.values.map((n) => n.value)));
@@ -6829,16 +6858,16 @@ const Vu = ":host{display:flex;justify-content:space-between}.filters-container{
6829
6858
  groups: s,
6830
6859
  options: e.values.filter((r) => t.has(r.value) && !i.has(r.value))
6831
6860
  };
6832
- }, Nu = (e, t) => e === "" ? qu(t) : e, qu = (e) => `${v("chipHeader.without")} ${e.toLowerCase()}`, Ke = 5, Ws = (e, t, s, i) => h`
6861
+ }, qu = (e, t) => e === "" ? Wu(t) : e, Wu = (e) => `${v("chipHeader.without")} ${e.toLowerCase()}`, Ke = 5, Ws = (e, t, s, i) => h`
6833
6862
  <dss-chip
6834
- label=${Nu(s.title, t.title)}
6863
+ label=${qu(s.title, t.title)}
6835
6864
  size="sm"
6836
6865
  hasdelete
6837
6866
  selected
6838
6867
  @click=${() => i._onDeleteFilterValue(e, t.id, s.id, !1)}
6839
6868
  @onDelete=${() => i._onDeleteFilterValue(e, t.id, s.id, !1)}
6840
6869
  ></dss-chip>
6841
- `, Wu = (e, t) => h`
6870
+ `, Lu = (e, t) => h`
6842
6871
  <dss-chip
6843
6872
  label=${e.title}
6844
6873
  size="sm"
@@ -6847,7 +6876,7 @@ const Vu = ":host{display:flex;justify-content:space-between}.filters-container{
6847
6876
  @click=${() => t._onDeleteCommonFilterValue(e.id)}
6848
6877
  @onDelete=${() => t._onDeleteCommonFilterValue(e.id)}
6849
6878
  ></dss-chip>
6850
- `, Lu = (e, t, s) => h`
6879
+ `, ju = (e, t, s) => h`
6851
6880
  <dss-chip
6852
6881
  label=${t}
6853
6882
  size="sm"
@@ -6856,7 +6885,7 @@ const Vu = ":host{display:flex;justify-content:space-between}.filters-container{
6856
6885
  @click=${() => s._onDeleteDiagnosticFilterValue(e)}
6857
6886
  @onDelete=${() => s._onDeleteDiagnosticFilterValue(e)}
6858
6887
  ></dss-chip>
6859
- `, ju = (e, t, s, i) => h`
6888
+ `, Yu = (e, t, s, i) => h`
6860
6889
  <dss-chip
6861
6890
  label=${s}
6862
6891
  size="sm"
@@ -6865,7 +6894,7 @@ const Vu = ":host{display:flex;justify-content:space-between}.filters-container{
6865
6894
  @click=${() => i._onDeleteGlobalFilterValue(e, t)}
6866
6895
  @onDelete=${() => i._onDeleteGlobalFilterValue(e, t)}
6867
6896
  ></dss-chip>
6868
- `, Yu = (e, t, s) => h`
6897
+ `, Qu = (e, t, s) => h`
6869
6898
  <dss-chip
6870
6899
  label=${t.title}
6871
6900
  size="sm"
@@ -6874,7 +6903,7 @@ const Vu = ":host{display:flex;justify-content:space-between}.filters-container{
6874
6903
  @click=${() => s._onDeleteGlobalFilterGroup(e, t.id)}
6875
6904
  @onDelete=${() => s._onDeleteGlobalFilterGroup(e, t.id)}
6876
6905
  ></dss-chip>
6877
- `, Ee = (e) => h`<div class="filter-title">${`${e}:`}</div>`, Qu = (e) => {
6906
+ `, Ee = (e) => h`<div class="filter-title">${`${e}:`}</div>`, Uu = (e) => {
6878
6907
  if (!(e.enabledCommonFilters.length > 0 || (e.diagnosticFilterEnabled?.enabledValues?.length ?? 0) > 0 || e.activeGlobalFilters.length > 0 || e.customFilterGroups.some(gt))) return O;
6879
6908
  let s = 0;
6880
6909
  const i = [], r = [], n = [], o = e.diagnosticFilterEnabled;
@@ -6883,22 +6912,22 @@ const Vu = ":host{display:flex;justify-content:space-between}.filters-container{
6883
6912
  if (l && l.length > 0) {
6884
6913
  let d = !1, c = !1;
6885
6914
  for (const u of l) {
6886
- const m = Lu(u.codi, u.descripcio, e);
6915
+ const m = ju(u.codi, u.descripcio, e);
6887
6916
  s < Ke ? (d || (i.push(Ee(a)), d = !0), i.push(m), s++) : (c || (r.push(Ee(a)), c = !0), r.push(m), n.push(m));
6888
6917
  }
6889
6918
  }
6890
6919
  }
6891
6920
  for (const a of e.activeGlobalFilters) {
6892
- const { id: l, title: d } = a, c = Bu(a), u = [
6893
- ...c.groups.map((g) => Yu(l, g, e)),
6894
- ...c.options.map((g) => ju(l, g.value, g.label, e))
6921
+ const { id: l, title: d } = a, c = Nu(a), u = [
6922
+ ...c.groups.map((g) => Qu(l, g, e)),
6923
+ ...c.options.map((g) => Yu(l, g.value, g.label, e))
6895
6924
  ];
6896
6925
  let m = !1, f = !1;
6897
6926
  for (const g of u)
6898
6927
  s < Ke ? (m || (i.push(Ee(d)), m = !0), i.push(g), s++) : (f || (r.push(Ee(d)), f = !0), r.push(g), n.push(g));
6899
6928
  }
6900
6929
  for (const a of e.enabledCommonFilters) {
6901
- const l = Wu(a, e);
6930
+ const l = Lu(a, e);
6902
6931
  s < Ke ? (i.push(l), s++) : (r.push(l), n.push(l));
6903
6932
  }
6904
6933
  for (const { title: a, id: l, filters: d } of e.customFilterGroups) {
@@ -6942,14 +6971,14 @@ const Vu = ":host{display:flex;justify-content:space-between}.filters-container{
6942
6971
  </div>
6943
6972
  `;
6944
6973
  };
6945
- var Uu = Object.defineProperty, Xu = Object.getOwnPropertyDescriptor, Ge = (e, t, s, i) => {
6946
- for (var r = i > 1 ? void 0 : i ? Xu(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6974
+ var Xu = Object.defineProperty, Ku = Object.getOwnPropertyDescriptor, Ge = (e, t, s, i) => {
6975
+ for (var r = i > 1 ? void 0 : i ? Ku(t, s) : t, n = e.length - 1, o; n >= 0; n--)
6947
6976
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
6948
- return i && r && Uu(t, s, r), r;
6977
+ return i && r && Xu(t, s, r), r;
6949
6978
  };
6950
6979
  let he = class extends L {
6951
6980
  render() {
6952
- return h`${Qu(this)}`;
6981
+ return h`${Uu(this)}`;
6953
6982
  }
6954
6983
  _onDeleteFilterValue(e, t, s, i) {
6955
6984
  this.api.broker.send(
@@ -6985,7 +7014,7 @@ let he = class extends L {
6985
7014
  }
6986
7015
  };
6987
7016
  he.styles = W`
6988
- ${q(Vu)}
7017
+ ${q(Bu)}
6989
7018
  `;
6990
7019
  Ge([
6991
7020
  Ce(V.primaryApi)
@@ -7006,16 +7035,16 @@ he = Ge([
7006
7035
  j("active-filters-badges")
7007
7036
  ], he);
7008
7037
  let gr;
7009
- const Ku = (e) => {
7010
- gr = e.registerRequest(ct, Ou);
7011
- }, Ju = () => {
7038
+ const Ju = (e) => {
7039
+ gr = e.registerRequest(ct, Mu);
7040
+ }, Zu = () => {
7012
7041
  gr?.dispose();
7013
- }, { updateActivityHistoryItem: Zu } = fe.actions;
7014
- class eh extends De {
7042
+ }, { updateActivityHistoryItem: eh } = fe.actions;
7043
+ class th extends De {
7015
7044
  async handle(t) {
7016
7045
  try {
7017
7046
  gi([t.item]), this.store.dispatch(
7018
- Zu({
7047
+ eh({
7019
7048
  id: t.entityId,
7020
7049
  item: t.item
7021
7050
  })
@@ -7026,17 +7055,17 @@ class eh extends De {
7026
7055
  }
7027
7056
  }
7028
7057
  let yr;
7029
- const th = (e) => {
7030
- yr = e.registerRequest("update_history_item_request", eh);
7031
- }, sh = () => {
7058
+ const sh = (e) => {
7059
+ yr = e.registerRequest("update_history_item_request", th);
7060
+ }, ih = () => {
7032
7061
  yr?.dispose();
7033
7062
  };
7034
7063
  let U;
7035
- const ih = (e) => {
7036
- U = Ar(e, _e), po(U, e), Co(U, e), $o(U, e), Ho(U), Cu(U), th(U), No(U), Tl(U, e), Ku(U), $u(U);
7037
- }, rh = () => {
7038
- mo(), Do(), Eo(), xi(), sh(), qo(), Il(), Ju(), Eu();
7039
- }, nh = "activity-history", oh = async (e) => {
7064
+ const rh = (e) => {
7065
+ U = Ar(e, _e), po(U, e), Co(U, e), $o(U, e), Ho(U), Du(U), sh(U), No(U), Tl(U, e), Ju(U), Eu(U);
7066
+ }, nh = () => {
7067
+ mo(), Do(), Eo(), xi(), ih(), qo(), Il(), Zu(), Fu();
7068
+ }, oh = "activity-history", ah = async (e) => {
7040
7069
  const t = (s) => Promise.all(
7041
7070
  s.map(async (i) => ({
7042
7071
  ...i,
@@ -7059,7 +7088,7 @@ const ih = (e) => {
7059
7088
  virtualItems: [],
7060
7089
  totalHeight: 0
7061
7090
  };
7062
- class ah {
7091
+ class lh {
7063
7092
  /** Setup or update the scroller with the current items. No-op until the
7064
7093
  * viewport and content elements exist. Detects viewport swaps and re-setups. */
7065
7094
  sync({ viewport: t, items: s, onStateChange: i, estimateItemHeight: r }) {
@@ -7080,22 +7109,22 @@ class ah {
7080
7109
  this._scroller?.measureElement(t);
7081
7110
  }
7082
7111
  }
7083
- const lh = (e) => {
7112
+ const ch = (e) => {
7084
7113
  const t = new Date(e), s = /* @__PURE__ */ new Date();
7085
7114
  return t.toDateString() === s.toDateString();
7086
- }, ch = (e) => !!(e && lh(e.date)), dh = (e, t) => !!e.diagnostics?.some((s) => t.includes(s.codi)), uh = (e, t) => {
7115
+ }, dh = (e) => !!(e && ch(e.date)), uh = (e, t) => !!e.diagnostics?.some((s) => t.includes(s.codi)), hh = (e, t) => {
7087
7116
  const s = e.type ? t[e.type] : void 0;
7088
7117
  return !s?.allowedTagIds || s.allowedTagIds.length === 0 ? !0 : s.allowedTagIds.includes(e.tag?.id ?? "");
7089
- }, hh = (e) => {
7118
+ }, fh = (e) => {
7090
7119
  const t = e.items?.[0] || e.subGroups?.[0]?.items?.[0];
7091
- return ch(t);
7120
+ return dh(t);
7092
7121
  }, br = (e, t) => ({
7093
7122
  ...e,
7094
7123
  items: (e.items || []).filter(t),
7095
7124
  subGroups: (e.subGroups || []).map((s) => ({ ...s, items: s.items.filter(t) })).filter((s) => s.items.length > 0)
7096
- }), fh = (e, t) => br(e, (s) => dh(s, t)), Ls = (e) => e.items.length > 0 || e.subGroups.length > 0, ph = (e, { todayOnly: t, diagnosticCodes: s }, i = {}) => {
7097
- const r = e.map((a) => br(a, (l) => uh(l, i))).filter(Ls), n = t, o = s.length > 0;
7098
- return !n && !o ? r : r.map((a) => n && hh(a) ? a : o ? fh(a, s) : null).filter((a) => a !== null && Ls(a));
7125
+ }), ph = (e, t) => br(e, (s) => uh(s, t)), Ls = (e) => e.items.length > 0 || e.subGroups.length > 0, mh = (e, { todayOnly: t, diagnosticCodes: s }, i = {}) => {
7126
+ const r = e.map((a) => br(a, (l) => hh(l, i))).filter(Ls), n = t, o = s.length > 0;
7127
+ return !n && !o ? r : r.map((a) => n && fh(a) ? a : o ? ph(a, s) : null).filter((a) => a !== null && Ls(a));
7099
7128
  }, Je = (e) => {
7100
7129
  const t = [];
7101
7130
  for (const s of e) {
@@ -7104,10 +7133,10 @@ const lh = (e) => {
7104
7133
  for (const r of i.items) t.push(r);
7105
7134
  }
7106
7135
  return t;
7107
- }, mh = ":host{display:block;width:100%}dss-accordion{width:100%}.importer{display:flex;flex-direction:column;gap:12px;min-height:0}.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{height:62vh;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);border-bottom:1px solid var(--color-neutral-100)}.visit:last-child{border-bottom:none}.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}", wr = (e) => ({
7136
+ }, gh = ":host{display:block;width:100%}dss-accordion{width:100%}.importer{display:flex;flex-direction:column;gap:12px;min-height:0}.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{height:62vh;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);border-bottom:1px solid var(--color-neutral-100)}.visit:last-child{border-bottom:none}.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}", wr = (e) => ({
7108
7137
  checked: e === "all",
7109
7138
  indeterminate: e === "some"
7110
- }), gh = (e) => {
7139
+ }), yh = (e) => {
7111
7140
  const t = wr(e.allState());
7112
7141
  return h`
7113
7142
  <dss-accordion
@@ -7118,17 +7147,17 @@ const lh = (e) => {
7118
7147
  widgetBadgeState="info"
7119
7148
  .isOpen=${!0}
7120
7149
  >
7121
- <div class="importer">${yh(e)} ${vh(e, t)} ${bh(e)}</div>
7150
+ <div class="importer">${vh(e)} ${bh(e, t)} ${wh(e)}</div>
7122
7151
  </dss-accordion>
7123
7152
  `;
7124
- }, yh = (e) => h`
7153
+ }, vh = (e) => h`
7125
7154
  <div class="importer__search">
7126
7155
  <activity-history-search-bar
7127
7156
  .searchString=${e.searchString}
7128
7157
  @onSearchChange=${(t) => e._onSearchChange(t)}
7129
7158
  ></activity-history-search-bar>
7130
7159
  </div>
7131
- `, vh = (e, t) => h`
7160
+ `, bh = (e, t) => h`
7132
7161
  <div class="importer__filters">
7133
7162
  <dss-form-checkbox
7134
7163
  label=${v("importer.selectAll")}
@@ -7153,7 +7182,7 @@ const lh = (e) => {
7153
7182
  ></dss-form-checkbox>
7154
7183
  ` : O}
7155
7184
  </div>
7156
- `, bh = (e) => e.filteredGroups?.length ? h`
7185
+ `, wh = (e) => e.filteredGroups?.length ? h`
7157
7186
  <div class="virtual-container">
7158
7187
  <div class="virtual-viewport">
7159
7188
  <div class="virtual-content" style="height: ${e._totalHeight}px;">
@@ -7161,27 +7190,27 @@ const lh = (e) => {
7161
7190
  ${ne(
7162
7191
  e._visibleRows,
7163
7192
  (t) => t.group.idGroup,
7164
- (t) => wh(e, t.group, t.index)
7193
+ (t) => xh(e, t.group, t.index)
7165
7194
  )}
7166
7195
  </div>
7167
7196
  </div>
7168
7197
  </div>
7169
7198
  </div>
7170
- ` : h`<div class="importer__empty">${v("importer.noResults")}</div>`, wh = (e, t, s) => {
7199
+ ` : h`<div class="importer__empty">${v("importer.noResults")}</div>`, xh = (e, t, s) => {
7171
7200
  const i = t.items?.[0] || t.subGroups?.[0]?.items?.[0];
7172
7201
  return h`
7173
7202
  <div class="visit" data-index=${s} ${rr(e._measureElement)} data-date=${js(i?.date)}>
7174
- <div class="visit__header">${xh(i)}</div>
7203
+ <div class="visit__header">${_h(i)}</div>
7175
7204
  <div class="visit__items">
7176
7205
  ${ne(
7177
7206
  or(t),
7178
7207
  (r) => r.type === "item" ? r.item.id : r.subGroup.idSubGroup,
7179
- (r) => r.type === "item" ? xr(e, r.item, t.items) : Sh(e, r.subGroup)
7208
+ (r) => r.type === "item" ? xr(e, r.item, t.items) : Ch(e, r.subGroup)
7180
7209
  )}
7181
7210
  </div>
7182
7211
  </div>
7183
7212
  `;
7184
- }, xh = (e) => {
7213
+ }, _h = (e) => {
7185
7214
  if (!e) return O;
7186
7215
  const t = nr(e), s = [];
7187
7216
  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`
@@ -7194,7 +7223,7 @@ const lh = (e) => {
7194
7223
  </div>
7195
7224
  </div>
7196
7225
  `;
7197
- }, _h = (e, t) => {
7226
+ }, Sh = (e, t) => {
7198
7227
  if ((t?.length ?? 0) < 2) return O;
7199
7228
  const s = wr(e.subGroupState(t));
7200
7229
  return h`
@@ -7205,10 +7234,10 @@ const lh = (e) => {
7205
7234
  @change=${(i) => e._toggleSubGroup(t, i.target.checked)}
7206
7235
  ></dss-form-checkbox>
7207
7236
  `;
7208
- }, Sh = (e, t) => h`
7237
+ }, Ch = (e, t) => h`
7209
7238
  <div class="diagnostics">
7210
7239
  <div class="diagnostics__header">
7211
- ${_h(e, t.items)} ${Ch(t.items?.[0])}
7240
+ ${Sh(e, t.items)} ${Dh(t.items?.[0])}
7212
7241
  </div>
7213
7242
  <div class="diagnostics__items">
7214
7243
  ${ne(
@@ -7228,24 +7257,24 @@ const lh = (e) => {
7228
7257
  ></dss-form-checkbox>
7229
7258
  ${t.component}
7230
7259
  </div>
7231
- `, Ch = (e) => e && h`
7260
+ `, Dh = (e) => e && h`
7232
7261
  ${e.diagnostics.filter((t) => t.descripcio != null && t.descripcio.trim() !== "").map(
7233
7262
  (t) => h`<dss-badge text=${t.descripcio?.toUpperCase()} state="info" size="sm" outlined hideIcon></dss-badge>`
7234
7263
  )}
7235
7264
  `;
7236
- var Dh = Object.defineProperty, Th = Object.getOwnPropertyDescriptor, Y = (e, t, s, i) => {
7237
- for (var r = i > 1 ? void 0 : i ? Th(t, s) : t, n = e.length - 1, o; n >= 0; n--)
7265
+ var Th = Object.defineProperty, Ih = Object.getOwnPropertyDescriptor, Y = (e, t, s, i) => {
7266
+ for (var r = i > 1 ? void 0 : i ? Ih(t, s) : t, n = e.length - 1, o; n >= 0; n--)
7238
7267
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
7239
- return i && r && Dh(t, s, r), r;
7268
+ return i && r && Th(t, s, r), r;
7240
7269
  };
7241
- const Ih = (e) => {
7270
+ const $h = (e) => {
7242
7271
  const t = document.createElement("div");
7243
7272
  return t.textContent = e, t.innerHTML;
7244
- }, $h = ["p", "br", "span", "div", "strong", "em", "u", "s", "sub", "sup", "b", "i", "a", "code", "pre", "blockquote", "h1", "h2", "h3", "h4", "h5", "h6", "ul", "ol", "li"], Eh = new RegExp(`<(?!/?(?:${$h.join("|")})\\b)`, "gi"), Fh = (e) => e.replace(Eh, "&lt;"), Oh = (e) => {
7273
+ }, Eh = ["p", "br", "span", "div", "strong", "em", "u", "s", "sub", "sup", "b", "i", "a", "code", "pre", "blockquote", "h1", "h2", "h3", "h4", "h5", "h6", "ul", "ol", "li"], Fh = new RegExp(`<(?!/?(?:${Eh.join("|")})\\b)`, "gi"), Oh = (e) => e.replace(Fh, "&lt;"), Mh = (e) => {
7245
7274
  const t = [], s = [];
7246
7275
  for (const i of e) {
7247
7276
  const r = i.content?.plainText?.trim(), n = i.content?.html?.trim();
7248
- r && t.push(r), n ? s.push(Fh(n)) : r && s.push(`<p>${Ih(r)}</p>`);
7277
+ r && t.push(r), n ? s.push(Oh(n)) : r && s.push(`<p>${$h(r)}</p>`);
7249
7278
  }
7250
7279
  return { raw: t.join(`
7251
7280
 
@@ -7253,12 +7282,12 @@ const Ih = (e) => {
7253
7282
  };
7254
7283
  let R = class extends L {
7255
7284
  constructor() {
7256
- super(...arguments), this.historyGroups = [], this.searchString = "", this.rulesByCollectionId = {}, this.todayOnly = !1, this.diagnosticsOnly = !1, this.availableDiagnostics = [], this.filteredGroups = [], this.totalCount = 0, this.selectedIds = [], this._virtualScrollerState = vr, this._scrollerController = new ah(), this._searchTimeout = null, this._didInitialPreselect = !1, this._measureElement = (e) => {
7285
+ super(...arguments), this.historyGroups = [], this.searchString = "", this.rulesByCollectionId = {}, this.todayOnly = !1, this.diagnosticsOnly = !1, this.availableDiagnostics = [], this.filteredGroups = [], this.totalCount = 0, this.selectedIds = [], this._virtualScrollerState = vr, this._scrollerController = new lh(), this._searchTimeout = null, this._didInitialPreselect = !1, this._measureElement = (e) => {
7257
7286
  e && this._scrollerController.measureElement(e);
7258
7287
  };
7259
7288
  }
7260
7289
  render() {
7261
- return h`${gh(this)}`;
7290
+ return h`${yh(this)}`;
7262
7291
  }
7263
7292
  // ── Lifecycle ───────────────────────────────────────────────────────────
7264
7293
  connectedCallback() {
@@ -7370,8 +7399,8 @@ let R = class extends L {
7370
7399
  // El filtre és un tot-o-res: quan està marcat, filtra per tots els
7371
7400
  // diagnòstics que el host ha passat a l'importador.
7372
7401
  diagnosticCodes: this.diagnosticsOnly ? this.availableDiagnostics.map((s) => s.code) : []
7373
- }, t = ph(this.historyGroups || [], e, this.rulesByCollectionId);
7374
- this.filteredGroups = await oh(t), this.totalCount = Je(this.filteredGroups).length;
7402
+ }, t = mh(this.historyGroups || [], e, this.rulesByCollectionId);
7403
+ this.filteredGroups = await ah(t), this.totalCount = Je(this.filteredGroups).length;
7375
7404
  }
7376
7405
  _syncVirtualScroller() {
7377
7406
  this._virtualScrollerState = this._scrollerController.sync({
@@ -7409,14 +7438,14 @@ let R = class extends L {
7409
7438
  subGroups: (s.subGroups || []).map((i) => ({ ...i, items: i.items.filter((r) => e.has(r.id)) })).filter((i) => i.items.length > 0)
7410
7439
  })).filter((s) => s.items.length > 0 || s.subGroups.length > 0);
7411
7440
  this.api.importDataManager.selectItems({
7412
- pluginId: nh,
7441
+ pluginId: oh,
7413
7442
  data: t,
7414
- text: Oh(Je(t))
7443
+ text: Mh(Je(t))
7415
7444
  });
7416
7445
  }
7417
7446
  };
7418
7447
  R.styles = W`
7419
- ${q(mh)}
7448
+ ${q(gh)}
7420
7449
  `;
7421
7450
  Y([
7422
7451
  Ce(V.primaryApi)
@@ -7457,8 +7486,8 @@ Y([
7457
7486
  R = Y([
7458
7487
  j("activity-history-importer")
7459
7488
  ], R);
7460
- const Mh = ":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}", Ph = (e) => h`<div class="container" ?maximized=${e.maximized}>
7461
- ${e.maximized ? h`${kh(e)}` : h`<div class="header">
7489
+ const Ph = ":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}", kh = (e) => h`<div class="container" ?maximized=${e.maximized}>
7490
+ ${e.maximized ? h`${Ah(e)}` : h`<div class="header">
7462
7491
  <div class="header__left">
7463
7492
  <div class="title">${v("activityHistory")}</div>
7464
7493
  <activity-history-search-bar @onSearchChange=${e._handleSearchChange} .searchQuery=${e.searchQuery}></activity-history-search-bar>
@@ -7491,7 +7520,7 @@ const Mh = ":host{display:flex;min-height:1px;height:100%;width:100%}.container{
7491
7520
  ${e.historyGroups?.length || !e.isAnyCollectionBusy ? h`<activity-history-timeline></activity-history-timeline>` : O}
7492
7521
  </div>
7493
7522
  </div>
7494
- </div>`, kh = (e) => h`
7523
+ </div>`, Ah = (e) => h`
7495
7524
  <div class="header-maximized-container">
7496
7525
  <div class="header__maximized">
7497
7526
  <div class="header__maximized__left">
@@ -7516,17 +7545,17 @@ const Mh = ":host{display:flex;min-height:1px;height:100%;width:100%}.container{
7516
7545
  </div>
7517
7546
  </div>
7518
7547
  `;
7519
- var Ah = Object.defineProperty, Hh = Object.getOwnPropertyDescriptor, Te = (e, t, s, i) => {
7520
- for (var r = i > 1 ? void 0 : i ? Hh(t, s) : t, n = e.length - 1, o; n >= 0; n--)
7548
+ var Hh = Object.defineProperty, Rh = Object.getOwnPropertyDescriptor, Te = (e, t, s, i) => {
7549
+ for (var r = i > 1 ? void 0 : i ? Rh(t, s) : t, n = e.length - 1, o; n >= 0; n--)
7521
7550
  (o = e[n]) && (r = (i ? o(t, s, r) : o(r)) || r);
7522
- return i && r && Ah(t, s, r), r;
7551
+ return i && r && Hh(t, s, r), r;
7523
7552
  };
7524
7553
  let te = class extends Mr(L) {
7525
7554
  constructor() {
7526
7555
  super(...arguments), this.subscriptions = [], this._searchTimeout = null, this.maximized = !1, this.searchQuery = "";
7527
7556
  }
7528
7557
  render() {
7529
- return h`${Ph(this)}`;
7558
+ return h`${kh(this)}`;
7530
7559
  }
7531
7560
  connectedCallback() {
7532
7561
  super.connectedCallback();
@@ -7580,7 +7609,7 @@ let te = class extends Mr(L) {
7580
7609
  }
7581
7610
  };
7582
7611
  te.styles = W`
7583
- ${q(Mh)}
7612
+ ${q(Ph)}
7584
7613
  `;
7585
7614
  Te([
7586
7615
  K({ type: Boolean, reflect: !0 })
@@ -7603,7 +7632,7 @@ Te([
7603
7632
  te = Te([
7604
7633
  j("activity-history-main")
7605
7634
  ], te);
7606
- const _r = "activity-history-importer", Rh = (e) => {
7635
+ const _r = "activity-history-importer", zh = (e) => {
7607
7636
  e.regionManager.registerView(e.regionManager.regions.clinicalMonitoring.content, {
7608
7637
  id: e.pluginInfo.pluginId,
7609
7638
  factory: () => Promise.resolve(new te())
@@ -7612,18 +7641,18 @@ const _r = "activity-history-importer", Rh = (e) => {
7612
7641
  factory: () => Promise.resolve(new R()),
7613
7642
  sortHint: "0020"
7614
7643
  });
7615
- }, zh = async () => {
7644
+ }, Gh = async () => {
7616
7645
  const e = _e.get(V.primaryApi);
7617
7646
  await e.regionManager.removeView(e.regionManager.regions.clinicalMonitoring.content, e.pluginInfo.pluginId), await e.regionManager.removeView(e.regionManager.regions.shell.importDataActivityHistory, _r);
7618
- }, Gh = (e) => {
7619
- ih(e);
7620
- }, Vh = () => {
7621
- rh(), io();
7622
- }, qh = async (e) => (Si(e), Rh(e), await go(e), ro(e), Gh(e), Promise.resolve()), Wh = async () => {
7623
- await zh(), Si(null), Vh(), no();
7647
+ }, Vh = (e) => {
7648
+ rh(e);
7649
+ }, Bh = () => {
7650
+ nh(), io();
7651
+ }, Wh = async (e) => (Si(e), zh(e), await go(e), ro(e), Vh(e), Promise.resolve()), Lh = async () => {
7652
+ await Gh(), Si(null), Bh(), no();
7624
7653
  };
7625
7654
  export {
7626
- Wh as dispose,
7627
- qh as initialize
7655
+ Lh as dispose,
7656
+ Wh as initialize
7628
7657
  };
7629
- //# sourceMappingURL=plugin-DS8LOzZZ.js.map
7658
+ //# sourceMappingURL=plugin-BPpYe_wT.js.map