@appbaseio/reactivesearch-vue 3.3.4 → 3.3.6
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.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +327 -243
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{DropDown-815d458e.js → DropDown-7ee915d1.js} +1 -1
- package/dist/cjs/DynamicRangeSlider.js +1 -1
- package/dist/cjs/MultiDropdownList.js +2 -2
- package/dist/cjs/MultiList.js +1 -1
- package/dist/cjs/MultiRange.js +1 -1
- package/dist/cjs/{Pagination-accd2fbf.js → Pagination-8bda127c.js} +1 -1
- package/dist/cjs/RangeInput.js +1 -1
- package/dist/cjs/RangeSlider.js +1 -1
- package/dist/cjs/ReactiveBase.js +1 -1
- package/dist/cjs/ReactiveComponent.js +1 -1
- package/dist/cjs/ReactiveGoogleMap.js +4 -4
- package/dist/cjs/ReactiveList.js +2 -2
- package/dist/cjs/ResultCard.js +1 -1
- package/dist/cjs/ResultList.js +1 -1
- package/dist/cjs/{SearchBox-376d32c4.js → SearchBox-17eeed1a.js} +2 -2
- package/dist/cjs/SearchBox.js +2 -2
- package/dist/cjs/SelectedFilters.js +1 -1
- package/dist/cjs/SingleDropdownList.js +2 -2
- package/dist/cjs/SingleList.js +1 -1
- package/dist/cjs/SingleRange.js +1 -1
- package/dist/cjs/ToggleButton.js +1 -1
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/{install-b9ecb6e6.js → install-3b410ce1.js} +3 -15
- package/dist/cjs/install.js +5 -5
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-289a891a.js → vueTypes-adf43075.js} +16 -4
- package/dist/es/{DropDown-f8049812.js → DropDown-0a5b7036.js} +1 -1
- package/dist/es/DynamicRangeSlider.js +1 -1
- package/dist/es/MultiDropdownList.js +2 -2
- package/dist/es/MultiList.js +1 -1
- package/dist/es/MultiRange.js +1 -1
- package/dist/es/{Pagination-b2160aac.js → Pagination-80244481.js} +1 -1
- package/dist/es/RangeInput.js +1 -1
- package/dist/es/RangeSlider.js +1 -1
- package/dist/es/ReactiveBase.js +1 -1
- package/dist/es/ReactiveComponent.js +1 -1
- package/dist/es/ReactiveGoogleMap.js +4 -4
- package/dist/es/ReactiveList.js +2 -2
- package/dist/es/ResultCard.js +1 -1
- package/dist/es/ResultList.js +1 -1
- package/dist/es/{SearchBox-fbe24e59.js → SearchBox-81bbbe04.js} +6 -6
- package/dist/es/SearchBox.js +2 -2
- package/dist/es/SelectedFilters.js +1 -1
- package/dist/es/SingleDropdownList.js +2 -2
- package/dist/es/SingleList.js +1 -1
- package/dist/es/SingleRange.js +1 -1
- package/dist/es/ToggleButton.js +1 -1
- package/dist/es/index.js +6 -6
- package/dist/es/{install-d73241e0.js → install-16ae86fa.js} +3 -15
- package/dist/es/install.js +5 -5
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-f503e267.js → vueTypes-5d575822.js} +16 -4
- package/package.json +2 -2
|
@@ -12516,7 +12516,10 @@
|
|
|
12516
12516
|
var types = {
|
|
12517
12517
|
any: Q.any,
|
|
12518
12518
|
bool: Q.bool,
|
|
12519
|
-
boolRequired:
|
|
12519
|
+
boolRequired: {
|
|
12520
|
+
type: Boolean,
|
|
12521
|
+
required: true
|
|
12522
|
+
},
|
|
12520
12523
|
components: Q.arrayOf(Q.string),
|
|
12521
12524
|
compoundClause: Q.oneOf(['filter', 'must']),
|
|
12522
12525
|
children: Q.any,
|
|
@@ -12532,7 +12535,10 @@
|
|
|
12532
12535
|
excludeFields: Q.arrayOf(Q.string),
|
|
12533
12536
|
fieldWeights: Q.arrayOf(Q.number),
|
|
12534
12537
|
filterLabel: Q.string,
|
|
12535
|
-
func:
|
|
12538
|
+
func: {
|
|
12539
|
+
type: Function,
|
|
12540
|
+
required: false
|
|
12541
|
+
},
|
|
12536
12542
|
funcRequired: Q.func.isRequired,
|
|
12537
12543
|
fuzziness: Q.oneOf([0, 1, 2, 'AUTO']),
|
|
12538
12544
|
headers: Q.object,
|
|
@@ -12568,8 +12574,14 @@
|
|
|
12568
12574
|
})),
|
|
12569
12575
|
sortByWithCount: Q.oneOf(['asc', 'desc', 'count']),
|
|
12570
12576
|
stats: Q.arrayOf(Q.object),
|
|
12571
|
-
string:
|
|
12572
|
-
|
|
12577
|
+
string: {
|
|
12578
|
+
type: String,
|
|
12579
|
+
required: false
|
|
12580
|
+
},
|
|
12581
|
+
stringArray: {
|
|
12582
|
+
type: [String],
|
|
12583
|
+
required: false
|
|
12584
|
+
},
|
|
12573
12585
|
stringOrArray: Q.oneOfType([Q.string, Q.arrayOf(Q.string)]),
|
|
12574
12586
|
stringRequired: Q.string.isRequired,
|
|
12575
12587
|
style: Q.object,
|
|
@@ -17678,7 +17690,7 @@
|
|
|
17678
17690
|
};
|
|
17679
17691
|
|
|
17680
17692
|
/**!
|
|
17681
|
-
* hotkeys-js v3.13.
|
|
17693
|
+
* hotkeys-js v3.13.3
|
|
17682
17694
|
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
|
|
17683
17695
|
*
|
|
17684
17696
|
* Copyright (c) 2023 kenny wong <wowohoo@qq.com>
|
|
@@ -18276,7 +18288,7 @@
|
|
|
18276
18288
|
}
|
|
18277
18289
|
|
|
18278
18290
|
var purify = createCommonjsModule(function (module, exports) {
|
|
18279
|
-
/*! @license DOMPurify 3.
|
|
18291
|
+
/*! @license DOMPurify 3.1.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.1.5/LICENSE */
|
|
18280
18292
|
|
|
18281
18293
|
(function (global, factory) {
|
|
18282
18294
|
module.exports = factory() ;
|
|
@@ -18290,7 +18302,6 @@
|
|
|
18290
18302
|
var freeze = Object.freeze,
|
|
18291
18303
|
seal = Object.seal,
|
|
18292
18304
|
create = Object.create; // eslint-disable-line import/no-mutable-exports
|
|
18293
|
-
|
|
18294
18305
|
var _ref = typeof Reflect !== 'undefined' && Reflect,
|
|
18295
18306
|
apply = _ref.apply,
|
|
18296
18307
|
construct = _ref.construct;
|
|
@@ -18323,15 +18334,16 @@
|
|
|
18323
18334
|
var stringReplace = unapply(String.prototype.replace);
|
|
18324
18335
|
var stringIndexOf = unapply(String.prototype.indexOf);
|
|
18325
18336
|
var stringTrim = unapply(String.prototype.trim);
|
|
18337
|
+
var objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
|
|
18326
18338
|
var regExpTest = unapply(RegExp.prototype.test);
|
|
18327
18339
|
var typeErrorCreate = unconstruct(TypeError);
|
|
18340
|
+
|
|
18328
18341
|
/**
|
|
18329
18342
|
* Creates a new function that calls the given function with a specified thisArg and arguments.
|
|
18330
18343
|
*
|
|
18331
18344
|
* @param {Function} func - The function to be wrapped and called.
|
|
18332
18345
|
* @returns {Function} A new function that calls the given function with a specified thisArg and arguments.
|
|
18333
18346
|
*/
|
|
18334
|
-
|
|
18335
18347
|
function unapply(func) {
|
|
18336
18348
|
return function (thisArg) {
|
|
18337
18349
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
@@ -18340,13 +18352,13 @@
|
|
|
18340
18352
|
return apply(func, thisArg, args);
|
|
18341
18353
|
};
|
|
18342
18354
|
}
|
|
18355
|
+
|
|
18343
18356
|
/**
|
|
18344
18357
|
* Creates a new function that constructs an instance of the given constructor function with the provided arguments.
|
|
18345
18358
|
*
|
|
18346
18359
|
* @param {Function} func - The constructor function to be wrapped and called.
|
|
18347
18360
|
* @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.
|
|
18348
18361
|
*/
|
|
18349
|
-
|
|
18350
18362
|
function unconstruct(func) {
|
|
18351
18363
|
return function () {
|
|
18352
18364
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
@@ -18355,6 +18367,7 @@
|
|
|
18355
18367
|
return construct(func, args);
|
|
18356
18368
|
};
|
|
18357
18369
|
}
|
|
18370
|
+
|
|
18358
18371
|
/**
|
|
18359
18372
|
* Add properties to a lookup table
|
|
18360
18373
|
*
|
|
@@ -18363,7 +18376,6 @@
|
|
|
18363
18376
|
* @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.
|
|
18364
18377
|
* @returns {Object} The modified set with added elements.
|
|
18365
18378
|
*/
|
|
18366
|
-
|
|
18367
18379
|
function addToSet(set, array) {
|
|
18368
18380
|
var transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;
|
|
18369
18381
|
if (setPrototypeOf) {
|
|
@@ -18389,25 +18401,49 @@
|
|
|
18389
18401
|
}
|
|
18390
18402
|
return set;
|
|
18391
18403
|
}
|
|
18404
|
+
|
|
18405
|
+
/**
|
|
18406
|
+
* Clean up an array to harden against CSPP
|
|
18407
|
+
*
|
|
18408
|
+
* @param {Array} array - The array to be cleaned.
|
|
18409
|
+
* @returns {Array} The cleaned version of the array
|
|
18410
|
+
*/
|
|
18411
|
+
function cleanArray(array) {
|
|
18412
|
+
for (var index = 0; index < array.length; index++) {
|
|
18413
|
+
var isPropertyExist = objectHasOwnProperty(array, index);
|
|
18414
|
+
if (!isPropertyExist) {
|
|
18415
|
+
array[index] = null;
|
|
18416
|
+
}
|
|
18417
|
+
}
|
|
18418
|
+
return array;
|
|
18419
|
+
}
|
|
18420
|
+
|
|
18392
18421
|
/**
|
|
18393
18422
|
* Shallow clone an object
|
|
18394
18423
|
*
|
|
18395
18424
|
* @param {Object} object - The object to be cloned.
|
|
18396
18425
|
* @returns {Object} A new object that copies the original.
|
|
18397
18426
|
*/
|
|
18398
|
-
|
|
18399
18427
|
function clone(object) {
|
|
18400
18428
|
var newObject = create(null);
|
|
18401
18429
|
for (var _iterator = _createForOfIteratorHelperLoose(entries(object)), _step; !(_step = _iterator()).done;) {
|
|
18402
18430
|
var _step$value = _step.value,
|
|
18403
18431
|
property = _step$value[0],
|
|
18404
18432
|
value = _step$value[1];
|
|
18405
|
-
|
|
18406
|
-
|
|
18433
|
+
var isPropertyExist = objectHasOwnProperty(object, property);
|
|
18434
|
+
if (isPropertyExist) {
|
|
18435
|
+
if (Array.isArray(value)) {
|
|
18436
|
+
newObject[property] = cleanArray(value);
|
|
18437
|
+
} else if (value && typeof value === 'object' && value.constructor === Object) {
|
|
18438
|
+
newObject[property] = clone(value);
|
|
18439
|
+
} else {
|
|
18440
|
+
newObject[property] = value;
|
|
18441
|
+
}
|
|
18407
18442
|
}
|
|
18408
18443
|
}
|
|
18409
18444
|
return newObject;
|
|
18410
18445
|
}
|
|
18446
|
+
|
|
18411
18447
|
/**
|
|
18412
18448
|
* This method automatically checks if the prop is function or getter and behaves accordingly.
|
|
18413
18449
|
*
|
|
@@ -18415,7 +18451,6 @@
|
|
|
18415
18451
|
* @param {String} prop - The property name for which to find the getter function.
|
|
18416
18452
|
* @returns {Function} The getter function found in the prototype chain or a fallback function.
|
|
18417
18453
|
*/
|
|
18418
|
-
|
|
18419
18454
|
function lookupGetter(object, prop) {
|
|
18420
18455
|
while (object !== null) {
|
|
18421
18456
|
var desc = getOwnPropertyDescriptor(object, prop);
|
|
@@ -18429,44 +18464,46 @@
|
|
|
18429
18464
|
}
|
|
18430
18465
|
object = getPrototypeOf(object);
|
|
18431
18466
|
}
|
|
18432
|
-
function fallbackValue(
|
|
18433
|
-
console.warn('fallback value for', element);
|
|
18467
|
+
function fallbackValue() {
|
|
18434
18468
|
return null;
|
|
18435
18469
|
}
|
|
18436
18470
|
return fallbackValue;
|
|
18437
18471
|
}
|
|
18438
|
-
var html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
|
|
18472
|
+
var html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
|
|
18439
18473
|
|
|
18474
|
+
// SVG
|
|
18440
18475
|
var svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
|
|
18441
|
-
var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
|
|
18476
|
+
var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
|
|
18477
|
+
|
|
18478
|
+
// List of SVG elements that are disallowed by default.
|
|
18442
18479
|
// We still need to know them so that we can do namespace
|
|
18443
18480
|
// checks properly in case one wants to add them to
|
|
18444
18481
|
// allow-list.
|
|
18445
|
-
|
|
18446
18482
|
var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
|
|
18447
|
-
var 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']);
|
|
18448
|
-
// even those that we disallow by default.
|
|
18483
|
+
var 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']);
|
|
18449
18484
|
|
|
18485
|
+
// Similarly to SVG, we want to know all MathML elements,
|
|
18486
|
+
// even those that we disallow by default.
|
|
18450
18487
|
var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
|
|
18451
18488
|
var text = freeze(['#text']);
|
|
18452
|
-
var 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']);
|
|
18489
|
+
var 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']);
|
|
18453
18490
|
var 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']);
|
|
18454
18491
|
var 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']);
|
|
18455
18492
|
var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
|
|
18456
|
-
var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
|
|
18457
18493
|
|
|
18494
|
+
// eslint-disable-next-line unicorn/better-regex
|
|
18495
|
+
var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
|
|
18458
18496
|
var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
|
|
18459
18497
|
var TMPLIT_EXPR = seal(/\${[\w\W]*}/gm);
|
|
18460
18498
|
var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape
|
|
18461
|
-
|
|
18462
18499
|
var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
|
|
18463
|
-
|
|
18464
18500
|
var 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
|
|
18465
18501
|
);
|
|
18466
18502
|
var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
|
|
18467
18503
|
var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
|
|
18468
18504
|
);
|
|
18469
18505
|
var DOCTYPE_NAME = seal(/^html$/i);
|
|
18506
|
+
var CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
18470
18507
|
var EXPRESSIONS = /*#__PURE__*/Object.freeze({
|
|
18471
18508
|
__proto__: null,
|
|
18472
18509
|
MUSTACHE_EXPR: MUSTACHE_EXPR,
|
|
@@ -18477,27 +18514,47 @@
|
|
|
18477
18514
|
IS_ALLOWED_URI: IS_ALLOWED_URI,
|
|
18478
18515
|
IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
|
|
18479
18516
|
ATTR_WHITESPACE: ATTR_WHITESPACE,
|
|
18480
|
-
DOCTYPE_NAME: DOCTYPE_NAME
|
|
18517
|
+
DOCTYPE_NAME: DOCTYPE_NAME,
|
|
18518
|
+
CUSTOM_ELEMENT: CUSTOM_ELEMENT
|
|
18481
18519
|
});
|
|
18520
|
+
|
|
18521
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
|
18522
|
+
var NODE_TYPE = {
|
|
18523
|
+
element: 1,
|
|
18524
|
+
attribute: 2,
|
|
18525
|
+
text: 3,
|
|
18526
|
+
cdataSection: 4,
|
|
18527
|
+
entityReference: 5,
|
|
18528
|
+
// Deprecated
|
|
18529
|
+
entityNode: 6,
|
|
18530
|
+
// Deprecated
|
|
18531
|
+
progressingInstruction: 7,
|
|
18532
|
+
comment: 8,
|
|
18533
|
+
document: 9,
|
|
18534
|
+
documentType: 10,
|
|
18535
|
+
documentFragment: 11,
|
|
18536
|
+
notation: 12 // Deprecated
|
|
18537
|
+
};
|
|
18482
18538
|
var getGlobal = function getGlobal() {
|
|
18483
18539
|
return typeof window === 'undefined' ? null : window;
|
|
18484
18540
|
};
|
|
18541
|
+
|
|
18485
18542
|
/**
|
|
18486
18543
|
* Creates a no-op policy for internal use only.
|
|
18487
18544
|
* Don't export this function outside this module!
|
|
18488
|
-
* @param {
|
|
18545
|
+
* @param {TrustedTypePolicyFactory} trustedTypes The policy factory.
|
|
18489
18546
|
* @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
|
|
18490
|
-
* @return {
|
|
18547
|
+
* @return {TrustedTypePolicy} The policy created (or null, if Trusted Types
|
|
18491
18548
|
* are not supported or creating the policy failed).
|
|
18492
18549
|
*/
|
|
18493
|
-
|
|
18494
18550
|
var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
|
|
18495
18551
|
if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
|
|
18496
18552
|
return null;
|
|
18497
|
-
}
|
|
18553
|
+
}
|
|
18554
|
+
|
|
18555
|
+
// Allow the callers to control the unique policy name
|
|
18498
18556
|
// by adding a data-tt-policy-suffix to the script element with the DOMPurify.
|
|
18499
18557
|
// Policy creation with duplicate names throws in Trusted Types.
|
|
18500
|
-
|
|
18501
18558
|
var suffix = null;
|
|
18502
18559
|
var ATTR_NAME = 'data-tt-policy-suffix';
|
|
18503
18560
|
if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
|
|
@@ -18526,19 +18583,19 @@
|
|
|
18526
18583
|
var DOMPurify = function DOMPurify(root) {
|
|
18527
18584
|
return createDOMPurify(root);
|
|
18528
18585
|
};
|
|
18586
|
+
|
|
18529
18587
|
/**
|
|
18530
18588
|
* Version label, exposed for easier checks
|
|
18531
18589
|
* if DOMPurify is up to date or not
|
|
18532
18590
|
*/
|
|
18591
|
+
DOMPurify.version = '3.1.5';
|
|
18533
18592
|
|
|
18534
|
-
DOMPurify.version = '3.0.6';
|
|
18535
18593
|
/**
|
|
18536
18594
|
* Array of elements that DOMPurify removed during sanitation.
|
|
18537
18595
|
* Empty if nothing was removed.
|
|
18538
18596
|
*/
|
|
18539
|
-
|
|
18540
18597
|
DOMPurify.removed = [];
|
|
18541
|
-
if (!window || !window.document || window.document.nodeType !==
|
|
18598
|
+
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {
|
|
18542
18599
|
// Not running in a browser, provide a factory function
|
|
18543
18600
|
// so that you can pass your own Window
|
|
18544
18601
|
DOMPurify.isSupported = false;
|
|
@@ -18561,13 +18618,14 @@
|
|
|
18561
18618
|
var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
|
|
18562
18619
|
var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
|
|
18563
18620
|
var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
|
|
18564
|
-
var getParentNode = lookupGetter(ElementPrototype, 'parentNode');
|
|
18621
|
+
var getParentNode = lookupGetter(ElementPrototype, 'parentNode');
|
|
18622
|
+
|
|
18623
|
+
// As per issue #47, the web-components registry is inherited by a
|
|
18565
18624
|
// new document created via createHTMLDocument. As per the spec
|
|
18566
18625
|
// (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
|
|
18567
18626
|
// a new empty registry is used when creating a template contents owner
|
|
18568
18627
|
// document, so we use that as our parent document to ensure nothing
|
|
18569
18628
|
// is inherited.
|
|
18570
|
-
|
|
18571
18629
|
if (typeof HTMLTemplateElement === 'function') {
|
|
18572
18630
|
var template = document.createElement('template');
|
|
18573
18631
|
if (template.content && template.content.ownerDocument) {
|
|
@@ -18583,10 +18641,10 @@
|
|
|
18583
18641
|
getElementsByTagName = _document.getElementsByTagName;
|
|
18584
18642
|
var importNode = originalDocument.importNode;
|
|
18585
18643
|
var hooks = {};
|
|
18644
|
+
|
|
18586
18645
|
/**
|
|
18587
18646
|
* Expose whether this browser supports running the full DOMPurify.
|
|
18588
18647
|
*/
|
|
18589
|
-
|
|
18590
18648
|
DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
|
|
18591
18649
|
var MUSTACHE_EXPR = EXPRESSIONS.MUSTACHE_EXPR,
|
|
18592
18650
|
ERB_EXPR = EXPRESSIONS.ERB_EXPR,
|
|
@@ -18594,28 +18652,29 @@
|
|
|
18594
18652
|
DATA_ATTR = EXPRESSIONS.DATA_ATTR,
|
|
18595
18653
|
ARIA_ATTR = EXPRESSIONS.ARIA_ATTR,
|
|
18596
18654
|
IS_SCRIPT_OR_DATA = EXPRESSIONS.IS_SCRIPT_OR_DATA,
|
|
18597
|
-
ATTR_WHITESPACE = EXPRESSIONS.ATTR_WHITESPACE
|
|
18655
|
+
ATTR_WHITESPACE = EXPRESSIONS.ATTR_WHITESPACE,
|
|
18656
|
+
CUSTOM_ELEMENT = EXPRESSIONS.CUSTOM_ELEMENT;
|
|
18598
18657
|
var IS_ALLOWED_URI$1 = EXPRESSIONS.IS_ALLOWED_URI;
|
|
18658
|
+
|
|
18599
18659
|
/**
|
|
18600
18660
|
* We consider the elements and attributes below to be safe. Ideally
|
|
18601
18661
|
* don't add any new ones but feel free to remove unwanted ones.
|
|
18602
18662
|
*/
|
|
18603
18663
|
|
|
18604
18664
|
/* allowed element names */
|
|
18605
|
-
|
|
18606
18665
|
var ALLOWED_TAGS = null;
|
|
18607
18666
|
var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(html$1, svg$1, svgFilters, mathMl$1, text));
|
|
18608
|
-
/* Allowed attribute names */
|
|
18609
18667
|
|
|
18668
|
+
/* Allowed attribute names */
|
|
18610
18669
|
var ALLOWED_ATTR = null;
|
|
18611
18670
|
var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(html, svg, mathMl, xml));
|
|
18671
|
+
|
|
18612
18672
|
/*
|
|
18613
18673
|
* Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.
|
|
18614
18674
|
* @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
|
|
18615
18675
|
* @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
|
|
18616
18676
|
* @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
|
|
18617
18677
|
*/
|
|
18618
|
-
|
|
18619
18678
|
var CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
|
|
18620
18679
|
tagNameCheck: {
|
|
18621
18680
|
writable: true,
|
|
@@ -18636,59 +18695,65 @@
|
|
|
18636
18695
|
value: false
|
|
18637
18696
|
}
|
|
18638
18697
|
}));
|
|
18639
|
-
/* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
|
|
18640
18698
|
|
|
18699
|
+
/* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
|
|
18641
18700
|
var FORBID_TAGS = null;
|
|
18642
|
-
/* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
|
|
18643
18701
|
|
|
18702
|
+
/* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
|
|
18644
18703
|
var FORBID_ATTR = null;
|
|
18645
|
-
/* Decide if ARIA attributes are okay */
|
|
18646
18704
|
|
|
18705
|
+
/* Decide if ARIA attributes are okay */
|
|
18647
18706
|
var ALLOW_ARIA_ATTR = true;
|
|
18648
|
-
/* Decide if custom data attributes are okay */
|
|
18649
18707
|
|
|
18708
|
+
/* Decide if custom data attributes are okay */
|
|
18650
18709
|
var ALLOW_DATA_ATTR = true;
|
|
18651
|
-
/* Decide if unknown protocols are okay */
|
|
18652
18710
|
|
|
18711
|
+
/* Decide if unknown protocols are okay */
|
|
18653
18712
|
var ALLOW_UNKNOWN_PROTOCOLS = false;
|
|
18713
|
+
|
|
18654
18714
|
/* Decide if self-closing tags in attributes are allowed.
|
|
18655
18715
|
* Usually removed due to a mXSS issue in jQuery 3.0 */
|
|
18656
|
-
|
|
18657
18716
|
var ALLOW_SELF_CLOSE_IN_ATTR = true;
|
|
18717
|
+
|
|
18658
18718
|
/* Output should be safe for common template engines.
|
|
18659
18719
|
* This means, DOMPurify removes data attributes, mustaches and ERB
|
|
18660
18720
|
*/
|
|
18661
|
-
|
|
18662
18721
|
var SAFE_FOR_TEMPLATES = false;
|
|
18663
|
-
/* Decide if document with <html>... should be returned */
|
|
18664
18722
|
|
|
18723
|
+
/* Output should be safe even for XML used within HTML and alike.
|
|
18724
|
+
* This means, DOMPurify removes comments when containing risky content.
|
|
18725
|
+
*/
|
|
18726
|
+
var SAFE_FOR_XML = true;
|
|
18727
|
+
|
|
18728
|
+
/* Decide if document with <html>... should be returned */
|
|
18665
18729
|
var WHOLE_DOCUMENT = false;
|
|
18666
|
-
/* Track whether config is already set on this instance of DOMPurify. */
|
|
18667
18730
|
|
|
18731
|
+
/* Track whether config is already set on this instance of DOMPurify. */
|
|
18668
18732
|
var SET_CONFIG = false;
|
|
18733
|
+
|
|
18669
18734
|
/* Decide if all elements (e.g. style, script) must be children of
|
|
18670
18735
|
* document.body. By default, browsers might move them to document.head */
|
|
18671
|
-
|
|
18672
18736
|
var FORCE_BODY = false;
|
|
18737
|
+
|
|
18673
18738
|
/* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
|
|
18674
18739
|
* string (or a TrustedHTML object if Trusted Types are supported).
|
|
18675
18740
|
* If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
|
|
18676
18741
|
*/
|
|
18677
|
-
|
|
18678
18742
|
var RETURN_DOM = false;
|
|
18743
|
+
|
|
18679
18744
|
/* Decide if a DOM `DocumentFragment` should be returned, instead of a html
|
|
18680
18745
|
* string (or a TrustedHTML object if Trusted Types are supported) */
|
|
18681
|
-
|
|
18682
18746
|
var RETURN_DOM_FRAGMENT = false;
|
|
18747
|
+
|
|
18683
18748
|
/* Try to return a Trusted Type object instead of a string, return a string in
|
|
18684
18749
|
* case Trusted Types are not supported */
|
|
18685
|
-
|
|
18686
18750
|
var RETURN_TRUSTED_TYPE = false;
|
|
18751
|
+
|
|
18687
18752
|
/* Output should be free from DOM clobbering attacks?
|
|
18688
18753
|
* This sanitizes markups named with colliding, clobberable built-in DOM APIs.
|
|
18689
18754
|
*/
|
|
18690
|
-
|
|
18691
18755
|
var SANITIZE_DOM = true;
|
|
18756
|
+
|
|
18692
18757
|
/* Achieve full DOM Clobbering protection by isolating the namespace of named
|
|
18693
18758
|
* properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
|
|
18694
18759
|
*
|
|
@@ -18702,135 +18767,121 @@
|
|
|
18702
18767
|
* Namespace isolation is implemented by prefixing `id` and `name` attributes
|
|
18703
18768
|
* with a constant string, i.e., `user-content-`
|
|
18704
18769
|
*/
|
|
18705
|
-
|
|
18706
18770
|
var SANITIZE_NAMED_PROPS = false;
|
|
18707
18771
|
var SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
|
|
18708
|
-
/* Keep element content when removing element? */
|
|
18709
18772
|
|
|
18773
|
+
/* Keep element content when removing element? */
|
|
18710
18774
|
var KEEP_CONTENT = true;
|
|
18775
|
+
|
|
18711
18776
|
/* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
|
|
18712
18777
|
* of importing it into a new Document and returning a sanitized copy */
|
|
18713
|
-
|
|
18714
18778
|
var IN_PLACE = false;
|
|
18715
|
-
/* Allow usage of profiles like html, svg and mathMl */
|
|
18716
18779
|
|
|
18780
|
+
/* Allow usage of profiles like html, svg and mathMl */
|
|
18717
18781
|
var USE_PROFILES = {};
|
|
18718
|
-
/* Tags to ignore content of when KEEP_CONTENT is true */
|
|
18719
18782
|
|
|
18783
|
+
/* Tags to ignore content of when KEEP_CONTENT is true */
|
|
18720
18784
|
var FORBID_CONTENTS = null;
|
|
18721
18785
|
var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
|
|
18722
|
-
/* Tags that are safe for data: URIs */
|
|
18723
18786
|
|
|
18787
|
+
/* Tags that are safe for data: URIs */
|
|
18724
18788
|
var DATA_URI_TAGS = null;
|
|
18725
18789
|
var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
|
|
18726
|
-
/* Attributes safe for values like "javascript:" */
|
|
18727
18790
|
|
|
18791
|
+
/* Attributes safe for values like "javascript:" */
|
|
18728
18792
|
var URI_SAFE_ATTRIBUTES = null;
|
|
18729
18793
|
var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
|
|
18730
18794
|
var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
|
|
18731
18795
|
var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
|
18732
18796
|
var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
|
|
18733
18797
|
/* Document namespace */
|
|
18734
|
-
|
|
18735
18798
|
var NAMESPACE = HTML_NAMESPACE;
|
|
18736
18799
|
var IS_EMPTY_INPUT = false;
|
|
18737
|
-
/* Allowed XHTML+XML namespaces */
|
|
18738
18800
|
|
|
18801
|
+
/* Allowed XHTML+XML namespaces */
|
|
18739
18802
|
var ALLOWED_NAMESPACES = null;
|
|
18740
18803
|
var DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
|
|
18741
|
-
/* Parsing of strict XHTML documents */
|
|
18742
18804
|
|
|
18805
|
+
/* Parsing of strict XHTML documents */
|
|
18743
18806
|
var PARSER_MEDIA_TYPE = null;
|
|
18744
18807
|
var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
|
|
18745
18808
|
var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
|
|
18746
18809
|
var transformCaseFunc = null;
|
|
18747
|
-
/* Keep a reference to config to pass to hooks */
|
|
18748
18810
|
|
|
18811
|
+
/* Keep a reference to config to pass to hooks */
|
|
18749
18812
|
var CONFIG = null;
|
|
18750
|
-
/* Ideally, do not touch anything below this line */
|
|
18751
18813
|
|
|
18814
|
+
/* Ideally, do not touch anything below this line */
|
|
18752
18815
|
/* ______________________________________________ */
|
|
18753
18816
|
|
|
18754
18817
|
var formElement = document.createElement('form');
|
|
18755
18818
|
var isRegexOrFunction = function isRegexOrFunction(testValue) {
|
|
18756
18819
|
return testValue instanceof RegExp || testValue instanceof Function;
|
|
18757
18820
|
};
|
|
18821
|
+
|
|
18758
18822
|
/**
|
|
18759
18823
|
* _parseConfig
|
|
18760
18824
|
*
|
|
18761
18825
|
* @param {Object} cfg optional config literal
|
|
18762
18826
|
*/
|
|
18763
18827
|
// eslint-disable-next-line complexity
|
|
18764
|
-
|
|
18765
18828
|
var _parseConfig = function _parseConfig() {
|
|
18766
18829
|
var cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
18767
18830
|
if (CONFIG && CONFIG === cfg) {
|
|
18768
18831
|
return;
|
|
18769
18832
|
}
|
|
18770
|
-
/* Shield configuration object from tampering */
|
|
18771
18833
|
|
|
18834
|
+
/* Shield configuration object from tampering */
|
|
18772
18835
|
if (!cfg || typeof cfg !== 'object') {
|
|
18773
18836
|
cfg = {};
|
|
18774
18837
|
}
|
|
18775
|
-
/* Shield configuration object from prototype pollution */
|
|
18776
18838
|
|
|
18839
|
+
/* Shield configuration object from prototype pollution */
|
|
18777
18840
|
cfg = clone(cfg);
|
|
18778
18841
|
PARSER_MEDIA_TYPE =
|
|
18779
18842
|
// eslint-disable-next-line unicorn/prefer-includes
|
|
18780
|
-
SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ?
|
|
18843
|
+
SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
|
|
18781
18844
|
|
|
18845
|
+
// HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
|
|
18782
18846
|
transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
|
|
18783
|
-
/* Set configuration parameters */
|
|
18784
18847
|
|
|
18785
|
-
|
|
18786
|
-
|
|
18787
|
-
|
|
18788
|
-
|
|
18848
|
+
/* Set configuration parameters */
|
|
18849
|
+
ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
|
18850
|
+
ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
|
18851
|
+
ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
|
|
18852
|
+
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),
|
|
18789
18853
|
// eslint-disable-line indent
|
|
18790
18854
|
cfg.ADD_URI_SAFE_ATTR,
|
|
18791
18855
|
// eslint-disable-line indent
|
|
18792
18856
|
transformCaseFunc // eslint-disable-line indent
|
|
18793
18857
|
) // eslint-disable-line indent
|
|
18794
18858
|
: DEFAULT_URI_SAFE_ATTRIBUTES;
|
|
18795
|
-
DATA_URI_TAGS = 'ADD_DATA_URI_TAGS'
|
|
18859
|
+
DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS),
|
|
18796
18860
|
// eslint-disable-line indent
|
|
18797
18861
|
cfg.ADD_DATA_URI_TAGS,
|
|
18798
18862
|
// eslint-disable-line indent
|
|
18799
18863
|
transformCaseFunc // eslint-disable-line indent
|
|
18800
18864
|
) // eslint-disable-line indent
|
|
18801
18865
|
: DEFAULT_DATA_URI_TAGS;
|
|
18802
|
-
FORBID_CONTENTS = 'FORBID_CONTENTS'
|
|
18803
|
-
FORBID_TAGS = 'FORBID_TAGS'
|
|
18804
|
-
FORBID_ATTR = 'FORBID_ATTR'
|
|
18805
|
-
USE_PROFILES = 'USE_PROFILES'
|
|
18866
|
+
FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
|
18867
|
+
FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
|
|
18868
|
+
FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
|
|
18869
|
+
USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
|
|
18806
18870
|
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
|
|
18807
|
-
|
|
18808
18871
|
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
|
|
18809
|
-
|
|
18810
18872
|
ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
|
|
18811
|
-
|
|
18812
18873
|
ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
|
|
18813
|
-
|
|
18814
18874
|
SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
|
|
18815
|
-
|
|
18875
|
+
SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true
|
|
18816
18876
|
WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
|
|
18817
|
-
|
|
18818
18877
|
RETURN_DOM = cfg.RETURN_DOM || false; // Default false
|
|
18819
|
-
|
|
18820
18878
|
RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
|
|
18821
|
-
|
|
18822
18879
|
RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
|
|
18823
|
-
|
|
18824
18880
|
FORCE_BODY = cfg.FORCE_BODY || false; // Default false
|
|
18825
|
-
|
|
18826
18881
|
SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
|
|
18827
|
-
|
|
18828
18882
|
SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
|
|
18829
|
-
|
|
18830
18883
|
KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
|
|
18831
|
-
|
|
18832
18884
|
IN_PLACE = cfg.IN_PLACE || false; // Default false
|
|
18833
|
-
|
|
18834
18885
|
IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
|
|
18835
18886
|
NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
|
|
18836
18887
|
CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
|
|
@@ -18849,10 +18900,10 @@
|
|
|
18849
18900
|
if (RETURN_DOM_FRAGMENT) {
|
|
18850
18901
|
RETURN_DOM = true;
|
|
18851
18902
|
}
|
|
18852
|
-
/* Parse profile info */
|
|
18853
18903
|
|
|
18904
|
+
/* Parse profile info */
|
|
18854
18905
|
if (USE_PROFILES) {
|
|
18855
|
-
ALLOWED_TAGS = addToSet({},
|
|
18906
|
+
ALLOWED_TAGS = addToSet({}, text);
|
|
18856
18907
|
ALLOWED_ATTR = [];
|
|
18857
18908
|
if (USE_PROFILES.html === true) {
|
|
18858
18909
|
addToSet(ALLOWED_TAGS, html$1);
|
|
@@ -18874,8 +18925,8 @@
|
|
|
18874
18925
|
addToSet(ALLOWED_ATTR, xml);
|
|
18875
18926
|
}
|
|
18876
18927
|
}
|
|
18877
|
-
/* Merge configuration parameters */
|
|
18878
18928
|
|
|
18929
|
+
/* Merge configuration parameters */
|
|
18879
18930
|
if (cfg.ADD_TAGS) {
|
|
18880
18931
|
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
|
18881
18932
|
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
@@ -18897,18 +18948,18 @@
|
|
|
18897
18948
|
}
|
|
18898
18949
|
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
|
18899
18950
|
}
|
|
18900
|
-
/* Add #text in case KEEP_CONTENT is set to true */
|
|
18901
18951
|
|
|
18952
|
+
/* Add #text in case KEEP_CONTENT is set to true */
|
|
18902
18953
|
if (KEEP_CONTENT) {
|
|
18903
18954
|
ALLOWED_TAGS['#text'] = true;
|
|
18904
18955
|
}
|
|
18905
|
-
/* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
|
|
18906
18956
|
|
|
18957
|
+
/* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
|
|
18907
18958
|
if (WHOLE_DOCUMENT) {
|
|
18908
18959
|
addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
|
|
18909
18960
|
}
|
|
18910
|
-
/* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
|
|
18911
18961
|
|
|
18962
|
+
/* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
|
|
18912
18963
|
if (ALLOWED_TAGS.table) {
|
|
18913
18964
|
addToSet(ALLOWED_TAGS, ['tbody']);
|
|
18914
18965
|
delete FORBID_TAGS.tbody;
|
|
@@ -18919,55 +18970,58 @@
|
|
|
18919
18970
|
}
|
|
18920
18971
|
if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
|
|
18921
18972
|
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
18922
|
-
}
|
|
18973
|
+
}
|
|
18923
18974
|
|
|
18924
|
-
|
|
18975
|
+
// Overwrite existing TrustedTypes policy.
|
|
18976
|
+
trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
|
|
18925
18977
|
|
|
18978
|
+
// Sign local variables required by `sanitize`.
|
|
18926
18979
|
emptyHTML = trustedTypesPolicy.createHTML('');
|
|
18927
18980
|
} else {
|
|
18928
18981
|
// Uninitialized policy, attempt to initialize the internal dompurify policy.
|
|
18929
18982
|
if (trustedTypesPolicy === undefined) {
|
|
18930
18983
|
trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
|
|
18931
|
-
}
|
|
18984
|
+
}
|
|
18932
18985
|
|
|
18986
|
+
// If creating the internal policy succeeded sign internal variables.
|
|
18933
18987
|
if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
|
|
18934
18988
|
emptyHTML = trustedTypesPolicy.createHTML('');
|
|
18935
18989
|
}
|
|
18936
|
-
}
|
|
18937
|
-
// Not available in IE8, Safari 5, etc.
|
|
18990
|
+
}
|
|
18938
18991
|
|
|
18992
|
+
// Prevent further manipulation of configuration.
|
|
18993
|
+
// Not available in IE8, Safari 5, etc.
|
|
18939
18994
|
if (freeze) {
|
|
18940
18995
|
freeze(cfg);
|
|
18941
18996
|
}
|
|
18942
18997
|
CONFIG = cfg;
|
|
18943
18998
|
};
|
|
18944
18999
|
var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
|
|
18945
|
-
var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', '
|
|
19000
|
+
var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'annotation-xml']);
|
|
19001
|
+
|
|
19002
|
+
// Certain elements are allowed in both SVG and HTML
|
|
18946
19003
|
// namespace. We need to specify them explicitly
|
|
18947
19004
|
// so that they don't get erroneously deleted from
|
|
18948
19005
|
// HTML namespace.
|
|
18949
|
-
|
|
18950
19006
|
var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
|
|
19007
|
+
|
|
18951
19008
|
/* Keep track of all possible SVG and MathML tags
|
|
18952
19009
|
* so that we can perform the namespace checks
|
|
18953
19010
|
* correctly. */
|
|
19011
|
+
var ALL_SVG_TAGS = addToSet({}, [].concat(svg$1, svgFilters, svgDisallowed));
|
|
19012
|
+
var ALL_MATHML_TAGS = addToSet({}, [].concat(mathMl$1, mathMlDisallowed));
|
|
18954
19013
|
|
|
18955
|
-
var ALL_SVG_TAGS = addToSet({}, svg$1);
|
|
18956
|
-
addToSet(ALL_SVG_TAGS, svgFilters);
|
|
18957
|
-
addToSet(ALL_SVG_TAGS, svgDisallowed);
|
|
18958
|
-
var ALL_MATHML_TAGS = addToSet({}, mathMl$1);
|
|
18959
|
-
addToSet(ALL_MATHML_TAGS, mathMlDisallowed);
|
|
18960
19014
|
/**
|
|
18961
19015
|
* @param {Element} element a DOM element whose namespace is being checked
|
|
18962
19016
|
* @returns {boolean} Return false if the element has a
|
|
18963
19017
|
* namespace that a spec-compliant parser would never
|
|
18964
19018
|
* return. Return true otherwise.
|
|
18965
19019
|
*/
|
|
18966
|
-
|
|
18967
19020
|
var _checkValidNamespace = function _checkValidNamespace(element) {
|
|
18968
|
-
var parent = getParentNode(element);
|
|
18969
|
-
// can be null. We just simulate parent in this case.
|
|
19021
|
+
var parent = getParentNode(element);
|
|
18970
19022
|
|
|
19023
|
+
// In JSDOM, if we're inside shadow DOM, then parentNode
|
|
19024
|
+
// can be null. We just simulate parent in this case.
|
|
18971
19025
|
if (!parent || !parent.tagName) {
|
|
18972
19026
|
parent = {
|
|
18973
19027
|
namespaceURI: NAMESPACE,
|
|
@@ -18985,15 +19039,17 @@
|
|
|
18985
19039
|
// it should be killed.
|
|
18986
19040
|
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
18987
19041
|
return tagName === 'svg';
|
|
18988
|
-
}
|
|
19042
|
+
}
|
|
19043
|
+
|
|
19044
|
+
// The only way to switch from MathML to SVG is via`
|
|
18989
19045
|
// svg if parent is either <annotation-xml> or MathML
|
|
18990
19046
|
// text integration points.
|
|
18991
|
-
|
|
18992
19047
|
if (parent.namespaceURI === MATHML_NAMESPACE) {
|
|
18993
19048
|
return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
|
|
18994
|
-
}
|
|
18995
|
-
// spec. All others are disallowed in SVG namespace.
|
|
19049
|
+
}
|
|
18996
19050
|
|
|
19051
|
+
// We only allow elements that are defined in SVG
|
|
19052
|
+
// spec. All others are disallowed in SVG namespace.
|
|
18997
19053
|
return Boolean(ALL_SVG_TAGS[tagName]);
|
|
18998
19054
|
}
|
|
18999
19055
|
if (element.namespaceURI === MATHML_NAMESPACE) {
|
|
@@ -19002,14 +19058,16 @@
|
|
|
19002
19058
|
// it should be killed.
|
|
19003
19059
|
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
19004
19060
|
return tagName === 'math';
|
|
19005
|
-
}
|
|
19006
|
-
// <math> and HTML integration points
|
|
19061
|
+
}
|
|
19007
19062
|
|
|
19063
|
+
// The only way to switch from SVG to MathML is via
|
|
19064
|
+
// <math> and HTML integration points
|
|
19008
19065
|
if (parent.namespaceURI === SVG_NAMESPACE) {
|
|
19009
19066
|
return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
|
|
19010
|
-
}
|
|
19011
|
-
// spec. All others are disallowed in MathML namespace.
|
|
19067
|
+
}
|
|
19012
19068
|
|
|
19069
|
+
// We only allow elements that are defined in MathML
|
|
19070
|
+
// spec. All others are disallowed in MathML namespace.
|
|
19013
19071
|
return Boolean(ALL_MATHML_TAGS[tagName]);
|
|
19014
19072
|
}
|
|
19015
19073
|
if (element.namespaceURI === HTML_NAMESPACE) {
|
|
@@ -19021,27 +19079,30 @@
|
|
|
19021
19079
|
}
|
|
19022
19080
|
if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
|
|
19023
19081
|
return false;
|
|
19024
|
-
}
|
|
19025
|
-
// or SVG and should never appear in HTML namespace
|
|
19082
|
+
}
|
|
19026
19083
|
|
|
19084
|
+
// We disallow tags that are specific for MathML
|
|
19085
|
+
// or SVG and should never appear in HTML namespace
|
|
19027
19086
|
return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
|
|
19028
|
-
}
|
|
19087
|
+
}
|
|
19029
19088
|
|
|
19089
|
+
// For XHTML and XML documents that support custom namespaces
|
|
19030
19090
|
if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
|
|
19031
19091
|
return true;
|
|
19032
|
-
}
|
|
19092
|
+
}
|
|
19093
|
+
|
|
19094
|
+
// The code should never reach this place (this means
|
|
19033
19095
|
// that the element somehow got namespace that is not
|
|
19034
19096
|
// HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
|
|
19035
19097
|
// Return false just in case.
|
|
19036
|
-
|
|
19037
19098
|
return false;
|
|
19038
19099
|
};
|
|
19100
|
+
|
|
19039
19101
|
/**
|
|
19040
19102
|
* _forceRemove
|
|
19041
19103
|
*
|
|
19042
19104
|
* @param {Node} node a DOM node
|
|
19043
19105
|
*/
|
|
19044
|
-
|
|
19045
19106
|
var _forceRemove = function _forceRemove(node) {
|
|
19046
19107
|
arrayPush(DOMPurify.removed, {
|
|
19047
19108
|
element: node
|
|
@@ -19053,13 +19114,13 @@
|
|
|
19053
19114
|
node.remove();
|
|
19054
19115
|
}
|
|
19055
19116
|
};
|
|
19117
|
+
|
|
19056
19118
|
/**
|
|
19057
19119
|
* _removeAttribute
|
|
19058
19120
|
*
|
|
19059
19121
|
* @param {String} name an Attribute name
|
|
19060
19122
|
* @param {Node} node a DOM node
|
|
19061
19123
|
*/
|
|
19062
|
-
|
|
19063
19124
|
var _removeAttribute = function _removeAttribute(name, node) {
|
|
19064
19125
|
try {
|
|
19065
19126
|
arrayPush(DOMPurify.removed, {
|
|
@@ -19072,8 +19133,9 @@
|
|
|
19072
19133
|
from: node
|
|
19073
19134
|
});
|
|
19074
19135
|
}
|
|
19075
|
-
node.removeAttribute(name);
|
|
19136
|
+
node.removeAttribute(name);
|
|
19076
19137
|
|
|
19138
|
+
// We void attribute values for unremovable "is"" attributes
|
|
19077
19139
|
if (name === 'is' && !ALLOWED_ATTR[name]) {
|
|
19078
19140
|
if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
|
|
19079
19141
|
try {
|
|
@@ -19086,13 +19148,13 @@
|
|
|
19086
19148
|
}
|
|
19087
19149
|
}
|
|
19088
19150
|
};
|
|
19151
|
+
|
|
19089
19152
|
/**
|
|
19090
19153
|
* _initDocument
|
|
19091
19154
|
*
|
|
19092
19155
|
* @param {String} dirty a string of dirty markup
|
|
19093
19156
|
* @return {Document} a DOM, filled with the dirty markup
|
|
19094
19157
|
*/
|
|
19095
|
-
|
|
19096
19158
|
var _initDocument = function _initDocument(dirty) {
|
|
19097
19159
|
/* Create a HTML document */
|
|
19098
19160
|
var doc = null;
|
|
@@ -19113,64 +19175,65 @@
|
|
|
19113
19175
|
* Use the DOMParser API by default, fallback later if needs be
|
|
19114
19176
|
* DOMParser not work for svg when has multiple root element.
|
|
19115
19177
|
*/
|
|
19116
|
-
|
|
19117
19178
|
if (NAMESPACE === HTML_NAMESPACE) {
|
|
19118
19179
|
try {
|
|
19119
19180
|
doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
|
|
19120
19181
|
} catch (_) {}
|
|
19121
19182
|
}
|
|
19122
|
-
/* Use createHTMLDocument in case DOMParser is not available */
|
|
19123
19183
|
|
|
19184
|
+
/* Use createHTMLDocument in case DOMParser is not available */
|
|
19124
19185
|
if (!doc || !doc.documentElement) {
|
|
19125
19186
|
doc = implementation.createDocument(NAMESPACE, 'template', null);
|
|
19126
19187
|
try {
|
|
19127
19188
|
doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
|
|
19128
|
-
} catch (_) {
|
|
19189
|
+
} catch (_) {
|
|
19190
|
+
// Syntax error if dirtyPayload is invalid xml
|
|
19129
19191
|
}
|
|
19130
19192
|
}
|
|
19131
19193
|
var body = doc.body || doc.documentElement;
|
|
19132
19194
|
if (dirty && leadingWhitespace) {
|
|
19133
19195
|
body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
|
|
19134
19196
|
}
|
|
19135
|
-
/* Work on whole document or just its body */
|
|
19136
19197
|
|
|
19198
|
+
/* Work on whole document or just its body */
|
|
19137
19199
|
if (NAMESPACE === HTML_NAMESPACE) {
|
|
19138
19200
|
return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
|
|
19139
19201
|
}
|
|
19140
19202
|
return WHOLE_DOCUMENT ? doc.documentElement : body;
|
|
19141
19203
|
};
|
|
19204
|
+
|
|
19142
19205
|
/**
|
|
19143
19206
|
* Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
|
|
19144
19207
|
*
|
|
19145
19208
|
* @param {Node} root The root element or node to start traversing on.
|
|
19146
19209
|
* @return {NodeIterator} The created NodeIterator
|
|
19147
19210
|
*/
|
|
19148
|
-
|
|
19149
19211
|
var _createNodeIterator = function _createNodeIterator(root) {
|
|
19150
19212
|
return createNodeIterator.call(root.ownerDocument || root, root,
|
|
19151
19213
|
// eslint-disable-next-line no-bitwise
|
|
19152
|
-
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null);
|
|
19214
|
+
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
|
|
19153
19215
|
};
|
|
19216
|
+
|
|
19154
19217
|
/**
|
|
19155
19218
|
* _isClobbered
|
|
19156
19219
|
*
|
|
19157
19220
|
* @param {Node} elm element to check for clobbering attacks
|
|
19158
19221
|
* @return {Boolean} true if clobbered, false if safe
|
|
19159
19222
|
*/
|
|
19160
|
-
|
|
19161
19223
|
var _isClobbered = function _isClobbered(elm) {
|
|
19162
19224
|
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');
|
|
19163
19225
|
};
|
|
19226
|
+
|
|
19164
19227
|
/**
|
|
19165
19228
|
* Checks whether the given object is a DOM node.
|
|
19166
19229
|
*
|
|
19167
19230
|
* @param {Node} object object to check whether it's a DOM node
|
|
19168
19231
|
* @return {Boolean} true is object is a DOM node
|
|
19169
19232
|
*/
|
|
19170
|
-
|
|
19171
19233
|
var _isNode = function _isNode(object) {
|
|
19172
19234
|
return typeof Node === 'function' && object instanceof Node;
|
|
19173
19235
|
};
|
|
19236
|
+
|
|
19174
19237
|
/**
|
|
19175
19238
|
* _executeHook
|
|
19176
19239
|
* Execute user configurable hooks
|
|
@@ -19179,7 +19242,6 @@
|
|
|
19179
19242
|
* @param {Node} currentNode node to work on with the hook
|
|
19180
19243
|
* @param {Object} data additional hook parameters
|
|
19181
19244
|
*/
|
|
19182
|
-
|
|
19183
19245
|
var _executeHook = function _executeHook(entryPoint, currentNode, data) {
|
|
19184
19246
|
if (!hooks[entryPoint]) {
|
|
19185
19247
|
return;
|
|
@@ -19188,6 +19250,7 @@
|
|
|
19188
19250
|
hook.call(DOMPurify, currentNode, data, CONFIG);
|
|
19189
19251
|
});
|
|
19190
19252
|
};
|
|
19253
|
+
|
|
19191
19254
|
/**
|
|
19192
19255
|
* _sanitizeElements
|
|
19193
19256
|
*
|
|
@@ -19198,35 +19261,46 @@
|
|
|
19198
19261
|
* @param {Node} currentNode to check for permission to exist
|
|
19199
19262
|
* @return {Boolean} true if node was killed, false if left alive
|
|
19200
19263
|
*/
|
|
19201
|
-
|
|
19202
19264
|
var _sanitizeElements = function _sanitizeElements(currentNode) {
|
|
19203
19265
|
var content = null;
|
|
19204
|
-
/* Execute a hook if present */
|
|
19205
19266
|
|
|
19267
|
+
/* Execute a hook if present */
|
|
19206
19268
|
_executeHook('beforeSanitizeElements', currentNode, null);
|
|
19207
|
-
/* Check if element is clobbered or can clobber */
|
|
19208
19269
|
|
|
19270
|
+
/* Check if element is clobbered or can clobber */
|
|
19209
19271
|
if (_isClobbered(currentNode)) {
|
|
19210
19272
|
_forceRemove(currentNode);
|
|
19211
19273
|
return true;
|
|
19212
19274
|
}
|
|
19213
|
-
/* Now let's check the element's type and name */
|
|
19214
19275
|
|
|
19276
|
+
/* Now let's check the element's type and name */
|
|
19215
19277
|
var tagName = transformCaseFunc(currentNode.nodeName);
|
|
19216
|
-
/* Execute a hook if present */
|
|
19217
19278
|
|
|
19279
|
+
/* Execute a hook if present */
|
|
19218
19280
|
_executeHook('uponSanitizeElement', currentNode, {
|
|
19219
19281
|
tagName: tagName,
|
|
19220
19282
|
allowedTags: ALLOWED_TAGS
|
|
19221
19283
|
});
|
|
19222
|
-
/* Detect mXSS attempts abusing namespace confusion */
|
|
19223
19284
|
|
|
19285
|
+
/* Detect mXSS attempts abusing namespace confusion */
|
|
19224
19286
|
if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
|
|
19225
19287
|
_forceRemove(currentNode);
|
|
19226
19288
|
return true;
|
|
19227
19289
|
}
|
|
19228
|
-
/* Remove element if anything forbids its presence */
|
|
19229
19290
|
|
|
19291
|
+
/* Remove any ocurrence of processing instructions */
|
|
19292
|
+
if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
|
|
19293
|
+
_forceRemove(currentNode);
|
|
19294
|
+
return true;
|
|
19295
|
+
}
|
|
19296
|
+
|
|
19297
|
+
/* Remove any kind of possibly harmful comments */
|
|
19298
|
+
if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
|
|
19299
|
+
_forceRemove(currentNode);
|
|
19300
|
+
return true;
|
|
19301
|
+
}
|
|
19302
|
+
|
|
19303
|
+
/* Remove element if anything forbids its presence */
|
|
19230
19304
|
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
19231
19305
|
/* Check if we have a custom element to handle */
|
|
19232
19306
|
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
@@ -19237,36 +19311,38 @@
|
|
|
19237
19311
|
return false;
|
|
19238
19312
|
}
|
|
19239
19313
|
}
|
|
19240
|
-
/* Keep content except for bad-listed elements */
|
|
19241
19314
|
|
|
19315
|
+
/* Keep content except for bad-listed elements */
|
|
19242
19316
|
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
|
|
19243
19317
|
var parentNode = getParentNode(currentNode) || currentNode.parentNode;
|
|
19244
19318
|
var childNodes = getChildNodes(currentNode) || currentNode.childNodes;
|
|
19245
19319
|
if (childNodes && parentNode) {
|
|
19246
19320
|
var childCount = childNodes.length;
|
|
19247
19321
|
for (var i = childCount - 1; i >= 0; --i) {
|
|
19248
|
-
|
|
19322
|
+
var childClone = cloneNode(childNodes[i], true);
|
|
19323
|
+
childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
|
|
19324
|
+
parentNode.insertBefore(childClone, getNextSibling(currentNode));
|
|
19249
19325
|
}
|
|
19250
19326
|
}
|
|
19251
19327
|
}
|
|
19252
19328
|
_forceRemove(currentNode);
|
|
19253
19329
|
return true;
|
|
19254
19330
|
}
|
|
19255
|
-
/* Check whether element has a valid namespace */
|
|
19256
19331
|
|
|
19332
|
+
/* Check whether element has a valid namespace */
|
|
19257
19333
|
if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
|
|
19258
19334
|
_forceRemove(currentNode);
|
|
19259
19335
|
return true;
|
|
19260
19336
|
}
|
|
19261
|
-
/* Make sure that older browsers don't get fallback-tag mXSS */
|
|
19262
19337
|
|
|
19338
|
+
/* Make sure that older browsers don't get fallback-tag mXSS */
|
|
19263
19339
|
if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
|
|
19264
19340
|
_forceRemove(currentNode);
|
|
19265
19341
|
return true;
|
|
19266
19342
|
}
|
|
19267
|
-
/* Sanitize element content to be template-safe */
|
|
19268
19343
|
|
|
19269
|
-
|
|
19344
|
+
/* Sanitize element content to be template-safe */
|
|
19345
|
+
if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
|
|
19270
19346
|
/* Get the element's text content */
|
|
19271
19347
|
content = currentNode.textContent;
|
|
19272
19348
|
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], function (expr) {
|
|
@@ -19279,11 +19355,12 @@
|
|
|
19279
19355
|
currentNode.textContent = content;
|
|
19280
19356
|
}
|
|
19281
19357
|
}
|
|
19282
|
-
/* Execute a hook if present */
|
|
19283
19358
|
|
|
19359
|
+
/* Execute a hook if present */
|
|
19284
19360
|
_executeHook('afterSanitizeElements', currentNode, null);
|
|
19285
19361
|
return false;
|
|
19286
19362
|
};
|
|
19363
|
+
|
|
19287
19364
|
/**
|
|
19288
19365
|
* _isValidAttribute
|
|
19289
19366
|
*
|
|
@@ -19293,17 +19370,16 @@
|
|
|
19293
19370
|
* @return {Boolean} Returns true if `value` is valid, otherwise false.
|
|
19294
19371
|
*/
|
|
19295
19372
|
// eslint-disable-next-line complexity
|
|
19296
|
-
|
|
19297
19373
|
var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
|
|
19298
19374
|
/* Make sure attribute cannot clobber */
|
|
19299
19375
|
if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
|
|
19300
19376
|
return false;
|
|
19301
19377
|
}
|
|
19378
|
+
|
|
19302
19379
|
/* Allow valid data-* attributes: At least one character after "-"
|
|
19303
19380
|
(https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
|
|
19304
19381
|
XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
|
|
19305
19382
|
We don't need to check the value; it's always URI safe. */
|
|
19306
|
-
|
|
19307
19383
|
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ;else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ;else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
|
|
19308
19384
|
if (
|
|
19309
19385
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
@@ -19321,6 +19397,7 @@
|
|
|
19321
19397
|
}
|
|
19322
19398
|
return true;
|
|
19323
19399
|
};
|
|
19400
|
+
|
|
19324
19401
|
/**
|
|
19325
19402
|
* _isBasicCustomElement
|
|
19326
19403
|
* checks if at least one dash is included in tagName, and it's not the first char
|
|
@@ -19329,10 +19406,10 @@
|
|
|
19329
19406
|
* @param {string} tagName name of the tag of the node to sanitize
|
|
19330
19407
|
* @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
|
|
19331
19408
|
*/
|
|
19332
|
-
|
|
19333
19409
|
var _isBasicCustomElement = function _isBasicCustomElement(tagName) {
|
|
19334
|
-
return tagName
|
|
19410
|
+
return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);
|
|
19335
19411
|
};
|
|
19412
|
+
|
|
19336
19413
|
/**
|
|
19337
19414
|
* _sanitizeAttributes
|
|
19338
19415
|
*
|
|
@@ -19343,13 +19420,12 @@
|
|
|
19343
19420
|
*
|
|
19344
19421
|
* @param {Node} currentNode to sanitize
|
|
19345
19422
|
*/
|
|
19346
|
-
|
|
19347
19423
|
var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
|
|
19348
19424
|
/* Execute a hook if present */
|
|
19349
19425
|
_executeHook('beforeSanitizeAttributes', currentNode, null);
|
|
19350
19426
|
var attributes = currentNode.attributes;
|
|
19351
|
-
/* Check if we have attributes; if not we might have a text node */
|
|
19352
19427
|
|
|
19428
|
+
/* Check if we have attributes; if not we might have a text node */
|
|
19353
19429
|
if (!attributes) {
|
|
19354
19430
|
return;
|
|
19355
19431
|
}
|
|
@@ -19360,6 +19436,7 @@
|
|
|
19360
19436
|
allowedAttributes: ALLOWED_ATTR
|
|
19361
19437
|
};
|
|
19362
19438
|
var l = attributes.length;
|
|
19439
|
+
|
|
19363
19440
|
/* Go backwards over all attributes; safely remove bad ones */
|
|
19364
19441
|
var _loop = function _loop() {
|
|
19365
19442
|
var attr = attributes[l];
|
|
@@ -19368,59 +19445,64 @@
|
|
|
19368
19445
|
attrValue = attr.value;
|
|
19369
19446
|
var lcName = transformCaseFunc(name);
|
|
19370
19447
|
var value = name === 'value' ? attrValue : stringTrim(attrValue);
|
|
19371
|
-
/* Execute a hook if present */
|
|
19372
19448
|
|
|
19449
|
+
/* Execute a hook if present */
|
|
19373
19450
|
hookEvent.attrName = lcName;
|
|
19374
19451
|
hookEvent.attrValue = value;
|
|
19375
19452
|
hookEvent.keepAttr = true;
|
|
19376
19453
|
hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
|
|
19377
|
-
|
|
19378
19454
|
_executeHook('uponSanitizeAttribute', currentNode, hookEvent);
|
|
19379
19455
|
value = hookEvent.attrValue;
|
|
19380
19456
|
/* Did the hooks approve of the attribute? */
|
|
19381
|
-
|
|
19382
19457
|
if (hookEvent.forceKeepAttr) {
|
|
19383
19458
|
return 0; // continue
|
|
19384
19459
|
}
|
|
19385
|
-
/* Remove attribute */
|
|
19386
19460
|
|
|
19461
|
+
/* Remove attribute */
|
|
19387
19462
|
_removeAttribute(name, currentNode);
|
|
19388
|
-
/* Did the hooks approve of the attribute? */
|
|
19389
19463
|
|
|
19464
|
+
/* Did the hooks approve of the attribute? */
|
|
19390
19465
|
if (!hookEvent.keepAttr) {
|
|
19391
19466
|
return 0; // continue
|
|
19392
19467
|
}
|
|
19393
|
-
/* Work around a security issue in jQuery 3.0 */
|
|
19394
19468
|
|
|
19469
|
+
/* Work around a security issue in jQuery 3.0 */
|
|
19395
19470
|
if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
|
|
19396
19471
|
_removeAttribute(name, currentNode);
|
|
19397
19472
|
return 0; // continue
|
|
19398
19473
|
}
|
|
19399
|
-
/* Sanitize attribute content to be template-safe */
|
|
19400
19474
|
|
|
19475
|
+
/* Work around a security issue with comments inside attributes */
|
|
19476
|
+
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
|
|
19477
|
+
_removeAttribute(name, currentNode);
|
|
19478
|
+
return 0; // continue
|
|
19479
|
+
}
|
|
19480
|
+
|
|
19481
|
+
/* Sanitize attribute content to be template-safe */
|
|
19401
19482
|
if (SAFE_FOR_TEMPLATES) {
|
|
19402
19483
|
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], function (expr) {
|
|
19403
19484
|
value = stringReplace(value, expr, ' ');
|
|
19404
19485
|
});
|
|
19405
19486
|
}
|
|
19406
|
-
/* Is `value` valid for this attribute? */
|
|
19407
19487
|
|
|
19488
|
+
/* Is `value` valid for this attribute? */
|
|
19408
19489
|
var lcTag = transformCaseFunc(currentNode.nodeName);
|
|
19409
19490
|
if (!_isValidAttribute(lcTag, lcName, value)) {
|
|
19410
19491
|
return 0; // continue
|
|
19411
19492
|
}
|
|
19493
|
+
|
|
19412
19494
|
/* Full DOM Clobbering protection via namespace isolation,
|
|
19413
19495
|
* Prefix id and name attributes with `user-content-`
|
|
19414
19496
|
*/
|
|
19415
|
-
|
|
19416
19497
|
if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
|
|
19417
19498
|
// Remove the attribute with this value
|
|
19418
|
-
_removeAttribute(name, currentNode);
|
|
19499
|
+
_removeAttribute(name, currentNode);
|
|
19419
19500
|
|
|
19501
|
+
// Prefix the value and later re-create the attribute with the sanitized value
|
|
19420
19502
|
value = SANITIZE_NAMED_PROPS_PREFIX + value;
|
|
19421
19503
|
}
|
|
19422
|
-
/* Handle attributes that require Trusted Types */
|
|
19423
19504
|
|
|
19505
|
+
/* Handle attributes that require Trusted Types */
|
|
19424
19506
|
if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
|
|
19425
19507
|
if (namespaceURI) ;else {
|
|
19426
19508
|
switch (trustedTypes.getAttributeType(lcTag, lcName)) {
|
|
@@ -19437,8 +19519,8 @@
|
|
|
19437
19519
|
}
|
|
19438
19520
|
}
|
|
19439
19521
|
}
|
|
19440
|
-
/* Handle invalid data-* attribute set by try-catching it */
|
|
19441
19522
|
|
|
19523
|
+
/* Handle invalid data-* attribute set by try-catching it */
|
|
19442
19524
|
try {
|
|
19443
19525
|
if (namespaceURI) {
|
|
19444
19526
|
currentNode.setAttributeNS(namespaceURI, name, value);
|
|
@@ -19446,7 +19528,11 @@
|
|
|
19446
19528
|
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
|
|
19447
19529
|
currentNode.setAttribute(name, value);
|
|
19448
19530
|
}
|
|
19449
|
-
|
|
19531
|
+
if (_isClobbered(currentNode)) {
|
|
19532
|
+
_forceRemove(currentNode);
|
|
19533
|
+
} else {
|
|
19534
|
+
arrayPop(DOMPurify.removed);
|
|
19535
|
+
}
|
|
19450
19536
|
} catch (_) {}
|
|
19451
19537
|
},
|
|
19452
19538
|
_ret;
|
|
@@ -19454,43 +19540,44 @@
|
|
|
19454
19540
|
_ret = _loop();
|
|
19455
19541
|
if (_ret === 0) continue;
|
|
19456
19542
|
}
|
|
19457
|
-
/* Execute a hook if present */
|
|
19458
19543
|
|
|
19544
|
+
/* Execute a hook if present */
|
|
19459
19545
|
_executeHook('afterSanitizeAttributes', currentNode, null);
|
|
19460
19546
|
};
|
|
19547
|
+
|
|
19461
19548
|
/**
|
|
19462
19549
|
* _sanitizeShadowDOM
|
|
19463
19550
|
*
|
|
19464
19551
|
* @param {DocumentFragment} fragment to iterate over recursively
|
|
19465
19552
|
*/
|
|
19466
|
-
|
|
19467
19553
|
var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
|
|
19468
19554
|
var shadowNode = null;
|
|
19469
19555
|
var shadowIterator = _createNodeIterator(fragment);
|
|
19470
|
-
/* Execute a hook if present */
|
|
19471
19556
|
|
|
19557
|
+
/* Execute a hook if present */
|
|
19472
19558
|
_executeHook('beforeSanitizeShadowDOM', fragment, null);
|
|
19473
19559
|
while (shadowNode = shadowIterator.nextNode()) {
|
|
19474
19560
|
/* Execute a hook if present */
|
|
19475
19561
|
_executeHook('uponSanitizeShadowNode', shadowNode, null);
|
|
19476
|
-
/* Sanitize tags and elements */
|
|
19477
19562
|
|
|
19563
|
+
/* Sanitize tags and elements */
|
|
19478
19564
|
if (_sanitizeElements(shadowNode)) {
|
|
19479
19565
|
continue;
|
|
19480
19566
|
}
|
|
19481
|
-
/* Deep shadow DOM detected */
|
|
19482
19567
|
|
|
19568
|
+
/* Deep shadow DOM detected */
|
|
19483
19569
|
if (shadowNode.content instanceof DocumentFragment) {
|
|
19484
19570
|
_sanitizeShadowDOM(shadowNode.content);
|
|
19485
19571
|
}
|
|
19486
|
-
/* Check attributes, sanitize if necessary */
|
|
19487
19572
|
|
|
19573
|
+
/* Check attributes, sanitize if necessary */
|
|
19488
19574
|
_sanitizeAttributes(shadowNode);
|
|
19489
19575
|
}
|
|
19490
|
-
/* Execute a hook if present */
|
|
19491
19576
|
|
|
19577
|
+
/* Execute a hook if present */
|
|
19492
19578
|
_executeHook('afterSanitizeShadowDOM', fragment, null);
|
|
19493
19579
|
};
|
|
19580
|
+
|
|
19494
19581
|
/**
|
|
19495
19582
|
* Sanitize
|
|
19496
19583
|
* Public method providing core sanitation functionality
|
|
@@ -19499,7 +19586,6 @@
|
|
|
19499
19586
|
* @param {Object} cfg object
|
|
19500
19587
|
*/
|
|
19501
19588
|
// eslint-disable-next-line complexity
|
|
19502
|
-
|
|
19503
19589
|
DOMPurify.sanitize = function (dirty) {
|
|
19504
19590
|
var cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
19505
19591
|
var body = null;
|
|
@@ -19509,13 +19595,12 @@
|
|
|
19509
19595
|
/* Make sure we have a string to sanitize.
|
|
19510
19596
|
DO NOT return early, as this will return the wrong type if
|
|
19511
19597
|
the user has requested a DOM object rather than a string */
|
|
19512
|
-
|
|
19513
19598
|
IS_EMPTY_INPUT = !dirty;
|
|
19514
19599
|
if (IS_EMPTY_INPUT) {
|
|
19515
19600
|
dirty = '<!-->';
|
|
19516
19601
|
}
|
|
19517
|
-
/* Stringify, in case dirty is an object */
|
|
19518
19602
|
|
|
19603
|
+
/* Stringify, in case dirty is an object */
|
|
19519
19604
|
if (typeof dirty !== 'string' && !_isNode(dirty)) {
|
|
19520
19605
|
if (typeof dirty.toString === 'function') {
|
|
19521
19606
|
dirty = dirty.toString();
|
|
@@ -19526,21 +19611,21 @@
|
|
|
19526
19611
|
throw typeErrorCreate('toString is not a function');
|
|
19527
19612
|
}
|
|
19528
19613
|
}
|
|
19529
|
-
/* Return dirty HTML if DOMPurify cannot run */
|
|
19530
19614
|
|
|
19615
|
+
/* Return dirty HTML if DOMPurify cannot run */
|
|
19531
19616
|
if (!DOMPurify.isSupported) {
|
|
19532
19617
|
return dirty;
|
|
19533
19618
|
}
|
|
19534
|
-
/* Assign config vars */
|
|
19535
19619
|
|
|
19620
|
+
/* Assign config vars */
|
|
19536
19621
|
if (!SET_CONFIG) {
|
|
19537
19622
|
_parseConfig(cfg);
|
|
19538
19623
|
}
|
|
19539
|
-
/* Clean up removed elements */
|
|
19540
19624
|
|
|
19625
|
+
/* Clean up removed elements */
|
|
19541
19626
|
DOMPurify.removed = [];
|
|
19542
|
-
/* Check if dirty is correctly typed for IN_PLACE */
|
|
19543
19627
|
|
|
19628
|
+
/* Check if dirty is correctly typed for IN_PLACE */
|
|
19544
19629
|
if (typeof dirty === 'string') {
|
|
19545
19630
|
IN_PLACE = false;
|
|
19546
19631
|
}
|
|
@@ -19557,7 +19642,7 @@
|
|
|
19557
19642
|
elements being stripped by the parser */
|
|
19558
19643
|
body = _initDocument('<!---->');
|
|
19559
19644
|
importedNode = body.ownerDocument.importNode(dirty, true);
|
|
19560
|
-
if (importedNode.nodeType ===
|
|
19645
|
+
if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {
|
|
19561
19646
|
/* Node is already a body, use as is */
|
|
19562
19647
|
body = importedNode;
|
|
19563
19648
|
} else if (importedNode.nodeName === 'HTML') {
|
|
@@ -19573,46 +19658,46 @@
|
|
|
19573
19658
|
dirty.indexOf('<') === -1) {
|
|
19574
19659
|
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
|
|
19575
19660
|
}
|
|
19576
|
-
/* Initialize the document to work on */
|
|
19577
19661
|
|
|
19662
|
+
/* Initialize the document to work on */
|
|
19578
19663
|
body = _initDocument(dirty);
|
|
19579
|
-
/* Check we have a DOM node from the data */
|
|
19580
19664
|
|
|
19665
|
+
/* Check we have a DOM node from the data */
|
|
19581
19666
|
if (!body) {
|
|
19582
19667
|
return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
|
|
19583
19668
|
}
|
|
19584
19669
|
}
|
|
19585
|
-
/* Remove first element node (ours) if FORCE_BODY is set */
|
|
19586
19670
|
|
|
19671
|
+
/* Remove first element node (ours) if FORCE_BODY is set */
|
|
19587
19672
|
if (body && FORCE_BODY) {
|
|
19588
19673
|
_forceRemove(body.firstChild);
|
|
19589
19674
|
}
|
|
19590
|
-
/* Get node iterator */
|
|
19591
19675
|
|
|
19676
|
+
/* Get node iterator */
|
|
19592
19677
|
var nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
|
|
19593
|
-
/* Now start iterating over the created document */
|
|
19594
19678
|
|
|
19679
|
+
/* Now start iterating over the created document */
|
|
19595
19680
|
while (currentNode = nodeIterator.nextNode()) {
|
|
19596
19681
|
/* Sanitize tags and elements */
|
|
19597
19682
|
if (_sanitizeElements(currentNode)) {
|
|
19598
19683
|
continue;
|
|
19599
19684
|
}
|
|
19600
|
-
/* Shadow DOM detected, sanitize it */
|
|
19601
19685
|
|
|
19686
|
+
/* Shadow DOM detected, sanitize it */
|
|
19602
19687
|
if (currentNode.content instanceof DocumentFragment) {
|
|
19603
19688
|
_sanitizeShadowDOM(currentNode.content);
|
|
19604
19689
|
}
|
|
19605
|
-
/* Check attributes, sanitize if necessary */
|
|
19606
19690
|
|
|
19691
|
+
/* Check attributes, sanitize if necessary */
|
|
19607
19692
|
_sanitizeAttributes(currentNode);
|
|
19608
19693
|
}
|
|
19609
|
-
/* If we sanitized `dirty` in-place, return it. */
|
|
19610
19694
|
|
|
19695
|
+
/* If we sanitized `dirty` in-place, return it. */
|
|
19611
19696
|
if (IN_PLACE) {
|
|
19612
19697
|
return dirty;
|
|
19613
19698
|
}
|
|
19614
|
-
/* Return sanitized string or DOM */
|
|
19615
19699
|
|
|
19700
|
+
/* Return sanitized string or DOM */
|
|
19616
19701
|
if (RETURN_DOM) {
|
|
19617
19702
|
if (RETURN_DOM_FRAGMENT) {
|
|
19618
19703
|
returnNode = createDocumentFragment.call(body.ownerDocument);
|
|
@@ -19636,13 +19721,13 @@
|
|
|
19636
19721
|
return returnNode;
|
|
19637
19722
|
}
|
|
19638
19723
|
var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
|
|
19639
|
-
/* Serialize doctype if allowed */
|
|
19640
19724
|
|
|
19725
|
+
/* Serialize doctype if allowed */
|
|
19641
19726
|
if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
|
|
19642
19727
|
serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
|
|
19643
19728
|
}
|
|
19644
|
-
/* Sanitize final string template-safe */
|
|
19645
19729
|
|
|
19730
|
+
/* Sanitize final string template-safe */
|
|
19646
19731
|
if (SAFE_FOR_TEMPLATES) {
|
|
19647
19732
|
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], function (expr) {
|
|
19648
19733
|
serializedHTML = stringReplace(serializedHTML, expr, ' ');
|
|
@@ -19650,28 +19735,29 @@
|
|
|
19650
19735
|
}
|
|
19651
19736
|
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
|
|
19652
19737
|
};
|
|
19738
|
+
|
|
19653
19739
|
/**
|
|
19654
19740
|
* Public method to set the configuration once
|
|
19655
19741
|
* setConfig
|
|
19656
19742
|
*
|
|
19657
19743
|
* @param {Object} cfg configuration object
|
|
19658
19744
|
*/
|
|
19659
|
-
|
|
19660
19745
|
DOMPurify.setConfig = function () {
|
|
19661
19746
|
var cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
19662
19747
|
_parseConfig(cfg);
|
|
19663
19748
|
SET_CONFIG = true;
|
|
19664
19749
|
};
|
|
19750
|
+
|
|
19665
19751
|
/**
|
|
19666
19752
|
* Public method to remove the configuration
|
|
19667
19753
|
* clearConfig
|
|
19668
19754
|
*
|
|
19669
19755
|
*/
|
|
19670
|
-
|
|
19671
19756
|
DOMPurify.clearConfig = function () {
|
|
19672
19757
|
CONFIG = null;
|
|
19673
19758
|
SET_CONFIG = false;
|
|
19674
19759
|
};
|
|
19760
|
+
|
|
19675
19761
|
/**
|
|
19676
19762
|
* Public method to check if an attribute value is valid.
|
|
19677
19763
|
* Uses last set config, if any. Otherwise, uses config defaults.
|
|
@@ -19682,7 +19768,6 @@
|
|
|
19682
19768
|
* @param {String} value Attribute value.
|
|
19683
19769
|
* @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
|
|
19684
19770
|
*/
|
|
19685
|
-
|
|
19686
19771
|
DOMPurify.isValidAttribute = function (tag, attr, value) {
|
|
19687
19772
|
/* Initialize shared config vars if necessary. */
|
|
19688
19773
|
if (!CONFIG) {
|
|
@@ -19692,6 +19777,7 @@
|
|
|
19692
19777
|
var lcName = transformCaseFunc(attr);
|
|
19693
19778
|
return _isValidAttribute(lcTag, lcName, value);
|
|
19694
19779
|
};
|
|
19780
|
+
|
|
19695
19781
|
/**
|
|
19696
19782
|
* AddHook
|
|
19697
19783
|
* Public method to add DOMPurify hooks
|
|
@@ -19699,7 +19785,6 @@
|
|
|
19699
19785
|
* @param {String} entryPoint entry point for the hook to add
|
|
19700
19786
|
* @param {Function} hookFunction function to execute
|
|
19701
19787
|
*/
|
|
19702
|
-
|
|
19703
19788
|
DOMPurify.addHook = function (entryPoint, hookFunction) {
|
|
19704
19789
|
if (typeof hookFunction !== 'function') {
|
|
19705
19790
|
return;
|
|
@@ -19707,6 +19792,7 @@
|
|
|
19707
19792
|
hooks[entryPoint] = hooks[entryPoint] || [];
|
|
19708
19793
|
arrayPush(hooks[entryPoint], hookFunction);
|
|
19709
19794
|
};
|
|
19795
|
+
|
|
19710
19796
|
/**
|
|
19711
19797
|
* RemoveHook
|
|
19712
19798
|
* Public method to remove a DOMPurify hook at a given entryPoint
|
|
@@ -19715,29 +19801,28 @@
|
|
|
19715
19801
|
* @param {String} entryPoint entry point for the hook to remove
|
|
19716
19802
|
* @return {Function} removed(popped) hook
|
|
19717
19803
|
*/
|
|
19718
|
-
|
|
19719
19804
|
DOMPurify.removeHook = function (entryPoint) {
|
|
19720
19805
|
if (hooks[entryPoint]) {
|
|
19721
19806
|
return arrayPop(hooks[entryPoint]);
|
|
19722
19807
|
}
|
|
19723
19808
|
};
|
|
19809
|
+
|
|
19724
19810
|
/**
|
|
19725
19811
|
* RemoveHooks
|
|
19726
19812
|
* Public method to remove all DOMPurify hooks at a given entryPoint
|
|
19727
19813
|
*
|
|
19728
19814
|
* @param {String} entryPoint entry point for the hooks to remove
|
|
19729
19815
|
*/
|
|
19730
|
-
|
|
19731
19816
|
DOMPurify.removeHooks = function (entryPoint) {
|
|
19732
19817
|
if (hooks[entryPoint]) {
|
|
19733
19818
|
hooks[entryPoint] = [];
|
|
19734
19819
|
}
|
|
19735
19820
|
};
|
|
19821
|
+
|
|
19736
19822
|
/**
|
|
19737
19823
|
* RemoveAllHooks
|
|
19738
19824
|
* Public method to remove all DOMPurify hooks
|
|
19739
19825
|
*/
|
|
19740
|
-
|
|
19741
19826
|
DOMPurify.removeAllHooks = function () {
|
|
19742
19827
|
hooks = {};
|
|
19743
19828
|
};
|
|
@@ -19750,6 +19835,12 @@
|
|
|
19750
19835
|
|
|
19751
19836
|
var browser = window.DOMPurify || (window.DOMPurify = purify["default"] || purify);
|
|
19752
19837
|
|
|
19838
|
+
var DOMPurify = /*#__PURE__*/Object.freeze({
|
|
19839
|
+
__proto__: null,
|
|
19840
|
+
'default': browser,
|
|
19841
|
+
__moduleExports: browser
|
|
19842
|
+
});
|
|
19843
|
+
|
|
19753
19844
|
var textarea;
|
|
19754
19845
|
function decodeEntity(name) {
|
|
19755
19846
|
textarea = textarea || document.createElement('textarea');
|
|
@@ -26795,7 +26886,7 @@
|
|
|
26795
26886
|
if (typeof renderItem === 'function') {
|
|
26796
26887
|
var jsxEl = renderItem(newSuggestion);
|
|
26797
26888
|
var innerValue = innerText(jsxEl);
|
|
26798
|
-
newSuggestion.value =
|
|
26889
|
+
newSuggestion.value = undefined(innerValue);
|
|
26799
26890
|
}
|
|
26800
26891
|
return newSuggestion;
|
|
26801
26892
|
}
|
|
@@ -28135,7 +28226,7 @@
|
|
|
28135
28226
|
"style": {
|
|
28136
28227
|
display: 'flex'
|
|
28137
28228
|
},
|
|
28138
|
-
"innerHTML":
|
|
28229
|
+
"innerHTML": undefined(item.icon)
|
|
28139
28230
|
}, null);
|
|
28140
28231
|
};
|
|
28141
28232
|
}
|
|
@@ -28146,7 +28237,7 @@
|
|
|
28146
28237
|
"style": {
|
|
28147
28238
|
maxWidth: '30px'
|
|
28148
28239
|
},
|
|
28149
|
-
"src":
|
|
28240
|
+
"src": undefined(item.iconURL),
|
|
28150
28241
|
"alt": item.value
|
|
28151
28242
|
}, null)
|
|
28152
28243
|
);
|
|
@@ -28184,7 +28275,7 @@
|
|
|
28184
28275
|
}), !_this19.showAIScreen && _this19.parsedSuggestions.map(function (item, itemIndex) {
|
|
28185
28276
|
var index = indexOffset + itemIndex;
|
|
28186
28277
|
if (Array.isArray(item)) {
|
|
28187
|
-
var sectionHtml =
|
|
28278
|
+
var sectionHtml = undefined(item[0].sectionLabel);
|
|
28188
28279
|
indexOffset += item.length - 1;
|
|
28189
28280
|
return vue.createVNode("div", {
|
|
28190
28281
|
"key": "section-" + itemIndex,
|
|
@@ -29371,8 +29462,6 @@
|
|
|
29371
29462
|
enableAI: Q.bool.def(true),
|
|
29372
29463
|
AIConfig: types.AIConfig,
|
|
29373
29464
|
iconPosition: types.iconPosition.def('left'),
|
|
29374
|
-
themePreset: types.themePreset,
|
|
29375
|
-
theme: types.style,
|
|
29376
29465
|
icon: types.children,
|
|
29377
29466
|
iconURL: Q.string.def(''),
|
|
29378
29467
|
renderMic: types.func,
|
|
@@ -29380,27 +29469,17 @@
|
|
|
29380
29469
|
innerClass: types.style,
|
|
29381
29470
|
placeholder: Q.string.def('Ask a question'),
|
|
29382
29471
|
title: types.title,
|
|
29383
|
-
AIResponse: types.componentObject,
|
|
29384
|
-
isAIResponseLoading: Q.bool.def(false),
|
|
29385
|
-
AIResponseError: types.componentObject,
|
|
29386
|
-
getAIResponse: types.func.isRequired,
|
|
29387
29472
|
enterButton: types.bool,
|
|
29388
29473
|
renderEnterButton: types.title,
|
|
29389
29474
|
showInput: Q.bool.def(true),
|
|
29390
29475
|
clearSessionOnDestroy: Q.bool.def(true),
|
|
29391
|
-
rawData: types.rawData,
|
|
29392
29476
|
render: types.func,
|
|
29393
29477
|
onError: types.func,
|
|
29394
29478
|
renderError: types.title,
|
|
29395
|
-
isLoading: types.boolRequired,
|
|
29396
|
-
sessionIdFromStore: Q.string,
|
|
29397
|
-
showComponent: types.boolRequired,
|
|
29398
|
-
componentError: types.componentObject,
|
|
29399
29479
|
style: types.style,
|
|
29400
29480
|
showSourceDocuments: Q.bool.def(false),
|
|
29401
29481
|
renderSourceDocument: types.func,
|
|
29402
29482
|
onSourceClick: types.func,
|
|
29403
|
-
isAITyping: types.boolRequired,
|
|
29404
29483
|
triggerOn: Q.string.def(AI_TRIGGER_MODES.ALWAYS),
|
|
29405
29484
|
renderTriggerMessage: types.func
|
|
29406
29485
|
},
|
|
@@ -29450,7 +29529,7 @@
|
|
|
29450
29529
|
this.$emit('on-data', {
|
|
29451
29530
|
data: this.messages,
|
|
29452
29531
|
rawData: newVal,
|
|
29453
|
-
loading: this
|
|
29532
|
+
loading: this.isAIResponseLoading || this.$props.isLoading,
|
|
29454
29533
|
error: this.$props.AIResponseError
|
|
29455
29534
|
});
|
|
29456
29535
|
if (newVal && newVal.hits && newVal.hits.hits) {
|
|
@@ -42913,7 +42992,8 @@
|
|
|
42913
42992
|
searchAsMove: props.defaultSearchAsMove,
|
|
42914
42993
|
currentPageState: currentPageState,
|
|
42915
42994
|
mapBoxBounds: null,
|
|
42916
|
-
markersData: null
|
|
42995
|
+
markersData: null,
|
|
42996
|
+
filteredResults: null
|
|
42917
42997
|
};
|
|
42918
42998
|
return this.__state;
|
|
42919
42999
|
},
|
|
@@ -44651,7 +44731,6 @@
|
|
|
44651
44731
|
var openMarkers = this.openMarkers;
|
|
44652
44732
|
var markerProps = {
|
|
44653
44733
|
openMarkers: openMarkers,
|
|
44654
|
-
setMarkerOnTop: this.setMarkerOnTop,
|
|
44655
44734
|
setOpenMarkers: this.setOpenMarkers,
|
|
44656
44735
|
getPosition: this.getPosition,
|
|
44657
44736
|
renderItem: this.renderItem,
|
|
@@ -44915,15 +44994,11 @@
|
|
|
44915
44994
|
|
|
44916
44995
|
var _PatchFlagNames, _slotFlagsText;
|
|
44917
44996
|
function makeMap(str, expectsLowerCase) {
|
|
44918
|
-
var
|
|
44919
|
-
var list = str.split(",");
|
|
44920
|
-
for (var i = 0; i < list.length; i++) {
|
|
44921
|
-
map[list[i]] = true;
|
|
44922
|
-
}
|
|
44997
|
+
var set = new Set(str.split(","));
|
|
44923
44998
|
return expectsLowerCase ? function (val) {
|
|
44924
|
-
return
|
|
44999
|
+
return set.has(val.toLowerCase());
|
|
44925
45000
|
} : function (val) {
|
|
44926
|
-
return
|
|
45001
|
+
return set.has(val);
|
|
44927
45002
|
};
|
|
44928
45003
|
}
|
|
44929
45004
|
var EMPTY_OBJ = Object.freeze({}) ;
|
|
@@ -45173,15 +45248,24 @@
|
|
|
45173
45248
|
targetBuffer.splice(bufferIndex, 0, teleportContent);
|
|
45174
45249
|
parentPush("<!--teleport end-->");
|
|
45175
45250
|
}
|
|
45176
|
-
var ErrorTypeStrings = (_ErrorTypeStrings = {}, _ErrorTypeStrings["sp"] = "serverPrefetch hook", _ErrorTypeStrings["bc"] = "beforeCreate hook", _ErrorTypeStrings["c"] = "created hook", _ErrorTypeStrings["bm"] = "beforeMount hook", _ErrorTypeStrings["m"] = "mounted hook", _ErrorTypeStrings["bu"] = "beforeUpdate hook", _ErrorTypeStrings["u"] = "updated", _ErrorTypeStrings["bum"] = "beforeUnmount hook", _ErrorTypeStrings["um"] = "unmounted hook", _ErrorTypeStrings["a"] = "activated hook", _ErrorTypeStrings["da"] = "deactivated hook", _ErrorTypeStrings["ec"] = "errorCaptured hook", _ErrorTypeStrings["rtc"] = "renderTracked hook", _ErrorTypeStrings["rtg"] = "renderTriggered hook", _ErrorTypeStrings[0] = "setup function", _ErrorTypeStrings[1] = "render function", _ErrorTypeStrings[2] = "watcher getter", _ErrorTypeStrings[3] = "watcher callback", _ErrorTypeStrings[4] = "watcher cleanup function", _ErrorTypeStrings[5] = "native event handler", _ErrorTypeStrings[6] = "component event handler", _ErrorTypeStrings[7] = "vnode hook", _ErrorTypeStrings[8] = "directive hook", _ErrorTypeStrings[9] = "transition hook", _ErrorTypeStrings[10] = "app errorHandler", _ErrorTypeStrings[11] = "app warnHandler", _ErrorTypeStrings[12] = "ref function", _ErrorTypeStrings[13] = "async component loader", _ErrorTypeStrings[14] = "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://
|
|
45177
|
-
var globalCurrentInstanceSetters;
|
|
45178
|
-
var settersKey = "__VUE_INSTANCE_SETTERS__";
|
|
45251
|
+
var ErrorTypeStrings = (_ErrorTypeStrings = {}, _ErrorTypeStrings["sp"] = "serverPrefetch hook", _ErrorTypeStrings["bc"] = "beforeCreate hook", _ErrorTypeStrings["c"] = "created hook", _ErrorTypeStrings["bm"] = "beforeMount hook", _ErrorTypeStrings["m"] = "mounted hook", _ErrorTypeStrings["bu"] = "beforeUpdate hook", _ErrorTypeStrings["u"] = "updated", _ErrorTypeStrings["bum"] = "beforeUnmount hook", _ErrorTypeStrings["um"] = "unmounted hook", _ErrorTypeStrings["a"] = "activated hook", _ErrorTypeStrings["da"] = "deactivated hook", _ErrorTypeStrings["ec"] = "errorCaptured hook", _ErrorTypeStrings["rtc"] = "renderTracked hook", _ErrorTypeStrings["rtg"] = "renderTriggered hook", _ErrorTypeStrings[0] = "setup function", _ErrorTypeStrings[1] = "render function", _ErrorTypeStrings[2] = "watcher getter", _ErrorTypeStrings[3] = "watcher callback", _ErrorTypeStrings[4] = "watcher cleanup function", _ErrorTypeStrings[5] = "native event handler", _ErrorTypeStrings[6] = "component event handler", _ErrorTypeStrings[7] = "vnode hook", _ErrorTypeStrings[8] = "directive hook", _ErrorTypeStrings[9] = "transition hook", _ErrorTypeStrings[10] = "app errorHandler", _ErrorTypeStrings[11] = "app warnHandler", _ErrorTypeStrings[12] = "ref function", _ErrorTypeStrings[13] = "async component loader", _ErrorTypeStrings[14] = "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .", _ErrorTypeStrings);
|
|
45179
45252
|
{
|
|
45180
|
-
|
|
45181
|
-
|
|
45182
|
-
|
|
45183
|
-
|
|
45184
|
-
|
|
45253
|
+
var g$2 = getGlobalThis();
|
|
45254
|
+
var registerGlobalSetter = function registerGlobalSetter(key, setter) {
|
|
45255
|
+
var setters;
|
|
45256
|
+
if (!(setters = g$2[key])) setters = g$2[key] = [];
|
|
45257
|
+
setters.push(setter);
|
|
45258
|
+
return function (v) {
|
|
45259
|
+
if (setters.length > 1) setters.forEach(function (set) {
|
|
45260
|
+
return set(v);
|
|
45261
|
+
});else setters[0](v);
|
|
45262
|
+
};
|
|
45263
|
+
};
|
|
45264
|
+
registerGlobalSetter("__VUE_INSTANCE_SETTERS__", function (v) {
|
|
45265
|
+
return v;
|
|
45266
|
+
});
|
|
45267
|
+
registerGlobalSetter("__VUE_SSR_SETTERS__", function (v) {
|
|
45268
|
+
return v;
|
|
45185
45269
|
});
|
|
45186
45270
|
}
|
|
45187
45271
|
function ssrCompile(template, instance) {
|
|
@@ -47178,7 +47262,7 @@
|
|
|
47178
47262
|
}, queryString, renderFunction);
|
|
47179
47263
|
}
|
|
47180
47264
|
|
|
47181
|
-
var version = "3.3.
|
|
47265
|
+
var version = "3.3.6";
|
|
47182
47266
|
|
|
47183
47267
|
var components = [RLConnected, ResultCard, ResultList, ReactiveBase, SBConnected, ListConnected, ListConnected$1, RangeConnected$1, RangeConnected$2, RangeConnected$3, RangeConnected, RcConnected, RcConnected$1, RcConnected$2, TBConnected, ListConnected$2, ListConnected$3, StateProviderConnected, RangeConnected$4, TreeListConnected, AIConnected];
|
|
47184
47268
|
function install$1 (Vue) {
|