@kg-ui/kg-ui-plus 0.1.31 → 0.1.32

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 (158) hide show
  1. package/README.md +3 -3
  2. package/dist/es/KgCopilot/CopiCanvas/FilePreview.vue.mjs +7 -0
  3. package/dist/es/KgCopilot/CopiCanvas/FilePreview.vue2.mjs +81 -0
  4. package/dist/es/KgCopilot/CopiCanvas/FilePreview.vue3.mjs +4 -0
  5. package/dist/es/KgCopilot/CopiCanvas/FileSkeletion.vue.mjs +96 -0
  6. package/dist/es/KgCopilot/CopiCanvas/FileSkeletion.vue2.mjs +4 -0
  7. package/dist/es/KgCopilot/CopiCanvas/InitWrap.vue.mjs +7 -0
  8. package/dist/es/KgCopilot/CopiCanvas/InitWrap.vue2.mjs +41 -0
  9. package/dist/es/KgCopilot/CopiCanvas/InitWrap.vue3.mjs +4 -0
  10. package/dist/es/KgCopilot/CopiCanvas/index.vue.mjs +7 -0
  11. package/dist/es/KgCopilot/CopiCanvas/index.vue2.mjs +52 -0
  12. package/dist/es/KgCopilot/CopiCanvas/index.vue3.mjs +4 -0
  13. package/dist/es/KgCopilot/CopiContent/AnswerHead.vue.mjs +1 -1
  14. package/dist/es/KgCopilot/CopiContent/AnswerHead.vue2.mjs +1 -1
  15. package/dist/es/KgCopilot/CopiContent/AnswerHead.vue3.mjs +2 -2
  16. package/dist/es/KgCopilot/CopiContent/UserHead.vue.mjs +2 -2
  17. package/dist/es/KgCopilot/CopiContent/UserHead.vue2.mjs +2 -2
  18. package/dist/es/KgCopilot/CopiFooter/SearchInput/InputFootTool.vue.mjs +7 -0
  19. package/dist/es/KgCopilot/CopiFooter/SearchInput/InputFootTool.vue2.mjs +61 -0
  20. package/dist/es/KgCopilot/CopiFooter/SearchInput/InputFootTool.vue3.mjs +4 -0
  21. package/dist/es/KgCopilot/CopiFooter/SearchInput/NewTheme.vue.mjs +1 -1
  22. package/dist/es/KgCopilot/CopiFooter/SearchInput/NewTheme.vue2.mjs +1 -1
  23. package/dist/es/KgCopilot/CopiFooter/SearchInput/NewTheme.vue3.mjs +2 -2
  24. package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPluginByKey.vue.mjs +1 -1
  25. package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPluginByKey.vue2.mjs +1 -1
  26. package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPluginByKey.vue3.mjs +2 -2
  27. package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue.mjs +1 -1
  28. package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue2.mjs +10 -20
  29. package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue3.mjs +2 -2
  30. package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +1 -1
  31. package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +2 -2
  32. package/dist/es/KgCopilot/dialogue/SuggestMessage.vue.mjs +1 -1
  33. package/dist/es/KgCopilot/dialogue/SuggestMessage.vue2.mjs +1 -1
  34. package/dist/es/KgCopilot/dialogue/SuggestMessage.vue3.mjs +2 -2
  35. package/dist/es/KgCopilot/dialogue/index.vue.mjs +1 -1
  36. package/dist/es/KgCopilot/dialogue/index.vue2.mjs +1 -1
  37. package/dist/es/KgCopilot/dialogue/index.vue3.mjs +2 -2
  38. package/dist/es/KgCopilot/dialogue/messageParse/edit.vue.mjs +1 -1
  39. package/dist/es/KgCopilot/dialogue/messageParse/edit.vue3.mjs +2 -2
  40. package/dist/es/KgCopilot/dialogue/messageParse/fileBox.vue.mjs +19 -5
  41. package/dist/es/KgCopilot/dialogue/messageParse/fileBox.vue2.mjs +2 -2
  42. package/dist/es/KgCopilot/dialogue/messageParse/index.vue.mjs +1 -1
  43. package/dist/es/KgCopilot/dialogue/messageParse/index.vue3.mjs +2 -2
  44. package/dist/es/KgCopilot/dialogue/messageParse/readMd.vue.mjs +1 -1
  45. package/dist/es/KgCopilot/dialogue/messageParse/readMd.vue2.mjs +2 -2
  46. package/dist/es/KgCopilot/dialogue/messageParse/readMd.vue3.mjs +2 -2
  47. package/dist/es/KgCopilot/historyRecord/index.vue.mjs +1 -1
  48. package/dist/es/KgCopilot/historyRecord/index.vue2.mjs +6 -6
  49. package/dist/es/KgCopilot/historyRecord/index.vue3.mjs +2 -2
  50. package/dist/es/KgCopilot/index.vue.mjs +1 -1
  51. package/dist/es/KgCopilot/index.vue2.mjs +61 -38
  52. package/dist/es/KgCopilot/index.vue3.mjs +2 -2
  53. package/dist/es/_virtual/_commonjs-dynamic-modules.mjs +6 -0
  54. package/dist/es/_virtual/jszip.min.mjs +13 -0
  55. package/dist/es/api/copilot.mjs +8 -0
  56. package/dist/es/assets/empty.png.mjs +4 -0
  57. package/dist/es/directives/heighlight/index.mjs +27 -27
  58. package/dist/es/home/LFilter/FilterArea.vue.mjs +1 -1
  59. package/dist/es/home/LFilter/FilterArea.vue2.mjs +1 -1
  60. package/dist/es/home/LFilter/FilterArea.vue3.mjs +2 -2
  61. package/dist/es/home/LFilter/FilterHead.vue.mjs +1 -1
  62. package/dist/es/home/LFilter/FilterItem.vue.mjs +1 -1
  63. package/dist/es/home/LFilter/FilterItem.vue2.mjs +1 -1
  64. package/dist/es/home/LFilter/FilterItem.vue3.mjs +2 -2
  65. package/dist/es/home/LFilter/FilterItemIcon.vue.mjs +1 -1
  66. package/dist/es/home/LFilter/FilterItemIcon.vue2.mjs +1 -1
  67. package/dist/es/home/LFilter/FilterItemIcon.vue3.mjs +2 -2
  68. package/dist/es/home/LProject/index.vue.mjs +1 -1
  69. package/dist/es/home/LProject/index.vue3.mjs +2 -2
  70. package/dist/es/home/index.vue.mjs +1 -1
  71. package/dist/es/home/index.vue3.mjs +2 -2
  72. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.12/node_modules/@iconify-icons/ep/folder-opened.mjs +8 -0
  73. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.12/node_modules/@iconify-icons/ep/notebook.mjs +8 -0
  74. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.12/node_modules/@iconify-icons/ep/reading.mjs +8 -0
  75. package/dist/es/node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.2.45/node_modules/@vueuse/core/index.mjs +8 -1
  76. package/dist/es/node_modules/.pnpm/@vueuse_shared@9.13.0_vue@3.2.45/node_modules/@vueuse/shared/index.mjs +115 -2
  77. package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/actualApply.mjs +12 -0
  78. package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/functionApply.mjs +12 -0
  79. package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/functionCall.mjs +4 -0
  80. package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/index.mjs +17 -0
  81. package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/reflectApply.mjs +4 -0
  82. package/dist/es/node_modules/.pnpm/call-bound@1.0.3/node_modules/call-bound/index.mjs +18 -0
  83. package/dist/es/node_modules/.pnpm/docx-preview@0.3.3/node_modules/docx-preview/dist/docx-preview.mjs +3877 -0
  84. package/dist/es/node_modules/.pnpm/{dompurify@3.0.10 → dompurify@3.2.3}/node_modules/dompurify/dist/purify.es.mjs +119 -91
  85. package/dist/es/node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.mjs +37 -0
  86. package/dist/es/node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.mjs +12 -0
  87. package/dist/es/node_modules/.pnpm/es-object-atoms@1.0.0/node_modules/es-object-atoms/index.mjs +4 -0
  88. package/dist/es/node_modules/.pnpm/{get-intrinsic@1.2.4 → get-intrinsic@1.2.6}/node_modules/get-intrinsic/index.mjs +43 -24
  89. package/dist/es/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.mjs +4 -0
  90. package/dist/es/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.mjs +13 -0
  91. package/dist/es/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.mjs +29 -0
  92. package/dist/es/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.mjs +59 -0
  93. package/dist/es/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +13 -5
  94. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/apache.mjs +4 -0
  95. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/bash.mjs +20 -2
  96. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/basic.mjs +7 -1
  97. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/c.mjs +19 -4
  98. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/css.mjs +214 -8
  99. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/dart.mjs +10 -2
  100. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/erlang.mjs +48 -6
  101. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/go.mjs +23 -3
  102. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/java.mjs +3 -1
  103. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/javascript.mjs +15 -11
  104. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/json.mjs +1 -0
  105. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/markdown.mjs +7 -1
  106. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/php.mjs +16 -2
  107. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/python.mjs +3 -1
  108. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/ruby.mjs +1 -1
  109. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/stylus.mjs +214 -8
  110. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/swift.mjs +60 -14
  111. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/typescript.mjs +45 -18
  112. package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/lib/core.mjs +8 -8
  113. package/dist/es/node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/dist/jszip.min.mjs +2649 -0
  114. package/dist/es/node_modules/.pnpm/{marked@12.0.1 → marked@12.0.2}/node_modules/marked/lib/marked.esm.mjs +2 -1
  115. package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.mjs +4 -0
  116. package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.mjs +4 -0
  117. package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.mjs +4 -0
  118. package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.mjs +4 -0
  119. package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.mjs +4 -0
  120. package/dist/es/node_modules/.pnpm/{object-inspect@1.13.1 → object-inspect@1.13.3}/node_modules/object-inspect/index.mjs +17 -4
  121. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.mjs +1 -1
  122. package/dist/es/node_modules/.pnpm/side-channel-list@1.0.0/node_modules/side-channel-list/index.mjs +92 -0
  123. package/dist/es/node_modules/.pnpm/side-channel-map@1.0.1/node_modules/side-channel-map/index.mjs +56 -0
  124. package/dist/es/node_modules/.pnpm/side-channel-weakmap@1.0.2/node_modules/side-channel-weakmap/index.mjs +74 -0
  125. package/dist/es/node_modules/.pnpm/side-channel@1.1.0/node_modules/side-channel/index.mjs +40 -0
  126. package/dist/es/store/modules/copilot.mjs +41 -9
  127. package/dist/es/style.css +1 -1
  128. package/dist/es/utils/http/index.mjs +1 -1
  129. package/package.json +124 -123
  130. package/dist/es/_virtual/index.mjs +0 -13
  131. package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.mjs +0 -16
  132. package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.mjs +0 -36
  133. package/dist/es/node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.mjs +0 -48
  134. package/dist/es/node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.mjs +0 -22
  135. package/dist/es/node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.mjs +0 -14
  136. package/dist/es/node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.mjs +0 -19
  137. package/dist/es/node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.mjs +0 -11
  138. package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.mjs +0 -21
  139. package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.mjs +0 -48
  140. package/dist/es/node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.mjs +0 -54
  141. package/dist/es/node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.mjs +0 -115
  142. /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/arrow-left.mjs +0 -0
  143. /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/arrow-right.mjs +0 -0
  144. /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/check.mjs +0 -0
  145. /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/close.mjs +0 -0
  146. /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/delete.mjs +0 -0
  147. /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/edit.mjs +0 -0
  148. /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/promotion.mjs +0 -0
  149. /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/search.mjs +0 -0
  150. /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/core.mjs +0 -0
  151. /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/django.mjs +0 -0
  152. /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/dns.mjs +0 -0
  153. /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/dos.mjs +0 -0
  154. /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/dust.mjs +0 -0
  155. /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/http.mjs +0 -0
  156. /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/nginx.mjs +0 -0
  157. /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/xml.mjs +0 -0
  158. /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/styles/sunburst.css.mjs +0 -0
@@ -1,4 +1,4 @@
1
- /*! @license DOMPurify 3.0.10 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.10/LICENSE */
1
+ /*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */
2
2
  const {
3
3
  entries,
4
4
  setPrototypeOf,
@@ -134,14 +134,14 @@ const svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "
134
134
  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"]);
135
135
  const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
136
136
  const text = freeze(["#text"]);
137
- 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", "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", "xmlns", "slot"]);
138
- const svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "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", "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", "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", "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", "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"]);
137
+ 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"]);
138
+ 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"]);
139
139
  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"]);
140
140
  const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
141
141
  const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
142
142
  const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
143
- const TMPLIT_EXPR = seal(/\${[\w\W]*}/gm);
144
- const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/);
143
+ const TMPLIT_EXPR = seal(/\$\{[\w\W]*}/gm);
144
+ const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
145
145
  const ARIA_ATTR = seal(/^aria-[\-\w]+$/);
146
146
  const IS_ALLOWED_URI = seal(
147
147
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
@@ -153,20 +153,37 @@ const ATTR_WHITESPACE = seal(
153
153
  // eslint-disable-line no-control-regex
154
154
  );
155
155
  const DOCTYPE_NAME = seal(/^html$/i);
156
- const CUSTOM_ELEMENT = seal(/^[a-z][a-z\d]*(-[a-z\d]+)+$/i);
156
+ const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
157
157
  var EXPRESSIONS = /* @__PURE__ */ Object.freeze({
158
158
  __proto__: null,
159
- MUSTACHE_EXPR,
160
- ERB_EXPR,
161
- TMPLIT_EXPR,
162
- DATA_ATTR,
163
159
  ARIA_ATTR,
164
- IS_ALLOWED_URI,
165
- IS_SCRIPT_OR_DATA,
166
160
  ATTR_WHITESPACE,
161
+ CUSTOM_ELEMENT,
162
+ DATA_ATTR,
167
163
  DOCTYPE_NAME,
168
- CUSTOM_ELEMENT
164
+ ERB_EXPR,
165
+ IS_ALLOWED_URI,
166
+ IS_SCRIPT_OR_DATA,
167
+ MUSTACHE_EXPR,
168
+ TMPLIT_EXPR
169
169
  });
170
+ const NODE_TYPE = {
171
+ element: 1,
172
+ attribute: 2,
173
+ text: 3,
174
+ cdataSection: 4,
175
+ entityReference: 5,
176
+ // Deprecated
177
+ entityNode: 6,
178
+ // Deprecated
179
+ progressingInstruction: 7,
180
+ comment: 8,
181
+ document: 9,
182
+ documentType: 10,
183
+ documentFragment: 11,
184
+ notation: 12
185
+ // Deprecated
186
+ };
170
187
  const getGlobal = function getGlobal2() {
171
188
  return typeof window === "undefined" ? null : window;
172
189
  };
@@ -194,12 +211,25 @@ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy2(trustedTyp
194
211
  return null;
195
212
  }
196
213
  };
214
+ const _createHooksMap = function _createHooksMap2() {
215
+ return {
216
+ afterSanitizeAttributes: [],
217
+ afterSanitizeElements: [],
218
+ afterSanitizeShadowDOM: [],
219
+ beforeSanitizeAttributes: [],
220
+ beforeSanitizeElements: [],
221
+ beforeSanitizeShadowDOM: [],
222
+ uponSanitizeAttribute: [],
223
+ uponSanitizeElement: [],
224
+ uponSanitizeShadowNode: []
225
+ };
226
+ };
197
227
  function createDOMPurify() {
198
228
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
199
229
  const DOMPurify = (root) => createDOMPurify(root);
200
- DOMPurify.version = "3.0.10";
230
+ DOMPurify.version = "3.2.3";
201
231
  DOMPurify.removed = [];
202
- if (!window2 || !window2.document || window2.document.nodeType !== 9) {
232
+ if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document) {
203
233
  DOMPurify.isSupported = false;
204
234
  return DOMPurify;
205
235
  }
@@ -221,6 +251,7 @@ function createDOMPurify() {
221
251
  } = window2;
222
252
  const ElementPrototype = Element.prototype;
223
253
  const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
254
+ const remove = lookupGetter(ElementPrototype, "remove");
224
255
  const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
225
256
  const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
226
257
  const getParentNode = lookupGetter(ElementPrototype, "parentNode");
@@ -241,7 +272,7 @@ function createDOMPurify() {
241
272
  const {
242
273
  importNode
243
274
  } = originalDocument;
244
- let hooks = {};
275
+ let hooks = _createHooksMap();
245
276
  DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
246
277
  const {
247
278
  MUSTACHE_EXPR: MUSTACHE_EXPR2,
@@ -287,6 +318,7 @@ function createDOMPurify() {
287
318
  let ALLOW_UNKNOWN_PROTOCOLS = false;
288
319
  let ALLOW_SELF_CLOSE_IN_ATTR = true;
289
320
  let SAFE_FOR_TEMPLATES = false;
321
+ let SAFE_FOR_XML = true;
290
322
  let WHOLE_DOCUMENT = false;
291
323
  let SET_CONFIG = false;
292
324
  let FORCE_BODY = false;
@@ -312,6 +344,9 @@ function createDOMPurify() {
312
344
  let IS_EMPTY_INPUT = false;
313
345
  let ALLOWED_NAMESPACES = null;
314
346
  const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
347
+ let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
348
+ let HTML_INTEGRATION_POINTS = addToSet({}, ["annotation-xml"]);
349
+ const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ["title", "style", "font", "a", "script"]);
315
350
  let PARSER_MEDIA_TYPE = null;
316
351
  const SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"];
317
352
  const DEFAULT_PARSER_MEDIA_TYPE = "text/html";
@@ -336,22 +371,8 @@ function createDOMPurify() {
336
371
  ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
337
372
  ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
338
373
  ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
339
- URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") ? addToSet(
340
- clone(DEFAULT_URI_SAFE_ATTRIBUTES),
341
- // eslint-disable-line indent
342
- cfg.ADD_URI_SAFE_ATTR,
343
- // eslint-disable-line indent
344
- transformCaseFunc
345
- // eslint-disable-line indent
346
- ) : DEFAULT_URI_SAFE_ATTRIBUTES;
347
- DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") ? addToSet(
348
- clone(DEFAULT_DATA_URI_TAGS),
349
- // eslint-disable-line indent
350
- cfg.ADD_DATA_URI_TAGS,
351
- // eslint-disable-line indent
352
- transformCaseFunc
353
- // eslint-disable-line indent
354
- ) : DEFAULT_DATA_URI_TAGS;
374
+ 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;
375
+ 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;
355
376
  FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
356
377
  FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
357
378
  FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
@@ -361,6 +382,7 @@ function createDOMPurify() {
361
382
  ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
362
383
  ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false;
363
384
  SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;
385
+ SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false;
364
386
  WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;
365
387
  RETURN_DOM = cfg.RETURN_DOM || false;
366
388
  RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;
@@ -372,6 +394,8 @@ function createDOMPurify() {
372
394
  IN_PLACE = cfg.IN_PLACE || false;
373
395
  IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
374
396
  NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
397
+ MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
398
+ HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
375
399
  CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
376
400
  if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
377
401
  CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
@@ -464,9 +488,6 @@ function createDOMPurify() {
464
488
  }
465
489
  CONFIG = cfg;
466
490
  };
467
- const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
468
- const HTML_INTEGRATION_POINTS = addToSet({}, ["foreignobject", "desc", "title", "annotation-xml"]);
469
- const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ["title", "style", "font", "a", "script"]);
470
491
  const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
471
492
  const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
472
493
  const _checkValidNamespace = function _checkValidNamespace2(element) {
@@ -519,33 +540,33 @@ function createDOMPurify() {
519
540
  element: node
520
541
  });
521
542
  try {
522
- node.parentNode.removeChild(node);
543
+ getParentNode(node).removeChild(node);
523
544
  } catch (_) {
524
- node.remove();
545
+ remove(node);
525
546
  }
526
547
  };
527
- const _removeAttribute = function _removeAttribute2(name, node) {
548
+ const _removeAttribute = function _removeAttribute2(name, element) {
528
549
  try {
529
550
  arrayPush(DOMPurify.removed, {
530
- attribute: node.getAttributeNode(name),
531
- from: node
551
+ attribute: element.getAttributeNode(name),
552
+ from: element
532
553
  });
533
554
  } catch (_) {
534
555
  arrayPush(DOMPurify.removed, {
535
556
  attribute: null,
536
- from: node
557
+ from: element
537
558
  });
538
559
  }
539
- node.removeAttribute(name);
540
- if (name === "is" && !ALLOWED_ATTR[name]) {
560
+ element.removeAttribute(name);
561
+ if (name === "is") {
541
562
  if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
542
563
  try {
543
- _forceRemove(node);
564
+ _forceRemove(element);
544
565
  } catch (_) {
545
566
  }
546
567
  } else {
547
568
  try {
548
- node.setAttribute(name, "");
569
+ element.setAttribute(name, "");
549
570
  } catch (_) {
550
571
  }
551
572
  }
@@ -591,33 +612,30 @@ function createDOMPurify() {
591
612
  root.ownerDocument || root,
592
613
  root,
593
614
  // eslint-disable-next-line no-bitwise
594
- NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION,
615
+ NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION,
595
616
  null
596
617
  );
597
618
  };
598
- const _isClobbered = function _isClobbered2(elm) {
599
- return elm instanceof HTMLFormElement && (typeof elm.nodeName !== "string" || typeof elm.textContent !== "string" || typeof elm.removeChild !== "function" || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== "function" || typeof elm.setAttribute !== "function" || typeof elm.namespaceURI !== "string" || typeof elm.insertBefore !== "function" || typeof elm.hasChildNodes !== "function");
619
+ const _isClobbered = function _isClobbered2(element) {
620
+ return element instanceof HTMLFormElement && (typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function");
600
621
  };
601
- const _isNode = function _isNode2(object) {
602
- return typeof Node === "function" && object instanceof Node;
622
+ const _isNode = function _isNode2(value) {
623
+ return typeof Node === "function" && value instanceof Node;
603
624
  };
604
- const _executeHook = function _executeHook2(entryPoint, currentNode, data) {
605
- if (!hooks[entryPoint]) {
606
- return;
607
- }
608
- arrayForEach(hooks[entryPoint], (hook) => {
625
+ function _executeHooks(hooks2, currentNode, data) {
626
+ arrayForEach(hooks2, (hook) => {
609
627
  hook.call(DOMPurify, currentNode, data, CONFIG);
610
628
  });
611
- };
629
+ }
612
630
  const _sanitizeElements = function _sanitizeElements2(currentNode) {
613
631
  let content = null;
614
- _executeHook("beforeSanitizeElements", currentNode, null);
632
+ _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
615
633
  if (_isClobbered(currentNode)) {
616
634
  _forceRemove(currentNode);
617
635
  return true;
618
636
  }
619
637
  const tagName = transformCaseFunc(currentNode.nodeName);
620
- _executeHook("uponSanitizeElement", currentNode, {
638
+ _executeHooks(hooks.uponSanitizeElement, currentNode, {
621
639
  tagName,
622
640
  allowedTags: ALLOWED_TAGS
623
641
  });
@@ -625,6 +643,14 @@ function createDOMPurify() {
625
643
  _forceRemove(currentNode);
626
644
  return true;
627
645
  }
646
+ if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
647
+ _forceRemove(currentNode);
648
+ return true;
649
+ }
650
+ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
651
+ _forceRemove(currentNode);
652
+ return true;
653
+ }
628
654
  if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
629
655
  if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
630
656
  if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
@@ -640,7 +666,9 @@ function createDOMPurify() {
640
666
  if (childNodes && parentNode) {
641
667
  const childCount = childNodes.length;
642
668
  for (let i = childCount - 1; i >= 0; --i) {
643
- parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));
669
+ const childClone = cloneNode(childNodes[i], true);
670
+ childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
671
+ parentNode.insertBefore(childClone, getNextSibling(currentNode));
644
672
  }
645
673
  }
646
674
  }
@@ -655,7 +683,7 @@ function createDOMPurify() {
655
683
  _forceRemove(currentNode);
656
684
  return true;
657
685
  }
658
- if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {
686
+ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
659
687
  content = currentNode.textContent;
660
688
  arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
661
689
  content = stringReplace(content, expr, " ");
@@ -667,7 +695,7 @@ function createDOMPurify() {
667
695
  currentNode.textContent = content;
668
696
  }
669
697
  }
670
- _executeHook("afterSanitizeElements", currentNode, null);
698
+ _executeHooks(hooks.afterSanitizeElements, currentNode, null);
671
699
  return false;
672
700
  };
673
701
  const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value) {
@@ -709,18 +737,19 @@ function createDOMPurify() {
709
737
  return tagName !== "annotation-xml" && stringMatch(tagName, CUSTOM_ELEMENT2);
710
738
  };
711
739
  const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
712
- _executeHook("beforeSanitizeAttributes", currentNode, null);
740
+ _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
713
741
  const {
714
742
  attributes
715
743
  } = currentNode;
716
- if (!attributes) {
744
+ if (!attributes || _isClobbered(currentNode)) {
717
745
  return;
718
746
  }
719
747
  const hookEvent = {
720
748
  attrName: "",
721
749
  attrValue: "",
722
750
  keepAttr: true,
723
- allowedAttributes: ALLOWED_ATTR
751
+ allowedAttributes: ALLOWED_ATTR,
752
+ forceKeepAttr: void 0
724
753
  };
725
754
  let l = attributes.length;
726
755
  while (l--) {
@@ -736,8 +765,16 @@ function createDOMPurify() {
736
765
  hookEvent.attrValue = value;
737
766
  hookEvent.keepAttr = true;
738
767
  hookEvent.forceKeepAttr = void 0;
739
- _executeHook("uponSanitizeAttribute", currentNode, hookEvent);
768
+ _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
740
769
  value = hookEvent.attrValue;
770
+ if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
771
+ _removeAttribute(name, currentNode);
772
+ value = SANITIZE_NAMED_PROPS_PREFIX + value;
773
+ }
774
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
775
+ _removeAttribute(name, currentNode);
776
+ continue;
777
+ }
741
778
  if (hookEvent.forceKeepAttr) {
742
779
  continue;
743
780
  }
@@ -758,10 +795,6 @@ function createDOMPurify() {
758
795
  if (!_isValidAttribute(lcTag, lcName, value)) {
759
796
  continue;
760
797
  }
761
- if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
762
- _removeAttribute(name, currentNode);
763
- value = SANITIZE_NAMED_PROPS_PREFIX + value;
764
- }
765
798
  if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") {
766
799
  if (namespaceURI)
767
800
  ;
@@ -784,27 +817,29 @@ function createDOMPurify() {
784
817
  } else {
785
818
  currentNode.setAttribute(name, value);
786
819
  }
787
- arrayPop(DOMPurify.removed);
820
+ if (_isClobbered(currentNode)) {
821
+ _forceRemove(currentNode);
822
+ } else {
823
+ arrayPop(DOMPurify.removed);
824
+ }
788
825
  } catch (_) {
789
826
  }
790
827
  }
791
- _executeHook("afterSanitizeAttributes", currentNode, null);
828
+ _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
792
829
  };
793
830
  const _sanitizeShadowDOM = function _sanitizeShadowDOM2(fragment) {
794
831
  let shadowNode = null;
795
832
  const shadowIterator = _createNodeIterator(fragment);
796
- _executeHook("beforeSanitizeShadowDOM", fragment, null);
833
+ _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
797
834
  while (shadowNode = shadowIterator.nextNode()) {
798
- _executeHook("uponSanitizeShadowNode", shadowNode, null);
799
- if (_sanitizeElements(shadowNode)) {
800
- continue;
801
- }
835
+ _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
836
+ _sanitizeElements(shadowNode);
837
+ _sanitizeAttributes(shadowNode);
802
838
  if (shadowNode.content instanceof DocumentFragment) {
803
839
  _sanitizeShadowDOM2(shadowNode.content);
804
840
  }
805
- _sanitizeAttributes(shadowNode);
806
841
  }
807
- _executeHook("afterSanitizeShadowDOM", fragment, null);
842
+ _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
808
843
  };
809
844
  DOMPurify.sanitize = function(dirty) {
810
845
  let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -846,7 +881,7 @@ function createDOMPurify() {
846
881
  } else if (dirty instanceof Node) {
847
882
  body = _initDocument("<!---->");
848
883
  importedNode = body.ownerDocument.importNode(dirty, true);
849
- if (importedNode.nodeType === 1 && importedNode.nodeName === "BODY") {
884
+ if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") {
850
885
  body = importedNode;
851
886
  } else if (importedNode.nodeName === "HTML") {
852
887
  body = importedNode;
@@ -868,13 +903,11 @@ function createDOMPurify() {
868
903
  }
869
904
  const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
870
905
  while (currentNode = nodeIterator.nextNode()) {
871
- if (_sanitizeElements(currentNode)) {
872
- continue;
873
- }
906
+ _sanitizeElements(currentNode);
907
+ _sanitizeAttributes(currentNode);
874
908
  if (currentNode.content instanceof DocumentFragment) {
875
909
  _sanitizeShadowDOM(currentNode.content);
876
910
  }
877
- _sanitizeAttributes(currentNode);
878
911
  }
879
912
  if (IN_PLACE) {
880
913
  return dirty;
@@ -925,21 +958,16 @@ function createDOMPurify() {
925
958
  if (typeof hookFunction !== "function") {
926
959
  return;
927
960
  }
928
- hooks[entryPoint] = hooks[entryPoint] || [];
929
961
  arrayPush(hooks[entryPoint], hookFunction);
930
962
  };
931
963
  DOMPurify.removeHook = function(entryPoint) {
932
- if (hooks[entryPoint]) {
933
- return arrayPop(hooks[entryPoint]);
934
- }
964
+ return arrayPop(hooks[entryPoint]);
935
965
  };
936
966
  DOMPurify.removeHooks = function(entryPoint) {
937
- if (hooks[entryPoint]) {
938
- hooks[entryPoint] = [];
939
- }
967
+ hooks[entryPoint] = [];
940
968
  };
941
969
  DOMPurify.removeAllHooks = function() {
942
- hooks = {};
970
+ hooks = _createHooksMap();
943
971
  };
944
972
  return DOMPurify;
945
973
  }
@@ -0,0 +1,37 @@
1
+ import callBindApplyHelpers from "../../../call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/index.mjs";
2
+ import gopd from "../../../gopd@1.2.0/node_modules/gopd/index.mjs";
3
+ var get;
4
+ var hasRequiredGet;
5
+ function requireGet() {
6
+ if (hasRequiredGet)
7
+ return get;
8
+ hasRequiredGet = 1;
9
+ var callBind = callBindApplyHelpers;
10
+ var gOPD = gopd;
11
+ var hasProtoAccessor;
12
+ try {
13
+ hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
14
+ [].__proto__ === Array.prototype;
15
+ } catch (e) {
16
+ if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
17
+ throw e;
18
+ }
19
+ }
20
+ var desc = !!hasProtoAccessor && gOPD && gOPD(
21
+ Object.prototype,
22
+ /** @type {keyof typeof Object.prototype} */
23
+ "__proto__"
24
+ );
25
+ var $Object = Object;
26
+ var $getPrototypeOf = $Object.getPrototypeOf;
27
+ get = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
28
+ /** @type {import('./get')} */
29
+ function getDunder(value) {
30
+ return $getPrototypeOf(value == null ? value : $Object(value));
31
+ }
32
+ ) : false;
33
+ return get;
34
+ }
35
+ export {
36
+ requireGet as __require
37
+ };
@@ -0,0 +1,12 @@
1
+ var $defineProperty = Object.defineProperty || false;
2
+ if ($defineProperty) {
3
+ try {
4
+ $defineProperty({}, "a", { value: 1 });
5
+ } catch (e) {
6
+ $defineProperty = false;
7
+ }
8
+ }
9
+ var esDefineProperty = $defineProperty;
10
+ export {
11
+ esDefineProperty as default
12
+ };
@@ -0,0 +1,4 @@
1
+ var esObjectAtoms = Object;
2
+ export {
3
+ esObjectAtoms as default
4
+ };
@@ -1,3 +1,4 @@
1
+ import esObjectAtoms from "../../../es-object-atoms@1.0.0/node_modules/es-object-atoms/index.mjs";
1
2
  import esErrors from "../../../es-errors@1.3.0/node_modules/es-errors/index.mjs";
2
3
  import _eval from "../../../es-errors@1.3.0/node_modules/es-errors/eval.mjs";
3
4
  import range from "../../../es-errors@1.3.0/node_modules/es-errors/range.mjs";
@@ -5,11 +6,21 @@ import ref from "../../../es-errors@1.3.0/node_modules/es-errors/ref.mjs";
5
6
  import syntax from "../../../es-errors@1.3.0/node_modules/es-errors/syntax.mjs";
6
7
  import type from "../../../es-errors@1.3.0/node_modules/es-errors/type.mjs";
7
8
  import uri from "../../../es-errors@1.3.0/node_modules/es-errors/uri.mjs";
8
- import hasSymbols$1 from "../../../has-symbols@1.0.3/node_modules/has-symbols/index.mjs";
9
- import hasProto$1 from "../../../has-proto@1.0.3/node_modules/has-proto/index.mjs";
9
+ import abs$1 from "../../../math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.mjs";
10
+ import floor$1 from "../../../math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.mjs";
11
+ import max$1 from "../../../math-intrinsics@1.1.0/node_modules/math-intrinsics/max.mjs";
12
+ import min$1 from "../../../math-intrinsics@1.1.0/node_modules/math-intrinsics/min.mjs";
13
+ import pow$1 from "../../../math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.mjs";
14
+ import gopd from "../../../gopd@1.2.0/node_modules/gopd/index.mjs";
15
+ import esDefineProperty from "../../../es-define-property@1.0.1/node_modules/es-define-property/index.mjs";
16
+ import { __require as requireHasSymbols } from "../../../has-symbols@1.1.0/node_modules/has-symbols/index.mjs";
17
+ import { __require as requireGet } from "../../../dunder-proto@1.0.1/node_modules/dunder-proto/get.mjs";
18
+ import { __require as requireFunctionApply } from "../../../call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/functionApply.mjs";
19
+ import functionCall from "../../../call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/functionCall.mjs";
10
20
  import functionBind from "../../../function-bind@1.1.2/node_modules/function-bind/index.mjs";
11
- import hasown from "../../../hasown@2.0.2/node_modules/hasown/index.mjs";
21
+ import { __require as requireHasown } from "../../../hasown@2.0.2/node_modules/hasown/index.mjs";
12
22
  var undefined$1;
23
+ var $Object = esObjectAtoms;
13
24
  var $Error = esErrors;
14
25
  var $EvalError = _eval;
15
26
  var $RangeError = range;
@@ -17,6 +28,11 @@ var $ReferenceError = ref;
17
28
  var $SyntaxError = syntax;
18
29
  var $TypeError = type;
19
30
  var $URIError = uri;
31
+ var abs = abs$1;
32
+ var floor = floor$1;
33
+ var max = max$1;
34
+ var min = min$1;
35
+ var pow = pow$1;
20
36
  var $Function = Function;
21
37
  var getEvalledConstructor = function(expressionSyntax) {
22
38
  try {
@@ -24,14 +40,8 @@ var getEvalledConstructor = function(expressionSyntax) {
24
40
  } catch (e) {
25
41
  }
26
42
  };
27
- var $gOPD = Object.getOwnPropertyDescriptor;
28
- if ($gOPD) {
29
- try {
30
- $gOPD({}, "");
31
- } catch (e) {
32
- $gOPD = null;
33
- }
34
- }
43
+ var $gOPD = gopd;
44
+ var $defineProperty = esDefineProperty;
35
45
  var throwTypeError = function() {
36
46
  throw new $TypeError();
37
47
  };
@@ -47,11 +57,11 @@ var ThrowTypeError = $gOPD ? function() {
47
57
  }
48
58
  }
49
59
  }() : throwTypeError;
50
- var hasSymbols = hasSymbols$1();
51
- var hasProto = hasProto$1();
52
- var getProto = Object.getPrototypeOf || (hasProto ? function(x) {
53
- return x.__proto__;
54
- } : null);
60
+ var hasSymbols = requireHasSymbols()();
61
+ var getDunderProto = requireGet();
62
+ var getProto = typeof Reflect === "function" && Reflect.getPrototypeOf || $Object.getPrototypeOf || getDunderProto;
63
+ var $apply = requireFunctionApply();
64
+ var $call = functionCall;
55
65
  var needsEval = {};
56
66
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
57
67
  var INTRINSICS = {
@@ -96,7 +106,8 @@ var INTRINSICS = {
96
106
  "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
97
107
  "%Math%": Math,
98
108
  "%Number%": Number,
99
- "%Object%": Object,
109
+ "%Object%": $Object,
110
+ "%Object.getOwnPropertyDescriptor%": $gOPD,
100
111
  "%parseFloat%": parseFloat,
101
112
  "%parseInt%": parseInt,
102
113
  "%Promise%": typeof Promise === "undefined" ? undefined$1 : Promise,
@@ -122,7 +133,15 @@ var INTRINSICS = {
122
133
  "%URIError%": $URIError,
123
134
  "%WeakMap%": typeof WeakMap === "undefined" ? undefined$1 : WeakMap,
124
135
  "%WeakRef%": typeof WeakRef === "undefined" ? undefined$1 : WeakRef,
125
- "%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet
136
+ "%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet,
137
+ "%Function.prototype.call%": $call,
138
+ "%Function.prototype.apply%": $apply,
139
+ "%Object.defineProperty%": $defineProperty,
140
+ "%Math.abs%": abs,
141
+ "%Math.floor%": floor,
142
+ "%Math.max%": max,
143
+ "%Math.min%": min,
144
+ "%Math.pow%": pow
126
145
  };
127
146
  if (getProto) {
128
147
  try {
@@ -209,12 +228,12 @@ var LEGACY_ALIASES = {
209
228
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
210
229
  };
211
230
  var bind = functionBind;
212
- var hasOwn = hasown;
213
- var $concat = bind.call(Function.call, Array.prototype.concat);
214
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
215
- var $replace = bind.call(Function.call, String.prototype.replace);
216
- var $strSlice = bind.call(Function.call, String.prototype.slice);
217
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
231
+ var hasOwn = requireHasown();
232
+ var $concat = bind.call($call, Array.prototype.concat);
233
+ var $spliceApply = bind.call($apply, Array.prototype.splice);
234
+ var $replace = bind.call($call, String.prototype.replace);
235
+ var $strSlice = bind.call($call, String.prototype.slice);
236
+ var $exec = bind.call($call, RegExp.prototype.exec);
218
237
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
219
238
  var reEscapeChar = /\\(\\)?/g;
220
239
  var stringToPath = function stringToPath2(string) {