@claudebernard/patient-profile-element 0.5.5 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,9 +11,9 @@ function calculateBMI(weight, height) {
11
11
  const isStrTagged = (val) => typeof val !== "string" && "strTag" in val;
12
12
  const joinStringsAndValues = (strings, values, valueOrder) => {
13
13
  let concat = strings[0];
14
- for (let i2 = 1; i2 < strings.length; i2++) {
15
- concat += values[i2 - 1];
16
- concat += strings[i2];
14
+ for (let i4 = 1; i4 < strings.length; i4++) {
15
+ concat += values[i4 - 1];
16
+ concat += strings[i4];
17
17
  }
18
18
  return concat;
19
19
  };
@@ -36,8 +36,8 @@ class Deferred {
36
36
  this._reject(error);
37
37
  }
38
38
  }
39
- for (let i2 = 0; i2 < 256; i2++) {
40
- (i2 >> 4 & 15).toString(16) + (i2 & 15).toString(16);
39
+ for (let i4 = 0; i4 < 256; i4++) {
40
+ (i4 >> 4 & 15).toString(16) + (i4 & 15).toString(16);
41
41
  }
42
42
  let loading = new Deferred();
43
43
  loading.resolve();
@@ -1035,7 +1035,7 @@ function childPughScore(score) {
1035
1035
  }
1036
1036
  return msg("Stade C");
1037
1037
  }
1038
- const t$2 = globalThis, e$4 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$2 = /* @__PURE__ */ Symbol(), o$4 = /* @__PURE__ */ new WeakMap();
1038
+ const t$2 = globalThis, e$5 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$2 = /* @__PURE__ */ Symbol(), o$4 = /* @__PURE__ */ new WeakMap();
1039
1039
  let n$3 = class n {
1040
1040
  constructor(t2, e2, o2) {
1041
1041
  if (this._$cssResult$ = true, o2 !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
@@ -1044,7 +1044,7 @@ let n$3 = class n {
1044
1044
  get styleSheet() {
1045
1045
  let t2 = this.o;
1046
1046
  const s2 = this.t;
1047
- if (e$4 && void 0 === t2) {
1047
+ if (e$5 && void 0 === t2) {
1048
1048
  const e2 = void 0 !== s2 && 1 === s2.length;
1049
1049
  e2 && (t2 = o$4.get(s2)), void 0 === t2 && ((this.o = t2 = new CSSStyleSheet()).replaceSync(this.cssText), e2 && o$4.set(s2, t2));
1050
1050
  }
@@ -1054,7 +1054,7 @@ let n$3 = class n {
1054
1054
  return this.cssText;
1055
1055
  }
1056
1056
  };
1057
- const r$4 = (t2) => new n$3("string" == typeof t2 ? t2 : t2 + "", void 0, s$2), i$3 = (t2, ...e2) => {
1057
+ const r$4 = (t2) => new n$3("string" == typeof t2 ? t2 : t2 + "", void 0, s$2), i$5 = (t2, ...e2) => {
1058
1058
  const o2 = 1 === t2.length ? t2[0] : e2.reduce((e3, s2, o3) => e3 + ((t3) => {
1059
1059
  if (true === t3._$cssResult$) return t3.cssText;
1060
1060
  if ("number" == typeof t3) return t3;
@@ -1062,17 +1062,17 @@ const r$4 = (t2) => new n$3("string" == typeof t2 ? t2 : t2 + "", void 0, s$2),
1062
1062
  })(s2) + t2[o3 + 1], t2[0]);
1063
1063
  return new n$3(o2, t2, s$2);
1064
1064
  }, S$1 = (s2, o2) => {
1065
- if (e$4) s2.adoptedStyleSheets = o2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet);
1065
+ if (e$5) s2.adoptedStyleSheets = o2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet);
1066
1066
  else for (const e2 of o2) {
1067
1067
  const o3 = document.createElement("style"), n3 = t$2.litNonce;
1068
1068
  void 0 !== n3 && o3.setAttribute("nonce", n3), o3.textContent = e2.cssText, s2.appendChild(o3);
1069
1069
  }
1070
- }, c$2 = e$4 ? (t2) => t2 : (t2) => t2 instanceof CSSStyleSheet ? ((t3) => {
1070
+ }, c$2 = e$5 ? (t2) => t2 : (t2) => t2 instanceof CSSStyleSheet ? ((t3) => {
1071
1071
  let e2 = "";
1072
1072
  for (const s2 of t3.cssRules) e2 += s2.cssText;
1073
1073
  return r$4(e2);
1074
1074
  })(t2) : t2;
1075
- const { is: i$2, defineProperty: e$3, getOwnPropertyDescriptor: h$1, getOwnPropertyNames: r$3, getOwnPropertySymbols: o$3, getPrototypeOf: n$2 } = Object, a$1 = globalThis, c$1 = a$1.trustedTypes, l$1 = c$1 ? c$1.emptyScript : "", p$1 = a$1.reactiveElementPolyfillSupport, d$1 = (t2, s2) => t2, u$1 = { toAttribute(t2, s2) {
1075
+ const { is: i$4, defineProperty: e$4, getOwnPropertyDescriptor: h$1, getOwnPropertyNames: r$3, getOwnPropertySymbols: o$3, getPrototypeOf: n$2 } = Object, a$1 = globalThis, c$1 = a$1.trustedTypes, l$1 = c$1 ? c$1.emptyScript : "", p$2 = a$1.reactiveElementPolyfillSupport, d$1 = (t2, s2) => t2, u$1 = { toAttribute(t2, s2) {
1076
1076
  switch (s2) {
1077
1077
  case Boolean:
1078
1078
  t2 = t2 ? l$1 : null;
@@ -1083,24 +1083,24 @@ const { is: i$2, defineProperty: e$3, getOwnPropertyDescriptor: h$1, getOwnPrope
1083
1083
  }
1084
1084
  return t2;
1085
1085
  }, fromAttribute(t2, s2) {
1086
- let i2 = t2;
1086
+ let i4 = t2;
1087
1087
  switch (s2) {
1088
1088
  case Boolean:
1089
- i2 = null !== t2;
1089
+ i4 = null !== t2;
1090
1090
  break;
1091
1091
  case Number:
1092
- i2 = null === t2 ? null : Number(t2);
1092
+ i4 = null === t2 ? null : Number(t2);
1093
1093
  break;
1094
1094
  case Object:
1095
1095
  case Array:
1096
1096
  try {
1097
- i2 = JSON.parse(t2);
1097
+ i4 = JSON.parse(t2);
1098
1098
  } catch (t3) {
1099
- i2 = null;
1099
+ i4 = null;
1100
1100
  }
1101
1101
  }
1102
- return i2;
1103
- } }, f$1 = (t2, s2) => !i$2(t2, s2), b$1 = { attribute: true, type: String, converter: u$1, reflect: false, useDefault: false, hasChanged: f$1 };
1102
+ return i4;
1103
+ } }, f$1 = (t2, s2) => !i$4(t2, s2), b$1 = { attribute: true, type: String, converter: u$1, reflect: false, useDefault: false, hasChanged: f$1 };
1104
1104
  Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), a$1.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
1105
1105
  let y$1 = class y extends HTMLElement {
1106
1106
  static addInitializer(t2) {
@@ -1111,11 +1111,11 @@ let y$1 = class y extends HTMLElement {
1111
1111
  }
1112
1112
  static createProperty(t2, s2 = b$1) {
1113
1113
  if (s2.state && (s2.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t2) && ((s2 = Object.create(s2)).wrapped = true), this.elementProperties.set(t2, s2), !s2.noAccessor) {
1114
- const i2 = /* @__PURE__ */ Symbol(), h2 = this.getPropertyDescriptor(t2, i2, s2);
1115
- void 0 !== h2 && e$3(this.prototype, t2, h2);
1114
+ const i4 = /* @__PURE__ */ Symbol(), h2 = this.getPropertyDescriptor(t2, i4, s2);
1115
+ void 0 !== h2 && e$4(this.prototype, t2, h2);
1116
1116
  }
1117
1117
  }
1118
- static getPropertyDescriptor(t2, s2, i2) {
1118
+ static getPropertyDescriptor(t2, s2, i4) {
1119
1119
  const { get: e2, set: r2 } = h$1(this.prototype, t2) ?? { get() {
1120
1120
  return this[s2];
1121
1121
  }, set(t3) {
@@ -1123,7 +1123,7 @@ let y$1 = class y extends HTMLElement {
1123
1123
  } };
1124
1124
  return { get: e2, set(s3) {
1125
1125
  const h2 = e2?.call(this);
1126
- r2?.call(this, s3), this.requestUpdate(t2, h2, i2);
1126
+ r2?.call(this, s3), this.requestUpdate(t2, h2, i4);
1127
1127
  }, configurable: true, enumerable: true };
1128
1128
  }
1129
1129
  static getPropertyOptions(t2) {
@@ -1138,31 +1138,31 @@ let y$1 = class y extends HTMLElement {
1138
1138
  if (this.hasOwnProperty(d$1("finalized"))) return;
1139
1139
  if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
1140
1140
  const t3 = this.properties, s2 = [...r$3(t3), ...o$3(t3)];
1141
- for (const i2 of s2) this.createProperty(i2, t3[i2]);
1141
+ for (const i4 of s2) this.createProperty(i4, t3[i4]);
1142
1142
  }
1143
1143
  const t2 = this[Symbol.metadata];
1144
1144
  if (null !== t2) {
1145
1145
  const s2 = litPropertyMetadata.get(t2);
1146
- if (void 0 !== s2) for (const [t3, i2] of s2) this.elementProperties.set(t3, i2);
1146
+ if (void 0 !== s2) for (const [t3, i4] of s2) this.elementProperties.set(t3, i4);
1147
1147
  }
1148
1148
  this._$Eh = /* @__PURE__ */ new Map();
1149
1149
  for (const [t3, s2] of this.elementProperties) {
1150
- const i2 = this._$Eu(t3, s2);
1151
- void 0 !== i2 && this._$Eh.set(i2, t3);
1150
+ const i4 = this._$Eu(t3, s2);
1151
+ void 0 !== i4 && this._$Eh.set(i4, t3);
1152
1152
  }
1153
1153
  this.elementStyles = this.finalizeStyles(this.styles);
1154
1154
  }
1155
1155
  static finalizeStyles(s2) {
1156
- const i2 = [];
1156
+ const i4 = [];
1157
1157
  if (Array.isArray(s2)) {
1158
1158
  const e2 = new Set(s2.flat(1 / 0).reverse());
1159
- for (const s3 of e2) i2.unshift(c$2(s3));
1160
- } else void 0 !== s2 && i2.push(c$2(s2));
1161
- return i2;
1159
+ for (const s3 of e2) i4.unshift(c$2(s3));
1160
+ } else void 0 !== s2 && i4.push(c$2(s2));
1161
+ return i4;
1162
1162
  }
1163
1163
  static _$Eu(t2, s2) {
1164
- const i2 = s2.attribute;
1165
- return false === i2 ? void 0 : "string" == typeof i2 ? i2 : "string" == typeof t2 ? t2.toLowerCase() : void 0;
1164
+ const i4 = s2.attribute;
1165
+ return false === i4 ? void 0 : "string" == typeof i4 ? i4 : "string" == typeof t2 ? t2.toLowerCase() : void 0;
1166
1166
  }
1167
1167
  constructor() {
1168
1168
  super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
@@ -1178,7 +1178,7 @@ let y$1 = class y extends HTMLElement {
1178
1178
  }
1179
1179
  _$E_() {
1180
1180
  const t2 = /* @__PURE__ */ new Map(), s2 = this.constructor.elementProperties;
1181
- for (const i2 of s2.keys()) this.hasOwnProperty(i2) && (t2.set(i2, this[i2]), delete this[i2]);
1181
+ for (const i4 of s2.keys()) this.hasOwnProperty(i4) && (t2.set(i4, this[i4]), delete this[i4]);
1182
1182
  t2.size > 0 && (this._$Ep = t2);
1183
1183
  }
1184
1184
  createRenderRoot() {
@@ -1193,35 +1193,35 @@ let y$1 = class y extends HTMLElement {
1193
1193
  disconnectedCallback() {
1194
1194
  this._$EO?.forEach((t2) => t2.hostDisconnected?.());
1195
1195
  }
1196
- attributeChangedCallback(t2, s2, i2) {
1197
- this._$AK(t2, i2);
1196
+ attributeChangedCallback(t2, s2, i4) {
1197
+ this._$AK(t2, i4);
1198
1198
  }
1199
1199
  _$ET(t2, s2) {
1200
- const i2 = this.constructor.elementProperties.get(t2), e2 = this.constructor._$Eu(t2, i2);
1201
- if (void 0 !== e2 && true === i2.reflect) {
1202
- const h2 = (void 0 !== i2.converter?.toAttribute ? i2.converter : u$1).toAttribute(s2, i2.type);
1200
+ const i4 = this.constructor.elementProperties.get(t2), e2 = this.constructor._$Eu(t2, i4);
1201
+ if (void 0 !== e2 && true === i4.reflect) {
1202
+ const h2 = (void 0 !== i4.converter?.toAttribute ? i4.converter : u$1).toAttribute(s2, i4.type);
1203
1203
  this._$Em = t2, null == h2 ? this.removeAttribute(e2) : this.setAttribute(e2, h2), this._$Em = null;
1204
1204
  }
1205
1205
  }
1206
1206
  _$AK(t2, s2) {
1207
- const i2 = this.constructor, e2 = i2._$Eh.get(t2);
1207
+ const i4 = this.constructor, e2 = i4._$Eh.get(t2);
1208
1208
  if (void 0 !== e2 && this._$Em !== e2) {
1209
- const t3 = i2.getPropertyOptions(e2), h2 = "function" == typeof t3.converter ? { fromAttribute: t3.converter } : void 0 !== t3.converter?.fromAttribute ? t3.converter : u$1;
1209
+ const t3 = i4.getPropertyOptions(e2), h2 = "function" == typeof t3.converter ? { fromAttribute: t3.converter } : void 0 !== t3.converter?.fromAttribute ? t3.converter : u$1;
1210
1210
  this._$Em = e2;
1211
1211
  const r2 = h2.fromAttribute(s2, t3.type);
1212
1212
  this[e2] = r2 ?? this._$Ej?.get(e2) ?? r2, this._$Em = null;
1213
1213
  }
1214
1214
  }
1215
- requestUpdate(t2, s2, i2, e2 = false, h2) {
1215
+ requestUpdate(t2, s2, i4, e2 = false, h2) {
1216
1216
  if (void 0 !== t2) {
1217
1217
  const r2 = this.constructor;
1218
- if (false === e2 && (h2 = this[t2]), i2 ??= r2.getPropertyOptions(t2), !((i2.hasChanged ?? f$1)(h2, s2) || i2.useDefault && i2.reflect && h2 === this._$Ej?.get(t2) && !this.hasAttribute(r2._$Eu(t2, i2)))) return;
1219
- this.C(t2, s2, i2);
1218
+ if (false === e2 && (h2 = this[t2]), i4 ??= r2.getPropertyOptions(t2), !((i4.hasChanged ?? f$1)(h2, s2) || i4.useDefault && i4.reflect && h2 === this._$Ej?.get(t2) && !this.hasAttribute(r2._$Eu(t2, i4)))) return;
1219
+ this.C(t2, s2, i4);
1220
1220
  }
1221
1221
  false === this.isUpdatePending && (this._$ES = this._$EP());
1222
1222
  }
1223
- C(t2, s2, { useDefault: i2, reflect: e2, wrapped: h2 }, r2) {
1224
- i2 && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t2) && (this._$Ej.set(t2, r2 ?? s2 ?? this[t2]), true !== h2 || void 0 !== r2) || (this._$AL.has(t2) || (this.hasUpdated || i2 || (s2 = void 0), this._$AL.set(t2, s2)), true === e2 && this._$Em !== t2 && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t2));
1223
+ C(t2, s2, { useDefault: i4, reflect: e2, wrapped: h2 }, r2) {
1224
+ i4 && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t2) && (this._$Ej.set(t2, r2 ?? s2 ?? this[t2]), true !== h2 || void 0 !== r2) || (this._$AL.has(t2) || (this.hasUpdated || i4 || (s2 = void 0), this._$AL.set(t2, s2)), true === e2 && this._$Em !== t2 && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t2));
1225
1225
  }
1226
1226
  async _$EP() {
1227
1227
  this.isUpdatePending = true;
@@ -1244,9 +1244,9 @@ let y$1 = class y extends HTMLElement {
1244
1244
  this._$Ep = void 0;
1245
1245
  }
1246
1246
  const t3 = this.constructor.elementProperties;
1247
- if (t3.size > 0) for (const [s3, i2] of t3) {
1248
- const { wrapped: t4 } = i2, e2 = this[s3];
1249
- true !== t4 || this._$AL.has(s3) || void 0 === e2 || this.C(s3, void 0, i2, e2);
1247
+ if (t3.size > 0) for (const [s3, i4] of t3) {
1248
+ const { wrapped: t4 } = i4, e2 = this[s3];
1249
+ true !== t4 || this._$AL.has(s3) || void 0 === e2 || this.C(s3, void 0, i4, e2);
1250
1250
  }
1251
1251
  }
1252
1252
  let t2 = false;
@@ -1283,47 +1283,47 @@ let y$1 = class y extends HTMLElement {
1283
1283
  firstUpdated(t2) {
1284
1284
  }
1285
1285
  };
1286
- y$1.elementStyles = [], y$1.shadowRootOptions = { mode: "open" }, y$1[d$1("elementProperties")] = /* @__PURE__ */ new Map(), y$1[d$1("finalized")] = /* @__PURE__ */ new Map(), p$1?.({ ReactiveElement: y$1 }), (a$1.reactiveElementVersions ??= []).push("2.1.2");
1287
- const t$1 = globalThis, i$1 = (t2) => t2, s$1 = t$1.trustedTypes, e$2 = s$1 ? s$1.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, h = "$lit$", o$2 = `lit$${Math.random().toFixed(9).slice(2)}$`, n$1 = "?" + o$2, r$2 = `<${n$1}>`, l = document, c = () => l.createComment(""), a = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, u = Array.isArray, d = (t2) => u(t2) || "function" == typeof t2?.[Symbol.iterator], f = "[ \n\f\r]", v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m = />/g, p = RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^
1288
- \f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y2 = /^(?:script|style|textarea|title)$/i, x = (t2) => (i2, ...s2) => ({ _$litType$: t2, strings: i2, values: s2 }), b = x(1), E = /* @__PURE__ */ Symbol.for("lit-noChange"), A = /* @__PURE__ */ Symbol.for("lit-nothing"), C = /* @__PURE__ */ new WeakMap(), P = l.createTreeWalker(l, 129);
1289
- function V(t2, i2) {
1286
+ y$1.elementStyles = [], y$1.shadowRootOptions = { mode: "open" }, y$1[d$1("elementProperties")] = /* @__PURE__ */ new Map(), y$1[d$1("finalized")] = /* @__PURE__ */ new Map(), p$2?.({ ReactiveElement: y$1 }), (a$1.reactiveElementVersions ??= []).push("2.1.2");
1287
+ const t$1 = globalThis, i$3 = (t2) => t2, s$1 = t$1.trustedTypes, e$3 = s$1 ? s$1.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, h = "$lit$", o$2 = `lit$${Math.random().toFixed(9).slice(2)}$`, n$1 = "?" + o$2, r$2 = `<${n$1}>`, l = document, c = () => l.createComment(""), a = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, u = Array.isArray, d = (t2) => u(t2) || "function" == typeof t2?.[Symbol.iterator], f = "[ \n\f\r]", v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m$1 = />/g, p$1 = RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^
1288
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y2 = /^(?:script|style|textarea|title)$/i, x = (t2) => (i4, ...s2) => ({ _$litType$: t2, strings: i4, values: s2 }), b = x(1), E = /* @__PURE__ */ Symbol.for("lit-noChange"), A = /* @__PURE__ */ Symbol.for("lit-nothing"), C = /* @__PURE__ */ new WeakMap(), P = l.createTreeWalker(l, 129);
1289
+ function V(t2, i4) {
1290
1290
  if (!u(t2) || !t2.hasOwnProperty("raw")) throw Error("invalid template strings array");
1291
- return void 0 !== e$2 ? e$2.createHTML(i2) : i2;
1291
+ return void 0 !== e$3 ? e$3.createHTML(i4) : i4;
1292
1292
  }
1293
- const N = (t2, i2) => {
1293
+ const N = (t2, i4) => {
1294
1294
  const s2 = t2.length - 1, e2 = [];
1295
- let n3, l2 = 2 === i2 ? "<svg>" : 3 === i2 ? "<math>" : "", c2 = v;
1296
- for (let i3 = 0; i3 < s2; i3++) {
1297
- const s3 = t2[i3];
1295
+ let n3, l2 = 2 === i4 ? "<svg>" : 3 === i4 ? "<math>" : "", c2 = v;
1296
+ for (let i5 = 0; i5 < s2; i5++) {
1297
+ const s3 = t2[i5];
1298
1298
  let a2, u2, d2 = -1, f2 = 0;
1299
- for (; f2 < s3.length && (c2.lastIndex = f2, u2 = c2.exec(s3), null !== u2); ) f2 = c2.lastIndex, c2 === v ? "!--" === u2[1] ? c2 = _ : void 0 !== u2[1] ? c2 = m : void 0 !== u2[2] ? (y2.test(u2[2]) && (n3 = RegExp("</" + u2[2], "g")), c2 = p) : void 0 !== u2[3] && (c2 = p) : c2 === p ? ">" === u2[0] ? (c2 = n3 ?? v, d2 = -1) : void 0 === u2[1] ? d2 = -2 : (d2 = c2.lastIndex - u2[2].length, a2 = u2[1], c2 = void 0 === u2[3] ? p : '"' === u2[3] ? $ : g) : c2 === $ || c2 === g ? c2 = p : c2 === _ || c2 === m ? c2 = v : (c2 = p, n3 = void 0);
1300
- const x2 = c2 === p && t2[i3 + 1].startsWith("/>") ? " " : "";
1301
- l2 += c2 === v ? s3 + r$2 : d2 >= 0 ? (e2.push(a2), s3.slice(0, d2) + h + s3.slice(d2) + o$2 + x2) : s3 + o$2 + (-2 === d2 ? i3 : x2);
1299
+ for (; f2 < s3.length && (c2.lastIndex = f2, u2 = c2.exec(s3), null !== u2); ) f2 = c2.lastIndex, c2 === v ? "!--" === u2[1] ? c2 = _ : void 0 !== u2[1] ? c2 = m$1 : void 0 !== u2[2] ? (y2.test(u2[2]) && (n3 = RegExp("</" + u2[2], "g")), c2 = p$1) : void 0 !== u2[3] && (c2 = p$1) : c2 === p$1 ? ">" === u2[0] ? (c2 = n3 ?? v, d2 = -1) : void 0 === u2[1] ? d2 = -2 : (d2 = c2.lastIndex - u2[2].length, a2 = u2[1], c2 = void 0 === u2[3] ? p$1 : '"' === u2[3] ? $ : g) : c2 === $ || c2 === g ? c2 = p$1 : c2 === _ || c2 === m$1 ? c2 = v : (c2 = p$1, n3 = void 0);
1300
+ const x2 = c2 === p$1 && t2[i5 + 1].startsWith("/>") ? " " : "";
1301
+ l2 += c2 === v ? s3 + r$2 : d2 >= 0 ? (e2.push(a2), s3.slice(0, d2) + h + s3.slice(d2) + o$2 + x2) : s3 + o$2 + (-2 === d2 ? i5 : x2);
1302
1302
  }
1303
- return [V(t2, l2 + (t2[s2] || "<?>") + (2 === i2 ? "</svg>" : 3 === i2 ? "</math>" : "")), e2];
1303
+ return [V(t2, l2 + (t2[s2] || "<?>") + (2 === i4 ? "</svg>" : 3 === i4 ? "</math>" : "")), e2];
1304
1304
  };
1305
1305
  class S {
1306
- constructor({ strings: t2, _$litType$: i2 }, e2) {
1306
+ constructor({ strings: t2, _$litType$: i4 }, e2) {
1307
1307
  let r2;
1308
1308
  this.parts = [];
1309
1309
  let l2 = 0, a2 = 0;
1310
- const u2 = t2.length - 1, d2 = this.parts, [f2, v2] = N(t2, i2);
1311
- if (this.el = S.createElement(f2, e2), P.currentNode = this.el.content, 2 === i2 || 3 === i2) {
1310
+ const u2 = t2.length - 1, d2 = this.parts, [f2, v2] = N(t2, i4);
1311
+ if (this.el = S.createElement(f2, e2), P.currentNode = this.el.content, 2 === i4 || 3 === i4) {
1312
1312
  const t3 = this.el.content.firstChild;
1313
1313
  t3.replaceWith(...t3.childNodes);
1314
1314
  }
1315
1315
  for (; null !== (r2 = P.nextNode()) && d2.length < u2; ) {
1316
1316
  if (1 === r2.nodeType) {
1317
1317
  if (r2.hasAttributes()) for (const t3 of r2.getAttributeNames()) if (t3.endsWith(h)) {
1318
- const i3 = v2[a2++], s2 = r2.getAttribute(t3).split(o$2), e3 = /([.?@])?(.*)/.exec(i3);
1318
+ const i5 = v2[a2++], s2 = r2.getAttribute(t3).split(o$2), e3 = /([.?@])?(.*)/.exec(i5);
1319
1319
  d2.push({ type: 1, index: l2, name: e3[2], strings: s2, ctor: "." === e3[1] ? I : "?" === e3[1] ? L : "@" === e3[1] ? z : H }), r2.removeAttribute(t3);
1320
1320
  } else t3.startsWith(o$2) && (d2.push({ type: 6, index: l2 }), r2.removeAttribute(t3));
1321
1321
  if (y2.test(r2.tagName)) {
1322
- const t3 = r2.textContent.split(o$2), i3 = t3.length - 1;
1323
- if (i3 > 0) {
1322
+ const t3 = r2.textContent.split(o$2), i5 = t3.length - 1;
1323
+ if (i5 > 0) {
1324
1324
  r2.textContent = s$1 ? s$1.emptyScript : "";
1325
- for (let s2 = 0; s2 < i3; s2++) r2.append(t3[s2], c()), P.nextNode(), d2.push({ type: 2, index: ++l2 });
1326
- r2.append(t3[i3], c());
1325
+ for (let s2 = 0; s2 < i5; s2++) r2.append(t3[s2], c()), P.nextNode(), d2.push({ type: 2, index: ++l2 });
1326
+ r2.append(t3[i5], c());
1327
1327
  }
1328
1328
  }
1329
1329
  } else if (8 === r2.nodeType) if (r2.data === n$1) d2.push({ type: 2, index: l2 });
@@ -1334,20 +1334,20 @@ class S {
1334
1334
  l2++;
1335
1335
  }
1336
1336
  }
1337
- static createElement(t2, i2) {
1337
+ static createElement(t2, i4) {
1338
1338
  const s2 = l.createElement("template");
1339
1339
  return s2.innerHTML = t2, s2;
1340
1340
  }
1341
1341
  }
1342
- function M(t2, i2, s2 = t2, e2) {
1343
- if (i2 === E) return i2;
1342
+ function M(t2, i4, s2 = t2, e2) {
1343
+ if (i4 === E) return i4;
1344
1344
  let h2 = void 0 !== e2 ? s2._$Co?.[e2] : s2._$Cl;
1345
- const o2 = a(i2) ? void 0 : i2._$litDirective$;
1346
- return h2?.constructor !== o2 && (h2?._$AO?.(false), void 0 === o2 ? h2 = void 0 : (h2 = new o2(t2), h2._$AT(t2, s2, e2)), void 0 !== e2 ? (s2._$Co ??= [])[e2] = h2 : s2._$Cl = h2), void 0 !== h2 && (i2 = M(t2, h2._$AS(t2, i2.values), h2, e2)), i2;
1345
+ const o2 = a(i4) ? void 0 : i4._$litDirective$;
1346
+ return h2?.constructor !== o2 && (h2?._$AO?.(false), void 0 === o2 ? h2 = void 0 : (h2 = new o2(t2), h2._$AT(t2, s2, e2)), void 0 !== e2 ? (s2._$Co ??= [])[e2] = h2 : s2._$Cl = h2), void 0 !== h2 && (i4 = M(t2, h2._$AS(t2, i4.values), h2, e2)), i4;
1347
1347
  }
1348
1348
  class R {
1349
- constructor(t2, i2) {
1350
- this._$AV = [], this._$AN = void 0, this._$AD = t2, this._$AM = i2;
1349
+ constructor(t2, i4) {
1350
+ this._$AV = [], this._$AN = void 0, this._$AD = t2, this._$AM = i4;
1351
1351
  }
1352
1352
  get parentNode() {
1353
1353
  return this._$AM.parentNode;
@@ -1356,34 +1356,34 @@ class R {
1356
1356
  return this._$AM._$AU;
1357
1357
  }
1358
1358
  u(t2) {
1359
- const { el: { content: i2 }, parts: s2 } = this._$AD, e2 = (t2?.creationScope ?? l).importNode(i2, true);
1359
+ const { el: { content: i4 }, parts: s2 } = this._$AD, e2 = (t2?.creationScope ?? l).importNode(i4, true);
1360
1360
  P.currentNode = e2;
1361
1361
  let h2 = P.nextNode(), o2 = 0, n3 = 0, r2 = s2[0];
1362
1362
  for (; void 0 !== r2; ) {
1363
1363
  if (o2 === r2.index) {
1364
- let i3;
1365
- 2 === r2.type ? i3 = new k(h2, h2.nextSibling, this, t2) : 1 === r2.type ? i3 = new r2.ctor(h2, r2.name, r2.strings, this, t2) : 6 === r2.type && (i3 = new Z(h2, this, t2)), this._$AV.push(i3), r2 = s2[++n3];
1364
+ let i5;
1365
+ 2 === r2.type ? i5 = new k(h2, h2.nextSibling, this, t2) : 1 === r2.type ? i5 = new r2.ctor(h2, r2.name, r2.strings, this, t2) : 6 === r2.type && (i5 = new Z(h2, this, t2)), this._$AV.push(i5), r2 = s2[++n3];
1366
1366
  }
1367
1367
  o2 !== r2?.index && (h2 = P.nextNode(), o2++);
1368
1368
  }
1369
1369
  return P.currentNode = l, e2;
1370
1370
  }
1371
1371
  p(t2) {
1372
- let i2 = 0;
1373
- for (const s2 of this._$AV) void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++;
1372
+ let i4 = 0;
1373
+ for (const s2 of this._$AV) void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i4), i4 += s2.strings.length - 2) : s2._$AI(t2[i4])), i4++;
1374
1374
  }
1375
1375
  }
1376
1376
  class k {
1377
1377
  get _$AU() {
1378
1378
  return this._$AM?._$AU ?? this._$Cv;
1379
1379
  }
1380
- constructor(t2, i2, s2, e2) {
1381
- this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cv = e2?.isConnected ?? true;
1380
+ constructor(t2, i4, s2, e2) {
1381
+ this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t2, this._$AB = i4, this._$AM = s2, this.options = e2, this._$Cv = e2?.isConnected ?? true;
1382
1382
  }
1383
1383
  get parentNode() {
1384
1384
  let t2 = this._$AA.parentNode;
1385
- const i2 = this._$AM;
1386
- return void 0 !== i2 && 11 === t2?.nodeType && (t2 = i2.parentNode), t2;
1385
+ const i4 = this._$AM;
1386
+ return void 0 !== i4 && 11 === t2?.nodeType && (t2 = i4.parentNode), t2;
1387
1387
  }
1388
1388
  get startNode() {
1389
1389
  return this._$AA;
@@ -1391,8 +1391,8 @@ class k {
1391
1391
  get endNode() {
1392
1392
  return this._$AB;
1393
1393
  }
1394
- _$AI(t2, i2 = this) {
1395
- t2 = M(this, t2, i2), a(t2) ? t2 === A || null == t2 || "" === t2 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t2 !== this._$AH && t2 !== E && this._(t2) : void 0 !== t2._$litType$ ? this.$(t2) : void 0 !== t2.nodeType ? this.T(t2) : d(t2) ? this.k(t2) : this._(t2);
1394
+ _$AI(t2, i4 = this) {
1395
+ t2 = M(this, t2, i4), a(t2) ? t2 === A || null == t2 || "" === t2 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t2 !== this._$AH && t2 !== E && this._(t2) : void 0 !== t2._$litType$ ? this.$(t2) : void 0 !== t2.nodeType ? this.T(t2) : d(t2) ? this.k(t2) : this._(t2);
1396
1396
  }
1397
1397
  O(t2) {
1398
1398
  return this._$AA.parentNode.insertBefore(t2, this._$AB);
@@ -1404,28 +1404,28 @@ class k {
1404
1404
  this._$AH !== A && a(this._$AH) ? this._$AA.nextSibling.data = t2 : this.T(l.createTextNode(t2)), this._$AH = t2;
1405
1405
  }
1406
1406
  $(t2) {
1407
- const { values: i2, _$litType$: s2 } = t2, e2 = "number" == typeof s2 ? this._$AC(t2) : (void 0 === s2.el && (s2.el = S.createElement(V(s2.h, s2.h[0]), this.options)), s2);
1408
- if (this._$AH?._$AD === e2) this._$AH.p(i2);
1407
+ const { values: i4, _$litType$: s2 } = t2, e2 = "number" == typeof s2 ? this._$AC(t2) : (void 0 === s2.el && (s2.el = S.createElement(V(s2.h, s2.h[0]), this.options)), s2);
1408
+ if (this._$AH?._$AD === e2) this._$AH.p(i4);
1409
1409
  else {
1410
1410
  const t3 = new R(e2, this), s3 = t3.u(this.options);
1411
- t3.p(i2), this.T(s3), this._$AH = t3;
1411
+ t3.p(i4), this.T(s3), this._$AH = t3;
1412
1412
  }
1413
1413
  }
1414
1414
  _$AC(t2) {
1415
- let i2 = C.get(t2.strings);
1416
- return void 0 === i2 && C.set(t2.strings, i2 = new S(t2)), i2;
1415
+ let i4 = C.get(t2.strings);
1416
+ return void 0 === i4 && C.set(t2.strings, i4 = new S(t2)), i4;
1417
1417
  }
1418
1418
  k(t2) {
1419
1419
  u(this._$AH) || (this._$AH = [], this._$AR());
1420
- const i2 = this._$AH;
1420
+ const i4 = this._$AH;
1421
1421
  let s2, e2 = 0;
1422
- for (const h2 of t2) e2 === i2.length ? i2.push(s2 = new k(this.O(c()), this.O(c()), this, this.options)) : s2 = i2[e2], s2._$AI(h2), e2++;
1423
- e2 < i2.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i2.length = e2);
1422
+ for (const h2 of t2) e2 === i4.length ? i4.push(s2 = new k(this.O(c()), this.O(c()), this, this.options)) : s2 = i4[e2], s2._$AI(h2), e2++;
1423
+ e2 < i4.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i4.length = e2);
1424
1424
  }
1425
1425
  _$AR(t2 = this._$AA.nextSibling, s2) {
1426
1426
  for (this._$AP?.(false, true, s2); t2 !== this._$AB; ) {
1427
- const s3 = i$1(t2).nextSibling;
1428
- i$1(t2).remove(), t2 = s3;
1427
+ const s3 = i$3(t2).nextSibling;
1428
+ i$3(t2).remove(), t2 = s3;
1429
1429
  }
1430
1430
  }
1431
1431
  setConnected(t2) {
@@ -1439,17 +1439,17 @@ class H {
1439
1439
  get _$AU() {
1440
1440
  return this._$AM._$AU;
1441
1441
  }
1442
- constructor(t2, i2, s2, e2, h2) {
1443
- this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = h2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = A;
1442
+ constructor(t2, i4, s2, e2, h2) {
1443
+ this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t2, this.name = i4, this._$AM = e2, this.options = h2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = A;
1444
1444
  }
1445
- _$AI(t2, i2 = this, s2, e2) {
1445
+ _$AI(t2, i4 = this, s2, e2) {
1446
1446
  const h2 = this.strings;
1447
1447
  let o2 = false;
1448
- if (void 0 === h2) t2 = M(this, t2, i2, 0), o2 = !a(t2) || t2 !== this._$AH && t2 !== E, o2 && (this._$AH = t2);
1448
+ if (void 0 === h2) t2 = M(this, t2, i4, 0), o2 = !a(t2) || t2 !== this._$AH && t2 !== E, o2 && (this._$AH = t2);
1449
1449
  else {
1450
1450
  const e3 = t2;
1451
1451
  let n3, r2;
1452
- for (t2 = h2[0], n3 = 0; n3 < h2.length - 1; n3++) r2 = M(this, e3[s2 + n3], i2, n3), r2 === E && (r2 = this._$AH[n3]), o2 ||= !a(r2) || r2 !== this._$AH[n3], r2 === A ? t2 = A : t2 !== A && (t2 += (r2 ?? "") + h2[n3 + 1]), this._$AH[n3] = r2;
1452
+ for (t2 = h2[0], n3 = 0; n3 < h2.length - 1; n3++) r2 = M(this, e3[s2 + n3], i4, n3), r2 === E && (r2 = this._$AH[n3]), o2 ||= !a(r2) || r2 !== this._$AH[n3], r2 === A ? t2 = A : t2 !== A && (t2 += (r2 ?? "") + h2[n3 + 1]), this._$AH[n3] = r2;
1453
1453
  }
1454
1454
  o2 && !e2 && this.j(t2);
1455
1455
  }
@@ -1474,11 +1474,11 @@ class L extends H {
1474
1474
  }
1475
1475
  }
1476
1476
  class z extends H {
1477
- constructor(t2, i2, s2, e2, h2) {
1478
- super(t2, i2, s2, e2, h2), this.type = 5;
1477
+ constructor(t2, i4, s2, e2, h2) {
1478
+ super(t2, i4, s2, e2, h2), this.type = 5;
1479
1479
  }
1480
- _$AI(t2, i2 = this) {
1481
- if ((t2 = M(this, t2, i2, 0) ?? A) === E) return;
1480
+ _$AI(t2, i4 = this) {
1481
+ if ((t2 = M(this, t2, i4, 0) ?? A) === E) return;
1482
1482
  const s2 = this._$AH, e2 = t2 === A && s2 !== A || t2.capture !== s2.capture || t2.once !== s2.once || t2.passive !== s2.passive, h2 = t2 !== A && (s2 === A || e2);
1483
1483
  e2 && this.element.removeEventListener(this.name, this, s2), h2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
1484
1484
  }
@@ -1487,8 +1487,8 @@ class z extends H {
1487
1487
  }
1488
1488
  }
1489
1489
  class Z {
1490
- constructor(t2, i2, s2) {
1491
- this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i2, this.options = s2;
1490
+ constructor(t2, i4, s2) {
1491
+ this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i4, this.options = s2;
1492
1492
  }
1493
1493
  get _$AU() {
1494
1494
  return this._$AM._$AU;
@@ -1499,17 +1499,17 @@ class Z {
1499
1499
  }
1500
1500
  const B = t$1.litHtmlPolyfillSupport;
1501
1501
  B?.(S, k), (t$1.litHtmlVersions ??= []).push("3.3.3");
1502
- const D = (t2, i2, s2) => {
1503
- const e2 = s2?.renderBefore ?? i2;
1502
+ const D = (t2, i4, s2) => {
1503
+ const e2 = s2?.renderBefore ?? i4;
1504
1504
  let h2 = e2._$litPart$;
1505
1505
  if (void 0 === h2) {
1506
1506
  const t3 = s2?.renderBefore ?? null;
1507
- e2._$litPart$ = h2 = new k(i2.insertBefore(c(), t3), t3, void 0, s2 ?? {});
1507
+ e2._$litPart$ = h2 = new k(i4.insertBefore(c(), t3), t3, void 0, s2 ?? {});
1508
1508
  }
1509
1509
  return h2._$AI(t2), h2;
1510
1510
  };
1511
1511
  const s = globalThis;
1512
- class i extends y$1 {
1512
+ let i$2 = class i extends y$1 {
1513
1513
  constructor() {
1514
1514
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
1515
1515
  }
@@ -1530,10 +1530,10 @@ class i extends y$1 {
1530
1530
  render() {
1531
1531
  return E;
1532
1532
  }
1533
- }
1534
- i._$litElement$ = true, i["finalized"] = true, s.litElementHydrateSupport?.({ LitElement: i });
1533
+ };
1534
+ i$2._$litElement$ = true, i$2["finalized"] = true, s.litElementHydrateSupport?.({ LitElement: i$2 });
1535
1535
  const o$1 = s.litElementPolyfillSupport;
1536
- o$1?.({ LitElement: i });
1536
+ o$1?.({ LitElement: i$2 });
1537
1537
  (s.litElementVersions ??= []).push("4.2.2");
1538
1538
  const t = (t2) => (e2, o2) => {
1539
1539
  void 0 !== o2 ? o2.addInitializer(() => {
@@ -1541,9 +1541,9 @@ const t = (t2) => (e2, o2) => {
1541
1541
  }) : customElements.define(t2, e2);
1542
1542
  };
1543
1543
  const o = { attribute: true, type: String, converter: u$1, reflect: false, hasChanged: f$1 }, r$1 = (t2 = o, e2, r2) => {
1544
- const { kind: n3, metadata: i2 } = r2;
1545
- let s2 = globalThis.litPropertyMetadata.get(i2);
1546
- if (void 0 === s2 && globalThis.litPropertyMetadata.set(i2, s2 = /* @__PURE__ */ new Map()), "setter" === n3 && ((t2 = Object.create(t2)).wrapped = true), s2.set(r2.name, t2), "accessor" === n3) {
1544
+ const { kind: n3, metadata: i4 } = r2;
1545
+ let s2 = globalThis.litPropertyMetadata.get(i4);
1546
+ if (void 0 === s2 && globalThis.litPropertyMetadata.set(i4, s2 = /* @__PURE__ */ new Map()), "setter" === n3 && ((t2 = Object.create(t2)).wrapped = true), s2.set(r2.name, t2), "accessor" === n3) {
1547
1547
  const { name: o2 } = r2;
1548
1548
  return { set(r3) {
1549
1549
  const n4 = e2.get.call(this);
@@ -1570,11 +1570,11 @@ function n2(t2) {
1570
1570
  function r(r2) {
1571
1571
  return n2({ ...r2, state: true, attribute: false });
1572
1572
  }
1573
- const e$1 = (e2, t2, c2) => (c2.configurable = true, c2.enumerable = true, Reflect.decorate && "object" != typeof t2 && Object.defineProperty(e2, t2, c2), c2);
1574
- function e(e2, r2) {
1575
- return (n3, s2, i2) => {
1573
+ const e$2 = (e2, t2, c2) => (c2.configurable = true, c2.enumerable = true, Reflect.decorate && "object" != typeof t2 && Object.defineProperty(e2, t2, c2), c2);
1574
+ function e$1(e2, r2) {
1575
+ return (n3, s2, i4) => {
1576
1576
  const o2 = (t2) => t2.renderRoot?.querySelector(e2) ?? null;
1577
- return e$1(n3, s2, { get() {
1577
+ return e$2(n3, s2, { get() {
1578
1578
  return o2(this);
1579
1579
  } });
1580
1580
  };
@@ -1628,18 +1628,47 @@ const fetchMoleculesByTerm = async (term, params, apiUrl) => {
1628
1628
  });
1629
1629
  return response.json();
1630
1630
  };
1631
+ const e = (t2) => (...e2) => ({ _$litDirective$: t2, values: e2 });
1632
+ let i$1 = class i2 {
1633
+ constructor(t2) {
1634
+ }
1635
+ get _$AU() {
1636
+ return this._$AM._$AU;
1637
+ }
1638
+ _$AT(t2, e2, i4) {
1639
+ this._$Ct = t2, this._$AM = e2, this._$Ci = i4;
1640
+ }
1641
+ _$AS(t2, e2) {
1642
+ return this.update(t2, e2);
1643
+ }
1644
+ update(t2, e2) {
1645
+ return this.render(...e2);
1646
+ }
1647
+ };
1648
+ const m = {}, p = (o2, t2 = m) => o2._$AH = t2;
1649
+ const i3 = e(class extends i$1 {
1650
+ constructor() {
1651
+ super(...arguments), this.key = A;
1652
+ }
1653
+ render(r2, t2) {
1654
+ return this.key = r2, t2;
1655
+ }
1656
+ update(r2, [t2, e2]) {
1657
+ return t2 !== this.key && (p(r2), this.key = t2), e2;
1658
+ }
1659
+ });
1631
1660
  const patientProfileEditionCSS = ".claudebernard-edition-modal {\n font-size: 0.9rem;\n}\n.claudebernard-edition-modal-content {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 60vw;\n height: 100%;\n max-height: 60vh;\n gap: 16px;\n}\n.claudebernard-edition-modal-large-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n}\n.claudebernard-edition-modal-information-section {\n display: flex;\n flex-direction: row;\n gap: 16px;\n}\n.claudebernard-edition-modal-little-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n flex: 1;\n min-width: 0;\n}\n.claudebernard-edition-modal-little-section bcbd-input {\n height: 100%;\n}\n.claudebernard-edition-modal-pregnant-div {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n.claudebernard-edition-modal-pregnant-div bcbd-input {\n width: 40% !important;\n}\n.claudebernard-edition-modal-action-buttons {\n display: flex;\n justify-content: flex-end;\n height: 100%;\n gap: 16px;\n padding-top: 10px;\n padding-bottom: 30px;\n align-items: flex-end;\n}\n.claudebernard-edition-modal-subtitle {\n font-weight: 600;\n font-size: 1.1rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n.claudebernard-edition-modal-error-message {\n color: var(--bcbd-danger-color, #CF406E);\n font-size: 0.8rem;\n}\n.claudebernard-edition-modal-age-input-group {\n display: flex;\n gap: 8px;\n}\n.claudebernard-edition-modal-age-input-group bcbd-input {\n width: 50% !important;\n}\n.claudebernard-edition-modal-age-input-group bcbd-select {\n width: 50% !important;\n}\n.claudebernard-edition-modal-fieldset {\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n margin-inline: 0;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n.claudebernard-edition-modal-disclaimer-section {\n font-size: 0.8rem;\n}\n\nbcbd-checkbox {\n --bcbd-checkbox-font-size: .9rem;\n}";
1632
1661
  var __defProp$1 = Object.defineProperty;
1633
1662
  var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
1634
1663
  var __decorateClass$1 = (decorators, target, key, kind) => {
1635
1664
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
1636
- for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1637
- if (decorator = decorators[i2])
1665
+ for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
1666
+ if (decorator = decorators[i4])
1638
1667
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1639
1668
  if (kind && result) __defProp$1(target, key, result);
1640
1669
  return result;
1641
1670
  };
1642
- let PatientProfileEdition = class extends i {
1671
+ let PatientProfileEdition = class extends i$2 {
1643
1672
  constructor() {
1644
1673
  super(...arguments);
1645
1674
  this.apiUrl = "https://api-dev.claudebernard.fr";
@@ -1666,6 +1695,19 @@ let PatientProfileEdition = class extends i {
1666
1695
  this.selectedPathologyOptions = [];
1667
1696
  this.selectedAllergyOptions = [];
1668
1697
  this.imc = 0;
1698
+ this.resetKey = 0;
1699
+ }
1700
+ get isAgeDisplay() {
1701
+ return this.preferences?.forms?.age?.display ?? true;
1702
+ }
1703
+ get isAgeReadOnly() {
1704
+ return this.preferences?.forms?.age?.readOnly ?? true;
1705
+ }
1706
+ get isSexeDisplay() {
1707
+ return this.preferences?.forms?.sexe?.display ?? true;
1708
+ }
1709
+ get isSexeReadOnly() {
1710
+ return this.preferences?.forms?.sexe?.readOnly ?? true;
1669
1711
  }
1670
1712
  open() {
1671
1713
  this.editionModalElement.open();
@@ -1679,15 +1721,18 @@ let PatientProfileEdition = class extends i {
1679
1721
  }
1680
1722
  this.recalculateRenalValues();
1681
1723
  }
1682
- updated(changedProperties) {
1683
- if (!changedProperties.has("patientProfile")) {
1684
- return;
1685
- }
1724
+ resetToProfileValues() {
1686
1725
  this.imc = calculateBMI(getPatientWeight(this.patientProfile) ?? 0, getPatientHeight(this.patientProfile) ?? 0);
1687
1726
  this.defaultPatientSex = this.getPatientSexFromProfile();
1688
1727
  this.defaultHepaticStade = this.getPatientHepaticStadeFromProfile();
1689
1728
  this.selectedPathologyOptions = getPatientConditionsWithCode(this.patientProfile);
1690
1729
  this.selectedAllergyOptions = getPatientAllergiesWithCode(this.patientProfile);
1730
+ this.ageErrorMessageInput = "";
1731
+ this.sizeErrorMessageInput = "";
1732
+ this.weightErrorMessageInput = "";
1733
+ this.renalLackInformationErrorMessage = "";
1734
+ this.pathologyOptions = [];
1735
+ this.allergyOptions = [];
1691
1736
  this.breastfeeding = getPatientBreastfeedingStatus(this.patientProfile);
1692
1737
  this.isPregnant = getPatientPregnancyStatus(this.patientProfile);
1693
1738
  const birthDate = getPatientBirthDate(this.patientProfile);
@@ -1730,6 +1775,17 @@ let PatientProfileEdition = class extends i {
1730
1775
  this.creatinineByMg = creatinineByMg?.value ?? 0;
1731
1776
  this.creatinineByUmol = creatinineByUmol?.value ?? 0;
1732
1777
  }
1778
+ updated(changedProperties) {
1779
+ if (!changedProperties.has("patientProfile")) {
1780
+ return;
1781
+ }
1782
+ this.resetToProfileValues();
1783
+ }
1784
+ handleCancel() {
1785
+ this.resetToProfileValues();
1786
+ this.resetKey++;
1787
+ this.editionModalElement.close();
1788
+ }
1733
1789
  verifyAgeInput() {
1734
1790
  const age = Number(this.ageInput?.value ?? 0);
1735
1791
  if (age < 2 && this.patientUnitAge === "ans") {
@@ -1982,22 +2038,24 @@ let PatientProfileEdition = class extends i {
1982
2038
  render() {
1983
2039
  return b`
1984
2040
  <bcbd-modal title="Édition du profil patient" persistent id="patient-profile-edition-modal" class="${PREFIX}-edition-modal" data-test-id="patient-profile-edition-modal" >
1985
- <div class="${PREFIX}-edition-modal-content">
2041
+ ${i3(this.resetKey, b`<div class="${PREFIX}-edition-modal-content">
1986
2042
  <div class="${PREFIX}-edition-modal-large-section">
1987
2043
  <bcbd-select data-test-id="name-select" .selectedOptions=${{ value: "1", label: getPatientName(this.patientProfile) }} readonly></bcbd-select>
1988
2044
  </div>
1989
2045
  <div class="${PREFIX}-edition-modal-information-section">
2046
+ ${this.isSexeDisplay ? b`
1990
2047
  <div class="${PREFIX}-edition-modal-little-section">
1991
2048
  <span>Sexe</span>
1992
- <bcbd-select data-test-id="sex-select" id="genderSelect" placeholder="Choisir" .options=${sexOptions} .selectedOptions=${this.defaultPatientSex} @change=${this.modifyGender}></bcbd-select>
1993
- </div>
2049
+ <bcbd-select data-test-id="sex-select" id="genderSelect" ?disabled=${this.isSexeReadOnly} placeholder="Choisir" .options=${sexOptions} .selectedOptions=${this.defaultPatientSex} ?readonly=${this.isSexeReadOnly} @change=${this.modifyGender}></bcbd-select>
2050
+ </div>` : A}
2051
+ ${this.isAgeDisplay ? b`
1994
2052
  <div class="${PREFIX}-edition-modal-little-section">
1995
2053
  <span>Age</span>
1996
2054
  <div class="${PREFIX}-edition-modal-age-input-group">
1997
- <bcbd-input data-test-id="age-input" id="ageInput" required type="number" aria-label="Age" .value=${this.patientAge} warning-msg="" @change=${this.verifyAgeInput}></bcbd-input>
1998
- <bcbd-select data-test-id="age-unit-select" id="ageUnitSelect" .options=${ageOptions} .selectedOptions=${this.defaultPatientUnitAge} @change=${this.handleAgeUnit}></bcbd-select>
2055
+ <bcbd-input data-test-id="age-input" id="ageInput" ?disabled=${this.isAgeReadOnly} required type="number" aria-label="Age" .value=${this.patientAge} warning-msg="" ?readonly=${this.isAgeReadOnly} @change=${this.verifyAgeInput}></bcbd-input>
2056
+ <bcbd-select data-test-id="age-unit-select" id="ageUnitSelect" ?disabled=${this.isAgeReadOnly} .options=${ageOptions} .selectedOptions=${this.defaultPatientUnitAge} ?readonly=${this.isAgeReadOnly} @change=${this.handleAgeUnit}></bcbd-select>
1999
2057
  </div>
2000
- </div>
2058
+ </div>` : A}
2001
2059
  <div class="${PREFIX}-edition-modal-little-section">
2002
2060
  <span>Taille (cm)</span>
2003
2061
  <bcbd-input data-test-id="size-input" id="sizeInput" type="number" aria-label="Taille (cm)" .value=${getPatientHeight(this.patientProfile) ?? ""} warning-msg="" @change=${this.verifySizeInput}></bcbd-input>
@@ -2081,13 +2139,13 @@ let PatientProfileEdition = class extends i {
2081
2139
  <div class="${PREFIX}-edition-modal-action-buttons" data-test-id="action-buttons">
2082
2140
  <bcbd-button ?disabled=${this.ageErrorMessageInput !== "" || this.sizeErrorMessageInput !== "" || this.weightErrorMessageInput !== ""}
2083
2141
  data-test-id="save-button" background-color="primary" @click=${this.validateForm}>Valider</bcbd-button>
2084
- <bcbd-button data-test-id="cancel-button" outlined background-color="primary" @click=${() => this.editionModalElement.close()}>Annuler</bcbd-button>
2142
+ <bcbd-button data-test-id="cancel-button" outlined background-color="primary" @click=${this.handleCancel}>Annuler</bcbd-button>
2085
2143
  </div>
2086
- </div>
2144
+ </div>`)}
2087
2145
  </bcbd-modal>`;
2088
2146
  }
2089
2147
  };
2090
- PatientProfileEdition.styles = i$3`${r$4(patientProfileEditionCSS)}`;
2148
+ PatientProfileEdition.styles = i$5`${r$4(patientProfileEditionCSS)}`;
2091
2149
  __decorateClass$1([
2092
2150
  n2({ type: Object, attribute: "patient-profile" })
2093
2151
  ], PatientProfileEdition.prototype, "patientProfile", 2);
@@ -2170,40 +2228,43 @@ __decorateClass$1([
2170
2228
  r()
2171
2229
  ], PatientProfileEdition.prototype, "imc", 2);
2172
2230
  __decorateClass$1([
2173
- e("#sizeInput")
2231
+ r()
2232
+ ], PatientProfileEdition.prototype, "resetKey", 2);
2233
+ __decorateClass$1([
2234
+ e$1("#sizeInput")
2174
2235
  ], PatientProfileEdition.prototype, "sizeInput", 2);
2175
2236
  __decorateClass$1([
2176
- e("#ageInput")
2237
+ e$1("#ageInput")
2177
2238
  ], PatientProfileEdition.prototype, "ageInput", 2);
2178
2239
  __decorateClass$1([
2179
- e("#weightInput")
2240
+ e$1("#weightInput")
2180
2241
  ], PatientProfileEdition.prototype, "weightInput", 2);
2181
2242
  __decorateClass$1([
2182
- e("#creatinineUmolInput")
2243
+ e$1("#creatinineUmolInput")
2183
2244
  ], PatientProfileEdition.prototype, "creatinineUmolInput", 2);
2184
2245
  __decorateClass$1([
2185
- e("#creatininemgLInput")
2246
+ e$1("#creatininemgLInput")
2186
2247
  ], PatientProfileEdition.prototype, "creatinineMgLInput", 2);
2187
2248
  __decorateClass$1([
2188
- e("#clairanceCreatinineInput")
2249
+ e$1("#clairanceCreatinineInput")
2189
2250
  ], PatientProfileEdition.prototype, "clairanceCreatinineInput", 2);
2190
2251
  __decorateClass$1([
2191
- e("#patient-profile-edition-modal")
2252
+ e$1("#patient-profile-edition-modal")
2192
2253
  ], PatientProfileEdition.prototype, "editionModalElement", 2);
2193
2254
  __decorateClass$1([
2194
- e("#dfgInput")
2255
+ e$1("#dfgInput")
2195
2256
  ], PatientProfileEdition.prototype, "dfgInput", 2);
2196
2257
  __decorateClass$1([
2197
- e("#genderSelect")
2258
+ e$1("#genderSelect")
2198
2259
  ], PatientProfileEdition.prototype, "genderSelect", 2);
2199
2260
  __decorateClass$1([
2200
- e("#gestationalWeeksInput")
2261
+ e$1("#gestationalWeeksInput")
2201
2262
  ], PatientProfileEdition.prototype, "gestationalWeeksInput", 2);
2202
2263
  __decorateClass$1([
2203
- e("#hepaticStadeSelect")
2264
+ e$1("#hepaticStadeSelect")
2204
2265
  ], PatientProfileEdition.prototype, "hepaticStadeSelect", 2);
2205
2266
  __decorateClass$1([
2206
- e("#ageUnitSelect")
2267
+ e$1("#ageUnitSelect")
2207
2268
  ], PatientProfileEdition.prototype, "ageUnitSelect", 2);
2208
2269
  PatientProfileEdition = __decorateClass$1([
2209
2270
  t("bcb-patient-profile-edition")
@@ -2212,17 +2273,23 @@ var __defProp = Object.defineProperty;
2212
2273
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
2213
2274
  var __decorateClass = (decorators, target, key, kind) => {
2214
2275
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
2215
- for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2216
- if (decorator = decorators[i2])
2276
+ for (var i4 = decorators.length - 1, decorator; i4 >= 0; i4--)
2277
+ if (decorator = decorators[i4])
2217
2278
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2218
2279
  if (kind && result) __defProp(target, key, result);
2219
2280
  return result;
2220
2281
  };
2221
- let PatientProfile = class extends i {
2282
+ let PatientProfile = class extends i$2 {
2222
2283
  constructor() {
2223
2284
  super(...arguments);
2224
2285
  this.editButtonVisible = true;
2225
2286
  this.apiUrl = "https://api-dev.claudebernard.fr";
2287
+ this.preferences = {
2288
+ forms: {
2289
+ age: { display: true, readOnly: true },
2290
+ sexe: { display: true, readOnly: true }
2291
+ }
2292
+ };
2226
2293
  this.moreInformationVisible = false;
2227
2294
  this.patientAgeUnit = "ans";
2228
2295
  }
@@ -2491,7 +2558,7 @@ let PatientProfile = class extends i {
2491
2558
  `;
2492
2559
  }
2493
2560
  };
2494
- PatientProfile.styles = i$3`${r$4(patientProfileCSS)}`;
2561
+ PatientProfile.styles = i$5`${r$4(patientProfileCSS)}`;
2495
2562
  __decorateClass([
2496
2563
  n2({ type: Object, attribute: "patient-profile" })
2497
2564
  ], PatientProfile.prototype, "patientProfile", 2);
@@ -2514,7 +2581,7 @@ __decorateClass([
2514
2581
  r()
2515
2582
  ], PatientProfile.prototype, "patientAgeUnit", 2);
2516
2583
  __decorateClass([
2517
- e("bcb-patient-profile-edition")
2584
+ e$1("bcb-patient-profile-edition")
2518
2585
  ], PatientProfile.prototype, "editionModalElement", 2);
2519
2586
  PatientProfile = __decorateClass([
2520
2587
  t("bcb-patient-profile")