@enos5/enos-vue-default 1.8.10 → 1.8.12

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 (32) hide show
  1. package/dist/components/CustomSelect.vue.d.ts +27 -0
  2. package/dist/components/InputGroup.vue.d.ts +27 -0
  3. package/dist/components/SelectInput.vue.d.ts +27 -0
  4. package/dist/{index-Bsqrrc8R.js → index-6eLEqodC.js} +4 -35
  5. package/dist/index-6eLEqodC.js.map +1 -0
  6. package/dist/{index-BR_u7CCm.js → index-BHTvTOGk.js} +2 -4
  7. package/dist/{index-BR_u7CCm.js.map → index-BHTvTOGk.js.map} +1 -1
  8. package/dist/{index-ukywSRmc.js → index-BPcdR1qv.js} +9 -10
  9. package/dist/index-BPcdR1qv.js.map +1 -0
  10. package/dist/{index-BBGZQp5w.js → index-Ch9hFG6f.js} +6 -17
  11. package/dist/{index-BBGZQp5w.js.map → index-Ch9hFG6f.js.map} +1 -1
  12. package/dist/index-CiFpmPug.js.map +1 -1
  13. package/dist/{index-CuSlJQwq.js → index-Cjhk16SP.js} +8 -10
  14. package/dist/index-Cjhk16SP.js.map +1 -0
  15. package/dist/{index-D72Leh_x.js → index-D7sesyMc.js} +4 -4
  16. package/dist/{index-D72Leh_x.js.map → index-D7sesyMc.js.map} +1 -1
  17. package/dist/{index-1G1T4Qrv.js → index-G1cAlO5C.js} +203 -373
  18. package/dist/index-G1cAlO5C.js.map +1 -0
  19. package/dist/index.js +1 -1
  20. package/dist/index.node.js +1 -1
  21. package/dist/{plugin-m8XaPTjJ.js → plugin-BB5Wpvyp.js} +314 -52
  22. package/dist/plugin-BB5Wpvyp.js.map +1 -0
  23. package/dist/styles.css +156 -1598
  24. package/dist/{tinymce-Dg510HCs.js → tinymce-WPdeGquX.js} +388 -659
  25. package/dist/tinymce-WPdeGquX.js.map +1 -0
  26. package/package.json +36 -36
  27. package/dist/index-1G1T4Qrv.js.map +0 -1
  28. package/dist/index-Bsqrrc8R.js.map +0 -1
  29. package/dist/index-CuSlJQwq.js.map +0 -1
  30. package/dist/index-ukywSRmc.js.map +0 -1
  31. package/dist/plugin-m8XaPTjJ.js.map +0 -1
  32. package/dist/tinymce-Dg510HCs.js.map +0 -1
@@ -10589,7 +10589,6 @@ function requireTheme() {
10589
10589
  if (extras !== void 0 && extras.onOpen !== void 0) {
10590
10590
  extras.onOpen(component, menu2);
10591
10591
  }
10592
- tieredMenu.repositionMenus(menu2);
10593
10592
  };
10594
10593
  const onClose = (component, menu2) => {
10595
10594
  ariaControls.unlink(hotspot.element);
@@ -10924,7 +10923,7 @@ function requireTheme() {
10924
10923
  },
10925
10924
  domModification: {
10926
10925
  attributes: {
10927
- role: "toolbar"
10926
+ role: "group"
10928
10927
  }
10929
10928
  }
10930
10929
  };
@@ -11700,7 +11699,6 @@ function requireTheme() {
11700
11699
  defaulted("useTabstopAt", always),
11701
11700
  defaulted("firstTabstop", 0),
11702
11701
  defaulted("eventOrder", {}),
11703
- defaultedStringEnum("role", "dialog", ["dialog", "alertdialog"]),
11704
11702
  field("modalBehaviours", [Keying]),
11705
11703
  onKeyboardHandler("onExecute"),
11706
11704
  onStrictKeyboardHandler("onEscape")
@@ -11834,7 +11832,7 @@ function requireTheme() {
11834
11832
  eventOrder,
11835
11833
  domModification: {
11836
11834
  attributes: {
11837
- "role": detail.role,
11835
+ "role": "dialog",
11838
11836
  "aria-modal": "true"
11839
11837
  }
11840
11838
  },
@@ -11854,12 +11852,10 @@ function requireTheme() {
11854
11852
  runOnAttached((c) => {
11855
11853
  const titleElm = getPartOrDie(c, detail, "title").element;
11856
11854
  const title2 = get$6(titleElm);
11857
- if (isNonNullable(title2) && title2 !== "") {
11858
- if (browser2.os.isMacOS()) {
11859
- set$9(c.element, "aria-label", title2);
11860
- } else {
11861
- labelledBy(c.element, titleElm);
11862
- }
11855
+ if (browser2.os.isMacOS() && isNonNullable(title2)) {
11856
+ set$9(c.element, "aria-label", title2);
11857
+ } else {
11858
+ labelledBy(c.element, titleElm);
11863
11859
  }
11864
11860
  })
11865
11861
  ])
@@ -12875,7 +12871,7 @@ function requireTheme() {
12875
12871
  ]),
12876
12872
  domModification: {
12877
12873
  attributes: {
12878
- role: "group"
12874
+ role: "toolbar"
12879
12875
  }
12880
12876
  }
12881
12877
  });
@@ -13965,9 +13961,6 @@ function requireTheme() {
13965
13961
  registerOption("sidebar_show", {
13966
13962
  processor: "string"
13967
13963
  });
13968
- registerOption("view_show", {
13969
- processor: "string"
13970
- });
13971
13964
  registerOption("help_accessibility", {
13972
13965
  processor: "boolean",
13973
13966
  default: editor.hasPlugin("help")
@@ -14013,7 +14006,6 @@ function requireTheme() {
14013
14006
  const getResize = option$2("resize");
14014
14007
  const getPasteAsText = option$2("paste_as_text");
14015
14008
  const getSidebarShow = option$2("sidebar_show");
14016
- const getViewShow = option$2("view_show");
14017
14009
  const promotionEnabled = option$2("promotion");
14018
14010
  const useHelpAccessibility = option$2("help_accessibility");
14019
14011
  const getDefaultFontStack = option$2("default_font_stack");
@@ -14140,7 +14132,6 @@ function requireTheme() {
14140
14132
  getResize,
14141
14133
  getPasteAsText,
14142
14134
  getSidebarShow,
14143
- getViewShow,
14144
14135
  useHelpAccessibility,
14145
14136
  getDefaultFontStack
14146
14137
  });
@@ -14177,49 +14168,22 @@ function requireTheme() {
14177
14168
  ];
14178
14169
  return sc.isFullscreen() ? win() : constrainByMany(box$1(sc.element), scrollableBoxes);
14179
14170
  };
14180
- function _arrayLikeToArray(r2, a) {
14181
- (null == a || a > r2.length) && (a = r2.length);
14182
- for (var e = 0, n = Array(a); e < a; e++) n[e] = r2[e];
14183
- return n;
14184
- }
14185
- function _arrayWithHoles(r2) {
14186
- if (Array.isArray(r2)) return r2;
14187
- }
14188
- function _iterableToArrayLimit(r2, l2) {
14189
- var t2 = null == r2 ? null : "undefined" != typeof Symbol && r2[Symbol.iterator] || r2["@@iterator"];
14190
- if (null != t2) {
14191
- var e, n, i, u, a = [], f2 = true, o = false;
14192
- try {
14193
- if (i = (t2 = t2.call(r2)).next, 0 === l2) ;
14194
- else for (; !(f2 = (e = i.call(t2)).done) && (a.push(e.value), a.length !== l2); f2 = true) ;
14195
- } catch (r3) {
14196
- o = true, n = r3;
14197
- } finally {
14198
- try {
14199
- if (!f2 && null != t2.return && (u = t2.return(), Object(u) !== u)) return;
14200
- } finally {
14201
- if (o) throw n;
14202
- }
14203
- }
14204
- return a;
14205
- }
14206
- }
14207
- function _nonIterableRest() {
14208
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14209
- }
14210
- function _slicedToArray(r2, e) {
14211
- return _arrayWithHoles(r2) || _iterableToArrayLimit(r2, e) || _unsupportedIterableToArray(r2, e) || _nonIterableRest();
14212
- }
14213
- function _unsupportedIterableToArray(r2, a) {
14214
- if (r2) {
14215
- if ("string" == typeof r2) return _arrayLikeToArray(r2, a);
14216
- var t2 = {}.toString.call(r2).slice(8, -1);
14217
- return "Object" === t2 && r2.constructor && (t2 = r2.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r2) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray(r2, a) : void 0;
14218
- }
14219
- }
14220
- const entries = Object.entries, setPrototypeOf = Object.setPrototypeOf, isFrozen = Object.isFrozen, getPrototypeOf = Object.getPrototypeOf, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
14221
- let freeze = Object.freeze, seal = Object.seal, create$1 = Object.create;
14222
- let _ref = typeof Reflect !== "undefined" && Reflect, apply = _ref.apply, construct = _ref.construct;
14171
+ const {
14172
+ entries,
14173
+ setPrototypeOf,
14174
+ isFrozen,
14175
+ getPrototypeOf,
14176
+ getOwnPropertyDescriptor
14177
+ } = Object;
14178
+ let {
14179
+ freeze,
14180
+ seal,
14181
+ create: create$1
14182
+ } = Object;
14183
+ let {
14184
+ apply,
14185
+ construct
14186
+ } = typeof Reflect !== "undefined" && Reflect;
14223
14187
  if (!freeze) {
14224
14188
  freeze = function freeze2(x) {
14225
14189
  return x;
@@ -14231,18 +14195,12 @@ function requireTheme() {
14231
14195
  };
14232
14196
  }
14233
14197
  if (!apply) {
14234
- apply = function apply2(func, thisArg) {
14235
- for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
14236
- args[_key - 2] = arguments[_key];
14237
- }
14238
- return func.apply(thisArg, args);
14198
+ apply = function apply2(fun, thisValue, args) {
14199
+ return fun.apply(thisValue, args);
14239
14200
  };
14240
14201
  }
14241
14202
  if (!construct) {
14242
- construct = function construct2(Func) {
14243
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
14244
- args[_key2 - 1] = arguments[_key2];
14245
- }
14203
+ construct = function construct2(Func, args) {
14246
14204
  return new Func(...args);
14247
14205
  };
14248
14206
  }
@@ -14251,19 +14209,13 @@ function requireTheme() {
14251
14209
  const arrayPop = unapply(Array.prototype.pop);
14252
14210
  const arrayPush = unapply(Array.prototype.push);
14253
14211
  const arraySplice = unapply(Array.prototype.splice);
14254
- const arrayIsArray = Array.isArray;
14255
14212
  const stringToLowerCase = unapply(String.prototype.toLowerCase);
14256
14213
  const stringToString = unapply(String.prototype.toString);
14257
14214
  const stringMatch = unapply(String.prototype.match);
14258
14215
  const stringReplace = unapply(String.prototype.replace);
14259
14216
  const stringIndexOf = unapply(String.prototype.indexOf);
14260
14217
  const stringTrim = unapply(String.prototype.trim);
14261
- const numberToString = unapply(Number.prototype.toString);
14262
- const booleanToString = unapply(Boolean.prototype.toString);
14263
- const bigintToString = typeof BigInt === "undefined" ? null : unapply(BigInt.prototype.toString);
14264
- const symbolToString = typeof Symbol === "undefined" ? null : unapply(Symbol.prototype.toString);
14265
14218
  const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
14266
- const objectToString = unapply(Object.prototype.toString);
14267
14219
  const regExpTest = unapply(RegExp.prototype.test);
14268
14220
  const typeErrorCreate = unconstruct(TypeError);
14269
14221
  function unapply(func) {
@@ -14271,18 +14223,18 @@ function requireTheme() {
14271
14223
  if (thisArg instanceof RegExp) {
14272
14224
  thisArg.lastIndex = 0;
14273
14225
  }
14274
- for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
14275
- args[_key3 - 1] = arguments[_key3];
14226
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
14227
+ args[_key - 1] = arguments[_key];
14276
14228
  }
14277
14229
  return apply(func, thisArg, args);
14278
14230
  };
14279
14231
  }
14280
- function unconstruct(Func) {
14232
+ function unconstruct(func) {
14281
14233
  return function() {
14282
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
14283
- args[_key4] = arguments[_key4];
14234
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
14235
+ args[_key2] = arguments[_key2];
14284
14236
  }
14285
- return construct(Func, args);
14237
+ return construct(func, args);
14286
14238
  };
14287
14239
  }
14288
14240
  function addToSet(set2, array) {
@@ -14290,9 +14242,6 @@ function requireTheme() {
14290
14242
  if (setPrototypeOf) {
14291
14243
  setPrototypeOf(set2, null);
14292
14244
  }
14293
- if (!arrayIsArray(array)) {
14294
- return set2;
14295
- }
14296
14245
  let l2 = array.length;
14297
14246
  while (l2--) {
14298
14247
  let element2 = array[l2];
@@ -14320,13 +14269,10 @@ function requireTheme() {
14320
14269
  }
14321
14270
  function clone(object) {
14322
14271
  const newObject = create$1(null);
14323
- for (const _ref2 of entries(object)) {
14324
- var _ref3 = _slicedToArray(_ref2, 2);
14325
- const property = _ref3[0];
14326
- const value2 = _ref3[1];
14272
+ for (const [property, value2] of entries(object)) {
14327
14273
  const isPropertyExist = objectHasOwnProperty(object, property);
14328
14274
  if (isPropertyExist) {
14329
- if (arrayIsArray(value2)) {
14275
+ if (Array.isArray(value2)) {
14330
14276
  newObject[property] = cleanArray(value2);
14331
14277
  } else if (value2 && typeof value2 === "object" && value2.constructor === Object) {
14332
14278
  newObject[property] = clone(value2);
@@ -14337,44 +14283,6 @@ function requireTheme() {
14337
14283
  }
14338
14284
  return newObject;
14339
14285
  }
14340
- function stringifyValue(value2) {
14341
- switch (typeof value2) {
14342
- case "string": {
14343
- return value2;
14344
- }
14345
- case "number": {
14346
- return numberToString(value2);
14347
- }
14348
- case "boolean": {
14349
- return booleanToString(value2);
14350
- }
14351
- case "bigint": {
14352
- return bigintToString ? bigintToString(value2) : "0";
14353
- }
14354
- case "symbol": {
14355
- return symbolToString ? symbolToString(value2) : "Symbol()";
14356
- }
14357
- case "undefined": {
14358
- return objectToString(value2);
14359
- }
14360
- case "function":
14361
- case "object": {
14362
- if (value2 === null) {
14363
- return objectToString(value2);
14364
- }
14365
- const valueAsRecord = value2;
14366
- const valueToString = lookupGetter(valueAsRecord, "toString");
14367
- if (typeof valueToString === "function") {
14368
- const stringified = valueToString(valueAsRecord);
14369
- return typeof stringified === "string" ? stringified : objectToString(stringified);
14370
- }
14371
- return objectToString(value2);
14372
- }
14373
- default: {
14374
- return objectToString(value2);
14375
- }
14376
- }
14377
- }
14378
14286
  function lookupGetter(object, prop) {
14379
14287
  while (object !== null) {
14380
14288
  const desc = getOwnPropertyDescriptor(object, prop);
@@ -14393,28 +14301,20 @@ function requireTheme() {
14393
14301
  }
14394
14302
  return fallbackValue;
14395
14303
  }
14396
- function isRegex(value2) {
14397
- try {
14398
- regExpTest(value2, "");
14399
- return true;
14400
- } catch (_unused) {
14401
- return false;
14402
- }
14403
- }
14404
- const html$1 = freeze(["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"]);
14405
- const svg$1 = freeze(["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"]);
14304
+ const html$1 = freeze(["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", "section", "select", "shadow", "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"]);
14305
+ const svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
14406
14306
  const svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
14407
14307
  const svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]);
14408
14308
  const mathMl$1 = freeze(["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"]);
14409
14309
  const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
14410
14310
  const text$1 = freeze(["#text"]);
14411
- const html = freeze(["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"]);
14412
- const svg = freeze(["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"]);
14413
- const mathMl = freeze(["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"]);
14311
+ const html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "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", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]);
14312
+ const svg = freeze(["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", "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"]);
14313
+ const mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "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"]);
14414
14314
  const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
14415
- const MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g);
14416
- const ERB_EXPR = seal(/<%[\w\W]*|^[\w\W]*%>/g);
14417
- const TMPLIT_EXPR = seal(/\${[\w\W]*/g);
14315
+ const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
14316
+ const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
14317
+ const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm);
14418
14318
  const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
14419
14319
  const ARIA_ATTR = seal(/^aria-[\-\w]+$/);
14420
14320
  const IS_ALLOWED_URI = seal(
@@ -14428,6 +14328,19 @@ function requireTheme() {
14428
14328
  );
14429
14329
  const DOCTYPE_NAME = seal(/^html$/i);
14430
14330
  const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
14331
+ var EXPRESSIONS = /* @__PURE__ */ Object.freeze({
14332
+ __proto__: null,
14333
+ ARIA_ATTR,
14334
+ ATTR_WHITESPACE,
14335
+ CUSTOM_ELEMENT,
14336
+ DATA_ATTR,
14337
+ DOCTYPE_NAME,
14338
+ ERB_EXPR,
14339
+ IS_ALLOWED_URI,
14340
+ IS_SCRIPT_OR_DATA,
14341
+ MUSTACHE_EXPR,
14342
+ TMPLIT_EXPR
14343
+ });
14431
14344
  const NODE_TYPE = {
14432
14345
  element: 1,
14433
14346
  text: 3,
@@ -14479,23 +14392,34 @@ function requireTheme() {
14479
14392
  function createDOMPurify() {
14480
14393
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
14481
14394
  const DOMPurify = (root) => createDOMPurify(root);
14482
- DOMPurify.version = "3.4.5";
14395
+ DOMPurify.version = "3.2.6";
14483
14396
  DOMPurify.removed = [];
14484
14397
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
14485
14398
  DOMPurify.isSupported = false;
14486
14399
  return DOMPurify;
14487
14400
  }
14488
- let document2 = window2.document;
14401
+ let {
14402
+ document: document2
14403
+ } = window2;
14489
14404
  const originalDocument = document2;
14490
14405
  const currentScript = originalDocument.currentScript;
14491
- const DocumentFragment = window2.DocumentFragment, HTMLTemplateElement = window2.HTMLTemplateElement, Node = window2.Node, Element = window2.Element, NodeFilter = window2.NodeFilter, _window$NamedNodeMap = window2.NamedNodeMap, NamedNodeMap = _window$NamedNodeMap === void 0 ? window2.NamedNodeMap || window2.MozNamedAttrMap : _window$NamedNodeMap, HTMLFormElement = window2.HTMLFormElement, DOMParser = window2.DOMParser, trustedTypes = window2.trustedTypes;
14406
+ const {
14407
+ DocumentFragment,
14408
+ HTMLTemplateElement,
14409
+ Node,
14410
+ Element,
14411
+ NodeFilter,
14412
+ NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap,
14413
+ HTMLFormElement,
14414
+ DOMParser,
14415
+ trustedTypes
14416
+ } = window2;
14492
14417
  const ElementPrototype = Element.prototype;
14493
14418
  const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
14494
14419
  const remove2 = lookupGetter(ElementPrototype, "remove");
14495
14420
  const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
14496
14421
  const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
14497
14422
  const getParentNode = lookupGetter(ElementPrototype, "parentNode");
14498
- const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeType") : null;
14499
14423
  if (typeof HTMLTemplateElement === "function") {
14500
14424
  const template = document2.createElement("template");
14501
14425
  if (template.content && template.content.ownerDocument) {
@@ -14504,12 +14428,30 @@ function requireTheme() {
14504
14428
  }
14505
14429
  let trustedTypesPolicy;
14506
14430
  let emptyHTML = "";
14507
- const _document = document2, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;
14508
- const importNode = originalDocument.importNode;
14431
+ const {
14432
+ implementation,
14433
+ createNodeIterator,
14434
+ createDocumentFragment,
14435
+ getElementsByTagName
14436
+ } = document2;
14437
+ const {
14438
+ importNode
14439
+ } = originalDocument;
14509
14440
  let hooks = _createHooksMap();
14510
14441
  DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
14511
- const MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, TMPLIT_EXPR$1 = TMPLIT_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE, CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;
14512
- let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
14442
+ const {
14443
+ MUSTACHE_EXPR: MUSTACHE_EXPR2,
14444
+ ERB_EXPR: ERB_EXPR2,
14445
+ TMPLIT_EXPR: TMPLIT_EXPR2,
14446
+ DATA_ATTR: DATA_ATTR2,
14447
+ ARIA_ATTR: ARIA_ATTR2,
14448
+ IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2,
14449
+ ATTR_WHITESPACE: ATTR_WHITESPACE2,
14450
+ CUSTOM_ELEMENT: CUSTOM_ELEMENT2
14451
+ } = EXPRESSIONS;
14452
+ let {
14453
+ IS_ALLOWED_URI: IS_ALLOWED_URI$1
14454
+ } = EXPRESSIONS;
14513
14455
  let ALLOWED_TAGS = null;
14514
14456
  const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text$1]);
14515
14457
  let ALLOWED_ATTR = null;
@@ -14536,20 +14478,6 @@ function requireTheme() {
14536
14478
  }));
14537
14479
  let FORBID_TAGS = null;
14538
14480
  let FORBID_ATTR = null;
14539
- const EXTRA_ELEMENT_HANDLING = Object.seal(create$1(null, {
14540
- tagCheck: {
14541
- writable: true,
14542
- configurable: false,
14543
- enumerable: true,
14544
- value: null
14545
- },
14546
- attributeCheck: {
14547
- writable: true,
14548
- configurable: false,
14549
- enumerable: true,
14550
- value: null
14551
- }
14552
- }));
14553
14481
  let ALLOW_ARIA_ATTR = true;
14554
14482
  let ALLOW_DATA_ATTR = true;
14555
14483
  let ALLOW_UNKNOWN_PROTOCOLS = false;
@@ -14605,15 +14533,15 @@ function requireTheme() {
14605
14533
  PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
14606
14534
  SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
14607
14535
  transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
14608
- ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") && arrayIsArray(cfg.ALLOWED_TAGS) ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
14609
- ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") && arrayIsArray(cfg.ALLOWED_ATTR) ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
14610
- ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") && arrayIsArray(cfg.ALLOWED_NAMESPACES) ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
14611
- URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR) ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
14612
- DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") && arrayIsArray(cfg.ADD_DATA_URI_TAGS) ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
14613
- FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS) ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
14614
- FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") && arrayIsArray(cfg.FORBID_TAGS) ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
14615
- FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") && arrayIsArray(cfg.FORBID_ATTR) ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
14616
- USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === "object" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
14536
+ ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
14537
+ ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
14538
+ ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
14539
+ URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
14540
+ DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
14541
+ FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
14542
+ FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
14543
+ FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
14544
+ USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES : false;
14617
14545
  ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
14618
14546
  ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
14619
14547
  ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
@@ -14629,20 +14557,19 @@ function requireTheme() {
14629
14557
  SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
14630
14558
  KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
14631
14559
  IN_PLACE = cfg.IN_PLACE || false;
14632
- IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;
14633
- NAMESPACE = typeof cfg.NAMESPACE === "string" ? cfg.NAMESPACE : HTML_NAMESPACE;
14634
- MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "MATHML_TEXT_INTEGRATION_POINTS") && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === "object" ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
14635
- HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, "HTML_INTEGRATION_POINTS") && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === "object" ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, ["annotation-xml"]);
14636
- const customElementHandling = objectHasOwnProperty(cfg, "CUSTOM_ELEMENT_HANDLING") && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === "object" ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create$1(null);
14637
- CUSTOM_ELEMENT_HANDLING = create$1(null);
14638
- if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) {
14639
- CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
14560
+ IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
14561
+ NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
14562
+ MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
14563
+ HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
14564
+ CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
14565
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
14566
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
14640
14567
  }
14641
- if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) {
14642
- CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
14568
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
14569
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
14643
14570
  }
14644
- if (objectHasOwnProperty(customElementHandling, "allowCustomizedBuiltInElements") && typeof customElementHandling.allowCustomizedBuiltInElements === "boolean") {
14645
- CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;
14571
+ if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") {
14572
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
14646
14573
  }
14647
14574
  if (SAFE_FOR_TEMPLATES) {
14648
14575
  ALLOW_DATA_ATTR = false;
@@ -14652,7 +14579,7 @@ function requireTheme() {
14652
14579
  }
14653
14580
  if (USE_PROFILES) {
14654
14581
  ALLOWED_TAGS = addToSet({}, text$1);
14655
- ALLOWED_ATTR = create$1(null);
14582
+ ALLOWED_ATTR = [];
14656
14583
  if (USE_PROFILES.html === true) {
14657
14584
  addToSet(ALLOWED_TAGS, html$1);
14658
14585
  addToSet(ALLOWED_ATTR, html);
@@ -14673,43 +14600,27 @@ function requireTheme() {
14673
14600
  addToSet(ALLOWED_ATTR, xml);
14674
14601
  }
14675
14602
  }
14676
- EXTRA_ELEMENT_HANDLING.tagCheck = null;
14677
- EXTRA_ELEMENT_HANDLING.attributeCheck = null;
14678
- if (objectHasOwnProperty(cfg, "ADD_TAGS")) {
14679
- if (typeof cfg.ADD_TAGS === "function") {
14680
- EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
14681
- } else if (arrayIsArray(cfg.ADD_TAGS)) {
14682
- if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
14683
- ALLOWED_TAGS = clone(ALLOWED_TAGS);
14684
- }
14685
- addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
14603
+ if (cfg.ADD_TAGS) {
14604
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
14605
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
14686
14606
  }
14607
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
14687
14608
  }
14688
- if (objectHasOwnProperty(cfg, "ADD_ATTR")) {
14689
- if (typeof cfg.ADD_ATTR === "function") {
14690
- EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
14691
- } else if (arrayIsArray(cfg.ADD_ATTR)) {
14692
- if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
14693
- ALLOWED_ATTR = clone(ALLOWED_ATTR);
14694
- }
14695
- addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
14609
+ if (cfg.ADD_ATTR) {
14610
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
14611
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
14696
14612
  }
14613
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
14697
14614
  }
14698
- if (objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {
14615
+ if (cfg.ADD_URI_SAFE_ATTR) {
14699
14616
  addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
14700
14617
  }
14701
- if (objectHasOwnProperty(cfg, "FORBID_CONTENTS") && arrayIsArray(cfg.FORBID_CONTENTS)) {
14618
+ if (cfg.FORBID_CONTENTS) {
14702
14619
  if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
14703
14620
  FORBID_CONTENTS = clone(FORBID_CONTENTS);
14704
14621
  }
14705
14622
  addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
14706
14623
  }
14707
- if (objectHasOwnProperty(cfg, "ADD_FORBID_CONTENTS") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
14708
- if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
14709
- FORBID_CONTENTS = clone(FORBID_CONTENTS);
14710
- }
14711
- addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
14712
- }
14713
14624
  if (KEEP_CONTENT) {
14714
14625
  ALLOWED_TAGS["#text"] = true;
14715
14626
  }
@@ -14870,37 +14781,11 @@ function requireTheme() {
14870
14781
  null
14871
14782
  );
14872
14783
  };
14873
- const _scrubTemplateExpressions = function _scrubTemplateExpressions2(node) {
14874
- node.normalize();
14875
- const walker = createNodeIterator.call(
14876
- node.ownerDocument || node,
14877
- node,
14878
- // eslint-disable-next-line no-bitwise
14879
- NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION,
14880
- null
14881
- );
14882
- let currentNode = walker.nextNode();
14883
- while (currentNode) {
14884
- let data = currentNode.data;
14885
- arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
14886
- data = stringReplace(data, expr, " ");
14887
- });
14888
- currentNode.data = data;
14889
- currentNode = walker.nextNode();
14890
- }
14891
- };
14892
14784
  const _isClobbered = function _isClobbered2(element2) {
14893
14785
  return element2 instanceof HTMLFormElement && (typeof element2.nodeName !== "string" || typeof element2.textContent !== "string" || typeof element2.removeChild !== "function" || !(element2.attributes instanceof NamedNodeMap) || typeof element2.removeAttribute !== "function" || typeof element2.setAttribute !== "function" || typeof element2.namespaceURI !== "string" || typeof element2.insertBefore !== "function" || typeof element2.hasChildNodes !== "function");
14894
14786
  };
14895
14787
  const _isNode = function _isNode2(value2) {
14896
- if (!getNodeType || typeof value2 !== "object" || value2 === null) {
14897
- return false;
14898
- }
14899
- try {
14900
- return typeof getNodeType(value2) === "number";
14901
- } catch (_) {
14902
- return false;
14903
- }
14788
+ return typeof Node === "function" && value2 instanceof Node;
14904
14789
  };
14905
14790
  function _executeHooks(hooks2, currentNode, data) {
14906
14791
  arrayForEach(hooks2, (hook) => {
@@ -14923,10 +14808,6 @@ function requireTheme() {
14923
14808
  _forceRemove(currentNode);
14924
14809
  return true;
14925
14810
  }
14926
- if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) {
14927
- _forceRemove(currentNode);
14928
- return true;
14929
- }
14930
14811
  if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
14931
14812
  _forceRemove(currentNode);
14932
14813
  return true;
@@ -14935,7 +14816,7 @@ function requireTheme() {
14935
14816
  _forceRemove(currentNode);
14936
14817
  return true;
14937
14818
  }
14938
- if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
14819
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
14939
14820
  if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
14940
14821
  if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
14941
14822
  return false;
@@ -14951,6 +14832,7 @@ function requireTheme() {
14951
14832
  const childCount = childNodes.length;
14952
14833
  for (let i = childCount - 1; i >= 0; --i) {
14953
14834
  const childClone = cloneNode(childNodes[i], true);
14835
+ childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
14954
14836
  parentNode2.insertBefore(childClone, getNextSibling(currentNode));
14955
14837
  }
14956
14838
  }
@@ -14968,7 +14850,7 @@ function requireTheme() {
14968
14850
  }
14969
14851
  if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
14970
14852
  content = currentNode.textContent;
14971
- arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
14853
+ arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
14972
14854
  content = stringReplace(content, expr, " ");
14973
14855
  });
14974
14856
  if (currentNode.textContent !== content) {
@@ -14982,21 +14864,17 @@ function requireTheme() {
14982
14864
  return false;
14983
14865
  };
14984
14866
  const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value2) {
14985
- if (FORBID_ATTR[lcName]) {
14986
- return false;
14987
- }
14988
14867
  if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value2 in document2 || value2 in formElement)) {
14989
14868
  return false;
14990
14869
  }
14991
- const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
14992
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ;
14993
- else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ;
14994
- else if (!nameIsPermitted || FORBID_ATTR[lcName]) {
14870
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName)) ;
14871
+ else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName)) ;
14872
+ else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
14995
14873
  if (
14996
14874
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
14997
14875
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
14998
14876
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
14999
- _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) || // Alternative, second condition checks if it's an `is`-attribute, AND
14877
+ _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND
15000
14878
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
15001
14879
  lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value2) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value2))
15002
14880
  ) ;
@@ -15004,21 +14882,22 @@ function requireTheme() {
15004
14882
  return false;
15005
14883
  }
15006
14884
  } else if (URI_SAFE_ATTRIBUTES[lcName]) ;
15007
- else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value2, ATTR_WHITESPACE$1, ""))) ;
14885
+ else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value2, ATTR_WHITESPACE2, ""))) ;
15008
14886
  else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value2, "data:") === 0 && DATA_URI_TAGS[lcTag]) ;
15009
- else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value2, ATTR_WHITESPACE$1, ""))) ;
14887
+ else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value2, ATTR_WHITESPACE2, ""))) ;
15010
14888
  else if (value2) {
15011
14889
  return false;
15012
14890
  } else ;
15013
14891
  return true;
15014
14892
  };
15015
- const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]);
15016
14893
  const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
15017
- return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
14894
+ return tagName !== "annotation-xml" && stringMatch(tagName, CUSTOM_ELEMENT2);
15018
14895
  };
15019
14896
  const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
15020
14897
  _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
15021
- const attributes = currentNode.attributes;
14898
+ const {
14899
+ attributes
14900
+ } = currentNode;
15022
14901
  if (!attributes || _isClobbered(currentNode)) {
15023
14902
  return;
15024
14903
  }
@@ -15032,7 +14911,11 @@ function requireTheme() {
15032
14911
  let l2 = attributes.length;
15033
14912
  while (l2--) {
15034
14913
  const attr = attributes[l2];
15035
- const name2 = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
14914
+ const {
14915
+ name: name2,
14916
+ namespaceURI,
14917
+ value: attrValue
14918
+ } = attr;
15036
14919
  const lcName = transformCaseFunc(name2);
15037
14920
  const initValue = attrValue;
15038
14921
  let value2 = name2 === "value" ? initValue : stringTrim(initValue);
@@ -15042,15 +14925,11 @@ function requireTheme() {
15042
14925
  hookEvent.forceKeepAttr = void 0;
15043
14926
  _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
15044
14927
  value2 = hookEvent.attrValue;
15045
- if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value2, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
14928
+ if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
15046
14929
  _removeAttribute(name2, currentNode);
15047
14930
  value2 = SANITIZE_NAMED_PROPS_PREFIX + value2;
15048
14931
  }
15049
- if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value2)) {
15050
- _removeAttribute(name2, currentNode);
15051
- continue;
15052
- }
15053
- if (lcName === "attributename" && stringMatch(value2, "href")) {
14932
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value2)) {
15054
14933
  _removeAttribute(name2, currentNode);
15055
14934
  continue;
15056
14935
  }
@@ -15066,7 +14945,7 @@ function requireTheme() {
15066
14945
  continue;
15067
14946
  }
15068
14947
  if (SAFE_FOR_TEMPLATES) {
15069
- arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
14948
+ arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
15070
14949
  value2 = stringReplace(value2, expr, " ");
15071
14950
  });
15072
14951
  }
@@ -15109,7 +14988,7 @@ function requireTheme() {
15109
14988
  }
15110
14989
  _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
15111
14990
  };
15112
- const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
14991
+ const _sanitizeShadowDOM = function _sanitizeShadowDOM2(fragment) {
15113
14992
  let shadowNode = null;
15114
14993
  const shadowIterator = _createNodeIterator(fragment);
15115
14994
  _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
@@ -15123,24 +15002,6 @@ function requireTheme() {
15123
15002
  }
15124
15003
  _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
15125
15004
  };
15126
- const _sanitizeAttachedShadowRoots2 = function _sanitizeAttachedShadowRoots(root) {
15127
- if (root.nodeType === NODE_TYPE.element && root.shadowRoot instanceof DocumentFragment) {
15128
- const sr = root.shadowRoot;
15129
- _sanitizeAttachedShadowRoots2(sr);
15130
- _sanitizeShadowDOM2(sr);
15131
- }
15132
- const childNodes = root.childNodes;
15133
- if (!childNodes) {
15134
- return;
15135
- }
15136
- const snapshot2 = [];
15137
- arrayForEach(childNodes, (child2) => {
15138
- arrayPush(snapshot2, child2);
15139
- });
15140
- for (const child2 of snapshot2) {
15141
- _sanitizeAttachedShadowRoots2(child2);
15142
- }
15143
- };
15144
15005
  DOMPurify.sanitize = function(dirty) {
15145
15006
  let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
15146
15007
  let body2 = null;
@@ -15152,9 +15013,13 @@ function requireTheme() {
15152
15013
  dirty = "<!-->";
15153
15014
  }
15154
15015
  if (typeof dirty !== "string" && !_isNode(dirty)) {
15155
- dirty = stringifyValue(dirty);
15156
- if (typeof dirty !== "string") {
15157
- throw typeErrorCreate("dirty is not a string, aborting");
15016
+ if (typeof dirty.toString === "function") {
15017
+ dirty = dirty.toString();
15018
+ if (typeof dirty !== "string") {
15019
+ throw typeErrorCreate("dirty is not a string, aborting");
15020
+ }
15021
+ } else {
15022
+ throw typeErrorCreate("toString is not a function");
15158
15023
  }
15159
15024
  }
15160
15025
  if (!DOMPurify.isSupported) {
@@ -15168,15 +15033,13 @@ function requireTheme() {
15168
15033
  IN_PLACE = false;
15169
15034
  }
15170
15035
  if (IN_PLACE) {
15171
- const nn = dirty.nodeName;
15172
- if (typeof nn === "string") {
15173
- const tagName = transformCaseFunc(nn);
15036
+ if (dirty.nodeName) {
15037
+ const tagName = transformCaseFunc(dirty.nodeName);
15174
15038
  if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
15175
15039
  throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
15176
15040
  }
15177
15041
  }
15178
- _sanitizeAttachedShadowRoots2(dirty);
15179
- } else if (_isNode(dirty)) {
15042
+ } else if (dirty instanceof Node) {
15180
15043
  body2 = _initDocument("<!---->");
15181
15044
  importedNode = body2.ownerDocument.importNode(dirty, true);
15182
15045
  if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") {
@@ -15186,7 +15049,6 @@ function requireTheme() {
15186
15049
  } else {
15187
15050
  body2.appendChild(importedNode);
15188
15051
  }
15189
- _sanitizeAttachedShadowRoots2(importedNode);
15190
15052
  } else {
15191
15053
  if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
15192
15054
  dirty.indexOf("<") === -1) {
@@ -15205,19 +15067,13 @@ function requireTheme() {
15205
15067
  _sanitizeElements(currentNode);
15206
15068
  _sanitizeAttributes(currentNode);
15207
15069
  if (currentNode.content instanceof DocumentFragment) {
15208
- _sanitizeShadowDOM2(currentNode.content);
15070
+ _sanitizeShadowDOM(currentNode.content);
15209
15071
  }
15210
15072
  }
15211
15073
  if (IN_PLACE) {
15212
- if (SAFE_FOR_TEMPLATES) {
15213
- _scrubTemplateExpressions(dirty);
15214
- }
15215
15074
  return dirty;
15216
15075
  }
15217
15076
  if (RETURN_DOM) {
15218
- if (SAFE_FOR_TEMPLATES) {
15219
- _scrubTemplateExpressions(body2);
15220
- }
15221
15077
  if (RETURN_DOM_FRAGMENT) {
15222
15078
  returnNode = createDocumentFragment.call(body2.ownerDocument);
15223
15079
  while (body2.firstChild) {
@@ -15236,7 +15092,7 @@ function requireTheme() {
15236
15092
  serializedHTML = "<!DOCTYPE " + body2.ownerDocument.doctype.name + ">\n" + serializedHTML;
15237
15093
  }
15238
15094
  if (SAFE_FOR_TEMPLATES) {
15239
- arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
15095
+ arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
15240
15096
  serializedHTML = stringReplace(serializedHTML, expr, " ");
15241
15097
  });
15242
15098
  }
@@ -16381,8 +16237,7 @@ function requireTheme() {
16381
16237
  optionString("dropAreaLabel"),
16382
16238
  optionString("buttonLabel"),
16383
16239
  optionString("allowedFileTypes"),
16384
- optionArrayOf("allowedFileExtensions", string),
16385
- defaultedFunction("onInvalidFiles", () => Promise.resolve())
16240
+ optionArrayOf("allowedFileExtensions", string)
16386
16241
  ]);
16387
16242
  const dropZoneSchema = objOf(dropZoneFields);
16388
16243
  const dropZoneDataProcessor = arrOfVal();
@@ -20193,14 +20048,8 @@ function requireTheme() {
20193
20048
  };
20194
20049
  const handleFiles = (component, files) => {
20195
20050
  if (files) {
20196
- const filteredFiles = filterByExtension(files, providersBackstage, spec.allowedFileExtensions);
20197
- Representing.setValue(component, filteredFiles);
20051
+ Representing.setValue(component, filterByExtension(files, providersBackstage, spec.allowedFileExtensions));
20198
20052
  emitWith(component, formChangeEvent, { name: spec.name });
20199
- if (filteredFiles.length === 0) {
20200
- spec.onInvalidFiles().finally(() => {
20201
- component.element.dom.focus();
20202
- }).catch(noop);
20203
- }
20204
20053
  }
20205
20054
  };
20206
20055
  const memInput = record({
@@ -24102,7 +23951,7 @@ function requireTheme() {
24102
23951
  });
24103
23952
  };
24104
23953
  const renderToolbarGroupCommon = (toolbarGroup) => {
24105
- const attributes = toolbarGroup.label.or(toolbarGroup.title).fold(() => ({}), (label2) => ({ attributes: { "aria-label": label2 } }));
23954
+ const attributes = toolbarGroup.label.isNone() ? toolbarGroup.title.fold(() => ({}), (title2) => ({ attributes: { "aria-label": title2 } })) : toolbarGroup.label.fold(() => ({}), (label2) => ({ attributes: { "aria-label": label2 } }));
24106
23955
  return {
24107
23956
  dom: {
24108
23957
  tag: "div",
@@ -24667,14 +24516,10 @@ function requireTheme() {
24667
24516
  SilverMenubar.focus(menubar);
24668
24517
  });
24669
24518
  },
24670
- setViews: (comp, viewConfigs, showView) => {
24519
+ setViews: (comp, viewConfigs) => {
24671
24520
  parts$g.getPart(comp, detail, "viewWrapper").each((wrapper) => {
24672
24521
  ViewWrapper.setViews(wrapper, viewConfigs);
24673
24522
  });
24674
- const configKey = showView?.toLowerCase();
24675
- if (isString(configKey) && has$2(viewConfigs, configKey)) {
24676
- apis.toggleView(comp, configKey);
24677
- }
24678
24523
  },
24679
24524
  toggleView: (comp, name2) => {
24680
24525
  return parts$g.getPart(comp, detail, "viewWrapper").exists((wrapper) => ViewWrapper.toggleView(wrapper, () => apis.showMainView(comp), () => apis.hideMainView(comp), name2));
@@ -24932,8 +24777,8 @@ function requireTheme() {
24932
24777
  focusToolbar: (apis, comp) => {
24933
24778
  apis.focusToolbar(comp);
24934
24779
  },
24935
- setViews: (apis, comp, views, showView) => {
24936
- apis.setViews(comp, views, showView);
24780
+ setViews: (apis, comp, views) => {
24781
+ apis.setViews(comp, views);
24937
24782
  },
24938
24783
  toggleView: (apis, comp, name2) => {
24939
24784
  return apis.toggleView(comp, name2);
@@ -24950,7 +24795,7 @@ function requireTheme() {
24950
24795
  view: { title: "View", items: "code suggestededits revisionhistory | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments" },
24951
24796
  insert: { title: "Insert", items: "image video link media addcomment pageembed inserttemplate codesample inserttable accordion math | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime" },
24952
24797
  format: { title: "Format", items: "bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat" },
24953
- tools: { title: "Tools", items: "tinymceai-chat tinymceai-review tinymceai-quickactions aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate" },
24798
+ tools: { title: "Tools", items: "aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate" },
24954
24799
  table: { title: "Table", items: "inserttable | cell row column | advtablesort | tableprops deletetable" },
24955
24800
  help: { title: "Help", items: "help" }
24956
24801
  };
@@ -25081,17 +24926,22 @@ function requireTheme() {
25081
24926
  const loadUiContentCSS = (editor, isInline, skinUrl) => {
25082
24927
  const filenameBase = isInline ? "content.inline" : "content";
25083
24928
  const decision = determineCSSDecision(editor, filenameBase, skinUrl);
25084
- if (!skinUrl) {
25085
- return Promise.resolve();
25086
- }
25087
24929
  switch (decision._kind) {
25088
24930
  case "load-raw":
25089
- const { key } = decision;
25090
- editor.contentCSS.push(key);
24931
+ const { key, css } = decision;
24932
+ if (isInline) {
24933
+ loadRawCss(editor, key, css, editor.ui.styleSheetLoader);
24934
+ } else {
24935
+ editor.on("PostRender", () => {
24936
+ loadRawCss(editor, key, css, editor.dom.styleSheetLoader);
24937
+ });
24938
+ }
25091
24939
  return Promise.resolve();
25092
24940
  case "load-stylesheet":
25093
24941
  const { url: url2 } = decision;
25094
- editor.contentCSS.push(url2);
24942
+ if (skinUrl) {
24943
+ editor.contentCSS.push(url2);
24944
+ }
25095
24945
  return Promise.resolve();
25096
24946
  default:
25097
24947
  return Promise.resolve();
@@ -26336,7 +26186,7 @@ function requireTheme() {
26336
26186
  },
26337
26187
  {
26338
26188
  name: "ai",
26339
- items: ["tinymceai-chat", "tinymceai-review", "tinymceai-quickactions", "aidialog", "aishortcuts"]
26189
+ items: ["aidialog", "aishortcuts"]
26340
26190
  },
26341
26191
  {
26342
26192
  name: "styles",
@@ -26544,8 +26394,8 @@ function requireTheme() {
26544
26394
  attachUiMotherships(editor, uiRoot, uiRefs);
26545
26395
  editor.on("PostRender", () => {
26546
26396
  OuterContainer.setSidebar(outerContainer, rawUiConfig.sidebar, getSidebarShow(editor));
26547
- OuterContainer.setViews(outerContainer, rawUiConfig.views, getViewShow(editor));
26548
- }, true);
26397
+ OuterContainer.setViews(outerContainer, rawUiConfig.views);
26398
+ });
26549
26399
  editor.on("SkinLoaded", () => {
26550
26400
  setToolbar(editor, uiRefs, rawUiConfig, backstage);
26551
26401
  lastToolbarWidth.set(editor.getWin().innerWidth);
@@ -28976,8 +28826,7 @@ function requireTheme() {
28976
28826
  tag: "div",
28977
28827
  classes: ["tox-statusbar__path"],
28978
28828
  attributes: {
28979
- "role": "group",
28980
- "aria-label": providersBackstage.translate("Element Path")
28829
+ role: "navigation"
28981
28830
  }
28982
28831
  },
28983
28832
  behaviours: derive$1([
@@ -30116,7 +29965,6 @@ function requireTheme() {
30116
29965
  const blockerBackdropClass = blockerClass + "__backdrop";
30117
29966
  const scrollLockClass = dialogClass + "__disable-scroll";
30118
29967
  return ModalDialog.sketch({
30119
- role: spec.role,
30120
29968
  lazySink: spec.lazySink,
30121
29969
  onEscape: (comp) => {
30122
29970
  spec.onEscape(comp);
@@ -30370,22 +30218,7 @@ function requireTheme() {
30370
30218
  }
30371
30219
  return acc;
30372
30220
  }, {});
30373
- const focusFirstTabbable = (getSink2, component) => {
30374
- const focusIn2 = () => component.getSystem().isConnected() ? Keying.focusIn(component) : void 0;
30375
- const isDisabled2 = (focused) => has$1(focused, "disabled") || getOpt(focused, "aria-disabled").exists((val) => val === "true");
30376
- const rootNode = getRootNode(component.element);
30377
- const current = active$1(rootNode);
30378
- active$1(rootNode).fold(focusIn2, (focused) => {
30379
- if (isDisabled2(focused)) {
30380
- focusIn2();
30381
- } else if (current.exists((cur) => contains(focused, cur) && isDisabled2(cur))) {
30382
- focusIn2();
30383
- } else {
30384
- getSink2().toOptional().filter((sink) => !contains(sink.element, focused)).each(focusIn2);
30385
- }
30386
- });
30387
- };
30388
- const initCommonEvents = (fireApiEvent, extras, getSink2) => [
30221
+ const initCommonEvents = (fireApiEvent, extras) => [
30389
30222
  // When focus moves onto a tab-placeholder, skip to the next thing in the tab sequence
30390
30223
  runWithTarget(focusin(), onFocus),
30391
30224
  // TODO: Test if disabled first.
@@ -30401,13 +30234,10 @@ function requireTheme() {
30401
30234
  spec.onCancel(api2);
30402
30235
  emit(self2, formCloseEvent);
30403
30236
  }),
30404
- run$1(formUnblockEvent, (component, _se) => {
30405
- extras.onUnblock();
30406
- focusFirstTabbable(getSink2, component);
30407
- }),
30237
+ run$1(formUnblockEvent, (_c, _se) => extras.onUnblock()),
30408
30238
  run$1(formBlockEvent, (_c, se) => extras.onBlock(se.event))
30409
30239
  ];
30410
- const initUrlDialog = (getInstanceApi, extras, getSink2) => {
30240
+ const initUrlDialog = (getInstanceApi, extras) => {
30411
30241
  const fireApiEvent = (eventName, f2) => run$1(eventName, (c, se) => {
30412
30242
  withSpec(c, (spec, _c) => {
30413
30243
  f2(getInstanceApi(), spec, se.event, c);
@@ -30419,7 +30249,7 @@ function requireTheme() {
30419
30249
  });
30420
30250
  };
30421
30251
  return [
30422
- ...initCommonEvents(fireApiEvent, extras, getSink2),
30252
+ ...initCommonEvents(fireApiEvent, extras),
30423
30253
  fireApiEvent(formActionEvent, (api2, spec, event) => {
30424
30254
  spec.onAction(api2, { name: event.name });
30425
30255
  })
@@ -30437,14 +30267,26 @@ function requireTheme() {
30437
30267
  });
30438
30268
  };
30439
30269
  return [
30440
- ...initCommonEvents(fireApiEvent, extras, getSink2),
30270
+ ...initCommonEvents(fireApiEvent, extras),
30441
30271
  fireApiEvent(formSubmitEvent, (api2, spec) => spec.onSubmit(api2)),
30442
30272
  fireApiEvent(formChangeEvent, (api2, spec, event) => {
30443
30273
  spec.onChange(api2, { name: event.name });
30444
30274
  }),
30445
30275
  fireApiEvent(formActionEvent, (api2, spec, event, component) => {
30276
+ const focusIn2 = () => component.getSystem().isConnected() ? Keying.focusIn(component) : void 0;
30277
+ const isDisabled2 = (focused) => has$1(focused, "disabled") || getOpt(focused, "aria-disabled").exists((val) => val === "true");
30278
+ const rootNode = getRootNode(component.element);
30279
+ const current = active$1(rootNode);
30446
30280
  spec.onAction(api2, { name: event.name, value: event.value });
30447
- focusFirstTabbable(getSink2, component);
30281
+ active$1(rootNode).fold(focusIn2, (focused) => {
30282
+ if (isDisabled2(focused)) {
30283
+ focusIn2();
30284
+ } else if (current.exists((cur) => contains(focused, cur) && isDisabled2(cur))) {
30285
+ focusIn2();
30286
+ } else {
30287
+ getSink2().toOptional().filter((sink) => !contains(sink.element, focused)).each(focusIn2);
30288
+ }
30289
+ });
30448
30290
  }),
30449
30291
  fireApiEvent(formTabChangeEvent, (api2, spec, event) => {
30450
30292
  spec.onTabChange(api2, { newTabName: event.name, oldTabName: event.oldName });
@@ -30863,7 +30705,7 @@ function requireTheme() {
30863
30705
  return Optional.some(renderModalFooter({ buttons }, dialogId, backstage));
30864
30706
  }
30865
30707
  });
30866
- const dialogEvents = initUrlDialog(() => instanceApi, getEventExtras(() => dialog, backstage.shared.providers, extra), backstage.shared.getSink);
30708
+ const dialogEvents = initUrlDialog(() => instanceApi, getEventExtras(() => dialog, backstage.shared.providers, extra));
30867
30709
  const styles = {
30868
30710
  ...internalDialog.height.fold(() => ({}), (height2) => ({ "height": height2 + "px", "max-height": height2 + "px" })),
30869
30711
  ...internalDialog.width.fold(() => ({}), (width2) => ({ "width": width2 + "px", "max-width": width2 + "px" }))
@@ -30951,7 +30793,6 @@ function requireTheme() {
30951
30793
  const titleSpec = pUntitled();
30952
30794
  const closeSpec = pClose(closeDialog, sharedBackstage.providers);
30953
30795
  const alertDialog = build$1(renderDialog$1({
30954
- role: "alertdialog",
30955
30796
  lazySink: () => sharedBackstage.getSink(),
30956
30797
  header: hiddenHeader(titleSpec, closeSpec),
30957
30798
  body: pBodyMessage(message, sharedBackstage.providers),
@@ -30963,11 +30804,7 @@ function requireTheme() {
30963
30804
  extraBehaviours: [],
30964
30805
  extraStyles: {},
30965
30806
  dialogEvents: [
30966
- run$1(formCancelEvent, closeDialog),
30967
- runOnAttached((c) => {
30968
- const bodyElm = ModalDialog.getBody(c);
30969
- describedBy(c.element, bodyElm.element);
30970
- })
30807
+ run$1(formCancelEvent, closeDialog)
30971
30808
  ],
30972
30809
  eventOrder: {}
30973
30810
  }));
@@ -31009,7 +30846,6 @@ function requireTheme() {
31009
30846
  const titleSpec = pUntitled();
31010
30847
  const closeSpec = pClose(() => closeDialog(false), sharedBackstage.providers);
31011
30848
  const confirmDialog = build$1(renderDialog$1({
31012
- role: "alertdialog",
31013
30849
  lazySink: () => sharedBackstage.getSink(),
31014
30850
  header: hiddenHeader(titleSpec, closeSpec),
31015
30851
  body: pBodyMessage(message, sharedBackstage.providers),
@@ -31023,11 +30859,7 @@ function requireTheme() {
31023
30859
  extraStyles: {},
31024
30860
  dialogEvents: [
31025
30861
  run$1(formCancelEvent, () => closeDialog(false)),
31026
- run$1(formSubmitEvent, () => closeDialog(true)),
31027
- runOnAttached((c) => {
31028
- const bodyElm = ModalDialog.getBody(c);
31029
- describedBy(c.element, bodyElm.element);
31030
- })
30862
+ run$1(formSubmitEvent, () => closeDialog(true))
31031
30863
  ],
31032
30864
  eventOrder: {}
31033
30865
  }));
@@ -31340,13 +31172,11 @@ function requireTheme() {
31340
31172
  const getPromotionElement = () => {
31341
31173
  return descendant(SugarElement.fromDom(editor.getContainer()), ".tox-promotion").map((promotion) => promotion.dom).getOrNull();
31342
31174
  };
31343
- const getSinkElement = (type2) => type2 === "dialog" ? dialogs.getMothership().element.dom : popups.getMothership().element.dom;
31344
31175
  return {
31345
31176
  renderUI,
31346
31177
  getWindowManagerImpl: constant$1(windowMgr),
31347
31178
  getNotificationManagerImpl,
31348
- getPromotionElement,
31349
- getSinkElement
31179
+ getPromotionElement
31350
31180
  };
31351
31181
  });
31352
31182
  };
@@ -31370,4 +31200,4 @@ const index$1 = /* @__PURE__ */ _mergeNamespaces({
31370
31200
  export {
31371
31201
  index$1 as i
31372
31202
  };
31373
- //# sourceMappingURL=index-1G1T4Qrv.js.map
31203
+ //# sourceMappingURL=index-G1cAlO5C.js.map