@copart/ops-tool-kit 1.12.1 → 1.12.2-alpha.1

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.
@@ -47,7 +47,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
47
47
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
48
48
 
49
49
  const name$r = "@copart/ops-tool-kit";
50
- const version$8 = "1.12.1";
50
+ const version$8 = "1.12.2-alpha.1";
51
51
  const main$1 = "dist/ops-tool-kit.js";
52
52
  const style = "dist/ops-tool-kit.css";
53
53
  const files = [
@@ -113,6 +113,7 @@ const dependencies$1 = {
113
113
  axios: "0.18.0",
114
114
  "create-react-context": "0.2.2",
115
115
  "crypto-js": "^4.0.0",
116
+ dompurify: "2.0.12",
116
117
  firebase: "10.8.1",
117
118
  flat: "4.1.0",
118
119
  html2canvas: "^1.4.1",
@@ -55842,6 +55843,1168 @@ E$1.API.PDFObject = function () {
55842
55843
  }, e;
55843
55844
  }();
55844
55845
 
55846
+ var purify$2 = createCommonjsModule(function (module, exports) {
55847
+ /*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.0.8/LICENSE */
55848
+
55849
+ (function (global, factory) {
55850
+ module.exports = factory() ;
55851
+ })(commonjsGlobal, function () {
55852
+
55853
+ function _toConsumableArray(arr) {
55854
+ if (Array.isArray(arr)) {
55855
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
55856
+ arr2[i] = arr[i];
55857
+ }
55858
+ return arr2;
55859
+ } else {
55860
+ return Array.from(arr);
55861
+ }
55862
+ }
55863
+ var hasOwnProperty = Object.hasOwnProperty,
55864
+ setPrototypeOf = Object.setPrototypeOf,
55865
+ isFrozen = Object.isFrozen,
55866
+ objectKeys = Object.keys;
55867
+ var freeze = Object.freeze,
55868
+ seal = Object.seal; // eslint-disable-line import/no-mutable-exports
55869
+
55870
+ var _ref = typeof Reflect !== 'undefined' && Reflect,
55871
+ apply = _ref.apply,
55872
+ construct = _ref.construct;
55873
+ if (!apply) {
55874
+ apply = function apply(fun, thisValue, args) {
55875
+ return fun.apply(thisValue, args);
55876
+ };
55877
+ }
55878
+ if (!freeze) {
55879
+ freeze = function freeze(x) {
55880
+ return x;
55881
+ };
55882
+ }
55883
+ if (!seal) {
55884
+ seal = function seal(x) {
55885
+ return x;
55886
+ };
55887
+ }
55888
+ if (!construct) {
55889
+ construct = function construct(Func, args) {
55890
+ return new (Function.prototype.bind.apply(Func, [null].concat(_toConsumableArray(args))))();
55891
+ };
55892
+ }
55893
+ var arrayForEach = unapply(Array.prototype.forEach);
55894
+ var arrayIndexOf = unapply(Array.prototype.indexOf);
55895
+ var arrayJoin = unapply(Array.prototype.join);
55896
+ var arrayPop = unapply(Array.prototype.pop);
55897
+ var arrayPush = unapply(Array.prototype.push);
55898
+ var arraySlice = unapply(Array.prototype.slice);
55899
+ var stringToLowerCase = unapply(String.prototype.toLowerCase);
55900
+ var stringMatch = unapply(String.prototype.match);
55901
+ var stringReplace = unapply(String.prototype.replace);
55902
+ var stringIndexOf = unapply(String.prototype.indexOf);
55903
+ var stringTrim = unapply(String.prototype.trim);
55904
+ var regExpTest = unapply(RegExp.prototype.test);
55905
+ var regExpCreate = unconstruct(RegExp);
55906
+ var typeErrorCreate = unconstruct(TypeError);
55907
+ function unapply(func) {
55908
+ return function (thisArg) {
55909
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
55910
+ args[_key - 1] = arguments[_key];
55911
+ }
55912
+ return apply(func, thisArg, args);
55913
+ };
55914
+ }
55915
+ function unconstruct(func) {
55916
+ return function () {
55917
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
55918
+ args[_key2] = arguments[_key2];
55919
+ }
55920
+ return construct(func, args);
55921
+ };
55922
+ }
55923
+
55924
+ /* Add properties to a lookup table */
55925
+ function addToSet(set, array) {
55926
+ if (setPrototypeOf) {
55927
+ // Make 'in' and truthy checks like Boolean(set.constructor)
55928
+ // independent of any properties defined on Object.prototype.
55929
+ // Prevent prototype setters from intercepting set as a this value.
55930
+ setPrototypeOf(set, null);
55931
+ }
55932
+ var l = array.length;
55933
+ while (l--) {
55934
+ var element = array[l];
55935
+ if (typeof element === 'string') {
55936
+ var lcElement = stringToLowerCase(element);
55937
+ if (lcElement !== element) {
55938
+ // Config presets (e.g. tags.js, attrs.js) are immutable.
55939
+ if (!isFrozen(array)) {
55940
+ array[l] = lcElement;
55941
+ }
55942
+ element = lcElement;
55943
+ }
55944
+ }
55945
+ set[element] = true;
55946
+ }
55947
+ return set;
55948
+ }
55949
+
55950
+ /* Shallow clone an object */
55951
+ function clone(object) {
55952
+ var newObject = {};
55953
+ var property = void 0;
55954
+ for (property in object) {
55955
+ if (apply(hasOwnProperty, object, [property])) {
55956
+ newObject[property] = object[property];
55957
+ }
55958
+ }
55959
+ return newObject;
55960
+ }
55961
+ var html = 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', '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']);
55962
+
55963
+ // SVG
55964
+ var svg = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'audio', 'canvas', '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', 'video', 'view', 'vkern']);
55965
+ var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
55966
+ var mathMl = 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']);
55967
+ var text = freeze(['#text']);
55968
+ var html$1 = 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', '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']);
55969
+ var svg$1 = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', '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', 'tabindex', 'targetx', 'targety', 'transform', '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']);
55970
+ var mathMl$1 = 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']);
55971
+ var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
55972
+
55973
+ // eslint-disable-next-line unicorn/better-regex
55974
+ var MUSTACHE_EXPR = seal(/\{\{[\s\S]*|[\s\S]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
55975
+ var ERB_EXPR = seal(/<%[\s\S]*|[\s\S]*%>/gm);
55976
+ var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape
55977
+ var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
55978
+ var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
55979
+ );
55980
+
55981
+ var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
55982
+ var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g // eslint-disable-line no-control-regex
55983
+ );
55984
+
55985
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
55986
+ return typeof obj;
55987
+ } : function (obj) {
55988
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
55989
+ };
55990
+ function _toConsumableArray$1(arr) {
55991
+ if (Array.isArray(arr)) {
55992
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
55993
+ arr2[i] = arr[i];
55994
+ }
55995
+ return arr2;
55996
+ } else {
55997
+ return Array.from(arr);
55998
+ }
55999
+ }
56000
+ var getGlobal = function getGlobal() {
56001
+ return typeof window === 'undefined' ? null : window;
56002
+ };
56003
+
56004
+ /**
56005
+ * Creates a no-op policy for internal use only.
56006
+ * Don't export this function outside this module!
56007
+ * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.
56008
+ * @param {Document} document The document object (to determine policy name suffix)
56009
+ * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types
56010
+ * are not supported).
56011
+ */
56012
+ var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {
56013
+ if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
56014
+ return null;
56015
+ }
56016
+
56017
+ // Allow the callers to control the unique policy name
56018
+ // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
56019
+ // Policy creation with duplicate names throws in Trusted Types.
56020
+ var suffix = null;
56021
+ var ATTR_NAME = 'data-tt-policy-suffix';
56022
+ if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {
56023
+ suffix = document.currentScript.getAttribute(ATTR_NAME);
56024
+ }
56025
+ var policyName = 'dompurify' + (suffix ? '#' + suffix : '');
56026
+ try {
56027
+ return trustedTypes.createPolicy(policyName, {
56028
+ createHTML: function createHTML(html$$1) {
56029
+ return html$$1;
56030
+ }
56031
+ });
56032
+ } catch (_) {
56033
+ // Policy creation failed (most likely another DOMPurify script has
56034
+ // already run). Skip creating the policy, as this will only cause errors
56035
+ // if TT are enforced.
56036
+ console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
56037
+ return null;
56038
+ }
56039
+ };
56040
+ function createDOMPurify() {
56041
+ var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
56042
+ var DOMPurify = function DOMPurify(root) {
56043
+ return createDOMPurify(root);
56044
+ };
56045
+
56046
+ /**
56047
+ * Version label, exposed for easier checks
56048
+ * if DOMPurify is up to date or not
56049
+ */
56050
+ DOMPurify.version = '2.0.12';
56051
+
56052
+ /**
56053
+ * Array of elements that DOMPurify removed during sanitation.
56054
+ * Empty if nothing was removed.
56055
+ */
56056
+ DOMPurify.removed = [];
56057
+ if (!window || !window.document || window.document.nodeType !== 9) {
56058
+ // Not running in a browser, provide a factory function
56059
+ // so that you can pass your own Window
56060
+ DOMPurify.isSupported = false;
56061
+ return DOMPurify;
56062
+ }
56063
+ var originalDocument = window.document;
56064
+ var removeTitle = false;
56065
+ var document = window.document;
56066
+ var DocumentFragment = window.DocumentFragment,
56067
+ HTMLTemplateElement = window.HTMLTemplateElement,
56068
+ Node = window.Node,
56069
+ NodeFilter = window.NodeFilter,
56070
+ _window$NamedNodeMap = window.NamedNodeMap,
56071
+ NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,
56072
+ Text = window.Text,
56073
+ Comment = window.Comment,
56074
+ DOMParser = window.DOMParser,
56075
+ trustedTypes = window.trustedTypes;
56076
+
56077
+ // As per issue #47, the web-components registry is inherited by a
56078
+ // new document created via createHTMLDocument. As per the spec
56079
+ // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
56080
+ // a new empty registry is used when creating a template contents owner
56081
+ // document, so we use that as our parent document to ensure nothing
56082
+ // is inherited.
56083
+
56084
+ if (typeof HTMLTemplateElement === 'function') {
56085
+ var template = document.createElement('template');
56086
+ if (template.content && template.content.ownerDocument) {
56087
+ document = template.content.ownerDocument;
56088
+ }
56089
+ }
56090
+ var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);
56091
+ var emptyHTML = trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML('') : '';
56092
+ var _document = document,
56093
+ implementation = _document.implementation,
56094
+ createNodeIterator = _document.createNodeIterator,
56095
+ getElementsByTagName = _document.getElementsByTagName,
56096
+ createDocumentFragment = _document.createDocumentFragment;
56097
+ var importNode = originalDocument.importNode;
56098
+ var hooks = {};
56099
+
56100
+ /**
56101
+ * Expose whether this browser supports running the full DOMPurify.
56102
+ */
56103
+ DOMPurify.isSupported = implementation && typeof implementation.createHTMLDocument !== 'undefined' && document.documentMode !== 9;
56104
+ var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR,
56105
+ ERB_EXPR$$1 = ERB_EXPR,
56106
+ DATA_ATTR$$1 = DATA_ATTR,
56107
+ ARIA_ATTR$$1 = ARIA_ATTR,
56108
+ IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA,
56109
+ ATTR_WHITESPACE$$1 = ATTR_WHITESPACE;
56110
+ var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI;
56111
+
56112
+ /**
56113
+ * We consider the elements and attributes below to be safe. Ideally
56114
+ * don't add any new ones but feel free to remove unwanted ones.
56115
+ */
56116
+
56117
+ /* allowed element names */
56118
+
56119
+ var ALLOWED_TAGS = null;
56120
+ var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(html), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text)));
56121
+
56122
+ /* Allowed attribute names */
56123
+ var ALLOWED_ATTR = null;
56124
+ var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml)));
56125
+
56126
+ /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
56127
+ var FORBID_TAGS = null;
56128
+
56129
+ /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
56130
+ var FORBID_ATTR = null;
56131
+
56132
+ /* Decide if ARIA attributes are okay */
56133
+ var ALLOW_ARIA_ATTR = true;
56134
+
56135
+ /* Decide if custom data attributes are okay */
56136
+ var ALLOW_DATA_ATTR = true;
56137
+
56138
+ /* Decide if unknown protocols are okay */
56139
+ var ALLOW_UNKNOWN_PROTOCOLS = false;
56140
+
56141
+ /* Output should be safe for jQuery's $() factory? */
56142
+ var SAFE_FOR_JQUERY = false;
56143
+
56144
+ /* Output should be safe for common template engines.
56145
+ * This means, DOMPurify removes data attributes, mustaches and ERB
56146
+ */
56147
+ var SAFE_FOR_TEMPLATES = false;
56148
+
56149
+ /* Decide if document with <html>... should be returned */
56150
+ var WHOLE_DOCUMENT = false;
56151
+
56152
+ /* Track whether config is already set on this instance of DOMPurify. */
56153
+ var SET_CONFIG = false;
56154
+
56155
+ /* Decide if all elements (e.g. style, script) must be children of
56156
+ * document.body. By default, browsers might move them to document.head */
56157
+ var FORCE_BODY = false;
56158
+
56159
+ /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
56160
+ * string (or a TrustedHTML object if Trusted Types are supported).
56161
+ * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
56162
+ */
56163
+ var RETURN_DOM = false;
56164
+
56165
+ /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
56166
+ * string (or a TrustedHTML object if Trusted Types are supported) */
56167
+ var RETURN_DOM_FRAGMENT = false;
56168
+
56169
+ /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM
56170
+ * `Node` is imported into the current `Document`. If this flag is not enabled the
56171
+ * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by
56172
+ * DOMPurify. */
56173
+ var RETURN_DOM_IMPORT = false;
56174
+
56175
+ /* Try to return a Trusted Type object instead of a string, retrun a string in
56176
+ * case Trusted Types are not supported */
56177
+ var RETURN_TRUSTED_TYPE = false;
56178
+
56179
+ /* Output should be free from DOM clobbering attacks? */
56180
+ var SANITIZE_DOM = true;
56181
+
56182
+ /* Keep element content when removing element? */
56183
+ var KEEP_CONTENT = true;
56184
+
56185
+ /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
56186
+ * of importing it into a new Document and returning a sanitized copy */
56187
+ var IN_PLACE = false;
56188
+
56189
+ /* Allow usage of profiles like html, svg and mathMl */
56190
+ var USE_PROFILES = {};
56191
+
56192
+ /* Tags to ignore content of when KEEP_CONTENT is true */
56193
+ var FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
56194
+
56195
+ /* Tags that are safe for data: URIs */
56196
+ var DATA_URI_TAGS = null;
56197
+ var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
56198
+
56199
+ /* Attributes safe for values like "javascript:" */
56200
+ var URI_SAFE_ATTRIBUTES = null;
56201
+ var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'summary', 'title', 'value', 'style', 'xmlns']);
56202
+
56203
+ /* Keep a reference to config to pass to hooks */
56204
+ var CONFIG = null;
56205
+
56206
+ /* Ideally, do not touch anything below this line */
56207
+ /* ______________________________________________ */
56208
+
56209
+ var formElement = document.createElement('form');
56210
+
56211
+ /**
56212
+ * _parseConfig
56213
+ *
56214
+ * @param {Object} cfg optional config literal
56215
+ */
56216
+ // eslint-disable-next-line complexity
56217
+ var _parseConfig = function _parseConfig(cfg) {
56218
+ if (CONFIG && CONFIG === cfg) {
56219
+ return;
56220
+ }
56221
+
56222
+ /* Shield configuration object from tampering */
56223
+ if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') {
56224
+ cfg = {};
56225
+ }
56226
+
56227
+ /* Set configuration parameters */
56228
+ ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;
56229
+ ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;
56230
+ URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES;
56231
+ DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS;
56232
+ FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};
56233
+ FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};
56234
+ USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;
56235
+ ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
56236
+ ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
56237
+ ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
56238
+ SAFE_FOR_JQUERY = cfg.SAFE_FOR_JQUERY || false; // Default false
56239
+ SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
56240
+ WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
56241
+ RETURN_DOM = cfg.RETURN_DOM || false; // Default false
56242
+ RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
56243
+ RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT || false; // Default false
56244
+ RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
56245
+ FORCE_BODY = cfg.FORCE_BODY || false; // Default false
56246
+ SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
56247
+ KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
56248
+ IN_PLACE = cfg.IN_PLACE || false; // Default false
56249
+ IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1;
56250
+ if (SAFE_FOR_TEMPLATES) {
56251
+ ALLOW_DATA_ATTR = false;
56252
+ }
56253
+ if (RETURN_DOM_FRAGMENT) {
56254
+ RETURN_DOM = true;
56255
+ }
56256
+
56257
+ /* Parse profile info */
56258
+ if (USE_PROFILES) {
56259
+ ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text)));
56260
+ ALLOWED_ATTR = [];
56261
+ if (USE_PROFILES.html === true) {
56262
+ addToSet(ALLOWED_TAGS, html);
56263
+ addToSet(ALLOWED_ATTR, html$1);
56264
+ }
56265
+ if (USE_PROFILES.svg === true) {
56266
+ addToSet(ALLOWED_TAGS, svg);
56267
+ addToSet(ALLOWED_ATTR, svg$1);
56268
+ addToSet(ALLOWED_ATTR, xml);
56269
+ }
56270
+ if (USE_PROFILES.svgFilters === true) {
56271
+ addToSet(ALLOWED_TAGS, svgFilters);
56272
+ addToSet(ALLOWED_ATTR, svg$1);
56273
+ addToSet(ALLOWED_ATTR, xml);
56274
+ }
56275
+ if (USE_PROFILES.mathMl === true) {
56276
+ addToSet(ALLOWED_TAGS, mathMl);
56277
+ addToSet(ALLOWED_ATTR, mathMl$1);
56278
+ addToSet(ALLOWED_ATTR, xml);
56279
+ }
56280
+ }
56281
+
56282
+ /* Merge configuration parameters */
56283
+ if (cfg.ADD_TAGS) {
56284
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
56285
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
56286
+ }
56287
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);
56288
+ }
56289
+ if (cfg.ADD_ATTR) {
56290
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
56291
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
56292
+ }
56293
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR);
56294
+ }
56295
+ if (cfg.ADD_URI_SAFE_ATTR) {
56296
+ addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);
56297
+ }
56298
+
56299
+ /* Add #text in case KEEP_CONTENT is set to true */
56300
+ if (KEEP_CONTENT) {
56301
+ ALLOWED_TAGS['#text'] = true;
56302
+ }
56303
+
56304
+ /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
56305
+ if (WHOLE_DOCUMENT) {
56306
+ addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
56307
+ }
56308
+
56309
+ /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
56310
+ if (ALLOWED_TAGS.table) {
56311
+ addToSet(ALLOWED_TAGS, ['tbody']);
56312
+ delete FORBID_TAGS.tbody;
56313
+ }
56314
+
56315
+ // Prevent further manipulation of configuration.
56316
+ // Not available in IE8, Safari 5, etc.
56317
+ if (freeze) {
56318
+ freeze(cfg);
56319
+ }
56320
+ CONFIG = cfg;
56321
+ };
56322
+
56323
+ /**
56324
+ * _forceRemove
56325
+ *
56326
+ * @param {Node} node a DOM node
56327
+ */
56328
+ var _forceRemove = function _forceRemove(node) {
56329
+ arrayPush(DOMPurify.removed, {
56330
+ element: node
56331
+ });
56332
+ try {
56333
+ // eslint-disable-next-line unicorn/prefer-node-remove
56334
+ node.parentNode.removeChild(node);
56335
+ } catch (_) {
56336
+ node.outerHTML = emptyHTML;
56337
+ }
56338
+ };
56339
+
56340
+ /**
56341
+ * _removeAttribute
56342
+ *
56343
+ * @param {String} name an Attribute name
56344
+ * @param {Node} node a DOM node
56345
+ */
56346
+ var _removeAttribute = function _removeAttribute(name, node) {
56347
+ try {
56348
+ arrayPush(DOMPurify.removed, {
56349
+ attribute: node.getAttributeNode(name),
56350
+ from: node
56351
+ });
56352
+ } catch (_) {
56353
+ arrayPush(DOMPurify.removed, {
56354
+ attribute: null,
56355
+ from: node
56356
+ });
56357
+ }
56358
+ node.removeAttribute(name);
56359
+ };
56360
+
56361
+ /**
56362
+ * _initDocument
56363
+ *
56364
+ * @param {String} dirty a string of dirty markup
56365
+ * @return {Document} a DOM, filled with the dirty markup
56366
+ */
56367
+ var _initDocument = function _initDocument(dirty) {
56368
+ /* Create a HTML document */
56369
+ var doc = void 0;
56370
+ var leadingWhitespace = void 0;
56371
+ if (FORCE_BODY) {
56372
+ dirty = '<remove></remove>' + dirty;
56373
+ } else {
56374
+ /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
56375
+ var matches = stringMatch(dirty, /^[\r\n\t ]+/);
56376
+ leadingWhitespace = matches && matches[0];
56377
+ }
56378
+ var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
56379
+ /* Use the DOMParser API by default, fallback later if needs be */
56380
+ try {
56381
+ doc = new DOMParser().parseFromString(dirtyPayload, 'text/html');
56382
+ } catch (_) {}
56383
+
56384
+ /* Remove title to fix a mXSS bug in older MS Edge */
56385
+ if (removeTitle) {
56386
+ addToSet(FORBID_TAGS, ['title']);
56387
+ }
56388
+
56389
+ /* Use createHTMLDocument in case DOMParser is not available */
56390
+ if (!doc || !doc.documentElement) {
56391
+ doc = implementation.createHTMLDocument('');
56392
+ var _doc = doc,
56393
+ body = _doc.body;
56394
+ body.parentNode.removeChild(body.parentNode.firstElementChild);
56395
+ body.outerHTML = dirtyPayload;
56396
+ }
56397
+ if (dirty && leadingWhitespace) {
56398
+ doc.body.insertBefore(document.createTextNode(leadingWhitespace), doc.body.childNodes[0] || null);
56399
+ }
56400
+
56401
+ /* Work on whole document or just its body */
56402
+ return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
56403
+ };
56404
+
56405
+ /* Here we test for a broken feature in Edge that might cause mXSS */
56406
+ if (DOMPurify.isSupported) {
56407
+ (function () {
56408
+ try {
56409
+ var doc = _initDocument('<x/><title>&lt;/title&gt;&lt;img&gt;');
56410
+ if (regExpTest(/<\/title/, doc.querySelector('title').innerHTML)) {
56411
+ removeTitle = true;
56412
+ }
56413
+ } catch (_) {}
56414
+ })();
56415
+ }
56416
+
56417
+ /**
56418
+ * _createIterator
56419
+ *
56420
+ * @param {Document} root document/fragment to create iterator for
56421
+ * @return {Iterator} iterator instance
56422
+ */
56423
+ var _createIterator = function _createIterator(root) {
56424
+ return createNodeIterator.call(root.ownerDocument || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, function () {
56425
+ return NodeFilter.FILTER_ACCEPT;
56426
+ }, false);
56427
+ };
56428
+
56429
+ /**
56430
+ * _isClobbered
56431
+ *
56432
+ * @param {Node} elm element to check for clobbering attacks
56433
+ * @return {Boolean} true if clobbered, false if safe
56434
+ */
56435
+ var _isClobbered = function _isClobbered(elm) {
56436
+ if (elm instanceof Text || elm instanceof Comment) {
56437
+ return false;
56438
+ }
56439
+ if (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') {
56440
+ return true;
56441
+ }
56442
+ return false;
56443
+ };
56444
+
56445
+ /**
56446
+ * _isNode
56447
+ *
56448
+ * @param {Node} obj object to check whether it's a DOM node
56449
+ * @return {Boolean} true is object is a DOM node
56450
+ */
56451
+ var _isNode = function _isNode(object) {
56452
+ return (typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? object instanceof Node : object && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';
56453
+ };
56454
+
56455
+ /**
56456
+ * _executeHook
56457
+ * Execute user configurable hooks
56458
+ *
56459
+ * @param {String} entryPoint Name of the hook's entry point
56460
+ * @param {Node} currentNode node to work on with the hook
56461
+ * @param {Object} data additional hook parameters
56462
+ */
56463
+ var _executeHook = function _executeHook(entryPoint, currentNode, data) {
56464
+ if (!hooks[entryPoint]) {
56465
+ return;
56466
+ }
56467
+ arrayForEach(hooks[entryPoint], function (hook) {
56468
+ hook.call(DOMPurify, currentNode, data, CONFIG);
56469
+ });
56470
+ };
56471
+
56472
+ /**
56473
+ * _sanitizeElements
56474
+ *
56475
+ * @protect nodeName
56476
+ * @protect textContent
56477
+ * @protect removeChild
56478
+ *
56479
+ * @param {Node} currentNode to check for permission to exist
56480
+ * @return {Boolean} true if node was killed, false if left alive
56481
+ */
56482
+ // eslint-disable-next-line complexity
56483
+ var _sanitizeElements = function _sanitizeElements(currentNode) {
56484
+ var content = void 0;
56485
+
56486
+ /* Execute a hook if present */
56487
+ _executeHook('beforeSanitizeElements', currentNode, null);
56488
+
56489
+ /* Check if element is clobbered or can clobber */
56490
+ if (_isClobbered(currentNode)) {
56491
+ _forceRemove(currentNode);
56492
+ return true;
56493
+ }
56494
+
56495
+ /* Now let's check the element's type and name */
56496
+ var tagName = stringToLowerCase(currentNode.nodeName);
56497
+
56498
+ /* Execute a hook if present */
56499
+ _executeHook('uponSanitizeElement', currentNode, {
56500
+ tagName: tagName,
56501
+ allowedTags: ALLOWED_TAGS
56502
+ });
56503
+
56504
+ /* Take care of an mXSS pattern using p, br inside svg, math */
56505
+ if ((tagName === 'svg' || tagName === 'math') && currentNode.querySelectorAll('p, br').length !== 0) {
56506
+ _forceRemove(currentNode);
56507
+ return true;
56508
+ }
56509
+
56510
+ /* Remove element if anything forbids its presence */
56511
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
56512
+ /* Keep content except for bad-listed elements */
56513
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName] && typeof currentNode.insertAdjacentHTML === 'function') {
56514
+ try {
56515
+ var htmlToInsert = currentNode.innerHTML;
56516
+ currentNode.insertAdjacentHTML('AfterEnd', trustedTypesPolicy ? trustedTypesPolicy.createHTML(htmlToInsert) : htmlToInsert);
56517
+ } catch (_) {}
56518
+ }
56519
+ _forceRemove(currentNode);
56520
+ return true;
56521
+ }
56522
+
56523
+ /* Remove in case a noscript/noembed XSS is suspected */
56524
+ if (tagName === 'noscript' && regExpTest(/<\/noscript/i, currentNode.innerHTML)) {
56525
+ _forceRemove(currentNode);
56526
+ return true;
56527
+ }
56528
+ if (tagName === 'noembed' && regExpTest(/<\/noembed/i, currentNode.innerHTML)) {
56529
+ _forceRemove(currentNode);
56530
+ return true;
56531
+ }
56532
+
56533
+ /* Convert markup to cover jQuery behavior */
56534
+ if (SAFE_FOR_JQUERY && !currentNode.firstElementChild && (!currentNode.content || !currentNode.content.firstElementChild) && regExpTest(/</g, currentNode.textContent)) {
56535
+ arrayPush(DOMPurify.removed, {
56536
+ element: currentNode.cloneNode()
56537
+ });
56538
+ if (currentNode.innerHTML) {
56539
+ currentNode.innerHTML = stringReplace(currentNode.innerHTML, /</g, '&lt;');
56540
+ } else {
56541
+ currentNode.innerHTML = stringReplace(currentNode.textContent, /</g, '&lt;');
56542
+ }
56543
+ }
56544
+
56545
+ /* Sanitize element content to be template-safe */
56546
+ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {
56547
+ /* Get the element's text content */
56548
+ content = currentNode.textContent;
56549
+ content = stringReplace(content, MUSTACHE_EXPR$$1, ' ');
56550
+ content = stringReplace(content, ERB_EXPR$$1, ' ');
56551
+ if (currentNode.textContent !== content) {
56552
+ arrayPush(DOMPurify.removed, {
56553
+ element: currentNode.cloneNode()
56554
+ });
56555
+ currentNode.textContent = content;
56556
+ }
56557
+ }
56558
+
56559
+ /* Execute a hook if present */
56560
+ _executeHook('afterSanitizeElements', currentNode, null);
56561
+ return false;
56562
+ };
56563
+
56564
+ /**
56565
+ * _isValidAttribute
56566
+ *
56567
+ * @param {string} lcTag Lowercase tag name of containing element.
56568
+ * @param {string} lcName Lowercase attribute name.
56569
+ * @param {string} value Attribute value.
56570
+ * @return {Boolean} Returns true if `value` is valid, otherwise false.
56571
+ */
56572
+ // eslint-disable-next-line complexity
56573
+ var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
56574
+ /* Make sure attribute cannot clobber */
56575
+ if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
56576
+ return false;
56577
+ }
56578
+
56579
+ /* Allow valid data-* attributes: At least one character after "-"
56580
+ (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
56581
+ XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
56582
+ We don't need to check the value; it's always URI safe. */
56583
+ if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$$1, lcName)) ;else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$$1, lcName)) ;else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
56584
+ return false;
56585
+
56586
+ /* Check value is safe. First, is attr inert? If so, is safe */
56587
+ } else if (URI_SAFE_ATTRIBUTES[lcName]) ;else if (regExpTest(IS_ALLOWED_URI$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ;else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ;else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$$1, stringReplace(value, ATTR_WHITESPACE$$1, ''))) ;else if (!value) ;else {
56588
+ return false;
56589
+ }
56590
+ return true;
56591
+ };
56592
+
56593
+ /**
56594
+ * _sanitizeAttributes
56595
+ *
56596
+ * @protect attributes
56597
+ * @protect nodeName
56598
+ * @protect removeAttribute
56599
+ * @protect setAttribute
56600
+ *
56601
+ * @param {Node} currentNode to sanitize
56602
+ */
56603
+ // eslint-disable-next-line complexity
56604
+ var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
56605
+ var attr = void 0;
56606
+ var value = void 0;
56607
+ var lcName = void 0;
56608
+ var idAttr = void 0;
56609
+ var l = void 0;
56610
+ /* Execute a hook if present */
56611
+ _executeHook('beforeSanitizeAttributes', currentNode, null);
56612
+ var attributes = currentNode.attributes;
56613
+
56614
+ /* Check if we have attributes; if not we might have a text node */
56615
+
56616
+ if (!attributes) {
56617
+ return;
56618
+ }
56619
+ var hookEvent = {
56620
+ attrName: '',
56621
+ attrValue: '',
56622
+ keepAttr: true,
56623
+ allowedAttributes: ALLOWED_ATTR
56624
+ };
56625
+ l = attributes.length;
56626
+
56627
+ /* Go backwards over all attributes; safely remove bad ones */
56628
+ while (l--) {
56629
+ attr = attributes[l];
56630
+ var _attr = attr,
56631
+ name = _attr.name,
56632
+ namespaceURI = _attr.namespaceURI;
56633
+ value = stringTrim(attr.value);
56634
+ lcName = stringToLowerCase(name);
56635
+
56636
+ /* Execute a hook if present */
56637
+ hookEvent.attrName = lcName;
56638
+ hookEvent.attrValue = value;
56639
+ hookEvent.keepAttr = true;
56640
+ hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
56641
+ _executeHook('uponSanitizeAttribute', currentNode, hookEvent);
56642
+ value = hookEvent.attrValue;
56643
+ /* Did the hooks approve of the attribute? */
56644
+ if (hookEvent.forceKeepAttr) {
56645
+ continue;
56646
+ }
56647
+
56648
+ /* Remove attribute */
56649
+ // Safari (iOS + Mac), last tested v8.0.5, crashes if you try to
56650
+ // remove a "name" attribute from an <img> tag that has an "id"
56651
+ // attribute at the time.
56652
+ if (lcName === 'name' && currentNode.nodeName === 'IMG' && attributes.id) {
56653
+ idAttr = attributes.id;
56654
+ attributes = arraySlice(attributes, []);
56655
+ _removeAttribute('id', currentNode);
56656
+ _removeAttribute(name, currentNode);
56657
+ if (arrayIndexOf(attributes, idAttr) > l) {
56658
+ currentNode.setAttribute('id', idAttr.value);
56659
+ }
56660
+ } else if (
56661
+ // This works around a bug in Safari, where input[type=file]
56662
+ // cannot be dynamically set after type has been removed
56663
+ currentNode.nodeName === 'INPUT' && lcName === 'type' && value === 'file' && hookEvent.keepAttr && (ALLOWED_ATTR[lcName] || !FORBID_ATTR[lcName])) {
56664
+ continue;
56665
+ } else {
56666
+ // This avoids a crash in Safari v9.0 with double-ids.
56667
+ // The trick is to first set the id to be empty and then to
56668
+ // remove the attribute
56669
+ if (name === 'id') {
56670
+ currentNode.setAttribute(name, '');
56671
+ }
56672
+ _removeAttribute(name, currentNode);
56673
+ }
56674
+
56675
+ /* Did the hooks approve of the attribute? */
56676
+ if (!hookEvent.keepAttr) {
56677
+ continue;
56678
+ }
56679
+
56680
+ /* Work around a security issue in jQuery 3.0 */
56681
+ if (SAFE_FOR_JQUERY && regExpTest(/\/>/i, value)) {
56682
+ _removeAttribute(name, currentNode);
56683
+ continue;
56684
+ }
56685
+
56686
+ /* Take care of an mXSS pattern using namespace switches */
56687
+ if (regExpTest(/svg|math/i, currentNode.namespaceURI) && regExpTest(regExpCreate('</(' + arrayJoin(objectKeys(FORBID_CONTENTS), '|') + ')', 'i'), value)) {
56688
+ _removeAttribute(name, currentNode);
56689
+ continue;
56690
+ }
56691
+
56692
+ /* Sanitize attribute content to be template-safe */
56693
+ if (SAFE_FOR_TEMPLATES) {
56694
+ value = stringReplace(value, MUSTACHE_EXPR$$1, ' ');
56695
+ value = stringReplace(value, ERB_EXPR$$1, ' ');
56696
+ }
56697
+
56698
+ /* Is `value` valid for this attribute? */
56699
+ var lcTag = currentNode.nodeName.toLowerCase();
56700
+ if (!_isValidAttribute(lcTag, lcName, value)) {
56701
+ continue;
56702
+ }
56703
+
56704
+ /* Handle invalid data-* attribute set by try-catching it */
56705
+ try {
56706
+ if (namespaceURI) {
56707
+ currentNode.setAttributeNS(namespaceURI, name, value);
56708
+ } else {
56709
+ /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
56710
+ currentNode.setAttribute(name, value);
56711
+ }
56712
+ arrayPop(DOMPurify.removed);
56713
+ } catch (_) {}
56714
+ }
56715
+
56716
+ /* Execute a hook if present */
56717
+ _executeHook('afterSanitizeAttributes', currentNode, null);
56718
+ };
56719
+
56720
+ /**
56721
+ * _sanitizeShadowDOM
56722
+ *
56723
+ * @param {DocumentFragment} fragment to iterate over recursively
56724
+ */
56725
+ var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
56726
+ var shadowNode = void 0;
56727
+ var shadowIterator = _createIterator(fragment);
56728
+
56729
+ /* Execute a hook if present */
56730
+ _executeHook('beforeSanitizeShadowDOM', fragment, null);
56731
+ while (shadowNode = shadowIterator.nextNode()) {
56732
+ /* Execute a hook if present */
56733
+ _executeHook('uponSanitizeShadowNode', shadowNode, null);
56734
+
56735
+ /* Sanitize tags and elements */
56736
+ if (_sanitizeElements(shadowNode)) {
56737
+ continue;
56738
+ }
56739
+
56740
+ /* Deep shadow DOM detected */
56741
+ if (shadowNode.content instanceof DocumentFragment) {
56742
+ _sanitizeShadowDOM(shadowNode.content);
56743
+ }
56744
+
56745
+ /* Check attributes, sanitize if necessary */
56746
+ _sanitizeAttributes(shadowNode);
56747
+ }
56748
+
56749
+ /* Execute a hook if present */
56750
+ _executeHook('afterSanitizeShadowDOM', fragment, null);
56751
+ };
56752
+
56753
+ /**
56754
+ * Sanitize
56755
+ * Public method providing core sanitation functionality
56756
+ *
56757
+ * @param {String|Node} dirty string or DOM node
56758
+ * @param {Object} configuration object
56759
+ */
56760
+ // eslint-disable-next-line complexity
56761
+ DOMPurify.sanitize = function (dirty, cfg) {
56762
+ var body = void 0;
56763
+ var importedNode = void 0;
56764
+ var currentNode = void 0;
56765
+ var oldNode = void 0;
56766
+ var returnNode = void 0;
56767
+ /* Make sure we have a string to sanitize.
56768
+ DO NOT return early, as this will return the wrong type if
56769
+ the user has requested a DOM object rather than a string */
56770
+ if (!dirty) {
56771
+ dirty = '<!-->';
56772
+ }
56773
+
56774
+ /* Stringify, in case dirty is an object */
56775
+ if (typeof dirty !== 'string' && !_isNode(dirty)) {
56776
+ // eslint-disable-next-line no-negated-condition
56777
+ if (typeof dirty.toString !== 'function') {
56778
+ throw typeErrorCreate('toString is not a function');
56779
+ } else {
56780
+ dirty = dirty.toString();
56781
+ if (typeof dirty !== 'string') {
56782
+ throw typeErrorCreate('dirty is not a string, aborting');
56783
+ }
56784
+ }
56785
+ }
56786
+
56787
+ /* Check we can run. Otherwise fall back or ignore */
56788
+ if (!DOMPurify.isSupported) {
56789
+ if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {
56790
+ if (typeof dirty === 'string') {
56791
+ return window.toStaticHTML(dirty);
56792
+ }
56793
+ if (_isNode(dirty)) {
56794
+ return window.toStaticHTML(dirty.outerHTML);
56795
+ }
56796
+ }
56797
+ return dirty;
56798
+ }
56799
+
56800
+ /* Assign config vars */
56801
+ if (!SET_CONFIG) {
56802
+ _parseConfig(cfg);
56803
+ }
56804
+
56805
+ /* Clean up removed elements */
56806
+ DOMPurify.removed = [];
56807
+
56808
+ /* Check if dirty is correctly typed for IN_PLACE */
56809
+ if (typeof dirty === 'string') {
56810
+ IN_PLACE = false;
56811
+ }
56812
+ if (IN_PLACE) ;else if (dirty instanceof Node) {
56813
+ /* If dirty is a DOM element, append to an empty document to avoid
56814
+ elements being stripped by the parser */
56815
+ body = _initDocument('<!-->');
56816
+ importedNode = body.ownerDocument.importNode(dirty, true);
56817
+ if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {
56818
+ /* Node is already a body, use as is */
56819
+ body = importedNode;
56820
+ } else if (importedNode.nodeName === 'HTML') {
56821
+ body = importedNode;
56822
+ } else {
56823
+ // eslint-disable-next-line unicorn/prefer-node-append
56824
+ body.appendChild(importedNode);
56825
+ }
56826
+ } else {
56827
+ /* Exit directly if we have nothing to do */
56828
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
56829
+ // eslint-disable-next-line unicorn/prefer-includes
56830
+ dirty.indexOf('<') === -1) {
56831
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
56832
+ }
56833
+
56834
+ /* Initialize the document to work on */
56835
+ body = _initDocument(dirty);
56836
+
56837
+ /* Check we have a DOM node from the data */
56838
+ if (!body) {
56839
+ return RETURN_DOM ? null : emptyHTML;
56840
+ }
56841
+ }
56842
+
56843
+ /* Remove first element node (ours) if FORCE_BODY is set */
56844
+ if (body && FORCE_BODY) {
56845
+ _forceRemove(body.firstChild);
56846
+ }
56847
+
56848
+ /* Get node iterator */
56849
+ var nodeIterator = _createIterator(IN_PLACE ? dirty : body);
56850
+
56851
+ /* Now start iterating over the created document */
56852
+ while (currentNode = nodeIterator.nextNode()) {
56853
+ /* Fix IE's strange behavior with manipulated textNodes #89 */
56854
+ if (currentNode.nodeType === 3 && currentNode === oldNode) {
56855
+ continue;
56856
+ }
56857
+
56858
+ /* Sanitize tags and elements */
56859
+ if (_sanitizeElements(currentNode)) {
56860
+ continue;
56861
+ }
56862
+
56863
+ /* Shadow DOM detected, sanitize it */
56864
+ if (currentNode.content instanceof DocumentFragment) {
56865
+ _sanitizeShadowDOM(currentNode.content);
56866
+ }
56867
+
56868
+ /* Check attributes, sanitize if necessary */
56869
+ _sanitizeAttributes(currentNode);
56870
+ oldNode = currentNode;
56871
+ }
56872
+ oldNode = null;
56873
+
56874
+ /* If we sanitized `dirty` in-place, return it. */
56875
+ if (IN_PLACE) {
56876
+ return dirty;
56877
+ }
56878
+
56879
+ /* Return sanitized string or DOM */
56880
+ if (RETURN_DOM) {
56881
+ if (RETURN_DOM_FRAGMENT) {
56882
+ returnNode = createDocumentFragment.call(body.ownerDocument);
56883
+ while (body.firstChild) {
56884
+ // eslint-disable-next-line unicorn/prefer-node-append
56885
+ returnNode.appendChild(body.firstChild);
56886
+ }
56887
+ } else {
56888
+ returnNode = body;
56889
+ }
56890
+ if (RETURN_DOM_IMPORT) {
56891
+ /*
56892
+ AdoptNode() is not used because internal state is not reset
56893
+ (e.g. the past names map of a HTMLFormElement), this is safe
56894
+ in theory but we would rather not risk another attack vector.
56895
+ The state that is cloned by importNode() is explicitly defined
56896
+ by the specs.
56897
+ */
56898
+ returnNode = importNode.call(originalDocument, returnNode, true);
56899
+ }
56900
+ return returnNode;
56901
+ }
56902
+ var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
56903
+
56904
+ /* Sanitize final string template-safe */
56905
+ if (SAFE_FOR_TEMPLATES) {
56906
+ serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$$1, ' ');
56907
+ serializedHTML = stringReplace(serializedHTML, ERB_EXPR$$1, ' ');
56908
+ }
56909
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
56910
+ };
56911
+
56912
+ /**
56913
+ * Public method to set the configuration once
56914
+ * setConfig
56915
+ *
56916
+ * @param {Object} cfg configuration object
56917
+ */
56918
+ DOMPurify.setConfig = function (cfg) {
56919
+ _parseConfig(cfg);
56920
+ SET_CONFIG = true;
56921
+ };
56922
+
56923
+ /**
56924
+ * Public method to remove the configuration
56925
+ * clearConfig
56926
+ *
56927
+ */
56928
+ DOMPurify.clearConfig = function () {
56929
+ CONFIG = null;
56930
+ SET_CONFIG = false;
56931
+ };
56932
+
56933
+ /**
56934
+ * Public method to check if an attribute value is valid.
56935
+ * Uses last set config, if any. Otherwise, uses config defaults.
56936
+ * isValidAttribute
56937
+ *
56938
+ * @param {string} tag Tag name of containing element.
56939
+ * @param {string} attr Attribute name.
56940
+ * @param {string} value Attribute value.
56941
+ * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
56942
+ */
56943
+ DOMPurify.isValidAttribute = function (tag, attr, value) {
56944
+ /* Initialize shared config vars if necessary. */
56945
+ if (!CONFIG) {
56946
+ _parseConfig({});
56947
+ }
56948
+ var lcTag = stringToLowerCase(tag);
56949
+ var lcName = stringToLowerCase(attr);
56950
+ return _isValidAttribute(lcTag, lcName, value);
56951
+ };
56952
+
56953
+ /**
56954
+ * AddHook
56955
+ * Public method to add DOMPurify hooks
56956
+ *
56957
+ * @param {String} entryPoint entry point for the hook to add
56958
+ * @param {Function} hookFunction function to execute
56959
+ */
56960
+ DOMPurify.addHook = function (entryPoint, hookFunction) {
56961
+ if (typeof hookFunction !== 'function') {
56962
+ return;
56963
+ }
56964
+ hooks[entryPoint] = hooks[entryPoint] || [];
56965
+ arrayPush(hooks[entryPoint], hookFunction);
56966
+ };
56967
+
56968
+ /**
56969
+ * RemoveHook
56970
+ * Public method to remove a DOMPurify hook at a given entryPoint
56971
+ * (pops it from the stack of hooks if more are present)
56972
+ *
56973
+ * @param {String} entryPoint entry point for the hook to remove
56974
+ */
56975
+ DOMPurify.removeHook = function (entryPoint) {
56976
+ if (hooks[entryPoint]) {
56977
+ arrayPop(hooks[entryPoint]);
56978
+ }
56979
+ };
56980
+
56981
+ /**
56982
+ * RemoveHooks
56983
+ * Public method to remove all DOMPurify hooks at a given entryPoint
56984
+ *
56985
+ * @param {String} entryPoint entry point for the hooks to remove
56986
+ */
56987
+ DOMPurify.removeHooks = function (entryPoint) {
56988
+ if (hooks[entryPoint]) {
56989
+ hooks[entryPoint] = [];
56990
+ }
56991
+ };
56992
+
56993
+ /**
56994
+ * RemoveAllHooks
56995
+ * Public method to remove all DOMPurify hooks
56996
+ *
56997
+ */
56998
+ DOMPurify.removeAllHooks = function () {
56999
+ hooks = {};
57000
+ };
57001
+ return DOMPurify;
57002
+ }
57003
+ var purify = createDOMPurify();
57004
+ return purify;
57005
+ });
57006
+ });
57007
+
55845
57008
  var css_248z$3 = ".utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper {\r\n position: absolute;\r\n /* right: 50px;\r\n bottom: 30px; */\r\n z-index: 9999;\r\n height: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatIcon {\r\n position: absolute;\r\n right: 0;\r\n bottom: 0px;\r\n background: #1d5ab9;\r\n border-radius: 50%;\r\n width: 60px;\r\n height: 60px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n border: 5px solid #fff;\r\n box-shadow: 0 0px 6px #c1c1c1;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n position: absolute;\r\n /* right: 0;\r\n bottom: 68px; */\r\n box-shadow: 0 0px 6px #c1c1c1;\r\n height: 600px;\r\n width: 500px;\r\n border-radius: 8px;\r\n overflow: hidden;\r\n display: flex;\r\n flex-direction: column;\r\n background: #fff;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--spinner{\r\n position: absolute;\r\n background: rgba(0, 0, 0, 0.5);\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n cursor: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader {\r\n background: #1d5ab9;\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 15px;\r\n align-items: center;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowHeader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--title {\r\n font-size: 16px;\r\n font-weight: 600;\r\n line-height: 22px;\r\n color: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody {\r\n flex: 1;\r\n padding: 12px 36px;\r\n overflow: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatVisible {\r\n padding-top: 56px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer {\r\n padding: 8px 0;\r\n border-bottom: 1px solid #d1d1d1;\r\n display: flex;\r\n justify-content: end;\r\n align-items: center;\r\n grid-gap: 12px;\r\n gap: 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatVisible .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer {\r\n position: absolute;\r\n width: calc(100% - 72px);\r\n top: 57px;\r\n background: #fff;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messagesContainer {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 16px;\r\n gap: 16px;\r\n cursor: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatContainer .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--newChatButton {\r\n display: flex;\r\n align-items: center;\r\n grid-gap: 6px;\r\n gap: 6px;\r\n cursor: pointer;\r\n border: 1px solid #d1d1d1;\r\n border-radius: 4px;\r\n padding: 6px 12px;\r\n font-weight: 600;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message {\r\n display: flex;\r\n align-items: flex-start;\r\n grid-gap: 10px;\r\n gap: 10px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--user {\r\n justify-content: flex-end;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--welcomeQuestion {\r\n margin-top: 5px;\r\n margin-left: 36px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions {\r\n display: flex;\r\n flex-direction: column;\r\n grid-gap: 12px;\r\n gap: 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestionWrapper {\r\n display: flex;\r\n flex-direction: row-reverse;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestionContainer {\r\n max-width: 95%;\r\n word-break: break-all;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestions .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--quickQuestion {\r\n border: 1px solid #3261bd;\r\n border-radius: 16px;\r\n padding: 6px 8px;\r\n font-size: 14px;\r\n color: #3261bd;\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--agentIcon {\r\n width: 26px;\r\n border-radius: 50%;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble {\r\n background-color: #f5f5f5;\r\n border-radius: 0px 12px 12px 12px;\r\n padding: 10px 15px;\r\n max-width: 85%;\r\n font-size: 14px;\r\n line-height: 1.5;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--error {\r\n border: 1px solid #f1bbbc;\r\n background: #fdf6f6;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--message.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--user .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble {\r\n background: #3261bd;\r\n color: #fff;\r\n border-radius: 12px 0px 12px 12px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--feedbackContainer {\r\n display: flex;\r\n grid-gap: 8px;\r\n gap: 8px;\r\n margin-top: 10px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--feedbackContainer i {\r\n cursor: pointer;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p {\r\n margin: 0;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p a {\r\n color: #1e54ad;\r\n text-decoration: underline;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p ol,\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowBody .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--messageBubble p ul {\r\n padding-left: 15px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindowFooter {\r\n border-top: 1px solid #d1d1d1;\r\n padding: 16px 24px;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer {\r\n display: flex;\r\n align-items: center;\r\n border: 1px solid #ddd;\r\n border-radius: 12px;\r\n padding: 10px 15px;\r\n cursor: auto;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--disabled {\r\n background-color: #fafafa;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input {\r\n border: none;\r\n outline: none;\r\n flex-grow: 1;\r\n font-size: 14px !important;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-webkit-input-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-moz-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::-ms-input-placeholder {\r\n color: #757575;\r\n}\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--inputContainer input:disabled::placeholder {\r\n color: #757575;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 10px;\r\n width: 75px;\r\n background-color: #f5f5f5;\r\n border-radius: 0px 12px 12px 12px;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot {\r\n width: 8px;\r\n height: 8px;\r\n margin: 0 3px;\r\n background-color: #3261bd;\r\n border-radius: 50%;\r\n display: inline-block;\r\n -webkit-animation: utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce 1.2s infinite ease-in-out both;\r\n animation: utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce 1.2s infinite ease-in-out both;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot:nth-child(1) {\r\n -webkit-animation-delay: -0.32s;\r\n animation-delay: -0.32s;\r\n}\r\n\r\n.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatbotLoader .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--dot:nth-child(2) {\r\n -webkit-animation-delay: -0.16s;\r\n animation-delay: -0.16s;\r\n}\r\n\r\n@-webkit-keyframes utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce {\r\n 0%,\r\n 80%,\r\n 100% {\r\n -webkit-transform: scale(0);\r\n transform: scale(0);\r\n }\r\n 40% {\r\n -webkit-transform: scale(1);\r\n transform: scale(1);\r\n }\r\n}\r\n\r\n@keyframes utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--bounce {\r\n 0%,\r\n 80%,\r\n 100% {\r\n -webkit-transform: scale(0);\r\n transform: scale(0);\r\n }\r\n 40% {\r\n -webkit-transform: scale(1);\r\n transform: scale(1);\r\n }\r\n}\r\n\r\n@media (max-width: 575px) {\r\n /* .mihelpAgentWrapper {\r\n right: 20px;\r\n bottom: 100px;\r\n } */\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper.utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--iphoneChrome {\r\n bottom: 125px;\r\n }\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 450px;\r\n }\r\n}\r\n\r\n@media (max-width: 475px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 400px;\r\n }\r\n}\r\n\r\n@media (max-width: 425px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 350px;\r\n }\r\n}\r\n\r\n@media (max-width: 375px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 325px;\r\n }\r\n}\r\n\r\n@media (max-width: 350px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 300px;\r\n }\r\n}\r\n\r\n@media (max-width: 325px) {\r\n .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--mihelpAgentWrapper .utilities_ops-app-frame_MiHelpAgent_MiHelpAgent--chatWindow {\r\n width: 275px;\r\n }\r\n}\r\n";
55846
57009
  styleInject(css_248z$3);
55847
57010
 
@@ -55880,10 +57043,9 @@ var _styleModuleImportMap$2 = {
55880
57043
  };
55881
57044
  var MiHelpAgent = function MiHelpAgent(_ref) {
55882
57045
  var _ref$quickReplies = _ref.quickReplies,
55883
- quickReplies = _ref$quickReplies === void 0 ? [] : _ref$quickReplies,
55884
- _ref$collection = _ref.collection,
55885
- collection = _ref$collection === void 0 ? '' : _ref$collection,
55886
- _ref$systemPrompt = _ref.systemPrompt,
57046
+ quickReplies = _ref$quickReplies === void 0 ? [] : _ref$quickReplies;
57047
+ _ref.collection;
57048
+ var _ref$systemPrompt = _ref.systemPrompt,
55887
57049
  systemPrompt = _ref$systemPrompt === void 0 ? '' : _ref$systemPrompt,
55888
57050
  _ref$contextMessagesC = _ref.contextMessagesCount,
55889
57051
  contextMessagesCount = _ref$contextMessagesC === void 0 ? 5 : _ref$contextMessagesC,
@@ -55904,8 +57066,8 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
55904
57066
  setIsFeedbackLoading = _useState6[1];
55905
57067
  var _useState7 = React.useState(false),
55906
57068
  _useState8 = _slicedToArray(_useState7, 2),
55907
- collectionError = _useState8[0],
55908
- setCollectionError = _useState8[1];
57069
+ collectionError = _useState8[0];
57070
+ _useState8[1];
55909
57071
  var retryCount = React.useRef(0);
55910
57072
  var messagesContainerRef = React.useRef(null);
55911
57073
  var inputContainerRef = React.useRef(null);
@@ -56261,6 +57423,14 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
56261
57423
  appContext: JSON.stringify(context)
56262
57424
  });
56263
57425
  };
57426
+ var sanitizeMessages = function sanitizeMessages() {
57427
+ var messages = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
57428
+ return messages.map(function (m) {
57429
+ return _objectSpread2(_objectSpread2({}, m), {}, {
57430
+ content: purify$2.sanitize(m === null || m === void 0 ? void 0 : m.content)
57431
+ });
57432
+ });
57433
+ };
56264
57434
  var send = /*#__PURE__*/function () {
56265
57435
  var _ref2 = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(messages) {
56266
57436
  var _window$toolkitEnv, _window$toolkitEnv2, _window$toolkitEnv3, _storage$getLocalItem, _storage$getLocalItem2, _response$data, _response$data2, newMessages, isCoreApp, appTiles, appName, appData, appAuthName, currentAppName, messagesWithOutId, payload, endpoint, response, newConversations;
@@ -56270,7 +57440,7 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
56270
57440
  setIsLoading(true);
56271
57441
  setMessageError(false);
56272
57442
  _context.prev = 2;
56273
- newMessages = _toConsumableArray(messages);
57443
+ newMessages = _toConsumableArray(sanitizeMessages(messages));
56274
57444
  isCoreApp = (_window$toolkitEnv = window.toolkitEnv) !== null && _window$toolkitEnv !== void 0 && _window$toolkitEnv.IS_CORE_APP ? window.toolkitEnv.IS_CORE_APP : process.env.IS_CORE_APP;
56275
57445
  appTiles = storage$1.getLocalItem('opsportal-core:config').tiles || [];
56276
57446
  appName = (_window$toolkitEnv2 = window.toolkitEnv) !== null && _window$toolkitEnv2 !== void 0 && _window$toolkitEnv2.APP_NAME ? window.toolkitEnv.APP_NAME : process.env.APP_NAME;
@@ -56386,12 +57556,15 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
56386
57556
  scroll();
56387
57557
  }
56388
57558
  }, [conversations, showChatWindow]);
56389
- React.useEffect(function () {
56390
- if (!collection || typeof collection !== 'string') {
56391
- console.log('Collection is not of type string');
56392
- setCollectionError(true);
56393
- }
56394
- }, [collection]);
57559
+ // useEffect(
57560
+ // () => {
57561
+ // if (!collection || typeof collection !== 'string') {
57562
+ // console.log('Collection is not of type string')
57563
+ // setCollectionError(true)
57564
+ // }
57565
+ // },
57566
+ // [collection],
57567
+ // )
56395
57568
  React.useEffect(function () {
56396
57569
  if (quickReplies.length) {
56397
57570
  try {
@@ -56719,7 +57892,7 @@ var MiHelpAgent = function MiHelpAgent(_ref) {
56719
57892
  })), function () {
56720
57893
  var userCount = 0;
56721
57894
  var agentCount = 2;
56722
- return conversations.filter(function (c) {
57895
+ return sanitizeMessages(conversations).filter(function (c) {
56723
57896
  return (c === null || c === void 0 ? void 0 : c.role) !== 'system';
56724
57897
  }).map(function (conversation) {
56725
57898
  var isUser = (conversation === null || conversation === void 0 ? void 0 : conversation.role) === 'user';
@@ -79964,7 +81137,7 @@ var index_esm = /*#__PURE__*/Object.freeze({
79964
81137
  });
79965
81138
 
79966
81139
  var purify = createCommonjsModule(function (module, exports) {
79967
- /*! @license DOMPurify 3.2.5 | (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.5/LICENSE */
81140
+ /*! @license DOMPurify 3.2.6 | (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.6/LICENSE */
79968
81141
 
79969
81142
  (function (global, factory) {
79970
81143
  module.exports = factory() ;
@@ -80170,7 +81343,7 @@ var purify = createCommonjsModule(function (module, exports) {
80170
81343
  const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
80171
81344
  const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
80172
81345
  const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
80173
- const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
81346
+ const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
80174
81347
  );
80175
81348
 
80176
81349
  const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
@@ -80269,7 +81442,7 @@ var purify = createCommonjsModule(function (module, exports) {
80269
81442
  function createDOMPurify() {
80270
81443
  let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
80271
81444
  const DOMPurify = root => createDOMPurify(root);
80272
- DOMPurify.version = '3.2.5';
81445
+ DOMPurify.version = '3.2.6';
80273
81446
  DOMPurify.removed = [];
80274
81447
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
80275
81448
  // Not running in a browser, provide a factory function
@@ -80508,8 +81681,8 @@ var purify = createCommonjsModule(function (module, exports) {
80508
81681
  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;
80509
81682
  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;
80510
81683
  FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
80511
- FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
80512
- FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
81684
+ FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
81685
+ FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
80513
81686
  USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
80514
81687
  ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
80515
81688
  ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
@@ -80874,7 +82047,7 @@ var purify = createCommonjsModule(function (module, exports) {
80874
82047
  allowedTags: ALLOWED_TAGS
80875
82048
  });
80876
82049
  /* Detect mXSS attempts abusing namespace confusion */
80877
- if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
82050
+ if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
80878
82051
  _forceRemove(currentNode);
80879
82052
  return true;
80880
82053
  }
@@ -81026,7 +82199,8 @@ var purify = createCommonjsModule(function (module, exports) {
81026
82199
  value: attrValue
81027
82200
  } = attr;
81028
82201
  const lcName = transformCaseFunc(name);
81029
- let value = name === 'value' ? attrValue : stringTrim(attrValue);
82202
+ const initValue = attrValue;
82203
+ let value = name === 'value' ? initValue : stringTrim(initValue);
81030
82204
  /* Execute a hook if present */
81031
82205
  hookEvent.attrName = lcName;
81032
82206
  hookEvent.attrValue = value;
@@ -81052,10 +82226,9 @@ var purify = createCommonjsModule(function (module, exports) {
81052
82226
  if (hookEvent.forceKeepAttr) {
81053
82227
  continue;
81054
82228
  }
81055
- /* Remove attribute */
81056
- _removeAttribute(name, currentNode);
81057
82229
  /* Did the hooks approve of the attribute? */
81058
82230
  if (!hookEvent.keepAttr) {
82231
+ _removeAttribute(name, currentNode);
81059
82232
  continue;
81060
82233
  }
81061
82234
  /* Work around a security issue in jQuery 3.0 */
@@ -81072,6 +82245,7 @@ var purify = createCommonjsModule(function (module, exports) {
81072
82245
  /* Is `value` valid for this attribute? */
81073
82246
  const lcTag = transformCaseFunc(currentNode.nodeName);
81074
82247
  if (!_isValidAttribute(lcTag, lcName, value)) {
82248
+ _removeAttribute(name, currentNode);
81075
82249
  continue;
81076
82250
  }
81077
82251
  /* Handle attributes that require Trusted Types */
@@ -81092,19 +82266,23 @@ var purify = createCommonjsModule(function (module, exports) {
81092
82266
  }
81093
82267
  }
81094
82268
  /* Handle invalid data-* attribute set by try-catching it */
81095
- try {
81096
- if (namespaceURI) {
81097
- currentNode.setAttributeNS(namespaceURI, name, value);
81098
- } else {
81099
- /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
81100
- currentNode.setAttribute(name, value);
81101
- }
81102
- if (_isClobbered(currentNode)) {
81103
- _forceRemove(currentNode);
81104
- } else {
81105
- arrayPop(DOMPurify.removed);
82269
+ if (value !== initValue) {
82270
+ try {
82271
+ if (namespaceURI) {
82272
+ currentNode.setAttributeNS(namespaceURI, name, value);
82273
+ } else {
82274
+ /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
82275
+ currentNode.setAttribute(name, value);
82276
+ }
82277
+ if (_isClobbered(currentNode)) {
82278
+ _forceRemove(currentNode);
82279
+ } else {
82280
+ arrayPop(DOMPurify.removed);
82281
+ }
82282
+ } catch (_) {
82283
+ _removeAttribute(name, currentNode);
81106
82284
  }
81107
- } catch (_) {}
82285
+ }
81108
82286
  }
81109
82287
  /* Execute a hook if present */
81110
82288
  _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);