@justeattakeaway/pie-cookie-banner 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { LitElement as yn, unsafeCSS as Sn, html as F, nothing as Bt } from "lit";
2
- import { state as dt, property as te, queryAll as Rn } from "lit/decorators.js";
3
- import { repeat as Nn } from "lit/directives/repeat.js";
4
- import { unsafeHTML as On } from "lit/directives/unsafe-html.js";
1
+ import { LitElement as Nn, unsafeCSS as Rn, html as F, nothing as Bt } from "lit";
2
+ import { state as dt, property as V, queryAll as Ln } from "lit/decorators.js";
3
+ import { repeat as On } from "lit/directives/repeat.js";
4
+ import { unsafeHTML as $t } from "lit/directives/unsafe-html.js";
5
5
  import "@justeattakeaway/pie-button";
6
6
  import "@justeattakeaway/pie-divider";
7
7
  import "@justeattakeaway/pie-icon-button";
@@ -9,27 +9,27 @@ import "@justeattakeaway/pie-link";
9
9
  import "@justeattakeaway/pie-modal";
10
10
  import "@justeattakeaway/pie-switch";
11
11
  import { safeCustomElement as kn, dispatchCustomEvent as Be } from "@justeattakeaway/pie-webc-core";
12
- import $t from "@justeattakeaway/pie-cookie-banner/locales/en.js";
13
- const Ln = (t, i, o) => {
14
- const r = t[i];
12
+ import Ht from "@justeattakeaway/pie-cookie-banner/locales/en.js";
13
+ const In = (t, n, o) => {
14
+ const r = t[n];
15
15
  return r ? typeof r == "function" ? r() : Promise.resolve(r) : new Promise((s, c) => {
16
16
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
17
17
  c.bind(
18
18
  null,
19
19
  new Error(
20
- "Unknown variable dynamic import: " + i + (i.split("/").length !== o ? ". Note that variables only represent file names one level deep." : "")
20
+ "Unknown variable dynamic import: " + n + (n.split("/").length !== o ? ". Note that variables only represent file names one level deep." : "")
21
21
  )
22
22
  )
23
23
  );
24
24
  });
25
- }, He = class He extends yn {
25
+ }, He = class He extends Nn {
26
26
  willUpdate() {
27
27
  this.getAttribute("v") || this.setAttribute("v", He.v);
28
28
  }
29
29
  };
30
- He.v = "1.9.0";
30
+ He.v = "1.10.0";
31
31
  let ft = He;
32
- const In = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--cb-font-family: var(--dt-font-interactive-l-family);--cb-font-size: calc(var(--dt-font-body-l-size) * 1px);--cb-line-height: calc(var(--dt-font-body-l-line-height) * 1px);--cb-font-weight: var(--dt-font-body-l-weight);--cb-padding-inline: var(--dt-spacing-d);--cb-padding-block: var(--dt-spacing-d);--cb-offset: 0;color-scheme:only dark;background-color:var(--dt-color-background-dark);color:var(--dt-color-content-inverse);font-family:var(--cb-font-family);font-size:var(--cb-font-size);line-height:var(--cb-line-height);font-weight:var(--cb-font-weight);padding-block-start:var(--cb-padding-block);padding-block-end:var(--cb-padding-block);max-height:432px;position:fixed;bottom:var(--cb-offset);left:var(--cb-offset);right:var(--cb-offset);border-top-left-radius:var(--dt-radius-rounded-c);border-top-right-radius:var(--dt-radius-rounded-c);z-index:var(--dt-z-index-cookie-banner)}@media(min-width:700px)and (orientation:landscape){.c-cookieBanner{--cb-padding-inline: var(--dt-spacing-f);--cb-offset: var(--dt-spacing-d);max-height:90%;border-bottom-left-radius:var(--dt-radius-rounded-c);border-bottom-right-radius:var(--dt-radius-rounded-c)}}.c-cookieBanner[isCookieBannerHidden]{display:none}@media(prefers-reduced-motion:no-preference){@keyframes animate-enter{0%{transform:translate3d(0,75%,0)}to{transform:translateZ(0)}}.c-cookieBanner{animation:.5s animate-enter ease-out}}.c-cookieBanner-title,.c-cookieBanner-body,.c-cookieBanner-actions{padding-inline-start:var(--cb-padding-inline);padding-inline-end:var(--cb-padding-inline)}.c-cookieBanner-title{--cb-title-font-size: var(--dt-font-heading-s-size--narrow);--cb-title-line-height: var(--dt-font-heading-s-line-height--narrow);font-size:calc(var(--cb-title-font-size) * 1px);font-weight:var(--dt-font-heading-s-weight);line-height:calc(var(--cb-title-line-height) * 1px)}@media(min-width:700px)and (orientation:landscape){.c-cookieBanner-title{--cb-title-font-size: var(--dt-font-heading-s-size--wide);--cb-title-line-height: var(--dt-font-heading-s-line-height--wide)}}.c-cookieBanner-body{--cb-scroll-shadow-color: var(--dt-color-black);margin-block-start:var(--dt-spacing-a);max-height:200px;overflow-y:auto;background:linear-gradient(to bottom,transparent,var(--dt-color-background-dark) 75%) center bottom,linear-gradient(transparent,var(--cb-scroll-shadow-color)) center bottom;background-repeat:no-repeat;background-size:100% 48px,100% 8px;background-attachment:local,scroll}@media(min-width:700px)and (orientation:landscape){.c-cookieBanner-body{max-height:150px}}.c-cookieBanner-actions{--cb-actions-flex-dir: column;margin-block-start:var(--dt-spacing-d);display:flex;gap:var(--dt-spacing-d);flex-direction:var(--cb-actions-flex-dir)}.c-cookieBanner-actions>pie-link{text-align:center;align-self:center}@media(min-width:700px)and (orientation:landscape){.c-cookieBanner-actions{--cb-actions-flex-dir: row-reverse;justify-content:flex-start;align-items:center}.c-cookieBanner-actions>pie-button{width:auto}}.c-cookieBanner-subheading{--cb-subheading-font-size: var(--dt-font-heading-s-size--narrow);--cb-subheading-line-height: var(--dt-font-heading-s-line-height--narrow);font-size:calc(var(--cb-subheading-font-size) * 1px);font-weight:var(--dt-font-heading-s-weight);line-height:calc(var(--cb-subheading-line-height) * 1px)}@media(min-width:700px)and (orientation:landscape){.c-cookieBanner-subheading{--cb-subheading-font-size: var(--dt-font-heading-s-size--wide);--cb-subheading-line-height: var(--dt-font-heading-s-line-height--wide)}}.c-cookieBanner-description{font-size:calc(var(--dt-font-body-s-size) * 1px);line-height:calc(var(--dt-font-body-s-line-height) * 1px)}.c-cookieBanner-preference{display:flex;gap:var(--dt-spacing-d);justify-content:space-between;margin-block-start:var(--dt-spacing-e);margin-block-end:var(--dt-spacing-e)}.c-cookieBanner-preference p{margin-block-start:var(--dt-spacing-b)}.c-cookieBanner-preference:last-child{margin-block-end:0}", p = {
32
+ const Dn = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--cb-font-family: var(--dt-font-interactive-l-family);--cb-font-size: calc(var(--dt-font-body-l-size) * 1px);--cb-line-height: calc(var(--dt-font-body-l-line-height) * 1px);--cb-font-weight: var(--dt-font-body-l-weight);--cb-padding-inline: var(--dt-spacing-d);--cb-padding-block: var(--dt-spacing-d);--cb-offset: 0;color-scheme:only dark;background-color:var(--dt-color-background-dark);color:var(--dt-color-content-inverse);font-family:var(--cb-font-family);font-size:var(--cb-font-size);line-height:var(--cb-line-height);font-weight:var(--cb-font-weight);padding-block-start:var(--cb-padding-block);padding-block-end:var(--cb-padding-block);max-height:432px;position:fixed;bottom:var(--cb-offset);left:var(--cb-offset);right:var(--cb-offset);border-top-left-radius:var(--dt-radius-rounded-c);border-top-right-radius:var(--dt-radius-rounded-c);z-index:var(--dt-z-index-cookie-banner)}@media(min-width:700px)and (orientation:landscape){.c-cookieBanner{--cb-padding-inline: var(--dt-spacing-f);--cb-offset: var(--dt-spacing-d);max-height:90%;border-bottom-left-radius:var(--dt-radius-rounded-c);border-bottom-right-radius:var(--dt-radius-rounded-c)}}.c-cookieBanner[isCookieBannerHidden]{display:none}@media(prefers-reduced-motion:no-preference){@keyframes animate-enter{0%{transform:translate3d(0,75%,0)}to{transform:translateZ(0)}}.c-cookieBanner{animation:.5s animate-enter ease-out}}.c-cookieBanner-title,.c-cookieBanner-body,.c-cookieBanner-actions{padding-inline-start:var(--cb-padding-inline);padding-inline-end:var(--cb-padding-inline)}.c-cookieBanner-title{--cb-title-font-size: var(--dt-font-heading-s-size--narrow);--cb-title-line-height: var(--dt-font-heading-s-line-height--narrow);font-size:calc(var(--cb-title-font-size) * 1px);font-weight:var(--dt-font-heading-s-weight);line-height:calc(var(--cb-title-line-height) * 1px)}@media(min-width:700px)and (orientation:landscape){.c-cookieBanner-title{--cb-title-font-size: var(--dt-font-heading-s-size--wide);--cb-title-line-height: var(--dt-font-heading-s-line-height--wide)}}.c-cookieBanner-body{--cb-scroll-shadow-color: var(--dt-color-black);margin-block-start:var(--dt-spacing-a);max-height:200px;overflow-y:auto;background:linear-gradient(to bottom,transparent,var(--dt-color-background-dark) 75%) center bottom,linear-gradient(transparent,var(--cb-scroll-shadow-color)) center bottom;background-repeat:no-repeat;background-size:100% 48px,100% 8px;background-attachment:local,scroll}@media(min-width:700px)and (orientation:landscape){.c-cookieBanner-body{max-height:150px}}.c-cookieBanner-actions{--cb-actions-flex-dir: column;margin-block-start:var(--dt-spacing-d);display:flex;gap:var(--dt-spacing-d);flex-direction:var(--cb-actions-flex-dir)}.c-cookieBanner-actions>pie-link{text-align:center;align-self:center}@media(min-width:700px)and (orientation:landscape){.c-cookieBanner-actions{--cb-actions-flex-dir: row-reverse;justify-content:flex-start;align-items:center}.c-cookieBanner-actions>pie-button{width:auto}}.c-cookieBanner-subheading{--cb-subheading-font-size: var(--dt-font-heading-s-size--narrow);--cb-subheading-line-height: var(--dt-font-heading-s-line-height--narrow);font-size:calc(var(--cb-subheading-font-size) * 1px);font-weight:var(--dt-font-heading-s-weight);line-height:calc(var(--cb-subheading-line-height) * 1px)}@media(min-width:700px)and (orientation:landscape){.c-cookieBanner-subheading{--cb-subheading-font-size: var(--dt-font-heading-s-size--wide);--cb-subheading-line-height: var(--dt-font-heading-s-line-height--wide)}}.c-cookieBanner-description{font-size:calc(var(--dt-font-body-s-size) * 1px);line-height:calc(var(--dt-font-body-s-line-height) * 1px)}.c-cookieBanner-preference{display:flex;gap:var(--dt-spacing-d);justify-content:space-between;margin-block-start:var(--dt-spacing-e);margin-block-end:var(--dt-spacing-e)}.c-cookieBanner-preference p{margin-block-start:var(--dt-spacing-b)}.c-cookieBanner-preference:last-child{margin-block-end:0}", p = {
33
33
  BULGARIAN: "bg",
34
34
  CATALAN: "ca",
35
35
  DANISH: "da",
@@ -61,7 +61,7 @@ const In = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--c
61
61
  SLOVAKIA: "sk",
62
62
  SPAIN: "es",
63
63
  SWITZERLAND: "ch"
64
- }, Dn = "pie-cookie-banner-accept-all", Cn = "pie-cookie-banner-necessary-only", wn = "pie-cookie-banner-manage-prefs", vn = "pie-cookie-banner-prefs-saved", Mn = [
64
+ }, Cn = "pie-cookie-banner-accept-all", wn = "pie-cookie-banner-necessary-only", vn = "pie-cookie-banner-manage-prefs", Mn = "pie-cookie-banner-prefs-saved", xn = [
65
65
  {
66
66
  id: "all",
67
67
  hasDivider: !0,
@@ -85,12 +85,14 @@ const In = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--c
85
85
  id: "personalized",
86
86
  hasDescription: !0
87
87
  }
88
- ], Z = {
88
+ ], W = {
89
89
  hasPrimaryActionsOnly: !1,
90
90
  defaultPreferences: {},
91
91
  country: g.GREAT_BRITAIN,
92
92
  language: p.ENGLISH,
93
93
  cookieStatementLink: "",
94
+ personalizedLabel: "",
95
+ personalizedDescription: "",
94
96
  cookieTechnologiesLink: "",
95
97
  openLinksInSameTab: !1
96
98
  }, it = /* @__PURE__ */ new Set([
@@ -110,7 +112,7 @@ const In = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--c
110
112
  `${p.SLOVAK}`,
111
113
  `${p.CATALAN}`,
112
114
  `${p.SPANISH}`
113
- ]), xn = /* @__PURE__ */ new Map([
115
+ ]), Pn = /* @__PURE__ */ new Map([
114
116
  [g.AUSTRALIA, `${p.ENGLISH}`],
115
117
  [g.AUSTRIA, `${p.GERMAN}`],
116
118
  [g.BELGIUM, `${p.DUTCH}`],
@@ -131,130 +133,130 @@ const In = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--c
131
133
  [g.SWITZERLAND, `${p.GERMAN}`]
132
134
  ]);
133
135
  /*! @license DOMPurify 3.4.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.8/LICENSE */
134
- function Ht(t, i) {
135
- (i == null || i > t.length) && (i = t.length);
136
- for (var o = 0, r = Array(i); o < i; o++) r[o] = t[o];
136
+ function Ft(t, n) {
137
+ (n == null || n > t.length) && (n = t.length);
138
+ for (var o = 0, r = Array(n); o < n; o++) r[o] = t[o];
137
139
  return r;
138
140
  }
139
- function Pn(t) {
141
+ function Bn(t) {
140
142
  if (Array.isArray(t)) return t;
141
143
  }
142
- function Bn(t, i) {
144
+ function $n(t, n) {
143
145
  var o = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
144
146
  if (o != null) {
145
- var r, s, c, m, w = [], b = !0, V = !1;
147
+ var r, s, c, d, v = [], b = !0, X = !1;
146
148
  try {
147
- if (c = (o = o.call(t)).next, i !== 0) for (; !(b = (r = c.call(o)).done) && (w.push(r.value), w.length !== i); b = !0) ;
149
+ if (c = (o = o.call(t)).next, n !== 0) for (; !(b = (r = c.call(o)).done) && (v.push(r.value), v.length !== n); b = !0) ;
148
150
  } catch (ne) {
149
- V = !0, s = ne;
151
+ X = !0, s = ne;
150
152
  } finally {
151
153
  try {
152
- if (!b && o.return != null && (m = o.return(), Object(m) !== m)) return;
154
+ if (!b && o.return != null && (d = o.return(), Object(d) !== d)) return;
153
155
  } finally {
154
- if (V) throw s;
156
+ if (X) throw s;
155
157
  }
156
158
  }
157
- return w;
159
+ return v;
158
160
  }
159
161
  }
160
- function $n() {
162
+ function Hn() {
161
163
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
162
164
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
163
165
  }
164
- function Hn(t, i) {
165
- return Pn(t) || Bn(t, i) || Fn(t, i) || $n();
166
+ function Fn(t, n) {
167
+ return Bn(t) || $n(t, n) || Un(t, n) || Hn();
166
168
  }
167
- function Fn(t, i) {
169
+ function Un(t, n) {
168
170
  if (t) {
169
- if (typeof t == "string") return Ht(t, i);
171
+ if (typeof t == "string") return Ft(t, n);
170
172
  var o = {}.toString.call(t).slice(8, -1);
171
- return o === "Object" && t.constructor && (o = t.constructor.name), o === "Map" || o === "Set" ? Array.from(t) : o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o) ? Ht(t, i) : void 0;
173
+ return o === "Object" && t.constructor && (o = t.constructor.name), o === "Map" || o === "Set" ? Array.from(t) : o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o) ? Ft(t, n) : void 0;
172
174
  }
173
175
  }
174
- const Jt = Object.entries, Ft = Object.setPrototypeOf, Un = Object.isFrozen, zn = Object.getPrototypeOf, Gn = Object.getOwnPropertyDescriptor;
175
- let D = Object.freeze, x = Object.seal, me = Object.create, Qt = typeof Reflect < "u" && Reflect, ut = Qt.apply, pt = Qt.construct;
176
- D || (D = function(i) {
177
- return i;
176
+ const en = Object.entries, Ut = Object.setPrototypeOf, zn = Object.isFrozen, Gn = Object.getPrototypeOf, Wn = Object.getOwnPropertyDescriptor;
177
+ let C = Object.freeze, P = Object.seal, me = Object.create, tn = typeof Reflect < "u" && Reflect, ut = tn.apply, pt = tn.construct;
178
+ C || (C = function(n) {
179
+ return n;
178
180
  });
179
- x || (x = function(i) {
180
- return i;
181
+ P || (P = function(n) {
182
+ return n;
181
183
  });
182
- ut || (ut = function(i, o) {
184
+ ut || (ut = function(n, o) {
183
185
  for (var r = arguments.length, s = new Array(r > 2 ? r - 2 : 0), c = 2; c < r; c++)
184
186
  s[c - 2] = arguments[c];
185
- return i.apply(o, s);
187
+ return n.apply(o, s);
186
188
  });
187
- pt || (pt = function(i) {
189
+ pt || (pt = function(n) {
188
190
  for (var o = arguments.length, r = new Array(o > 1 ? o - 1 : 0), s = 1; s < o; s++)
189
191
  r[s - 1] = arguments[s];
190
- return new i(...r);
192
+ return new n(...r);
191
193
  });
192
- const ee = S(Array.prototype.forEach), jn = S(Array.prototype.lastIndexOf), Ut = S(Array.prototype.pop), ue = S(Array.prototype.push), Wn = S(Array.prototype.splice), I = Array.isArray, be = S(String.prototype.toLowerCase), ot = S(String.prototype.toString), zt = S(String.prototype.match), pe = S(String.prototype.replace), Gt = S(String.prototype.indexOf), Yn = S(String.prototype.trim), Vn = S(Number.prototype.toString), Kn = S(Boolean.prototype.toString), jt = typeof BigInt > "u" ? null : S(BigInt.prototype.toString), Wt = typeof Symbol > "u" ? null : S(Symbol.prototype.toString), T = S(Object.prototype.hasOwnProperty), Ee = S(Object.prototype.toString), k = S(RegExp.prototype.test), de = Xn(TypeError);
194
+ const te = S(Array.prototype.forEach), jn = S(Array.prototype.lastIndexOf), zt = S(Array.prototype.pop), ue = S(Array.prototype.push), Yn = S(Array.prototype.splice), D = Array.isArray, be = S(String.prototype.toLowerCase), ot = S(String.prototype.toString), Gt = S(String.prototype.match), pe = S(String.prototype.replace), Wt = S(String.prototype.indexOf), Kn = S(String.prototype.trim), Vn = S(Number.prototype.toString), Xn = S(Boolean.prototype.toString), jt = typeof BigInt > "u" ? null : S(BigInt.prototype.toString), Yt = typeof Symbol > "u" ? null : S(Symbol.prototype.toString), T = S(Object.prototype.hasOwnProperty), Ee = S(Object.prototype.toString), O = S(RegExp.prototype.test), de = qn(TypeError);
193
195
  function S(t) {
194
- return function(i) {
195
- i instanceof RegExp && (i.lastIndex = 0);
196
+ return function(n) {
197
+ n instanceof RegExp && (n.lastIndex = 0);
196
198
  for (var o = arguments.length, r = new Array(o > 1 ? o - 1 : 0), s = 1; s < o; s++)
197
199
  r[s - 1] = arguments[s];
198
- return ut(t, i, r);
200
+ return ut(t, n, r);
199
201
  };
200
202
  }
201
- function Xn(t) {
203
+ function qn(t) {
202
204
  return function() {
203
- for (var i = arguments.length, o = new Array(i), r = 0; r < i; r++)
205
+ for (var n = arguments.length, o = new Array(n), r = 0; r < n; r++)
204
206
  o[r] = arguments[r];
205
207
  return pt(t, o);
206
208
  };
207
209
  }
208
- function f(t, i) {
210
+ function f(t, n) {
209
211
  let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : be;
210
- if (Ft && Ft(t, null), !I(i))
212
+ if (Ut && Ut(t, null), !D(n))
211
213
  return t;
212
- let r = i.length;
214
+ let r = n.length;
213
215
  for (; r--; ) {
214
- let s = i[r];
216
+ let s = n[r];
215
217
  if (typeof s == "string") {
216
218
  const c = o(s);
217
- c !== s && (Un(i) || (i[r] = c), s = c);
219
+ c !== s && (zn(n) || (n[r] = c), s = c);
218
220
  }
219
221
  t[s] = !0;
220
222
  }
221
223
  return t;
222
224
  }
223
- function qn(t) {
224
- for (let i = 0; i < t.length; i++)
225
- T(t, i) || (t[i] = null);
225
+ function Zn(t) {
226
+ for (let n = 0; n < t.length; n++)
227
+ T(t, n) || (t[n] = null);
226
228
  return t;
227
229
  }
228
- function L(t) {
229
- const i = me(null);
230
- for (const r of Jt(t)) {
231
- var o = Hn(r, 2);
230
+ function k(t) {
231
+ const n = me(null);
232
+ for (const r of en(t)) {
233
+ var o = Fn(r, 2);
232
234
  const s = o[0], c = o[1];
233
- T(t, s) && (I(c) ? i[s] = qn(c) : c && typeof c == "object" && c.constructor === Object ? i[s] = L(c) : i[s] = c);
235
+ T(t, s) && (D(c) ? n[s] = Zn(c) : c && typeof c == "object" && c.constructor === Object ? n[s] = k(c) : n[s] = c);
234
236
  }
235
- return i;
237
+ return n;
236
238
  }
237
- function Zn(t) {
239
+ function Jn(t) {
238
240
  switch (typeof t) {
239
241
  case "string":
240
242
  return t;
241
243
  case "number":
242
244
  return Vn(t);
243
245
  case "boolean":
244
- return Kn(t);
246
+ return Xn(t);
245
247
  case "bigint":
246
248
  return jt ? jt(t) : "0";
247
249
  case "symbol":
248
- return Wt ? Wt(t) : "Symbol()";
250
+ return Yt ? Yt(t) : "Symbol()";
249
251
  case "undefined":
250
252
  return Ee(t);
251
253
  case "function":
252
254
  case "object": {
253
255
  if (t === null)
254
256
  return Ee(t);
255
- const i = t, o = W(i, "toString");
257
+ const n = t, o = Y(n, "toString");
256
258
  if (typeof o == "function") {
257
- const r = o(i);
259
+ const r = o(n);
258
260
  return typeof r == "string" ? r : Ee(r);
259
261
  }
260
262
  return Ee(t);
@@ -263,36 +265,36 @@ function Zn(t) {
263
265
  return Ee(t);
264
266
  }
265
267
  }
266
- function W(t, i) {
268
+ function Y(t, n) {
267
269
  for (; t !== null; ) {
268
- const r = Gn(t, i);
270
+ const r = Wn(t, n);
269
271
  if (r) {
270
272
  if (r.get)
271
273
  return S(r.get);
272
274
  if (typeof r.value == "function")
273
275
  return S(r.value);
274
276
  }
275
- t = zn(t);
277
+ t = Gn(t);
276
278
  }
277
279
  function o() {
278
280
  return null;
279
281
  }
280
282
  return o;
281
283
  }
282
- function Jn(t) {
284
+ function Qn(t) {
283
285
  try {
284
- return k(t, ""), !0;
286
+ return O(t, ""), !0;
285
287
  } catch {
286
288
  return !1;
287
289
  }
288
290
  }
289
- const Yt = D(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), rt = D(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), at = D(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Qn = D(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), st = D(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), ei = D(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Vt = D(["#text"]), Kt = D(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), lt = D(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Xt = D(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), $e = D(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), ti = x(/{{[\w\W]*|^[\w\W]*}}/g), ni = x(/<%[\w\W]*|^[\w\W]*%>/g), ii = x(/\${[\w\W]*/g), oi = x(/^data-[\-\w.\u00B7-\uFFFF]+$/), ri = x(/^aria-[\-\w]+$/), qt = x(
291
+ const Kt = C(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), rt = C(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), at = C(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), ei = C(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), st = C(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), ti = C(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Vt = C(["#text"]), Xt = C(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), lt = C(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), qt = C(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), $e = C(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), ni = P(/{{[\w\W]*|^[\w\W]*}}/g), ii = P(/<%[\w\W]*|^[\w\W]*%>/g), oi = P(/\${[\w\W]*/g), ri = P(/^data-[\-\w.\u00B7-\uFFFF]+$/), ai = P(/^aria-[\-\w]+$/), Zt = P(
290
292
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
291
293
  // eslint-disable-line no-useless-escape
292
- ), ai = x(/^(?:\w+script|data):/i), si = x(
294
+ ), si = P(/^(?:\w+script|data):/i), li = P(
293
295
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
294
296
  // eslint-disable-line no-control-regex
295
- ), li = x(/^html$/i), ci = x(/^[a-z][.\w]*(-[.\w]+)+$/i), j = {
297
+ ), ci = P(/^html$/i), fi = P(/^[a-z][.\w]*(-[.\w]+)+$/i), j = {
296
298
  element: 1,
297
299
  attribute: 2,
298
300
  text: 3,
@@ -308,28 +310,28 @@ const Yt = D(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
308
310
  documentFragment: 11,
309
311
  notation: 12
310
312
  // Deprecated
311
- }, fi = function() {
313
+ }, ui = function() {
312
314
  return typeof window > "u" ? null : window;
313
- }, ui = function(i, o) {
314
- if (typeof i != "object" || typeof i.createPolicy != "function")
315
+ }, pi = function(n, o) {
316
+ if (typeof n != "object" || typeof n.createPolicy != "function")
315
317
  return null;
316
318
  let r = null;
317
319
  const s = "data-tt-policy-suffix";
318
320
  o && o.hasAttribute(s) && (r = o.getAttribute(s));
319
321
  const c = "dompurify" + (r ? "#" + r : "");
320
322
  try {
321
- return i.createPolicy(c, {
322
- createHTML(m) {
323
- return m;
323
+ return n.createPolicy(c, {
324
+ createHTML(d) {
325
+ return d;
324
326
  },
325
- createScriptURL(m) {
326
- return m;
327
+ createScriptURL(d) {
328
+ return d;
327
329
  }
328
330
  });
329
331
  } catch {
330
332
  return console.warn("TrustedTypes policy " + c + " could not be created."), null;
331
333
  }
332
- }, Zt = function() {
334
+ }, Jt = function() {
333
335
  return {
334
336
  afterSanitizeAttributes: [],
335
337
  afterSanitizeElements: [],
@@ -342,39 +344,39 @@ const Yt = D(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
342
344
  uponSanitizeShadowNode: []
343
345
  };
344
346
  };
345
- function en() {
346
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : fi();
347
- const i = (l) => en(l);
348
- if (i.version = "3.4.8", i.removed = [], !t || !t.document || t.document.nodeType !== j.document || !t.Element)
349
- return i.isSupported = !1, i;
347
+ function nn() {
348
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ui();
349
+ const n = (l) => nn(l);
350
+ if (n.version = "3.4.8", n.removed = [], !t || !t.document || t.document.nodeType !== j.document || !t.Element)
351
+ return n.isSupported = !1, n;
350
352
  let o = t.document;
351
353
  const r = o, s = r.currentScript;
352
354
  t.DocumentFragment;
353
- const c = t.HTMLTemplateElement, m = t.Node, w = t.Element, b = t.NodeFilter, V = t.NamedNodeMap;
354
- V === void 0 && (t.NamedNodeMap || t.MozNamedAttrMap), t.HTMLFormElement;
355
- const ne = t.DOMParser, ie = t.trustedTypes, U = w.prototype, on = W(U, "cloneNode"), rn = W(U, "remove"), an = W(U, "nextSibling"), ye = W(U, "childNodes"), Se = W(U, "parentNode"), Re = W(U, "shadowRoot"), sn = W(U, "attributes"), B = m && m.prototype ? W(m.prototype, "nodeType") : null, K = m && m.prototype ? W(m.prototype, "nodeName") : null;
355
+ const c = t.HTMLTemplateElement, d = t.Node, v = t.Element, b = t.NodeFilter, X = t.NamedNodeMap;
356
+ X === void 0 && (t.NamedNodeMap || t.MozNamedAttrMap), t.HTMLFormElement;
357
+ const ne = t.DOMParser, ie = t.trustedTypes, U = v.prototype, an = Y(U, "cloneNode"), sn = Y(U, "remove"), ln = Y(U, "nextSibling"), ye = Y(U, "childNodes"), Se = Y(U, "parentNode"), Ne = Y(U, "shadowRoot"), cn = Y(U, "attributes"), B = d && d.prototype ? Y(d.prototype, "nodeType") : null, q = d && d.prototype ? Y(d.prototype, "nodeName") : null;
356
358
  if (typeof c == "function") {
357
359
  const l = o.createElement("template");
358
360
  l.content && l.content.ownerDocument && (o = l.content.ownerDocument);
359
361
  }
360
- let v, he = "", Fe = 0;
362
+ let M, he = "", Fe = 0;
361
363
  const oe = function(e) {
362
364
  if (Fe > 0)
363
365
  throw de('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
364
366
  Fe++;
365
367
  try {
366
- return v.createHTML(e);
368
+ return M.createHTML(e);
367
369
  } finally {
368
370
  Fe--;
369
371
  }
370
- }, Ne = o, Ue = Ne.implementation, mt = Ne.createNodeIterator, ln = Ne.createDocumentFragment, cn = Ne.getElementsByTagName, fn = r.importNode;
371
- let N = Zt();
372
- i.isSupported = typeof Jt == "function" && typeof Se == "function" && Ue && Ue.createHTMLDocument !== void 0;
373
- const Oe = ti, ke = ni, Le = ii, un = oi, pn = ri, dn = ai, ht = si, mn = ci;
374
- let gt = qt, A = null;
375
- const ze = f({}, [...Yt, ...rt, ...at, ...st, ...Vt]);
372
+ }, Re = o, Ue = Re.implementation, mt = Re.createNodeIterator, fn = Re.createDocumentFragment, un = Re.getElementsByTagName, pn = r.importNode;
373
+ let R = Jt();
374
+ n.isSupported = typeof en == "function" && typeof Se == "function" && Ue && Ue.createHTMLDocument !== void 0;
375
+ const Le = ni, Oe = ii, ke = oi, dn = ri, mn = ai, hn = si, ht = li, gn = fi;
376
+ let gt = Zt, A = null;
377
+ const ze = f({}, [...Kt, ...rt, ...at, ...st, ...Vt]);
376
378
  let y = null;
377
- const Ge = f({}, [...Kt, ...lt, ...Xt, ...$e]);
379
+ const Ge = f({}, [...Xt, ...lt, ...qt, ...$e]);
378
380
  let _ = Object.seal(me(null, {
379
381
  tagNameCheck: {
380
382
  writable: !0,
@@ -395,7 +397,7 @@ function en() {
395
397
  value: !1
396
398
  }
397
399
  })), ge = null, Ie = null;
398
- const X = Object.seal(me(null, {
400
+ const Z = Object.seal(me(null, {
399
401
  tagCheck: {
400
402
  writable: !0,
401
403
  configurable: !1,
@@ -409,109 +411,109 @@ function en() {
409
411
  value: null
410
412
  }
411
413
  }));
412
- let Tt = !0, je = !0, At = !1, _t = !0, q = !1, Te = !0, J = !1, We = !1, Ye = !1, re = !1, De = !1, Ce = !1, Et = !0, bt = !1;
414
+ let Tt = !0, We = !0, At = !1, _t = !0, J = !1, Te = !0, Q = !1, je = !1, Ye = !1, re = !1, De = !1, Ce = !1, Et = !0, bt = !1;
413
415
  const yt = "user-content-";
414
- let Ve = !0, Ae = !1, ae = {}, z = null;
415
- const Ke = f({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
416
+ let Ke = !0, Ae = !1, ae = {}, z = null;
417
+ const Ve = f({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
416
418
  let St = null;
417
- const Rt = f({}, ["audio", "video", "img", "source", "image", "track"]);
419
+ const Nt = f({}, ["audio", "video", "img", "source", "image", "track"]);
418
420
  let Xe = null;
419
- const Nt = f({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), we = "http://www.w3.org/1998/Math/MathML", ve = "http://www.w3.org/2000/svg", G = "http://www.w3.org/1999/xhtml";
421
+ const Rt = f({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), we = "http://www.w3.org/1998/Math/MathML", ve = "http://www.w3.org/2000/svg", G = "http://www.w3.org/1999/xhtml";
420
422
  let se = G, qe = !1, Ze = null;
421
- const hn = f({}, [we, ve, G], ot);
423
+ const Tn = f({}, [we, ve, G], ot);
422
424
  let Je = f({}, ["mi", "mo", "mn", "ms", "mtext"]), Qe = f({}, ["annotation-xml"]);
423
- const gn = f({}, ["title", "style", "font", "a", "script"]);
425
+ const An = f({}, ["title", "style", "font", "a", "script"]);
424
426
  let _e = null;
425
- const Tn = ["application/xhtml+xml", "text/html"], An = "text/html";
427
+ const _n = ["application/xhtml+xml", "text/html"], En = "text/html";
426
428
  let E = null, le = null;
427
- const _n = o.createElement("form"), Ot = function(e) {
429
+ const bn = o.createElement("form"), Lt = function(e) {
428
430
  return e instanceof RegExp || e instanceof Function;
429
431
  }, et = function() {
430
432
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
431
433
  if (le && le === e)
432
434
  return;
433
- (!e || typeof e != "object") && (e = {}), e = L(e), _e = // eslint-disable-next-line unicorn/prefer-includes
434
- Tn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? An : e.PARSER_MEDIA_TYPE, E = _e === "application/xhtml+xml" ? ot : be, A = T(e, "ALLOWED_TAGS") && I(e.ALLOWED_TAGS) ? f({}, e.ALLOWED_TAGS, E) : ze, y = T(e, "ALLOWED_ATTR") && I(e.ALLOWED_ATTR) ? f({}, e.ALLOWED_ATTR, E) : Ge, Ze = T(e, "ALLOWED_NAMESPACES") && I(e.ALLOWED_NAMESPACES) ? f({}, e.ALLOWED_NAMESPACES, ot) : hn, Xe = T(e, "ADD_URI_SAFE_ATTR") && I(e.ADD_URI_SAFE_ATTR) ? f(L(Nt), e.ADD_URI_SAFE_ATTR, E) : Nt, St = T(e, "ADD_DATA_URI_TAGS") && I(e.ADD_DATA_URI_TAGS) ? f(L(Rt), e.ADD_DATA_URI_TAGS, E) : Rt, z = T(e, "FORBID_CONTENTS") && I(e.FORBID_CONTENTS) ? f({}, e.FORBID_CONTENTS, E) : Ke, ge = T(e, "FORBID_TAGS") && I(e.FORBID_TAGS) ? f({}, e.FORBID_TAGS, E) : L({}), Ie = T(e, "FORBID_ATTR") && I(e.FORBID_ATTR) ? f({}, e.FORBID_ATTR, E) : L({}), ae = T(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? L(e.USE_PROFILES) : e.USE_PROFILES : !1, Tt = e.ALLOW_ARIA_ATTR !== !1, je = e.ALLOW_DATA_ATTR !== !1, At = e.ALLOW_UNKNOWN_PROTOCOLS || !1, _t = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, q = e.SAFE_FOR_TEMPLATES || !1, Te = e.SAFE_FOR_XML !== !1, J = e.WHOLE_DOCUMENT || !1, re = e.RETURN_DOM || !1, De = e.RETURN_DOM_FRAGMENT || !1, Ce = e.RETURN_TRUSTED_TYPE || !1, Ye = e.FORCE_BODY || !1, Et = e.SANITIZE_DOM !== !1, bt = e.SANITIZE_NAMED_PROPS || !1, Ve = e.KEEP_CONTENT !== !1, Ae = e.IN_PLACE || !1, gt = Jn(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : qt, se = typeof e.NAMESPACE == "string" ? e.NAMESPACE : G, Je = T(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? L(e.MATHML_TEXT_INTEGRATION_POINTS) : f({}, ["mi", "mo", "mn", "ms", "mtext"]), Qe = T(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? L(e.HTML_INTEGRATION_POINTS) : f({}, ["annotation-xml"]);
435
- const n = T(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? L(e.CUSTOM_ELEMENT_HANDLING) : me(null);
436
- if (_ = me(null), T(n, "tagNameCheck") && Ot(n.tagNameCheck) && (_.tagNameCheck = n.tagNameCheck), T(n, "attributeNameCheck") && Ot(n.attributeNameCheck) && (_.attributeNameCheck = n.attributeNameCheck), T(n, "allowCustomizedBuiltInElements") && typeof n.allowCustomizedBuiltInElements == "boolean" && (_.allowCustomizedBuiltInElements = n.allowCustomizedBuiltInElements), q && (je = !1), De && (re = !0), ae && (A = f({}, Vt), y = me(null), ae.html === !0 && (f(A, Yt), f(y, Kt)), ae.svg === !0 && (f(A, rt), f(y, lt), f(y, $e)), ae.svgFilters === !0 && (f(A, at), f(y, lt), f(y, $e)), ae.mathMl === !0 && (f(A, st), f(y, Xt), f(y, $e))), X.tagCheck = null, X.attributeCheck = null, T(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? X.tagCheck = e.ADD_TAGS : I(e.ADD_TAGS) && (A === ze && (A = L(A)), f(A, e.ADD_TAGS, E))), T(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? X.attributeCheck = e.ADD_ATTR : I(e.ADD_ATTR) && (y === Ge && (y = L(y)), f(y, e.ADD_ATTR, E))), T(e, "ADD_URI_SAFE_ATTR") && I(e.ADD_URI_SAFE_ATTR) && f(Xe, e.ADD_URI_SAFE_ATTR, E), T(e, "FORBID_CONTENTS") && I(e.FORBID_CONTENTS) && (z === Ke && (z = L(z)), f(z, e.FORBID_CONTENTS, E)), T(e, "ADD_FORBID_CONTENTS") && I(e.ADD_FORBID_CONTENTS) && (z === Ke && (z = L(z)), f(z, e.ADD_FORBID_CONTENTS, E)), Ve && (A["#text"] = !0), J && f(A, ["html", "head", "body"]), A.table && (f(A, ["tbody"]), delete ge.tbody), e.TRUSTED_TYPES_POLICY) {
435
+ (!e || typeof e != "object") && (e = {}), e = k(e), _e = // eslint-disable-next-line unicorn/prefer-includes
436
+ _n.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? En : e.PARSER_MEDIA_TYPE, E = _e === "application/xhtml+xml" ? ot : be, A = T(e, "ALLOWED_TAGS") && D(e.ALLOWED_TAGS) ? f({}, e.ALLOWED_TAGS, E) : ze, y = T(e, "ALLOWED_ATTR") && D(e.ALLOWED_ATTR) ? f({}, e.ALLOWED_ATTR, E) : Ge, Ze = T(e, "ALLOWED_NAMESPACES") && D(e.ALLOWED_NAMESPACES) ? f({}, e.ALLOWED_NAMESPACES, ot) : Tn, Xe = T(e, "ADD_URI_SAFE_ATTR") && D(e.ADD_URI_SAFE_ATTR) ? f(k(Rt), e.ADD_URI_SAFE_ATTR, E) : Rt, St = T(e, "ADD_DATA_URI_TAGS") && D(e.ADD_DATA_URI_TAGS) ? f(k(Nt), e.ADD_DATA_URI_TAGS, E) : Nt, z = T(e, "FORBID_CONTENTS") && D(e.FORBID_CONTENTS) ? f({}, e.FORBID_CONTENTS, E) : Ve, ge = T(e, "FORBID_TAGS") && D(e.FORBID_TAGS) ? f({}, e.FORBID_TAGS, E) : k({}), Ie = T(e, "FORBID_ATTR") && D(e.FORBID_ATTR) ? f({}, e.FORBID_ATTR, E) : k({}), ae = T(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? k(e.USE_PROFILES) : e.USE_PROFILES : !1, Tt = e.ALLOW_ARIA_ATTR !== !1, We = e.ALLOW_DATA_ATTR !== !1, At = e.ALLOW_UNKNOWN_PROTOCOLS || !1, _t = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, J = e.SAFE_FOR_TEMPLATES || !1, Te = e.SAFE_FOR_XML !== !1, Q = e.WHOLE_DOCUMENT || !1, re = e.RETURN_DOM || !1, De = e.RETURN_DOM_FRAGMENT || !1, Ce = e.RETURN_TRUSTED_TYPE || !1, Ye = e.FORCE_BODY || !1, Et = e.SANITIZE_DOM !== !1, bt = e.SANITIZE_NAMED_PROPS || !1, Ke = e.KEEP_CONTENT !== !1, Ae = e.IN_PLACE || !1, gt = Qn(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Zt, se = typeof e.NAMESPACE == "string" ? e.NAMESPACE : G, Je = T(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? k(e.MATHML_TEXT_INTEGRATION_POINTS) : f({}, ["mi", "mo", "mn", "ms", "mtext"]), Qe = T(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? k(e.HTML_INTEGRATION_POINTS) : f({}, ["annotation-xml"]);
437
+ const i = T(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? k(e.CUSTOM_ELEMENT_HANDLING) : me(null);
438
+ if (_ = me(null), T(i, "tagNameCheck") && Lt(i.tagNameCheck) && (_.tagNameCheck = i.tagNameCheck), T(i, "attributeNameCheck") && Lt(i.attributeNameCheck) && (_.attributeNameCheck = i.attributeNameCheck), T(i, "allowCustomizedBuiltInElements") && typeof i.allowCustomizedBuiltInElements == "boolean" && (_.allowCustomizedBuiltInElements = i.allowCustomizedBuiltInElements), J && (We = !1), De && (re = !0), ae && (A = f({}, Vt), y = me(null), ae.html === !0 && (f(A, Kt), f(y, Xt)), ae.svg === !0 && (f(A, rt), f(y, lt), f(y, $e)), ae.svgFilters === !0 && (f(A, at), f(y, lt), f(y, $e)), ae.mathMl === !0 && (f(A, st), f(y, qt), f(y, $e))), Z.tagCheck = null, Z.attributeCheck = null, T(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Z.tagCheck = e.ADD_TAGS : D(e.ADD_TAGS) && (A === ze && (A = k(A)), f(A, e.ADD_TAGS, E))), T(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Z.attributeCheck = e.ADD_ATTR : D(e.ADD_ATTR) && (y === Ge && (y = k(y)), f(y, e.ADD_ATTR, E))), T(e, "ADD_URI_SAFE_ATTR") && D(e.ADD_URI_SAFE_ATTR) && f(Xe, e.ADD_URI_SAFE_ATTR, E), T(e, "FORBID_CONTENTS") && D(e.FORBID_CONTENTS) && (z === Ve && (z = k(z)), f(z, e.FORBID_CONTENTS, E)), T(e, "ADD_FORBID_CONTENTS") && D(e.ADD_FORBID_CONTENTS) && (z === Ve && (z = k(z)), f(z, e.ADD_FORBID_CONTENTS, E)), Ke && (A["#text"] = !0), Q && f(A, ["html", "head", "body"]), A.table && (f(A, ["tbody"]), delete ge.tbody), e.TRUSTED_TYPES_POLICY) {
437
439
  if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
438
440
  throw de('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
439
441
  if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
440
442
  throw de('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
441
- const a = v;
442
- v = e.TRUSTED_TYPES_POLICY;
443
+ const a = M;
444
+ M = e.TRUSTED_TYPES_POLICY;
443
445
  try {
444
446
  he = oe("");
445
- } catch (d) {
446
- throw v = a, d;
447
+ } catch (m) {
448
+ throw M = a, m;
447
449
  }
448
450
  } else
449
- v === void 0 && e.TRUSTED_TYPES_POLICY !== null && (v = ui(ie, s)), v && typeof he == "string" && (he = oe(""));
450
- (N.uponSanitizeElement.length > 0 || N.uponSanitizeAttribute.length > 0) && A === ze && (A = L(A)), N.uponSanitizeAttribute.length > 0 && y === Ge && (y = L(y)), D && D(e), le = e;
451
- }, kt = f({}, [...rt, ...at, ...Qn]), Lt = f({}, [...st, ...ei]), En = function(e) {
452
- let n = Se(e);
453
- (!n || !n.tagName) && (n = {
451
+ M === void 0 && e.TRUSTED_TYPES_POLICY !== null && (M = pi(ie, s)), M && typeof he == "string" && (he = oe(""));
452
+ (R.uponSanitizeElement.length > 0 || R.uponSanitizeAttribute.length > 0) && A === ze && (A = k(A)), R.uponSanitizeAttribute.length > 0 && y === Ge && (y = k(y)), C && C(e), le = e;
453
+ }, Ot = f({}, [...rt, ...at, ...ei]), kt = f({}, [...st, ...ti]), yn = function(e) {
454
+ let i = Se(e);
455
+ (!i || !i.tagName) && (i = {
454
456
  namespaceURI: se,
455
457
  tagName: "template"
456
458
  });
457
- const a = be(e.tagName), d = be(n.tagName);
458
- return Ze[e.namespaceURI] ? e.namespaceURI === ve ? n.namespaceURI === G ? a === "svg" : n.namespaceURI === we ? a === "svg" && (d === "annotation-xml" || Je[d]) : !!kt[a] : e.namespaceURI === we ? n.namespaceURI === G ? a === "math" : n.namespaceURI === ve ? a === "math" && Qe[d] : !!Lt[a] : e.namespaceURI === G ? n.namespaceURI === ve && !Qe[d] || n.namespaceURI === we && !Je[d] ? !1 : !Lt[a] && (gn[a] || !kt[a]) : !!(_e === "application/xhtml+xml" && Ze[e.namespaceURI]) : !1;
459
+ const a = be(e.tagName), m = be(i.tagName);
460
+ return Ze[e.namespaceURI] ? e.namespaceURI === ve ? i.namespaceURI === G ? a === "svg" : i.namespaceURI === we ? a === "svg" && (m === "annotation-xml" || Je[m]) : !!Ot[a] : e.namespaceURI === we ? i.namespaceURI === G ? a === "math" : i.namespaceURI === ve ? a === "math" && Qe[m] : !!kt[a] : e.namespaceURI === G ? i.namespaceURI === ve && !Qe[m] || i.namespaceURI === we && !Je[m] ? !1 : !kt[a] && (An[a] || !Ot[a]) : !!(_e === "application/xhtml+xml" && Ze[e.namespaceURI]) : !1;
459
461
  }, $ = function(e) {
460
- ue(i.removed, {
462
+ ue(n.removed, {
461
463
  element: e
462
464
  });
463
465
  try {
464
466
  Se(e).removeChild(e);
465
467
  } catch {
466
- rn(e);
468
+ sn(e);
467
469
  }
468
- }, Q = function(e, n) {
470
+ }, ee = function(e, i) {
469
471
  try {
470
- ue(i.removed, {
471
- attribute: n.getAttributeNode(e),
472
- from: n
472
+ ue(n.removed, {
473
+ attribute: i.getAttributeNode(e),
474
+ from: i
473
475
  });
474
476
  } catch {
475
- ue(i.removed, {
477
+ ue(n.removed, {
476
478
  attribute: null,
477
- from: n
479
+ from: i
478
480
  });
479
481
  }
480
- if (n.removeAttribute(e), e === "is")
482
+ if (i.removeAttribute(e), e === "is")
481
483
  if (re || De)
482
484
  try {
483
- $(n);
485
+ $(i);
484
486
  } catch {
485
487
  }
486
488
  else
487
489
  try {
488
- n.setAttribute(e, "");
490
+ i.setAttribute(e, "");
489
491
  } catch {
490
492
  }
491
493
  }, It = function(e) {
492
- let n = null, a = null;
494
+ let i = null, a = null;
493
495
  if (Ye)
494
496
  e = "<remove></remove>" + e;
495
497
  else {
496
- const h = zt(e, /^[\r\n\t ]+/);
498
+ const h = Gt(e, /^[\r\n\t ]+/);
497
499
  a = h && h[0];
498
500
  }
499
501
  _e === "application/xhtml+xml" && se === G && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
500
- const d = v ? oe(e) : e;
502
+ const m = M ? oe(e) : e;
501
503
  if (se === G)
502
504
  try {
503
- n = new ne().parseFromString(d, _e);
505
+ i = new ne().parseFromString(m, _e);
504
506
  } catch {
505
507
  }
506
- if (!n || !n.documentElement) {
507
- n = Ue.createDocument(se, "template", null);
508
+ if (!i || !i.documentElement) {
509
+ i = Ue.createDocument(se, "template", null);
508
510
  try {
509
- n.documentElement.innerHTML = qe ? he : d;
511
+ i.documentElement.innerHTML = qe ? he : m;
510
512
  } catch {
511
513
  }
512
514
  }
513
- const u = n.body || n.documentElement;
514
- return e && a && u.insertBefore(o.createTextNode(a), u.childNodes[0] || null), se === G ? cn.call(n, J ? "html" : "body")[0] : J ? n.documentElement : u;
515
+ const u = i.body || i.documentElement;
516
+ return e && a && u.insertBefore(o.createTextNode(a), u.childNodes[0] || null), se === G ? un.call(i, Q ? "html" : "body")[0] : Q ? i.documentElement : u;
515
517
  }, Dt = function(e) {
516
518
  return mt.call(
517
519
  e.ownerDocument || e,
@@ -521,34 +523,34 @@ function en() {
521
523
  null
522
524
  );
523
525
  }, tt = function(e) {
524
- var n, a;
526
+ var i, a;
525
527
  e.normalize();
526
- const d = mt.call(
528
+ const m = mt.call(
527
529
  e.ownerDocument || e,
528
530
  e,
529
531
  // eslint-disable-next-line no-bitwise
530
532
  b.SHOW_TEXT | b.SHOW_COMMENT | b.SHOW_CDATA_SECTION | b.SHOW_PROCESSING_INSTRUCTION,
531
533
  null
532
534
  );
533
- let u = d.nextNode();
535
+ let u = m.nextNode();
534
536
  for (; u; ) {
535
- let R = u.data;
536
- ee([Oe, ke, Le], (M) => {
537
- R = pe(R, M, " ");
538
- }), u.data = R, u = d.nextNode();
537
+ let N = u.data;
538
+ te([Le, Oe, ke], (x) => {
539
+ N = pe(N, x, " ");
540
+ }), u.data = N, u = m.nextNode();
539
541
  }
540
- const h = (n = (a = e.querySelectorAll) === null || a === void 0 ? void 0 : a.call(e, "template")) !== null && n !== void 0 ? n : [];
541
- ee(Array.from(h), (R) => {
542
- ce(R.content) && tt(R.content);
542
+ const h = (i = (a = e.querySelectorAll) === null || a === void 0 ? void 0 : a.call(e, "template")) !== null && i !== void 0 ? i : [];
543
+ te(Array.from(h), (N) => {
544
+ ce(N.content) && tt(N.content);
543
545
  });
544
546
  }, Me = function(e) {
545
- const n = K ? K(e) : null;
546
- return typeof n != "string" || E(n) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
547
+ const i = q ? q(e) : null;
548
+ return typeof i != "string" || E(i) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
547
549
  // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
548
550
  // makes the direct read diverge from the cached read; a clean form
549
551
  // (same-realm OR foreign-realm) has both reads pointing at the same
550
552
  // canonical NamedNodeMap.
551
- e.attributes !== sn(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
553
+ e.attributes !== cn(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
552
554
  // returns the integer 1 for any Element regardless of realm; direct
553
555
  // read on a clobbered form (e.g. <input name="nodeType">) returns
554
556
  // the named child element. Cheap addition — nodeType is read from
@@ -584,60 +586,60 @@ function en() {
584
586
  return !1;
585
587
  }
586
588
  };
587
- function Y(l, e, n) {
588
- ee(l, (a) => {
589
- a.call(i, e, n, le);
589
+ function K(l, e, i) {
590
+ te(l, (a) => {
591
+ a.call(n, e, i, le);
590
592
  });
591
593
  }
592
594
  const Ct = function(e) {
593
- let n = null;
594
- if (Y(N.beforeSanitizeElements, e, null), Me(e))
595
+ let i = null;
596
+ if (K(R.beforeSanitizeElements, e, null), Me(e))
595
597
  return $(e), !0;
596
- const a = E(K ? K(e) : e.nodeName);
597
- if (Y(N.uponSanitizeElement, e, {
598
+ const a = E(q ? q(e) : e.nodeName);
599
+ if (K(R.uponSanitizeElement, e, {
598
600
  tagName: a,
599
601
  allowedTags: A
600
- }), Te && e.hasChildNodes() && !xe(e.firstElementChild) && k(/<[/\w!]/g, e.innerHTML) && k(/<[/\w!]/g, e.textContent) || Te && e.namespaceURI === G && a === "style" && xe(e.firstElementChild) || e.nodeType === j.progressingInstruction || Te && e.nodeType === j.comment && k(/<[/\w]/g, e.data))
602
+ }), Te && e.hasChildNodes() && !xe(e.firstElementChild) && O(/<[/\w!]/g, e.innerHTML) && O(/<[/\w!]/g, e.textContent) || Te && e.namespaceURI === G && a === "style" && xe(e.firstElementChild) || e.nodeType === j.progressingInstruction || Te && e.nodeType === j.comment && O(/<[/\w]/g, e.data))
601
603
  return $(e), !0;
602
- if (ge[a] || !(X.tagCheck instanceof Function && X.tagCheck(a)) && !A[a]) {
603
- if (!ge[a] && vt(a) && (_.tagNameCheck instanceof RegExp && k(_.tagNameCheck, a) || _.tagNameCheck instanceof Function && _.tagNameCheck(a)))
604
+ if (ge[a] || !(Z.tagCheck instanceof Function && Z.tagCheck(a)) && !A[a]) {
605
+ if (!ge[a] && vt(a) && (_.tagNameCheck instanceof RegExp && O(_.tagNameCheck, a) || _.tagNameCheck instanceof Function && _.tagNameCheck(a)))
604
606
  return !1;
605
- if (Ve && !z[a]) {
607
+ if (Ke && !z[a]) {
606
608
  const u = Se(e), h = ye(e);
607
609
  if (h && u) {
608
- const R = h.length;
609
- for (let M = R - 1; M >= 0; --M) {
610
- const H = on(h[M], !0);
611
- u.insertBefore(H, an(e));
610
+ const N = h.length;
611
+ for (let x = N - 1; x >= 0; --x) {
612
+ const H = an(h[x], !0);
613
+ u.insertBefore(H, ln(e));
612
614
  }
613
615
  }
614
616
  }
615
617
  return $(e), !0;
616
618
  }
617
- return (B ? B(e) : e.nodeType) === j.element && !En(e) || (a === "noscript" || a === "noembed" || a === "noframes") && k(/<\/no(script|embed|frames)/i, e.innerHTML) ? ($(e), !0) : (q && e.nodeType === j.text && (n = e.textContent, ee([Oe, ke, Le], (u) => {
618
- n = pe(n, u, " ");
619
- }), e.textContent !== n && (ue(i.removed, {
619
+ return (B ? B(e) : e.nodeType) === j.element && !yn(e) || (a === "noscript" || a === "noembed" || a === "noframes") && O(/<\/no(script|embed|frames)/i, e.innerHTML) ? ($(e), !0) : (J && e.nodeType === j.text && (i = e.textContent, te([Le, Oe, ke], (u) => {
620
+ i = pe(i, u, " ");
621
+ }), e.textContent !== i && (ue(n.removed, {
620
622
  element: e.cloneNode()
621
- }), e.textContent = n)), Y(N.afterSanitizeElements, e, null), !1);
622
- }, wt = function(e, n, a) {
623
- if (Ie[n] || Et && (n === "id" || n === "name") && (a in o || a in _n))
623
+ }), e.textContent = i)), K(R.afterSanitizeElements, e, null), !1);
624
+ }, wt = function(e, i, a) {
625
+ if (Ie[i] || Et && (i === "id" || i === "name") && (a in o || a in bn))
624
626
  return !1;
625
- const d = y[n] || X.attributeCheck instanceof Function && X.attributeCheck(n, e);
626
- if (!(je && !Ie[n] && k(un, n))) {
627
- if (!(Tt && k(pn, n))) {
628
- if (!d || Ie[n]) {
627
+ const m = y[i] || Z.attributeCheck instanceof Function && Z.attributeCheck(i, e);
628
+ if (!(We && !Ie[i] && O(dn, i))) {
629
+ if (!(Tt && O(mn, i))) {
630
+ if (!m || Ie[i]) {
629
631
  if (
630
632
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
631
633
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
632
634
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
633
- !(vt(e) && (_.tagNameCheck instanceof RegExp && k(_.tagNameCheck, e) || _.tagNameCheck instanceof Function && _.tagNameCheck(e)) && (_.attributeNameCheck instanceof RegExp && k(_.attributeNameCheck, n) || _.attributeNameCheck instanceof Function && _.attributeNameCheck(n, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
635
+ !(vt(e) && (_.tagNameCheck instanceof RegExp && O(_.tagNameCheck, e) || _.tagNameCheck instanceof Function && _.tagNameCheck(e)) && (_.attributeNameCheck instanceof RegExp && O(_.attributeNameCheck, i) || _.attributeNameCheck instanceof Function && _.attributeNameCheck(i, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
634
636
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
635
- n === "is" && _.allowCustomizedBuiltInElements && (_.tagNameCheck instanceof RegExp && k(_.tagNameCheck, a) || _.tagNameCheck instanceof Function && _.tagNameCheck(a)))
637
+ i === "is" && _.allowCustomizedBuiltInElements && (_.tagNameCheck instanceof RegExp && O(_.tagNameCheck, a) || _.tagNameCheck instanceof Function && _.tagNameCheck(a)))
636
638
  ) return !1;
637
- } else if (!Xe[n]) {
638
- if (!k(gt, pe(a, ht, ""))) {
639
- if (!((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && Gt(a, "data:") === 0 && St[e])) {
640
- if (!(At && !k(dn, pe(a, ht, "")))) {
639
+ } else if (!Xe[i]) {
640
+ if (!O(gt, pe(a, ht, ""))) {
641
+ if (!((i === "src" || i === "xlink:href" || i === "href") && e !== "script" && Wt(a, "data:") === 0 && St[e])) {
642
+ if (!(At && !O(hn, pe(a, ht, "")))) {
641
643
  if (a)
642
644
  return !1;
643
645
  }
@@ -647,12 +649,12 @@ function en() {
647
649
  }
648
650
  }
649
651
  return !0;
650
- }, bn = f({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), vt = function(e) {
651
- return !bn[be(e)] && k(mn, e);
652
+ }, Sn = f({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), vt = function(e) {
653
+ return !Sn[be(e)] && O(gn, e);
652
654
  }, Mt = function(e) {
653
- Y(N.beforeSanitizeAttributes, e, null);
654
- const n = e.attributes;
655
- if (!n || Me(e))
655
+ K(R.beforeSanitizeAttributes, e, null);
656
+ const i = e.attributes;
657
+ if (!i || Me(e))
656
658
  return;
657
659
  const a = {
658
660
  attrName: "",
@@ -661,97 +663,97 @@ function en() {
661
663
  allowedAttributes: y,
662
664
  forceKeepAttr: void 0
663
665
  };
664
- let d = n.length;
665
- for (; d--; ) {
666
- const u = n[d], h = u.name, R = u.namespaceURI, M = u.value, H = E(h), nt = M;
667
- let O = h === "value" ? nt : Yn(nt);
668
- if (a.attrName = H, a.attrValue = O, a.keepAttr = !0, a.forceKeepAttr = void 0, Y(N.uponSanitizeAttribute, e, a), O = a.attrValue, bt && (H === "id" || H === "name") && Gt(O, yt) !== 0 && (Q(h, e), O = yt + O), Te && k(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, O)) {
669
- Q(h, e);
666
+ let m = i.length;
667
+ for (; m--; ) {
668
+ const u = i[m], h = u.name, N = u.namespaceURI, x = u.value, H = E(h), nt = x;
669
+ let L = h === "value" ? nt : Kn(nt);
670
+ if (a.attrName = H, a.attrValue = L, a.keepAttr = !0, a.forceKeepAttr = void 0, K(R.uponSanitizeAttribute, e, a), L = a.attrValue, bt && (H === "id" || H === "name") && Wt(L, yt) !== 0 && (ee(h, e), L = yt + L), Te && O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, L)) {
671
+ ee(h, e);
670
672
  continue;
671
673
  }
672
- if (H === "attributename" && zt(O, "href")) {
673
- Q(h, e);
674
+ if (H === "attributename" && Gt(L, "href")) {
675
+ ee(h, e);
674
676
  continue;
675
677
  }
676
678
  if (a.forceKeepAttr)
677
679
  continue;
678
680
  if (!a.keepAttr) {
679
- Q(h, e);
681
+ ee(h, e);
680
682
  continue;
681
683
  }
682
- if (!_t && k(/\/>/i, O)) {
683
- Q(h, e);
684
+ if (!_t && O(/\/>/i, L)) {
685
+ ee(h, e);
684
686
  continue;
685
687
  }
686
- q && ee([Oe, ke, Le], (Pt) => {
687
- O = pe(O, Pt, " ");
688
+ J && te([Le, Oe, ke], (Pt) => {
689
+ L = pe(L, Pt, " ");
688
690
  });
689
691
  const xt = E(e.nodeName);
690
- if (!wt(xt, H, O)) {
691
- Q(h, e);
692
+ if (!wt(xt, H, L)) {
693
+ ee(h, e);
692
694
  continue;
693
695
  }
694
- if (v && typeof ie == "object" && typeof ie.getAttributeType == "function" && !R)
696
+ if (M && typeof ie == "object" && typeof ie.getAttributeType == "function" && !N)
695
697
  switch (ie.getAttributeType(xt, H)) {
696
698
  case "TrustedHTML": {
697
- O = oe(O);
699
+ L = oe(L);
698
700
  break;
699
701
  }
700
702
  case "TrustedScriptURL": {
701
- O = v.createScriptURL(O);
703
+ L = M.createScriptURL(L);
702
704
  break;
703
705
  }
704
706
  }
705
- if (O !== nt)
707
+ if (L !== nt)
706
708
  try {
707
- R ? e.setAttributeNS(R, h, O) : e.setAttribute(h, O), Me(e) ? $(e) : Ut(i.removed);
709
+ N ? e.setAttributeNS(N, h, L) : e.setAttribute(h, L), Me(e) ? $(e) : zt(n.removed);
708
710
  } catch {
709
- Q(h, e);
711
+ ee(h, e);
710
712
  }
711
713
  }
712
- Y(N.afterSanitizeAttributes, e, null);
714
+ K(R.afterSanitizeAttributes, e, null);
713
715
  }, Pe = function(e) {
714
- let n = null;
716
+ let i = null;
715
717
  const a = Dt(e);
716
- for (Y(N.beforeSanitizeShadowDOM, e, null); n = a.nextNode(); )
717
- if (Y(N.uponSanitizeShadowNode, n, null), Ct(n), Mt(n), ce(n.content) && Pe(n.content), (B ? B(n) : n.nodeType) === j.element) {
718
- const u = Re ? Re(n) : n.shadowRoot;
718
+ for (K(R.beforeSanitizeShadowDOM, e, null); i = a.nextNode(); )
719
+ if (K(R.uponSanitizeShadowNode, i, null), Ct(i), Mt(i), ce(i.content) && Pe(i.content), (B ? B(i) : i.nodeType) === j.element) {
720
+ const u = Ne ? Ne(i) : i.shadowRoot;
719
721
  ce(u) && (fe(u), Pe(u));
720
722
  }
721
- Y(N.afterSanitizeShadowDOM, e, null);
723
+ K(R.afterSanitizeShadowDOM, e, null);
722
724
  }, fe = function(e) {
723
- const n = B ? B(e) : e.nodeType;
724
- if (n === j.element) {
725
- const u = Re ? Re(e) : e.shadowRoot;
725
+ const i = B ? B(e) : e.nodeType;
726
+ if (i === j.element) {
727
+ const u = Ne ? Ne(e) : e.shadowRoot;
726
728
  ce(u) && (fe(u), Pe(u));
727
729
  }
728
730
  const a = ye ? ye(e) : e.childNodes;
729
731
  if (!a)
730
732
  return;
731
- const d = [];
732
- ee(a, (u) => {
733
- ue(d, u);
733
+ const m = [];
734
+ te(a, (u) => {
735
+ ue(m, u);
734
736
  });
735
- for (const u of d)
737
+ for (const u of m)
736
738
  fe(u);
737
- if (n === j.element) {
738
- const u = K ? K(e) : null;
739
+ if (i === j.element) {
740
+ const u = q ? q(e) : null;
739
741
  if (typeof u == "string" && E(u) === "template") {
740
742
  const h = e.content;
741
743
  ce(h) && fe(h);
742
744
  }
743
745
  }
744
746
  };
745
- return i.sanitize = function(l) {
746
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = null, a = null, d = null, u = null;
747
- if (qe = !l, qe && (l = "<!-->"), typeof l != "string" && !xe(l) && (l = Zn(l), typeof l != "string"))
747
+ return n.sanitize = function(l) {
748
+ let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, m = null, u = null;
749
+ if (qe = !l, qe && (l = "<!-->"), typeof l != "string" && !xe(l) && (l = Jn(l), typeof l != "string"))
748
750
  throw de("dirty is not a string, aborting");
749
- if (!i.isSupported)
751
+ if (!n.isSupported)
750
752
  return l;
751
- if (We || et(e), i.removed = [], typeof l == "string" && (Ae = !1), Ae) {
752
- const M = K ? K(l) : l.nodeName;
753
- if (typeof M == "string") {
754
- const H = E(M);
753
+ if (je || et(e), n.removed = [], typeof l == "string" && (Ae = !1), Ae) {
754
+ const x = q ? q(l) : l.nodeName;
755
+ if (typeof x == "string") {
756
+ const H = E(x);
755
757
  if (!A[H] || ge[H])
756
758
  throw de("root node is forbidden and cannot be sanitized in-place");
757
759
  }
@@ -759,131 +761,132 @@ function en() {
759
761
  throw de("root node is clobbered and cannot be sanitized in-place");
760
762
  fe(l);
761
763
  } else if (xe(l))
762
- n = It("<!---->"), a = n.ownerDocument.importNode(l, !0), a.nodeType === j.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? n = a : n.appendChild(a), fe(a);
764
+ i = It("<!---->"), a = i.ownerDocument.importNode(l, !0), a.nodeType === j.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), fe(a);
763
765
  else {
764
- if (!re && !q && !J && // eslint-disable-next-line unicorn/prefer-includes
766
+ if (!re && !J && !Q && // eslint-disable-next-line unicorn/prefer-includes
765
767
  l.indexOf("<") === -1)
766
- return v && Ce ? oe(l) : l;
767
- if (n = It(l), !n)
768
+ return M && Ce ? oe(l) : l;
769
+ if (i = It(l), !i)
768
770
  return re ? null : Ce ? he : "";
769
771
  }
770
- n && Ye && $(n.firstChild);
771
- const h = Dt(Ae ? l : n);
772
- for (; d = h.nextNode(); )
773
- Ct(d), Mt(d), ce(d.content) && Pe(d.content);
772
+ i && Ye && $(i.firstChild);
773
+ const h = Dt(Ae ? l : i);
774
+ for (; m = h.nextNode(); )
775
+ Ct(m), Mt(m), ce(m.content) && Pe(m.content);
774
776
  if (Ae)
775
- return q && tt(l), l;
777
+ return J && tt(l), l;
776
778
  if (re) {
777
- if (q && tt(n), De)
778
- for (u = ln.call(n.ownerDocument); n.firstChild; )
779
- u.appendChild(n.firstChild);
779
+ if (J && tt(i), De)
780
+ for (u = fn.call(i.ownerDocument); i.firstChild; )
781
+ u.appendChild(i.firstChild);
780
782
  else
781
- u = n;
782
- return (y.shadowroot || y.shadowrootmode) && (u = fn.call(r, u, !0)), u;
783
+ u = i;
784
+ return (y.shadowroot || y.shadowrootmode) && (u = pn.call(r, u, !0)), u;
783
785
  }
784
- let R = J ? n.outerHTML : n.innerHTML;
785
- return J && A["!doctype"] && n.ownerDocument && n.ownerDocument.doctype && n.ownerDocument.doctype.name && k(li, n.ownerDocument.doctype.name) && (R = "<!DOCTYPE " + n.ownerDocument.doctype.name + `>
786
- ` + R), q && ee([Oe, ke, Le], (M) => {
787
- R = pe(R, M, " ");
788
- }), v && Ce ? oe(R) : R;
789
- }, i.setConfig = function() {
786
+ let N = Q ? i.outerHTML : i.innerHTML;
787
+ return Q && A["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && O(ci, i.ownerDocument.doctype.name) && (N = "<!DOCTYPE " + i.ownerDocument.doctype.name + `>
788
+ ` + N), J && te([Le, Oe, ke], (x) => {
789
+ N = pe(N, x, " ");
790
+ }), M && Ce ? oe(N) : N;
791
+ }, n.setConfig = function() {
790
792
  let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
791
- et(l), We = !0;
792
- }, i.clearConfig = function() {
793
- le = null, We = !1;
794
- }, i.isValidAttribute = function(l, e, n) {
793
+ et(l), je = !0;
794
+ }, n.clearConfig = function() {
795
+ le = null, je = !1;
796
+ }, n.isValidAttribute = function(l, e, i) {
795
797
  le || et({});
796
- const a = E(l), d = E(e);
797
- return wt(a, d, n);
798
- }, i.addHook = function(l, e) {
799
- typeof e == "function" && ue(N[l], e);
800
- }, i.removeHook = function(l, e) {
798
+ const a = E(l), m = E(e);
799
+ return wt(a, m, i);
800
+ }, n.addHook = function(l, e) {
801
+ typeof e == "function" && ue(R[l], e);
802
+ }, n.removeHook = function(l, e) {
801
803
  if (e !== void 0) {
802
- const n = jn(N[l], e);
803
- return n === -1 ? void 0 : Wn(N[l], n, 1)[0];
804
+ const i = jn(R[l], e);
805
+ return i === -1 ? void 0 : Yn(R[l], i, 1)[0];
804
806
  }
805
- return Ut(N[l]);
806
- }, i.removeHooks = function(l) {
807
- N[l] = [];
808
- }, i.removeAllHooks = function() {
809
- N = Zt();
810
- }, i;
807
+ return zt(R[l]);
808
+ }, n.removeHooks = function(l) {
809
+ R[l] = [];
810
+ }, n.removeAllHooks = function() {
811
+ R = Jt();
812
+ }, n;
811
813
  }
812
- var ct = en();
813
- function tn(t) {
814
+ var ct = nn();
815
+ function on(t) {
814
816
  console.error(`[localisation-utils]: ${t}`);
815
817
  }
816
- function pi(t, i) {
817
- const o = (s) => String.prototype.split.call(i, s).filter(Boolean).reduce((c, m) => c != null && typeof c == "object" ? c[m] : c, t), r = o(/[,[\]]+?/) || o(/[,[\].]+?/);
818
+ function di(t, n) {
819
+ const o = (s) => String.prototype.split.call(n, s).filter(Boolean).reduce((c, d) => c != null && typeof c == "object" ? c[d] : c, t), r = o(/[,[\]]+?/) || o(/[,[\].]+?/);
818
820
  return typeof r != "string" ? "" : r;
819
821
  }
820
- function nn(t, i) {
822
+ function rn(t, n) {
821
823
  if (!t) throw new Error('"locale" parameter cannot be empty');
822
- if (!i) throw new Error('"key" parameter cannot be empty');
823
- const o = pi(t, i);
824
- return o || (tn(`Couldn't find a value for the key "${i}", it will be used as fallback.`), i);
824
+ if (!n) throw new Error('"key" parameter cannot be empty');
825
+ const o = di(t, n);
826
+ return o || (on(`Couldn't find a value for the key "${n}", it will be used as fallback.`), n);
825
827
  }
826
- function di(t) {
828
+ function mi(t) {
827
829
  const o = t.map((s) => `(<${s}.*>.*</${s}>)`).join("|");
828
830
  return new RegExp(o, "igm");
829
831
  }
830
- function mi(t, i) {
831
- const o = Object.keys(i);
832
+ function hi(t, n) {
833
+ const o = Object.keys(n);
832
834
  if (o.length === 0) return [t];
833
- const r = di(o);
835
+ const r = mi(o);
834
836
  return t.split(r).filter((s) => !!s).map((s) => {
835
837
  if (!s.match(r)) return s;
836
- const m = s.match(/<(.*)>(.*)<\/.*>/);
837
- if (!m) return s;
838
- const [, w, b] = m;
839
- return [w, b];
838
+ const d = s.match(/<(.*)>(.*)<\/.*>/);
839
+ if (!d) return s;
840
+ const [, v, b] = d;
841
+ return [v, b];
840
842
  }).map((s) => {
841
843
  if (!Array.isArray(s)) return s;
842
- const [m, w] = s, b = i[m];
843
- return b || typeof b == "function" ? b(w) : (tn(`Custom tag "${m}" does not have a matching enhancer function`), w);
844
+ const [d, v] = s, b = n[d];
845
+ return b || typeof b == "function" ? b(v) : (on(`Custom tag "${d}" does not have a matching enhancer function`), v);
844
846
  });
845
847
  }
846
- function hi(t, i = "_blank") {
848
+ function Qt(t, n = "_blank") {
847
849
  if (typeof window > "u")
848
850
  return t.replace(/<[^>]*>/g, "");
849
- const o = i === "_self" ? "_self" : "_blank", r = (s) => {
850
- if (s.tagName !== "A") return;
851
- if (s.setAttribute("target", o), o !== "_blank") {
852
- s.removeAttribute("rel");
851
+ const o = ["A", "PIE-LINK"], r = n === "_self" ? "_self" : "_blank", s = (c) => {
852
+ if (!o.includes(c.tagName)) return;
853
+ if (c.setAttribute("target", r), r !== "_blank") {
854
+ c.removeAttribute("rel");
853
855
  return;
854
856
  }
855
- const c = new Set((s.getAttribute("rel") ?? "").split(/\s+/).filter(Boolean));
856
- c.add("noopener"), c.add("noreferrer"), s.setAttribute("rel", Array.from(c).join(" "));
857
+ const d = new Set((c.getAttribute("rel") ?? "").split(/\s+/).filter(Boolean));
858
+ d.add("noopener"), d.add("noreferrer"), c.setAttribute("rel", Array.from(d).join(" "));
857
859
  };
858
860
  try {
859
- return ct.addHook("afterSanitizeAttributes", r), ct.sanitize(t, {
860
- ALLOWED_TAGS: ["a"],
861
+ return ct.addHook("afterSanitizeAttributes", s), ct.sanitize(t, {
862
+ // Convert to lowercase for DOMPurify's tag list
863
+ ALLOWED_TAGS: o.map((c) => c.toLowerCase()),
861
864
  ALLOWED_ATTR: ["href", "rel", "target"]
862
865
  });
863
866
  } finally {
864
867
  ct.removeHook("afterSanitizeAttributes");
865
868
  }
866
869
  }
867
- function gi(t, i, o) {
870
+ function gi(t, n, o) {
868
871
  if (!t) throw new Error('"locale" parameter cannot be empty');
869
- if (!i) throw new Error('"key" parameter cannot be empty');
872
+ if (!n) throw new Error('"key" parameter cannot be empty');
870
873
  if (!o) throw new Error('"customTagEnhancers" parameter cannot be empty');
871
- const r = nn(t, i);
872
- return mi(r, o);
874
+ const r = rn(t, n);
875
+ return hi(r, o);
873
876
  }
874
- var Ti = Object.defineProperty, Ai = Object.getOwnPropertyDescriptor, P = (t, i, o, r) => {
875
- for (var s = r > 1 ? void 0 : r ? Ai(i, o) : i, c = t.length - 1, m; c >= 0; c--)
876
- (m = t[c]) && (s = (r ? m(i, o, s) : m(s)) || s);
877
- return r && s && Ti(i, o, s), s;
877
+ var Ti = Object.defineProperty, Ai = Object.getOwnPropertyDescriptor, w = (t, n, o, r) => {
878
+ for (var s = r > 1 ? void 0 : r ? Ai(n, o) : n, c = t.length - 1, d; c >= 0; c--)
879
+ (d = t[c]) && (s = (r ? d(n, o, s) : d(s)) || s);
880
+ return r && s && Ti(n, o, s), s;
878
881
  };
879
- let C = class extends ft {
882
+ let I = class extends ft {
880
883
  constructor() {
881
- super(...arguments), this._isCookieBannerHidden = !1, this._isModalOpen = !1, this._locale = $t, this.hasPrimaryActionsOnly = Z.hasPrimaryActionsOnly, this.defaultPreferences = Z.defaultPreferences, this.cookieStatementLink = Z.cookieStatementLink, this.cookieTechnologiesLink = Z.cookieTechnologiesLink, this.country = Z.country, this.language = Z.language, this.openLinksInSameTab = Z.openLinksInSameTab, this._getLocaleString = (t, i) => {
882
- let o = `${t}-${i}`.toLowerCase();
884
+ super(...arguments), this._isCookieBannerHidden = !1, this._isModalOpen = !1, this._locale = Ht, this.hasPrimaryActionsOnly = W.hasPrimaryActionsOnly, this.defaultPreferences = W.defaultPreferences, this.cookieStatementLink = W.cookieStatementLink, this.personalizedLabel = W.personalizedLabel, this.personalizedDescription = W.personalizedDescription, this.cookieTechnologiesLink = W.cookieTechnologiesLink, this.country = W.country, this.language = W.language, this.openLinksInSameTab = W.openLinksInSameTab, this._getLocaleString = (t, n) => {
885
+ let o = `${t}-${n}`.toLowerCase();
883
886
  if (it.has(o) || (o = `${t}`.toLowerCase(), it.has(o)))
884
887
  return o;
885
- const r = xn.get(i.toLowerCase());
886
- return r && it.has(r) ? r : `${Z.language}`;
888
+ const r = Pn.get(n.toLowerCase());
889
+ return r && it.has(r) ? r : `${W.language}`;
887
890
  }, this._customTagEnhancers = {
888
891
  linkStatement: (t) => F`<pie-link href="${this.cookieStatementLink}" variant="inverse" target="${this._linkTargetAttribute}" data-test-id="cookie-statement-link">${t}</pie-link>`,
889
892
  linkNecessaryOnly: (t) => F`<pie-link data-test-id="body-necessary-only" tag="button" variant="inverse" @click="${this._onNecessaryOnly}">${t}</pie-link>`,
@@ -892,14 +895,14 @@ let C = class extends ft {
892
895
  linkCookieStatement: (t) => F`<pie-link href="${this.cookieStatementLink}" size="small" target="${this._linkTargetAttribute}" data-test-id="cookie-statement-link">${t}</pie-link>`,
893
896
  linkCookieTechList: (t) => F`<pie-link href="${this.cookieTechnologiesLink}" size="small" target="${this._linkTargetAttribute}" data-test-id="cookie-technology-link">${t}</pie-link>`
894
897
  }, this._onNecessaryOnly = () => {
895
- Be(this, Cn), this._isCookieBannerHidden = !0;
898
+ Be(this, wn), this._isCookieBannerHidden = !0;
896
899
  }, this._onAcceptAll = () => {
897
- Be(this, Dn), this._isCookieBannerHidden = !0;
900
+ Be(this, Cn), this._isCookieBannerHidden = !0;
898
901
  }, this._openManagePreferencesModal = () => {
899
- this._isCookieBannerHidden = !0, Be(this, wn), this._isModalOpen = !0;
902
+ this._isCookieBannerHidden = !0, Be(this, vn), this._isModalOpen = !0;
900
903
  }, this._handleSwitchStates = (t) => {
901
- const { id: i } = t == null ? void 0 : t.currentTarget, o = [...this._preferencesNodes].find(({ id: r }) => r === "all");
902
- if (i === o.id) {
904
+ const { id: n } = t == null ? void 0 : t.currentTarget, o = [...this._preferencesNodes].find(({ id: r }) => r === "all");
905
+ if (n === o.id) {
903
906
  const { checked: r } = t.target;
904
907
  this._preferencesNodes.forEach((s) => {
905
908
  s.checked = s.disabled ? s.checked : r;
@@ -920,20 +923,38 @@ let C = class extends ft {
920
923
  (t.has("language") || t.has("country")) && await this._setLocaleBasedOnCountryAndLanguage(this.language, this.country);
921
924
  }
922
925
  // Dynamically import locale JSON based on country and language
923
- async _setLocaleBasedOnCountryAndLanguage(t, i) {
926
+ async _setLocaleBasedOnCountryAndLanguage(t, n) {
924
927
  try {
925
- const o = this._getLocaleString(t, i);
926
- this._locale = (await Ln(/* @__PURE__ */ Object.assign({ "../locales/bg.js": () => import("./bg-DGJESQ4e.js"), "../locales/ca.js": () => import("./ca-Bcf7sXQS.js"), "../locales/da.js": () => import("./da-zmkmo2qP.js"), "../locales/de.js": () => import("./de-CCDQDaL_.js"), "../locales/en-ca.js": () => import("./en-ca-BWMoXxW2.js"), "../locales/en-fr.js": () => import("./en-fr-B3W1OBz4.js"), "../locales/en.js": () => import("./en-Cg12pw29.js"), "../locales/es.js": () => import("./es-BGd5IeE8.js"), "../locales/fr-ca.js": () => import("./fr-ca-B2Z4Z4i0.js"), "../locales/fr-fr.js": () => import("./fr-fr-Bj0z2tFA.js"), "../locales/fr.js": () => import("./fr-ZJirJTQ1.js"), "../locales/he.js": () => import("./he-CD4nZodw.js"), "../locales/it.js": () => import("./it-C20n5M6-.js"), "../locales/nl.js": () => import("./nl-potC62A2.js"), "../locales/pl.js": () => import("./pl-BZMXvf-W.js"), "../locales/sk.js": () => import("./sk-B2GkzqzB.js") }), `../locales/${o}.js`, 3)).default;
928
+ const o = this._getLocaleString(t, n);
929
+ this._locale = (await In(/* @__PURE__ */ Object.assign({ "../locales/bg.js": () => import("./bg-DGJESQ4e.js"), "../locales/ca.js": () => import("./ca-Bcf7sXQS.js"), "../locales/da.js": () => import("./da-zmkmo2qP.js"), "../locales/de.js": () => import("./de-CCDQDaL_.js"), "../locales/en-ca.js": () => import("./en-ca-BWMoXxW2.js"), "../locales/en-fr.js": () => import("./en-fr-B3W1OBz4.js"), "../locales/en.js": () => import("./en-Cg12pw29.js"), "../locales/es.js": () => import("./es-BGd5IeE8.js"), "../locales/fr-ca.js": () => import("./fr-ca-B2Z4Z4i0.js"), "../locales/fr-fr.js": () => import("./fr-fr-Bj0z2tFA.js"), "../locales/fr.js": () => import("./fr-ZJirJTQ1.js"), "../locales/he.js": () => import("./he-CD4nZodw.js"), "../locales/it.js": () => import("./it-C20n5M6-.js"), "../locales/nl.js": () => import("./nl-potC62A2.js"), "../locales/pl.js": () => import("./pl-BZMXvf-W.js"), "../locales/sk.js": () => import("./sk-B2GkzqzB.js") }), `../locales/${o}.js`, 3)).default;
927
930
  } catch {
928
- this._locale = $t;
931
+ this._locale = Ht;
929
932
  }
930
933
  }
931
934
  _localiseText(t) {
932
- return nn(this._locale, t);
935
+ return rn(this._locale, t);
933
936
  }
934
937
  _localiseRichText(t) {
935
938
  return gi(this._locale, t, this._customTagEnhancers);
936
939
  }
940
+ /**
941
+ * Renders a preference label.
942
+ * For the personalised preference, uses the consumer-supplied `personalizedLabel`
943
+ * prop when provided as plain text, and falls back to the built-in locale string otherwise.
944
+ */
945
+ _renderPreferenceLabel(t) {
946
+ return t === "personalized" && this.personalizedLabel ? this.personalizedLabel : this._localiseText(`preferencesManagement.${t}.title`);
947
+ }
948
+ /**
949
+ * Renders a preference description.
950
+ * For the personalised preference, uses the consumer-supplied `personalizedDescription`
951
+ * prop when provided (allowing consumers to embed their own privacy policy link using
952
+ * plain HTML `<a>` or `<pie-link>` tags), and falls back to the built-in locale string otherwise.
953
+ * All other preferences use the plain locale text with HTML sanitisation.
954
+ */
955
+ _renderPreferenceDescription(t, n) {
956
+ return t === "personalized" && this.personalizedDescription ? $t(Qt(this.personalizedDescription, this._linkTargetAttribute)) : $t(Qt(n, this._linkTargetAttribute));
957
+ }
937
958
  /**
938
959
  * Handles closing the modal and re-displaying the cookie banner
939
960
  * and making the cookie banner visible
@@ -952,9 +973,9 @@ let C = class extends ft {
952
973
  */
953
974
  _handlePreferencesSaved() {
954
975
  let t = {};
955
- [...this._preferencesNodes].filter(({ id: i }) => i !== "all").forEach(({ id: i, checked: o }) => {
956
- t = { ...t, [i]: o };
957
- }), Be(this, vn, t), this._isModalOpen = !1, this._isCookieBannerHidden = !0;
976
+ [...this._preferencesNodes].filter(({ id: n }) => n !== "all").forEach(({ id: n, checked: o }) => {
977
+ t = { ...t, [n]: o };
978
+ }), Be(this, Mn, t), this._isModalOpen = !1, this._isCookieBannerHidden = !0;
958
979
  }
959
980
  /**
960
981
  * Renders the content of the preference item.
@@ -962,26 +983,26 @@ let C = class extends ft {
962
983
  */
963
984
  renderPreference({
964
985
  id: t,
965
- checked: i,
986
+ checked: n,
966
987
  disabled: o,
967
988
  hasDivider: r,
968
989
  hasDescription: s
969
990
  }) {
970
991
  var ne;
971
- const c = this._localiseText(`preferencesManagement.${t}.title`), m = `preferencesManagement.${t}.description`, w = s && this._localiseText(m), V = ["functional", "personalized", "analytical"].every((ie) => {
992
+ const c = this._renderPreferenceLabel(t), d = `preferencesManagement.${t}.description`, v = s && this._localiseText(d), X = ["functional", "personalized", "analytical"].every((ie) => {
972
993
  var U;
973
994
  return ((U = this.defaultPreferences) == null ? void 0 : U[ie]) === !0;
974
995
  });
975
996
  return F`
976
997
  <div class="c-cookieBanner-preference">
977
998
  <div>
978
- <h3 class="c-cookieBanner-subheading">${c}</h3>
979
- ${w ? F`<p class="c-cookieBanner-description">${On(hi(w, this._linkTargetAttribute))}</p>` : Bt}
980
- </div>
999
+ <h3 class="c-cookieBanner-subheading" data-test-id="${t}-label">${c}</h3>
1000
+ ${v ? F`<p class="c-cookieBanner-description" data-test-id="${t}-description">${this._renderPreferenceDescription(t, v)}</p>` : Bt}
1001
+ </div>
981
1002
  <pie-switch
982
1003
  id="${t}"
983
1004
  .aria="${{ label: c }}"
984
- ?checked="${((ne = this.defaultPreferences) == null ? void 0 : ne[t]) || V || i}"
1005
+ ?checked="${((ne = this.defaultPreferences) == null ? void 0 : ne[t]) || X || n}"
985
1006
  ?disabled="${o}"
986
1007
  @change="${this._handleSwitchStates}">
987
1008
  </pie-switch>
@@ -997,8 +1018,8 @@ let C = class extends ft {
997
1018
  <p class="c-cookieBanner-description" data-test-id="modal-description">
998
1019
  ${this._localiseRichText("preferencesManagement.description")}
999
1020
  </p>
1000
- ${Nn(
1001
- Mn,
1021
+ ${On(
1022
+ xn,
1002
1023
  ({ id: t }) => t,
1003
1024
  (t) => this.renderPreference(t)
1004
1025
  )}`;
@@ -1055,53 +1076,59 @@ let C = class extends ft {
1055
1076
  </aside>`;
1056
1077
  }
1057
1078
  };
1058
- C.styles = Sn(In);
1059
- P([
1079
+ I.styles = Rn(Dn);
1080
+ w([
1060
1081
  dt()
1061
- ], C.prototype, "_isCookieBannerHidden", 2);
1062
- P([
1082
+ ], I.prototype, "_isCookieBannerHidden", 2);
1083
+ w([
1063
1084
  dt()
1064
- ], C.prototype, "_isModalOpen", 2);
1065
- P([
1085
+ ], I.prototype, "_isModalOpen", 2);
1086
+ w([
1066
1087
  dt()
1067
- ], C.prototype, "_locale", 2);
1068
- P([
1069
- te({ type: Boolean })
1070
- ], C.prototype, "hasPrimaryActionsOnly", 2);
1071
- P([
1072
- te({ type: Object })
1073
- ], C.prototype, "defaultPreferences", 2);
1074
- P([
1075
- te({ type: String })
1076
- ], C.prototype, "cookieStatementLink", 2);
1077
- P([
1078
- te({ type: String })
1079
- ], C.prototype, "cookieTechnologiesLink", 2);
1080
- P([
1081
- te({ type: String })
1082
- ], C.prototype, "country", 2);
1083
- P([
1084
- te({ type: String })
1085
- ], C.prototype, "language", 2);
1086
- P([
1087
- te({ type: Boolean })
1088
- ], C.prototype, "openLinksInSameTab", 2);
1089
- P([
1090
- Rn("pie-switch")
1091
- ], C.prototype, "_preferencesNodes", 2);
1092
- C = P([
1088
+ ], I.prototype, "_locale", 2);
1089
+ w([
1090
+ V({ type: Boolean })
1091
+ ], I.prototype, "hasPrimaryActionsOnly", 2);
1092
+ w([
1093
+ V({ type: Object })
1094
+ ], I.prototype, "defaultPreferences", 2);
1095
+ w([
1096
+ V({ type: String })
1097
+ ], I.prototype, "cookieStatementLink", 2);
1098
+ w([
1099
+ V({ type: String })
1100
+ ], I.prototype, "personalizedLabel", 2);
1101
+ w([
1102
+ V({ type: String })
1103
+ ], I.prototype, "personalizedDescription", 2);
1104
+ w([
1105
+ V({ type: String })
1106
+ ], I.prototype, "cookieTechnologiesLink", 2);
1107
+ w([
1108
+ V({ type: String })
1109
+ ], I.prototype, "country", 2);
1110
+ w([
1111
+ V({ type: String })
1112
+ ], I.prototype, "language", 2);
1113
+ w([
1114
+ V({ type: Boolean })
1115
+ ], I.prototype, "openLinksInSameTab", 2);
1116
+ w([
1117
+ Ln("pie-switch")
1118
+ ], I.prototype, "_preferencesNodes", 2);
1119
+ I = w([
1093
1120
  kn("pie-cookie-banner")
1094
- ], C);
1121
+ ], I);
1095
1122
  export {
1096
1123
  g as Country,
1097
1124
  p as Language,
1098
- Dn as ON_COOKIE_BANNER_ACCEPT_ALL,
1099
- wn as ON_COOKIE_BANNER_MANAGE_PREFS,
1100
- Cn as ON_COOKIE_BANNER_NECESSARY_ONLY,
1101
- vn as ON_COOKIE_BANNER_PREFS_SAVED,
1102
- C as PieCookieBanner,
1125
+ Cn as ON_COOKIE_BANNER_ACCEPT_ALL,
1126
+ vn as ON_COOKIE_BANNER_MANAGE_PREFS,
1127
+ wn as ON_COOKIE_BANNER_NECESSARY_ONLY,
1128
+ Mn as ON_COOKIE_BANNER_PREFS_SAVED,
1129
+ I as PieCookieBanner,
1103
1130
  it as availableLocales,
1104
- xn as defaultLocaleForCountry,
1105
- Z as defaultProps,
1106
- Mn as preferences
1131
+ Pn as defaultLocaleForCountry,
1132
+ W as defaultProps,
1133
+ xn as preferences
1107
1134
  };