@datagouv/components-next 1.5.1-dev.1397.g7333a397 → 1.5.1-dev.1399.g35c3eb9f

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.
Files changed (59) hide show
  1. package/dist/{Control-DPuXeUqi.js → Control-BbyEe8x_.js} +7 -7
  2. package/dist/{Datafair.client-LlEgG7WU.js → Datafair.client-CQNxPvZt.js} +1 -1
  3. package/dist/{Image-DVWRoLLI.js → Image-umPJvSA8.js} +16 -13
  4. package/dist/{ImagePreview.client-Db5dmxMP.js → ImagePreview.client-DbkBb47d.js} +1 -1
  5. package/dist/{JsonPreview.client-DKy2AexC.js → JsonPreview.client-Ba-_lUCj.js} +2 -2
  6. package/dist/{Layer-D_5tYbVm.js → Layer-CagLskq_.js} +67 -61
  7. package/dist/{Map-CTBJEae_.js → Map-Cek3vwVi.js} +1094 -932
  8. package/dist/{MapContainer.client-DoN1jSzM.js → MapContainer.client-BsJGdnP2.js} +7 -7
  9. package/dist/{OSM-B5Zc3qAf.js → OSM-Bm69tJpi.js} +1 -1
  10. package/dist/{PdfPreview.client-D3wHTDb9.js → PdfPreview.client-CJbZbXds.js} +3 -3
  11. package/dist/{PdfSkeleton-nas5Pmia.js → PdfSkeleton-sY8nI3Lv.js} +1 -1
  12. package/dist/{Pmtiles.client-DncYrZSp.js → Pmtiles.client-Wea3YvTU.js} +9997 -9276
  13. package/dist/{PreviewError-EeaGx3SL.js → PreviewError-BzUvwX47.js} +329 -290
  14. package/dist/{PreviewWrapper-BhldDdXK.js → PreviewWrapper-CwOJqQSn.js} +1 -1
  15. package/dist/{ScaleLine-C_tuJ6VG.js → ScaleLine-C8xmHdEk.js} +15 -8
  16. package/dist/Tile-DfivRbb3.js +479 -0
  17. package/dist/{Tile-8nHSuqcv.js → Tile-DvVc2IeI.js} +220 -151
  18. package/dist/{TileImage-CgO5alXc.js → TileImage-CxC7EP7_.js} +53 -45
  19. package/dist/{View-Dad8DfSD.js → View-44C9US2-.js} +210 -208
  20. package/dist/{XmlPreview.client-CmGbc3c3.js → XmlPreview.client-xXdnrUCW.js} +2 -2
  21. package/dist/assets/maplibre-gl-worker-Dlv-oLtU.js +10 -0
  22. package/dist/components-next.css +1 -1
  23. package/dist/components-next.js +11889 -10504
  24. package/dist/components.css +2 -2
  25. package/dist/{france-BtSQqcqV.js → france-BYzDEL-I.js} +23 -23
  26. package/dist/{proj-COhZ08DR.js → proj-0ED4AWuV.js} +260 -246
  27. package/dist/purify.es-D-UgLNEK.js +848 -0
  28. package/dist/{src-DJJgtynU.js → src-DdUvT8zT.js} +1972 -1306
  29. package/dist/{transform-CNeEnSK9.js → transform-bRfffInI.js} +3 -3
  30. package/package.json +18 -18
  31. package/src/components/AccessTypeBadge.vue +46 -0
  32. package/src/components/Badge.vue +74 -0
  33. package/src/components/ChartBadge.vue +17 -0
  34. package/src/components/ChartCard.vue +4 -17
  35. package/src/components/DataserviceBadge.vue +17 -0
  36. package/src/components/DataserviceCard.vue +12 -31
  37. package/src/components/DatasetBadge.vue +17 -0
  38. package/src/components/DatasetCard.vue +11 -15
  39. package/src/components/DatasetInformation/DatasetInformationSection.vue +3 -7
  40. package/src/components/DatasetInformation/DatasetSchemaSection.vue +1 -4
  41. package/src/components/DatasetLabelTag.vue +4 -15
  42. package/src/components/Form/SelectGroup.vue +0 -2
  43. package/src/components/LicenseBadge.vue +7 -12
  44. package/src/components/ObjectStatusBadge.vue +47 -0
  45. package/src/components/OrganizationBadge.vue +24 -0
  46. package/src/components/OrganizationTypeBadge.vue +5 -4
  47. package/src/components/ResourceAccordion/SchemaBadge.vue +6 -2
  48. package/src/components/ReuseBadge.vue +17 -0
  49. package/src/components/ReuseCard.vue +5 -20
  50. package/src/components/SchemaCard.vue +1 -5
  51. package/src/components/StatBox.vue +5 -3
  52. package/src/components/Tag.vue +61 -15
  53. package/src/functions/objectStatus.ts +34 -0
  54. package/src/main.ts +25 -3
  55. package/src/types/ui.ts +2 -0
  56. package/dist/Tile-Bu5lF4M5.js +0 -463
  57. package/dist/assets/maplibre-gl-worker-CEzvAyZY.js +0 -10
  58. package/dist/purify.es-eElsWhh7.js +0 -876
  59. package/src/components/ObjectCardBadge.vue +0 -33
@@ -1,876 +0,0 @@
1
- // ../node_modules/dompurify/dist/purify.es.mjs
2
- function e(e, t) {
3
- this.v = e, this.k = t;
4
- }
5
- function t(e, t) {
6
- (t == null || t > e.length) && (t = e.length);
7
- for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
8
- return r;
9
- }
10
- function n(e) {
11
- if (Array.isArray(e)) return e;
12
- }
13
- function r(e, t) {
14
- var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
15
- if (n != null) {
16
- var r, i, a, o, s = [], c = !0, l = !1;
17
- try {
18
- if (a = (n = n.call(e)).next, t === 0) {
19
- if (Object(n) !== n) return;
20
- c = !1;
21
- } else for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
22
- } catch (e) {
23
- l = !0, i = e;
24
- } finally {
25
- try {
26
- if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
27
- } finally {
28
- if (l) throw i;
29
- }
30
- }
31
- return s;
32
- }
33
- }
34
- function i() {
35
- throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
36
- }
37
- function a(e, t) {
38
- return n(e) || r(e, t) || o(e, t) || i();
39
- }
40
- function o(e, n) {
41
- if (e) {
42
- if (typeof e == "string") return t(e, n);
43
- var r = {}.toString.call(e).slice(8, -1);
44
- return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? t(e, n) : void 0;
45
- }
46
- }
47
- function s(t) {
48
- var n, r;
49
- function i(n, r) {
50
- try {
51
- var o = t[n](r), s = o.value, c = s instanceof e;
52
- Promise.resolve(c ? s.v : s).then(function(e) {
53
- if (c) {
54
- var r = n === "return" && s.k ? n : "next";
55
- if (!s.k || e.done) return i(r, e);
56
- e = t[r](e).value;
57
- }
58
- a(!!o.done, e);
59
- }, function(e) {
60
- i("throw", e);
61
- });
62
- } catch (e) {
63
- a(2, e);
64
- }
65
- }
66
- function a(e, t) {
67
- e === 2 ? n.reject(t) : n.resolve({
68
- value: t,
69
- done: e
70
- }), (n = n.next) ? i(n.key, n.arg) : r = null;
71
- }
72
- this._invoke = function(e, t) {
73
- return new Promise(function(a, o) {
74
- var s = {
75
- key: e,
76
- arg: t,
77
- resolve: a,
78
- reject: o,
79
- next: null
80
- };
81
- r ? r = r.next = s : (n = r = s, i(e, t));
82
- });
83
- }, typeof t.return != "function" && (this.return = void 0);
84
- }
85
- s.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
86
- return this;
87
- }, s.prototype.next = function(e) {
88
- return this._invoke("next", e);
89
- }, s.prototype.throw = function(e) {
90
- return this._invoke("throw", e);
91
- }, s.prototype.return = function(e) {
92
- return this._invoke("return", e);
93
- };
94
- var c = Object.entries, l = Object.setPrototypeOf, u = Object.isFrozen, d = Object.getPrototypeOf, f = Object.getOwnPropertyDescriptor, p = Object.freeze, m = Object.seal, h = Object.create, ee = typeof Reflect < "u" && Reflect, te = ee.apply, ne = ee.construct;
95
- p ||= function(e) {
96
- return e;
97
- }, m ||= function(e) {
98
- return e;
99
- }, te ||= function(e, t) {
100
- var n = [...arguments].slice(2);
101
- return e.apply(t, n);
102
- }, ne ||= function(e) {
103
- return new e(...[...arguments].slice(1));
104
- };
105
- var g = T(Array.prototype.forEach);
106
- Array.prototype.indexOf;
107
- var re = T(Array.prototype.lastIndexOf), ie = T(Array.prototype.pop), ae = T(Array.prototype.push), oe = T(Array.prototype.slice), se = T(Array.prototype.splice), _ = Array.isArray, ce = E(Set), le = T(Set.prototype.add), ue = T(Set.prototype.has), v = T(String.prototype.toLowerCase), de = T(String.prototype.toString), fe = T(String.prototype.match), pe = T(String.prototype.replace), me = T(String.prototype.indexOf), he = T(String.prototype.trim), ge = T(Number.prototype.toString), y = T(Boolean.prototype.toString), b = typeof BigInt > "u" ? null : T(BigInt.prototype.toString), _e = typeof Symbol > "u" ? null : T(Symbol.prototype.toString), x = T(Object.prototype.hasOwnProperty), S = T(Object.prototype.toString), C = T(RegExp.prototype.test), w = E(TypeError);
108
- function T(e) {
109
- return function(t) {
110
- t instanceof RegExp && (t.lastIndex = 0);
111
- var n = [...arguments].slice(1);
112
- return te(e, t, n);
113
- };
114
- }
115
- function E(e) {
116
- return function() {
117
- return ne(e, [...arguments]);
118
- };
119
- }
120
- function D(e, t) {
121
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : v;
122
- if (l && l(e, null), !_(t)) return e;
123
- let r = t.length;
124
- for (; r--;) {
125
- let i = t[r];
126
- if (typeof i == "string") {
127
- let e = n(i);
128
- e !== i && (u(t) || (t[r] = e), i = e);
129
- }
130
- e[i] = !0;
131
- }
132
- return e;
133
- }
134
- function ve(e) {
135
- for (let t = 0; t < e.length; t++) x(e, t) || (e[t] = null);
136
- return e;
137
- }
138
- function O(e) {
139
- let t = h(null);
140
- for (let r of c(e)) {
141
- var n = a(r, 2);
142
- let i = n[0], o = n[1];
143
- x(e, i) && (t[i] = _(o) ? ve(o) : o && typeof o == "object" && o.constructor === Object ? O(o) : o);
144
- }
145
- return t;
146
- }
147
- function ye(e) {
148
- switch (typeof e) {
149
- case "string": return e;
150
- case "number": return ge(e);
151
- case "boolean": return y(e);
152
- case "bigint": return b ? b(e) : "0";
153
- case "symbol": return _e ? _e(e) : "Symbol()";
154
- case "undefined": return S(e);
155
- case "function":
156
- case "object": {
157
- if (e === null) return S(e);
158
- let t = e, n = k(t, "toString");
159
- if (typeof n == "function") {
160
- let e = n(t);
161
- return typeof e == "string" ? e : S(e);
162
- }
163
- return S(e);
164
- }
165
- default: return S(e);
166
- }
167
- }
168
- function k(e, t) {
169
- for (; e !== null;) {
170
- let n = f(e, t);
171
- if (n) {
172
- if (n.get) return T(n.get);
173
- if (typeof n.value == "function") return T(n.value);
174
- }
175
- e = d(e);
176
- }
177
- function n() {
178
- return null;
179
- }
180
- return n;
181
- }
182
- function be(e, t) {
183
- for (; e !== null;) {
184
- let n = f(e, t);
185
- if (n) return n.get ? T(n.get) : null;
186
- e = d(e);
187
- }
188
- return null;
189
- }
190
- function xe(e) {
191
- try {
192
- return C(e, ""), !0;
193
- } catch {
194
- return !1;
195
- }
196
- }
197
- var Se = p(/* @__PURE__ */ "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".split(".")), Ce = p(/* @__PURE__ */ "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".split(".")), we = p([
198
- "feBlend",
199
- "feColorMatrix",
200
- "feComponentTransfer",
201
- "feComposite",
202
- "feConvolveMatrix",
203
- "feDiffuseLighting",
204
- "feDisplacementMap",
205
- "feDistantLight",
206
- "feDropShadow",
207
- "feFlood",
208
- "feFuncA",
209
- "feFuncB",
210
- "feFuncG",
211
- "feFuncR",
212
- "feGaussianBlur",
213
- "feImage",
214
- "feMerge",
215
- "feMergeNode",
216
- "feMorphology",
217
- "feOffset",
218
- "fePointLight",
219
- "feSpecularLighting",
220
- "feSpotLight",
221
- "feTile",
222
- "feTurbulence"
223
- ]), Te = p([
224
- "animate",
225
- "color-profile",
226
- "cursor",
227
- "discard",
228
- "font-face",
229
- "font-face-format",
230
- "font-face-name",
231
- "font-face-src",
232
- "font-face-uri",
233
- "foreignobject",
234
- "hatch",
235
- "hatchpath",
236
- "mesh",
237
- "meshgradient",
238
- "meshpatch",
239
- "meshrow",
240
- "missing-glyph",
241
- "script",
242
- "set",
243
- "solidcolor",
244
- "unknown",
245
- "use"
246
- ]), Ee = p(/* @__PURE__ */ "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".split(".")), De = p([
247
- "maction",
248
- "maligngroup",
249
- "malignmark",
250
- "mlongdiv",
251
- "mscarries",
252
- "mscarry",
253
- "msgroup",
254
- "mstack",
255
- "msline",
256
- "msrow",
257
- "semantics",
258
- "annotation",
259
- "annotation-xml",
260
- "mprescripts",
261
- "none"
262
- ]), Oe = p(["#text"]), ke = p(/* @__PURE__ */ "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".split(".")), Ae = p(/* @__PURE__ */ "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.dominant-baseline.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.pointer-events.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-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.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".split(".")), je = p(/* @__PURE__ */ "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".split(".")), Me = p([
263
- "xlink:href",
264
- "xml:id",
265
- "xlink:title",
266
- "xml:space",
267
- "xmlns:xlink"
268
- ]), Ne = m(/{{[\w\W]*|^[\w\W]*}}/g), Pe = m(/<%[\w\W]*|^[\w\W]*%>/g), Fe = m(/\${[\w\W]*/g), Ie = m(/^data-[\-\w.\u00B7-\uFFFF]+$/), Le = m(/^aria-[\-\w]+$/), Re = m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), ze = m(/^(?:\w+script|data):/i), Be = m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ve = m(/^html$/i), He = m(/^[a-z][.\w]*(-[.\w]+)+$/i), Ue = m(/<[/\w!]/g), We = m(/<[/\w]/g), Ge = m(/<\/no(script|embed|frames)/i), Ke = m(/\/>/i), A = {
269
- element: 1,
270
- attribute: 2,
271
- text: 3,
272
- cdataSection: 4,
273
- entityReference: 5,
274
- entityNode: 6,
275
- processingInstruction: 7,
276
- comment: 8,
277
- document: 9,
278
- documentType: 10,
279
- documentFragment: 11,
280
- notation: 12
281
- }, qe = p(D({}, [
282
- "style",
283
- "script",
284
- "xmp",
285
- "iframe",
286
- "noembed",
287
- "noframes",
288
- "plaintext",
289
- "noscript"
290
- ])), Je = function() {
291
- return typeof window > "u" ? null : window;
292
- }, Ye = function(e, t) {
293
- if (typeof e != "object" || typeof e.createPolicy != "function") return null;
294
- let n = null, r = "data-tt-policy-suffix";
295
- t && t.hasAttribute(r) && (n = t.getAttribute(r));
296
- let i = "dompurify" + (n ? "#" + n : "");
297
- try {
298
- return e.createPolicy(i, {
299
- createHTML(e) {
300
- return e;
301
- },
302
- createScriptURL(e) {
303
- return e;
304
- }
305
- });
306
- } catch {
307
- return console.warn("TrustedTypes policy " + i + " could not be created."), null;
308
- }
309
- }, Xe = function() {
310
- return {
311
- afterSanitizeAttributes: [],
312
- afterSanitizeElements: [],
313
- afterSanitizeShadowDOM: [],
314
- beforeSanitizeAttributes: [],
315
- beforeSanitizeElements: [],
316
- beforeSanitizeShadowDOM: [],
317
- uponSanitizeAttribute: [],
318
- uponSanitizeElement: [],
319
- uponSanitizeShadowNode: []
320
- };
321
- }, j = function(e, t, n, r) {
322
- return x(e, t) && _(e[t]) ? D(r.base ? O(r.base) : {}, e[t], r.transform) : n;
323
- }, Ze = function(e, t, n) {
324
- let r = x(e, t) ? e[t] : void 0;
325
- return r && typeof r == "object" ? O(r) : n();
326
- };
327
- function Qe() {
328
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Je(), t = (e) => Qe(e);
329
- if (t.version = "3.4.17", t.removed = [], !e || !e.document || e.document.nodeType !== A.document || !e.Element) return t.isSupported = !1, t;
330
- let n = e.document, r = n, i = r.currentScript;
331
- e.DocumentFragment;
332
- let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, l = e.NodeFilter;
333
- e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
334
- let u = e.DOMParser, d = e.trustedTypes, f = s.prototype, ee = k(f, "cloneNode"), te = k(f, "remove"), ne = k(f, "removeAttributeNode"), ge = k(f, "nextSibling"), y = k(f, "childNodes"), b = k(f, "parentNode"), _e = k(f, "shadowRoot"), S = k(f, "attributes"), T = o && o.prototype ? k(o.prototype, "nodeType") : null, E = o && o.prototype ? k(o.prototype, "nodeName") : null, ve = o && o.prototype ? k(o.prototype, "ownerDocument") : null, M = function(e) {
335
- return T ? T(e) : e.nodeType;
336
- }, $e = function(e) {
337
- return E ? E(e) : e.nodeName;
338
- }, et = be(f, "namespaceURI"), tt = function(e) {
339
- return et ? et(e) : e.namespaceURI;
340
- };
341
- if (typeof a == "function") {
342
- let e = n.createElement("template");
343
- e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
344
- }
345
- let N, P = "", nt, rt = !1, it = 0, at = function() {
346
- if (it > 0) throw w("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
347
- }, F = function(e) {
348
- at(), it++;
349
- try {
350
- return N.createHTML(e);
351
- } finally {
352
- it--;
353
- }
354
- }, ot = function(e) {
355
- at(), it++;
356
- try {
357
- return N.createScriptURL(e);
358
- } finally {
359
- it--;
360
- }
361
- }, st = function() {
362
- return rt ||= (nt = Ye(d, i), !0), nt;
363
- }, ct = n, lt = ct.implementation, ut = ct.createNodeIterator, dt = ct.createDocumentFragment, ft = ct.getElementsByTagName, pt = r.importNode, I = Xe();
364
- t.isSupported = typeof c == "function" && typeof b == "function" && lt && lt.createHTMLDocument !== void 0;
365
- let mt = Ne, ht = Pe, gt = Fe, _t = Ie, vt = Le, yt = ze, bt = Be, xt = He, St = Re, L = null, Ct = D({}, [
366
- ...Se,
367
- ...Ce,
368
- ...we,
369
- ...Ee,
370
- ...Oe
371
- ]), R = null, wt = D({}, [
372
- ...ke,
373
- ...Ae,
374
- ...je,
375
- ...Me
376
- ]), z = Object.seal(h(null, {
377
- tagNameCheck: {
378
- writable: !0,
379
- configurable: !1,
380
- enumerable: !0,
381
- value: null
382
- },
383
- attributeNameCheck: {
384
- writable: !0,
385
- configurable: !1,
386
- enumerable: !0,
387
- value: null
388
- },
389
- allowCustomizedBuiltInElements: {
390
- writable: !0,
391
- configurable: !1,
392
- enumerable: !0,
393
- value: !1
394
- }
395
- })), Tt = null, Et = null, B = Object.seal(h(null, {
396
- tagCheck: {
397
- writable: !0,
398
- configurable: !1,
399
- enumerable: !0,
400
- value: null
401
- },
402
- attributeCheck: {
403
- writable: !0,
404
- configurable: !1,
405
- enumerable: !0,
406
- value: null
407
- }
408
- })), Dt = !0, Ot = !0, kt = !1, At = !0, V = !1, H = !0, U = !1, jt = !1, Mt = null, Nt = null, Pt = !1, W = !1, Ft = !1, It = !1, Lt = !0, Rt = !1, zt = "user-content-", Bt = !0, Vt = !1, G = null, K = {}, q = null, Ht = D({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ut = null, Wt = D({}, [
409
- "audio",
410
- "video",
411
- "img",
412
- "source",
413
- "image",
414
- "track"
415
- ]), Gt = null, Kt = D({}, [
416
- "alt",
417
- "class",
418
- "for",
419
- "id",
420
- "label",
421
- "name",
422
- "pattern",
423
- "placeholder",
424
- "role",
425
- "summary",
426
- "title",
427
- "value",
428
- "style",
429
- "xmlns"
430
- ]), qt = "http://www.w3.org/1998/Math/MathML", Jt = "http://www.w3.org/2000/svg", J = "http://www.w3.org/1999/xhtml", Y = J, Yt = !1, Xt = null, Zt = D({}, [
431
- qt,
432
- Jt,
433
- J
434
- ], de), Qt = p([
435
- "mi",
436
- "mo",
437
- "mn",
438
- "ms",
439
- "mtext"
440
- ]), $t = D({}, Qt), en = p(["annotation-xml"]), tn = D({}, en), nn = D({}, [
441
- "title",
442
- "style",
443
- "font",
444
- "a",
445
- "script"
446
- ]), rn = null, an = ["application/xhtml+xml", "text/html"], X = null, on = null, sn = n.createElement("form"), cn = function(e) {
447
- return e instanceof RegExp || e instanceof Function;
448
- }, ln = function() {
449
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
450
- if (on && on === e) return;
451
- e && typeof e == "object" || (e = {}), e = O(e), rn = an.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, X = rn === "application/xhtml+xml" ? de : v, L = j(e, "ALLOWED_TAGS", Ct, { transform: X }), R = j(e, "ALLOWED_ATTR", wt, { transform: X }), Xt = j(e, "ALLOWED_NAMESPACES", Zt, { transform: de }), Gt = j(e, "ADD_URI_SAFE_ATTR", Kt, {
452
- transform: X,
453
- base: Kt
454
- }), Ut = j(e, "ADD_DATA_URI_TAGS", Wt, {
455
- transform: X,
456
- base: Wt
457
- }), q = j(e, "FORBID_CONTENTS", Ht, { transform: X }), Tt = j(e, "FORBID_TAGS", O({}), { transform: X }), Et = j(e, "FORBID_ATTR", O({}), { transform: X }), K = x(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? O(e.USE_PROFILES) : e.USE_PROFILES : !1, Dt = e.ALLOW_ARIA_ATTR !== !1, Ot = e.ALLOW_DATA_ATTR !== !1, kt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, At = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, V = e.SAFE_FOR_TEMPLATES || !1, H = e.SAFE_FOR_XML !== !1, U = e.WHOLE_DOCUMENT || !1, W = e.RETURN_DOM || !1, Ft = e.RETURN_DOM_FRAGMENT || !1, It = e.RETURN_TRUSTED_TYPE || !1, Pt = e.FORCE_BODY || !1, Lt = e.SANITIZE_DOM !== !1, Rt = e.SANITIZE_NAMED_PROPS || !1, Bt = e.KEEP_CONTENT !== !1, Vt = e.IN_PLACE || !1, St = xe(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Re, Y = typeof e.NAMESPACE == "string" ? e.NAMESPACE : J, $t = Ze(e, "MATHML_TEXT_INTEGRATION_POINTS", () => D({}, Qt)), tn = Ze(e, "HTML_INTEGRATION_POINTS", () => D({}, en));
458
- let t = Ze(e, "CUSTOM_ELEMENT_HANDLING", () => h(null));
459
- if (z = h(null), x(t, "tagNameCheck") && cn(t.tagNameCheck) && (z.tagNameCheck = t.tagNameCheck), x(t, "attributeNameCheck") && cn(t.attributeNameCheck) && (z.attributeNameCheck = t.attributeNameCheck), x(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), m(z), V && (Ot = !1), Ft && (W = !0), K && (L = D({}, Oe), R = h(null), K.html === !0 && (D(L, Se), D(R, ke)), K.svg === !0 && (D(L, Ce), D(R, Ae), D(R, Me)), K.svgFilters === !0 && (D(L, we), D(R, Ae), D(R, Me)), K.mathMl === !0 && (D(L, Ee), D(R, je), D(R, Me))), B.tagCheck = null, B.attributeCheck = null, x(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? B.tagCheck = e.ADD_TAGS : _(e.ADD_TAGS) && (L === Ct && (L = O(L)), D(L, e.ADD_TAGS, X))), x(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? B.attributeCheck = e.ADD_ATTR : _(e.ADD_ATTR) && (R === wt && (R = O(R)), D(R, e.ADD_ATTR, X))), x(e, "ADD_FORBID_CONTENTS") && _(e.ADD_FORBID_CONTENTS) && (q === Ht && (q = O(q)), D(q, e.ADD_FORBID_CONTENTS, X)), Bt && (L["#text"] = !0), U && D(L, [
460
- "html",
461
- "head",
462
- "body"
463
- ]), L.table && (D(L, ["tbody"]), delete Tt.tbody), e.TRUSTED_TYPES_POLICY) {
464
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw w("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
465
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw w("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
466
- let t = N;
467
- N = e.TRUSTED_TYPES_POLICY;
468
- try {
469
- P = F("");
470
- } catch (e) {
471
- throw N = t, e;
472
- }
473
- } else e.TRUSTED_TYPES_POLICY === null ? (N = void 0, P = "") : (N === void 0 && (N = st()), N && typeof P == "string" && (P = F("")));
474
- p && p(e), on = e;
475
- }, un = D({}, [
476
- ...Ce,
477
- ...we,
478
- ...Te
479
- ]), dn = D({}, [...Ee, ...De]), fn = function(e, t, n) {
480
- return t.namespaceURI === J ? e === "svg" : t.namespaceURI === qt ? e === "svg" && (n === "annotation-xml" || $t[n]) : !!un[e];
481
- }, pn = function(e, t, n) {
482
- return t.namespaceURI === J ? e === "math" : t.namespaceURI === Jt ? e === "math" && tn[n] : !!dn[e];
483
- }, mn = function(e, t, n) {
484
- return t.namespaceURI === Jt && !tn[n] || t.namespaceURI === qt && !$t[n] ? !1 : !dn[e] && (nn[e] || !un[e]);
485
- }, hn = function(e) {
486
- let t = tt(e), n = v($e(e)), r = b(e), i, a;
487
- return r && M(r) === A.element ? (i = { namespaceURI: tt(r) }, a = v($e(r))) : (i = { namespaceURI: Y }, a = "template"), Xt[t] ? t === Jt ? fn(n, i, a) : t === qt ? pn(n, i, a) : t === J ? mn(n, i, a) : !!(rn === "application/xhtml+xml" && Xt[t]) : !1;
488
- }, Z = function(e) {
489
- ae(t.removed, { element: e });
490
- try {
491
- b(e).removeChild(e);
492
- } catch {
493
- if (te(e), !b(e)) throw w("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
494
- }
495
- }, gn = function(e, t, n) {
496
- try {
497
- ne(e, t);
498
- } catch {
499
- try {
500
- e.removeAttribute(n);
501
- } catch {}
502
- }
503
- }, _n = function(e) {
504
- xn(e);
505
- let t = y(e);
506
- t && g(oe(t), (e) => {
507
- try {
508
- te(e);
509
- } catch {}
510
- });
511
- let n = M(e) === A.element ? S(e) : null;
512
- if (n) for (let t = n.length - 1; t >= 0; --t) {
513
- let r = n[t], i = r && r.name;
514
- typeof i == "string" && gn(e, r, i);
515
- }
516
- }, vn = function(e, n, r) {
517
- if (!r) try {
518
- r = n.getAttributeNode(e);
519
- } catch {
520
- r = null;
521
- }
522
- ae(t.removed, {
523
- attribute: r || null,
524
- from: n
525
- });
526
- try {
527
- r ? ne(n, r) : n.removeAttribute(e);
528
- } catch {
529
- try {
530
- n.removeAttribute(e);
531
- } catch {}
532
- }
533
- if (e === "is") {
534
- if (W || Ft) try {
535
- Z(n);
536
- } catch {}
537
- else try {
538
- n.setAttribute(e, "");
539
- } catch {}
540
- }
541
- }, yn = function(e) {
542
- let t = S(e);
543
- if (t) for (let n = t.length - 1; n >= 0; --n) {
544
- let r = t[n], i = r && r.name;
545
- typeof i != "string" || R[X(i)] || gn(e, r, i);
546
- }
547
- }, bn = function(e, t) {
548
- let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = [e];
549
- for (; r.length > 0;) {
550
- let e = r.pop();
551
- if (t(e) === !1) continue;
552
- if (n && M(e) === A.element) {
553
- let t = _e(e);
554
- Q(t) && r.push(t);
555
- }
556
- let i = y(e);
557
- if (i) for (let e = i.length - 1; e >= 0; --e) r.push(i[e]);
558
- }
559
- }, xn = function(e) {
560
- bn(e, (e) => {
561
- M(e) === A.element && yn(e);
562
- });
563
- }, Sn = function(e) {
564
- let t = [];
565
- return bn(e, (e) => {
566
- t.push(e);
567
- }, !0), t;
568
- }, Cn = function(e, t) {
569
- let n = ce();
570
- g(Sn(e), (e) => {
571
- M(e) === A.element && le(n, e);
572
- }), g(t, (e) => {
573
- M(e) === A.element && !ue(n, e) && yn(e);
574
- });
575
- }, wn = function(e, n) {
576
- let r = !1;
577
- return g(t.removed, (t) => {
578
- t.element && (r ||= t.element === e, xn(t.element));
579
- }), Cn(e, n), r;
580
- }, Tn = function(e, t) {
581
- let n = G, r = null, i = () => (r || (r = ce(), g(t, (e) => {
582
- le(r, e);
583
- })), r);
584
- for (let t = 0;; t++) {
585
- let r = Sn(e), a = [e], o = !1;
586
- if (g(r, (e) => {
587
- M(e) === A.documentFragment ? ae(a, e) : !o && !ue(n, e) && (o = ue(i(), e));
588
- }), !o) return;
589
- if (t >= 8) throw w("the tree kept changing during in-place sanitization; refusing to return it");
590
- g(a, (t, n) => {
591
- En(t, n > 0, e, i());
592
- });
593
- }
594
- }, En = function(e, t, n, r) {
595
- let i = jn(e), a;
596
- for (; a = i.nextNode();) ue(r, a) && !ue(G, a) && (t && $(I.uponSanitizeShadowNode, a, null), Hn(a, n), Yn(a, n), Q(a.content) && Xn(a.content));
597
- }, Dn = function(e) {
598
- G && le(G, e);
599
- }, On = function(e, t) {
600
- return H ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
601
- }, kn = function(e) {
602
- H && bn(e, (e) => {
603
- let t = M(e);
604
- if (t === A.processingInstruction || t === A.comment && C(We, e.data)) {
605
- try {
606
- te(e);
607
- } catch {}
608
- return !1;
609
- }
610
- if (t === A.element) {
611
- let t = e, n = X($e(e));
612
- try {
613
- t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && On("for", n) && t.removeAttribute("for");
614
- } catch {}
615
- }
616
- return !0;
617
- });
618
- }, An = function(e) {
619
- let t = null, r = null;
620
- if (Pt) e = "<remove></remove>" + e;
621
- else {
622
- let t = fe(e, /^[\r\n\t ]+/);
623
- r = t && t[0];
624
- }
625
- rn === "application/xhtml+xml" && Y === J && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
626
- let i = N ? F(e) : e;
627
- if (Y === J) try {
628
- t = new u().parseFromString(i, rn);
629
- } catch {}
630
- if (!t || !t.documentElement) {
631
- t = lt.createDocument(Y, "template", null);
632
- try {
633
- t.documentElement.innerHTML = Yt ? P : i;
634
- } catch {}
635
- }
636
- let a = t.body || t.documentElement;
637
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Y === J ? ft.call(t, U ? "html" : "body")[0] : U ? t.documentElement : a;
638
- }, jn = function(e) {
639
- let t = ve ? ve(e) : e.ownerDocument;
640
- return ut.call(t || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
641
- }, Mn = function(e) {
642
- return e = pe(e, mt, " "), e = pe(e, ht, " "), e = pe(e, gt, " "), e;
643
- }, Nn = function(e) {
644
- Pn(e);
645
- let t = e.querySelectorAll?.call(e, "template");
646
- t && g(t, (e) => {
647
- Q(e.content) && Nn(e.content);
648
- });
649
- }, Pn = function(e) {
650
- e.normalize();
651
- let t = ve ? ve(e) : e.ownerDocument, n = ut.call(t || e, e, l.SHOW_TEXT | l.SHOW_COMMENT | l.SHOW_CDATA_SECTION | l.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
652
- for (; r;) r.data = Mn(r.data), r = n.nextNode();
653
- }, Fn = function(e) {
654
- let t = E ? E(e) : null;
655
- return typeof t != "string" || X(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== S(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== T(e) || e.childNodes !== y(e);
656
- }, Q = function(e) {
657
- if (!T || typeof e != "object" || !e) return !1;
658
- try {
659
- return T(e) === A.documentFragment;
660
- } catch {
661
- return !1;
662
- }
663
- }, In = function(e) {
664
- if (!T || typeof e != "object" || !e) return !1;
665
- try {
666
- return typeof T(e) == "number";
667
- } catch {
668
- return !1;
669
- }
670
- };
671
- function $(e, n, r) {
672
- e.length !== 0 && g(e, (e) => {
673
- e.call(t, n, r, on);
674
- });
675
- }
676
- let Ln = function(e, t) {
677
- return !!(H && e.hasChildNodes() && !In(e.firstElementChild) && C(Ue, e.textContent) && C(Ue, e.innerHTML) || H && qe[t] && M(e) === A.element && tt(e) === J && (In(e.firstElementChild) || typeof e.textContent == "string" && C(Ue, e.textContent)) || e.nodeType === A.processingInstruction || H && e.nodeType === A.comment && C(We, e.data));
678
- }, Rn = function(e, t) {
679
- return e instanceof RegExp ? C(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
680
- }, zn = function(e, t, n) {
681
- if (!Tt[t] && Gn(t) && Rn(z.tagNameCheck, t)) return !1;
682
- if (Bt && !q[t] && !q[v(t)]) {
683
- let t = b(e), r = y(e);
684
- if (r && t) {
685
- let i = r.length;
686
- for (let a = i - 1; a >= 0; --a) {
687
- let i = e === n ? ee(r[a], !0) : r[a];
688
- t.insertBefore(i, ge(e));
689
- }
690
- }
691
- }
692
- return Z(e), !0;
693
- }, Bn = function(e, t, n, r) {
694
- return e.length === 0 ? t : t === n || t === r ? O(t) : t;
695
- }, Vn = function(e, t) {
696
- return e === t || b(e) !== null ? !1 : (Vt && xn(e), !0);
697
- }, Hn = function(e, n) {
698
- if (Dn(e), $(I.beforeSanitizeElements, e, null), Vn(e, n)) return !0;
699
- if (Fn(e)) return Z(e), !0;
700
- let r = X($e(e));
701
- if (L = Bn(I.uponSanitizeElement, L, Ct, Mt), $(I.uponSanitizeElement, e, {
702
- tagName: r,
703
- allowedTags: L
704
- }), Vn(e, n)) return !0;
705
- if (Ln(e, r)) return Z(e), !0;
706
- if (Tt[r] || !(B.tagCheck instanceof Function && B.tagCheck(r)) && !L[r]) {
707
- let t = zn(e, r, n);
708
- return t === !1 && ($(I.afterSanitizeElements, e, null), Vn(e, n)) ? !0 : t;
709
- }
710
- if (M(e) === A.element && !hn(e) || (r === "noscript" || r === "noembed" || r === "noframes") && C(Ge, e.innerHTML)) return Z(e), !0;
711
- if (V && e.nodeType === A.text) {
712
- let n = Mn(e.textContent);
713
- e.textContent !== n && (ae(t.removed, { element: e.cloneNode() }), e.textContent = n);
714
- }
715
- return $(I.afterSanitizeElements, e, null), Vn(e, n);
716
- }, Un = function(e, t, r) {
717
- if (Et[t] || On(t, e) || Lt && (t === "id" || t === "name") && (r in n || r in sn)) return !1;
718
- let i = R[t] || B.attributeCheck instanceof Function && B.attributeCheck(t, e);
719
- return Ot && C(_t, t) || Dt && C(vt, t) ? !0 : i ? Gt[t] || C(St, pe(r, bt, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && me(r, "data:") === 0 && Ut[e] || kt && !C(yt, pe(r, bt, "")) ? !0 : !r : Gn(e) && Rn(z.tagNameCheck, e) && Rn(z.attributeNameCheck, t, e) || t === "is" && z.allowCustomizedBuiltInElements && Rn(z.tagNameCheck, r);
720
- }, Wn = D({}, [
721
- "annotation-xml",
722
- "color-profile",
723
- "font-face",
724
- "font-face-format",
725
- "font-face-name",
726
- "font-face-src",
727
- "font-face-uri",
728
- "missing-glyph"
729
- ]), Gn = function(e) {
730
- return !Wn[v(e)] && C(xt, e);
731
- }, Kn = function(e, t, n, r) {
732
- if (N && typeof d == "object" && typeof d.getAttributeType == "function" && !n) switch (d.getAttributeType(e, t)) {
733
- case "TrustedHTML": return F(r);
734
- case "TrustedScriptURL": return ot(r);
735
- }
736
- return r;
737
- }, qn = function(e, t, n, r) {
738
- try {
739
- return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !Fn(e) || (Z(e), !1);
740
- } catch {
741
- return vn(t, e), !1;
742
- }
743
- }, Jn = function(e, t) {
744
- return H && C(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, t) ? !0 : v(e) === "attributename" && fe(t, "href") !== null;
745
- }, Yn = function(e, n) {
746
- if ($(I.beforeSanitizeAttributes, e, null), Vn(e, n)) return;
747
- let r = e.attributes;
748
- if (!r || Fn(e)) return;
749
- R = Bn(I.uponSanitizeAttribute, R, wt, Nt);
750
- let i = {
751
- attrName: "",
752
- attrValue: "",
753
- keepAttr: !0,
754
- allowedAttributes: R,
755
- forceKeepAttr: void 0
756
- }, a = r.length, o = X(e.nodeName);
757
- for (; a--;) {
758
- let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = X(s), d = l, f = s === "value" ? d : he(d), p = !1;
759
- i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, $(I.uponSanitizeAttribute, e, i), f = i.attrValue, Rt && (u === "id" || u === "name") && me(f, zt) !== 0 && (vn(s, e, n), f = zt + f, p = !0), Jn(s, f) ? vn(s, e, n) : i.forceKeepAttr || (i.keepAttr ? !At && C(Ke, f) ? vn(s, e, n) : (V && (f = Mn(f)), Un(o, u, f) ? (f = Kn(o, u, c, f), f !== d && qn(e, s, c, f) && p && ie(t.removed)) : vn(s, e, n)) : vn(s, e, n));
760
- }
761
- $(I.afterSanitizeAttributes, e, null), Vn(e, n);
762
- }, Xn = function(e) {
763
- let t = null, n = jn(e);
764
- for ($(I.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if ($(I.uponSanitizeShadowNode, t, null), Hn(t, e), Yn(t, e), Q(t.content) && Xn(t.content), M(t) === A.element) {
765
- let e = _e(t);
766
- Q(e) && (Zn(e), Xn(e));
767
- }
768
- V && Pn(e), $(I.afterSanitizeShadowDOM, e, null);
769
- }, Zn = function(e) {
770
- let t = [{
771
- node: e,
772
- shadow: null
773
- }];
774
- for (; t.length > 0;) {
775
- let e = t.pop();
776
- if (e.shadow) {
777
- Xn(e.shadow);
778
- continue;
779
- }
780
- let n = e.node, r = M(n) === A.element, i = y(n);
781
- if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
782
- node: i[e],
783
- shadow: null
784
- });
785
- if (r) {
786
- let e = E ? E(n) : null;
787
- if (typeof e == "string" && X(e) === "template") {
788
- let e = n.content;
789
- Q(e) && t.push({
790
- node: e,
791
- shadow: null
792
- });
793
- }
794
- }
795
- if (r) {
796
- let e = _e(n);
797
- Q(e) && t.push({
798
- node: null,
799
- shadow: e
800
- }, {
801
- node: e,
802
- shadow: null
803
- });
804
- }
805
- }
806
- };
807
- return t.sanitize = function(e) {
808
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
809
- if (Yt = !e, Yt && (e = "<!-->"), typeof e != "string" && !In(e) && (e = ye(e), typeof e != "string")) throw w("dirty is not a string, aborting");
810
- if (!t.isSupported) return e;
811
- jt ? (L = Mt, R = Nt) : ln(n), (I.uponSanitizeElement.length > 0 || I.uponSanitizeAttribute.length > 0) && (L = O(L)), I.uponSanitizeAttribute.length > 0 && (R = O(R)), t.removed = [];
812
- let c = Vt && typeof e != "string" && In(e), l = [], u = G;
813
- if (c) {
814
- kn(e);
815
- let t = $e(e);
816
- if (typeof t == "string") {
817
- let n = X(t);
818
- if (!L[n] || Tt[n]) throw _n(e), w("root node is forbidden and cannot be sanitized in-place");
819
- }
820
- if (Fn(e)) throw _n(e), w("root node is clobbered and cannot be sanitized in-place");
821
- l = Sn(e), G = ce();
822
- } else if (In(e)) i = An("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === A.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Zn(i);
823
- else {
824
- if (!W && !V && !U && e.indexOf("<") === -1) return N && It ? F(e) : e;
825
- if (i = An(e), !i) return W ? null : It ? P : "";
826
- }
827
- i && Pt && Z(i.firstChild);
828
- let d = c ? e : i;
829
- try {
830
- c && Zn(e);
831
- let t = jn(d);
832
- for (; o = t.nextNode();) Hn(o, d), Yn(o, d), Q(o.content) && Xn(o.content);
833
- c && Tn(e, l);
834
- } catch (t) {
835
- throw c && (_n(e), wn(e, l)), t;
836
- } finally {
837
- G = u;
838
- }
839
- if (c) {
840
- if (wn(e, l)) throw w("a node selected for removal could not be safely returned; refusing to sanitize in place");
841
- return V && Nn(e), e;
842
- }
843
- if (W) {
844
- if (V && Nn(i), Ft) for (s = dt.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
845
- else s = i;
846
- return (R.shadowroot || R.shadowrootmode) && (s = pt.call(r, s, !0)), s;
847
- }
848
- let f = U ? i.outerHTML : i.innerHTML;
849
- return U && L["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && C(Ve, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), V && (f = Mn(f)), N && It ? F(f) : f;
850
- }, t.setConfig = function() {
851
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
852
- ln(e), jt = !0, Mt = L, Nt = R;
853
- }, t.clearConfig = function() {
854
- on = null, jt = !1, Mt = null, Nt = null, N = nt, P = "";
855
- }, t.isValidAttribute = function(e, t, n) {
856
- on || ln({});
857
- let r = X(e), i = X(t);
858
- return typeof n == "string" && (Jn(t, n) || !At && C(Ke, n)) ? !1 : Un(r, i, n);
859
- }, t.addHook = function(e, t) {
860
- typeof t == "function" && x(I, e) && ae(I[e], t);
861
- }, t.removeHook = function(e, t) {
862
- if (x(I, e)) {
863
- if (t !== void 0) {
864
- let n = re(I[e], t);
865
- return n === -1 ? void 0 : se(I[e], n, 1)[0];
866
- }
867
- return ie(I[e]);
868
- }
869
- }, t.removeHooks = function(e) {
870
- x(I, e) && (I[e] = []);
871
- }, t.removeAllHooks = function() {
872
- I = Xe();
873
- }, t;
874
- }
875
- var M = Qe();
876
- export { M as t };