@justeattakeaway/pie-cookie-banner 1.10.21 → 1.11.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/cdn_dist/index.d.ts +15 -0
- package/cdn_dist/index.js +20 -13
- package/custom-elements.json +30 -1
- package/dist/index.d.ts +15 -0
- package/dist/index.js +279 -254
- package/dist/react.d.ts +15 -0
- package/package.json +10 -10
- package/src/defs.ts +9 -0
- package/src/index.ts +38 -5
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LitElement as Nn, unsafeCSS as
|
|
2
|
-
import { state as dt, property as
|
|
3
|
-
import { repeat as
|
|
1
|
+
import { LitElement as Nn, unsafeCSS as On, html as H, nothing as Bt } from "lit";
|
|
2
|
+
import { state as dt, property as K, queryAll as Rn, query as kn } from "lit/decorators.js";
|
|
3
|
+
import { repeat as Ln } from "lit/directives/repeat.js";
|
|
4
4
|
import { unsafeHTML as $t } from "lit/directives/unsafe-html.js";
|
|
5
5
|
import "@justeattakeaway/pie-button";
|
|
6
6
|
import "@justeattakeaway/pie-divider";
|
|
@@ -8,9 +8,9 @@ import "@justeattakeaway/pie-icon-button";
|
|
|
8
8
|
import "@justeattakeaway/pie-link";
|
|
9
9
|
import "@justeattakeaway/pie-modal";
|
|
10
10
|
import "@justeattakeaway/pie-switch";
|
|
11
|
-
import { safeCustomElement as
|
|
12
|
-
import
|
|
13
|
-
const
|
|
11
|
+
import { safeCustomElement as In, dispatchCustomEvent as Be } from "@justeattakeaway/pie-webc-core";
|
|
12
|
+
import Ft from "@justeattakeaway/pie-cookie-banner/locales/en.js";
|
|
13
|
+
const Dn = (t, n, o) => {
|
|
14
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)(
|
|
@@ -22,14 +22,14 @@ const In = (t, n, o) => {
|
|
|
22
22
|
)
|
|
23
23
|
);
|
|
24
24
|
});
|
|
25
|
-
},
|
|
25
|
+
}, Fe = class Fe extends Nn {
|
|
26
26
|
willUpdate() {
|
|
27
|
-
this.getAttribute("v") || this.setAttribute("v",
|
|
27
|
+
this.getAttribute("v") || this.setAttribute("v", Fe.v);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
let ft =
|
|
32
|
-
const
|
|
30
|
+
Fe.v = "1.11.0";
|
|
31
|
+
let ft = Fe;
|
|
32
|
+
const Cn = "*,*: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 Dn = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--c
|
|
|
61
61
|
SLOVAKIA: "sk",
|
|
62
62
|
SPAIN: "es",
|
|
63
63
|
SWITZERLAND: "ch"
|
|
64
|
-
},
|
|
64
|
+
}, vn = "pie-cookie-banner-accept-all", wn = "pie-cookie-banner-necessary-only", xn = "pie-cookie-banner-manage-prefs", Mn = "pie-cookie-banner-prefs-saved", Pn = [
|
|
65
65
|
{
|
|
66
66
|
id: "all",
|
|
67
67
|
hasDivider: !0,
|
|
@@ -85,7 +85,7 @@ const Dn = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--c
|
|
|
85
85
|
id: "personalized",
|
|
86
86
|
hasDescription: !0
|
|
87
87
|
}
|
|
88
|
-
],
|
|
88
|
+
], U = {
|
|
89
89
|
hasPrimaryActionsOnly: !1,
|
|
90
90
|
defaultPreferences: {},
|
|
91
91
|
country: g.GREAT_BRITAIN,
|
|
@@ -94,7 +94,8 @@ const Dn = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--c
|
|
|
94
94
|
personalizedLabel: "",
|
|
95
95
|
personalizedDescription: "",
|
|
96
96
|
cookieTechnologiesLink: "",
|
|
97
|
-
openLinksInSameTab: !1
|
|
97
|
+
openLinksInSameTab: !1,
|
|
98
|
+
shouldFocusOnOpen: !1
|
|
98
99
|
}, it = /* @__PURE__ */ new Set([
|
|
99
100
|
`${p.BULGARIAN}`,
|
|
100
101
|
`${p.ENGLISH}-${g.CANADA}`,
|
|
@@ -112,7 +113,7 @@ const Dn = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--c
|
|
|
112
113
|
`${p.SLOVAK}`,
|
|
113
114
|
`${p.CATALAN}`,
|
|
114
115
|
`${p.SPANISH}`
|
|
115
|
-
]),
|
|
116
|
+
]), Bn = /* @__PURE__ */ new Map([
|
|
116
117
|
[g.AUSTRALIA, `${p.ENGLISH}`],
|
|
117
118
|
[g.AUSTRIA, `${p.GERMAN}`],
|
|
118
119
|
[g.BELGIUM, `${p.DUTCH}`],
|
|
@@ -133,49 +134,49 @@ const Dn = "*,*:after,*:before{box-sizing:inherit}*{margin:0}.c-cookieBanner{--c
|
|
|
133
134
|
[g.SWITZERLAND, `${p.GERMAN}`]
|
|
134
135
|
]);
|
|
135
136
|
/*! @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 */
|
|
136
|
-
function
|
|
137
|
+
function Ht(t, n) {
|
|
137
138
|
(n == null || n > t.length) && (n = t.length);
|
|
138
139
|
for (var o = 0, r = Array(n); o < n; o++) r[o] = t[o];
|
|
139
140
|
return r;
|
|
140
141
|
}
|
|
141
|
-
function
|
|
142
|
+
function $n(t) {
|
|
142
143
|
if (Array.isArray(t)) return t;
|
|
143
144
|
}
|
|
144
|
-
function
|
|
145
|
+
function Fn(t, n) {
|
|
145
146
|
var o = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
146
147
|
if (o != null) {
|
|
147
|
-
var r, s, c, d,
|
|
148
|
+
var r, s, c, d, w = [], E = !0, X = !1;
|
|
148
149
|
try {
|
|
149
|
-
if (c = (o = o.call(t)).next, n !== 0) for (; !(
|
|
150
|
+
if (c = (o = o.call(t)).next, n !== 0) for (; !(E = (r = c.call(o)).done) && (w.push(r.value), w.length !== n); E = !0) ;
|
|
150
151
|
} catch (ne) {
|
|
151
152
|
X = !0, s = ne;
|
|
152
153
|
} finally {
|
|
153
154
|
try {
|
|
154
|
-
if (!
|
|
155
|
+
if (!E && o.return != null && (d = o.return(), Object(d) !== d)) return;
|
|
155
156
|
} finally {
|
|
156
157
|
if (X) throw s;
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
|
-
return
|
|
160
|
+
return w;
|
|
160
161
|
}
|
|
161
162
|
}
|
|
162
163
|
function Hn() {
|
|
163
164
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
164
165
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
165
166
|
}
|
|
166
|
-
function Fn(t, n) {
|
|
167
|
-
return Bn(t) || $n(t, n) || Un(t, n) || Hn();
|
|
168
|
-
}
|
|
169
167
|
function Un(t, n) {
|
|
168
|
+
return $n(t) || Fn(t, n) || zn(t, n) || Hn();
|
|
169
|
+
}
|
|
170
|
+
function zn(t, n) {
|
|
170
171
|
if (t) {
|
|
171
|
-
if (typeof t == "string") return
|
|
172
|
+
if (typeof t == "string") return Ht(t, n);
|
|
172
173
|
var o = {}.toString.call(t).slice(8, -1);
|
|
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) ?
|
|
174
|
+
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, n) : void 0;
|
|
174
175
|
}
|
|
175
176
|
}
|
|
176
|
-
const en = Object.entries, Ut = Object.setPrototypeOf,
|
|
177
|
-
let
|
|
178
|
-
|
|
177
|
+
const en = Object.entries, Ut = Object.setPrototypeOf, Gn = Object.isFrozen, Wn = Object.getPrototypeOf, jn = Object.getOwnPropertyDescriptor;
|
|
178
|
+
let v = Object.freeze, P = Object.seal, me = Object.create, tn = typeof Reflect < "u" && Reflect, ut = tn.apply, pt = tn.construct;
|
|
179
|
+
v || (v = function(n) {
|
|
179
180
|
return n;
|
|
180
181
|
});
|
|
181
182
|
P || (P = function(n) {
|
|
@@ -191,7 +192,7 @@ pt || (pt = function(n) {
|
|
|
191
192
|
r[s - 1] = arguments[s];
|
|
192
193
|
return new n(...r);
|
|
193
194
|
});
|
|
194
|
-
const te = S(Array.prototype.forEach),
|
|
195
|
+
const te = S(Array.prototype.forEach), Yn = S(Array.prototype.lastIndexOf), zt = S(Array.prototype.pop), ue = S(Array.prototype.push), Kn = S(Array.prototype.splice), C = Array.isArray, Ee = S(String.prototype.toLowerCase), ot = S(String.prototype.toString), Gt = S(String.prototype.match), pe = S(String.prototype.replace), Wt = S(String.prototype.indexOf), Vn = S(String.prototype.trim), Xn = S(Number.prototype.toString), qn = 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), be = S(Object.prototype.toString), L = S(RegExp.prototype.test), de = Zn(TypeError);
|
|
195
196
|
function S(t) {
|
|
196
197
|
return function(n) {
|
|
197
198
|
n instanceof RegExp && (n.lastIndex = 0);
|
|
@@ -200,7 +201,7 @@ function S(t) {
|
|
|
200
201
|
return ut(t, n, r);
|
|
201
202
|
};
|
|
202
203
|
}
|
|
203
|
-
function
|
|
204
|
+
function Zn(t) {
|
|
204
205
|
return function() {
|
|
205
206
|
for (var n = arguments.length, o = new Array(n), r = 0; r < n; r++)
|
|
206
207
|
o[r] = arguments[r];
|
|
@@ -208,93 +209,93 @@ function qn(t) {
|
|
|
208
209
|
};
|
|
209
210
|
}
|
|
210
211
|
function f(t, n) {
|
|
211
|
-
let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
212
|
-
if (Ut && Ut(t, null), !
|
|
212
|
+
let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ee;
|
|
213
|
+
if (Ut && Ut(t, null), !C(n))
|
|
213
214
|
return t;
|
|
214
215
|
let r = n.length;
|
|
215
216
|
for (; r--; ) {
|
|
216
217
|
let s = n[r];
|
|
217
218
|
if (typeof s == "string") {
|
|
218
219
|
const c = o(s);
|
|
219
|
-
c !== s && (
|
|
220
|
+
c !== s && (Gn(n) || (n[r] = c), s = c);
|
|
220
221
|
}
|
|
221
222
|
t[s] = !0;
|
|
222
223
|
}
|
|
223
224
|
return t;
|
|
224
225
|
}
|
|
225
|
-
function
|
|
226
|
+
function Jn(t) {
|
|
226
227
|
for (let n = 0; n < t.length; n++)
|
|
227
228
|
T(t, n) || (t[n] = null);
|
|
228
229
|
return t;
|
|
229
230
|
}
|
|
230
|
-
function
|
|
231
|
+
function I(t) {
|
|
231
232
|
const n = me(null);
|
|
232
233
|
for (const r of en(t)) {
|
|
233
|
-
var o =
|
|
234
|
+
var o = Un(r, 2);
|
|
234
235
|
const s = o[0], c = o[1];
|
|
235
|
-
T(t, s) && (
|
|
236
|
+
T(t, s) && (C(c) ? n[s] = Jn(c) : c && typeof c == "object" && c.constructor === Object ? n[s] = I(c) : n[s] = c);
|
|
236
237
|
}
|
|
237
238
|
return n;
|
|
238
239
|
}
|
|
239
|
-
function
|
|
240
|
+
function Qn(t) {
|
|
240
241
|
switch (typeof t) {
|
|
241
242
|
case "string":
|
|
242
243
|
return t;
|
|
243
244
|
case "number":
|
|
244
|
-
return Vn(t);
|
|
245
|
-
case "boolean":
|
|
246
245
|
return Xn(t);
|
|
246
|
+
case "boolean":
|
|
247
|
+
return qn(t);
|
|
247
248
|
case "bigint":
|
|
248
249
|
return jt ? jt(t) : "0";
|
|
249
250
|
case "symbol":
|
|
250
251
|
return Yt ? Yt(t) : "Symbol()";
|
|
251
252
|
case "undefined":
|
|
252
|
-
return
|
|
253
|
+
return be(t);
|
|
253
254
|
case "function":
|
|
254
255
|
case "object": {
|
|
255
256
|
if (t === null)
|
|
256
|
-
return
|
|
257
|
+
return be(t);
|
|
257
258
|
const n = t, o = Y(n, "toString");
|
|
258
259
|
if (typeof o == "function") {
|
|
259
260
|
const r = o(n);
|
|
260
|
-
return typeof r == "string" ? r :
|
|
261
|
+
return typeof r == "string" ? r : be(r);
|
|
261
262
|
}
|
|
262
|
-
return
|
|
263
|
+
return be(t);
|
|
263
264
|
}
|
|
264
265
|
default:
|
|
265
|
-
return
|
|
266
|
+
return be(t);
|
|
266
267
|
}
|
|
267
268
|
}
|
|
268
269
|
function Y(t, n) {
|
|
269
270
|
for (; t !== null; ) {
|
|
270
|
-
const r =
|
|
271
|
+
const r = jn(t, n);
|
|
271
272
|
if (r) {
|
|
272
273
|
if (r.get)
|
|
273
274
|
return S(r.get);
|
|
274
275
|
if (typeof r.value == "function")
|
|
275
276
|
return S(r.value);
|
|
276
277
|
}
|
|
277
|
-
t =
|
|
278
|
+
t = Wn(t);
|
|
278
279
|
}
|
|
279
280
|
function o() {
|
|
280
281
|
return null;
|
|
281
282
|
}
|
|
282
283
|
return o;
|
|
283
284
|
}
|
|
284
|
-
function
|
|
285
|
+
function ei(t) {
|
|
285
286
|
try {
|
|
286
|
-
return
|
|
287
|
+
return L(t, ""), !0;
|
|
287
288
|
} catch {
|
|
288
289
|
return !1;
|
|
289
290
|
}
|
|
290
291
|
}
|
|
291
|
-
const Kt =
|
|
292
|
+
const Kt = v(["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 = v(["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 = v(["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"]), ti = v(["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 = v(["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"]), ni = v(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Vt = v(["#text"]), Xt = v(["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 = v(["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 = v(["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 = v(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), ii = P(/{{[\w\W]*|^[\w\W]*}}/g), oi = P(/<%[\w\W]*|^[\w\W]*%>/g), ri = P(/\${[\w\W]*/g), ai = P(/^data-[\-\w.\u00B7-\uFFFF]+$/), si = P(/^aria-[\-\w]+$/), Zt = P(
|
|
292
293
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
293
294
|
// eslint-disable-line no-useless-escape
|
|
294
|
-
),
|
|
295
|
+
), li = P(/^(?:\w+script|data):/i), ci = P(
|
|
295
296
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
296
297
|
// eslint-disable-line no-control-regex
|
|
297
|
-
),
|
|
298
|
+
), fi = P(/^html$/i), ui = P(/^[a-z][.\w]*(-[.\w]+)+$/i), j = {
|
|
298
299
|
element: 1,
|
|
299
300
|
attribute: 2,
|
|
300
301
|
text: 3,
|
|
@@ -310,9 +311,9 @@ const Kt = C(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
|
|
|
310
311
|
documentFragment: 11,
|
|
311
312
|
notation: 12
|
|
312
313
|
// Deprecated
|
|
313
|
-
},
|
|
314
|
+
}, pi = function() {
|
|
314
315
|
return typeof window > "u" ? null : window;
|
|
315
|
-
},
|
|
316
|
+
}, di = function(n, o) {
|
|
316
317
|
if (typeof n != "object" || typeof n.createPolicy != "function")
|
|
317
318
|
return null;
|
|
318
319
|
let r = null;
|
|
@@ -345,34 +346,34 @@ const Kt = C(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
|
|
|
345
346
|
};
|
|
346
347
|
};
|
|
347
348
|
function nn() {
|
|
348
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
349
|
+
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : pi();
|
|
349
350
|
const n = (l) => nn(l);
|
|
350
351
|
if (n.version = "3.4.8", n.removed = [], !t || !t.document || t.document.nodeType !== j.document || !t.Element)
|
|
351
352
|
return n.isSupported = !1, n;
|
|
352
353
|
let o = t.document;
|
|
353
354
|
const r = o, s = r.currentScript;
|
|
354
355
|
t.DocumentFragment;
|
|
355
|
-
const c = t.HTMLTemplateElement, d = t.Node,
|
|
356
|
+
const c = t.HTMLTemplateElement, d = t.Node, w = t.Element, E = t.NodeFilter, X = t.NamedNodeMap;
|
|
356
357
|
X === void 0 && (t.NamedNodeMap || t.MozNamedAttrMap), t.HTMLFormElement;
|
|
357
|
-
const ne = t.DOMParser, ie = t.trustedTypes,
|
|
358
|
+
const ne = t.DOMParser, ie = t.trustedTypes, z = w.prototype, an = Y(z, "cloneNode"), sn = Y(z, "remove"), ln = Y(z, "nextSibling"), ye = Y(z, "childNodes"), Se = Y(z, "parentNode"), Ne = Y(z, "shadowRoot"), cn = Y(z, "attributes"), B = d && d.prototype ? Y(d.prototype, "nodeType") : null, q = d && d.prototype ? Y(d.prototype, "nodeName") : null;
|
|
358
359
|
if (typeof c == "function") {
|
|
359
360
|
const l = o.createElement("template");
|
|
360
361
|
l.content && l.content.ownerDocument && (o = l.content.ownerDocument);
|
|
361
362
|
}
|
|
362
|
-
let
|
|
363
|
+
let x, he = "", He = 0;
|
|
363
364
|
const oe = function(e) {
|
|
364
|
-
if (
|
|
365
|
+
if (He > 0)
|
|
365
366
|
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.');
|
|
366
|
-
|
|
367
|
+
He++;
|
|
367
368
|
try {
|
|
368
|
-
return
|
|
369
|
+
return x.createHTML(e);
|
|
369
370
|
} finally {
|
|
370
|
-
|
|
371
|
+
He--;
|
|
371
372
|
}
|
|
372
|
-
},
|
|
373
|
-
let
|
|
373
|
+
}, Oe = o, Ue = Oe.implementation, mt = Oe.createNodeIterator, fn = Oe.createDocumentFragment, un = Oe.getElementsByTagName, pn = r.importNode;
|
|
374
|
+
let O = Jt();
|
|
374
375
|
n.isSupported = typeof en == "function" && typeof Se == "function" && Ue && Ue.createHTMLDocument !== void 0;
|
|
375
|
-
const
|
|
376
|
+
const Re = ii, ke = oi, Le = ri, dn = ai, mn = si, hn = li, ht = ci, gn = ui;
|
|
376
377
|
let gt = Zt, A = null;
|
|
377
378
|
const ze = f({}, [...Kt, ...rt, ...at, ...st, ...Vt]);
|
|
378
379
|
let y = null;
|
|
@@ -411,53 +412,53 @@ function nn() {
|
|
|
411
412
|
value: null
|
|
412
413
|
}
|
|
413
414
|
}));
|
|
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,
|
|
415
|
+
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, bt = !0, Et = !1;
|
|
415
416
|
const yt = "user-content-";
|
|
416
|
-
let Ke = !0, Ae = !1, ae = {},
|
|
417
|
+
let Ke = !0, Ae = !1, ae = {}, G = null;
|
|
417
418
|
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"]);
|
|
418
419
|
let St = null;
|
|
419
420
|
const Nt = f({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
420
421
|
let Xe = null;
|
|
421
|
-
const
|
|
422
|
-
let se =
|
|
423
|
-
const Tn = f({}, [
|
|
422
|
+
const Ot = f({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ve = "http://www.w3.org/1998/Math/MathML", we = "http://www.w3.org/2000/svg", W = "http://www.w3.org/1999/xhtml";
|
|
423
|
+
let se = W, qe = !1, Ze = null;
|
|
424
|
+
const Tn = f({}, [ve, we, W], ot);
|
|
424
425
|
let Je = f({}, ["mi", "mo", "mn", "ms", "mtext"]), Qe = f({}, ["annotation-xml"]);
|
|
425
426
|
const An = f({}, ["title", "style", "font", "a", "script"]);
|
|
426
427
|
let _e = null;
|
|
427
|
-
const _n = ["application/xhtml+xml", "text/html"],
|
|
428
|
-
let
|
|
429
|
-
const
|
|
428
|
+
const _n = ["application/xhtml+xml", "text/html"], bn = "text/html";
|
|
429
|
+
let b = null, le = null;
|
|
430
|
+
const En = o.createElement("form"), Rt = function(e) {
|
|
430
431
|
return e instanceof RegExp || e instanceof Function;
|
|
431
432
|
}, et = function() {
|
|
432
433
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
433
434
|
if (le && le === e)
|
|
434
435
|
return;
|
|
435
|
-
(!e || typeof e != "object") && (e = {}), e =
|
|
436
|
-
_n.indexOf(e.PARSER_MEDIA_TYPE) === -1 ?
|
|
437
|
-
const i = T(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ?
|
|
438
|
-
if (_ = me(null), T(i, "tagNameCheck") &&
|
|
436
|
+
(!e || typeof e != "object") && (e = {}), e = I(e), _e = // eslint-disable-next-line unicorn/prefer-includes
|
|
437
|
+
_n.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? bn : e.PARSER_MEDIA_TYPE, b = _e === "application/xhtml+xml" ? ot : Ee, A = T(e, "ALLOWED_TAGS") && C(e.ALLOWED_TAGS) ? f({}, e.ALLOWED_TAGS, b) : ze, y = T(e, "ALLOWED_ATTR") && C(e.ALLOWED_ATTR) ? f({}, e.ALLOWED_ATTR, b) : Ge, Ze = T(e, "ALLOWED_NAMESPACES") && C(e.ALLOWED_NAMESPACES) ? f({}, e.ALLOWED_NAMESPACES, ot) : Tn, Xe = T(e, "ADD_URI_SAFE_ATTR") && C(e.ADD_URI_SAFE_ATTR) ? f(I(Ot), e.ADD_URI_SAFE_ATTR, b) : Ot, St = T(e, "ADD_DATA_URI_TAGS") && C(e.ADD_DATA_URI_TAGS) ? f(I(Nt), e.ADD_DATA_URI_TAGS, b) : Nt, G = T(e, "FORBID_CONTENTS") && C(e.FORBID_CONTENTS) ? f({}, e.FORBID_CONTENTS, b) : Ve, ge = T(e, "FORBID_TAGS") && C(e.FORBID_TAGS) ? f({}, e.FORBID_TAGS, b) : I({}), Ie = T(e, "FORBID_ATTR") && C(e.FORBID_ATTR) ? f({}, e.FORBID_ATTR, b) : I({}), ae = T(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? I(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, bt = e.SANITIZE_DOM !== !1, Et = e.SANITIZE_NAMED_PROPS || !1, Ke = e.KEEP_CONTENT !== !1, Ae = e.IN_PLACE || !1, gt = ei(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Zt, se = typeof e.NAMESPACE == "string" ? e.NAMESPACE : W, Je = T(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? I(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" ? I(e.HTML_INTEGRATION_POINTS) : f({}, ["annotation-xml"]);
|
|
438
|
+
const i = T(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? I(e.CUSTOM_ELEMENT_HANDLING) : me(null);
|
|
439
|
+
if (_ = me(null), T(i, "tagNameCheck") && Rt(i.tagNameCheck) && (_.tagNameCheck = i.tagNameCheck), T(i, "attributeNameCheck") && Rt(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 : C(e.ADD_TAGS) && (A === ze && (A = I(A)), f(A, e.ADD_TAGS, b))), T(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Z.attributeCheck = e.ADD_ATTR : C(e.ADD_ATTR) && (y === Ge && (y = I(y)), f(y, e.ADD_ATTR, b))), T(e, "ADD_URI_SAFE_ATTR") && C(e.ADD_URI_SAFE_ATTR) && f(Xe, e.ADD_URI_SAFE_ATTR, b), T(e, "FORBID_CONTENTS") && C(e.FORBID_CONTENTS) && (G === Ve && (G = I(G)), f(G, e.FORBID_CONTENTS, b)), T(e, "ADD_FORBID_CONTENTS") && C(e.ADD_FORBID_CONTENTS) && (G === Ve && (G = I(G)), f(G, e.ADD_FORBID_CONTENTS, b)), Ke && (A["#text"] = !0), Q && f(A, ["html", "head", "body"]), A.table && (f(A, ["tbody"]), delete ge.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
439
440
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
440
441
|
throw de('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
441
442
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
442
443
|
throw de('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
443
|
-
const a =
|
|
444
|
-
|
|
444
|
+
const a = x;
|
|
445
|
+
x = e.TRUSTED_TYPES_POLICY;
|
|
445
446
|
try {
|
|
446
447
|
he = oe("");
|
|
447
448
|
} catch (m) {
|
|
448
|
-
throw
|
|
449
|
+
throw x = a, m;
|
|
449
450
|
}
|
|
450
451
|
} else
|
|
451
|
-
|
|
452
|
-
(
|
|
453
|
-
},
|
|
452
|
+
x === void 0 && e.TRUSTED_TYPES_POLICY !== null && (x = di(ie, s)), x && typeof he == "string" && (he = oe(""));
|
|
453
|
+
(O.uponSanitizeElement.length > 0 || O.uponSanitizeAttribute.length > 0) && A === ze && (A = I(A)), O.uponSanitizeAttribute.length > 0 && y === Ge && (y = I(y)), v && v(e), le = e;
|
|
454
|
+
}, kt = f({}, [...rt, ...at, ...ti]), Lt = f({}, [...st, ...ni]), yn = function(e) {
|
|
454
455
|
let i = Se(e);
|
|
455
456
|
(!i || !i.tagName) && (i = {
|
|
456
457
|
namespaceURI: se,
|
|
457
458
|
tagName: "template"
|
|
458
459
|
});
|
|
459
|
-
const a =
|
|
460
|
-
return Ze[e.namespaceURI] ? e.namespaceURI ===
|
|
460
|
+
const a = Ee(e.tagName), m = Ee(i.tagName);
|
|
461
|
+
return Ze[e.namespaceURI] ? e.namespaceURI === we ? i.namespaceURI === W ? a === "svg" : i.namespaceURI === ve ? a === "svg" && (m === "annotation-xml" || Je[m]) : !!kt[a] : e.namespaceURI === ve ? i.namespaceURI === W ? a === "math" : i.namespaceURI === we ? a === "math" && Qe[m] : !!Lt[a] : e.namespaceURI === W ? i.namespaceURI === we && !Qe[m] || i.namespaceURI === ve && !Je[m] ? !1 : !Lt[a] && (An[a] || !kt[a]) : !!(_e === "application/xhtml+xml" && Ze[e.namespaceURI]) : !1;
|
|
461
462
|
}, $ = function(e) {
|
|
462
463
|
ue(n.removed, {
|
|
463
464
|
element: e
|
|
@@ -498,9 +499,9 @@ function nn() {
|
|
|
498
499
|
const h = Gt(e, /^[\r\n\t ]+/);
|
|
499
500
|
a = h && h[0];
|
|
500
501
|
}
|
|
501
|
-
_e === "application/xhtml+xml" && se ===
|
|
502
|
-
const m =
|
|
503
|
-
if (se ===
|
|
502
|
+
_e === "application/xhtml+xml" && se === W && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
|
|
503
|
+
const m = x ? oe(e) : e;
|
|
504
|
+
if (se === W)
|
|
504
505
|
try {
|
|
505
506
|
i = new ne().parseFromString(m, _e);
|
|
506
507
|
} catch {
|
|
@@ -513,13 +514,13 @@ function nn() {
|
|
|
513
514
|
}
|
|
514
515
|
}
|
|
515
516
|
const u = i.body || i.documentElement;
|
|
516
|
-
return e && a && u.insertBefore(o.createTextNode(a), u.childNodes[0] || null), se ===
|
|
517
|
+
return e && a && u.insertBefore(o.createTextNode(a), u.childNodes[0] || null), se === W ? un.call(i, Q ? "html" : "body")[0] : Q ? i.documentElement : u;
|
|
517
518
|
}, Dt = function(e) {
|
|
518
519
|
return mt.call(
|
|
519
520
|
e.ownerDocument || e,
|
|
520
521
|
e,
|
|
521
522
|
// eslint-disable-next-line no-bitwise
|
|
522
|
-
|
|
523
|
+
E.SHOW_ELEMENT | E.SHOW_COMMENT | E.SHOW_TEXT | E.SHOW_PROCESSING_INSTRUCTION | E.SHOW_CDATA_SECTION,
|
|
523
524
|
null
|
|
524
525
|
);
|
|
525
526
|
}, tt = function(e) {
|
|
@@ -529,23 +530,23 @@ function nn() {
|
|
|
529
530
|
e.ownerDocument || e,
|
|
530
531
|
e,
|
|
531
532
|
// eslint-disable-next-line no-bitwise
|
|
532
|
-
|
|
533
|
+
E.SHOW_TEXT | E.SHOW_COMMENT | E.SHOW_CDATA_SECTION | E.SHOW_PROCESSING_INSTRUCTION,
|
|
533
534
|
null
|
|
534
535
|
);
|
|
535
536
|
let u = m.nextNode();
|
|
536
537
|
for (; u; ) {
|
|
537
538
|
let N = u.data;
|
|
538
|
-
te([
|
|
539
|
-
N = pe(N,
|
|
539
|
+
te([Re, ke, Le], (M) => {
|
|
540
|
+
N = pe(N, M, " ");
|
|
540
541
|
}), u.data = N, u = m.nextNode();
|
|
541
542
|
}
|
|
542
543
|
const h = (i = (a = e.querySelectorAll) === null || a === void 0 ? void 0 : a.call(e, "template")) !== null && i !== void 0 ? i : [];
|
|
543
544
|
te(Array.from(h), (N) => {
|
|
544
545
|
ce(N.content) && tt(N.content);
|
|
545
546
|
});
|
|
546
|
-
},
|
|
547
|
+
}, xe = function(e) {
|
|
547
548
|
const i = q ? q(e) : null;
|
|
548
|
-
return typeof i != "string" ||
|
|
549
|
+
return typeof i != "string" || b(i) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
|
|
549
550
|
// prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
|
|
550
551
|
// makes the direct read diverge from the cached read; a clean form
|
|
551
552
|
// (same-realm OR foreign-realm) has both reads pointing at the same
|
|
@@ -577,7 +578,7 @@ function nn() {
|
|
|
577
578
|
} catch {
|
|
578
579
|
return !1;
|
|
579
580
|
}
|
|
580
|
-
},
|
|
581
|
+
}, Me = function(e) {
|
|
581
582
|
if (!B || typeof e != "object" || e === null)
|
|
582
583
|
return !1;
|
|
583
584
|
try {
|
|
@@ -586,60 +587,60 @@ function nn() {
|
|
|
586
587
|
return !1;
|
|
587
588
|
}
|
|
588
589
|
};
|
|
589
|
-
function
|
|
590
|
+
function V(l, e, i) {
|
|
590
591
|
te(l, (a) => {
|
|
591
592
|
a.call(n, e, i, le);
|
|
592
593
|
});
|
|
593
594
|
}
|
|
594
595
|
const Ct = function(e) {
|
|
595
596
|
let i = null;
|
|
596
|
-
if (
|
|
597
|
+
if (V(O.beforeSanitizeElements, e, null), xe(e))
|
|
597
598
|
return $(e), !0;
|
|
598
|
-
const a =
|
|
599
|
-
if (
|
|
599
|
+
const a = b(q ? q(e) : e.nodeName);
|
|
600
|
+
if (V(O.uponSanitizeElement, e, {
|
|
600
601
|
tagName: a,
|
|
601
602
|
allowedTags: A
|
|
602
|
-
}), Te && e.hasChildNodes() && !
|
|
603
|
+
}), Te && e.hasChildNodes() && !Me(e.firstElementChild) && L(/<[/\w!]/g, e.innerHTML) && L(/<[/\w!]/g, e.textContent) || Te && e.namespaceURI === W && a === "style" && Me(e.firstElementChild) || e.nodeType === j.progressingInstruction || Te && e.nodeType === j.comment && L(/<[/\w]/g, e.data))
|
|
603
604
|
return $(e), !0;
|
|
604
605
|
if (ge[a] || !(Z.tagCheck instanceof Function && Z.tagCheck(a)) && !A[a]) {
|
|
605
|
-
if (!ge[a] &&
|
|
606
|
+
if (!ge[a] && wt(a) && (_.tagNameCheck instanceof RegExp && L(_.tagNameCheck, a) || _.tagNameCheck instanceof Function && _.tagNameCheck(a)))
|
|
606
607
|
return !1;
|
|
607
|
-
if (Ke && !
|
|
608
|
+
if (Ke && !G[a]) {
|
|
608
609
|
const u = Se(e), h = ye(e);
|
|
609
610
|
if (h && u) {
|
|
610
611
|
const N = h.length;
|
|
611
|
-
for (let
|
|
612
|
-
const
|
|
613
|
-
u.insertBefore(
|
|
612
|
+
for (let M = N - 1; M >= 0; --M) {
|
|
613
|
+
const F = an(h[M], !0);
|
|
614
|
+
u.insertBefore(F, ln(e));
|
|
614
615
|
}
|
|
615
616
|
}
|
|
616
617
|
}
|
|
617
618
|
return $(e), !0;
|
|
618
619
|
}
|
|
619
|
-
return (B ? B(e) : e.nodeType) === j.element && !yn(e) || (a === "noscript" || a === "noembed" || a === "noframes") &&
|
|
620
|
+
return (B ? B(e) : e.nodeType) === j.element && !yn(e) || (a === "noscript" || a === "noembed" || a === "noframes") && L(/<\/no(script|embed|frames)/i, e.innerHTML) ? ($(e), !0) : (J && e.nodeType === j.text && (i = e.textContent, te([Re, ke, Le], (u) => {
|
|
620
621
|
i = pe(i, u, " ");
|
|
621
622
|
}), e.textContent !== i && (ue(n.removed, {
|
|
622
623
|
element: e.cloneNode()
|
|
623
|
-
}), e.textContent = i)),
|
|
624
|
-
},
|
|
625
|
-
if (Ie[i] ||
|
|
624
|
+
}), e.textContent = i)), V(O.afterSanitizeElements, e, null), !1);
|
|
625
|
+
}, vt = function(e, i, a) {
|
|
626
|
+
if (Ie[i] || bt && (i === "id" || i === "name") && (a in o || a in En))
|
|
626
627
|
return !1;
|
|
627
628
|
const m = y[i] || Z.attributeCheck instanceof Function && Z.attributeCheck(i, e);
|
|
628
|
-
if (!(We && !Ie[i] &&
|
|
629
|
-
if (!(Tt &&
|
|
629
|
+
if (!(We && !Ie[i] && L(dn, i))) {
|
|
630
|
+
if (!(Tt && L(mn, i))) {
|
|
630
631
|
if (!m || Ie[i]) {
|
|
631
632
|
if (
|
|
632
633
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
633
634
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
634
635
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
635
|
-
!(
|
|
636
|
+
!(wt(e) && (_.tagNameCheck instanceof RegExp && L(_.tagNameCheck, e) || _.tagNameCheck instanceof Function && _.tagNameCheck(e)) && (_.attributeNameCheck instanceof RegExp && L(_.attributeNameCheck, i) || _.attributeNameCheck instanceof Function && _.attributeNameCheck(i, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
636
637
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
637
|
-
i === "is" && _.allowCustomizedBuiltInElements && (_.tagNameCheck instanceof RegExp &&
|
|
638
|
+
i === "is" && _.allowCustomizedBuiltInElements && (_.tagNameCheck instanceof RegExp && L(_.tagNameCheck, a) || _.tagNameCheck instanceof Function && _.tagNameCheck(a)))
|
|
638
639
|
) return !1;
|
|
639
640
|
} else if (!Xe[i]) {
|
|
640
|
-
if (!
|
|
641
|
+
if (!L(gt, pe(a, ht, ""))) {
|
|
641
642
|
if (!((i === "src" || i === "xlink:href" || i === "href") && e !== "script" && Wt(a, "data:") === 0 && St[e])) {
|
|
642
|
-
if (!(At && !
|
|
643
|
+
if (!(At && !L(hn, pe(a, ht, "")))) {
|
|
643
644
|
if (a)
|
|
644
645
|
return !1;
|
|
645
646
|
}
|
|
@@ -649,12 +650,12 @@ function nn() {
|
|
|
649
650
|
}
|
|
650
651
|
}
|
|
651
652
|
return !0;
|
|
652
|
-
}, Sn = f({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]),
|
|
653
|
-
return !Sn[
|
|
654
|
-
},
|
|
655
|
-
|
|
653
|
+
}, Sn = f({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), wt = function(e) {
|
|
654
|
+
return !Sn[Ee(e)] && L(gn, e);
|
|
655
|
+
}, xt = function(e) {
|
|
656
|
+
V(O.beforeSanitizeAttributes, e, null);
|
|
656
657
|
const i = e.attributes;
|
|
657
|
-
if (!i ||
|
|
658
|
+
if (!i || xe(e))
|
|
658
659
|
return;
|
|
659
660
|
const a = {
|
|
660
661
|
attrName: "",
|
|
@@ -665,13 +666,13 @@ function nn() {
|
|
|
665
666
|
};
|
|
666
667
|
let m = i.length;
|
|
667
668
|
for (; m--; ) {
|
|
668
|
-
const u = i[m], h = u.name, N = u.namespaceURI,
|
|
669
|
-
let
|
|
670
|
-
if (a.attrName =
|
|
669
|
+
const u = i[m], h = u.name, N = u.namespaceURI, M = u.value, F = b(h), nt = M;
|
|
670
|
+
let R = h === "value" ? nt : Vn(nt);
|
|
671
|
+
if (a.attrName = F, a.attrValue = R, a.keepAttr = !0, a.forceKeepAttr = void 0, V(O.uponSanitizeAttribute, e, a), R = a.attrValue, Et && (F === "id" || F === "name") && Wt(R, yt) !== 0 && (ee(h, e), R = yt + R), Te && L(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, R)) {
|
|
671
672
|
ee(h, e);
|
|
672
673
|
continue;
|
|
673
674
|
}
|
|
674
|
-
if (
|
|
675
|
+
if (F === "attributename" && Gt(R, "href")) {
|
|
675
676
|
ee(h, e);
|
|
676
677
|
continue;
|
|
677
678
|
}
|
|
@@ -681,46 +682,46 @@ function nn() {
|
|
|
681
682
|
ee(h, e);
|
|
682
683
|
continue;
|
|
683
684
|
}
|
|
684
|
-
if (!_t &&
|
|
685
|
+
if (!_t && L(/\/>/i, R)) {
|
|
685
686
|
ee(h, e);
|
|
686
687
|
continue;
|
|
687
688
|
}
|
|
688
|
-
J && te([
|
|
689
|
-
|
|
689
|
+
J && te([Re, ke, Le], (Pt) => {
|
|
690
|
+
R = pe(R, Pt, " ");
|
|
690
691
|
});
|
|
691
|
-
const
|
|
692
|
-
if (!
|
|
692
|
+
const Mt = b(e.nodeName);
|
|
693
|
+
if (!vt(Mt, F, R)) {
|
|
693
694
|
ee(h, e);
|
|
694
695
|
continue;
|
|
695
696
|
}
|
|
696
|
-
if (
|
|
697
|
-
switch (ie.getAttributeType(
|
|
697
|
+
if (x && typeof ie == "object" && typeof ie.getAttributeType == "function" && !N)
|
|
698
|
+
switch (ie.getAttributeType(Mt, F)) {
|
|
698
699
|
case "TrustedHTML": {
|
|
699
|
-
|
|
700
|
+
R = oe(R);
|
|
700
701
|
break;
|
|
701
702
|
}
|
|
702
703
|
case "TrustedScriptURL": {
|
|
703
|
-
|
|
704
|
+
R = x.createScriptURL(R);
|
|
704
705
|
break;
|
|
705
706
|
}
|
|
706
707
|
}
|
|
707
|
-
if (
|
|
708
|
+
if (R !== nt)
|
|
708
709
|
try {
|
|
709
|
-
N ? e.setAttributeNS(N, h,
|
|
710
|
+
N ? e.setAttributeNS(N, h, R) : e.setAttribute(h, R), xe(e) ? $(e) : zt(n.removed);
|
|
710
711
|
} catch {
|
|
711
712
|
ee(h, e);
|
|
712
713
|
}
|
|
713
714
|
}
|
|
714
|
-
|
|
715
|
+
V(O.afterSanitizeAttributes, e, null);
|
|
715
716
|
}, Pe = function(e) {
|
|
716
717
|
let i = null;
|
|
717
718
|
const a = Dt(e);
|
|
718
|
-
for (
|
|
719
|
-
if (
|
|
719
|
+
for (V(O.beforeSanitizeShadowDOM, e, null); i = a.nextNode(); )
|
|
720
|
+
if (V(O.uponSanitizeShadowNode, i, null), Ct(i), xt(i), ce(i.content) && Pe(i.content), (B ? B(i) : i.nodeType) === j.element) {
|
|
720
721
|
const u = Ne ? Ne(i) : i.shadowRoot;
|
|
721
722
|
ce(u) && (fe(u), Pe(u));
|
|
722
723
|
}
|
|
723
|
-
|
|
724
|
+
V(O.afterSanitizeShadowDOM, e, null);
|
|
724
725
|
}, fe = function(e) {
|
|
725
726
|
const i = B ? B(e) : e.nodeType;
|
|
726
727
|
if (i === j.element) {
|
|
@@ -738,7 +739,7 @@ function nn() {
|
|
|
738
739
|
fe(u);
|
|
739
740
|
if (i === j.element) {
|
|
740
741
|
const u = q ? q(e) : null;
|
|
741
|
-
if (typeof u == "string" &&
|
|
742
|
+
if (typeof u == "string" && b(u) === "template") {
|
|
742
743
|
const h = e.content;
|
|
743
744
|
ce(h) && fe(h);
|
|
744
745
|
}
|
|
@@ -746,33 +747,33 @@ function nn() {
|
|
|
746
747
|
};
|
|
747
748
|
return n.sanitize = function(l) {
|
|
748
749
|
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" && !
|
|
750
|
+
if (qe = !l, qe && (l = "<!-->"), typeof l != "string" && !Me(l) && (l = Qn(l), typeof l != "string"))
|
|
750
751
|
throw de("dirty is not a string, aborting");
|
|
751
752
|
if (!n.isSupported)
|
|
752
753
|
return l;
|
|
753
754
|
if (je || et(e), n.removed = [], typeof l == "string" && (Ae = !1), Ae) {
|
|
754
|
-
const
|
|
755
|
-
if (typeof
|
|
756
|
-
const
|
|
757
|
-
if (!A[
|
|
755
|
+
const M = q ? q(l) : l.nodeName;
|
|
756
|
+
if (typeof M == "string") {
|
|
757
|
+
const F = b(M);
|
|
758
|
+
if (!A[F] || ge[F])
|
|
758
759
|
throw de("root node is forbidden and cannot be sanitized in-place");
|
|
759
760
|
}
|
|
760
|
-
if (
|
|
761
|
+
if (xe(l))
|
|
761
762
|
throw de("root node is clobbered and cannot be sanitized in-place");
|
|
762
763
|
fe(l);
|
|
763
|
-
} else if (
|
|
764
|
+
} else if (Me(l))
|
|
764
765
|
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);
|
|
765
766
|
else {
|
|
766
767
|
if (!re && !J && !Q && // eslint-disable-next-line unicorn/prefer-includes
|
|
767
768
|
l.indexOf("<") === -1)
|
|
768
|
-
return
|
|
769
|
+
return x && Ce ? oe(l) : l;
|
|
769
770
|
if (i = It(l), !i)
|
|
770
771
|
return re ? null : Ce ? he : "";
|
|
771
772
|
}
|
|
772
773
|
i && Ye && $(i.firstChild);
|
|
773
774
|
const h = Dt(Ae ? l : i);
|
|
774
775
|
for (; m = h.nextNode(); )
|
|
775
|
-
Ct(m),
|
|
776
|
+
Ct(m), xt(m), ce(m.content) && Pe(m.content);
|
|
776
777
|
if (Ae)
|
|
777
778
|
return J && tt(l), l;
|
|
778
779
|
if (re) {
|
|
@@ -784,10 +785,10 @@ function nn() {
|
|
|
784
785
|
return (y.shadowroot || y.shadowrootmode) && (u = pn.call(r, u, !0)), u;
|
|
785
786
|
}
|
|
786
787
|
let N = Q ? i.outerHTML : i.innerHTML;
|
|
787
|
-
return Q && A["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name &&
|
|
788
|
-
` + N), J && te([
|
|
789
|
-
N = pe(N,
|
|
790
|
-
}),
|
|
788
|
+
return Q && A["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && L(fi, i.ownerDocument.doctype.name) && (N = "<!DOCTYPE " + i.ownerDocument.doctype.name + `>
|
|
789
|
+
` + N), J && te([Re, ke, Le], (M) => {
|
|
790
|
+
N = pe(N, M, " ");
|
|
791
|
+
}), x && Ce ? oe(N) : N;
|
|
791
792
|
}, n.setConfig = function() {
|
|
792
793
|
let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
793
794
|
et(l), je = !0;
|
|
@@ -795,54 +796,54 @@ function nn() {
|
|
|
795
796
|
le = null, je = !1;
|
|
796
797
|
}, n.isValidAttribute = function(l, e, i) {
|
|
797
798
|
le || et({});
|
|
798
|
-
const a =
|
|
799
|
-
return
|
|
799
|
+
const a = b(l), m = b(e);
|
|
800
|
+
return vt(a, m, i);
|
|
800
801
|
}, n.addHook = function(l, e) {
|
|
801
|
-
typeof e == "function" && ue(
|
|
802
|
+
typeof e == "function" && ue(O[l], e);
|
|
802
803
|
}, n.removeHook = function(l, e) {
|
|
803
804
|
if (e !== void 0) {
|
|
804
|
-
const i =
|
|
805
|
-
return i === -1 ? void 0 :
|
|
805
|
+
const i = Yn(O[l], e);
|
|
806
|
+
return i === -1 ? void 0 : Kn(O[l], i, 1)[0];
|
|
806
807
|
}
|
|
807
|
-
return zt(
|
|
808
|
+
return zt(O[l]);
|
|
808
809
|
}, n.removeHooks = function(l) {
|
|
809
|
-
|
|
810
|
+
O[l] = [];
|
|
810
811
|
}, n.removeAllHooks = function() {
|
|
811
|
-
|
|
812
|
+
O = Jt();
|
|
812
813
|
}, n;
|
|
813
814
|
}
|
|
814
815
|
var ct = nn();
|
|
815
816
|
function on(t) {
|
|
816
817
|
console.error(`[localisation-utils]: ${t}`);
|
|
817
818
|
}
|
|
818
|
-
function
|
|
819
|
+
function mi(t, n) {
|
|
819
820
|
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(/[,[\].]+?/);
|
|
820
821
|
return typeof r != "string" ? "" : r;
|
|
821
822
|
}
|
|
822
823
|
function rn(t, n) {
|
|
823
824
|
if (!t) throw new Error('"locale" parameter cannot be empty');
|
|
824
825
|
if (!n) throw new Error('"key" parameter cannot be empty');
|
|
825
|
-
const o =
|
|
826
|
+
const o = mi(t, n);
|
|
826
827
|
return o || (on(`Couldn't find a value for the key "${n}", it will be used as fallback.`), n);
|
|
827
828
|
}
|
|
828
|
-
function
|
|
829
|
+
function hi(t) {
|
|
829
830
|
const o = t.map((s) => `(<${s}.*>.*</${s}>)`).join("|");
|
|
830
831
|
return new RegExp(o, "igm");
|
|
831
832
|
}
|
|
832
|
-
function
|
|
833
|
+
function gi(t, n) {
|
|
833
834
|
const o = Object.keys(n);
|
|
834
835
|
if (o.length === 0) return [t];
|
|
835
|
-
const r =
|
|
836
|
+
const r = hi(o);
|
|
836
837
|
return t.split(r).filter((s) => !!s).map((s) => {
|
|
837
838
|
if (!s.match(r)) return s;
|
|
838
839
|
const d = s.match(/<(.*)>(.*)<\/.*>/);
|
|
839
840
|
if (!d) return s;
|
|
840
|
-
const [,
|
|
841
|
-
return [
|
|
841
|
+
const [, w, E] = d;
|
|
842
|
+
return [w, E];
|
|
842
843
|
}).map((s) => {
|
|
843
844
|
if (!Array.isArray(s)) return s;
|
|
844
|
-
const [d,
|
|
845
|
-
return
|
|
845
|
+
const [d, w] = s, E = n[d];
|
|
846
|
+
return E || typeof E == "function" ? E(w) : (on(`Custom tag "${d}" does not have a matching enhancer function`), w);
|
|
846
847
|
});
|
|
847
848
|
}
|
|
848
849
|
function Qt(t, n = "_blank") {
|
|
@@ -867,39 +868,39 @@ function Qt(t, n = "_blank") {
|
|
|
867
868
|
ct.removeHook("afterSanitizeAttributes");
|
|
868
869
|
}
|
|
869
870
|
}
|
|
870
|
-
function
|
|
871
|
+
function Ti(t, n, o) {
|
|
871
872
|
if (!t) throw new Error('"locale" parameter cannot be empty');
|
|
872
873
|
if (!n) throw new Error('"key" parameter cannot be empty');
|
|
873
874
|
if (!o) throw new Error('"customTagEnhancers" parameter cannot be empty');
|
|
874
875
|
const r = rn(t, n);
|
|
875
|
-
return
|
|
876
|
+
return gi(r, o);
|
|
876
877
|
}
|
|
877
|
-
var
|
|
878
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
878
|
+
var Ai = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, D = (t, n, o, r) => {
|
|
879
|
+
for (var s = r > 1 ? void 0 : r ? _i(n, o) : n, c = t.length - 1, d; c >= 0; c--)
|
|
879
880
|
(d = t[c]) && (s = (r ? d(n, o, s) : d(s)) || s);
|
|
880
|
-
return r && s &&
|
|
881
|
+
return r && s && Ai(n, o, s), s;
|
|
881
882
|
};
|
|
882
|
-
let
|
|
883
|
+
let k = class extends ft {
|
|
883
884
|
constructor() {
|
|
884
|
-
super(...arguments), this._isCookieBannerHidden = !1, this._isModalOpen = !1, this._locale =
|
|
885
|
+
super(...arguments), this._isCookieBannerHidden = !1, this._isModalOpen = !1, this._locale = Ft, this.hasPrimaryActionsOnly = U.hasPrimaryActionsOnly, this.defaultPreferences = U.defaultPreferences, this.cookieStatementLink = U.cookieStatementLink, this.personalizedLabel = U.personalizedLabel, this.personalizedDescription = U.personalizedDescription, this.cookieTechnologiesLink = U.cookieTechnologiesLink, this.country = U.country, this.language = U.language, this.openLinksInSameTab = U.openLinksInSameTab, this.shouldFocusOnOpen = U.shouldFocusOnOpen, this._getLocaleString = (t, n) => {
|
|
885
886
|
let o = `${t}-${n}`.toLowerCase();
|
|
886
887
|
if (it.has(o) || (o = `${t}`.toLowerCase(), it.has(o)))
|
|
887
888
|
return o;
|
|
888
|
-
const r =
|
|
889
|
-
return r && it.has(r) ? r : `${
|
|
889
|
+
const r = Bn.get(n.toLowerCase());
|
|
890
|
+
return r && it.has(r) ? r : `${U.language}`;
|
|
890
891
|
}, this._customTagEnhancers = {
|
|
891
|
-
linkStatement: (t) =>
|
|
892
|
-
linkNecessaryOnly: (t) =>
|
|
893
|
-
linkManagePreferences: (t) =>
|
|
894
|
-
linkAcceptAll: (t) =>
|
|
895
|
-
linkCookieStatement: (t) =>
|
|
896
|
-
linkCookieTechList: (t) =>
|
|
892
|
+
linkStatement: (t) => H`<pie-link href="${this.cookieStatementLink}" variant="inverse" target="${this._linkTargetAttribute}" data-test-id="cookie-statement-link">${t}</pie-link>`,
|
|
893
|
+
linkNecessaryOnly: (t) => H`<pie-link data-test-id="body-necessary-only" tag="button" variant="inverse" @click="${this._onNecessaryOnly}">${t}</pie-link>`,
|
|
894
|
+
linkManagePreferences: (t) => H`<pie-link data-test-id="body-manage-prefs" tag="button" variant="inverse" @click="${this._openManagePreferencesModal}">${t}</pie-link>`,
|
|
895
|
+
linkAcceptAll: (t) => H`<pie-link data-test-id="body-accept-all" tag="button" variant="inverse" @click="${this._onAcceptAll}">${t}</pie-link>`,
|
|
896
|
+
linkCookieStatement: (t) => H`<pie-link href="${this.cookieStatementLink}" size="small" target="${this._linkTargetAttribute}" data-test-id="cookie-statement-link">${t}</pie-link>`,
|
|
897
|
+
linkCookieTechList: (t) => H`<pie-link href="${this.cookieTechnologiesLink}" size="small" target="${this._linkTargetAttribute}" data-test-id="cookie-technology-link">${t}</pie-link>`
|
|
897
898
|
}, this._onNecessaryOnly = () => {
|
|
898
899
|
Be(this, wn), this._isCookieBannerHidden = !0;
|
|
899
900
|
}, this._onAcceptAll = () => {
|
|
900
|
-
Be(this,
|
|
901
|
+
Be(this, vn), this._isCookieBannerHidden = !0;
|
|
901
902
|
}, this._openManagePreferencesModal = () => {
|
|
902
|
-
this._isCookieBannerHidden = !0, Be(this,
|
|
903
|
+
this._isCookieBannerHidden = !0, Be(this, xn), this._isModalOpen = !0;
|
|
903
904
|
}, this._handleSwitchStates = (t) => {
|
|
904
905
|
const { id: n } = t == null ? void 0 : t.currentTarget, o = [...this._preferencesNodes].find(({ id: r }) => r === "all");
|
|
905
906
|
if (n === o.id) {
|
|
@@ -919,23 +920,34 @@ let I = class extends ft {
|
|
|
919
920
|
get _linkTargetAttribute() {
|
|
920
921
|
return this.openLinksInSameTab ? "_self" : "_blank";
|
|
921
922
|
}
|
|
923
|
+
firstUpdated() {
|
|
924
|
+
this.shouldFocusOnOpen && !this._isCookieBannerHidden && this._focusBanner();
|
|
925
|
+
}
|
|
922
926
|
async updated(t) {
|
|
923
|
-
(t.has("language") || t.has("country")) && await this._setLocaleBasedOnCountryAndLanguage(this.language, this.country);
|
|
927
|
+
(t.has("language") || t.has("country")) && await this._setLocaleBasedOnCountryAndLanguage(this.language, this.country), t.get("_isCookieBannerHidden") === !0 && !this._isCookieBannerHidden && this._focusBanner();
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* Moves focus to the banner dialog container.
|
|
931
|
+
* The container uses tabindex="-1", so it is only focusable programmatically.
|
|
932
|
+
*/
|
|
933
|
+
_focusBanner() {
|
|
934
|
+
var t;
|
|
935
|
+
(t = this._bannerContainer) == null || t.focus();
|
|
924
936
|
}
|
|
925
937
|
// Dynamically import locale JSON based on country and language
|
|
926
938
|
async _setLocaleBasedOnCountryAndLanguage(t, n) {
|
|
927
939
|
try {
|
|
928
940
|
const o = this._getLocaleString(t, n);
|
|
929
|
-
this._locale = (await
|
|
941
|
+
this._locale = (await Dn(/* @__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;
|
|
930
942
|
} catch {
|
|
931
|
-
this._locale =
|
|
943
|
+
this._locale = Ft;
|
|
932
944
|
}
|
|
933
945
|
}
|
|
934
946
|
_localiseText(t) {
|
|
935
947
|
return rn(this._locale, t);
|
|
936
948
|
}
|
|
937
949
|
_localiseRichText(t) {
|
|
938
|
-
return
|
|
950
|
+
return Ti(this._locale, t, this._customTagEnhancers);
|
|
939
951
|
}
|
|
940
952
|
/**
|
|
941
953
|
* Renders a preference label.
|
|
@@ -989,15 +1001,15 @@ let I = class extends ft {
|
|
|
989
1001
|
hasDescription: s
|
|
990
1002
|
}) {
|
|
991
1003
|
var ne;
|
|
992
|
-
const c = this._renderPreferenceLabel(t), d = `preferencesManagement.${t}.description`,
|
|
993
|
-
var
|
|
994
|
-
return ((
|
|
1004
|
+
const c = this._renderPreferenceLabel(t), d = `preferencesManagement.${t}.description`, w = s && this._localiseText(d), X = ["functional", "personalized", "analytical"].every((ie) => {
|
|
1005
|
+
var z;
|
|
1006
|
+
return ((z = this.defaultPreferences) == null ? void 0 : z[ie]) === !0;
|
|
995
1007
|
});
|
|
996
|
-
return
|
|
1008
|
+
return H`
|
|
997
1009
|
<div class="c-cookieBanner-preference">
|
|
998
1010
|
<div>
|
|
999
1011
|
<h3 class="c-cookieBanner-subheading" data-test-id="${t}-label">${c}</h3>
|
|
1000
|
-
${
|
|
1012
|
+
${w ? H`<p class="c-cookieBanner-description" data-test-id="${t}-description">${this._renderPreferenceDescription(t, w)}</p>` : Bt}
|
|
1001
1013
|
</div>
|
|
1002
1014
|
<pie-switch
|
|
1003
1015
|
id="${t}"
|
|
@@ -1007,19 +1019,19 @@ let I = class extends ft {
|
|
|
1007
1019
|
@change="${this._handleSwitchStates}">
|
|
1008
1020
|
</pie-switch>
|
|
1009
1021
|
</div>
|
|
1010
|
-
${r ?
|
|
1022
|
+
${r ? H`<pie-divider></pie-divider>` : Bt}`;
|
|
1011
1023
|
}
|
|
1012
1024
|
/**
|
|
1013
1025
|
* Renders the modal content.
|
|
1014
1026
|
* @private
|
|
1015
1027
|
*/
|
|
1016
1028
|
renderModalContent() {
|
|
1017
|
-
return
|
|
1029
|
+
return H`
|
|
1018
1030
|
<p class="c-cookieBanner-description" data-test-id="modal-description">
|
|
1019
1031
|
${this._localiseRichText("preferencesManagement.description")}
|
|
1020
1032
|
</p>
|
|
1021
|
-
${
|
|
1022
|
-
|
|
1033
|
+
${Ln(
|
|
1034
|
+
Pn,
|
|
1023
1035
|
({ id: t }) => t,
|
|
1024
1036
|
(t) => this.renderPreference(t)
|
|
1025
1037
|
)}`;
|
|
@@ -1029,7 +1041,7 @@ let I = class extends ft {
|
|
|
1029
1041
|
text: this._localiseText("preferencesManagement.cta.save.label"),
|
|
1030
1042
|
ariaLabel: this._localiseText("preferencesManagement.cta.save.label")
|
|
1031
1043
|
};
|
|
1032
|
-
return
|
|
1044
|
+
return H`
|
|
1033
1045
|
<pie-modal
|
|
1034
1046
|
.isOpen="${this._isModalOpen}"
|
|
1035
1047
|
hasBackButton
|
|
@@ -1041,10 +1053,17 @@ let I = class extends ft {
|
|
|
1041
1053
|
@pie-modal-back="${this._displayCookieBanner}">
|
|
1042
1054
|
${this.renderModalContent()}
|
|
1043
1055
|
</pie-modal>
|
|
1044
|
-
<
|
|
1045
|
-
|
|
1056
|
+
<div
|
|
1057
|
+
data-test-id="pie-cookie-banner"
|
|
1058
|
+
class="c-cookieBanner"
|
|
1059
|
+
role="dialog"
|
|
1060
|
+
aria-labelledby="cookie-banner-title"
|
|
1061
|
+
aria-describedby="cookie-banner-text"
|
|
1062
|
+
tabindex="-1"
|
|
1063
|
+
?isCookieBannerHidden=${this._isCookieBannerHidden}>
|
|
1064
|
+
<h2 id="cookie-banner-title" class="c-cookieBanner-title">${this._localiseText("banner.title")}</h2>
|
|
1046
1065
|
<div class="c-cookieBanner-body" data-test-id="banner-description">
|
|
1047
|
-
<p>${this._localiseRichText("banner.description")}</p>
|
|
1066
|
+
<p id="cookie-banner-text">${this._localiseRichText("banner.description")}</p>
|
|
1048
1067
|
</div>
|
|
1049
1068
|
|
|
1050
1069
|
<div class="c-cookieBanner-actions">
|
|
@@ -1073,62 +1092,68 @@ let I = class extends ft {
|
|
|
1073
1092
|
${this._localiseText("banner.cta.managePreferences")}
|
|
1074
1093
|
</pie-link>
|
|
1075
1094
|
</div>
|
|
1076
|
-
</
|
|
1095
|
+
</div>`;
|
|
1077
1096
|
}
|
|
1078
1097
|
};
|
|
1079
|
-
|
|
1080
|
-
|
|
1098
|
+
k.styles = On(Cn);
|
|
1099
|
+
D([
|
|
1081
1100
|
dt()
|
|
1082
|
-
],
|
|
1083
|
-
|
|
1101
|
+
], k.prototype, "_isCookieBannerHidden", 2);
|
|
1102
|
+
D([
|
|
1084
1103
|
dt()
|
|
1085
|
-
],
|
|
1086
|
-
|
|
1104
|
+
], k.prototype, "_isModalOpen", 2);
|
|
1105
|
+
D([
|
|
1087
1106
|
dt()
|
|
1088
|
-
],
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
],
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
],
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
],
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
],
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
],
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
],
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
],
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
],
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
],
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
],
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
],
|
|
1107
|
+
], k.prototype, "_locale", 2);
|
|
1108
|
+
D([
|
|
1109
|
+
K({ type: Boolean })
|
|
1110
|
+
], k.prototype, "hasPrimaryActionsOnly", 2);
|
|
1111
|
+
D([
|
|
1112
|
+
K({ type: Object })
|
|
1113
|
+
], k.prototype, "defaultPreferences", 2);
|
|
1114
|
+
D([
|
|
1115
|
+
K({ type: String })
|
|
1116
|
+
], k.prototype, "cookieStatementLink", 2);
|
|
1117
|
+
D([
|
|
1118
|
+
K({ type: String })
|
|
1119
|
+
], k.prototype, "personalizedLabel", 2);
|
|
1120
|
+
D([
|
|
1121
|
+
K({ type: String })
|
|
1122
|
+
], k.prototype, "personalizedDescription", 2);
|
|
1123
|
+
D([
|
|
1124
|
+
K({ type: String })
|
|
1125
|
+
], k.prototype, "cookieTechnologiesLink", 2);
|
|
1126
|
+
D([
|
|
1127
|
+
K({ type: String })
|
|
1128
|
+
], k.prototype, "country", 2);
|
|
1129
|
+
D([
|
|
1130
|
+
K({ type: String })
|
|
1131
|
+
], k.prototype, "language", 2);
|
|
1132
|
+
D([
|
|
1133
|
+
K({ type: Boolean })
|
|
1134
|
+
], k.prototype, "openLinksInSameTab", 2);
|
|
1135
|
+
D([
|
|
1136
|
+
K({ type: Boolean })
|
|
1137
|
+
], k.prototype, "shouldFocusOnOpen", 2);
|
|
1138
|
+
D([
|
|
1139
|
+
Rn("pie-switch")
|
|
1140
|
+
], k.prototype, "_preferencesNodes", 2);
|
|
1141
|
+
D([
|
|
1142
|
+
kn('[data-test-id="pie-cookie-banner"]')
|
|
1143
|
+
], k.prototype, "_bannerContainer", 2);
|
|
1144
|
+
k = D([
|
|
1145
|
+
In("pie-cookie-banner")
|
|
1146
|
+
], k);
|
|
1122
1147
|
export {
|
|
1123
1148
|
g as Country,
|
|
1124
1149
|
p as Language,
|
|
1125
|
-
|
|
1126
|
-
|
|
1150
|
+
vn as ON_COOKIE_BANNER_ACCEPT_ALL,
|
|
1151
|
+
xn as ON_COOKIE_BANNER_MANAGE_PREFS,
|
|
1127
1152
|
wn as ON_COOKIE_BANNER_NECESSARY_ONLY,
|
|
1128
1153
|
Mn as ON_COOKIE_BANNER_PREFS_SAVED,
|
|
1129
|
-
|
|
1154
|
+
k as PieCookieBanner,
|
|
1130
1155
|
it as availableLocales,
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1156
|
+
Bn as defaultLocaleForCountry,
|
|
1157
|
+
U as defaultProps,
|
|
1158
|
+
Pn as preferences
|
|
1134
1159
|
};
|