@pie-qti/player-elements 0.1.18 → 0.1.20

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 (55) hide show
  1. package/README.md +122 -127
  2. package/dist/{define-CLdVOnMl.js → define-BwFVHv-A.js} +4160 -3090
  3. package/dist/define-BwFVHv-A.js.map +1 -0
  4. package/dist/dist-DswyTalX.js +6731 -0
  5. package/dist/dist-DswyTalX.js.map +1 -0
  6. package/dist/{dist-CHcxiby5.js → dist-oe9UH-A2.js} +628 -583
  7. package/dist/dist-oe9UH-A2.js.map +1 -0
  8. package/dist/{element-Bekvepqe.js → element-BiInkn5Q.js} +2 -2
  9. package/dist/{element-Bekvepqe.js.map → element-BiInkn5Q.js.map} +1 -1
  10. package/dist/{element-class-C8OTgYHE-DsvwOAOP.js → element-class-CILJ4Ls7-rJWb-Gwb.js} +12421 -11624
  11. package/dist/element-class-CILJ4Ls7-rJWb-Gwb.js.map +1 -0
  12. package/dist/elements.js +3 -3
  13. package/dist/index.js +3 -3
  14. package/dist/item-toolbar-element-t_zI1vE6.js +1892 -0
  15. package/dist/item-toolbar-element-t_zI1vE6.js.map +1 -0
  16. package/dist/{mathlive.min-DeR46YTX-DamfKay_.js → mathlive.min-DeR46YTX-D-KAmiue.js} +1 -1
  17. package/dist/{mathlive.min-DeR46YTX-DamfKay_.js.map → mathlive.min-DeR46YTX-D-KAmiue.js.map} +1 -1
  18. package/dist/pie-assessment-toolkit-element-RzBk8WVs.js +7113 -0
  19. package/dist/pie-assessment-toolkit-element-RzBk8WVs.js.map +1 -0
  20. package/dist/pie-tool-calculator-GW-LhvB_.js +6905 -0
  21. package/dist/pie-tool-calculator-GW-LhvB_.js.map +1 -0
  22. package/dist/public/api.d.ts +25 -11
  23. package/dist/public/elements.d.ts +1 -1
  24. package/dist/public/index.d.ts +1 -1
  25. package/dist/register-players.js +1 -1
  26. package/dist/register.js +50707 -49652
  27. package/dist/register.js.map +1 -1
  28. package/dist/resolveItems-DHNyVysE.js +7627 -0
  29. package/dist/resolveItems-DHNyVysE.js.map +1 -0
  30. package/dist/{root--0fyaoNu.js → root-CYGgRw16.js} +3 -3
  31. package/dist/root-CYGgRw16.js.map +1 -0
  32. package/dist/sre-CgK32OcY.js +17228 -0
  33. package/dist/sre-CgK32OcY.js.map +1 -0
  34. package/dist/{tag-names-ClLtKtXt.js → tag-names-OgMDHLpx.js} +2 -2
  35. package/dist/tag-names-OgMDHLpx.js.map +1 -0
  36. package/dist/tool-tts-inline-drDEIti_.js +3724 -0
  37. package/dist/tool-tts-inline-drDEIti_.js.map +1 -0
  38. package/package.json +11 -9
  39. package/dist/define-CLdVOnMl.js.map +0 -1
  40. package/dist/dist-CHcxiby5.js.map +0 -1
  41. package/dist/dist-DjmdIRjq.js +0 -1241
  42. package/dist/dist-DjmdIRjq.js.map +0 -1
  43. package/dist/element-class-C8OTgYHE-DsvwOAOP.js.map +0 -1
  44. package/dist/item-toolbar-element-CjJkgFQ3.js +0 -6086
  45. package/dist/item-toolbar-element-CjJkgFQ3.js.map +0 -1
  46. package/dist/pie-assessment-toolkit-element-DMRNOwrK.js +0 -28516
  47. package/dist/pie-assessment-toolkit-element-DMRNOwrK.js.map +0 -1
  48. package/dist/pie-tool-calculator-DBfkllu3.js +0 -2309
  49. package/dist/pie-tool-calculator-DBfkllu3.js.map +0 -1
  50. package/dist/resolveItems-Bp65Mj_Z.js +0 -7030
  51. package/dist/resolveItems-Bp65Mj_Z.js.map +0 -1
  52. package/dist/root--0fyaoNu.js.map +0 -1
  53. package/dist/tag-names-ClLtKtXt.js.map +0 -1
  54. package/dist/tool-tts-inline-BNjR51Di.js +0 -2641
  55. package/dist/tool-tts-inline-BNjR51Di.js.map +0 -1
@@ -1,1241 +0,0 @@
1
- import "./tag-names-ClLtKtXt.js";
2
- //#region ../../node_modules/.bun/dompurify@3.4.11/node_modules/dompurify/dist/purify.es.mjs
3
- function e(e, t) {
4
- (t == null || t > e.length) && (t = e.length);
5
- for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
6
- return r;
7
- }
8
- function t(e) {
9
- if (Array.isArray(e)) return e;
10
- }
11
- function n(e, t) {
12
- var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
13
- if (n != null) {
14
- var r, i, a, o, s = [], c = !0, l = !1;
15
- try {
16
- if (a = (n = n.call(e)).next, t !== 0) for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
17
- } catch (e) {
18
- l = !0, i = e;
19
- } finally {
20
- try {
21
- if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
22
- } finally {
23
- if (l) throw i;
24
- }
25
- }
26
- return s;
27
- }
28
- }
29
- function r() {
30
- throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
31
- }
32
- function i(e, i) {
33
- return t(e) || n(e, i) || a(e, i) || r();
34
- }
35
- function a(t, n) {
36
- if (t) {
37
- if (typeof t == "string") return e(t, n);
38
- var r = {}.toString.call(t).slice(8, -1);
39
- return r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set" ? Array.from(t) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? e(t, n) : void 0;
40
- }
41
- }
42
- var o = Object.entries, s = Object.setPrototypeOf, c = Object.isFrozen, l = Object.getPrototypeOf, u = Object.getOwnPropertyDescriptor, d = Object.freeze, f = Object.seal, p = Object.create, ee = typeof Reflect < "u" && Reflect, m = ee.apply, te = ee.construct;
43
- d ||= function(e) {
44
- return e;
45
- }, f ||= function(e) {
46
- return e;
47
- }, m ||= function(e, t) {
48
- var n = [...arguments].slice(2);
49
- return e.apply(t, n);
50
- }, te ||= function(e) {
51
- return new e(...[...arguments].slice(1));
52
- };
53
- var ne = S(Array.prototype.forEach), re = S(Array.prototype.lastIndexOf), ie = S(Array.prototype.pop), ae = S(Array.prototype.push), oe = S(Array.prototype.splice), h = Array.isArray, se = S(String.prototype.toLowerCase), ce = S(String.prototype.toString), le = S(String.prototype.match), ue = S(String.prototype.replace), de = S(String.prototype.indexOf), fe = S(String.prototype.trim), pe = S(Number.prototype.toString), me = S(Boolean.prototype.toString), g = typeof BigInt > "u" ? null : S(BigInt.prototype.toString), _ = typeof Symbol > "u" ? null : S(Symbol.prototype.toString), v = S(Object.prototype.hasOwnProperty), y = S(Object.prototype.toString), b = S(RegExp.prototype.test), x = C(TypeError);
54
- function S(e) {
55
- return function(t) {
56
- t instanceof RegExp && (t.lastIndex = 0);
57
- var n = [...arguments].slice(1);
58
- return m(e, t, n);
59
- };
60
- }
61
- function C(e) {
62
- return function() {
63
- return te(e, [...arguments]);
64
- };
65
- }
66
- function w(e, t) {
67
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : se;
68
- if (s && s(e, null), !h(t)) return e;
69
- let r = t.length;
70
- for (; r--;) {
71
- let i = t[r];
72
- if (typeof i == "string") {
73
- let e = n(i);
74
- e !== i && (c(t) || (t[r] = e), i = e);
75
- }
76
- e[i] = !0;
77
- }
78
- return e;
79
- }
80
- function T(e) {
81
- for (let t = 0; t < e.length; t++) v(e, t) || (e[t] = null);
82
- return e;
83
- }
84
- function E(e) {
85
- let t = p(null);
86
- for (let r of o(e)) {
87
- var n = i(r, 2);
88
- let a = n[0], o = n[1];
89
- v(e, a) && (h(o) ? t[a] = T(o) : o && typeof o == "object" && o.constructor === Object ? t[a] = E(o) : t[a] = o);
90
- }
91
- return t;
92
- }
93
- function he(e) {
94
- switch (typeof e) {
95
- case "string": return e;
96
- case "number": return pe(e);
97
- case "boolean": return me(e);
98
- case "bigint": return g ? g(e) : "0";
99
- case "symbol": return _ ? _(e) : "Symbol()";
100
- case "undefined": return y(e);
101
- case "function":
102
- case "object": {
103
- if (e === null) return y(e);
104
- let t = e, n = D(t, "toString");
105
- if (typeof n == "function") {
106
- let e = n(t);
107
- return typeof e == "string" ? e : y(e);
108
- }
109
- return y(e);
110
- }
111
- default: return y(e);
112
- }
113
- }
114
- function D(e, t) {
115
- for (; e !== null;) {
116
- let n = u(e, t);
117
- if (n) {
118
- if (n.get) return S(n.get);
119
- if (typeof n.value == "function") return S(n.value);
120
- }
121
- e = l(e);
122
- }
123
- function n() {
124
- return null;
125
- }
126
- return n;
127
- }
128
- function ge(e) {
129
- try {
130
- return b(e, ""), !0;
131
- } catch {
132
- return !1;
133
- }
134
- }
135
- var _e = d(/* @__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(".")), ve = d(/* @__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(".")), ye = d([
136
- "feBlend",
137
- "feColorMatrix",
138
- "feComponentTransfer",
139
- "feComposite",
140
- "feConvolveMatrix",
141
- "feDiffuseLighting",
142
- "feDisplacementMap",
143
- "feDistantLight",
144
- "feDropShadow",
145
- "feFlood",
146
- "feFuncA",
147
- "feFuncB",
148
- "feFuncG",
149
- "feFuncR",
150
- "feGaussianBlur",
151
- "feImage",
152
- "feMerge",
153
- "feMergeNode",
154
- "feMorphology",
155
- "feOffset",
156
- "fePointLight",
157
- "feSpecularLighting",
158
- "feSpotLight",
159
- "feTile",
160
- "feTurbulence"
161
- ]), be = d([
162
- "animate",
163
- "color-profile",
164
- "cursor",
165
- "discard",
166
- "font-face",
167
- "font-face-format",
168
- "font-face-name",
169
- "font-face-src",
170
- "font-face-uri",
171
- "foreignobject",
172
- "hatch",
173
- "hatchpath",
174
- "mesh",
175
- "meshgradient",
176
- "meshpatch",
177
- "meshrow",
178
- "missing-glyph",
179
- "script",
180
- "set",
181
- "solidcolor",
182
- "unknown",
183
- "use"
184
- ]), xe = d(/* @__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(".")), Se = d([
185
- "maction",
186
- "maligngroup",
187
- "malignmark",
188
- "mlongdiv",
189
- "mscarries",
190
- "mscarry",
191
- "msgroup",
192
- "mstack",
193
- "msline",
194
- "msrow",
195
- "semantics",
196
- "annotation",
197
- "annotation-xml",
198
- "mprescripts",
199
- "none"
200
- ]), Ce = d(["#text"]), we = d(/* @__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(".")), Te = d(/* @__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.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".split(".")), Ee = d(/* @__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(".")), De = d([
201
- "xlink:href",
202
- "xml:id",
203
- "xlink:title",
204
- "xml:space",
205
- "xmlns:xlink"
206
- ]), Oe = f(/{{[\w\W]*|^[\w\W]*}}/g), ke = f(/<%[\w\W]*|^[\w\W]*%>/g), Ae = f(/\${[\w\W]*/g), je = f(/^data-[\-\w.\u00B7-\uFFFF]+$/), Me = f(/^aria-[\-\w]+$/), Ne = f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Pe = f(/^(?:\w+script|data):/i), Fe = f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ie = f(/^html$/i), Le = f(/^[a-z][.\w]*(-[.\w]+)+$/i), Re = f(/<[/\w!]/g), ze = f(/<[/\w]/g), Be = f(/<\/no(script|embed|frames)/i), Ve = f(/\/>/i), O = {
207
- element: 1,
208
- attribute: 2,
209
- text: 3,
210
- cdataSection: 4,
211
- entityReference: 5,
212
- entityNode: 6,
213
- processingInstruction: 7,
214
- comment: 8,
215
- document: 9,
216
- documentType: 10,
217
- documentFragment: 11,
218
- notation: 12
219
- }, He = function() {
220
- return typeof window > "u" ? null : window;
221
- }, Ue = function(e, t) {
222
- if (typeof e != "object" || typeof e.createPolicy != "function") return null;
223
- let n = null, r = "data-tt-policy-suffix";
224
- t && t.hasAttribute(r) && (n = t.getAttribute(r));
225
- let i = "dompurify" + (n ? "#" + n : "");
226
- try {
227
- return e.createPolicy(i, {
228
- createHTML(e) {
229
- return e;
230
- },
231
- createScriptURL(e) {
232
- return e;
233
- }
234
- });
235
- } catch {
236
- return console.warn("TrustedTypes policy " + i + " could not be created."), null;
237
- }
238
- }, We = function() {
239
- return {
240
- afterSanitizeAttributes: [],
241
- afterSanitizeElements: [],
242
- afterSanitizeShadowDOM: [],
243
- beforeSanitizeAttributes: [],
244
- beforeSanitizeElements: [],
245
- beforeSanitizeShadowDOM: [],
246
- uponSanitizeAttribute: [],
247
- uponSanitizeElement: [],
248
- uponSanitizeShadowNode: []
249
- };
250
- }, k = function(e, t, n, r) {
251
- return v(e, t) && h(e[t]) ? w(r.base ? E(r.base) : {}, e[t], r.transform) : n;
252
- };
253
- function Ge() {
254
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : He(), t = (e) => Ge(e);
255
- if (t.version = "3.4.11", t.removed = [], !e || !e.document || e.document.nodeType !== O.document || !e.Element) return t.isSupported = !1, t;
256
- let n = e.document, r = n, i = r.currentScript;
257
- e.DocumentFragment;
258
- let a = e.HTMLTemplateElement, s = e.Node, c = e.Element, l = e.NodeFilter;
259
- e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
260
- let u = e.DOMParser, ee = e.trustedTypes, m = c.prototype, te = D(m, "cloneNode"), pe = D(m, "remove"), me = D(m, "nextSibling"), g = D(m, "childNodes"), _ = D(m, "parentNode"), y = D(m, "shadowRoot"), S = D(m, "attributes"), C = s && s.prototype ? D(s.prototype, "nodeType") : null, T = s && s.prototype ? D(s.prototype, "nodeName") : null;
261
- if (typeof a == "function") {
262
- let e = n.createElement("template");
263
- e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
264
- }
265
- let A, j = "", Ke, qe = !1, Je = 0, M = function() {
266
- if (Je > 0) throw x("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.");
267
- }, N = function(e) {
268
- M(), Je++;
269
- try {
270
- return A.createHTML(e);
271
- } finally {
272
- Je--;
273
- }
274
- }, Ye = function(e) {
275
- M(), Je++;
276
- try {
277
- return A.createScriptURL(e);
278
- } finally {
279
- Je--;
280
- }
281
- }, Xe = function() {
282
- return qe ||= (Ke = Ue(ee, i), !0), Ke;
283
- }, Ze = n, Qe = Ze.implementation, $e = Ze.createNodeIterator, et = Ze.createDocumentFragment, tt = Ze.getElementsByTagName, nt = r.importNode, P = We();
284
- t.isSupported = typeof o == "function" && typeof _ == "function" && Qe && Qe.createHTMLDocument !== void 0;
285
- let rt = Oe, it = ke, at = Ae, ot = je, F = Me, I = Pe, st = Fe, ct = Le, lt = Ne, L = null, ut = w({}, [
286
- ..._e,
287
- ...ve,
288
- ...ye,
289
- ...xe,
290
- ...Ce
291
- ]), R = null, dt = w({}, [
292
- ...we,
293
- ...Te,
294
- ...Ee,
295
- ...De
296
- ]), z = Object.seal(p(null, {
297
- tagNameCheck: {
298
- writable: !0,
299
- configurable: !1,
300
- enumerable: !0,
301
- value: null
302
- },
303
- attributeNameCheck: {
304
- writable: !0,
305
- configurable: !1,
306
- enumerable: !0,
307
- value: null
308
- },
309
- allowCustomizedBuiltInElements: {
310
- writable: !0,
311
- configurable: !1,
312
- enumerable: !0,
313
- value: !1
314
- }
315
- })), B = null, ft = null, V = Object.seal(p(null, {
316
- tagCheck: {
317
- writable: !0,
318
- configurable: !1,
319
- enumerable: !0,
320
- value: null
321
- },
322
- attributeCheck: {
323
- writable: !0,
324
- configurable: !1,
325
- enumerable: !0,
326
- value: null
327
- }
328
- })), pt = !0, mt = !0, ht = !1, gt = !0, H = !1, U = !0, W = !1, _t = !1, vt = null, yt = null, G = !1, K = !1, bt = !1, xt = !1, St = !0, Ct = !1, wt = "user-content-", Tt = !0, Et = !1, Dt = {}, q = null, Ot = w({}, /* @__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(".")), kt = null, At = w({}, [
329
- "audio",
330
- "video",
331
- "img",
332
- "source",
333
- "image",
334
- "track"
335
- ]), jt = null, Mt = w({}, [
336
- "alt",
337
- "class",
338
- "for",
339
- "id",
340
- "label",
341
- "name",
342
- "pattern",
343
- "placeholder",
344
- "role",
345
- "summary",
346
- "title",
347
- "value",
348
- "style",
349
- "xmlns"
350
- ]), Nt = "http://www.w3.org/1998/Math/MathML", Pt = "http://www.w3.org/2000/svg", J = "http://www.w3.org/1999/xhtml", Ft = J, It = !1, Lt = null, Rt = w({}, [
351
- Nt,
352
- Pt,
353
- J
354
- ], ce), zt = d([
355
- "mi",
356
- "mo",
357
- "mn",
358
- "ms",
359
- "mtext"
360
- ]), Bt = w({}, zt), Vt = d(["annotation-xml"]), Ht = w({}, Vt), Ut = w({}, [
361
- "title",
362
- "style",
363
- "font",
364
- "a",
365
- "script"
366
- ]), Wt = null, Gt = ["application/xhtml+xml", "text/html"], Y = null, Kt = null, qt = n.createElement("form"), Jt = function(e) {
367
- return e instanceof RegExp || e instanceof Function;
368
- }, Yt = function() {
369
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
370
- if (Kt && Kt === e) return;
371
- (!e || typeof e != "object") && (e = {}), e = E(e), Wt = Gt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = Wt === "application/xhtml+xml" ? ce : se, L = k(e, "ALLOWED_TAGS", ut, { transform: Y }), R = k(e, "ALLOWED_ATTR", dt, { transform: Y }), Lt = k(e, "ALLOWED_NAMESPACES", Rt, { transform: ce }), jt = k(e, "ADD_URI_SAFE_ATTR", Mt, {
372
- transform: Y,
373
- base: Mt
374
- }), kt = k(e, "ADD_DATA_URI_TAGS", At, {
375
- transform: Y,
376
- base: At
377
- }), q = k(e, "FORBID_CONTENTS", Ot, { transform: Y }), B = k(e, "FORBID_TAGS", E({}), { transform: Y }), ft = k(e, "FORBID_ATTR", E({}), { transform: Y }), Dt = v(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? E(e.USE_PROFILES) : e.USE_PROFILES : !1, pt = e.ALLOW_ARIA_ATTR !== !1, mt = e.ALLOW_DATA_ATTR !== !1, ht = e.ALLOW_UNKNOWN_PROTOCOLS || !1, gt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = e.SAFE_FOR_TEMPLATES || !1, U = e.SAFE_FOR_XML !== !1, W = e.WHOLE_DOCUMENT || !1, K = e.RETURN_DOM || !1, bt = e.RETURN_DOM_FRAGMENT || !1, xt = e.RETURN_TRUSTED_TYPE || !1, G = e.FORCE_BODY || !1, St = e.SANITIZE_DOM !== !1, Ct = e.SANITIZE_NAMED_PROPS || !1, Tt = e.KEEP_CONTENT !== !1, Et = e.IN_PLACE || !1, lt = ge(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ne, Ft = typeof e.NAMESPACE == "string" ? e.NAMESPACE : J, Bt = v(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? E(e.MATHML_TEXT_INTEGRATION_POINTS) : w({}, zt), Ht = v(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? E(e.HTML_INTEGRATION_POINTS) : w({}, Vt);
378
- let t = v(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? E(e.CUSTOM_ELEMENT_HANDLING) : p(null);
379
- if (z = p(null), v(t, "tagNameCheck") && Jt(t.tagNameCheck) && (z.tagNameCheck = t.tagNameCheck), v(t, "attributeNameCheck") && Jt(t.attributeNameCheck) && (z.attributeNameCheck = t.attributeNameCheck), v(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), f(z), H && (mt = !1), bt && (K = !0), Dt && (L = w({}, Ce), R = p(null), Dt.html === !0 && (w(L, _e), w(R, we)), Dt.svg === !0 && (w(L, ve), w(R, Te), w(R, De)), Dt.svgFilters === !0 && (w(L, ye), w(R, Te), w(R, De)), Dt.mathMl === !0 && (w(L, xe), w(R, Ee), w(R, De))), V.tagCheck = null, V.attributeCheck = null, v(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? V.tagCheck = e.ADD_TAGS : h(e.ADD_TAGS) && (L === ut && (L = E(L)), w(L, e.ADD_TAGS, Y))), v(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? V.attributeCheck = e.ADD_ATTR : h(e.ADD_ATTR) && (R === dt && (R = E(R)), w(R, e.ADD_ATTR, Y))), v(e, "ADD_URI_SAFE_ATTR") && h(e.ADD_URI_SAFE_ATTR) && w(jt, e.ADD_URI_SAFE_ATTR, Y), v(e, "FORBID_CONTENTS") && h(e.FORBID_CONTENTS) && (q === Ot && (q = E(q)), w(q, e.FORBID_CONTENTS, Y)), v(e, "ADD_FORBID_CONTENTS") && h(e.ADD_FORBID_CONTENTS) && (q === Ot && (q = E(q)), w(q, e.ADD_FORBID_CONTENTS, Y)), Tt && (L["#text"] = !0), W && w(L, [
380
- "html",
381
- "head",
382
- "body"
383
- ]), L.table && (w(L, ["tbody"]), delete B.tbody), e.TRUSTED_TYPES_POLICY) {
384
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw x("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
385
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw x("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
386
- let t = A;
387
- A = e.TRUSTED_TYPES_POLICY;
388
- try {
389
- j = N("");
390
- } catch (e) {
391
- throw A = t, e;
392
- }
393
- } else e.TRUSTED_TYPES_POLICY === null ? (A = void 0, j = "") : (A === void 0 && (A = Xe()), A && typeof j == "string" && (j = N("")));
394
- d && d(e), Kt = e;
395
- }, Xt = w({}, [
396
- ...ve,
397
- ...ye,
398
- ...be
399
- ]), Zt = w({}, [...xe, ...Se]), Qt = function(e, t, n) {
400
- return t.namespaceURI === J ? e === "svg" : t.namespaceURI === Nt ? e === "svg" && (n === "annotation-xml" || Bt[n]) : !!Xt[e];
401
- }, $t = function(e, t, n) {
402
- return t.namespaceURI === J ? e === "math" : t.namespaceURI === Pt ? e === "math" && Ht[n] : !!Zt[e];
403
- }, en = function(e, t, n) {
404
- return t.namespaceURI === Pt && !Ht[n] || t.namespaceURI === Nt && !Bt[n] ? !1 : !Zt[e] && (Ut[e] || !Xt[e]);
405
- }, tn = function(e) {
406
- let t = _(e);
407
- (!t || !t.tagName) && (t = {
408
- namespaceURI: Ft,
409
- tagName: "template"
410
- });
411
- let n = se(e.tagName), r = se(t.tagName);
412
- return Lt[e.namespaceURI] ? e.namespaceURI === Pt ? Qt(n, t, r) : e.namespaceURI === Nt ? $t(n, t, r) : e.namespaceURI === J ? en(n, t, r) : !!(Wt === "application/xhtml+xml" && Lt[e.namespaceURI]) : !1;
413
- }, X = function(e) {
414
- ae(t.removed, { element: e });
415
- try {
416
- _(e).removeChild(e);
417
- } catch {
418
- if (pe(e), !_(e)) throw x("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
419
- }
420
- }, nn = function(e) {
421
- let t = g(e);
422
- if (t) {
423
- let e = [];
424
- ne(t, (t) => {
425
- ae(e, t);
426
- }), ne(e, (e) => {
427
- try {
428
- pe(e);
429
- } catch {}
430
- });
431
- }
432
- let n = S(e);
433
- if (n) for (let t = n.length - 1; t >= 0; --t) {
434
- let r = n[t], i = r && r.name;
435
- if (typeof i == "string") try {
436
- e.removeAttribute(i);
437
- } catch {}
438
- }
439
- }, Z = function(e, n) {
440
- try {
441
- ae(t.removed, {
442
- attribute: n.getAttributeNode(e),
443
- from: n
444
- });
445
- } catch {
446
- ae(t.removed, {
447
- attribute: null,
448
- from: n
449
- });
450
- }
451
- if (n.removeAttribute(e), e === "is") if (K || bt) try {
452
- X(n);
453
- } catch {}
454
- else try {
455
- n.setAttribute(e, "");
456
- } catch {}
457
- }, rn = function(e) {
458
- let t = S(e);
459
- if (t) for (let n = t.length - 1; n >= 0; --n) {
460
- let r = t[n], i = r && r.name;
461
- if (!(typeof i != "string" || R[Y(i)])) try {
462
- e.removeAttribute(i);
463
- } catch {}
464
- }
465
- }, an = function(e) {
466
- let t = [e];
467
- for (; t.length > 0;) {
468
- let e = t.pop();
469
- (C ? C(e) : e.nodeType) === O.element && rn(e);
470
- let n = g(e);
471
- if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
472
- }
473
- }, on = function(e) {
474
- let t = null, r = null;
475
- if (G) e = "<remove></remove>" + e;
476
- else {
477
- let t = le(e, /^[\r\n\t ]+/);
478
- r = t && t[0];
479
- }
480
- Wt === "application/xhtml+xml" && Ft === J && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
481
- let i = A ? N(e) : e;
482
- if (Ft === J) try {
483
- t = new u().parseFromString(i, Wt);
484
- } catch {}
485
- if (!t || !t.documentElement) {
486
- t = Qe.createDocument(Ft, "template", null);
487
- try {
488
- t.documentElement.innerHTML = It ? j : i;
489
- } catch {}
490
- }
491
- let a = t.body || t.documentElement;
492
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Ft === J ? tt.call(t, W ? "html" : "body")[0] : W ? t.documentElement : a;
493
- }, sn = function(e) {
494
- return $e.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
495
- }, cn = function(e) {
496
- return e = ue(e, rt, " "), e = ue(e, it, " "), e = ue(e, at, " "), e;
497
- }, ln = function(e) {
498
- e.normalize();
499
- let t = $e.call(e.ownerDocument || e, e, l.SHOW_TEXT | l.SHOW_COMMENT | l.SHOW_CDATA_SECTION | l.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
500
- for (; n;) n.data = cn(n.data), n = t.nextNode();
501
- let r = e.querySelectorAll?.call(e, "template");
502
- r && ne(r, (e) => {
503
- Q(e.content) && ln(e.content);
504
- });
505
- }, un = function(e) {
506
- let t = T ? T(e) : null;
507
- return typeof t != "string" || Y(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.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== C(e) || e.childNodes !== g(e);
508
- }, Q = function(e) {
509
- if (!C || typeof e != "object" || !e) return !1;
510
- try {
511
- return C(e) === O.documentFragment;
512
- } catch {
513
- return !1;
514
- }
515
- }, dn = function(e) {
516
- if (!C || typeof e != "object" || !e) return !1;
517
- try {
518
- return typeof C(e) == "number";
519
- } catch {
520
- return !1;
521
- }
522
- };
523
- function $(e, n, r) {
524
- e.length !== 0 && ne(e, (e) => {
525
- e.call(t, n, r, Kt);
526
- });
527
- }
528
- let fn = function(e, t) {
529
- return !!(U && e.hasChildNodes() && !dn(e.firstElementChild) && b(Re, e.textContent) && b(Re, e.innerHTML) || U && e.namespaceURI === J && t === "style" && dn(e.firstElementChild) || e.nodeType === O.processingInstruction || U && e.nodeType === O.comment && b(ze, e.data));
530
- }, pn = function(e, t) {
531
- if (!B[t] && _n(t) && (z.tagNameCheck instanceof RegExp && b(z.tagNameCheck, t) || z.tagNameCheck instanceof Function && z.tagNameCheck(t))) return !1;
532
- if (Tt && !q[t]) {
533
- let t = _(e), n = g(e);
534
- if (n && t) {
535
- let r = n.length;
536
- for (let i = r - 1; i >= 0; --i) {
537
- let r = Et ? n[i] : te(n[i], !0);
538
- t.insertBefore(r, me(e));
539
- }
540
- }
541
- }
542
- return X(e), !0;
543
- }, mn = function(e) {
544
- if ($(P.beforeSanitizeElements, e, null), un(e)) return X(e), !0;
545
- let n = Y(T ? T(e) : e.nodeName);
546
- if ($(P.uponSanitizeElement, e, {
547
- tagName: n,
548
- allowedTags: L
549
- }), fn(e, n)) return X(e), !0;
550
- if (B[n] || !(V.tagCheck instanceof Function && V.tagCheck(n)) && !L[n]) return pn(e, n);
551
- if ((C ? C(e) : e.nodeType) === O.element && !tn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && b(Be, e.innerHTML)) return X(e), !0;
552
- if (H && e.nodeType === O.text) {
553
- let n = cn(e.textContent);
554
- e.textContent !== n && (ae(t.removed, { element: e.cloneNode() }), e.textContent = n);
555
- }
556
- return $(P.afterSanitizeElements, e, null), !1;
557
- }, hn = function(e, t, r) {
558
- if (ft[t] || St && (t === "id" || t === "name") && (r in n || r in qt)) return !1;
559
- let i = R[t] || V.attributeCheck instanceof Function && V.attributeCheck(t, e);
560
- if (!(mt && b(ot, t)) && !(pt && b(F, t))) {
561
- if (!i) {
562
- if (!(_n(e) && (z.tagNameCheck instanceof RegExp && b(z.tagNameCheck, e) || z.tagNameCheck instanceof Function && z.tagNameCheck(e)) && (z.attributeNameCheck instanceof RegExp && b(z.attributeNameCheck, t) || z.attributeNameCheck instanceof Function && z.attributeNameCheck(t, e)) || t === "is" && z.allowCustomizedBuiltInElements && (z.tagNameCheck instanceof RegExp && b(z.tagNameCheck, r) || z.tagNameCheck instanceof Function && z.tagNameCheck(r)))) return !1;
563
- } else if (!jt[t] && !b(lt, ue(r, st, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && de(r, "data:") === 0 && kt[e]) && !(ht && !b(I, ue(r, st, ""))) && r) return !1;
564
- }
565
- return !0;
566
- }, gn = w({}, [
567
- "annotation-xml",
568
- "color-profile",
569
- "font-face",
570
- "font-face-format",
571
- "font-face-name",
572
- "font-face-src",
573
- "font-face-uri",
574
- "missing-glyph"
575
- ]), _n = function(e) {
576
- return !gn[se(e)] && b(ct, e);
577
- }, vn = function(e, t, n, r) {
578
- if (A && typeof ee == "object" && typeof ee.getAttributeType == "function" && !n) switch (ee.getAttributeType(e, t)) {
579
- case "TrustedHTML": return N(r);
580
- case "TrustedScriptURL": return Ye(r);
581
- }
582
- return r;
583
- }, yn = function(e, n, r, i) {
584
- try {
585
- r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), un(e) ? X(e) : ie(t.removed);
586
- } catch {
587
- Z(n, e);
588
- }
589
- }, bn = function(e) {
590
- $(P.beforeSanitizeAttributes, e, null);
591
- let t = e.attributes;
592
- if (!t || un(e)) return;
593
- let n = {
594
- attrName: "",
595
- attrValue: "",
596
- keepAttr: !0,
597
- allowedAttributes: R,
598
- forceKeepAttr: void 0
599
- }, r = t.length, i = Y(e.nodeName);
600
- for (; r--;) {
601
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Y(o), u = c, d = o === "value" ? u : fe(u);
602
- if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, $(P.uponSanitizeAttribute, e, n), d = n.attrValue, Ct && (l === "id" || l === "name") && de(d, wt) !== 0 && (Z(o, e), d = wt + d), U && b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
603
- Z(o, e);
604
- continue;
605
- }
606
- if (l === "attributename" && le(d, "href")) {
607
- Z(o, e);
608
- continue;
609
- }
610
- if (!n.forceKeepAttr) {
611
- if (!n.keepAttr) {
612
- Z(o, e);
613
- continue;
614
- }
615
- if (!gt && b(Ve, d)) {
616
- Z(o, e);
617
- continue;
618
- }
619
- if (H && (d = cn(d)), !hn(i, l, d)) {
620
- Z(o, e);
621
- continue;
622
- }
623
- d = vn(i, l, s, d), d !== u && yn(e, o, s, d);
624
- }
625
- }
626
- $(P.afterSanitizeAttributes, e, null);
627
- }, xn = function(e) {
628
- let t = null, n = sn(e);
629
- for ($(P.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if ($(P.uponSanitizeShadowNode, t, null), mn(t), bn(t), Q(t.content) && xn(t.content), (C ? C(t) : t.nodeType) === O.element) {
630
- let e = y(t);
631
- Q(e) && (Sn(e), xn(e));
632
- }
633
- $(P.afterSanitizeShadowDOM, e, null);
634
- }, Sn = function(e) {
635
- let t = [{
636
- node: e,
637
- shadow: null
638
- }];
639
- for (; t.length > 0;) {
640
- let e = t.pop();
641
- if (e.shadow) {
642
- xn(e.shadow);
643
- continue;
644
- }
645
- let n = e.node, r = (C ? C(n) : n.nodeType) === O.element, i = g(n);
646
- if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
647
- node: i[e],
648
- shadow: null
649
- });
650
- if (r) {
651
- let e = T ? T(n) : null;
652
- if (typeof e == "string" && Y(e) === "template") {
653
- let e = n.content;
654
- Q(e) && t.push({
655
- node: e,
656
- shadow: null
657
- });
658
- }
659
- }
660
- if (r) {
661
- let e = y(n);
662
- Q(e) && t.push({
663
- node: null,
664
- shadow: e
665
- }, {
666
- node: e,
667
- shadow: null
668
- });
669
- }
670
- }
671
- };
672
- return t.sanitize = function(e) {
673
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
674
- if (It = !e, It && (e = "<!-->"), typeof e != "string" && !dn(e) && (e = he(e), typeof e != "string")) throw x("dirty is not a string, aborting");
675
- if (!t.isSupported) return e;
676
- _t ? (L = vt, R = yt) : Yt(n), (P.uponSanitizeElement.length > 0 || P.uponSanitizeAttribute.length > 0) && (L = E(L)), P.uponSanitizeAttribute.length > 0 && (R = E(R)), t.removed = [];
677
- let c = Et && typeof e != "string" && dn(e);
678
- if (c) {
679
- let t = T ? T(e) : e.nodeName;
680
- if (typeof t == "string") {
681
- let e = Y(t);
682
- if (!L[e] || B[e]) throw x("root node is forbidden and cannot be sanitized in-place");
683
- }
684
- if (un(e)) throw x("root node is clobbered and cannot be sanitized in-place");
685
- try {
686
- Sn(e);
687
- } catch (t) {
688
- throw nn(e), t;
689
- }
690
- } else if (dn(e)) i = on("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === O.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Sn(a);
691
- else {
692
- if (!K && !H && !W && e.indexOf("<") === -1) return A && xt ? N(e) : e;
693
- if (i = on(e), !i) return K ? null : xt ? j : "";
694
- }
695
- i && G && X(i.firstChild);
696
- let l = sn(c ? e : i);
697
- try {
698
- for (; o = l.nextNode();) mn(o), bn(o), Q(o.content) && xn(o.content);
699
- } catch (t) {
700
- throw c && nn(e), t;
701
- }
702
- if (c) return ne(t.removed, (e) => {
703
- e.element && an(e.element);
704
- }), H && ln(e), e;
705
- if (K) {
706
- if (H && ln(i), bt) for (s = et.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
707
- else s = i;
708
- return (R.shadowroot || R.shadowrootmode) && (s = nt.call(r, s, !0)), s;
709
- }
710
- let u = W ? i.outerHTML : i.innerHTML;
711
- return W && L["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && b(Ie, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), H && (u = cn(u)), A && xt ? N(u) : u;
712
- }, t.setConfig = function() {
713
- Yt(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), _t = !0, vt = L, yt = R;
714
- }, t.clearConfig = function() {
715
- Kt = null, _t = !1, vt = null, yt = null, A = Ke, j = "";
716
- }, t.isValidAttribute = function(e, t, n) {
717
- return Kt || Yt({}), hn(Y(e), Y(t), n);
718
- }, t.addHook = function(e, t) {
719
- typeof t == "function" && v(P, e) && ae(P[e], t);
720
- }, t.removeHook = function(e, t) {
721
- if (v(P, e)) {
722
- if (t !== void 0) {
723
- let n = re(P[e], t);
724
- return n === -1 ? void 0 : oe(P[e], n, 1)[0];
725
- }
726
- return ie(P[e]);
727
- }
728
- }, t.removeHooks = function(e) {
729
- v(P, e) && (P[e] = []);
730
- }, t.removeAllHooks = function() {
731
- P = We();
732
- }, t;
733
- }
734
- var A = Ge(), j = null;
735
- function Ke() {
736
- if (j) return j;
737
- if (typeof window > "u" || !window.document) return null;
738
- let e = A;
739
- return j = typeof e == "function" ? e(window) : A, j;
740
- }
741
- var qe = [
742
- "script",
743
- "foreignobject",
744
- "iframe",
745
- "object",
746
- "embed",
747
- "base",
748
- "form"
749
- ], Je = [
750
- "onerror",
751
- "onload",
752
- "onclick",
753
- "onmouseover",
754
- "onmouseout",
755
- "onmouseenter",
756
- "onmouseleave",
757
- "onfocus",
758
- "onblur",
759
- "onkeydown",
760
- "onkeyup",
761
- "onkeypress",
762
- "formaction",
763
- "xlink:href"
764
- ], M = /* @__PURE__ */ new Map(), N = 64;
765
- function Ye(e) {
766
- if (typeof e != "string" || e.length === 0 || !e.trimStart().toLowerCase().startsWith("<svg")) return "";
767
- let t = M.get(e);
768
- if (t !== void 0) return t;
769
- let n = Ke();
770
- if (!n) return "";
771
- let r = n.sanitize(e, {
772
- USE_PROFILES: {
773
- svg: !0,
774
- svgFilters: !0
775
- },
776
- FORBID_TAGS: qe,
777
- FORBID_ATTR: Je,
778
- ALLOW_UNKNOWN_PROTOCOLS: !1,
779
- RETURN_TRUSTED_TYPE: !1
780
- }), i = typeof r == "string" ? r : String(r ?? "");
781
- if (M.size >= N) {
782
- let e = [...M.keys()];
783
- for (let t = 0; t < e.length / 2; t += 1) M.delete(e[t]);
784
- }
785
- return M.set(e, i), i;
786
- }
787
- function Xe(e) {
788
- try {
789
- let t = {
790
- BASE_URL: "/",
791
- DEV: !1,
792
- MODE: "production",
793
- PROD: !0,
794
- SSR: !1
795
- }?.[e];
796
- if (typeof t == "string" && t.length > 0) return t;
797
- } catch {}
798
- }
799
- typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL || Xe("PUBLIC_BUILDER_ORIGIN_URL"), typeof window < "u" && window.PIE_BUILDER_BUNDLE_URL || Xe("PUBLIC_BUILDER_BUNDLE_URL");
800
- var Ze = class {
801
- initialized = !1;
802
- config;
803
- trackError(e, t) {
804
- if (!this.guardedOperation("trackError", e, t) || !this.applyErrorFilter(e, t)) return;
805
- let n = this.transformAttributes(t);
806
- try {
807
- this.doTrackError(e, n), this.config?.debug && console.log(`[${this.providerName}] Tracked error:`, e, n);
808
- } catch (e) {
809
- console.error(`[${this.providerName}] Error tracking error:`, e);
810
- }
811
- }
812
- trackEvent(e, t) {
813
- if (!this.guardedOperation("trackEvent", e, t) || !this.applyEventFilter(e, t) || !this.applySampling(e)) return;
814
- let n = this.transformAttributes(t);
815
- n.timestamp || (n = {
816
- ...n,
817
- timestamp: (/* @__PURE__ */ new Date()).toISOString()
818
- });
819
- try {
820
- this.doTrackEvent(e, n), this.config?.debug && console.log(`[${this.providerName}] Tracked event:`, e, n);
821
- } catch (e) {
822
- console.error(`[${this.providerName}] Error tracking event:`, e);
823
- }
824
- }
825
- trackMetric(e, t, n) {
826
- this.trackEvent(`metric:${e}`, {
827
- ...n,
828
- metricValue: t,
829
- metricName: e
830
- });
831
- }
832
- setUserContext(e, t) {
833
- if (this.guardedOperation("setUserContext", e, t)) try {
834
- this.doSetUserContext(e, t), this.config?.debug && console.log(`[${this.providerName}] Set user context:`, e, t);
835
- } catch (e) {
836
- console.error(`[${this.providerName}] Error setting user context:`, e);
837
- }
838
- }
839
- setGlobalAttributes(e) {
840
- if (this.guardedOperation("setGlobalAttributes", e)) try {
841
- this.doSetGlobalAttributes(e), this.config?.debug && console.log(`[${this.providerName}] Set global attributes:`, e);
842
- } catch (e) {
843
- console.error(`[${this.providerName}] Error setting global attributes:`, e);
844
- }
845
- }
846
- guardedOperation(e, ...t) {
847
- return this.isReady() ? !0 : (this.config?.debug && console.warn(`[${this.providerName}] Attempted to ${e} but provider not ready:`, ...t), !1);
848
- }
849
- applyErrorFilter(e, t) {
850
- return this.config?.errorFilter && !this.config.errorFilter(e, t) ? (this.config?.debug && console.log(`[${this.providerName}] Error filtered out:`, e, t), !1) : !0;
851
- }
852
- applyEventFilter(e, t) {
853
- return this.config?.eventFilter && !this.config.eventFilter(e, t) ? (this.config?.debug && console.log(`[${this.providerName}] Event filtered out:`, e, t), !1) : !0;
854
- }
855
- applySampling(e) {
856
- return this.config?.sampleRate !== void 0 && this.config.sampleRate < 1 && Math.random() > this.config.sampleRate ? (this.config?.debug && console.log(`[${this.providerName}] Event sampled out:`, e), !1) : !0;
857
- }
858
- transformAttributes(e) {
859
- return this.config?.attributeTransformer ? this.config.attributeTransformer(e) : e;
860
- }
861
- }, Qe = class extends Ze {
862
- providerId = "newrelic";
863
- providerName = "New Relic";
864
- async initialize(e) {
865
- this.config = e, typeof window < "u" && window.newrelic ? (this.initialized = !0, this.config?.debug && console.log("[NewRelicProvider] Initialized successfully")) : (this.config?.debug && console.warn("[NewRelicProvider] New Relic not available (window.newrelic not found)"), this.initialized = !1);
866
- }
867
- isReady() {
868
- return this.initialized && typeof window < "u" && !!window.newrelic;
869
- }
870
- destroy() {
871
- this.initialized = !1, this.config?.debug && console.log("[NewRelicProvider] Destroyed");
872
- }
873
- doTrackError(e, t) {
874
- window.newrelic.noticeError(e, t);
875
- }
876
- doTrackEvent(e, t) {
877
- window.newrelic.addPageAction(e, t);
878
- }
879
- doSetUserContext(e, t) {
880
- let n = window.newrelic;
881
- if (n.setUserId && n.setUserId(e), t && n.setCustomAttribute) for (let [e, r] of Object.entries(t)) n.setCustomAttribute(e, r);
882
- }
883
- doSetGlobalAttributes(e) {
884
- let t = window.newrelic;
885
- if (t.setCustomAttribute) for (let [n, r] of Object.entries(e)) t.setCustomAttribute(n, r);
886
- }
887
- };
888
- //#endregion
889
- //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/instrumentation/provider-guards.js
890
- function $e(e) {
891
- if (!e || typeof e != "object") return !1;
892
- let t = e;
893
- return typeof t.providerId == "string" && typeof t.providerName == "string" && typeof t.initialize == "function" && typeof t.trackError == "function" && typeof t.trackEvent == "function" && typeof t.destroy == "function" && typeof t.isReady == "function";
894
- }
895
- //#endregion
896
- //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/loader-config.js
897
- var et = {
898
- retryDelayMs: 3e3,
899
- timeoutMs: 12e4
900
- }, tt;
901
- (function(e) {
902
- e.player = "player.js", e.clientPlayer = "client-player.js", e.editor = "editor.js";
903
- })(tt ||= {});
904
- var nt;
905
- (function(e) {
906
- e.loading = "loading", e.loaded = "loaded";
907
- })(nt ||= {}), et.timeoutMs;
908
- //#endregion
909
- //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/types/index.js
910
- var P;
911
- (function(e) {
912
- e.SAVE = "save", e.MODEL = "model", e.SCORE = "score", e.MANUAL_SCORE = "manual-score";
913
- })(P ||= {});
914
- var rt;
915
- (function(e) {
916
- e.AUTO = "auto", e.MANUAL = "manual";
917
- })(rt ||= {});
918
- var it;
919
- (function(e) {
920
- e.GATHER = "gather", e.VIEW = "view", e.EVALUATE = "evaluate";
921
- })(it ||= {});
922
- var at;
923
- (function(e) {
924
- e.PENDING = "pending", e.IN_PROGRESS = "in_progress", e.COMPLETED = "completed", e.FAILED = "failed";
925
- })(at ||= {});
926
- var ot;
927
- (function(e) {
928
- e[e.ROOT = 0] = "ROOT", e[e.SUBJECT = 1] = "SUBJECT", e[e.LEVEL = 2] = "LEVEL", e[e.STANDARD = 3] = "STANDARD";
929
- })(ot ||= {});
930
- //#endregion
931
- //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/pie/logger.js
932
- function F(e, t) {
933
- let n = `[${e}]`;
934
- return {
935
- debug: (e, ...r) => {
936
- t() && console.debug(n, e, ...r);
937
- },
938
- info: (e, ...t) => console.info(n, e, ...t),
939
- warn: (e, ...t) => console.warn(n, e, ...t),
940
- error: (e, ...t) => console.error(n, e, ...t)
941
- };
942
- }
943
- function I() {
944
- return typeof window < "u" && window.PIE_DEBUG === !0;
945
- }
946
- F("math-rendering", () => I()), F("pie-scoring", () => I()), F("pie-updates", () => I()), F("pie-initialization", () => I()), tt.player, F("asset-handler", () => I()), F("authoring", () => I());
947
- //#endregion
948
- //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/pie/instrumentation-event-bridge.js
949
- var st = F("instrumentation-event-bridge", () => I());
950
- function ct(e) {
951
- return e && typeof e == "object" ? e : e === void 0 ? {} : { value: e };
952
- }
953
- function lt(e) {
954
- st.warn(`[InstrumentationEventBridge:${e}] Ignoring invalid instrumentation provider; expected InstrumentationProvider contract`);
955
- }
956
- function L(e) {
957
- try {
958
- e.provider.trackError(e.error instanceof Error ? e.error : Error(String(e.error ?? "Unknown instrumentation bridge error")), {
959
- component: e.component,
960
- errorType: "InstrumentationBridgeError",
961
- sourceEventName: e.sourceEventName
962
- });
963
- } catch {}
964
- }
965
- function ut(e) {
966
- if (!e.host || !e.eventMap.length || !e.instrumentationProvider) return () => {};
967
- if (!$e(e.instrumentationProvider)) return e.debug && lt(e.component), () => {};
968
- let t = e.instrumentationProvider, n = [], r = Math.max(0, e.dedupeWindowMs ?? 0), i = /* @__PURE__ */ new Map(), a = (e, t) => {
969
- let n = [
970
- t.assessmentId,
971
- t.sectionId,
972
- t.attemptId,
973
- t.itemId,
974
- t.canonicalItemId,
975
- t.sourceRuntimeId
976
- ].map((e) => String(e ?? "")).join("|");
977
- return `${e.instrumentationEventName}|${n}`;
978
- };
979
- for (let o of e.eventMap) {
980
- let s = (n) => {
981
- try {
982
- if (!t.isReady() || e.shouldTrackEvent && !e.shouldTrackEvent(n)) return;
983
- let s = ct(n.detail), c = (/* @__PURE__ */ new Date()).toISOString(), l = {
984
- ...s,
985
- ...e.staticAttributes,
986
- component: e.component,
987
- sourceEventName: o.sourceEventName,
988
- timestamp: c
989
- };
990
- if (r > 0) {
991
- let e = Date.now(), t = a(o, l), n = i.get(t);
992
- if (typeof n == "number" && e - n < r) return;
993
- i.set(t, e);
994
- }
995
- t.trackEvent(o.instrumentationEventName, { ...l });
996
- } catch (n) {
997
- L({
998
- provider: t,
999
- component: e.component,
1000
- error: n,
1001
- sourceEventName: o.sourceEventName
1002
- });
1003
- }
1004
- };
1005
- e.host.addEventListener(o.sourceEventName, s), n.push(() => {
1006
- e.host?.removeEventListener(o.sourceEventName, s);
1007
- });
1008
- }
1009
- return () => {
1010
- for (let e of n) e();
1011
- };
1012
- }
1013
- //#endregion
1014
- //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/pie/instrumentation-provider-resolution.js
1015
- function R(e) {
1016
- return e && typeof e == "object" ? e : {};
1017
- }
1018
- function dt(e) {
1019
- let t = R(R(e).loaderConfig);
1020
- return Object.keys(t).length > 0 ? t : null;
1021
- }
1022
- function z(e) {
1023
- if (!e || !("instrumentationProvider" in e)) return { kind: "unset" };
1024
- let t = e.instrumentationProvider;
1025
- return t === null ? { kind: "null" } : t === void 0 ? { kind: "unset" } : {
1026
- kind: "value",
1027
- value: t
1028
- };
1029
- }
1030
- function B(e) {
1031
- if (!e || !("trackPageActions" in e)) return;
1032
- let t = e.trackPageActions;
1033
- return typeof t == "boolean" ? t : void 0;
1034
- }
1035
- function ft(e, t) {
1036
- return e.kind === "value" || e.kind === "null" ? e : t;
1037
- }
1038
- var V, pt = F("instrumentation-provider-resolution", () => I());
1039
- function mt() {
1040
- return V || (V = new Qe(), V.initialize()), V;
1041
- }
1042
- function ht(e) {
1043
- let t = dt(e.runtimePlayer), n = dt(e.player), r = B(t), i = B(n), a = r ?? i ?? !1, o = ft(z(t), z(n));
1044
- if (o.kind !== "null") {
1045
- if (o.kind === "unset") return a ? mt() : void 0;
1046
- if ($e(o.value)) return o.value;
1047
- if (e.debug) {
1048
- let t = e.component ? `[${e.component}] ` : "";
1049
- pt.warn(`${t}Ignoring invalid instrumentation provider; expected InstrumentationProvider contract`);
1050
- }
1051
- }
1052
- }
1053
- //#endregion
1054
- //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/pie/stages.js
1055
- var gt = Object.freeze([
1056
- "composed",
1057
- "engine-ready",
1058
- "interactive",
1059
- "disposed"
1060
- ]);
1061
- function H(e) {
1062
- return gt;
1063
- }
1064
- function U(e) {
1065
- let t = gt.indexOf(e);
1066
- if (t === -1) throw Error(`Unknown stage \`${e}\``);
1067
- return t;
1068
- }
1069
- //#endregion
1070
- //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/pie/stage-tracker.js
1071
- var W = !1;
1072
- function _t(e) {
1073
- W || (W = !0, typeof console < "u" && console.warn && console.warn(`[pie-stage-tracker] Unexpected ${e.reason} stage transition from \`${e.from ?? "<none>"}\` to \`${e.to}\`. Stage transitions are expected to be monotonic within a cohort; call \`reset()\` when \`(sectionId, attemptId)\` changes.`));
1074
- }
1075
- function vt(e) {
1076
- let t = H(e.sourceCeShape), n = new Set(t), r = e.now ?? (() => (/* @__PURE__ */ new Date()).toISOString()), i = e.onUnexpectedTransition ?? _t, a = null, o = e.sectionId, s = e.attemptId, c = /* @__PURE__ */ new Set();
1077
- function l(t, n) {
1078
- e.emit({
1079
- stage: t,
1080
- status: n,
1081
- runtimeId: e.runtimeId,
1082
- sectionId: o,
1083
- attemptId: s,
1084
- timestamp: r(),
1085
- sourceCe: e.sourceCe
1086
- });
1087
- }
1088
- function u(e) {
1089
- let t = U(e), r = a === null ? 0 : U(a) + 1;
1090
- for (let e = r; e < t; e += 1) {
1091
- let t = gt[e];
1092
- n.has(t) || c.has(t) || (c.add(t), l(t, "skipped"));
1093
- }
1094
- }
1095
- function d(e, t = "entered") {
1096
- let r = U(e), o = a === null ? -1 : U(a);
1097
- if (t === "entered") {
1098
- if (c.has(e)) {
1099
- i({
1100
- from: a,
1101
- to: e,
1102
- reason: "duplicate"
1103
- });
1104
- return;
1105
- }
1106
- if (r < o) {
1107
- i({
1108
- from: a,
1109
- to: e,
1110
- reason: "backward"
1111
- });
1112
- return;
1113
- }
1114
- if (!n.has(e)) {
1115
- if (c.has(e)) return;
1116
- c.add(e), l(e, "skipped");
1117
- return;
1118
- }
1119
- u(e), c.add(e), a = e, l(e, "entered");
1120
- return;
1121
- }
1122
- if (t === "failed") {
1123
- u(e), c.add(e), a = e, l(e, "failed");
1124
- return;
1125
- }
1126
- c.has(e) || (c.add(e), l(e, "skipped"));
1127
- }
1128
- function f(e) {
1129
- a = null, c.clear(), e && (o = e.sectionId, s = e.attemptId);
1130
- }
1131
- function p() {
1132
- return a;
1133
- }
1134
- return {
1135
- enter: d,
1136
- reset: f,
1137
- getCurrent: p
1138
- };
1139
- }
1140
- //#endregion
1141
- //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/pie/instrumentation-event-map.js
1142
- var yt = [
1143
- {
1144
- sourceEventName: "pie-stage-change",
1145
- instrumentationEventName: "pie-toolkit-stage-change"
1146
- },
1147
- {
1148
- sourceEventName: "runtime-owned",
1149
- instrumentationEventName: "pie-toolkit-runtime-owned"
1150
- },
1151
- {
1152
- sourceEventName: "runtime-inherited",
1153
- instrumentationEventName: "pie-toolkit-runtime-inherited"
1154
- },
1155
- {
1156
- sourceEventName: "toolkit-ready",
1157
- instrumentationEventName: "pie-toolkit-ready"
1158
- },
1159
- {
1160
- sourceEventName: "section-ready",
1161
- instrumentationEventName: "pie-toolkit-section-ready"
1162
- },
1163
- {
1164
- sourceEventName: "framework-error",
1165
- instrumentationEventName: "pie-toolkit-framework-error"
1166
- }
1167
- ];
1168
- new Set([
1169
- "id",
1170
- "element",
1171
- ...new Set([
1172
- "complete",
1173
- "component",
1174
- "timestamp",
1175
- "sourceRuntimeId"
1176
- ])
1177
- ]), F("pie-overrides", () => I());
1178
- //#endregion
1179
- //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/ui/first-focusable.js
1180
- var G = [
1181
- "a[href]",
1182
- "button:not([disabled])",
1183
- "input:not([disabled]):not([type='hidden'])",
1184
- "select:not([disabled])",
1185
- "textarea:not([disabled])",
1186
- "[contenteditable]:not([contenteditable='false'])",
1187
- "[tabindex]:not([tabindex='-1'])"
1188
- ].join(",");
1189
- function K(e) {
1190
- return !e.matches(G) || e.hasAttribute("disabled") || e.closest("[inert]") ? !1 : e.offsetParent !== null || e.getClientRects().length > 0;
1191
- }
1192
- //#endregion
1193
- //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/ui/focus-trap.js
1194
- function bt(e) {
1195
- return Array.from(e.querySelectorAll(G)).filter((e) => K(e));
1196
- }
1197
- function xt(e, t) {
1198
- try {
1199
- if (t && e.contains(t)) {
1200
- t.focus();
1201
- return;
1202
- }
1203
- let n = bt(e);
1204
- if (n.length > 0) {
1205
- n[0].focus();
1206
- return;
1207
- }
1208
- e.focus?.();
1209
- } catch {}
1210
- }
1211
- function St(e, t = {}) {
1212
- let n = typeof document < "u" ? document.activeElement : null, r = t.wrap ?? !0, i = (n) => {
1213
- if (n.key === "Escape") {
1214
- t.onEscape?.();
1215
- return;
1216
- }
1217
- if (n.key !== "Tab") return;
1218
- let i = bt(e);
1219
- if (!i.length) {
1220
- if (!r) return;
1221
- n.preventDefault(), e.focus?.();
1222
- return;
1223
- }
1224
- let a = document.activeElement, o = i.indexOf(a || i[0]);
1225
- if (n.shiftKey) {
1226
- o <= 0 && (r ? (n.preventDefault(), i[i.length - 1].focus()) : t.onTabExit?.("backward", n));
1227
- return;
1228
- }
1229
- o === i.length - 1 && (r ? (n.preventDefault(), i[0].focus()) : t.onTabExit?.("forward", n));
1230
- };
1231
- return queueMicrotask(() => xt(e, t.initialFocus)), e.addEventListener("keydown", i), () => {
1232
- e.removeEventListener("keydown", i);
1233
- try {
1234
- n?.focus?.();
1235
- } catch {}
1236
- };
1237
- }
1238
- //#endregion
1239
- export { vt as a, $e as c, yt as i, Ye as l, G as n, ht as o, K as r, ut as s, St as t };
1240
-
1241
- //# sourceMappingURL=dist-DjmdIRjq.js.map