@knime/kds-rich-text-editor 12.0.0 → 13.0.0

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/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../node_modules/.pnpm/dompurify@3.4.17/node_modules/dompurify/dist/purify.es.mjs","../../utils/dist/index.js","../../styles/dist/img/icons/external-link.svg?url","../src/enums.ts","../src/toolbar/KdsCreateLinkModal.vue","../src/toolbar/KdsCreateLinkModal.vue","../src/utils/paragraphTextStyle/index.ts","../src/toolbar/useLinkTool.ts","../src/toolbar/RichTextEditorBaseToolbar.vue","../src/toolbar/RichTextEditorBaseToolbar.vue","../src/toolbar/RichTextEditorToolbar.vue","../src/toolbar/RichTextEditorToolbar.vue","../src/utils/custom-escape.ts","../src/utils/custom-hard-break.ts","../src/utils/custom-link.ts","../src/utils/custom-text-align.ts","../src/utils/paragraphTextStyle/extension.ts","../src/KdsRichTextEditor.vue","../src/KdsRichTextEditor.vue","../src/KdsRichTextInput.vue","../src/KdsRichTextInput.vue"],"sourcesContent":["/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */\nfunction _OverloadYield(e, d) {\n\tthis.v = e, this.k = d;\n}\nfunction _arrayLikeToArray(r, a) {\n\t(null == a || a > r.length) && (a = r.length);\n\tfor (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n\treturn n;\n}\nfunction _arrayWithHoles(r) {\n\tif (Array.isArray(r)) return r;\n}\nfunction _iterableToArrayLimit(r, l) {\n\tvar t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n\tif (null != t) {\n\t\tvar e, n, i, u, a = [], f = !0, o = !1;\n\t\ttry {\n\t\t\tif (i = (t = t.call(r)).next, 0 === l) {\n\t\t\t\tif (Object(t) !== t) return;\n\t\t\t\tf = !1;\n\t\t\t} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n\t\t} catch (r) {\n\t\t\to = !0, n = r;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n\t\t\t} finally {\n\t\t\t\tif (o) throw n;\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}\n}\nfunction _nonIterableRest() {\n\tthrow new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */\nfunction _slicedToArray(r, e) {\n\treturn _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _unsupportedIterableToArray(r, a) {\n\tif (r) {\n\t\tif (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n\t\tvar t = {}.toString.call(r).slice(8, -1);\n\t\treturn \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n\t}\n}\nfunction AsyncGenerator(e) {\n\tvar t, n;\n\tfunction resume(t, n) {\n\t\ttry {\n\t\t\tvar r = e[t](n), o = r.value, u = o instanceof _OverloadYield;\n\t\t\tPromise.resolve(u ? o.v : o).then(function(n) {\n\t\t\t\tif (u) {\n\t\t\t\t\tvar i = \"return\" === t && o.k ? t : \"next\";\n\t\t\t\t\tif (!o.k || n.done) return resume(i, n);\n\t\t\t\t\tn = e[i](n).value;\n\t\t\t\t}\n\t\t\t\tsettle(!!r.done, n);\n\t\t\t}, function(e) {\n\t\t\t\tresume(\"throw\", e);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tsettle(2, e);\n\t\t}\n\t}\n\tfunction settle(e, r) {\n\t\t2 === e ? t.reject(r) : t.resolve({\n\t\t\tvalue: r,\n\t\t\tdone: e\n\t\t}), (t = t.next) ? resume(t.key, t.arg) : n = null;\n\t}\n\tthis._invoke = function(e, r) {\n\t\treturn new Promise(function(o, u) {\n\t\t\tvar i = {\n\t\t\t\tkey: e,\n\t\t\t\targ: r,\n\t\t\t\tresolve: o,\n\t\t\t\treject: u,\n\t\t\t\tnext: null\n\t\t\t};\n\t\t\tn ? n = n.next = i : (t = n = i, resume(e, r));\n\t\t});\n\t}, \"function\" != typeof e.return && (this.return = void 0);\n}\nAsyncGenerator.prototype[\"function\" == typeof Symbol && Symbol.asyncIterator || \"@@asyncIterator\"] = function() {\n\treturn this;\n}, AsyncGenerator.prototype.next = function(e) {\n\treturn this._invoke(\"next\", e);\n}, AsyncGenerator.prototype.throw = function(e) {\n\treturn this._invoke(\"throw\", e);\n}, AsyncGenerator.prototype.return = function(e) {\n\treturn this._invoke(\"return\", e);\n};\nconst entries = Object.entries;\nconst setPrototypeOf = Object.setPrototypeOf;\nconst isFrozen = Object.isFrozen;\nconst getPrototypeOf = Object.getPrototypeOf;\nconst getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nlet freeze = Object.freeze;\nlet seal = Object.seal;\nlet create = Object.create;\nlet _ref = typeof Reflect !== \"undefined\" && Reflect;\nlet apply = _ref.apply;\nlet construct = _ref.construct;\nif (!freeze) freeze = function freeze(x) {\n\treturn x;\n};\nif (!seal) seal = function seal(x) {\n\treturn x;\n};\nif (!apply) apply = function apply(func, thisArg) {\n\tfor (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];\n\treturn func.apply(thisArg, args);\n};\nif (!construct) construct = function construct(Func) {\n\tfor (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];\n\treturn new Func(...args);\n};\nconst arrayForEach = unapply(Array.prototype.forEach);\nArray.prototype.indexOf;\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySlice = unapply(Array.prototype.slice);\nconst arraySplice = unapply(Array.prototype.splice);\nconst arrayIsArray = Array.isArray;\nconst setCreate = unconstruct(Set);\nconst setAdd = unapply(Set.prototype.add);\nconst setHas = unapply(Set.prototype.has);\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\nconst numberToString = unapply(Number.prototype.toString);\nconst booleanToString = unapply(Boolean.prototype.toString);\nconst bigintToString = typeof BigInt === \"undefined\" ? null : unapply(BigInt.prototype.toString);\nconst symbolToString = typeof Symbol === \"undefined\" ? null : unapply(Symbol.prototype.toString);\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\nconst objectToString = unapply(Object.prototype.toString);\nconst regExpTest = unapply(RegExp.prototype.test);\nconst typeErrorCreate = unconstruct(TypeError);\n/**\n* Creates a new function that calls the given function with a specified thisArg and arguments.\n*\n* @param func - The function to be wrapped and called.\n* @returns A new function that calls the given function with a specified thisArg and arguments.\n*/\nfunction unapply(func) {\n\treturn function(thisArg) {\n\t\tif (thisArg instanceof RegExp) thisArg.lastIndex = 0;\n\t\tfor (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];\n\t\treturn apply(func, thisArg, args);\n\t};\n}\n/**\n* Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n*\n* @param func - The constructor function to be wrapped and called.\n* @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n*/\nfunction unconstruct(Func) {\n\treturn function() {\n\t\tfor (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];\n\t\treturn construct(Func, args);\n\t};\n}\n/**\n* Add properties to a lookup table\n*\n* @param set - The set to which elements will be added.\n* @param array - The array containing elements to be added to the set.\n* @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n* @returns The modified set with added elements.\n*/\nfunction addToSet(set, array) {\n\tlet transformCaseFunc = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;\n\tif (setPrototypeOf) setPrototypeOf(set, null);\n\tif (!arrayIsArray(array)) return set;\n\tlet l = array.length;\n\twhile (l--) {\n\t\tlet element = array[l];\n\t\tif (typeof element === \"string\") {\n\t\t\tconst lcElement = transformCaseFunc(element);\n\t\t\tif (lcElement !== element) {\n\t\t\t\tif (!isFrozen(array)) array[l] = lcElement;\n\t\t\t\telement = lcElement;\n\t\t\t}\n\t\t}\n\t\tset[element] = true;\n\t}\n\treturn set;\n}\n/**\n* Clean up an array to harden against CSPP\n*\n* @param array - The array to be cleaned.\n* @returns The cleaned version of the array\n*/\nfunction cleanArray(array) {\n\tfor (let index = 0; index < array.length; index++) if (!objectHasOwnProperty(array, index)) array[index] = null;\n\treturn array;\n}\n/**\n* Shallow clone an object\n*\n* @param object - The object to be cloned.\n* @returns A new object that copies the original.\n*/\nfunction clone(object) {\n\tconst newObject = create(null);\n\tfor (const _ref2 of entries(object)) {\n\t\tvar _ref3 = _slicedToArray(_ref2, 2);\n\t\tconst property = _ref3[0];\n\t\tconst value = _ref3[1];\n\t\tif (objectHasOwnProperty(object, property)) {\n\t\t\tif (arrayIsArray(value)) newObject[property] = cleanArray(value);\n\t\t\telse if (value && typeof value === \"object\" && value.constructor === Object) newObject[property] = clone(value);\n\t\t\telse newObject[property] = value;\n\t\t}\n\t}\n\treturn newObject;\n}\n/**\n* Convert non-node values into strings without depending on direct property access.\n*\n* @param value - The value to stringify.\n* @returns A string representation of the provided value.\n*/\nfunction stringifyValue(value) {\n\tswitch (typeof value) {\n\t\tcase \"string\": return value;\n\t\tcase \"number\": return numberToString(value);\n\t\tcase \"boolean\": return booleanToString(value);\n\t\tcase \"bigint\": return bigintToString ? bigintToString(value) : \"0\";\n\t\tcase \"symbol\": return symbolToString ? symbolToString(value) : \"Symbol()\";\n\t\tcase \"undefined\": return objectToString(value);\n\t\tcase \"function\":\n\t\tcase \"object\": {\n\t\t\tif (value === null) return objectToString(value);\n\t\t\tconst valueAsRecord = value;\n\t\t\tconst valueToString = lookupGetter(valueAsRecord, \"toString\");\n\t\t\tif (typeof valueToString === \"function\") {\n\t\t\t\tconst stringified = valueToString(valueAsRecord);\n\t\t\t\treturn typeof stringified === \"string\" ? stringified : objectToString(stringified);\n\t\t\t}\n\t\t\treturn objectToString(value);\n\t\t}\n\t\tdefault: return objectToString(value);\n\t}\n}\n/**\n* This method automatically checks if the prop is function or getter and behaves accordingly.\n*\n* @param object - The object to look up the getter function in its prototype chain.\n* @param prop - The property name for which to find the getter function.\n* @returns The getter function found in the prototype chain or a fallback function.\n*/\nfunction lookupGetter(object, prop) {\n\twhile (object !== null) {\n\t\tconst desc = getOwnPropertyDescriptor(object, prop);\n\t\tif (desc) {\n\t\t\tif (desc.get) return unapply(desc.get);\n\t\t\tif (typeof desc.value === \"function\") return unapply(desc.value);\n\t\t}\n\t\tobject = getPrototypeOf(object);\n\t}\n\tfunction fallbackValue() {\n\t\treturn null;\n\t}\n\treturn fallbackValue;\n}\n/**\n* Like lookupGetter, but for accessor properties only, and returns null\n* instead of a null-returning fallback when no getter exists on the chain.\n* Lets a caller fall back to a direct property read in environments that\n* lack the getter, where a fallback returning null would be indistinguishable\n* from a legitimate null value (e.g. namespaceURI of a no-namespace element).\n*\n* @param object - The object (usually a prototype) to start the lookup at.\n* @param prop - The accessor property name.\n* @returns The unapplied getter, or null if none was found.\n*/\nfunction lookupAccessor(object, prop) {\n\twhile (object !== null) {\n\t\tconst desc = getOwnPropertyDescriptor(object, prop);\n\t\tif (desc) return desc.get ? unapply(desc.get) : null;\n\t\tobject = getPrototypeOf(object);\n\t}\n\treturn null;\n}\nfunction isRegex(value) {\n\ttry {\n\t\tregExpTest(value, \"\");\n\t\treturn true;\n\t} catch (_unused) {\n\t\treturn false;\n\t}\n}\nconst html$1 = freeze([\n\t\"a\",\n\t\"abbr\",\n\t\"acronym\",\n\t\"address\",\n\t\"area\",\n\t\"article\",\n\t\"aside\",\n\t\"audio\",\n\t\"b\",\n\t\"bdi\",\n\t\"bdo\",\n\t\"big\",\n\t\"blink\",\n\t\"blockquote\",\n\t\"body\",\n\t\"br\",\n\t\"button\",\n\t\"canvas\",\n\t\"caption\",\n\t\"center\",\n\t\"cite\",\n\t\"code\",\n\t\"col\",\n\t\"colgroup\",\n\t\"content\",\n\t\"data\",\n\t\"datalist\",\n\t\"dd\",\n\t\"decorator\",\n\t\"del\",\n\t\"details\",\n\t\"dfn\",\n\t\"dialog\",\n\t\"dir\",\n\t\"div\",\n\t\"dl\",\n\t\"dt\",\n\t\"element\",\n\t\"em\",\n\t\"fieldset\",\n\t\"figcaption\",\n\t\"figure\",\n\t\"font\",\n\t\"footer\",\n\t\"form\",\n\t\"h1\",\n\t\"h2\",\n\t\"h3\",\n\t\"h4\",\n\t\"h5\",\n\t\"h6\",\n\t\"head\",\n\t\"header\",\n\t\"hgroup\",\n\t\"hr\",\n\t\"html\",\n\t\"i\",\n\t\"img\",\n\t\"input\",\n\t\"ins\",\n\t\"kbd\",\n\t\"label\",\n\t\"legend\",\n\t\"li\",\n\t\"main\",\n\t\"map\",\n\t\"mark\",\n\t\"marquee\",\n\t\"menu\",\n\t\"menuitem\",\n\t\"meter\",\n\t\"nav\",\n\t\"nobr\",\n\t\"ol\",\n\t\"optgroup\",\n\t\"option\",\n\t\"output\",\n\t\"p\",\n\t\"picture\",\n\t\"pre\",\n\t\"progress\",\n\t\"q\",\n\t\"rp\",\n\t\"rt\",\n\t\"ruby\",\n\t\"s\",\n\t\"samp\",\n\t\"search\",\n\t\"section\",\n\t\"select\",\n\t\"shadow\",\n\t\"slot\",\n\t\"small\",\n\t\"source\",\n\t\"spacer\",\n\t\"span\",\n\t\"strike\",\n\t\"strong\",\n\t\"style\",\n\t\"sub\",\n\t\"summary\",\n\t\"sup\",\n\t\"table\",\n\t\"tbody\",\n\t\"td\",\n\t\"template\",\n\t\"textarea\",\n\t\"tfoot\",\n\t\"th\",\n\t\"thead\",\n\t\"time\",\n\t\"tr\",\n\t\"track\",\n\t\"tt\",\n\t\"u\",\n\t\"ul\",\n\t\"var\",\n\t\"video\",\n\t\"wbr\"\n]);\nconst svg$1 = freeze([\n\t\"svg\",\n\t\"a\",\n\t\"altglyph\",\n\t\"altglyphdef\",\n\t\"altglyphitem\",\n\t\"animatecolor\",\n\t\"animatemotion\",\n\t\"animatetransform\",\n\t\"circle\",\n\t\"clippath\",\n\t\"defs\",\n\t\"desc\",\n\t\"ellipse\",\n\t\"enterkeyhint\",\n\t\"exportparts\",\n\t\"filter\",\n\t\"font\",\n\t\"g\",\n\t\"glyph\",\n\t\"glyphref\",\n\t\"hkern\",\n\t\"image\",\n\t\"inputmode\",\n\t\"line\",\n\t\"lineargradient\",\n\t\"marker\",\n\t\"mask\",\n\t\"metadata\",\n\t\"mpath\",\n\t\"part\",\n\t\"path\",\n\t\"pattern\",\n\t\"polygon\",\n\t\"polyline\",\n\t\"radialgradient\",\n\t\"rect\",\n\t\"stop\",\n\t\"style\",\n\t\"switch\",\n\t\"symbol\",\n\t\"text\",\n\t\"textpath\",\n\t\"title\",\n\t\"tref\",\n\t\"tspan\",\n\t\"view\",\n\t\"vkern\"\n]);\nconst svgFilters = freeze([\n\t\"feBlend\",\n\t\"feColorMatrix\",\n\t\"feComponentTransfer\",\n\t\"feComposite\",\n\t\"feConvolveMatrix\",\n\t\"feDiffuseLighting\",\n\t\"feDisplacementMap\",\n\t\"feDistantLight\",\n\t\"feDropShadow\",\n\t\"feFlood\",\n\t\"feFuncA\",\n\t\"feFuncB\",\n\t\"feFuncG\",\n\t\"feFuncR\",\n\t\"feGaussianBlur\",\n\t\"feImage\",\n\t\"feMerge\",\n\t\"feMergeNode\",\n\t\"feMorphology\",\n\t\"feOffset\",\n\t\"fePointLight\",\n\t\"feSpecularLighting\",\n\t\"feSpotLight\",\n\t\"feTile\",\n\t\"feTurbulence\"\n]);\nconst svgDisallowed = freeze([\n\t\"animate\",\n\t\"color-profile\",\n\t\"cursor\",\n\t\"discard\",\n\t\"font-face\",\n\t\"font-face-format\",\n\t\"font-face-name\",\n\t\"font-face-src\",\n\t\"font-face-uri\",\n\t\"foreignobject\",\n\t\"hatch\",\n\t\"hatchpath\",\n\t\"mesh\",\n\t\"meshgradient\",\n\t\"meshpatch\",\n\t\"meshrow\",\n\t\"missing-glyph\",\n\t\"script\",\n\t\"set\",\n\t\"solidcolor\",\n\t\"unknown\",\n\t\"use\"\n]);\nconst mathMl$1 = freeze([\n\t\"math\",\n\t\"menclose\",\n\t\"merror\",\n\t\"mfenced\",\n\t\"mfrac\",\n\t\"mglyph\",\n\t\"mi\",\n\t\"mlabeledtr\",\n\t\"mmultiscripts\",\n\t\"mn\",\n\t\"mo\",\n\t\"mover\",\n\t\"mpadded\",\n\t\"mphantom\",\n\t\"mroot\",\n\t\"mrow\",\n\t\"ms\",\n\t\"mspace\",\n\t\"msqrt\",\n\t\"mstyle\",\n\t\"msub\",\n\t\"msup\",\n\t\"msubsup\",\n\t\"mtable\",\n\t\"mtd\",\n\t\"mtext\",\n\t\"mtr\",\n\t\"munder\",\n\t\"munderover\",\n\t\"mprescripts\"\n]);\nconst mathMlDisallowed = freeze([\n\t\"maction\",\n\t\"maligngroup\",\n\t\"malignmark\",\n\t\"mlongdiv\",\n\t\"mscarries\",\n\t\"mscarry\",\n\t\"msgroup\",\n\t\"mstack\",\n\t\"msline\",\n\t\"msrow\",\n\t\"semantics\",\n\t\"annotation\",\n\t\"annotation-xml\",\n\t\"mprescripts\",\n\t\"none\"\n]);\nconst text = freeze([\"#text\"]);\nconst html = freeze([\n\t\"accept\",\n\t\"action\",\n\t\"align\",\n\t\"alt\",\n\t\"autocapitalize\",\n\t\"autocomplete\",\n\t\"autopictureinpicture\",\n\t\"autoplay\",\n\t\"background\",\n\t\"bgcolor\",\n\t\"border\",\n\t\"capture\",\n\t\"cellpadding\",\n\t\"cellspacing\",\n\t\"checked\",\n\t\"cite\",\n\t\"class\",\n\t\"clear\",\n\t\"color\",\n\t\"cols\",\n\t\"colspan\",\n\t\"command\",\n\t\"commandfor\",\n\t\"controls\",\n\t\"controlslist\",\n\t\"coords\",\n\t\"crossorigin\",\n\t\"datetime\",\n\t\"decoding\",\n\t\"default\",\n\t\"dir\",\n\t\"disabled\",\n\t\"disablepictureinpicture\",\n\t\"disableremoteplayback\",\n\t\"download\",\n\t\"draggable\",\n\t\"enctype\",\n\t\"enterkeyhint\",\n\t\"exportparts\",\n\t\"face\",\n\t\"for\",\n\t\"headers\",\n\t\"height\",\n\t\"hidden\",\n\t\"high\",\n\t\"href\",\n\t\"hreflang\",\n\t\"id\",\n\t\"inert\",\n\t\"inputmode\",\n\t\"integrity\",\n\t\"ismap\",\n\t\"kind\",\n\t\"label\",\n\t\"lang\",\n\t\"list\",\n\t\"loading\",\n\t\"loop\",\n\t\"low\",\n\t\"max\",\n\t\"maxlength\",\n\t\"media\",\n\t\"method\",\n\t\"min\",\n\t\"minlength\",\n\t\"multiple\",\n\t\"muted\",\n\t\"name\",\n\t\"nonce\",\n\t\"noshade\",\n\t\"novalidate\",\n\t\"nowrap\",\n\t\"open\",\n\t\"optimum\",\n\t\"part\",\n\t\"pattern\",\n\t\"placeholder\",\n\t\"playsinline\",\n\t\"popover\",\n\t\"popovertarget\",\n\t\"popovertargetaction\",\n\t\"poster\",\n\t\"preload\",\n\t\"pubdate\",\n\t\"radiogroup\",\n\t\"readonly\",\n\t\"rel\",\n\t\"required\",\n\t\"rev\",\n\t\"reversed\",\n\t\"role\",\n\t\"rows\",\n\t\"rowspan\",\n\t\"spellcheck\",\n\t\"scope\",\n\t\"selected\",\n\t\"shape\",\n\t\"size\",\n\t\"sizes\",\n\t\"slot\",\n\t\"span\",\n\t\"srclang\",\n\t\"start\",\n\t\"src\",\n\t\"srcset\",\n\t\"step\",\n\t\"style\",\n\t\"summary\",\n\t\"tabindex\",\n\t\"title\",\n\t\"translate\",\n\t\"type\",\n\t\"usemap\",\n\t\"valign\",\n\t\"value\",\n\t\"width\",\n\t\"wrap\",\n\t\"xmlns\"\n]);\nconst svg = freeze([\n\t\"accent-height\",\n\t\"accumulate\",\n\t\"additive\",\n\t\"alignment-baseline\",\n\t\"amplitude\",\n\t\"ascent\",\n\t\"attributename\",\n\t\"attributetype\",\n\t\"azimuth\",\n\t\"basefrequency\",\n\t\"baseline-shift\",\n\t\"begin\",\n\t\"bias\",\n\t\"by\",\n\t\"class\",\n\t\"clip\",\n\t\"clippathunits\",\n\t\"clip-path\",\n\t\"clip-rule\",\n\t\"color\",\n\t\"color-interpolation\",\n\t\"color-interpolation-filters\",\n\t\"color-profile\",\n\t\"color-rendering\",\n\t\"cx\",\n\t\"cy\",\n\t\"d\",\n\t\"dx\",\n\t\"dy\",\n\t\"diffuseconstant\",\n\t\"direction\",\n\t\"display\",\n\t\"divisor\",\n\t\"dominant-baseline\",\n\t\"dur\",\n\t\"edgemode\",\n\t\"elevation\",\n\t\"end\",\n\t\"exponent\",\n\t\"fill\",\n\t\"fill-opacity\",\n\t\"fill-rule\",\n\t\"filter\",\n\t\"filterunits\",\n\t\"flood-color\",\n\t\"flood-opacity\",\n\t\"font-family\",\n\t\"font-size\",\n\t\"font-size-adjust\",\n\t\"font-stretch\",\n\t\"font-style\",\n\t\"font-variant\",\n\t\"font-weight\",\n\t\"fx\",\n\t\"fy\",\n\t\"g1\",\n\t\"g2\",\n\t\"glyph-name\",\n\t\"glyphref\",\n\t\"gradientunits\",\n\t\"gradienttransform\",\n\t\"height\",\n\t\"href\",\n\t\"id\",\n\t\"image-rendering\",\n\t\"in\",\n\t\"in2\",\n\t\"intercept\",\n\t\"k\",\n\t\"k1\",\n\t\"k2\",\n\t\"k3\",\n\t\"k4\",\n\t\"kerning\",\n\t\"keypoints\",\n\t\"keysplines\",\n\t\"keytimes\",\n\t\"lang\",\n\t\"lengthadjust\",\n\t\"letter-spacing\",\n\t\"kernelmatrix\",\n\t\"kernelunitlength\",\n\t\"lighting-color\",\n\t\"local\",\n\t\"marker-end\",\n\t\"marker-mid\",\n\t\"marker-start\",\n\t\"markerheight\",\n\t\"markerunits\",\n\t\"markerwidth\",\n\t\"maskcontentunits\",\n\t\"maskunits\",\n\t\"max\",\n\t\"mask\",\n\t\"mask-type\",\n\t\"media\",\n\t\"method\",\n\t\"mode\",\n\t\"min\",\n\t\"name\",\n\t\"numoctaves\",\n\t\"offset\",\n\t\"operator\",\n\t\"opacity\",\n\t\"order\",\n\t\"orient\",\n\t\"orientation\",\n\t\"origin\",\n\t\"overflow\",\n\t\"paint-order\",\n\t\"path\",\n\t\"pathlength\",\n\t\"patterncontentunits\",\n\t\"patterntransform\",\n\t\"patternunits\",\n\t\"pointer-events\",\n\t\"points\",\n\t\"preservealpha\",\n\t\"preserveaspectratio\",\n\t\"primitiveunits\",\n\t\"r\",\n\t\"rx\",\n\t\"ry\",\n\t\"radius\",\n\t\"refx\",\n\t\"refy\",\n\t\"repeatcount\",\n\t\"repeatdur\",\n\t\"restart\",\n\t\"result\",\n\t\"rotate\",\n\t\"scale\",\n\t\"seed\",\n\t\"shape-rendering\",\n\t\"slope\",\n\t\"specularconstant\",\n\t\"specularexponent\",\n\t\"spreadmethod\",\n\t\"startoffset\",\n\t\"stddeviation\",\n\t\"stitchtiles\",\n\t\"stop-color\",\n\t\"stop-opacity\",\n\t\"stroke-dasharray\",\n\t\"stroke-dashoffset\",\n\t\"stroke-linecap\",\n\t\"stroke-linejoin\",\n\t\"stroke-miterlimit\",\n\t\"stroke-opacity\",\n\t\"stroke\",\n\t\"stroke-width\",\n\t\"style\",\n\t\"surfacescale\",\n\t\"systemlanguage\",\n\t\"tabindex\",\n\t\"tablevalues\",\n\t\"targetx\",\n\t\"targety\",\n\t\"transform\",\n\t\"transform-origin\",\n\t\"text-anchor\",\n\t\"text-decoration\",\n\t\"text-orientation\",\n\t\"text-rendering\",\n\t\"textlength\",\n\t\"type\",\n\t\"u1\",\n\t\"u2\",\n\t\"unicode\",\n\t\"values\",\n\t\"vector-effect\",\n\t\"viewbox\",\n\t\"visibility\",\n\t\"version\",\n\t\"vert-adv-y\",\n\t\"vert-origin-x\",\n\t\"vert-origin-y\",\n\t\"width\",\n\t\"word-spacing\",\n\t\"wrap\",\n\t\"writing-mode\",\n\t\"xchannelselector\",\n\t\"ychannelselector\",\n\t\"x\",\n\t\"x1\",\n\t\"x2\",\n\t\"xmlns\",\n\t\"y\",\n\t\"y1\",\n\t\"y2\",\n\t\"z\",\n\t\"zoomandpan\"\n]);\nconst mathMl = freeze([\n\t\"accent\",\n\t\"accentunder\",\n\t\"align\",\n\t\"bevelled\",\n\t\"close\",\n\t\"columnalign\",\n\t\"columnlines\",\n\t\"columnspacing\",\n\t\"columnspan\",\n\t\"denomalign\",\n\t\"depth\",\n\t\"dir\",\n\t\"display\",\n\t\"displaystyle\",\n\t\"encoding\",\n\t\"fence\",\n\t\"frame\",\n\t\"height\",\n\t\"href\",\n\t\"id\",\n\t\"largeop\",\n\t\"length\",\n\t\"linethickness\",\n\t\"lquote\",\n\t\"lspace\",\n\t\"mathbackground\",\n\t\"mathcolor\",\n\t\"mathsize\",\n\t\"mathvariant\",\n\t\"maxsize\",\n\t\"minsize\",\n\t\"movablelimits\",\n\t\"notation\",\n\t\"numalign\",\n\t\"open\",\n\t\"rowalign\",\n\t\"rowlines\",\n\t\"rowspacing\",\n\t\"rowspan\",\n\t\"rspace\",\n\t\"rquote\",\n\t\"scriptlevel\",\n\t\"scriptminsize\",\n\t\"scriptsizemultiplier\",\n\t\"selection\",\n\t\"separator\",\n\t\"separators\",\n\t\"stretchy\",\n\t\"subscriptshift\",\n\t\"supscriptshift\",\n\t\"symmetric\",\n\t\"voffset\",\n\t\"width\",\n\t\"xmlns\"\n]);\nconst xml = freeze([\n\t\"xlink:href\",\n\t\"xml:id\",\n\t\"xlink:title\",\n\t\"xml:space\",\n\t\"xmlns:xlink\"\n]);\nconst MUSTACHE_EXPR = seal(/{{[\\w\\W]*|^[\\w\\W]*}}/g);\nconst ERB_EXPR = seal(/<%[\\w\\W]*|^[\\w\\W]*%>/g);\nconst TMPLIT_EXPR = seal(/\\${[\\w\\W]*/g);\nconst DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/);\nconst ARIA_ATTR = seal(/^aria-[\\-\\w]+$/);\nconst IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i);\nconst IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nconst ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g);\nconst DOCTYPE_NAME = seal(/^html$/i);\nconst CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\nconst ELEMENT_MARKUP_PROBE = seal(/<[/\\w!]/g);\nconst COMMENT_MARKUP_PROBE = seal(/<[/\\w]/g);\nconst FALLBACK_TAG_CLOSE = seal(/<\\/no(script|embed|frames)/i);\nconst SELF_CLOSING_TAG = seal(/\\/>/i);\nconst NODE_TYPE = {\n\telement: 1,\n\tattribute: 2,\n\ttext: 3,\n\tcdataSection: 4,\n\tentityReference: 5,\n\tentityNode: 6,\n\tprocessingInstruction: 7,\n\tcomment: 8,\n\tdocument: 9,\n\tdocumentType: 10,\n\tdocumentFragment: 11,\n\tnotation: 12\n};\nconst LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, [\n\t\"style\",\n\t\"script\",\n\t\"xmp\",\n\t\"iframe\",\n\t\"noembed\",\n\t\"noframes\",\n\t\"plaintext\",\n\t\"noscript\"\n]));\nconst getGlobal = function getGlobal() {\n\treturn typeof window === \"undefined\" ? null : window;\n};\n/**\n* Creates a no-op policy for internal use only.\n* Don't export this function outside this module!\n* @param trustedTypes The policy factory.\n* @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n* @return The policy created (or null, if Trusted Types\n* are not supported or creating the policy failed).\n*/\nconst _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n\tif (typeof trustedTypes !== \"object\" || typeof trustedTypes.createPolicy !== \"function\") return null;\n\tlet suffix = null;\n\tconst ATTR_NAME = \"data-tt-policy-suffix\";\n\tif (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) suffix = purifyHostElement.getAttribute(ATTR_NAME);\n\tconst policyName = \"dompurify\" + (suffix ? \"#\" + suffix : \"\");\n\ttry {\n\t\treturn trustedTypes.createPolicy(policyName, {\n\t\t\tcreateHTML(html) {\n\t\t\t\treturn html;\n\t\t\t},\n\t\t\tcreateScriptURL(scriptUrl) {\n\t\t\t\treturn scriptUrl;\n\t\t\t}\n\t\t});\n\t} catch (_) {\n\t\tconsole.warn(\"TrustedTypes policy \" + policyName + \" could not be created.\");\n\t\treturn null;\n\t}\n};\nconst _createHooksMap = function _createHooksMap() {\n\treturn {\n\t\tafterSanitizeAttributes: [],\n\t\tafterSanitizeElements: [],\n\t\tafterSanitizeShadowDOM: [],\n\t\tbeforeSanitizeAttributes: [],\n\t\tbeforeSanitizeElements: [],\n\t\tbeforeSanitizeShadowDOM: [],\n\t\tuponSanitizeAttribute: [],\n\t\tuponSanitizeElement: [],\n\t\tuponSanitizeShadowNode: []\n\t};\n};\n/**\n* Resolve a set-valued configuration option: a fresh set built from\n* cfg[key] when it is an own array property (seeded with a clone of\n* options.base when given, case-normalized via options.transform),\n* the fallback set otherwise.\n*\n* @param cfg the cloned, prototype-free configuration object\n* @param key the configuration property to read\n* @param fallback the set to use when the option is absent or not an array\n* @param options transform and optional base set to merge into\n* @returns the resolved set\n*/\nconst _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {\n\treturn objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;\n};\n/**\n* Resolve an object-valued configuration option: a prototype-free clone\n* of cfg[key] when it is an own, truthy object property, else a fresh\n* fallback built by makeFallback (fresh on every parse, so a previous\n* parse can never leak state into the next one).\n*\n* @param cfg the cloned, prototype-free configuration object\n* @param key the configuration property to read\n* @param makeFallback builds the fallback value when the option is absent\n* @returns the resolved object\n*/\nconst _resolveObjectOption = function _resolveObjectOption(cfg, key, makeFallback) {\n\tconst value = objectHasOwnProperty(cfg, key) ? cfg[key] : void 0;\n\treturn value && typeof value === \"object\" ? clone(value) : makeFallback();\n};\nfunction createDOMPurify() {\n\tlet window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();\n\tconst DOMPurify = (root) => createDOMPurify(root);\n\tDOMPurify.version = \"3.4.17\";\n\tDOMPurify.removed = [];\n\tif (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {\n\t\tDOMPurify.isSupported = false;\n\t\treturn DOMPurify;\n\t}\n\tlet document = window.document;\n\tconst originalDocument = document;\n\tconst currentScript = originalDocument.currentScript;\n\twindow.DocumentFragment;\n\tconst HTMLTemplateElement = window.HTMLTemplateElement, Node = window.Node, Element = window.Element, NodeFilter = window.NodeFilter;\n\twindow.NamedNodeMap === void 0 && (window.NamedNodeMap || window.MozNamedAttrMap);\n\twindow.HTMLFormElement;\n\tconst DOMParser = window.DOMParser, trustedTypes = window.trustedTypes;\n\tconst ElementPrototype = Element.prototype;\n\tconst cloneNode = lookupGetter(ElementPrototype, \"cloneNode\");\n\tconst remove = lookupGetter(ElementPrototype, \"remove\");\n\tconst removeAttributeNode = lookupGetter(ElementPrototype, \"removeAttributeNode\");\n\tconst getNextSibling = lookupGetter(ElementPrototype, \"nextSibling\");\n\tconst getChildNodes = lookupGetter(ElementPrototype, \"childNodes\");\n\tconst getParentNode = lookupGetter(ElementPrototype, \"parentNode\");\n\tconst getShadowRoot = lookupGetter(ElementPrototype, \"shadowRoot\");\n\tconst getAttributes = lookupGetter(ElementPrototype, \"attributes\");\n\tconst getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, \"nodeType\") : null;\n\tconst getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, \"nodeName\") : null;\n\tconst getOwnerDocument = Node && Node.prototype ? lookupGetter(Node.prototype, \"ownerDocument\") : null;\n\tconst _readNodeType = function _readNodeType(node) {\n\t\treturn getNodeType ? getNodeType(node) : node.nodeType;\n\t};\n\tconst _readNodeName = function _readNodeName(node) {\n\t\treturn getNodeName ? getNodeName(node) : node.nodeName;\n\t};\n\tconst getNamespaceURI = lookupAccessor(ElementPrototype, \"namespaceURI\");\n\tconst _readNamespaceURI = function _readNamespaceURI(element) {\n\t\treturn getNamespaceURI ? getNamespaceURI(element) : element.namespaceURI;\n\t};\n\tif (typeof HTMLTemplateElement === \"function\") {\n\t\tconst template = document.createElement(\"template\");\n\t\tif (template.content && template.content.ownerDocument) document = template.content.ownerDocument;\n\t}\n\tlet trustedTypesPolicy;\n\tlet emptyHTML = \"\";\n\tlet defaultTrustedTypesPolicy;\n\tlet defaultTrustedTypesPolicyResolved = false;\n\tlet IN_TRUSTED_TYPES_POLICY = 0;\n\tconst _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {\n\t\tif (IN_TRUSTED_TYPES_POLICY > 0) throw typeErrorCreate(\"A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \\\"DOMPurify and Trusted Types\\\" section of the README.\");\n\t};\n\tconst _createTrustedHTML = function _createTrustedHTML(html) {\n\t\t_assertNotInTrustedTypesPolicy();\n\t\tIN_TRUSTED_TYPES_POLICY++;\n\t\ttry {\n\t\t\treturn trustedTypesPolicy.createHTML(html);\n\t\t} finally {\n\t\t\tIN_TRUSTED_TYPES_POLICY--;\n\t\t}\n\t};\n\tconst _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {\n\t\t_assertNotInTrustedTypesPolicy();\n\t\tIN_TRUSTED_TYPES_POLICY++;\n\t\ttry {\n\t\t\treturn trustedTypesPolicy.createScriptURL(scriptUrl);\n\t\t} finally {\n\t\t\tIN_TRUSTED_TYPES_POLICY--;\n\t\t}\n\t};\n\tconst _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {\n\t\tif (!defaultTrustedTypesPolicyResolved) {\n\t\t\tdefaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n\t\t\tdefaultTrustedTypesPolicyResolved = true;\n\t\t}\n\t\treturn defaultTrustedTypesPolicy;\n\t};\n\tconst _document = document, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;\n\tconst importNode = originalDocument.importNode;\n\tlet hooks = _createHooksMap();\n\t/**\n\t* Expose whether this browser supports running the full DOMPurify.\n\t*/\n\tDOMPurify.isSupported = typeof entries === \"function\" && typeof getParentNode === \"function\" && implementation && implementation.createHTMLDocument !== void 0;\n\tconst MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, TMPLIT_EXPR$1 = TMPLIT_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE, CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;\n\tlet IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n\t/**\n\t* We consider the elements and attributes below to be safe. Ideally\n\t* don't add any new ones but feel free to remove unwanted ones.\n\t*/\n\tlet ALLOWED_TAGS = null;\n\tconst DEFAULT_ALLOWED_TAGS = addToSet({}, [\n\t\t...html$1,\n\t\t...svg$1,\n\t\t...svgFilters,\n\t\t...mathMl$1,\n\t\t...text\n\t]);\n\tlet ALLOWED_ATTR = null;\n\tconst DEFAULT_ALLOWED_ATTR = addToSet({}, [\n\t\t...html,\n\t\t...svg,\n\t\t...mathMl,\n\t\t...xml\n\t]);\n\tlet CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n\t\ttagNameCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tattributeNameCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tallowCustomizedBuiltInElements: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: false\n\t\t}\n\t}));\n\tlet FORBID_TAGS = null;\n\tlet FORBID_ATTR = null;\n\tconst EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {\n\t\ttagCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tattributeCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t}\n\t}));\n\tlet ALLOW_ARIA_ATTR = true;\n\tlet ALLOW_DATA_ATTR = true;\n\tlet ALLOW_UNKNOWN_PROTOCOLS = false;\n\tlet ALLOW_SELF_CLOSE_IN_ATTR = true;\n\tlet SAFE_FOR_TEMPLATES = false;\n\tlet SAFE_FOR_XML = true;\n\tlet WHOLE_DOCUMENT = false;\n\tlet SET_CONFIG = false;\n\tlet SET_CONFIG_ALLOWED_TAGS = null;\n\tlet SET_CONFIG_ALLOWED_ATTR = null;\n\tlet FORCE_BODY = false;\n\tlet RETURN_DOM = false;\n\tlet RETURN_DOM_FRAGMENT = false;\n\tlet RETURN_TRUSTED_TYPE = false;\n\tlet SANITIZE_DOM = true;\n\tlet SANITIZE_NAMED_PROPS = false;\n\tconst SANITIZE_NAMED_PROPS_PREFIX = \"user-content-\";\n\tlet KEEP_CONTENT = true;\n\tlet IN_PLACE = false;\n\tlet IN_PLACE_VISITED = null;\n\tlet USE_PROFILES = {};\n\tlet FORBID_CONTENTS = null;\n\tconst DEFAULT_FORBID_CONTENTS = addToSet({}, [\n\t\t\"annotation-xml\",\n\t\t\"audio\",\n\t\t\"colgroup\",\n\t\t\"desc\",\n\t\t\"foreignobject\",\n\t\t\"head\",\n\t\t\"iframe\",\n\t\t\"math\",\n\t\t\"mi\",\n\t\t\"mn\",\n\t\t\"mo\",\n\t\t\"ms\",\n\t\t\"mtext\",\n\t\t\"noembed\",\n\t\t\"noframes\",\n\t\t\"noscript\",\n\t\t\"plaintext\",\n\t\t\"script\",\n\t\t\"selectedcontent\",\n\t\t\"style\",\n\t\t\"svg\",\n\t\t\"template\",\n\t\t\"thead\",\n\t\t\"title\",\n\t\t\"video\",\n\t\t\"xmp\"\n\t]);\n\tlet DATA_URI_TAGS = null;\n\tconst DEFAULT_DATA_URI_TAGS = addToSet({}, [\n\t\t\"audio\",\n\t\t\"video\",\n\t\t\"img\",\n\t\t\"source\",\n\t\t\"image\",\n\t\t\"track\"\n\t]);\n\tlet URI_SAFE_ATTRIBUTES = null;\n\tconst DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [\n\t\t\"alt\",\n\t\t\"class\",\n\t\t\"for\",\n\t\t\"id\",\n\t\t\"label\",\n\t\t\"name\",\n\t\t\"pattern\",\n\t\t\"placeholder\",\n\t\t\"role\",\n\t\t\"summary\",\n\t\t\"title\",\n\t\t\"value\",\n\t\t\"style\",\n\t\t\"xmlns\"\n\t]);\n\tconst MATHML_NAMESPACE = \"http://www.w3.org/1998/Math/MathML\";\n\tconst SVG_NAMESPACE = \"http://www.w3.org/2000/svg\";\n\tconst HTML_NAMESPACE = \"http://www.w3.org/1999/xhtml\";\n\tlet NAMESPACE = HTML_NAMESPACE;\n\tlet IS_EMPTY_INPUT = false;\n\tlet ALLOWED_NAMESPACES = null;\n\tconst DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [\n\t\tMATHML_NAMESPACE,\n\t\tSVG_NAMESPACE,\n\t\tHTML_NAMESPACE\n\t], stringToString);\n\tconst DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze([\n\t\t\"mi\",\n\t\t\"mo\",\n\t\t\"mn\",\n\t\t\"ms\",\n\t\t\"mtext\"\n\t]);\n\tlet MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);\n\tconst DEFAULT_HTML_INTEGRATION_POINTS = freeze([\"annotation-xml\"]);\n\tlet HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);\n\tconst COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [\n\t\t\"title\",\n\t\t\"style\",\n\t\t\"font\",\n\t\t\"a\",\n\t\t\"script\"\n\t]);\n\tlet PARSER_MEDIA_TYPE = null;\n\tconst SUPPORTED_PARSER_MEDIA_TYPES = [\"application/xhtml+xml\", \"text/html\"];\n\tconst DEFAULT_PARSER_MEDIA_TYPE = \"text/html\";\n\tlet transformCaseFunc = null;\n\tlet CONFIG = null;\n\tconst formElement = document.createElement(\"form\");\n\tconst isRegexOrFunction = function isRegexOrFunction(testValue) {\n\t\treturn testValue instanceof RegExp || testValue instanceof Function;\n\t};\n\t/**\n\t* _parseConfig\n\t*\n\t* @param cfg optional config literal\n\t*/\n\tconst _parseConfig = function _parseConfig() {\n\t\tlet cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n\t\tif (CONFIG && CONFIG === cfg) return;\n\t\tif (!cfg || typeof cfg !== \"object\") cfg = {};\n\t\tcfg = clone(cfg);\n\t\tPARSER_MEDIA_TYPE = SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n\t\ttransformCaseFunc = PARSER_MEDIA_TYPE === \"application/xhtml+xml\" ? stringToString : stringToLowerCase;\n\t\tALLOWED_TAGS = _resolveSetOption(cfg, \"ALLOWED_TAGS\", DEFAULT_ALLOWED_TAGS, { transform: transformCaseFunc });\n\t\tALLOWED_ATTR = _resolveSetOption(cfg, \"ALLOWED_ATTR\", DEFAULT_ALLOWED_ATTR, { transform: transformCaseFunc });\n\t\tALLOWED_NAMESPACES = _resolveSetOption(cfg, \"ALLOWED_NAMESPACES\", DEFAULT_ALLOWED_NAMESPACES, { transform: stringToString });\n\t\tURI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, \"ADD_URI_SAFE_ATTR\", DEFAULT_URI_SAFE_ATTRIBUTES, {\n\t\t\ttransform: transformCaseFunc,\n\t\t\tbase: DEFAULT_URI_SAFE_ATTRIBUTES\n\t\t});\n\t\tDATA_URI_TAGS = _resolveSetOption(cfg, \"ADD_DATA_URI_TAGS\", DEFAULT_DATA_URI_TAGS, {\n\t\t\ttransform: transformCaseFunc,\n\t\t\tbase: DEFAULT_DATA_URI_TAGS\n\t\t});\n\t\tFORBID_CONTENTS = _resolveSetOption(cfg, \"FORBID_CONTENTS\", DEFAULT_FORBID_CONTENTS, { transform: transformCaseFunc });\n\t\tFORBID_TAGS = _resolveSetOption(cfg, \"FORBID_TAGS\", clone({}), { transform: transformCaseFunc });\n\t\tFORBID_ATTR = _resolveSetOption(cfg, \"FORBID_ATTR\", clone({}), { transform: transformCaseFunc });\n\t\tUSE_PROFILES = objectHasOwnProperty(cfg, \"USE_PROFILES\") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === \"object\" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;\n\t\tALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;\n\t\tALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;\n\t\tALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;\n\t\tALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false;\n\t\tSAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;\n\t\tSAFE_FOR_XML = cfg.SAFE_FOR_XML !== false;\n\t\tWHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;\n\t\tRETURN_DOM = cfg.RETURN_DOM || false;\n\t\tRETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;\n\t\tRETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false;\n\t\tFORCE_BODY = cfg.FORCE_BODY || false;\n\t\tSANITIZE_DOM = cfg.SANITIZE_DOM !== false;\n\t\tSANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;\n\t\tKEEP_CONTENT = cfg.KEEP_CONTENT !== false;\n\t\tIN_PLACE = cfg.IN_PLACE || false;\n\t\tIS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;\n\t\tNAMESPACE = typeof cfg.NAMESPACE === \"string\" ? cfg.NAMESPACE : HTML_NAMESPACE;\n\t\tMATHML_TEXT_INTEGRATION_POINTS = _resolveObjectOption(cfg, \"MATHML_TEXT_INTEGRATION_POINTS\", () => addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS));\n\t\tHTML_INTEGRATION_POINTS = _resolveObjectOption(cfg, \"HTML_INTEGRATION_POINTS\", () => addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS));\n\t\tconst customElementHandling = _resolveObjectOption(cfg, \"CUSTOM_ELEMENT_HANDLING\", () => create(null));\n\t\tCUSTOM_ELEMENT_HANDLING = create(null);\n\t\tif (objectHasOwnProperty(customElementHandling, \"tagNameCheck\") && isRegexOrFunction(customElementHandling.tagNameCheck)) CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;\n\t\tif (objectHasOwnProperty(customElementHandling, \"attributeNameCheck\") && isRegexOrFunction(customElementHandling.attributeNameCheck)) CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;\n\t\tif (objectHasOwnProperty(customElementHandling, \"allowCustomizedBuiltInElements\") && typeof customElementHandling.allowCustomizedBuiltInElements === \"boolean\") CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;\n\t\tseal(CUSTOM_ELEMENT_HANDLING);\n\t\tif (SAFE_FOR_TEMPLATES) ALLOW_DATA_ATTR = false;\n\t\tif (RETURN_DOM_FRAGMENT) RETURN_DOM = true;\n\t\tif (USE_PROFILES) {\n\t\t\tALLOWED_TAGS = addToSet({}, text);\n\t\t\tALLOWED_ATTR = create(null);\n\t\t\tif (USE_PROFILES.html === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, html$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, html);\n\t\t\t}\n\t\t\tif (USE_PROFILES.svg === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, svg$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, svg);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t\tif (USE_PROFILES.svgFilters === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, svgFilters);\n\t\t\t\taddToSet(ALLOWED_ATTR, svg);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t\tif (USE_PROFILES.mathMl === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, mathMl$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, mathMl);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t}\n\t\tEXTRA_ELEMENT_HANDLING.tagCheck = null;\n\t\tEXTRA_ELEMENT_HANDLING.attributeCheck = null;\n\t\tif (objectHasOwnProperty(cfg, \"ADD_TAGS\")) {\n\t\t\tif (typeof cfg.ADD_TAGS === \"function\") EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;\n\t\t\telse if (arrayIsArray(cfg.ADD_TAGS)) {\n\t\t\t\tif (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) ALLOWED_TAGS = clone(ALLOWED_TAGS);\n\t\t\t\taddToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n\t\t\t}\n\t\t}\n\t\tif (objectHasOwnProperty(cfg, \"ADD_ATTR\")) {\n\t\t\tif (typeof cfg.ADD_ATTR === \"function\") EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;\n\t\t\telse if (arrayIsArray(cfg.ADD_ATTR)) {\n\t\t\t\tif (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) ALLOWED_ATTR = clone(ALLOWED_ATTR);\n\t\t\t\taddToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n\t\t\t}\n\t\t}\n\t\tif (objectHasOwnProperty(cfg, \"ADD_FORBID_CONTENTS\") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {\n\t\t\tif (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) FORBID_CONTENTS = clone(FORBID_CONTENTS);\n\t\t\taddToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);\n\t\t}\n\t\tif (KEEP_CONTENT) ALLOWED_TAGS[\"#text\"] = true;\n\t\tif (WHOLE_DOCUMENT) addToSet(ALLOWED_TAGS, [\n\t\t\t\"html\",\n\t\t\t\"head\",\n\t\t\t\"body\"\n\t\t]);\n\t\tif (ALLOWED_TAGS.table) {\n\t\t\taddToSet(ALLOWED_TAGS, [\"tbody\"]);\n\t\t\tdelete FORBID_TAGS.tbody;\n\t\t}\n\t\tif (cfg.TRUSTED_TYPES_POLICY) {\n\t\t\tif (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== \"function\") throw typeErrorCreate(\"TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.\");\n\t\t\tif (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== \"function\") throw typeErrorCreate(\"TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.\");\n\t\t\tconst previousTrustedTypesPolicy = trustedTypesPolicy;\n\t\t\ttrustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\t\t\ttry {\n\t\t\t\temptyHTML = _createTrustedHTML(\"\");\n\t\t\t} catch (error) {\n\t\t\t\ttrustedTypesPolicy = previousTrustedTypesPolicy;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} else if (cfg.TRUSTED_TYPES_POLICY === null) {\n\t\t\ttrustedTypesPolicy = void 0;\n\t\t\temptyHTML = \"\";\n\t\t} else {\n\t\t\tif (trustedTypesPolicy === void 0) trustedTypesPolicy = _getDefaultTrustedTypesPolicy();\n\t\t\tif (trustedTypesPolicy && typeof emptyHTML === \"string\") emptyHTML = _createTrustedHTML(\"\");\n\t\t}\n\t\tif (freeze) freeze(cfg);\n\t\tCONFIG = cfg;\n\t};\n\tconst ALL_SVG_TAGS = addToSet({}, [\n\t\t...svg$1,\n\t\t...svgFilters,\n\t\t...svgDisallowed\n\t]);\n\tconst ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n\t/**\n\t* Namespace rules for an element in the SVG namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === HTML_NAMESPACE) return tagName === \"svg\";\n\t\tif (parent.namespaceURI === MATHML_NAMESPACE) return tagName === \"svg\" && (parentTagName === \"annotation-xml\" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n\t\treturn Boolean(ALL_SVG_TAGS[tagName]);\n\t};\n\t/**\n\t* Namespace rules for an element in the MathML namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === HTML_NAMESPACE) return tagName === \"math\";\n\t\tif (parent.namespaceURI === SVG_NAMESPACE) return tagName === \"math\" && HTML_INTEGRATION_POINTS[parentTagName];\n\t\treturn Boolean(ALL_MATHML_TAGS[tagName]);\n\t};\n\t/**\n\t* Namespace rules for an element in the HTML namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) return false;\n\t\tif (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) return false;\n\t\treturn !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n\t};\n\t/**\n\t* @param element a DOM element whose namespace is being checked\n\t* @returns Return false if the element has a\n\t* namespace that a spec-compliant parser would never\n\t* return. Return true otherwise.\n\t*/\n\tconst _checkValidNamespace = function _checkValidNamespace(element) {\n\t\tconst elementNamespace = _readNamespaceURI(element);\n\t\tconst tagName = stringToLowerCase(_readNodeName(element));\n\t\tconst parentNode = getParentNode(element);\n\t\tlet parent;\n\t\tlet parentTagName;\n\t\tif (parentNode && _readNodeType(parentNode) === NODE_TYPE.element) {\n\t\t\tparent = { namespaceURI: _readNamespaceURI(parentNode) };\n\t\t\tparentTagName = stringToLowerCase(_readNodeName(parentNode));\n\t\t} else {\n\t\t\tparent = { namespaceURI: NAMESPACE };\n\t\t\tparentTagName = \"template\";\n\t\t}\n\t\tif (!ALLOWED_NAMESPACES[elementNamespace]) return false;\n\t\tif (elementNamespace === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parent, parentTagName);\n\t\tif (elementNamespace === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parent, parentTagName);\n\t\tif (elementNamespace === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parent, parentTagName);\n\t\tif (PARSER_MEDIA_TYPE === \"application/xhtml+xml\" && ALLOWED_NAMESPACES[elementNamespace]) return true;\n\t\treturn false;\n\t};\n\t/**\n\t* _forceRemove\n\t*\n\t* @param node a DOM node\n\t*/\n\tconst _forceRemove = function _forceRemove(node) {\n\t\tarrayPush(DOMPurify.removed, { element: node });\n\t\ttry {\n\t\t\tgetParentNode(node).removeChild(node);\n\t\t} catch (_) {\n\t\t\tremove(node);\n\t\t\tif (!getParentNode(node)) throw typeErrorCreate(\"a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place\");\n\t\t}\n\t};\n\t/**\n\t* _stripAttributeNode\n\t*\n\t* Remove a single Attr node case/namespace-exactly on an attribute-teardown\n\t* path. Name-based removeAttribute() ASCII-lowercases its lookup key for an\n\t* HTML element in an HTML document and so silently misses a case-preserved\n\t* handler (e.g. `ONERROR` off an XML/XHTML import) - the same defect\n\t* _removeAttribute() was fixed for, which a name-based call would reintroduce\n\t* on these IN_PLACE teardown paths. Unlike _removeAttribute this does not\n\t* record into DOMPurify.removed: the neutralize passes intentionally do not\n\t* book-keep. A clobbered/detached node falls back to best-effort name-based\n\t* removal.\n\t*\n\t* @param element the element to strip the attribute from\n\t* @param attribute the Attr node to remove\n\t* @param name the attribute's name, for the fallback path\n\t*/\n\tconst _stripAttributeNode = function _stripAttributeNode(element, attribute, name) {\n\t\ttry {\n\t\t\tremoveAttributeNode(element, attribute);\n\t\t} catch (_) {\n\t\t\ttry {\n\t\t\t\telement.removeAttribute(name);\n\t\t\t} catch (_) {}\n\t\t}\n\t};\n\t/**\n\t* Fail-closed teardown of an in-place root: strip every disallowed attribute\n\t* in the subtree first, so nothing armed is left behind, then remove all\n\t* children and the root's own attributes.\n\t*\n\t* @param root the in-place root to empty\n\t*/\n\tconst _neutralizeRoot = function _neutralizeRoot(root) {\n\t\t_neutralizeSubtree(root);\n\t\tconst childNodes = getChildNodes(root);\n\t\tif (childNodes) arrayForEach(arraySlice(childNodes), (child) => {\n\t\t\ttry {\n\t\t\t\tremove(child);\n\t\t\t} catch (_) {}\n\t\t});\n\t\tconst attributes = _readNodeType(root) === NODE_TYPE.element ? getAttributes(root) : null;\n\t\tif (attributes) for (let i = attributes.length - 1; i >= 0; --i) {\n\t\t\tconst attribute = attributes[i];\n\t\t\tconst name = attribute && attribute.name;\n\t\t\tif (typeof name === \"string\") _stripAttributeNode(root, attribute, name);\n\t\t}\n\t};\n\t/**\n\t* Removes an attribute, preferably as its exact Attr node: name-based\n\t* removal lowercases the name in HTML documents and misses case-preserved\n\t* names, e.g. from imported XHTML.\n\t*\n\t* @param name an Attribute name\n\t* @param element a DOM node\n\t* @param attr the exact Attr node to remove, when the caller has it\n\t*/\n\tconst _removeAttribute = function _removeAttribute(name, element, attr) {\n\t\tif (!attr) try {\n\t\t\tattr = element.getAttributeNode(name);\n\t\t} catch (_) {\n\t\t\tattr = null;\n\t\t}\n\t\tarrayPush(DOMPurify.removed, {\n\t\t\tattribute: attr || null,\n\t\t\tfrom: element\n\t\t});\n\t\ttry {\n\t\t\tif (attr) removeAttributeNode(element, attr);\n\t\t\telse element.removeAttribute(name);\n\t\t} catch (_) {\n\t\t\ttry {\n\t\t\t\telement.removeAttribute(name);\n\t\t\t} catch (_) {}\n\t\t}\n\t\tif (name === \"is\") {\n\t\t\tif (RETURN_DOM || RETURN_DOM_FRAGMENT) try {\n\t\t\t\t_forceRemove(element);\n\t\t\t} catch (_) {}\n\t\t\telse try {\n\t\t\t\telement.setAttribute(name, \"\");\n\t\t\t} catch (_) {}\n\t\t}\n\t};\n\t/**\n\t* Removes every attribute the configuration does not allow. Used to\n\t* neutralize nodes discarded from an in-place tree.\n\t*\n\t* @param element the element to strip\n\t*/\n\tconst _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {\n\t\tconst attributes = getAttributes(element);\n\t\tif (!attributes) return;\n\t\tfor (let i = attributes.length - 1; i >= 0; --i) {\n\t\t\tconst attribute = attributes[i];\n\t\t\tconst name = attribute && attribute.name;\n\t\t\tif (typeof name !== \"string\" || ALLOWED_ATTR[transformCaseFunc(name)]) continue;\n\t\t\t_stripAttributeNode(element, attribute, name);\n\t\t}\n\t};\n\t/**\n\t* Iterative depth-first walk, so deep trees cannot overflow the call stack,\n\t* reading through the cached getters, so clobbering cannot hide children.\n\t* When `visit` returns false, the node's children are skipped. With\n\t* `intoShadow`, open shadow roots are walked after their host's children.\n\t*\n\t* @param root where to start\n\t* @param visit called for every node\n\t* @param intoShadow whether to enter open shadow roots\n\t*/\n\tconst _walkTree = function _walkTree(root, visit) {\n\t\tlet intoShadow = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n\t\tconst stack = [root];\n\t\twhile (stack.length > 0) {\n\t\t\tconst node = stack.pop();\n\t\t\tif (visit(node) === false) continue;\n\t\t\tif (intoShadow && _readNodeType(node) === NODE_TYPE.element) {\n\t\t\t\tconst shadowRoot = getShadowRoot(node);\n\t\t\t\tif (_isDocumentFragment(shadowRoot)) stack.push(shadowRoot);\n\t\t\t}\n\t\t\tconst childNodes = getChildNodes(node);\n\t\t\tif (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);\n\t\t}\n\t};\n\t/**\n\t* Strips disallowed attributes from every element of a discarded subtree,\n\t* so a handler that is already queued (a loading image) cannot fire.\n\t*\n\t* @param root the root of a removed subtree\n\t*/\n\tconst _neutralizeSubtree = function _neutralizeSubtree(root) {\n\t\t_walkTree(root, (node) => {\n\t\t\tif (_readNodeType(node) === NODE_TYPE.element) _stripDisallowedAttributes(node);\n\t\t});\n\t};\n\t/**\n\t* All nodes under `root`, root first, including open shadow roots. Template\n\t* content is not entered, it is inert.\n\t*\n\t* @param root the in-place root\n\t* @return the nodes\n\t*/\n\tconst _collectLiveNodes = function _collectLiveNodes(root) {\n\t\tconst nodes = [];\n\t\t_walkTree(root, (node) => {\n\t\t\tnodes.push(node);\n\t\t}, true);\n\t\treturn nodes;\n\t};\n\t/**\n\t* Strips disallowed attributes from every element that was under the\n\t* in-place root when the call started and no longer is, whatever removed\n\t* or moved it.\n\t*\n\t* @param root the in-place root\n\t* @param before the root's nodes, collected before the walk\n\t*/\n\tconst _neutralizeEscapedElements = function _neutralizeEscapedElements(root, before) {\n\t\tconst reachable = setCreate();\n\t\tarrayForEach(_collectLiveNodes(root), (node) => {\n\t\t\tif (_readNodeType(node) === NODE_TYPE.element) setAdd(reachable, node);\n\t\t});\n\t\tarrayForEach(before, (node) => {\n\t\t\tif (_readNodeType(node) === NODE_TYPE.element && !setHas(reachable, node)) _stripDisallowedAttributes(node);\n\t\t});\n\t};\n\t/**\n\t* Neutralizes everything that left the in-place tree during the call: what\n\t* DOMPurify removed, and what hooks or custom elements removed or moved out.\n\t*\n\t* @param root the in-place root\n\t* @param before the root's nodes, collected before the walk\n\t* @return true if the root itself was removed\n\t*/\n\tconst _neutralizeDiscarded = function _neutralizeDiscarded(root, before) {\n\t\tlet rootRemoved = false;\n\t\tarrayForEach(DOMPurify.removed, (entry) => {\n\t\t\tif (entry.element) {\n\t\t\t\trootRemoved = rootRemoved || entry.element === root;\n\t\t\t\t_neutralizeSubtree(entry.element);\n\t\t\t}\n\t\t});\n\t\t_neutralizeEscapedElements(root, before);\n\t\treturn rootRemoved;\n\t};\n\tconst MAX_UNVISITED_ROUNDS = 8;\n\t/**\n\t* The walk only moves forward, so a node moved to a position it already\n\t* passed is never visited. Give every original node that is still in the\n\t* tree but unvisited the normal treatment, hooks included. Nodes created\n\t* during the call are left alone. Fails closed if the tree keeps changing.\n\t*\n\t* @param root the in-place root\n\t* @param before the root's nodes, collected before the walk\n\t*/\n\tconst _sanitizeUnvisitedNodes = function _sanitizeUnvisitedNodes(root, before) {\n\t\tconst visited = IN_PLACE_VISITED;\n\t\tlet original = null;\n\t\tconst getOriginal = () => {\n\t\t\tif (!original) {\n\t\t\t\toriginal = setCreate();\n\t\t\t\tarrayForEach(before, (beforeNode) => {\n\t\t\t\t\tsetAdd(original, beforeNode);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn original;\n\t\t};\n\t\tfor (let round = 0;; round++) {\n\t\t\tconst live = _collectLiveNodes(root);\n\t\t\tconst containers = [root];\n\t\t\tlet pending = false;\n\t\t\tarrayForEach(live, (node) => {\n\t\t\t\tif (_readNodeType(node) === NODE_TYPE.documentFragment) arrayPush(containers, node);\n\t\t\t\telse if (!pending && !setHas(visited, node)) pending = setHas(getOriginal(), node);\n\t\t\t});\n\t\t\tif (!pending) return;\n\t\t\tif (round >= MAX_UNVISITED_ROUNDS) throw typeErrorCreate(\"the tree kept changing during in-place sanitization; refusing to return it\");\n\t\t\tarrayForEach(containers, (container, index) => {\n\t\t\t\t_sanitizeUnvisitedIn(container, index > 0, root, getOriginal());\n\t\t\t});\n\t\t}\n\t};\n\t/**\n\t* One _sanitizeUnvisitedNodes pass over the root or an open shadow root.\n\t*\n\t* @param container the root or an open shadow root\n\t* @param inShadow whether container is a shadow root\n\t* @param root the in-place root\n\t* @param original the root's nodes collected before the walk, as a set\n\t*/\n\tconst _sanitizeUnvisitedIn = function _sanitizeUnvisitedIn(container, inShadow, root, original) {\n\t\tconst iterator = _createNodeIterator(container);\n\t\tlet node;\n\t\twhile (node = iterator.nextNode()) {\n\t\t\tif (!setHas(original, node) || setHas(IN_PLACE_VISITED, node)) continue;\n\t\t\tif (inShadow) _executeHooks(hooks.uponSanitizeShadowNode, node, null);\n\t\t\t_sanitizeElements(node, root);\n\t\t\t_sanitizeAttributes(node, root);\n\t\t\tif (_isDocumentFragment(node.content)) _sanitizeShadowDOM2(node.content);\n\t\t}\n\t};\n\t/**\n\t* Records that _sanitizeElements processed `node`. No-op outside IN_PLACE.\n\t*\n\t* @param node the node being processed\n\t*/\n\tconst _markVisited = function _markVisited(node) {\n\t\tif (IN_PLACE_VISITED) setAdd(IN_PLACE_VISITED, node);\n\t};\n\t/**\n\t* Patch-linkage attributes (declarative partial updates): `patchsrc`\n\t* always, `for` everywhere except on <label> and <output>. Gated on\n\t* SAFE_FOR_XML. Shared by the IN_PLACE pre-pass and _isValidAttribute.\n\t*\n\t* @param lcName the transformCaseFunc'd attribute name\n\t* @param lcTag the transformCaseFunc'd tag name of the carrying element\n\t* @return true if the attribute is patch linkage and must be dropped\n\t*/\n\tconst _isPatchLinkageAttribute = function _isPatchLinkageAttribute(lcName, lcTag) {\n\t\tif (!SAFE_FOR_XML) return false;\n\t\tif (lcName === \"patchsrc\") return true;\n\t\treturn lcName === \"for\" && lcTag !== \"label\" && lcTag !== \"output\";\n\t};\n\t/**\n\t* IN_PLACE pre-pass: sever all patch linkage before the walk, so no patch\n\t* can fire mid-walk into a part of the tree the walker already passed.\n\t* Removes range markers (processing instructions, comments with markup)\n\t* and strips linkage attributes. It cannot undo a patch that already fired.\n\t*\n\t* TODO: if the shipped feature can patch through `for` on <label>/<output>,\n\t* drop that pair here too (see test/declarative-patch-probe.html).\n\t*\n\t* @param root the in-place root to sweep\n\t*/\n\tconst _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {\n\t\tif (!SAFE_FOR_XML) return;\n\t\t_walkTree(root, (node) => {\n\t\t\tconst nodeType = _readNodeType(node);\n\t\t\tif (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {\n\t\t\t\ttry {\n\t\t\t\t\tremove(node);\n\t\t\t\t} catch (_) {}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (nodeType === NODE_TYPE.element) {\n\t\t\t\tconst element = node;\n\t\t\t\tconst lcTag = transformCaseFunc(_readNodeName(node));\n\t\t\t\ttry {\n\t\t\t\t\tif (element.hasAttribute && element.hasAttribute(\"patchsrc\")) element.removeAttribute(\"patchsrc\");\n\t\t\t\t\tif (element.hasAttribute && element.hasAttribute(\"for\") && _isPatchLinkageAttribute(\"for\", lcTag)) element.removeAttribute(\"for\");\n\t\t\t\t} catch (_) {}\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t};\n\t/**\n\t* _initDocument\n\t*\n\t* @param dirty - a string of dirty markup\n\t* @return a DOM, filled with the dirty markup\n\t*/\n\tconst _initDocument = function _initDocument(dirty) {\n\t\tlet doc = null;\n\t\tlet leadingWhitespace = null;\n\t\tif (FORCE_BODY) dirty = \"<remove></remove>\" + dirty;\n\t\telse {\n\t\t\tconst matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n\t\t\tleadingWhitespace = matches && matches[0];\n\t\t}\n\t\tif (PARSER_MEDIA_TYPE === \"application/xhtml+xml\" && NAMESPACE === HTML_NAMESPACE) dirty = \"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>\" + dirty + \"</body></html>\";\n\t\tconst dirtyPayload = trustedTypesPolicy ? _createTrustedHTML(dirty) : dirty;\n\t\tif (NAMESPACE === HTML_NAMESPACE) try {\n\t\t\tdoc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n\t\t} catch (_) {}\n\t\tif (!doc || !doc.documentElement) {\n\t\t\tdoc = implementation.createDocument(NAMESPACE, \"template\", null);\n\t\t\ttry {\n\t\t\t\tdoc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n\t\t\t} catch (_) {}\n\t\t}\n\t\tconst body = doc.body || doc.documentElement;\n\t\tif (dirty && leadingWhitespace) body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n\t\tif (NAMESPACE === HTML_NAMESPACE) return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? \"html\" : \"body\")[0];\n\t\treturn WHOLE_DOCUMENT ? doc.documentElement : body;\n\t};\n\t/**\n\t* Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n\t*\n\t* @param root The root element or node to start traversing on.\n\t* @return The created NodeIterator\n\t*/\n\tconst _createNodeIterator = function _createNodeIterator(root) {\n\t\tconst doc = getOwnerDocument ? getOwnerDocument(root) : root.ownerDocument;\n\t\treturn createNodeIterator.call(doc || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n\t};\n\t/**\n\t* Replace template expression syntax (mustache, ERB, template\n\t* literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub\n\t* sites. Order matters: mustache, then ERB, then template literal.\n\t*\n\t* @param value the string to scrub\n\t* @returns the scrubbed string\n\t*/\n\tconst _stripTemplateExpressions = function _stripTemplateExpressions(value) {\n\t\tvalue = stringReplace(value, MUSTACHE_EXPR$1, \" \");\n\t\tvalue = stringReplace(value, ERB_EXPR$1, \" \");\n\t\tvalue = stringReplace(value, TMPLIT_EXPR$1, \" \");\n\t\treturn value;\n\t};\n\t/**\n\t* Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the\n\t* character data of an element subtree. Used as the final safety net for\n\t* SAFE_FOR_TEMPLATES on every DOM-returning code path so that expressions\n\t* which only form after text-node normalization (e.g. fragments split across\n\t* stripped elements) cannot survive into a template-evaluating framework.\n\t*\n\t* Walks text/comment/CDATA/processing-instruction nodes and mutates `.data`\n\t* in place rather than round-tripping through innerHTML. This preserves\n\t* descendant node references (important for IN_PLACE callers), avoids a\n\t* serialize/reparse cycle, and reads literal character data — which means\n\t* `<%...%>` in text content matches the ERB regex against its real bytes\n\t* instead of the HTML-entity-escaped form innerHTML would produce.\n\t*\n\t* Attribute values are not visited here; SAFE_FOR_TEMPLATES handling for\n\t* attributes is performed during the per-node `_sanitizeAttributes` pass.\n\t*\n\t* @param node The root element whose character data should be scrubbed.\n\t*/\n\tconst _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {\n\t\tvar _node$querySelectorAl;\n\t\t_scrubOwnCharacterData(node);\n\t\tconst templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, \"template\");\n\t\tif (templates) arrayForEach(templates, (tmpl) => {\n\t\t\tif (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);\n\t\t});\n\t};\n\t/**\n\t* _scrubOwnCharacterData\n\t*\n\t* Non-recursive core of _scrubTemplateExpressions: normalize `node` and\n\t* strip template expressions from its own character data only. Does not\n\t* enter <template>.content or attached shadow roots (NodeIterator never\n\t* does). Used by _sanitizeShadowDOM, where every nested template content\n\t* and shadow root is already walked - and therefore scrubbed - by its own\n\t* recursive _sanitizeShadowDOM call; recursing here as well would rescrub\n\t* each nested fragment once per ancestor, which is quadratic in nesting\n\t* depth.\n\t*\n\t* @param node The root whose own character data should be scrubbed.\n\t*/\n\tconst _scrubOwnCharacterData = function _scrubOwnCharacterData(node) {\n\t\tnode.normalize();\n\t\tconst doc = getOwnerDocument ? getOwnerDocument(node) : node.ownerDocument;\n\t\tconst walker = createNodeIterator.call(doc || node, node, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);\n\t\tlet currentNode = walker.nextNode();\n\t\twhile (currentNode) {\n\t\t\tcurrentNode.data = _stripTemplateExpressions(currentNode.data);\n\t\t\tcurrentNode = walker.nextNode();\n\t\t}\n\t};\n\t/**\n\t* _isClobbered\n\t*\n\t* Detect DOM-clobbering on HTMLFormElement nodes. Form is the only HTML\n\t* interface with [LegacyOverrideBuiltIns]; a descendant element with a\n\t* `name` attribute matching a prototype property shadows that property\n\t* on direct reads. We use this check at the IN_PLACE entry-point and\n\t* during attribute sanitization to refuse clobbered forms.\n\t*\n\t* @param element element to check for clobbering attacks\n\t* @return true if clobbered, false if safe\n\t*/\n\tconst _isClobbered = function _isClobbered(element) {\n\t\tconst realTagName = getNodeName ? getNodeName(element) : null;\n\t\tif (typeof realTagName !== \"string\") return false;\n\t\tif (transformCaseFunc(realTagName) !== \"form\") return false;\n\t\treturn typeof element.nodeName !== \"string\" || typeof element.textContent !== \"string\" || typeof element.removeChild !== \"function\" || element.attributes !== getAttributes(element) || typeof element.removeAttribute !== \"function\" || typeof element.removeAttributeNode !== \"function\" || typeof element.getAttributeNode !== \"function\" || typeof element.setAttribute !== \"function\" || typeof element.namespaceURI !== \"string\" || typeof element.insertBefore !== \"function\" || typeof element.hasChildNodes !== \"function\" || element.nodeType !== getNodeType(element) || element.childNodes !== getChildNodes(element);\n\t};\n\t/**\n\t* Checks whether the given value is a DocumentFragment from any realm.\n\t*\n\t* The realm-independent replacement reads `nodeType` through the cached\n\t* Node.prototype getter and compares to the DOCUMENT_FRAGMENT_NODE\n\t* constant (11). nodeType is a numeric value resolved from the node's\n\t* internal slot, identical across realms for the same kind of node.\n\t*\n\t* @param value object to check\n\t* @return true if value is a DocumentFragment-shaped node from any realm\n\t*/\n\tconst _isDocumentFragment = function _isDocumentFragment(value) {\n\t\tif (!getNodeType || typeof value !== \"object\" || value === null) return false;\n\t\ttry {\n\t\t\treturn getNodeType(value) === NODE_TYPE.documentFragment;\n\t\t} catch (_) {\n\t\t\treturn false;\n\t\t}\n\t};\n\t/**\n\t* Checks whether the given object is a DOM node, including nodes that\n\t* originate from a different window/realm (e.g. an iframe's\n\t* contentDocument). The previous `value instanceof Node` check was\n\t* realm-bound: nodes from a different window failed it, causing\n\t* sanitize() to silently stringify them and reset IN_PLACE to false,\n\t* returning the original node unsanitized. See GHSA-4w3q-35jp-p934.\n\t*\n\t* @param value object to check whether it's a DOM node\n\t* @return true if value is a DOM node from any realm\n\t*/\n\tconst _isNode = function _isNode(value) {\n\t\tif (!getNodeType || typeof value !== \"object\" || value === null) return false;\n\t\ttry {\n\t\t\treturn typeof getNodeType(value) === \"number\";\n\t\t} catch (_) {\n\t\t\treturn false;\n\t\t}\n\t};\n\tfunction _executeHooks(hooks, currentNode, data) {\n\t\tif (hooks.length === 0) return;\n\t\tarrayForEach(hooks, (hook) => {\n\t\t\thook.call(DOMPurify, currentNode, data, CONFIG);\n\t\t});\n\t}\n\t/**\n\t* Structural-threat checks that condemn a node regardless of the\n\t* allowlists: mXSS via namespace confusion, risky CSS construction,\n\t* processing instructions, markup-bearing comments. Pure predicate;\n\t* the caller removes. Check order is load-bearing.\n\t*\n\t* @param currentNode the node to inspect\n\t* @param tagName the node's transformCaseFunc'd tag name\n\t* @return true if the node must be removed\n\t*/\n\tconst _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {\n\t\tif (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) return true;\n\t\tif (SAFE_FOR_XML && LITERAL_TEXT_ELEMENTS[tagName] && _readNodeType(currentNode) === NODE_TYPE.element && _readNamespaceURI(currentNode) === HTML_NAMESPACE && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === \"string\" && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent))) return true;\n\t\tif (currentNode.nodeType === NODE_TYPE.processingInstruction) return true;\n\t\tif (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) return true;\n\t\treturn false;\n\t};\n\t/**\n\t* Evaluate a CUSTOM_ELEMENT_HANDLING check (a RegExp or a predicate\n\t* function, per the validation in _parseConfig) against a name.\n\t* Additional arguments are forwarded to predicate functions - the\n\t* attributeNameCheck predicate receives the tag name as its second\n\t* argument. A null/absent check never matches.\n\t*\n\t* @param check the configured tagNameCheck / attributeNameCheck value\n\t* @param name the name to test\n\t* @param args extra arguments forwarded to a predicate function\n\t* @return true if the check matches the name\n\t*/\n\tconst _matchesNameCheck = function _matchesNameCheck(check, name) {\n\t\tif (check instanceof RegExp) return regExpTest(check, name);\n\t\tif (check instanceof Function) {\n\t\t\tfor (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];\n\t\t\treturn Boolean(check(name, ...args));\n\t\t}\n\t\treturn false;\n\t};\n\t/**\n\t* Handle a node whose tag is forbidden or not allowlisted: keep\n\t* allowed custom elements (false return exits _sanitizeElements\n\t* early - the namespace and fallback-tag removal checks are\n\t* intentionally skipped for kept custom elements), else hoist\n\t* content per KEEP_CONTENT and remove.\n\t*\n\t* A kept custom element is the ONLY case in which this function\n\t* returns false, so the caller uses that return value to run the\n\t* afterSanitizeElements hook on the kept element and keep the\n\t* element-hook lifecycle consistent with normal allowlisted\n\t* elements (GHSA-c2j3-45gr-mqc4).\n\t*\n\t* @param currentNode the disallowed node\n\t* @param tagName the node's transformCaseFunc'd tag name\n\t* @return true if the node was removed, false if kept\n\t*/\n\tconst _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName, root) {\n\t\tif (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;\n\t\tif (KEEP_CONTENT && !FORBID_CONTENTS[tagName] && !FORBID_CONTENTS[stringToLowerCase(tagName)]) {\n\t\t\tconst parentNode = getParentNode(currentNode);\n\t\t\tconst childNodes = getChildNodes(currentNode);\n\t\t\tif (childNodes && parentNode) {\n\t\t\t\tconst childCount = childNodes.length;\n\t\t\t\tfor (let i = childCount - 1; i >= 0; --i) {\n\t\t\t\t\tconst hoisted = currentNode === root ? cloneNode(childNodes[i], true) : childNodes[i];\n\t\t\t\t\tparentNode.insertBefore(hoisted, getNextSibling(currentNode));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t_forceRemove(currentNode);\n\t\treturn true;\n\t};\n\t/**\n\t* Fork a hook-mutable allowlist off its shared binding the first time a\n\t* (possibly lazily-installed) uponSanitize* hook is about to see it, so the\n\t* hook cannot widen the per-instance default or the setConfig binding by\n\t* reference and leak past the call. Returns the set unchanged once it is\n\t* already call-local, so repeated calls across elements are idempotent.\n\t*\n\t* @param hookList the uponSanitize* hook array for this event\n\t* @param set the current ALLOWED_TAGS / ALLOWED_ATTR binding\n\t* @param defaultSet the per-instance DEFAULT_ALLOWED_* constant\n\t* @param setConfigSet the captured setConfig() binding, or null\n\t* @return a call-local clone if a hook is present and set is still shared,\n\t* else set unchanged\n\t*/\n\tconst _forkSharedAllowlist = function _forkSharedAllowlist(hookList, set, defaultSet, setConfigSet) {\n\t\tif (hookList.length === 0) return set;\n\t\treturn set === defaultSet || set === setConfigSet ? clone(set) : set;\n\t};\n\t/**\n\t* A hook may have detached the node it was called for. If so, treat it as\n\t* removed and stop processing it; the walk root is exempt. On the IN_PLACE\n\t* path the detached subtree is neutralized right away.\n\t*\n\t* @param currentNode the node a hook may have detached\n\t* @param root the current walk root\n\t* @return true if the node was detached\n\t*/\n\tconst _handleHookDetachedNode = function _handleHookDetachedNode(currentNode, root) {\n\t\tif (currentNode === root || getParentNode(currentNode) !== null) return false;\n\t\tif (IN_PLACE) _neutralizeSubtree(currentNode);\n\t\treturn true;\n\t};\n\t/**\n\t* _sanitizeElements\n\t*\n\t* @protect nodeName\n\t* @protect textContent\n\t* @protect removeChild\n\t* @param currentNode to check for permission to exist\n\t* @return true if node was killed, false if left alive\n\t*/\n\tconst _sanitizeElements = function _sanitizeElements(currentNode, root) {\n\t\t_markVisited(currentNode);\n\t\t_executeHooks(hooks.beforeSanitizeElements, currentNode, null);\n\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\tif (_isClobbered(currentNode)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tconst tagName = transformCaseFunc(_readNodeName(currentNode));\n\t\tALLOWED_TAGS = _forkSharedAllowlist(hooks.uponSanitizeElement, ALLOWED_TAGS, DEFAULT_ALLOWED_TAGS, SET_CONFIG_ALLOWED_TAGS);\n\t\t_executeHooks(hooks.uponSanitizeElement, currentNode, {\n\t\t\ttagName,\n\t\t\tallowedTags: ALLOWED_TAGS\n\t\t});\n\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\tif (_isUnsafeNode(currentNode, tagName)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {\n\t\t\tconst removed = _sanitizeDisallowedNode(currentNode, tagName, root);\n\t\t\tif (removed === false) {\n\t\t\t\t_executeHooks(hooks.afterSanitizeElements, currentNode, null);\n\t\t\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\t\t}\n\t\t\treturn removed;\n\t\t}\n\t\tif (_readNodeType(currentNode) === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif ((tagName === \"noscript\" || tagName === \"noembed\" || tagName === \"noframes\") && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n\t\t\tconst content = _stripTemplateExpressions(currentNode.textContent);\n\t\t\tif (currentNode.textContent !== content) {\n\t\t\t\tarrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });\n\t\t\t\tcurrentNode.textContent = content;\n\t\t\t}\n\t\t}\n\t\t_executeHooks(hooks.afterSanitizeElements, currentNode, null);\n\t\treturn _handleHookDetachedNode(currentNode, root);\n\t};\n\t/**\n\t* _isValidAttribute\n\t*\n\t* @param lcTag Lowercase tag name of containing element.\n\t* @param lcName Lowercase attribute name.\n\t* @param value Attribute value.\n\t* @return Returns true if `value` is valid, otherwise false.\n\t*/\n\tconst _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n\t\tif (FORBID_ATTR[lcName]) return false;\n\t\tif (_isPatchLinkageAttribute(lcName, lcTag)) return false;\n\t\tif (SANITIZE_DOM && (lcName === \"id\" || lcName === \"name\") && (value in document || value in formElement)) return false;\n\t\tconst nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);\n\t\tif (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) return true;\n\t\tif (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) return true;\n\t\tif (!nameIsPermitted) return _isBasicCustomElement(lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName, lcTag) || lcName === \"is\" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value);\n\t\tif (URI_SAFE_ATTRIBUTES[lcName]) return true;\n\t\tif (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, \"\"))) return true;\n\t\tif ((lcName === \"src\" || lcName === \"xlink:href\" || lcName === \"href\") && lcTag !== \"script\" && stringIndexOf(value, \"data:\") === 0 && DATA_URI_TAGS[lcTag]) return true;\n\t\tif (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, \"\"))) return true;\n\t\treturn !value;\n\t};\n\tconst RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, [\n\t\t\"annotation-xml\",\n\t\t\"color-profile\",\n\t\t\"font-face\",\n\t\t\"font-face-format\",\n\t\t\"font-face-name\",\n\t\t\"font-face-src\",\n\t\t\"font-face-uri\",\n\t\t\"missing-glyph\"\n\t]);\n\t/**\n\t* _isBasicCustomElement\n\t* checks if at least one dash is included in tagName, and it's not the first char\n\t* for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n\t*\n\t* @param tagName name of the tag of the node to sanitize\n\t* @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n\t*/\n\tconst _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n\t\treturn !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);\n\t};\n\t/**\n\t* Wrap an attribute value in the matching Trusted Types object when\n\t* the active policy requires it. Namespaced attributes pass through\n\t* unchanged (no TT support yet, see\n\t* https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).\n\t*\n\t* @param lcTag lowercase tag name of the containing element\n\t* @param lcName lowercase attribute name\n\t* @param namespaceURI the attribute's namespace, if any\n\t* @param value the attribute value to wrap\n\t* @return the value, wrapped when Trusted Types demand it\n\t*/\n\tconst _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {\n\t\tif (trustedTypesPolicy && typeof trustedTypes === \"object\" && typeof trustedTypes.getAttributeType === \"function\" && !namespaceURI) switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n\t\t\tcase \"TrustedHTML\": return _createTrustedHTML(value);\n\t\t\tcase \"TrustedScriptURL\": return _createTrustedScriptURL(value);\n\t\t}\n\t\treturn value;\n\t};\n\t/**\n\t* Write a modified attribute value back onto the element. On\n\t* success, re-probe for clobbering introduced by the new value and\n\t* remove the element when found; otherwise, when this writeback is the\n\t* recreate half of the SANITIZE_NAMED_PROPS remove-and-recreate, pop the\n\t* removal entry that path recorded so it does not show as removed. On\n\t* failure, remove the attribute instead.\n\t*\n\t* Returns true only on a clean write (the value was set and the new value\n\t* introduced no clobbering). The caller uses that, together with its own\n\t* knowledge of whether this attribute pushed a DOMPurify.removed record, to\n\t* decide whether to pop that record. The pop must happen ONLY for the\n\t* named-prop remove-and-recreate; popping on any other value change (trim,\n\t* template scrubbing, Trusted Types) would consume an unrelated _forceRemove\n\t* subtree-cleanup record and let that detached subtree keep a live event\n\t* handler through the IN_PLACE neutralization pass (SO-001).\n\t*\n\t* @param currentNode the element carrying the attribute\n\t* @param name the attribute name as present on the element\n\t* @param namespaceURI the attribute's namespace, if any\n\t* @param value the new attribute value\n\t* @return true if the value was written without introducing clobbering\n\t*/\n\tconst _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {\n\t\ttry {\n\t\t\tif (namespaceURI) currentNode.setAttributeNS(namespaceURI, name, value);\n\t\t\telse currentNode.setAttribute(name, value);\n\t\t\tif (_isClobbered(currentNode)) {\n\t\t\t\t_forceRemove(currentNode);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (_) {\n\t\t\t_removeAttribute(name, currentNode);\n\t\t\treturn false;\n\t\t}\n\t};\n\t/**\n\t* _isUnsafeAttributeValue\n\t*\n\t* Value-based attribute checks that the attribute walk applies before any\n\t* hook can force-keep an attribute, shared with the public\n\t* isValidAttribute() so that it never approves a value sanitize() would\n\t* strip.\n\t*\n\t* @param name the attribute name as found on the node (case preserved)\n\t* @param value the attribute value\n\t* @returns true if the attribute must be removed because of its value\n\t*/\n\tconst _isUnsafeAttributeValue = function _isUnsafeAttributeValue(name, value) {\n\t\tif (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) return true;\n\t\treturn stringToLowerCase(name) === \"attributename\" && stringMatch(value, \"href\") !== null;\n\t};\n\t/**\n\t* _sanitizeAttributes\n\t*\n\t* @protect attributes\n\t* @protect nodeName\n\t* @protect removeAttribute\n\t* @protect setAttribute\n\t*\n\t* @param currentNode to sanitize\n\t* @param root the current walk root\n\t*/\n\tconst _sanitizeAttributes = function _sanitizeAttributes(currentNode, root) {\n\t\t_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);\n\t\tif (_handleHookDetachedNode(currentNode, root)) return;\n\t\tconst attributes = currentNode.attributes;\n\t\tif (!attributes || _isClobbered(currentNode)) return;\n\t\tALLOWED_ATTR = _forkSharedAllowlist(hooks.uponSanitizeAttribute, ALLOWED_ATTR, DEFAULT_ALLOWED_ATTR, SET_CONFIG_ALLOWED_ATTR);\n\t\tconst hookEvent = {\n\t\t\tattrName: \"\",\n\t\t\tattrValue: \"\",\n\t\t\tkeepAttr: true,\n\t\t\tallowedAttributes: ALLOWED_ATTR,\n\t\t\tforceKeepAttr: void 0\n\t\t};\n\t\tlet l = attributes.length;\n\t\tconst lcTag = transformCaseFunc(currentNode.nodeName);\n\t\twhile (l--) {\n\t\t\tconst attr = attributes[l];\n\t\t\tconst name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;\n\t\t\tconst lcName = transformCaseFunc(name);\n\t\t\tconst initValue = attrValue;\n\t\t\tlet value = name === \"value\" ? initValue : stringTrim(initValue);\n\t\t\tlet recreatedNamedProp = false;\n\t\t\thookEvent.attrName = lcName;\n\t\t\thookEvent.attrValue = value;\n\t\t\thookEvent.keepAttr = true;\n\t\t\thookEvent.forceKeepAttr = void 0;\n\t\t\t_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);\n\t\t\tvalue = hookEvent.attrValue;\n\t\t\tif (SANITIZE_NAMED_PROPS && (lcName === \"id\" || lcName === \"name\") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tvalue = SANITIZE_NAMED_PROPS_PREFIX + value;\n\t\t\t\trecreatedNamedProp = true;\n\t\t\t}\n\t\t\tif (_isUnsafeAttributeValue(name, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (hookEvent.forceKeepAttr) continue;\n\t\t\tif (!hookEvent.keepAttr) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (SAFE_FOR_TEMPLATES) value = _stripTemplateExpressions(value);\n\t\t\tif (!_isValidAttribute(lcTag, lcName, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvalue = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);\n\t\t\tif (value !== initValue) {\n\t\t\t\tif (_setAttributeValue(currentNode, name, namespaceURI, value) && recreatedNamedProp) arrayPop(DOMPurify.removed);\n\t\t\t}\n\t\t}\n\t\t_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);\n\t\t_handleHookDetachedNode(currentNode, root);\n\t};\n\t/**\n\t* _sanitizeShadowDOM\n\t*\n\t* @param fragment to iterate over recursively\n\t*/\n\tconst _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {\n\t\tlet shadowNode = null;\n\t\tconst shadowIterator = _createNodeIterator(fragment);\n\t\t_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);\n\t\twhile (shadowNode = shadowIterator.nextNode()) {\n\t\t\t_executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);\n\t\t\t_sanitizeElements(shadowNode, fragment);\n\t\t\t_sanitizeAttributes(shadowNode, fragment);\n\t\t\tif (_isDocumentFragment(shadowNode.content)) _sanitizeShadowDOM2(shadowNode.content);\n\t\t\tif (_readNodeType(shadowNode) === NODE_TYPE.element) {\n\t\t\t\tconst innerSr = getShadowRoot(shadowNode);\n\t\t\t\tif (_isDocumentFragment(innerSr)) {\n\t\t\t\t\t_sanitizeAttachedShadowRoots(innerSr);\n\t\t\t\t\t_sanitizeShadowDOM2(innerSr);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (SAFE_FOR_TEMPLATES) _scrubOwnCharacterData(fragment);\n\t\t_executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);\n\t};\n\t/**\n\t* Sanitizes every attached shadow root under `root`, since the node\n\t* iterator does not enter shadow trees. Needed for IN_PLACE input and for\n\t* DOM input whose clonable shadow roots were copied by importNode().\n\t*\n\t* @param root the subtree root to walk for attached shadow roots\n\t*/\n\tconst _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {\n\t\tconst stack = [{\n\t\t\tnode: root,\n\t\t\tshadow: null\n\t\t}];\n\t\twhile (stack.length > 0) {\n\t\t\tconst item = stack.pop();\n\t\t\tif (item.shadow) {\n\t\t\t\t_sanitizeShadowDOM2(item.shadow);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst node = item.node;\n\t\t\tconst isElement = _readNodeType(node) === NODE_TYPE.element;\n\t\t\tconst childNodes = getChildNodes(node);\n\t\t\tif (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push({\n\t\t\t\tnode: childNodes[i],\n\t\t\t\tshadow: null\n\t\t\t});\n\t\t\tif (isElement) {\n\t\t\t\tconst rootName = getNodeName ? getNodeName(node) : null;\n\t\t\t\tif (typeof rootName === \"string\" && transformCaseFunc(rootName) === \"template\") {\n\t\t\t\t\tconst content = node.content;\n\t\t\t\t\tif (_isDocumentFragment(content)) stack.push({\n\t\t\t\t\t\tnode: content,\n\t\t\t\t\t\tshadow: null\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isElement) {\n\t\t\t\tconst sr = getShadowRoot(node);\n\t\t\t\tif (_isDocumentFragment(sr)) stack.push({\n\t\t\t\t\tnode: null,\n\t\t\t\t\tshadow: sr\n\t\t\t\t}, {\n\t\t\t\t\tnode: sr,\n\t\t\t\t\tshadow: null\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\tDOMPurify.sanitize = function(dirty) {\n\t\tlet cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n\t\tlet body = null;\n\t\tlet importedNode = null;\n\t\tlet currentNode = null;\n\t\tlet returnNode = null;\n\t\tIS_EMPTY_INPUT = !dirty;\n\t\tif (IS_EMPTY_INPUT) dirty = \"<!-->\";\n\t\tif (typeof dirty !== \"string\" && !_isNode(dirty)) {\n\t\t\tdirty = stringifyValue(dirty);\n\t\t\tif (typeof dirty !== \"string\") throw typeErrorCreate(\"dirty is not a string, aborting\");\n\t\t}\n\t\tif (!DOMPurify.isSupported) return dirty;\n\t\tif (SET_CONFIG) {\n\t\t\tALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;\n\t\t\tALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;\n\t\t} else _parseConfig(cfg);\n\t\tif (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) ALLOWED_TAGS = clone(ALLOWED_TAGS);\n\t\tif (hooks.uponSanitizeAttribute.length > 0) ALLOWED_ATTR = clone(ALLOWED_ATTR);\n\t\tDOMPurify.removed = [];\n\t\tconst inPlace = IN_PLACE && typeof dirty !== \"string\" && _isNode(dirty);\n\t\tlet inPlaceNodes = [];\n\t\tconst outerVisited = IN_PLACE_VISITED;\n\t\tif (inPlace) {\n\t\t\t_neutralizePatchLinkage(dirty);\n\t\t\tconst nn = _readNodeName(dirty);\n\t\t\tif (typeof nn === \"string\") {\n\t\t\t\tconst tagName = transformCaseFunc(nn);\n\t\t\t\tif (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n\t\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\t\tthrow typeErrorCreate(\"root node is forbidden and cannot be sanitized in-place\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (_isClobbered(dirty)) {\n\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\tthrow typeErrorCreate(\"root node is clobbered and cannot be sanitized in-place\");\n\t\t\t}\n\t\t\tinPlaceNodes = _collectLiveNodes(dirty);\n\t\t\tIN_PLACE_VISITED = setCreate();\n\t\t} else if (_isNode(dirty)) {\n\t\t\tbody = _initDocument(\"<!---->\");\n\t\t\timportedNode = body.ownerDocument.importNode(dirty, true);\n\t\t\tif (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === \"BODY\") body = importedNode;\n\t\t\telse if (importedNode.nodeName === \"HTML\") body = importedNode;\n\t\t\telse body.appendChild(importedNode);\n\t\t\t_sanitizeAttachedShadowRoots(body);\n\t\t} else {\n\t\t\tif (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && dirty.indexOf(\"<\") === -1) return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(dirty) : dirty;\n\t\t\tbody = _initDocument(dirty);\n\t\t\tif (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : \"\";\n\t\t}\n\t\tif (body && FORCE_BODY) _forceRemove(body.firstChild);\n\t\tconst walkRoot = inPlace ? dirty : body;\n\t\ttry {\n\t\t\tif (inPlace) _sanitizeAttachedShadowRoots(dirty);\n\t\t\tconst nodeIterator = _createNodeIterator(walkRoot);\n\t\t\twhile (currentNode = nodeIterator.nextNode()) {\n\t\t\t\t_sanitizeElements(currentNode, walkRoot);\n\t\t\t\t_sanitizeAttributes(currentNode, walkRoot);\n\t\t\t\tif (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);\n\t\t\t}\n\t\t\tif (inPlace) _sanitizeUnvisitedNodes(dirty, inPlaceNodes);\n\t\t} catch (error) {\n\t\t\tif (inPlace) {\n\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\t_neutralizeDiscarded(dirty, inPlaceNodes);\n\t\t\t}\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tIN_PLACE_VISITED = outerVisited;\n\t\t}\n\t\tif (inPlace) {\n\t\t\tif (_neutralizeDiscarded(dirty, inPlaceNodes)) throw typeErrorCreate(\"a node selected for removal could not be safely returned; refusing to sanitize in place\");\n\t\t\tif (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(dirty);\n\t\t\treturn dirty;\n\t\t}\n\t\tif (RETURN_DOM) {\n\t\t\tif (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(body);\n\t\t\tif (RETURN_DOM_FRAGMENT) {\n\t\t\t\treturnNode = createDocumentFragment.call(body.ownerDocument);\n\t\t\t\twhile (body.firstChild) returnNode.appendChild(body.firstChild);\n\t\t\t} else returnNode = body;\n\t\t\tif (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) returnNode = importNode.call(originalDocument, returnNode, true);\n\t\t\treturn returnNode;\n\t\t}\n\t\tlet serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\t\tif (WHOLE_DOCUMENT && ALLOWED_TAGS[\"!doctype\"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) serializedHTML = \"<!DOCTYPE \" + body.ownerDocument.doctype.name + \">\\n\" + serializedHTML;\n\t\tif (SAFE_FOR_TEMPLATES) serializedHTML = _stripTemplateExpressions(serializedHTML);\n\t\treturn trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;\n\t};\n\tDOMPurify.setConfig = function() {\n\t\tlet cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n\t\t_parseConfig(cfg);\n\t\tSET_CONFIG = true;\n\t\tSET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;\n\t\tSET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;\n\t};\n\tDOMPurify.clearConfig = function() {\n\t\tCONFIG = null;\n\t\tSET_CONFIG = false;\n\t\tSET_CONFIG_ALLOWED_TAGS = null;\n\t\tSET_CONFIG_ALLOWED_ATTR = null;\n\t\ttrustedTypesPolicy = defaultTrustedTypesPolicy;\n\t\temptyHTML = \"\";\n\t};\n\tDOMPurify.isValidAttribute = function(tag, attr, value) {\n\t\tif (!CONFIG) _parseConfig({});\n\t\tconst lcTag = transformCaseFunc(tag);\n\t\tconst lcName = transformCaseFunc(attr);\n\t\tif (typeof value === \"string\" && (_isUnsafeAttributeValue(attr, value) || !ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value))) return false;\n\t\treturn _isValidAttribute(lcTag, lcName, value);\n\t};\n\tDOMPurify.addHook = function(entryPoint, hookFunction) {\n\t\tif (typeof hookFunction !== \"function\") return;\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\tarrayPush(hooks[entryPoint], hookFunction);\n\t};\n\tDOMPurify.removeHook = function(entryPoint, hookFunction) {\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\tif (hookFunction !== void 0) {\n\t\t\tconst index = arrayLastIndexOf(hooks[entryPoint], hookFunction);\n\t\t\treturn index === -1 ? void 0 : arraySplice(hooks[entryPoint], index, 1)[0];\n\t\t}\n\t\treturn arrayPop(hooks[entryPoint]);\n\t};\n\tDOMPurify.removeHooks = function(entryPoint) {\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\thooks[entryPoint] = [];\n\t};\n\tDOMPurify.removeAllHooks = function() {\n\t\thooks = _createHooksMap();\n\t};\n\treturn DOMPurify;\n}\nvar purify_default = createDOMPurify();\nexport { purify_default as default };\n\n//# sourceMappingURL=purify.es.mjs.map","import { getDate, getMonth, getYear, isAfter, isBefore, isValid, set } from \"date-fns\";\nimport prettyBytes from \"pretty-bytes\";\nimport DomPurify from \"dompurify\";\n//#region \\0rolldown/runtime.js\nvar __defProp = Object.defineProperty;\nvar __exportAll = (all, no_symbols) => {\n\tlet target = {};\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n\tif (!no_symbols) __defProp(target, Symbol.toStringTag, { value: \"Module\" });\n\treturn target;\n};\n//#endregion\n//#region src/capitalize.ts\n/**\n* Uppercases first letter of string\n* @param string to be capitalized first string, e.g. \"workflow\"\n* @return Capitalized String, e.g. \"Workflow\"\n*/\nvar capitalize = (input) => input.charAt(0).toUpperCase() + input.substring(1);\nvar formats = {\n\tcustomFormat: (input, delimiter) => capitalize(input.replace(delimiter, \" \").toLowerCase()),\n\tkebabFormat: (input) => formats.customFormat(input, \"-\"),\n\tsnakeFormat: (input) => formats.customFormat(input, \"_\"),\n\tcamelPascalCase: (input) => capitalize((input.match(/([A-Z]?[^A-Z]*)/g) ?? []).slice(0, -1).join(\" \").toLowerCase())\n};\nvar caseFormatter = ({ string, delimiter, format }) => {\n\tif (delimiter) return formats.customFormat(string, delimiter);\n\tif (format) return formats[format](string, delimiter ?? \"\");\n\treturn capitalize(string);\n};\n//#endregion\n//#region src/updateDate.ts\n/**\n* Updates the date part (year, day and month) of a date object (base)\n* time, offset (timezone) and so on will be left untouched.\n*\n* @param base - Date which will be used (copied) to set day, month and year.\n* @param date - Extract day, month and year from this date object.\n* @returns Copy of base with day, month and year of date.\n*/\nvar updateDate_default = (base, date) => {\n\tif (date) {\n\t\tbase = isValid(base) ? base : new Date(Date.UTC(0, 0));\n\t\treturn set(base, {\n\t\t\tyear: getYear(date),\n\t\t\tmonth: getMonth(date),\n\t\t\tdate: getDate(date)\n\t\t});\n\t}\n\treturn base;\n};\n//#endregion\n//#region src/updateTime.ts\n/**\n* Updates the time part (hour, minute, second and millisecond) of a date object (base)\n* date, offset (timezone) and so on will be left untouched.\n*\n* @param base - Date which will be used (copied) to set day, month and year.\n* @param date - Extract hour, minute, second and millisecond from this date object.\n* @returns Copy of base with hour, minute, second and millisecond changed.\n*/\nvar updateTime_default = (base, date) => {\n\tconst d = new Date(base);\n\tif (date) {\n\t\td.setHours(date.getHours());\n\t\td.setMinutes(date.getMinutes());\n\t\td.setSeconds(date.getSeconds());\n\t\td.setMilliseconds(date.getMilliseconds());\n\t}\n\treturn d;\n};\n//#endregion\n//#region src/dateMinMaxCheck.ts\n/**\n* Check if date is before min.\n* @param date\n* @param min\n* @param checkDate - check date part (year, day, month).\n* @param checkTime - check time part (hour, minutes etc.).\n* @returns whether limit is kept or not.\n*/\nvar isBeforeMinDate = (date, min, checkDate, checkTime) => {\n\tif (min) {\n\t\tif (checkTime && checkDate) return isBefore(date, min);\n\t\tif (checkTime) {\n\t\t\tconst base = /* @__PURE__ */ new Date(0);\n\t\t\treturn isBefore(updateTime_default(base, date), updateTime_default(base, min));\n\t\t}\n\t\tif (checkDate) {\n\t\t\tconst base = /* @__PURE__ */ new Date(0);\n\t\t\treturn isBefore(updateDate_default(base, date), updateDate_default(base, min));\n\t\t}\n\t}\n\treturn false;\n};\n/**\n* Check\n* @param date - date to check.\n* @param max - maximum date.\n* @param checkDate - check date part (year, day, month).\n* @param checkTime - check time part (hour, minutes etc.).\n* @returns whether limit is kept or not.\n*/\nvar isAfterMaxDate = (date, max, checkDate, checkTime) => {\n\tif (max) {\n\t\tif (checkTime && checkDate) return isAfter(date, max);\n\t\tif (checkTime) {\n\t\t\tconst base = /* @__PURE__ */ new Date(0);\n\t\t\treturn isAfter(updateTime_default(base, date), updateTime_default(base, max));\n\t\t}\n\t\tif (checkDate) {\n\t\t\tconst base = /* @__PURE__ */ new Date(0);\n\t\t\treturn isAfter(updateDate_default(base, date), updateDate_default(base, max));\n\t\t}\n\t}\n\treturn false;\n};\n//#endregion\n//#region src/debounce.ts\nvar debounce = (callback, wait) => {\n\tlet timer;\n\tlet lastCall = 0;\n\treturn (...args) => {\n\t\tconst [value, index] = args;\n\t\tclearTimeout(timer);\n\t\tconst now = Date.now();\n\t\tif (now - lastCall > wait) {\n\t\t\tlastCall = now;\n\t\t\tcallback(value, index);\n\t\t} else timer = setTimeout(() => {\n\t\t\tlastCall = now;\n\t\t\tcallback(value, index);\n\t\t}, wait);\n\t};\n};\nvar filters = Object.assign({}, ...[\n\t{\n\t\tid: \"search\",\n\t\tnormalize(searchTerm, caseSensitiveSearch) {\n\t\t\treturn caseSensitiveSearch ? searchTerm : searchTerm.toLowerCase();\n\t\t},\n\t\ttest(text, normalizedSearchTerm, caseSensitiveSearch, inverseSearch) {\n\t\t\tconst matches = (caseSensitiveSearch ? text : text.toLowerCase()).includes(normalizedSearchTerm);\n\t\t\treturn inverseSearch ? !matches : matches;\n\t\t}\n\t},\n\t{\n\t\tid: \"wildcard\",\n\t\tnormalize(searchTerm, caseSensitiveSearch) {\n\t\t\tif (searchTerm.length > 0) searchTerm = `^${searchTerm.replace(/[-[\\]{}()+.,\\\\^$|#\\s]/g, \"\\\\$&\").replace(/\\*/g, \".*\").replace(/\\?/g, \".?\")}$`;\n\t\t\telse return { test: () => false };\n\t\t\ttry {\n\t\t\t\treturn new RegExp(searchTerm, caseSensitiveSearch ? \"\" : \"i\");\n\t\t\t} catch (_error) {\n\t\t\t\treturn /$^/;\n\t\t\t}\n\t\t},\n\t\ttest(text, normalizedSearchTerm, caseSensitiveSearch, inverseSearch) {\n\t\t\tconst matches = normalizedSearchTerm.test(text);\n\t\t\treturn inverseSearch ? !matches : matches;\n\t\t}\n\t},\n\t{\n\t\tid: \"regex\",\n\t\tnormalize(searchTerm, caseSensitiveSearch) {\n\t\t\ttry {\n\t\t\t\tconst flags = caseSensitiveSearch ? \"\" : \"i\";\n\t\t\t\treturn new RegExp(`^(${searchTerm})$`, flags);\n\t\t\t} catch (_error) {\n\t\t\t\treturn /$^/;\n\t\t\t}\n\t\t},\n\t\ttest(text, normalizedSearchTerm, caseSensitiveSearch, inverseSearch) {\n\t\t\tconst matches = normalizedSearchTerm.test(text);\n\t\t\treturn inverseSearch ? !matches : matches;\n\t\t}\n\t},\n\t{\n\t\tid: \"type\",\n\t\tnormalize(selectedTypes) {\n\t\t\treturn { test: (type) => selectedTypes.includes(type) };\n\t\t},\n\t\ttest(type, normalizedSearchTerm) {\n\t\t\tif (typeof type === \"undefined\") return false;\n\t\t\treturn normalizedSearchTerm.test(type);\n\t\t}\n\t}\n].map((obj) => ({ [obj.id]: obj })));\n//#endregion\n//#region src/localTimezone.ts\n/**\n* Get the users local timezone.\n*\n* @returns current users timezone (browser based) tz db string (e. g. Europe/Berlin).\n*/\nvar localTimezone_default = () => Intl.DateTimeFormat().resolvedOptions().timeZone;\n//#endregion\n//#region src/format.ts\n/**\n* Converts the specified date String to human readable text containing the day, month, and year.\n* Example: '2018-07-31T09:44:31+00:00' => 'Jul 31, 2018'\n*\n* @param dateString String representation of the Date to format\n* @param useTimeZone to set the timeZone where the user is located, and display local date and time\n* @returns human readable date String\n*/\nvar formatDateString = (dateString, useTimeZone = false) => {\n\tconst date = new Date(dateString);\n\tif (isNaN(date)) throw Error(\"Invalid Date format\");\n\tconst baseDateOptions = {\n\t\tday: \"numeric\",\n\t\tmonth: \"short\",\n\t\tyear: \"numeric\"\n\t};\n\tconst dateOptions = useTimeZone ? {\n\t\t...baseDateOptions,\n\t\ttimeZone: localTimezone_default()\n\t} : baseDateOptions;\n\treturn date.toLocaleDateString(\"en-US\", dateOptions);\n};\n/**\n* Converts the specified time String to human readable text containing the hour (12-hour) and minute.\n* Example: '2018-07-31T09:44:31+00:00' => '9:44 AM'\n*\n* @param timeString String representation of the Date (including time) to format\n* @param useTimeZone to set the timeZone where the user is located, and display local date and time\n* @returns human readable time String\n*/\nvar formatTimeString = (timeString, useTimeZone = false) => {\n\tconst time = new Date(timeString);\n\tif (isNaN(time)) throw Error(\"Invalid Date format\");\n\tconst baseTimeOptions = {\n\t\thour: \"numeric\",\n\t\tminute: \"2-digit\"\n\t};\n\tconst timeOptions = useTimeZone ? {\n\t\t...baseTimeOptions,\n\t\ttimeZone: localTimezone_default()\n\t} : baseTimeOptions;\n\treturn time.toLocaleTimeString(\"en-US\", timeOptions);\n};\n/**\n* Converts the specified time String to human readable text containing the date (day, month, year) and time (hour,\n* minute; 12-hour).\n* Example: '2018-07-31T09:44:31+00:00' => 'Jul 31, 2018 9:44 AM'\n*\n* @param dateTimeString String representation of the Date (including time and date) to format\n* @param useTimeZone to set the timeZone where the user is located, and display local date and time\n* @returns human readable date/time String\n*/\nvar formatDateTimeString = (dateTimeString, useTimeZone = false) => {\n\treturn `${formatDateString(dateTimeString, useTimeZone)} ${formatTimeString(dateTimeString, useTimeZone)}`;\n};\n/**\n* Converts the specified date and time to the user time zone with option to display (day, month, year) only or with time (hour,\n* minute; 12-hour).\n*\n* @param showTime String representation of the Date to convert and format\n* @param String | number} date String representation of the Date to convert and format\n* @returns human readable date/time String converted to user time zone\n*/\nvar formatLocalDateTimeString = (date, showTime) => showTime ? formatDateTimeString(date, true) : formatDateString(date, true);\nvar formatFileSize = (bytes) => {\n\treturn prettyBytes(Number.isFinite(bytes) && bytes >= 0 ? bytes : 0);\n};\n//#endregion\n//#region src/getDeepActiveElement.ts\nvar getDeepActiveElement = () => {\n\tlet element = document?.activeElement;\n\twhile (element?.shadowRoot) element = element?.shadowRoot?.activeElement;\n\treturn element;\n};\n//#endregion\n//#region src/getWrappedAroundIndex.ts\n/**\n* Since (a % b) yields a negative outcome for negative a, we need this method in order\n* to correctly compute wrapped around indices in lists\n* @param {number} index an arbitrary integer\n* @param {number} length a positive integer\n* @returns {number} the non-negative modulo outcome\n*/\nvar getWrappedAroundIndex_default = (index, length) => (index % length + length) % length;\n//#endregion\n//#region src/intervalUtils.ts\nvar intervalUtils_exports = /* @__PURE__ */ __exportAll({\n\tformatIntervalToHumanReadableIntervalString: () => formatIntervalToHumanReadableIntervalString,\n\tformatIntervalToISOIntervalString: () => formatIntervalToISOIntervalString,\n\tisValidHumanReadableIntervalString: () => isValidHumanReadableIntervalString,\n\tisValidISOIntervalString: () => isValidISOIntervalString,\n\tisValidIntervalString: () => isValidIntervalString,\n\tisZero: () => isZero,\n\tparseGenericIntervalString: () => parseGenericIntervalString,\n\tparseHumanReadableIntervalString: () => parseHumanReadableIntervalString,\n\tparseISOIntervalString: () => parseISOIntervalString\n});\nvar extractPeriodFromRegexMatch = (negative, match) => {\n\treturn {\n\t\tnegative,\n\t\tyears: parseInt(match[1] ?? \"0\", 10),\n\t\tmonths: parseInt(match[2] ?? \"0\", 10),\n\t\tweeks: parseInt(match[3] ?? \"0\", 10),\n\t\tdays: parseInt(match[4] ?? \"0\", 10)\n\t};\n};\nvar extractDurationFromRegexMatch = (negative, match) => {\n\tconst milliseconds = parseInt(match[4]?.padEnd(3, \"0\") ?? \"0\", 10);\n\treturn {\n\t\tnegative,\n\t\thours: parseInt(match[1] ?? \"0\", 10),\n\t\tminutes: parseInt(match[2] ?? \"0\", 10),\n\t\tseconds: parseInt(match[3] ?? \"0\", 10),\n\t\tmilliseconds\n\t};\n};\nvar isZero = (interval) => {\n\tif (interval.type === \"DATE\") return interval.interval.years === 0 && interval.interval.months === 0 && interval.interval.weeks === 0 && interval.interval.days === 0;\n\telse return interval.interval.hours === 0 && interval.interval.minutes === 0 && interval.interval.seconds === 0 && interval.interval.milliseconds === 0;\n};\n/**\n* Take an interval object and convert it to an ISO duration or period string. All parts of the\n* relevant part of the Interval object are included in the output, even if they are zero.\n*\n* Technically the ISO standard allows to mix period and duration parts, but we don't support that\n* here because it's incredibly hard to deal with all the edge cases. Maybe in a future ticket.\n*\n* The output here is allowed to be negative, in which case the minus sign is prepended to the\n* output.\n*\n* @param toFormat The PeriodOrDuration object to format\n*/\nvar formatIntervalToISOIntervalString = (toFormat) => {\n\tlet output = \"P\";\n\tif (toFormat.type === \"DATE\") output += `${toFormat.interval.years}Y${toFormat.interval.months}M${toFormat.interval.weeks}W${toFormat.interval.days}D`;\n\telse output += `T${toFormat.interval.hours}H${toFormat.interval.minutes}M${toFormat.interval.seconds}.${toFormat.interval.milliseconds.toString().padStart(3, \"0\")}S`;\n\tif (toFormat.interval.negative) output = `-${output}`;\n\treturn output;\n};\n/**\n* Take an interval object and convert it to a human readable string. Only non-zero parts are\n* included in the output (unless all parts are 0).\n*\n* The output here is allowed to be negative, in which case the minus sign is prepended to the\n* output and we wrap the whole thing in brackets e.g. -(1 year 2 days).\n*\n* @param toFormat The PeriodOrDuration object to format\n*/\nvar formatIntervalToHumanReadableIntervalString = (toFormat) => {\n\tconst formatPart = (value, unit) => {\n\t\tif (value === 0) return \"\";\n\t\telse if (value === 1) return `${value} ${unit} `;\n\t\telse return `${value} ${unit}s `;\n\t};\n\tlet output = \"\";\n\tif (toFormat.type === \"DATE\") {\n\t\tif (isZero(toFormat)) return \"0 days\";\n\t\toutput += formatPart(toFormat.interval.years, \"year\");\n\t\toutput += formatPart(toFormat.interval.months, \"month\");\n\t\toutput += formatPart(toFormat.interval.weeks, \"week\");\n\t\toutput += formatPart(toFormat.interval.days, \"day\");\n\t} else {\n\t\tif (isZero(toFormat)) return \"0 seconds\";\n\t\toutput += formatPart(toFormat.interval.hours, \"hour\");\n\t\toutput += formatPart(toFormat.interval.minutes, \"minute\");\n\t\tconst milliSecondsZero = toFormat.interval.milliseconds === 0;\n\t\tif (toFormat.interval.seconds !== 0 || !milliSecondsZero) if (milliSecondsZero) output += formatPart(toFormat.interval.seconds, \"second\");\n\t\telse output += `${toFormat.interval.seconds}.${toFormat.interval.milliseconds.toString().padStart(3, \"0\")} seconds `;\n\t}\n\tif (toFormat.interval.negative) output = `-(${output.trim()})`;\n\treturn output.trim();\n};\nvar yearsPart = \"(\\\\d+)\\\\s*y(?:ears?)?\";\nvar monthsPart = \"(\\\\d+)\\\\s*m(?:o(?:nths?)?)?\";\nvar weeksPart = \"(\\\\d+)\\\\s*w(?:eeks?)?\";\nvar daysPart = \"(\\\\d+)\\\\s*d(?:ays?)?\";\nvar hoursPart = \"(\\\\d+)\\\\s*h(?:ours?)?\";\nvar minutesPart = \"(\\\\d+)\\\\s*m(?:in(?:s|utes?)?)?\";\nvar secondsPart = \"(\\\\d+)(?:[,.](\\\\d{1,3}))?\\\\s*s(?:ec(?:s|onds?)?)?\";\n/**\n* Matches a human readable period string, e.g. \"1y 2mo 3weeks 4day\" (each part is optional)\n*/\nvar humanReadablePeriodRegex = new RegExp(`^(?:${yearsPart})?\\\\s*(?:${monthsPart})?\\\\s*(?:${weeksPart})?\\\\s*(?:${daysPart})?\\\\s*$`, \"i\");\n/**\n* Matches a human readable duration string, e.g. \"1h 2m 3.456s\" (each part is optional)\n*/\nvar humanReadableDurationRegex = new RegExp(`^(?:${hoursPart})?\\\\s*(?:${minutesPart})?\\\\s*(?:${secondsPart})?$`, \"i\");\n/**\n* Matches a negative human readable period string, e.g. \"-(1y 2mo 3weeks 4day)\" (each part is optional)\n*/\nvar negativeHumanReadablePeriodRegex = new RegExp(`^\\\\s*-\\\\s*\\\\(\\\\s*${humanReadablePeriodRegex.source.replace(/[$^]/g, \"\")}\\\\s*\\\\)\\\\s*$`, \"i\");\n/**\n* Matches a negative human readable period string with one field like \"-1y\" or \"-1w\"\n*/\nvar negativeHumanReadablePeriodRegexWithSingleField = new RegExp(`^\\\\s*-\\\\s*(?:\\\\s*${yearsPart}|${monthsPart}|${weeksPart}|${daysPart})\\\\s*$`, \"i\");\n/**\n* Matches a negative human readable duration string, e.g. \"-(1h 2m 3.456s)\" (each part is optional)\n*/\nvar negativeHumanReadableDurationRegex = new RegExp(`^\\\\s*-\\\\s*\\\\(\\\\s*${humanReadableDurationRegex.source.replace(/[$^]/g, \"\")}\\\\s*\\\\)\\\\s*$`, \"i\");\n/**\n* Matches a negative human readable duration string with one field like \"-1h\" or \"-1.5s\"\n*/\nvar negativeHumanReadableDurationRegexWithSingleField = new RegExp(`^\\\\s*-\\\\s*(?:\\\\s*${hoursPart}|${minutesPart}|${secondsPart})\\\\s*$`, \"i\");\n/**\n* Try to parse a human readable interval string into an Interval object. Any parts not specified\n* are assumed to be zero. Note that the string must be either a period or a duration, not a mix of\n* both. So for example, \"1y 2mo 3weeks 4day\" is fine, as is \"1h 2m 3.456s\". However, \"1y 2mo 1sec\"\n* is not, since it's a mix of both.\n*\n* Negative intervals are allowed, although if multiple fields are provided the string must include\n* brackets, so \"-(1y 2mo)\" is also valid, as is \"-5 seconds\".\n*\n* The string is required to have at least some content, any string that is blank will throw an error.\n*\n* @param intervalString The human readable time string\n*/\nvar parseHumanReadableIntervalString = (intervalString) => {\n\tintervalString = intervalString?.trim();\n\tif (!intervalString) throw new Error(\"Empty interval string\");\n\tconst matchPositivePeriod = humanReadablePeriodRegex.exec(intervalString);\n\tconst matchNegativePeriod = negativeHumanReadablePeriodRegex.exec(intervalString) ?? negativeHumanReadablePeriodRegexWithSingleField.exec(intervalString);\n\tconst matchPositiveDuration = humanReadableDurationRegex.exec(intervalString);\n\tconst matchNegativeDuration = negativeHumanReadableDurationRegex.exec(intervalString) ?? negativeHumanReadableDurationRegexWithSingleField.exec(intervalString);\n\tconst matchPeriod = matchPositivePeriod ?? matchNegativePeriod;\n\tconst matchDuration = matchPositiveDuration ?? matchNegativeDuration;\n\tconst negative = (matchNegativePeriod ?? matchNegativeDuration) !== null;\n\tif (matchDuration && matchPeriod) throw new Error(\"Ambiguous time format\");\n\tif (matchPeriod) return {\n\t\ttype: \"DATE\",\n\t\tinterval: extractPeriodFromRegexMatch(negative, matchPeriod)\n\t};\n\telse if (matchDuration) return {\n\t\ttype: \"TIME\",\n\t\tinterval: extractDurationFromRegexMatch(negative, matchDuration)\n\t};\n\telse throw new Error(`Invalid human readable time: ${intervalString}`);\n};\n/**\n* Check if the given string can be understood as a human readable duration or period string. The\n* type parameter specifies whether the string should be a date, time, or either.\n*\n* @param time the string to check\n* @param expectedType the type of the string - either \"DATE\", \"TIME\", or \"ANY\"\n*/\nvar isValidHumanReadableIntervalString = (time, expectedType) => {\n\ttry {\n\t\tconst validationResult = parseHumanReadableIntervalString(time);\n\t\tconst actualType = validationResult.type;\n\t\tconst negative = validationResult.interval.negative;\n\t\tif (actualType === expectedType || expectedType === \"DATE_OR_TIME\") return {\n\t\t\tvalid: true,\n\t\t\ttype: actualType,\n\t\t\tnegative\n\t\t};\n\t\telse return { valid: false };\n\t} catch (_e) {\n\t\treturn { valid: false };\n\t}\n};\n/**\n* Convert an ISO duration OR period string to an Interval object. So for example,\n* \"P1Y2M3W4D\" is fine, as is \"PT1H2M3.456S\". However, \"P1Y2M3W4D1H2M3.456S\" is not, since\n* it's a mix of both. We're more forgiving than the ISO standard, so we allow for missing parts.\n* Also, the string is allowed to be negative, so \"-P1Y2M3W4D\" is also valid.\n*\n* The string is required to have at least some content, so the strings \"\", \"P\", and \"PT\" are\n* considered invalid (also if they start with a -).\n*\n* @param isoString The ISO duration or period string.\n*/\nvar parseISOIntervalString = (isoString) => {\n\tisoString = isoString?.trim();\n\tif ([\n\t\t\"\",\n\t\t\"P\",\n\t\t\"PT\",\n\t\t\"-\",\n\t\t\"-P\",\n\t\t\"-PT\"\n\t].includes(isoString)) throw new Error(\"Empty ISO duration\");\n\tconst periodRegex = /^-?P(?:(\\d+)Y)?(?:(\\d+)M)?(?:(\\d+)W)?(?:(\\d+)D)?$/;\n\tconst durationRegex = /^-?PT(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+)(?:[,.](\\d{1,3}))?S)?$/;\n\tconst matchPeriod = periodRegex.exec(isoString);\n\tconst matchDuration = durationRegex.exec(isoString);\n\tif (matchPeriod) return {\n\t\ttype: \"DATE\",\n\t\tinterval: extractPeriodFromRegexMatch(isoString.startsWith(\"-\"), matchPeriod)\n\t};\n\telse if (matchDuration) return {\n\t\ttype: \"TIME\",\n\t\tinterval: extractDurationFromRegexMatch(isoString.startsWith(\"-\"), matchDuration)\n\t};\n\telse throw new Error(`Invalid ISO duration: ${isoString}`);\n};\n/**\n* Check if the given string is a valid duration or period ISO string. The type parameter\n* specifies whether the string should be a date, time, or either.\n*\n* @param isoString the string to check\n* @param type the type of the string - either \"DATE\", \"TIME\", or \"ANY\"\n*/\nvar isValidISOIntervalString = (isoString, type) => {\n\ttry {\n\t\tconst validationResult = parseISOIntervalString(isoString);\n\t\tconst actualType = validationResult.type;\n\t\tconst negative = validationResult.interval.negative;\n\t\tif (actualType === type || type === \"DATE_OR_TIME\") return {\n\t\t\tvalid: true,\n\t\t\ttype: actualType,\n\t\t\tnegative\n\t\t};\n\t\telse return { valid: false };\n\t} catch (_e) {\n\t\treturn { valid: false };\n\t}\n};\n/**\n* Try to convert an interval string to an Interval object. The string can be either an ISO\n* duration/period string or a human readable string. If the string is not valid, an error is\n* thrown.\n*\n* @param time the time string, either ISO or human readable\n*/\nvar parseGenericIntervalString = (time) => {\n\tconst validISO = isValidISOIntervalString(time, \"DATE_OR_TIME\");\n\tconst validHumanReadable = isValidHumanReadableIntervalString(time, \"DATE_OR_TIME\");\n\tif (validISO.valid) return parseISOIntervalString(time);\n\telse if (validHumanReadable.valid) return parseHumanReadableIntervalString(time);\n\telse throw new Error(`Invalid interval string: ${time}`);\n};\n/**\n* Check if the given string is a valid interval string, either human readable or ISO. The type parameter\n* specifies whether the string should be a period, duration, or either.\n*\n* @param time the time string to check\n* @param type the type of the string - either \"DATE\", \"TIME\", or \"ANY\"\n*/\nvar isValidIntervalString = (time, type) => {\n\tconst validISO = isValidISOIntervalString(time, type);\n\tconst validHumanReadable = isValidHumanReadableIntervalString(time, type);\n\tif (validISO.valid) return validISO;\n\telse if (validHumanReadable.valid) return validHumanReadable;\n\telse return { valid: false };\n};\n//#endregion\n//#region src/numIntegerDigits.ts\n/**\n* Count the number of integer digits for a given number.\n*\n* @param input number.\n* @returns number of integer digits x has. 1234 = 4 but 1234.44 is also 4.\n*/\nvar numIntegerDigits_default = (input) => Math.max(Math.floor(Math.log10(Math.abs(input))), 0) + 1;\n//#endregion\n//#region src/promise/createAbortablePromise.ts\nvar AbortError = class extends Error {};\n/**\n* Helper to create an abortable promise. Returns an AbortController and a Function\n* that you can pass your async handler to. Whenever the AbortController signal is\n* aborted then the async handler's promise will reject with an AbortError\n*\n* Example:\n* ```\n* import { abortUtils } from \"@knime/utils\"\n* const myFetchCall = async (params...) => {...};\n*\n* try {\n* const { runAbortablePromise, abortController } = createAbortablePromise(() =>\n* myFetchCall(params...),\n* );\n* } catch (e) {\n* if (e instanceof abortUtils.AbortError) {\n* console.info('ignore due to abort');\n* return;\n* }\n* }\n*\n* // somewhere else (while request is in-flight)\n* abortController.abort(new abortUtils.AbortError('reason here'))\n* ```\n*/\nvar createAbortablePromise = () => {\n\tconst abortController = new AbortController();\n\tconst runAbortablePromise = (request) => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst abortListener = ({ target }) => {\n\t\t\t\tabortController.signal.removeEventListener(\"abort\", abortListener);\n\t\t\t\tconst reason = target.reason;\n\t\t\t\treject(reason instanceof AbortError ? reason : new AbortError(reason));\n\t\t\t};\n\t\t\trequest().then(resolve).catch((error) => {\n\t\t\t\tif (error instanceof AbortError) return;\n\t\t\t\treject(error);\n\t\t\t});\n\t\t\tabortController.signal.addEventListener(\"abort\", abortListener);\n\t\t});\n\t};\n\treturn {\n\t\tabortController,\n\t\trunAbortablePromise\n\t};\n};\n//#endregion\n//#region src/promise/createUnwrappedPromise.ts\nvar createUnwrappedPromise = () => {\n\tlet resolve = () => {};\n\tlet reject = () => {};\n\tconst promise = new Promise((res, rej) => {\n\t\tresolve = res;\n\t\treject = rej;\n\t});\n\treturn {\n\t\tresolve,\n\t\treject,\n\t\tpromise\n\t};\n};\n//#endregion\n//#region src/sleep.ts\n/**\n* Returns promise that resolves after ms.\n*/\nfunction sleep(ms) {\n\treturn new Promise((resolve) => setTimeout(resolve, ms));\n}\n/**\n* Helper to add retry capability to an async function\n* @param fn async function\n* @param retryCount max number of retries. defaults to 5\n* @param retryDelayMS delay in-between retries in millisecs. defaults to 0\n* @param excludeError predicate fn to exclude specific errors from causing a retry\n*/\nasync function retryPromise({ fn, retryCount = 5, retryDelayMS = 0, excludeError }) {\n\ttry {\n\t\treturn await fn();\n\t} catch (error) {\n\t\tif (excludeError?.(error)) throw error;\n\t\tif (retryCount > 0) {\n\t\t\tawait sleep(retryDelayMS);\n\t\t\treturn await retryPromise({\n\t\t\t\tfn,\n\t\t\t\tretryCount: retryCount - 1,\n\t\t\t\tretryDelayMS,\n\t\t\t\texcludeError\n\t\t\t});\n\t\t}\n\t\tthrow error;\n\t}\n}\n//#endregion\n//#region src/promise/index.ts\nvar promise_exports = /* @__PURE__ */ __exportAll({\n\tAbortError: () => AbortError,\n\tDEFAULT_RETRY_COUNT: () => 5,\n\tDEFAULT_RETRY_DELAY_MS: () => 0,\n\tcreateAbortablePromise: () => createAbortablePromise,\n\tcreateUnwrappedPromise: () => createUnwrappedPromise,\n\tretryPromise: () => retryPromise\n});\n//#endregion\n//#region src/sanitization.ts\nvar ALLOWED_TAGS = [\n\t\"p\",\n\t\"div\",\n\t\"h1\",\n\t\"h2\",\n\t\"h3\",\n\t\"h4\",\n\t\"h5\",\n\t\"h6\",\n\t\"ul\",\n\t\"ol\",\n\t\"li\",\n\t\"blockquote\",\n\t\"b\",\n\t\"i\",\n\t\"s\",\n\t\"u\",\n\t\"sup\",\n\t\"sub\",\n\t\"ins\",\n\t\"del\",\n\t\"strong\",\n\t\"strike\",\n\t\"tt\",\n\t\"code\",\n\t\"big\",\n\t\"small\",\n\t\"br\",\n\t\"span\",\n\t\"em\"\n];\n/**\n* Sanitizes Raw HTML and only allow specific tags to be used, as per OWASP standards.\n* @param rawHTML\n* @param options.allowStyleAttribute - Allow the style attribute on elements\n* @param options.allowHyperlinks - Allow anchor tags with href attribute\n* @returns sanitized html\n*/\nvar sanitizeHTML = (rawHTML, options = {\n\tallowStyleAttribute: false,\n\tallowHyperlinks: false\n}) => {\n\tconst { allowStyleAttribute, allowHyperlinks } = options;\n\tconst ALLOWED_ATTR = [...allowStyleAttribute ? [\"style\"] : [], ...allowHyperlinks ? [\"href\"] : []];\n\tconst allowedTags = allowHyperlinks ? [...ALLOWED_TAGS, \"a\"] : ALLOWED_TAGS;\n\treturn DomPurify.sanitize(rawHTML, {\n\t\tALLOWED_TAGS: allowedTags,\n\t\tALLOWED_ATTR\n\t});\n};\n/**\n* Removes any HTML tag from the input string. Keeps HTML entities\n* (e.g &nbsp; because these can be considered plain text)\n* @param rawHTML\n* @returns plain text\n*/\nvar stripHTML = (rawHTML) => {\n\treturn DomPurify.sanitize(rawHTML, {\n\t\tALLOWED_TAGS: [],\n\t\tALLOWED_ATTR: []\n\t});\n};\nvar sanitization = {\n\tsanitizeHTML,\n\tstripHTML\n};\n//#endregion\n//#region src/truncateString.ts\nvar defaultMaxLength = 160;\nvar truncateString_default = (string = \"\", maxLength = defaultMaxLength) => {\n\tconst dots = string.length > maxLength ? \"…\" : \"\";\n\treturn `${string.substring(0, maxLength - 1)}${dots}`;\n};\n//#endregion\n//#region src/fileExtensions.ts\n/**\n* Gets the file extension\n* @param nameOrPath can take a full file name (e.g \"file.txt\") or a path to a file\n* (e.g \"file://path/to/file.txt\" OR \"/path/to/file.txt\")\n* @returns just the file extension (e.g \"txt\")\n*/\nvar getFileExtension = (nameOrPath) => {\n\tconst basename = nameOrPath.split(/[\\\\/]/).pop() ?? \"\";\n\tconst parts = basename.split(\".\");\n\tif (basename === \"\" || parts.length === 1) return \"\";\n\treturn parts.at(-1) ?? \"\";\n};\n/**\n* Metadata for .knar files, which corresponds to exported KNIME Workflow Groups\n* or Components\n*/\nvar KNAR = Object.freeze({\n\textension: \"knar\",\n\tmimeType: \"application/vnd.knime.workflow-group+zip\",\n\tmatches(file) {\n\t\treturn getFileExtension(file.name) === this.extension;\n\t}\n});\n/**\n* Metadata for .knwf files, which corresponds to exported KNIME Workflows\n*/\nvar KNWF = Object.freeze({\n\textension: \"knwf\",\n\tmimeType: \"application/vnd.knime.workflow+zip\",\n\tmatches(file) {\n\t\treturn getFileExtension(file.name) === this.extension;\n\t},\n\t/**\n\t* Gets the name of a .knwf file without the extension. If the file is not\n\t* matched as a .knwf file then this function will return the default value,\n\t* which is empty string (\"\") if param is not provided\n\t*/\n\tgetNameOrDefault(file, defaultValue = \"\") {\n\t\tif (!this.matches(file)) return defaultValue;\n\t\treturn file.name.replace(`.${this.extension}`, \"\");\n\t}\n});\nvar knimeFileFormats = {\n\tKNAR,\n\tKNWF\n};\n/**\n* Gets the mime type from a given file. Defaults to `application/octet-stream`\n* if mimeType cannot be detected\n* @param file File\n* @returns mimeType\n*/\nvar getFileMimeType = (file) => {\n\tconst DEFAULT_MIMETYPE = \"application/octet-stream\";\n\tif (!getFileExtension(file.name)) return DEFAULT_MIMETYPE;\n\tif (KNWF.matches(file)) return KNWF.mimeType;\n\tif (KNAR.matches(file)) return KNAR.mimeType;\n\tif (!file.type) return DEFAULT_MIMETYPE;\n\treturn file.type;\n};\n//#endregion\n//#region src/hotkeys/enums.ts\n/**\n* Platforms that influence how modifier keys are rendered. macOS substitutes\n* dedicated glyphs (`⌘`, `⌥`, `⇧`, …), every other platform uses the textual\n* rendering (`Ctrl`, `Alt`, `Shift`, …).\n*/\nvar hotkeyPlatform = {\n\tMAC_OS: \"macOS\",\n\tOTHER: \"other\"\n};\nObject.values(hotkeyPlatform);\n//#endregion\n//#region src/platform/navigator.ts\nvar navigator_exports = /* @__PURE__ */ __exportAll({\n\tisMac: () => isMac,\n\tisWindows: () => isWindows\n});\n/**\n*\n* @returns true if the platform of the user is Mac\n*/\nvar isMac = () => navigator?.userAgent?.toLowerCase()?.includes(\"mac\");\n/**\n*\n* @returns true if the platform of the user is Windows\n*/\nvar isWindows = () => navigator?.userAgent?.toLowerCase()?.includes(\"windows\");\n//#endregion\n//#region src/hotkeys/format.ts\nvar globalKeyMap = {\n\tArrowUp: \"↑\",\n\tArrowDown: \"↓\",\n\tArrowLeft: \"←\",\n\tArrowRight: \"→\",\n\tEnter: \"↵\",\n\t\" \": \"Space\",\n\tCtrlOrCmd: \"Ctrl\"\n};\nvar MacOSkeyMap = {\n\tShift: \"⇧\",\n\tDelete: \"⌫\",\n\tCtrlOrCmd: \"⌘\",\n\tCtrl: \"⌃\",\n\tAlt: \"⌥\",\n\tEnter: \"↩\"\n};\n/**\n* Returns a string representation of a single hotkey. Replaces some special key names with symbols.\n*\n* By default the platform is auto-detected from the user agent via `isMac()`.\n* Pass `platform` to force a specific platform's glyphs — useful for SSR,\n* tests, or rendering multiple platforms on the same page.\n*/\nvar formatHotkey = (hotkey, platform) => {\n\t/**\n\t* Returns the symbol corresponding to the `key` based on the given\n\t* `formatMap`. Otherwise, if not found, returns the same `key` value given\n\t*/\n\tconst mapSymbols = (formatMap) => (key) => formatMap[key] ?? key;\n\t/**\n\t* Pipe function implementation. Receives a list of functions to execute in order\n\t* and will pipe the parameter passed at the end to each function returning the final output\n\t*/\n\tconst pipe = (...fns) => fns.reduce((f, g) => (arg) => g(f(arg)), (arg) => arg);\n\tconst macKeyFormatter = pipe(mapSymbols(MacOSkeyMap), mapSymbols(globalKeyMap));\n\tconst generalKeyFormatter = mapSymbols(globalKeyMap);\n\treturn (platform === void 0 ? isMac() : platform === hotkeyPlatform.MAC_OS) ? macKeyFormatter(hotkey) : generalKeyFormatter(hotkey);\n};\nvar getDefaultSeparator = () => isMac() ? \" \" : \"+\";\n/**\n* Returns a string representation of a list of hotkeys. Replaces some special key names with symbols\n*/\nvar formatHotkeys = (hotkeys, getSeparator = getDefaultSeparator) => hotkeys.map((hotkey) => formatHotkey(hotkey)).join(getSeparator());\n/**\n* Appends a formatted hotkey shortcut to the given string. Useful for tooltips\n*/\nvar textWithHotkeys = (text, hotkeys) => {\n\treturn `${text} – ${formatHotkeys(hotkeys)}`;\n};\n//#endregion\n//#region src/hotkeys/match.ts\n/**\n* Checks whether a pressed `Digit` key falls within a numeric hotkey range such\n* as `1-9`.\n* @param keyCode - The `KeyboardEvent.code` to check (e.g. `Digit5`).\n* @param hotkey - The hotkey token, expected to be a single-digit range like `1-9`.\n* @returns True if the pressed digit lies within the inclusive range.\n*/\nvar isDigitKeyInRange = (keyCode, hotkey) => {\n\tif (hotkey.length !== 3 || !keyCode?.startsWith(\"Digit\")) return false;\n\tconst keyNumber = Number(keyCode.slice(5));\n\tconst [lower, upper] = hotkey.split(\"-\");\n\treturn Boolean(lower) && Boolean(upper) && Number.parseInt(lower, 10) <= keyNumber && keyNumber <= Number.parseInt(upper, 10);\n};\n/**\n* Checks whether a keyboard event matches a hotkey definition. The last token is\n* treated as the character; any preceding tokens are modifiers. The special\n* `CtrlOrCmd` modifier resolves to the platform's primary modifier (Meta/`⌘` on\n* macOS, Ctrl elsewhere).\n* @param event - The keyboard event to check.\n* @param hotkeys - The ordered hotkey tokens (modifiers followed by the character).\n* @returns True if the event matches the given hotkey, otherwise false.\n*/\nvar match = (event, hotkeys) => {\n\tconst { key, code, metaKey, ctrlKey, shiftKey, altKey } = event;\n\tconst modifiers = hotkeys.slice();\n\tconst character = modifiers.pop() ?? \"\";\n\tconst ctrlOrMeta = isMac() ? \"Meta\" : \"Ctrl\";\n\tconst platformModifiers = new Set(modifiers.map((modifier) => modifier === \"CtrlOrCmd\" ? ctrlOrMeta : modifier));\n\tconst metaMatches = Boolean(metaKey) === platformModifiers.has(\"Meta\");\n\tconst ctrlMatches = Boolean(ctrlKey) === platformModifiers.has(\"Ctrl\");\n\tconst shiftMatches = Boolean(shiftKey) === platformModifiers.has(\"Shift\");\n\tconst altMatches = Boolean(altKey) === platformModifiers.has(\"Alt\");\n\tconst keysMatch = key.toUpperCase() === character.toUpperCase() || character.includes(\"-\") && isDigitKeyInRange(code, character) || isMac() && character === \"Delete\" && key === \"Backspace\";\n\treturn metaMatches && ctrlMatches && shiftMatches && altMatches && keysMatch;\n};\n//#endregion\n//#region src/hotkeys/modifiers.ts\n/**\n* Checks if any modifier key (Ctrl, Meta, Alt, or Shift) is pressed.\n* @param event - The keyboard event to check.\n* @returns True if a modifier key is pressed, otherwise false.\n*/\nvar isModifierKeyPressed = (event) => {\n\treturn event.ctrlKey || event.metaKey || event.altKey || event.shiftKey;\n};\n/**\n* Checks if a specific key (or keys) were pressed without any modifier keys.\n* @param event - The keyboard event to check.\n* @param keys - The key or keys to check for.\n* @returns True if the specified key(s) were pressed without modifiers, otherwise false.\n*/\nvar isKeyWithoutModifiers = (event, keys) => {\n\treturn (Array.isArray(keys) ? keys : [keys]).includes(event.key) && !isModifierKeyPressed(event);\n};\n/**\n* Returns the name of the primary modifier key for the current platform.\n*/\nvar getMetaOrCtrlKey = () => {\n\treturn isMac() ? \"metaKey\" : \"ctrlKey\";\n};\n//#endregion\n//#region src/hotkeys/index.ts\n/**\n* Grouped keyboard-shortcut helpers, exposed as a single namespace for\n* ergonomic access (e.g. `hotkeys.formatHotkey`).\n*/\nvar hotkeys = {\n\tformatHotkeys,\n\tformatHotkey,\n\tgetDefaultSeparator,\n\thotkeyPlatform,\n\ttextWithHotkeys,\n\tmatch\n};\n//#endregion\nexport { capitalize, caseFormatter, debounce, filters, formatDateString, formatDateTimeString, formatFileSize, formatLocalDateTimeString, formatTimeString, getDeepActiveElement, getFileExtension, getFileMimeType, localTimezone_default as getLocalTimeZone, getMetaOrCtrlKey, getWrappedAroundIndex_default as getWrappedAroundIndex, hotkeys, intervalUtils_exports as intervalUtils, isAfterMaxDate, isBeforeMinDate, isKeyWithoutModifiers, isModifierKeyPressed, knimeFileFormats, match, navigator_exports as navigatorUtils, numIntegerDigits_default as numIntegerDigits, promise_exports as promise, sanitization, sleep, truncateString_default as truncateString, updateDate_default as updateDate, updateTime_default as updateTime };\n\n//# sourceMappingURL=index.js.map","export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20viewBox='0%200%2012%2012'%3e%3cpath%20d='M5.5%201.5h-3a1%201%200%200%200-1%201v7a1%201%200%200%200%201%201h7a1%201%200%200%200%201-1v-3m0-5L6%205.892M10.5%201.5v2.75m0-2.75H7.75'%20vector-effect='non-scaling-stroke'/%3e%3c/svg%3e\"","export const kdsCharacterCountDisplay = {\n NEVER: \"never\",\n ALWAYS: \"always\",\n AT_LIMIT: \"atLimit\",\n} as const;\n\nexport const kdsCharacterCountDisplays = Object.values(\n kdsCharacterCountDisplay,\n);\n","<script setup lang=\"ts\">\nimport { type Ref, computed, nextTick, ref, watch } from \"vue\";\n\nimport { KdsButton, KdsModal, KdsTextInput } from \"@knime/kds-components\";\n\ntype Props = {\n text: Ref<string>;\n url: Ref<string>;\n isActive: Ref<boolean>;\n isEdit: Ref<boolean>;\n urlValidator: (url: string) => boolean;\n};\n\nconst props = defineProps<Props>();\n\nconst inputRef = ref<HTMLInputElement | null>(null);\n\nconst editedText = ref(props.text.value);\nconst editedUrl = ref(props.url.value);\n\nwatch(\n () => props.isActive.value,\n async (isOpen: boolean) => {\n if (!isOpen) {\n return;\n }\n editedText.value = props.text.value;\n editedUrl.value = props.url.value;\n\n // Wait a tick as KdsModal internally also waits for the DOM to update before calling showModal()\n await nextTick();\n\n // Focus first input field, requestAnimationFrame ensures the browser has un-hidden the modal\n requestAnimationFrame(() => {\n inputRef.value?.focus();\n });\n },\n);\n\nconst emit = defineEmits<{\n addLink: [text: string, url: string];\n removeLink: [];\n cancelAddLink: [];\n}>();\n\nconst closeModal = () => {\n emit(\"cancelAddLink\");\n};\n\nconst onSubmit = () => {\n emit(\"addLink\", editedText.value, editedUrl.value);\n};\n\nconst validateUrl = () => {\n const validScheme = props.urlValidator(editedUrl.value);\n\n return !editedUrl.value || validScheme;\n};\n\nconst isValid = computed(() => {\n const textChanged = editedText.value !== props.text.value;\n const urlChanged = editedUrl.value !== props.url.value;\n const urlNotEmpty = editedUrl.value !== \"\";\n\n return (textChanged || urlChanged) && validateUrl() && urlNotEmpty;\n});\n\nconst onkeyup = (keyupEvent: KeyboardEvent) => {\n if (keyupEvent.key === \"Enter\" && isValid.value) {\n onSubmit();\n }\n};\n</script>\n\n<template>\n <KdsModal\n :active=\"isActive.value\"\n :headline=\"isEdit.value ? 'Edit link' : 'Insert link'\"\n class=\"modal\"\n @close=\"closeModal\"\n >\n <template #body>\n <KdsTextInput\n ref=\"inputRef\"\n v-model=\"editedText\"\n label=\"Link text\"\n type=\"text\"\n @keyup=\"onkeyup\"\n />\n\n <KdsTextInput\n v-model=\"editedUrl\"\n label=\"URL\"\n :sub-text=\"\n !validateUrl() ? 'Enter a valid URL (e.g. https://example.com)' : ''\n \"\n :error=\"!validateUrl()\"\n :preserve-sub-text-space=\"true\"\n @keyup=\"onkeyup\"\n />\n </template>\n\n <template #footer>\n <div class=\"modal-footer\" :class=\"{ 'spread-buttons': isEdit.value }\">\n <KdsButton\n :variant=\"isEdit.value ? 'transparent' : 'outlined'\"\n size=\"small\"\n label=\"Cancel\"\n @click=\"closeModal\"\n />\n <div class=\"controls-apply-group\">\n <KdsButton\n v-if=\"isEdit.value\"\n variant=\"outlined\"\n size=\"small\"\n label=\"Remove URL\"\n @click=\"emit('removeLink')\"\n />\n <KdsButton\n variant=\"filled\"\n size=\"small\"\n :label=\"isEdit.value ? 'Apply' : 'Insert link'\"\n :disabled=\"!isValid\"\n @click=\"onSubmit\"\n />\n </div>\n </div>\n </template>\n </KdsModal>\n</template>\n\n<style scoped>\n.modal {\n --modal-width: var(--kds-dimension-component-width-32x);\n}\n\n.modal-footer {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n justify-content: flex-end;\n width: 100%;\n\n &.spread-buttons {\n justify-content: space-between;\n }\n}\n\n.controls-apply-group {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { type Ref, computed, nextTick, ref, watch } from \"vue\";\n\nimport { KdsButton, KdsModal, KdsTextInput } from \"@knime/kds-components\";\n\ntype Props = {\n text: Ref<string>;\n url: Ref<string>;\n isActive: Ref<boolean>;\n isEdit: Ref<boolean>;\n urlValidator: (url: string) => boolean;\n};\n\nconst props = defineProps<Props>();\n\nconst inputRef = ref<HTMLInputElement | null>(null);\n\nconst editedText = ref(props.text.value);\nconst editedUrl = ref(props.url.value);\n\nwatch(\n () => props.isActive.value,\n async (isOpen: boolean) => {\n if (!isOpen) {\n return;\n }\n editedText.value = props.text.value;\n editedUrl.value = props.url.value;\n\n // Wait a tick as KdsModal internally also waits for the DOM to update before calling showModal()\n await nextTick();\n\n // Focus first input field, requestAnimationFrame ensures the browser has un-hidden the modal\n requestAnimationFrame(() => {\n inputRef.value?.focus();\n });\n },\n);\n\nconst emit = defineEmits<{\n addLink: [text: string, url: string];\n removeLink: [];\n cancelAddLink: [];\n}>();\n\nconst closeModal = () => {\n emit(\"cancelAddLink\");\n};\n\nconst onSubmit = () => {\n emit(\"addLink\", editedText.value, editedUrl.value);\n};\n\nconst validateUrl = () => {\n const validScheme = props.urlValidator(editedUrl.value);\n\n return !editedUrl.value || validScheme;\n};\n\nconst isValid = computed(() => {\n const textChanged = editedText.value !== props.text.value;\n const urlChanged = editedUrl.value !== props.url.value;\n const urlNotEmpty = editedUrl.value !== \"\";\n\n return (textChanged || urlChanged) && validateUrl() && urlNotEmpty;\n});\n\nconst onkeyup = (keyupEvent: KeyboardEvent) => {\n if (keyupEvent.key === \"Enter\" && isValid.value) {\n onSubmit();\n }\n};\n</script>\n\n<template>\n <KdsModal\n :active=\"isActive.value\"\n :headline=\"isEdit.value ? 'Edit link' : 'Insert link'\"\n class=\"modal\"\n @close=\"closeModal\"\n >\n <template #body>\n <KdsTextInput\n ref=\"inputRef\"\n v-model=\"editedText\"\n label=\"Link text\"\n type=\"text\"\n @keyup=\"onkeyup\"\n />\n\n <KdsTextInput\n v-model=\"editedUrl\"\n label=\"URL\"\n :sub-text=\"\n !validateUrl() ? 'Enter a valid URL (e.g. https://example.com)' : ''\n \"\n :error=\"!validateUrl()\"\n :preserve-sub-text-space=\"true\"\n @keyup=\"onkeyup\"\n />\n </template>\n\n <template #footer>\n <div class=\"modal-footer\" :class=\"{ 'spread-buttons': isEdit.value }\">\n <KdsButton\n :variant=\"isEdit.value ? 'transparent' : 'outlined'\"\n size=\"small\"\n label=\"Cancel\"\n @click=\"closeModal\"\n />\n <div class=\"controls-apply-group\">\n <KdsButton\n v-if=\"isEdit.value\"\n variant=\"outlined\"\n size=\"small\"\n label=\"Remove URL\"\n @click=\"emit('removeLink')\"\n />\n <KdsButton\n variant=\"filled\"\n size=\"small\"\n :label=\"isEdit.value ? 'Apply' : 'Insert link'\"\n :disabled=\"!isValid\"\n @click=\"onSubmit\"\n />\n </div>\n </div>\n </template>\n </KdsModal>\n</template>\n\n<style scoped>\n.modal {\n --modal-width: var(--kds-dimension-component-width-32x);\n}\n\n.modal-footer {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n justify-content: flex-end;\n width: 100%;\n\n &.spread-buttons {\n justify-content: space-between;\n }\n}\n\n.controls-apply-group {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n}\n</style>\n","import type { Level } from \"@tiptap/extension-heading\";\nimport type { Editor } from \"@tiptap/vue-3\";\n\nimport type {\n EditorToolSecondaryItem,\n EditorToolSecondaryItemChild,\n} from \"../../toolbar/types\";\n\nconst clearHeading = (editor: Editor) => {\n const maxLevel = 6;\n for (let i = 1; i <= maxLevel; i++) {\n if (editor.isActive(\"heading\", { level: i })) {\n editor\n .chain()\n .focus()\n .toggleHeading({ level: i as Level })\n .run();\n break;\n }\n }\n};\n\nconst getHeadingOptionChild = (level: Level, getEditor: () => Editor) =>\n ({\n id: `${level}`,\n text: `Heading ${level}`,\n hotkey: [\"CtrlOrCmd\", \"Alt\", `${level}`],\n active: () => getEditor().isActive(\"heading\", { level }),\n handler: () => {\n const editor = getEditor();\n editor.chain().focus().toggleHeading({ level }).run();\n },\n }) satisfies EditorToolSecondaryItemChild;\n\nexport const getParagraphTextStyleTool = (\n getEditor: () => Editor,\n): EditorToolSecondaryItem => {\n return {\n id: \"paragraphTextStyle\",\n type: \"secondary\",\n icon: \"textstyles\",\n text: \"Text style\",\n children: [\n {\n id: \"standard\",\n text: \"Standard\",\n hotkey: [\"CtrlOrCmd\", \"Alt\", \"0\"],\n handler: () => {\n const editor = getEditor();\n clearHeading(editor);\n editor.chain().focus().unsetSmallText().run();\n },\n },\n {\n id: \"small\",\n text: \"Small text\",\n hotkey: [\"CtrlOrCmd\", \"Alt\", \"−\"], // this is a wider minus character for aesthetic reasons\n active: () => getEditor().isActive({ smallText: true }),\n handler: () => {\n const editor = getEditor();\n clearHeading(editor);\n editor.chain().focus().setSmallText().run();\n },\n },\n ...Array.from({ length: 6 }, (_, i) =>\n getHeadingOptionChild((i + 1) as Level, getEditor),\n ),\n ],\n };\n};\n","import { computed, onMounted, onUnmounted, ref } from \"vue\";\nimport type { Editor } from \"@tiptap/vue-3\";\n\nimport { getMetaOrCtrlKey } from \"@knime/utils\";\n\nimport type { KdsLinkToolOptions } from \"../utils/custom-link\";\n\nexport const useLinkTool = ({\n editor,\n isRegistered,\n linkToolOptions,\n}: {\n editor: Editor;\n isRegistered: boolean;\n linkToolOptions: KdsLinkToolOptions;\n}) => {\n if (!isRegistered) {\n return null;\n }\n\n const isActive = ref(false);\n const text = ref(\"\");\n const url = ref(\"\");\n const isEdit = computed(() => url.value !== \"\");\n const isReplacingText = ref(false);\n\n const onLinkToolClick = () => {\n const { view, state } = editor;\n const { from, to } = view.state.selection;\n\n const currentLink = editor.getAttributes(\"link\").href;\n url.value = currentLink || \"\";\n\n if (currentLink) {\n const hasSelection = from !== to;\n if (hasSelection) {\n // manually update the cursor position to get the entire link text\n const newCursorPosition = from + Math.floor((to - from) / 2);\n editor.chain().focus().setTextSelection(newCursorPosition).run();\n }\n\n const textBefore =\n view.state.selection.$from.nodeBefore?.textContent ?? \"\";\n const textAfter = view.state.selection.$to.nodeAfter?.textContent ?? \"\";\n\n text.value = textBefore + textAfter;\n } else {\n text.value = state.doc.textBetween(from, to, \"\");\n }\n\n isReplacingText.value = Boolean(currentLink || text.value);\n isActive.value = true;\n };\n\n const onRemoveLink = () => {\n editor.chain().focus().extendMarkRange(\"link\").unsetLink().run();\n\n isActive.value = false;\n isReplacingText.value = false;\n };\n\n const addCustomLink = ({\n isEditing,\n url,\n urlText,\n text,\n }: {\n isEditing: boolean;\n url: string;\n urlText: string;\n text: string;\n }) => {\n if (isEditing) {\n editor\n .chain()\n .focus()\n .setLink({ href: url })\n .command(({ tr }) => {\n tr.insertText(text || urlText);\n return true;\n })\n .run();\n } else {\n // TODO replace this rather complicated way to add a link once the tiptap bug is fixed\n const { view } = editor;\n const { from: startIndex } = view.state.selection;\n\n // escape link with space when creating a new link\n editor\n .chain()\n .focus()\n .insertContent([{ type: \"text\", text: \" \" }])\n .run();\n editor\n .chain()\n .focus()\n .insertContentAt(startIndex, [{ type: \"text\", text: text || urlText }])\n .run();\n\n const { from: endIndex } = view.state.selection;\n\n editor.commands.setTextSelection({\n from: startIndex,\n to: endIndex,\n });\n\n editor.chain().focus().setLink({ href: url }).run();\n }\n };\n\n const onAddLink = (text: string, urlText: string) => {\n editor.chain().focus().extendMarkRange(\"link\").unsetLink().run();\n\n if (urlText) {\n const url = linkToolOptions.sanitizeUrlText?.(urlText) ?? urlText;\n\n addCustomLink({\n isEditing: isReplacingText.value,\n urlText,\n url,\n text,\n });\n }\n\n isActive.value = false;\n isReplacingText.value = false;\n };\n\n const onCancelAddLink = () => {\n isActive.value = false;\n isReplacingText.value = false;\n };\n\n /**\n * Handle custom hotkeys for link tool that are not supported by tiptap.\n */\n const onKeyDown = (event: KeyboardEvent) => {\n if (!editor?.isFocused) {\n return;\n }\n const ctrlPressed = event[getMetaOrCtrlKey()];\n if (ctrlPressed && event.key === \"k\") {\n event.preventDefault();\n onLinkToolClick();\n }\n };\n onMounted(() => {\n window.addEventListener(\"keydown\", onKeyDown);\n });\n\n onUnmounted(() => {\n window.removeEventListener(\"keydown\", onKeyDown);\n });\n\n return {\n onLinkToolClick,\n props: {\n url,\n text,\n isActive,\n isEdit,\n urlValidator: linkToolOptions.urlValidator,\n },\n events: {\n addLink: onAddLink,\n removeLink: onRemoveLink,\n cancelAddLink: onCancelAddLink,\n },\n };\n};\n","<script setup lang=\"ts\">\nimport type { Editor } from \"@tiptap/vue-3\";\n\nimport type { KdsBaseExtensionsConfig } from \"../types\";\nimport type { KdsLinkToolOptions } from \"../utils/custom-link\";\nimport { getParagraphTextStyleTool } from \"../utils/paragraphTextStyle\";\n\nimport type { EditorToolItem, EditorTools } from \"./types\";\nimport { useLinkTool } from \"./useLinkTool\";\n\ntype Props = {\n editor: Editor;\n baseExtensions: KdsBaseExtensionsConfig | { all: true };\n linkToolOptions: KdsLinkToolOptions;\n};\n\nconst props = defineProps<Props>();\n\nconst registerTool = (\n toolName: keyof KdsBaseExtensionsConfig,\n tool: EditorToolItem,\n) => {\n if (\"all\" in props.baseExtensions) {\n return [tool];\n }\n\n return props.baseExtensions[toolName] ? [tool] : [];\n};\n\nconst isToolRegistered = (toolName: keyof KdsBaseExtensionsConfig) => {\n if (\"all\" in props.baseExtensions) {\n return true;\n }\n\n return Boolean(props.baseExtensions[toolName]);\n};\n\nconst isListActive = () =>\n props.editor.isActive(\"orderedList\") || props.editor.isActive(\"bulletList\");\n\nconst linkTool = useLinkTool({\n editor: props.editor,\n isRegistered: isToolRegistered(\"link\"),\n linkToolOptions: props.linkToolOptions,\n});\n\nconst editorTools: EditorTools = [\n ...registerTool(\"bold\", {\n id: \"bold\",\n type: \"primary\",\n text: \"Bold\",\n hotkey: [\"CtrlOrCmd\", \"B\"],\n icon: \"bold\",\n active: () => props.editor.isActive(\"bold\"),\n handler: () => props.editor.chain().focus().toggleBold().run(),\n }),\n\n ...registerTool(\"italic\", {\n id: \"italic\",\n type: \"primary\",\n text: \"Italic\",\n icon: \"italic\",\n hotkey: [\"CtrlOrCmd\", \"I\"],\n active: () => props.editor.isActive(\"italic\"),\n handler: () => props.editor.chain().focus().toggleItalic().run(),\n }),\n\n ...registerTool(\"underline\", {\n id: \"underline\",\n type: \"primary\",\n text: \"Underline\",\n icon: \"underline\",\n hotkey: [\"CtrlOrCmd\", \"U\"],\n active: () => props.editor.isActive(\"underline\"),\n handler: () => props.editor.chain().focus().toggleUnderline().run(),\n }),\n\n ...registerTool(\"bulletList\", {\n id: \"bulletList\",\n type: \"primary\",\n text: \"Bullet list\",\n icon: \"list-bulletpoint\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"8\"],\n active: () => props.editor.isActive(\"bulletList\"),\n handler: () => {\n const commandChain = props.editor.chain().focus();\n if (isToolRegistered(\"textAlign\")) {\n commandChain.setTextAlign(\"left\");\n }\n\n commandChain.toggleBulletList().run();\n },\n }),\n\n ...registerTool(\"orderedList\", {\n id: \"orderedList\",\n type: \"primary\",\n text: \"Ordered list\",\n icon: \"list-number\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"7\"],\n active: () => props.editor.isActive(\"orderedList\"),\n handler: () => {\n const commandChain = props.editor.chain().focus();\n if (isToolRegistered(\"textAlign\")) {\n commandChain.setTextAlign(\"left\");\n }\n\n commandChain.toggleOrderedList().run();\n },\n }),\n\n ...registerTool(\"textAlign\", {\n id: \"align-left\",\n type: \"primary\",\n icon: \"left-aligned\",\n text: \"Align left\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"L\"],\n active: () =>\n !isListActive() && props.editor.isActive({ textAlign: \"left\" }),\n handler: () => props.editor.chain().focus().setTextAlign(\"left\").run(),\n disabled: () => isListActive(),\n }),\n\n ...registerTool(\"textAlign\", {\n id: \"align-center\",\n type: \"primary\",\n icon: \"center-aligned\",\n text: \"Align center\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"E\"],\n active: () =>\n !isListActive() && props.editor.isActive({ textAlign: \"center\" }),\n handler: () => props.editor.chain().focus().setTextAlign(\"center\").run(),\n disabled: () => isListActive(),\n }),\n\n ...registerTool(\"textAlign\", {\n id: \"align-right\",\n type: \"primary\",\n icon: \"right-aligned\",\n text: \"Align right\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"R\"],\n active: () =>\n !isListActive() && props.editor.isActive({ textAlign: \"right\" }),\n handler: () => props.editor.chain().focus().setTextAlign(\"right\").run(),\n disabled: () => isListActive(),\n }),\n\n ...registerTool(\"link\", {\n id: \"link\",\n type: \"primary\",\n icon: \"link\",\n text: \"Link\",\n hotkey: [\"CtrlOrCmd\", \"K\"],\n active: () => props.editor.isActive(\"link\"),\n handler: () => linkTool?.onLinkToolClick(),\n }),\n\n ...registerTool(\n \"paragraphTextStyle\",\n getParagraphTextStyleTool(() => props.editor),\n ),\n\n ...registerTool(\"blockquote\", {\n id: \"blockquote\",\n type: \"secondary\",\n icon: \"quote\",\n text: \"Blockquote\",\n active: () => props.editor.isActive(\"blockquote\"),\n handler: () => props.editor.chain().focus().toggleBlockquote().run(),\n }),\n\n ...registerTool(\"codeBlock\", {\n id: \"codeBlock\",\n type: \"secondary\",\n icon: \"code-block\",\n text: \"Code block\",\n hotkey: [\"CtrlOrCmd\", \"Alt\", \"C\"],\n active: () => props.editor.isActive(\"codeBlock\"),\n handler: () => props.editor.chain().focus().toggleCodeBlock().run(),\n }),\n\n ...registerTool(\"strike\", {\n id: \"strikethrough\",\n type: \"secondary\",\n icon: \"strikethrough\",\n text: \"Strikethrough\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"X\"],\n active: () => props.editor.isActive(\"strike\"),\n handler: () => props.editor.chain().focus().toggleStrike().run(),\n }),\n\n ...registerTool(\"horizontalRule\", {\n id: \"horizontalRule\",\n type: \"secondary\",\n icon: \"divider\",\n text: \"Divider\",\n active: () => false,\n handler: () => props.editor.chain().focus().setHorizontalRule().run(),\n }),\n];\n</script>\n\n<template>\n <slot :tools=\"editorTools\" />\n <slot :link-tool=\"linkTool\" name=\"linkModal\" />\n</template>\n","<script setup lang=\"ts\">\nimport type { Editor } from \"@tiptap/vue-3\";\n\nimport type { KdsBaseExtensionsConfig } from \"../types\";\nimport type { KdsLinkToolOptions } from \"../utils/custom-link\";\nimport { getParagraphTextStyleTool } from \"../utils/paragraphTextStyle\";\n\nimport type { EditorToolItem, EditorTools } from \"./types\";\nimport { useLinkTool } from \"./useLinkTool\";\n\ntype Props = {\n editor: Editor;\n baseExtensions: KdsBaseExtensionsConfig | { all: true };\n linkToolOptions: KdsLinkToolOptions;\n};\n\nconst props = defineProps<Props>();\n\nconst registerTool = (\n toolName: keyof KdsBaseExtensionsConfig,\n tool: EditorToolItem,\n) => {\n if (\"all\" in props.baseExtensions) {\n return [tool];\n }\n\n return props.baseExtensions[toolName] ? [tool] : [];\n};\n\nconst isToolRegistered = (toolName: keyof KdsBaseExtensionsConfig) => {\n if (\"all\" in props.baseExtensions) {\n return true;\n }\n\n return Boolean(props.baseExtensions[toolName]);\n};\n\nconst isListActive = () =>\n props.editor.isActive(\"orderedList\") || props.editor.isActive(\"bulletList\");\n\nconst linkTool = useLinkTool({\n editor: props.editor,\n isRegistered: isToolRegistered(\"link\"),\n linkToolOptions: props.linkToolOptions,\n});\n\nconst editorTools: EditorTools = [\n ...registerTool(\"bold\", {\n id: \"bold\",\n type: \"primary\",\n text: \"Bold\",\n hotkey: [\"CtrlOrCmd\", \"B\"],\n icon: \"bold\",\n active: () => props.editor.isActive(\"bold\"),\n handler: () => props.editor.chain().focus().toggleBold().run(),\n }),\n\n ...registerTool(\"italic\", {\n id: \"italic\",\n type: \"primary\",\n text: \"Italic\",\n icon: \"italic\",\n hotkey: [\"CtrlOrCmd\", \"I\"],\n active: () => props.editor.isActive(\"italic\"),\n handler: () => props.editor.chain().focus().toggleItalic().run(),\n }),\n\n ...registerTool(\"underline\", {\n id: \"underline\",\n type: \"primary\",\n text: \"Underline\",\n icon: \"underline\",\n hotkey: [\"CtrlOrCmd\", \"U\"],\n active: () => props.editor.isActive(\"underline\"),\n handler: () => props.editor.chain().focus().toggleUnderline().run(),\n }),\n\n ...registerTool(\"bulletList\", {\n id: \"bulletList\",\n type: \"primary\",\n text: \"Bullet list\",\n icon: \"list-bulletpoint\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"8\"],\n active: () => props.editor.isActive(\"bulletList\"),\n handler: () => {\n const commandChain = props.editor.chain().focus();\n if (isToolRegistered(\"textAlign\")) {\n commandChain.setTextAlign(\"left\");\n }\n\n commandChain.toggleBulletList().run();\n },\n }),\n\n ...registerTool(\"orderedList\", {\n id: \"orderedList\",\n type: \"primary\",\n text: \"Ordered list\",\n icon: \"list-number\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"7\"],\n active: () => props.editor.isActive(\"orderedList\"),\n handler: () => {\n const commandChain = props.editor.chain().focus();\n if (isToolRegistered(\"textAlign\")) {\n commandChain.setTextAlign(\"left\");\n }\n\n commandChain.toggleOrderedList().run();\n },\n }),\n\n ...registerTool(\"textAlign\", {\n id: \"align-left\",\n type: \"primary\",\n icon: \"left-aligned\",\n text: \"Align left\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"L\"],\n active: () =>\n !isListActive() && props.editor.isActive({ textAlign: \"left\" }),\n handler: () => props.editor.chain().focus().setTextAlign(\"left\").run(),\n disabled: () => isListActive(),\n }),\n\n ...registerTool(\"textAlign\", {\n id: \"align-center\",\n type: \"primary\",\n icon: \"center-aligned\",\n text: \"Align center\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"E\"],\n active: () =>\n !isListActive() && props.editor.isActive({ textAlign: \"center\" }),\n handler: () => props.editor.chain().focus().setTextAlign(\"center\").run(),\n disabled: () => isListActive(),\n }),\n\n ...registerTool(\"textAlign\", {\n id: \"align-right\",\n type: \"primary\",\n icon: \"right-aligned\",\n text: \"Align right\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"R\"],\n active: () =>\n !isListActive() && props.editor.isActive({ textAlign: \"right\" }),\n handler: () => props.editor.chain().focus().setTextAlign(\"right\").run(),\n disabled: () => isListActive(),\n }),\n\n ...registerTool(\"link\", {\n id: \"link\",\n type: \"primary\",\n icon: \"link\",\n text: \"Link\",\n hotkey: [\"CtrlOrCmd\", \"K\"],\n active: () => props.editor.isActive(\"link\"),\n handler: () => linkTool?.onLinkToolClick(),\n }),\n\n ...registerTool(\n \"paragraphTextStyle\",\n getParagraphTextStyleTool(() => props.editor),\n ),\n\n ...registerTool(\"blockquote\", {\n id: \"blockquote\",\n type: \"secondary\",\n icon: \"quote\",\n text: \"Blockquote\",\n active: () => props.editor.isActive(\"blockquote\"),\n handler: () => props.editor.chain().focus().toggleBlockquote().run(),\n }),\n\n ...registerTool(\"codeBlock\", {\n id: \"codeBlock\",\n type: \"secondary\",\n icon: \"code-block\",\n text: \"Code block\",\n hotkey: [\"CtrlOrCmd\", \"Alt\", \"C\"],\n active: () => props.editor.isActive(\"codeBlock\"),\n handler: () => props.editor.chain().focus().toggleCodeBlock().run(),\n }),\n\n ...registerTool(\"strike\", {\n id: \"strikethrough\",\n type: \"secondary\",\n icon: \"strikethrough\",\n text: \"Strikethrough\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"X\"],\n active: () => props.editor.isActive(\"strike\"),\n handler: () => props.editor.chain().focus().toggleStrike().run(),\n }),\n\n ...registerTool(\"horizontalRule\", {\n id: \"horizontalRule\",\n type: \"secondary\",\n icon: \"divider\",\n text: \"Divider\",\n active: () => false,\n handler: () => props.editor.chain().focus().setHorizontalRule().run(),\n }),\n];\n</script>\n\n<template>\n <slot :tools=\"editorTools\" />\n <slot :link-tool=\"linkTool\" name=\"linkModal\" />\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport type { Editor } from \"@tiptap/vue-3\";\n\nimport {\n KdsMenuButton,\n type KdsMenuItem,\n KdsToggleButton,\n} from \"@knime/kds-components\";\nimport { type Hotkey } from \"@knime/utils\";\n\nimport type {\n EditorToolPrimaryItem,\n EditorToolSecondaryItem,\n EditorTools,\n} from \"./types\";\n\ntype Props = {\n editor: Editor;\n tools: EditorTools;\n hotkeyFormatter: (hotkey: Array<Hotkey>) => string;\n};\n\nconst props = defineProps<Props>();\n\nconst baseTools = computed(\n () =>\n props.tools.filter(\n ({ type }) => type === \"primary\",\n ) as EditorToolPrimaryItem[],\n);\n\nconst secondaryTools = computed(\n () =>\n props.tools.filter(\n ({ type }) => type === \"secondary\",\n ) as EditorToolSecondaryItem[],\n);\n\nconst secondaryToolsMenuItems = computed<KdsMenuItem[]>(() => {\n const tools = secondaryTools.value.map((tool) => {\n const base = {\n id: tool.id,\n text: tool.text,\n disabled: tool.disabled?.(),\n shortcut: tool.hotkey ?? [],\n accessory: {\n type: \"icon\",\n name: tool.icon,\n },\n } satisfies KdsMenuItem;\n\n if (tool.children) {\n return {\n ...base,\n children: tool.children.map((toolChild) => {\n return {\n id: toolChild.id,\n text: toolChild.text,\n shortcut: toolChild.hotkey ?? [],\n handler: () => toolChild.handler(toolChild.id),\n };\n }),\n } satisfies KdsMenuItem;\n }\n\n return {\n ...base,\n handler: () => tool.handler(tool.id),\n } satisfies KdsMenuItem;\n });\n\n return tools;\n});\n</script>\n\n<template>\n <div class=\"tools\">\n <KdsToggleButton\n v-for=\"tool of baseTools\"\n :key=\"tool.id\"\n class=\"tool\"\n :ariaLabel=\"tool.text\"\n :data-testid=\"tool.id\"\n :disabled=\"tool.disabled?.()\"\n :toggled=\"tool.active?.()\"\n :leading-icon=\"tool.icon\"\n :tooltip=\"hotkeyFormatter(tool.hotkey ?? [])\"\n variant=\"transparent\"\n size=\"small\"\n @keydown.enter.prevent=\"tool.handler?.(tool.id)\"\n @click.stop=\"tool.handler?.(tool.id)\"\n />\n\n <KdsMenuButton\n v-if=\"secondaryTools.length > 0\"\n :items=\"secondaryToolsMenuItems\"\n leading-icon=\"more-actions\"\n ariaLabel=\"More actions\"\n variant=\"transparent\"\n size=\"small\"\n />\n </div>\n</template>\n\n<style scoped>\n.tools {\n display: flex;\n gap: var(--kds-spacing-container-0-25x);\n align-items: center;\n height: 100%;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport type { Editor } from \"@tiptap/vue-3\";\n\nimport {\n KdsMenuButton,\n type KdsMenuItem,\n KdsToggleButton,\n} from \"@knime/kds-components\";\nimport { type Hotkey } from \"@knime/utils\";\n\nimport type {\n EditorToolPrimaryItem,\n EditorToolSecondaryItem,\n EditorTools,\n} from \"./types\";\n\ntype Props = {\n editor: Editor;\n tools: EditorTools;\n hotkeyFormatter: (hotkey: Array<Hotkey>) => string;\n};\n\nconst props = defineProps<Props>();\n\nconst baseTools = computed(\n () =>\n props.tools.filter(\n ({ type }) => type === \"primary\",\n ) as EditorToolPrimaryItem[],\n);\n\nconst secondaryTools = computed(\n () =>\n props.tools.filter(\n ({ type }) => type === \"secondary\",\n ) as EditorToolSecondaryItem[],\n);\n\nconst secondaryToolsMenuItems = computed<KdsMenuItem[]>(() => {\n const tools = secondaryTools.value.map((tool) => {\n const base = {\n id: tool.id,\n text: tool.text,\n disabled: tool.disabled?.(),\n shortcut: tool.hotkey ?? [],\n accessory: {\n type: \"icon\",\n name: tool.icon,\n },\n } satisfies KdsMenuItem;\n\n if (tool.children) {\n return {\n ...base,\n children: tool.children.map((toolChild) => {\n return {\n id: toolChild.id,\n text: toolChild.text,\n shortcut: toolChild.hotkey ?? [],\n handler: () => toolChild.handler(toolChild.id),\n };\n }),\n } satisfies KdsMenuItem;\n }\n\n return {\n ...base,\n handler: () => tool.handler(tool.id),\n } satisfies KdsMenuItem;\n });\n\n return tools;\n});\n</script>\n\n<template>\n <div class=\"tools\">\n <KdsToggleButton\n v-for=\"tool of baseTools\"\n :key=\"tool.id\"\n class=\"tool\"\n :ariaLabel=\"tool.text\"\n :data-testid=\"tool.id\"\n :disabled=\"tool.disabled?.()\"\n :toggled=\"tool.active?.()\"\n :leading-icon=\"tool.icon\"\n :tooltip=\"hotkeyFormatter(tool.hotkey ?? [])\"\n variant=\"transparent\"\n size=\"small\"\n @keydown.enter.prevent=\"tool.handler?.(tool.id)\"\n @click.stop=\"tool.handler?.(tool.id)\"\n />\n\n <KdsMenuButton\n v-if=\"secondaryTools.length > 0\"\n :items=\"secondaryToolsMenuItems\"\n leading-icon=\"more-actions\"\n ariaLabel=\"More actions\"\n variant=\"transparent\"\n size=\"small\"\n />\n </div>\n</template>\n\n<style scoped>\n.tools {\n display: flex;\n gap: var(--kds-spacing-container-0-25x);\n align-items: center;\n height: 100%;\n}\n</style>\n","import { Extension } from \"@tiptap/vue-3\";\n\n/**\n * TODO UIEXT-1461 Remove and resolve properly with https://knime-com.atlassian.net/browse/UIEXT-1461-\n */\ntype CustomEscapeExtensionOptions = {\n handler: () => boolean;\n};\n\ndeclare module \"@tiptap/core\" {\n interface ExtensionOptions {\n customEscape: CustomEscapeExtensionOptions;\n }\n}\n\nexport const CustomEscape = Extension.create<CustomEscapeExtensionOptions>({\n name: \"OverrideEscape\",\n\n addOptions() {\n return {\n handler: () => false,\n };\n },\n\n addKeyboardShortcuts() {\n return {\n Escape: this.options.handler,\n };\n },\n});\n","import HardBreak from \"@tiptap/extension-hard-break\";\n\nexport const CustomHardBreak = HardBreak.extend({\n addKeyboardShortcuts() {\n return {\n \"Shift-Enter\": () => this.editor.commands.setHardBreak(),\n };\n },\n});\n","import { getAttributes } from \"@tiptap/core\";\nimport Link from \"@tiptap/extension-link\";\nimport { Plugin, PluginKey } from \"@tiptap/pm/state\";\n\nimport { getMetaOrCtrlKey, navigatorUtils } from \"@knime/utils\";\n\nconst buildUrlRegex = () => {\n const httpPrefixCheck = \"(http://www\\\\.|https://www\\\\.|http://|https://)\";\n\n const urlCheck =\n \"[a-z0-9]+([-.]{1}[a-z0-9]+)*\\\\.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?\";\n\n return new RegExp(`^${httpPrefixCheck}?${urlCheck}$`);\n};\n\nconst URL_REGEX = buildUrlRegex();\n\nexport const validateURL = (href: string) => URL_REGEX.test(href);\n\nexport type KdsLinkToolOptions = {\n /**\n * Custom function that can be supplied to validate urls added with the link tool\n * @param url The url of the link to be added\n */\n urlValidator: (url: string) => boolean;\n /**\n * Custom function that can, e.g., be used to append a protocol like https:// to a url if not present\n * @param url The url of the link to be added\n */\n sanitizeUrlText: (url: string) => string;\n};\n\nexport const kdsDefaultLinkToolOptions: KdsLinkToolOptions = {\n urlValidator: validateURL,\n sanitizeUrlText: (urlText: string) => {\n const containsHttp = [\"http://\", \"https://\"].some((protocol) =>\n urlText.includes(protocol),\n );\n return containsHttp ? urlText : `https://${urlText}`;\n },\n};\n\nexport const CustomLink = Link.extend({\n addAttributes() {\n const modifier = navigatorUtils.isMac() ? \"⌘\" : \"Ctrl +\";\n\n return {\n ...this.parent?.(),\n\n draggable: {\n default: \"false\",\n },\n\n title: {\n default: `Use \"${modifier} click\" to follow link`,\n },\n\n rel: {\n default: \"ugc noopener noreferrer nofollow\",\n },\n };\n },\n\n addProseMirrorPlugins() {\n const plugins: Plugin[] = this.parent?.() || [];\n\n const ctrlClickHandler = new Plugin({\n key: new PluginKey(\"handleControlClick\"),\n props: {\n handleClick(view, _pos, event) {\n const attrs = getAttributes(view.state, \"link\");\n const link = (event.target as HTMLElement)?.closest(\"a\");\n\n const metaOrCtrlKeyPressed = event[getMetaOrCtrlKey()];\n\n if (metaOrCtrlKeyPressed && link && attrs.href) {\n window.open(attrs.href, attrs.target);\n }\n // always return true, otherwise the cursor disappears, which causes some unexpected bugs\n // see: https://knime-com.atlassian.net/browse/HUB-8669\n return true;\n },\n },\n });\n\n plugins.push(ctrlClickHandler);\n\n return plugins;\n },\n});\n","import TextAlign from \"@tiptap/extension-text-align\";\n\nexport const CustomTextAlign = TextAlign.extend({\n addKeyboardShortcuts() {\n const canActivate = () => {\n return !(\n this.editor.isActive(\"bulletList\") ||\n this.editor.isActive(\"orderedList\")\n );\n };\n\n return {\n \"Mod-Shift-l\": () =>\n canActivate() && this.editor.commands.setTextAlign(\"left\"),\n \"Mod-Shift-e\": () =>\n canActivate() && this.editor.commands.setTextAlign(\"center\"),\n \"Mod-Shift-r\": () =>\n canActivate() && this.editor.commands.setTextAlign(\"right\"),\n };\n },\n});\n","import Paragraph from \"@tiptap/extension-paragraph\";\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n fontSize: {\n /**\n * Sets a custom class on the paragraph which is used to set a small font size\n */\n setSmallText: () => ReturnType;\n /**\n * Reverts setSmallText\n */\n unsetSmallText: () => ReturnType;\n };\n }\n}\n\nconst SmallText = Paragraph.extend({\n addAttributes() {\n const smallTextClass = \"small-text\";\n return {\n ...this.parent?.(),\n smallText: {\n default: false,\n parseHTML: (element) => element.className === smallTextClass,\n renderHTML: (attributes) => {\n return attributes.smallText\n ? {\n class: smallTextClass,\n }\n : {};\n },\n },\n };\n },\n\n addCommands() {\n return {\n ...this.parent?.(),\n setSmallText:\n () =>\n ({ commands }) => {\n return commands.toggleNode(this.name, \"paragraph\", {\n smallText: true,\n });\n },\n unsetSmallText:\n () =>\n ({ chain }) => {\n return chain()\n .updateAttributes(this.name, { smallText: false })\n .run();\n },\n };\n },\n\n addKeyboardShortcuts() {\n return {\n ...this.parent?.(),\n \"Mod-Alt--\": () => this.editor.commands.setSmallText(),\n };\n },\n});\n\nexport { SmallText };\n","<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onMounted,\n ref,\n useId,\n useSlots,\n watch,\n} from \"vue\";\nimport CharacterCount from \"@tiptap/extension-character-count\";\nimport StarterKit from \"@tiptap/starter-kit\";\nimport { type AnyExtension, EditorContent, useEditor } from \"@tiptap/vue-3\";\n\nimport { KdsSubText } from \"@knime/kds-components\";\nimport { hotkeys } from \"@knime/utils\";\n\nimport ExternalLinkIconUrl from \"../node_modules/@knime/kds-styles/dist/img/icons/external-link.svg?url\";\n\nimport { kdsCharacterCountDisplay } from \"./enums\";\nimport KdsCreateLinkModal from \"./toolbar/KdsCreateLinkModal.vue\";\nimport RichTextEditorBaseToolbar from \"./toolbar/RichTextEditorBaseToolbar.vue\";\nimport RichTextEditorToolbar from \"./toolbar/RichTextEditorToolbar.vue\";\nimport type { KdsBaseExtensionsConfig, KdsRichTextEditorProps } from \"./types\";\nimport { CustomEscape } from \"./utils/custom-escape\";\nimport { CustomHardBreak } from \"./utils/custom-hard-break\";\nimport {\n CustomLink,\n kdsDefaultLinkToolOptions,\n validateURL,\n} from \"./utils/custom-link\";\nimport { CustomTextAlign } from \"./utils/custom-text-align\";\nimport { SmallText } from \"./utils/paragraphTextStyle/extension\";\n\nconst {\n editable = true,\n minHeight = null,\n maxHeight = null,\n baseExtensions = {} as KdsBaseExtensionsConfig,\n hotkeyFormatter = hotkeys.formatHotkeys,\n customExtensions = [] as Array<AnyExtension>,\n autofocus = false,\n withBorder = true,\n disabled = false,\n linkToolOptions = kdsDefaultLinkToolOptions,\n characterLimit = {},\n subText = undefined,\n error = false,\n validating = false,\n preserveSubTextSpace = false,\n customEscapeHandler = undefined,\n ariaLabel = undefined,\n ariaLabelledby = undefined,\n wrapperFocusRing = false,\n} = defineProps<KdsRichTextEditorProps>();\n\n// we need to define a minimum amount for a character limit so that we\n// can make static calculations for the character counter and show it\n// only when the user has 100 chars or less left\nconst MIN_CHARACTER_LIMIT = 200;\n// number of remaining characters at or below which the counter is surfaced\n// when `display` is set to `atLimit`\nconst AT_LIMIT_THRESHOLD = 100;\n\nconst hardCharacterLimit = editable\n ? Math.max(characterLimit.maxCharacters ?? 1000, MIN_CHARACTER_LIMIT)\n : Infinity;\nconst characterCountDisplay =\n characterLimit.display ?? kdsCharacterCountDisplay.NEVER;\n\nconst slots = useSlots();\n\n// this assumes a svg without any double quotes\nconst externalIcon = `url(\"${ExternalLinkIconUrl}\")`;\n\n/** The current rich text value. */\nconst modelValue = defineModel<string>({ default: \"\" });\n\nconst emit = defineEmits<{\n blur: [];\n}>();\n\nconst isToolEnabled = (extensionName: keyof KdsBaseExtensionsConfig) => {\n if (\"all\" in baseExtensions) {\n return true;\n }\n\n return Boolean(baseExtensions[extensionName]);\n};\n\nconst getStarterKitExtensionConfig = (\n extensionName: keyof KdsBaseExtensionsConfig,\n): false | undefined | Partial<unknown> => {\n return isToolEnabled(extensionName) ? undefined : false;\n};\n\nconst extensions = [\n StarterKit.configure({\n bold: getStarterKitExtensionConfig(\"bold\"),\n italic: getStarterKitExtensionConfig(\"italic\"),\n bulletList: getStarterKitExtensionConfig(\"bulletList\"),\n orderedList: getStarterKitExtensionConfig(\"orderedList\"),\n heading: getStarterKitExtensionConfig(\"heading\"),\n blockquote: getStarterKitExtensionConfig(\"blockquote\"),\n code: getStarterKitExtensionConfig(\"code\"),\n codeBlock: getStarterKitExtensionConfig(\"codeBlock\"),\n horizontalRule: getStarterKitExtensionConfig(\"horizontalRule\"),\n strike: getStarterKitExtensionConfig(\"strike\"),\n underline: getStarterKitExtensionConfig(\"underline\"),\n ...(isToolEnabled(\"paragraphTextStyle\") && { paragraph: false }),\n hardBreak: false,\n // StarterKit v3 bundles a link extension, but we register our own\n // CustomLink (opt-in via baseExtensions) for the custom validation,\n // attributes and ctrl/cmd-click handling, so the bundled one is disabled\n // to avoid a duplicate-extension conflict.\n link: false,\n }),\n\n ...(isToolEnabled(\"paragraphTextStyle\") ? [SmallText] : []),\n ...(isToolEnabled(\"textAlign\")\n ? [\n CustomTextAlign.configure({\n types: [\n isToolEnabled(\"heading\") ? \"heading\" : \"\",\n \"paragraph\",\n ].filter(Boolean),\n\n alignments: [\"left\", \"right\", \"center\"],\n }),\n ]\n : []),\n\n ...(isToolEnabled(\"link\")\n ? [CustomLink.configure({ validate: validateURL, openOnClick: false })]\n : []),\n\n CustomHardBreak,\n CharacterCount.configure({\n limit: hardCharacterLimit,\n }),\n\n ...(customEscapeHandler\n ? [CustomEscape.configure({ handler: customEscapeHandler })]\n : []),\n\n ...customExtensions,\n];\n\nconst subTextId = useId();\n\n// Tracks focus of the editing area itself (not the toolbar). Used to draw the\n// `wrapperFocusRing` only while the user is editing — focusing a toolbar button\n// fires the editor's blur, so the ring correctly disappears.\nconst isEditorFocused = ref(false);\n\nconst editor = useEditor({\n content: modelValue.value,\n editable: editable && !disabled,\n autofocus,\n extensions,\n editorProps: {\n attributes: {\n ...(ariaLabel ? { \"aria-label\": ariaLabel } : {}),\n ...(ariaLabelledby ? { \"aria-labelledby\": ariaLabelledby } : {}),\n \"aria-describedby\": subTextId,\n },\n },\n onUpdate: () => {\n modelValue.value = editor.value?.getHTML() ?? \"\";\n },\n onFocus: () => {\n isEditorFocused.value = true;\n },\n onBlur: () => {\n isEditorFocused.value = false;\n emit(\"blur\");\n },\n});\n\nconst minHeightStyle = computed(() =>\n minHeight ? `${minHeight}px` : \"initial\",\n);\n\nconst focus = () => {\n editor.value?.commands?.focus?.();\n};\n\ndefineExpose({ focus });\n\nconst maxHeightStyle = computed(() =>\n maxHeight ? `${maxHeight}px` : \"initial\",\n);\n\nwatch(modelValue, (newValue) => {\n if (!editor.value) {\n return;\n }\n if (editor.value.getHTML() === newValue) {\n return;\n }\n\n editor.value.commands.setContent(newValue ?? \"\");\n});\n\nwatch(\n [() => editable, () => disabled],\n ([newEditable, newDisabled], [oldEditable, oldDisabled]) => {\n if (!editor.value) {\n return;\n }\n\n const oldValue = oldEditable && !oldDisabled;\n const newValue = newEditable && !newDisabled;\n if (oldValue === newValue) {\n return;\n }\n\n editor.value.setEditable(newValue);\n\n if (autofocus) {\n focus();\n }\n },\n);\n\nonMounted(async () => {\n if (editable && autofocus) {\n await nextTick();\n focus();\n }\n});\n\nconst hasCustomToolbar = slots.customToolbar;\nconst hasTools = computed(() => Object.keys(baseExtensions).length);\n\nconst characterCount = computed(\n () => editor.value?.storage.characterCount.characters() ?? 0,\n);\n\nconst showCharacterCount = computed(() => {\n if (!editor.value || !editable) {\n return false;\n }\n\n switch (characterCountDisplay) {\n case kdsCharacterCountDisplay.ALWAYS:\n return true;\n case kdsCharacterCountDisplay.AT_LIMIT:\n return hardCharacterLimit - characterCount.value <= AT_LIMIT_THRESHOLD;\n default:\n return false;\n }\n});\n\n// A provided `subText` (e.g. a validation message) takes precedence over the\n// character count display.\nconst hasSubTextOverride = computed(() => Boolean(subText));\n\nconst subTextValue = computed(() => {\n if (hasSubTextOverride.value) {\n return subText;\n }\n return showCharacterCount.value\n ? `${characterCount.value} / ${hardCharacterLimit} characters`\n : undefined;\n});\n</script>\n\n<template>\n <div>\n <div\n :class=\"[\n 'editor-wrapper',\n {\n 'with-border': withBorder,\n disabled,\n 'show-focus-ring': wrapperFocusRing && isEditorFocused,\n },\n ]\"\n >\n <div\n v-if=\"hasTools && editor && editable && !disabled\"\n :class=\"['toolbar-wrapper', { 'embedded-toolbar': !hasCustomToolbar }]\"\n >\n <RichTextEditorBaseToolbar\n :editor=\"editor\"\n :base-extensions=\"baseExtensions\"\n :link-tool-options=\"linkToolOptions\"\n >\n <template #default=\"{ tools }\">\n <slot\n name=\"customToolbar\"\n :editor=\"editor\"\n :tools=\"tools\"\n :hotkey-formatter=\"hotkeyFormatter\"\n >\n <RichTextEditorToolbar\n :editor=\"editor\"\n :tools=\"tools\"\n :hotkey-formatter=\"hotkeyFormatter\"\n />\n </slot>\n </template>\n <template #linkModal=\"{ linkTool }\">\n <KdsCreateLinkModal\n v-if=\"isToolEnabled('link') && linkTool\"\n v-bind=\"linkTool.props\"\n v-on=\"linkTool.events\"\n />\n </template>\n </RichTextEditorBaseToolbar>\n </div>\n\n <EditorContent\n class=\"rich-text-editor\"\n :editor=\"editor\"\n :class=\"{ editable: editable && !disabled }\"\n :aria-disabled=\"disabled || undefined\"\n />\n </div>\n\n <KdsSubText\n :id=\"subTextId\"\n :sub-text=\"subTextValue\"\n :error=\"hasSubTextOverride && error\"\n :validating=\"hasSubTextOverride && validating\"\n :preserve-sub-text-space=\"preserveSubTextSpace\"\n />\n </div>\n</template>\n\n<style scoped>\n.editor-wrapper {\n /* Fixed 44px toolbar height per the design (28px content + 8px padding on\n * each side); the small toolbar buttons (24px) center within the content\n * area. */\n --toolbar-height: calc(\n var(--kds-dimension-component-height-1-75x) +\n var(--kds-spacing-container-0-5x) * 2\n );\n\n position: relative;\n height: 100%;\n isolation: isolate;\n\n &.disabled {\n color: var(--kds-color-text-and-icon-disabled);\n }\n}\n\n/* stylelint-disable selector-class-pattern */\n.rich-text-editor {\n height: 100%;\n max-height: v-bind(\"maxHeightStyle\");\n overflow-y: auto;\n\n &.editable {\n padding: var(--kds-spacing-container-0-5x);\n cursor: text;\n background: var(--kds-color-background-input-initial);\n\n & :deep(.ProseMirror) {\n min-height: v-bind(\"minHeightStyle\");\n }\n }\n\n /* stylelint-disable knime/no-deep-nesting */\n & :deep(.ProseMirror) {\n height: 100%;\n font: var(--kds-font-base-body-small);\n\n /* The following rich text styles are kept in sync with KdsDescription. */\n p {\n padding: 0;\n margin: 0 0 var(--kds-spacing-container-0-37x);\n font: var(--kds-font-base-body-small);\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n p.small-text {\n font: var(--kds-font-base-subtext-xsmall);\n }\n\n strong,\n b {\n font-weight: var(--kds-core-font-weight-strong);\n }\n\n i,\n em {\n font-style: italic;\n }\n\n h1 {\n margin: 0;\n font: var(--kds-font-base-display-small);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n h2 {\n margin: 0;\n font: var(--kds-font-base-display-xsmall);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n h3 {\n margin: 0;\n font: var(--kds-font-base-body-medium-strong);\n }\n\n h4 {\n margin: 0;\n font: var(--kds-font-base-body-small-strong);\n }\n\n h5 {\n margin: 0;\n font: var(--kds-font-base-title-small-strong);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n h6 {\n margin: 0;\n font: var(--kds-font-base-title-small);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n blockquote {\n position: relative;\n padding-left: var(--kds-spacing-container-1x);\n margin-left: var(--kds-spacing-container-1x);\n\n &::before {\n position: absolute;\n left: 0;\n width: var(--kds-dimension-component-width-0-25x);\n height: 100%;\n content: \"\";\n background-color: var(--kds-color-border-subtle);\n border-radius: var(--kds-border-radius-container-pill);\n }\n\n & p:last-child {\n margin-bottom: 0;\n }\n }\n\n pre {\n width: fit-content;\n padding: var(--kds-spacing-container-0-75x);\n font: var(--kds-font-base-code-xsmall);\n background: var(--kds-color-surface-subtle);\n border-radius: var(--kds-border-radius-container-0-25x);\n\n & > code {\n padding: 0;\n background: none;\n }\n }\n\n & :not(pre) > code {\n padding: var(--kds-spacing-container-0-12x)\n var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-code-xsmall);\n background: var(--kds-color-surface-subtle);\n box-decoration-break: clone;\n border-radius: var(--kds-border-radius-container-0-12x);\n }\n\n /** keep in sync with KdsLink */\n a {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n max-width: 100%;\n padding: var(--kds-spacing-container-none)\n var(--kds-spacing-container-0-10x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n white-space: nowrap;\n text-decoration-line: underline;\n cursor: pointer;\n border-radius: var(--kds-border-radius-container-0-12x);\n\n &:focus-visible {\n outline: var(--kds-border-action-focused);\n outline-offset: var(--kds-spacing-container-none);\n }\n\n /** internal links */\n &[href^=\"http\"] {\n --link-color: var(--kds-color-text-and-icon-selected);\n\n color: var(--link-color);\n\n &:visited {\n --link-color: var(--kds-color-text-and-icon-info);\n\n color: var(--link-color);\n }\n\n &:hover {\n --link-color: var(--kds-color-text-and-icon-primary-inverted);\n\n color: var(--link-color);\n background-color: var(--kds-color-background-primary-bold-hover);\n }\n\n &:active {\n --link-color: var(--kds-color-text-and-icon-selected-inverted);\n\n color: var(--link-color);\n background-color: var(--kds-color-background-primary-bold-active);\n }\n\n &::after {\n display: block;\n width: var(--kds-dimension-icon-0-56x);\n height: var(--kds-dimension-icon-0-56x);\n margin-left: var(--kds-spacing-container-0-12x);\n content: \"\";\n background-color: var(--link-color);\n mask-image: v-bind(\"externalIcon\");\n mask-repeat: no-repeat;\n mask-size: contain;\n }\n }\n\n /** external links */\n &:not([href^=\"http\"]) {\n color: var(--kds-color-text-and-icon-neutral);\n\n &:visited {\n color: var(--kds-color-text-and-icon-info);\n }\n\n &:hover {\n background-color: var(--kds-color-background-neutral-hover);\n }\n\n &:active {\n background-color: var(--kds-color-background-neutral-active);\n }\n }\n }\n\n ol,\n ul {\n padding-left: var(--kds-spacing-container-2x);\n }\n\n dd {\n margin-left: var(--kds-spacing-container-1x);\n }\n\n table {\n border-spacing: var(--kds-spacing-container-0-25x) 0;\n border-collapse: separate;\n\n td,\n th {\n padding: var(--kds-spacing-container-0-25x);\n }\n\n th {\n font: var(--kds-font-base-body-small-strong);\n text-align: left;\n border-bottom: var(--kds-border-width-icon-stroke-l) solid\n var(--kds-color-border-neutral);\n }\n\n td {\n font: var(--kds-font-base-body-small);\n border-bottom: var(--kds-border-width-icon-stroke-s) solid\n var(--kds-color-border-neutral);\n }\n }\n }\n\n & :deep(.ProseMirror:focus-visible),\n & :deep(.ProseMirror:focus) {\n outline: transparent;\n }\n /* stylelint-enable selector-class-pattern */\n}\n\n.editor-wrapper.with-border {\n border: var(--kds-border-action-input);\n border-radius: var(--kds-border-radius-container-0-37x);\n\n &.disabled {\n border: var(--kds-border-action-disabled);\n }\n\n & .toolbar-wrapper {\n border-top-left-radius: var(--kds-border-radius-container-0-37x);\n border-top-right-radius: var(--kds-border-radius-container-0-37x);\n }\n\n & .rich-text-editor {\n border-bottom-right-radius: var(--kds-border-radius-container-0-37x);\n border-bottom-left-radius: var(--kds-border-radius-container-0-37x);\n }\n}\n\n.editor-wrapper.show-focus-ring {\n outline: var(--kds-border-action-focused);\n outline-offset: var(--kds-spacing-offset-focus);\n}\n\n.embedded-toolbar {\n height: var(--toolbar-height);\n padding: var(--kds-spacing-container-0-5x);\n overflow-x: auto;\n overscroll-behavior: contain;\n white-space: pre;\n scrollbar-width: none; /* for firefox */\n background: var(--kds-color-background-input-initial);\n border-bottom: var(--kds-border-base-muted);\n -ms-overflow-style: none; /* needed to hide scroll bar in edge */\n &::-webkit-scrollbar {\n display: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onMounted,\n ref,\n useId,\n useSlots,\n watch,\n} from \"vue\";\nimport CharacterCount from \"@tiptap/extension-character-count\";\nimport StarterKit from \"@tiptap/starter-kit\";\nimport { type AnyExtension, EditorContent, useEditor } from \"@tiptap/vue-3\";\n\nimport { KdsSubText } from \"@knime/kds-components\";\nimport { hotkeys } from \"@knime/utils\";\n\nimport ExternalLinkIconUrl from \"../node_modules/@knime/kds-styles/dist/img/icons/external-link.svg?url\";\n\nimport { kdsCharacterCountDisplay } from \"./enums\";\nimport KdsCreateLinkModal from \"./toolbar/KdsCreateLinkModal.vue\";\nimport RichTextEditorBaseToolbar from \"./toolbar/RichTextEditorBaseToolbar.vue\";\nimport RichTextEditorToolbar from \"./toolbar/RichTextEditorToolbar.vue\";\nimport type { KdsBaseExtensionsConfig, KdsRichTextEditorProps } from \"./types\";\nimport { CustomEscape } from \"./utils/custom-escape\";\nimport { CustomHardBreak } from \"./utils/custom-hard-break\";\nimport {\n CustomLink,\n kdsDefaultLinkToolOptions,\n validateURL,\n} from \"./utils/custom-link\";\nimport { CustomTextAlign } from \"./utils/custom-text-align\";\nimport { SmallText } from \"./utils/paragraphTextStyle/extension\";\n\nconst {\n editable = true,\n minHeight = null,\n maxHeight = null,\n baseExtensions = {} as KdsBaseExtensionsConfig,\n hotkeyFormatter = hotkeys.formatHotkeys,\n customExtensions = [] as Array<AnyExtension>,\n autofocus = false,\n withBorder = true,\n disabled = false,\n linkToolOptions = kdsDefaultLinkToolOptions,\n characterLimit = {},\n subText = undefined,\n error = false,\n validating = false,\n preserveSubTextSpace = false,\n customEscapeHandler = undefined,\n ariaLabel = undefined,\n ariaLabelledby = undefined,\n wrapperFocusRing = false,\n} = defineProps<KdsRichTextEditorProps>();\n\n// we need to define a minimum amount for a character limit so that we\n// can make static calculations for the character counter and show it\n// only when the user has 100 chars or less left\nconst MIN_CHARACTER_LIMIT = 200;\n// number of remaining characters at or below which the counter is surfaced\n// when `display` is set to `atLimit`\nconst AT_LIMIT_THRESHOLD = 100;\n\nconst hardCharacterLimit = editable\n ? Math.max(characterLimit.maxCharacters ?? 1000, MIN_CHARACTER_LIMIT)\n : Infinity;\nconst characterCountDisplay =\n characterLimit.display ?? kdsCharacterCountDisplay.NEVER;\n\nconst slots = useSlots();\n\n// this assumes a svg without any double quotes\nconst externalIcon = `url(\"${ExternalLinkIconUrl}\")`;\n\n/** The current rich text value. */\nconst modelValue = defineModel<string>({ default: \"\" });\n\nconst emit = defineEmits<{\n blur: [];\n}>();\n\nconst isToolEnabled = (extensionName: keyof KdsBaseExtensionsConfig) => {\n if (\"all\" in baseExtensions) {\n return true;\n }\n\n return Boolean(baseExtensions[extensionName]);\n};\n\nconst getStarterKitExtensionConfig = (\n extensionName: keyof KdsBaseExtensionsConfig,\n): false | undefined | Partial<unknown> => {\n return isToolEnabled(extensionName) ? undefined : false;\n};\n\nconst extensions = [\n StarterKit.configure({\n bold: getStarterKitExtensionConfig(\"bold\"),\n italic: getStarterKitExtensionConfig(\"italic\"),\n bulletList: getStarterKitExtensionConfig(\"bulletList\"),\n orderedList: getStarterKitExtensionConfig(\"orderedList\"),\n heading: getStarterKitExtensionConfig(\"heading\"),\n blockquote: getStarterKitExtensionConfig(\"blockquote\"),\n code: getStarterKitExtensionConfig(\"code\"),\n codeBlock: getStarterKitExtensionConfig(\"codeBlock\"),\n horizontalRule: getStarterKitExtensionConfig(\"horizontalRule\"),\n strike: getStarterKitExtensionConfig(\"strike\"),\n underline: getStarterKitExtensionConfig(\"underline\"),\n ...(isToolEnabled(\"paragraphTextStyle\") && { paragraph: false }),\n hardBreak: false,\n // StarterKit v3 bundles a link extension, but we register our own\n // CustomLink (opt-in via baseExtensions) for the custom validation,\n // attributes and ctrl/cmd-click handling, so the bundled one is disabled\n // to avoid a duplicate-extension conflict.\n link: false,\n }),\n\n ...(isToolEnabled(\"paragraphTextStyle\") ? [SmallText] : []),\n ...(isToolEnabled(\"textAlign\")\n ? [\n CustomTextAlign.configure({\n types: [\n isToolEnabled(\"heading\") ? \"heading\" : \"\",\n \"paragraph\",\n ].filter(Boolean),\n\n alignments: [\"left\", \"right\", \"center\"],\n }),\n ]\n : []),\n\n ...(isToolEnabled(\"link\")\n ? [CustomLink.configure({ validate: validateURL, openOnClick: false })]\n : []),\n\n CustomHardBreak,\n CharacterCount.configure({\n limit: hardCharacterLimit,\n }),\n\n ...(customEscapeHandler\n ? [CustomEscape.configure({ handler: customEscapeHandler })]\n : []),\n\n ...customExtensions,\n];\n\nconst subTextId = useId();\n\n// Tracks focus of the editing area itself (not the toolbar). Used to draw the\n// `wrapperFocusRing` only while the user is editing — focusing a toolbar button\n// fires the editor's blur, so the ring correctly disappears.\nconst isEditorFocused = ref(false);\n\nconst editor = useEditor({\n content: modelValue.value,\n editable: editable && !disabled,\n autofocus,\n extensions,\n editorProps: {\n attributes: {\n ...(ariaLabel ? { \"aria-label\": ariaLabel } : {}),\n ...(ariaLabelledby ? { \"aria-labelledby\": ariaLabelledby } : {}),\n \"aria-describedby\": subTextId,\n },\n },\n onUpdate: () => {\n modelValue.value = editor.value?.getHTML() ?? \"\";\n },\n onFocus: () => {\n isEditorFocused.value = true;\n },\n onBlur: () => {\n isEditorFocused.value = false;\n emit(\"blur\");\n },\n});\n\nconst minHeightStyle = computed(() =>\n minHeight ? `${minHeight}px` : \"initial\",\n);\n\nconst focus = () => {\n editor.value?.commands?.focus?.();\n};\n\ndefineExpose({ focus });\n\nconst maxHeightStyle = computed(() =>\n maxHeight ? `${maxHeight}px` : \"initial\",\n);\n\nwatch(modelValue, (newValue) => {\n if (!editor.value) {\n return;\n }\n if (editor.value.getHTML() === newValue) {\n return;\n }\n\n editor.value.commands.setContent(newValue ?? \"\");\n});\n\nwatch(\n [() => editable, () => disabled],\n ([newEditable, newDisabled], [oldEditable, oldDisabled]) => {\n if (!editor.value) {\n return;\n }\n\n const oldValue = oldEditable && !oldDisabled;\n const newValue = newEditable && !newDisabled;\n if (oldValue === newValue) {\n return;\n }\n\n editor.value.setEditable(newValue);\n\n if (autofocus) {\n focus();\n }\n },\n);\n\nonMounted(async () => {\n if (editable && autofocus) {\n await nextTick();\n focus();\n }\n});\n\nconst hasCustomToolbar = slots.customToolbar;\nconst hasTools = computed(() => Object.keys(baseExtensions).length);\n\nconst characterCount = computed(\n () => editor.value?.storage.characterCount.characters() ?? 0,\n);\n\nconst showCharacterCount = computed(() => {\n if (!editor.value || !editable) {\n return false;\n }\n\n switch (characterCountDisplay) {\n case kdsCharacterCountDisplay.ALWAYS:\n return true;\n case kdsCharacterCountDisplay.AT_LIMIT:\n return hardCharacterLimit - characterCount.value <= AT_LIMIT_THRESHOLD;\n default:\n return false;\n }\n});\n\n// A provided `subText` (e.g. a validation message) takes precedence over the\n// character count display.\nconst hasSubTextOverride = computed(() => Boolean(subText));\n\nconst subTextValue = computed(() => {\n if (hasSubTextOverride.value) {\n return subText;\n }\n return showCharacterCount.value\n ? `${characterCount.value} / ${hardCharacterLimit} characters`\n : undefined;\n});\n</script>\n\n<template>\n <div>\n <div\n :class=\"[\n 'editor-wrapper',\n {\n 'with-border': withBorder,\n disabled,\n 'show-focus-ring': wrapperFocusRing && isEditorFocused,\n },\n ]\"\n >\n <div\n v-if=\"hasTools && editor && editable && !disabled\"\n :class=\"['toolbar-wrapper', { 'embedded-toolbar': !hasCustomToolbar }]\"\n >\n <RichTextEditorBaseToolbar\n :editor=\"editor\"\n :base-extensions=\"baseExtensions\"\n :link-tool-options=\"linkToolOptions\"\n >\n <template #default=\"{ tools }\">\n <slot\n name=\"customToolbar\"\n :editor=\"editor\"\n :tools=\"tools\"\n :hotkey-formatter=\"hotkeyFormatter\"\n >\n <RichTextEditorToolbar\n :editor=\"editor\"\n :tools=\"tools\"\n :hotkey-formatter=\"hotkeyFormatter\"\n />\n </slot>\n </template>\n <template #linkModal=\"{ linkTool }\">\n <KdsCreateLinkModal\n v-if=\"isToolEnabled('link') && linkTool\"\n v-bind=\"linkTool.props\"\n v-on=\"linkTool.events\"\n />\n </template>\n </RichTextEditorBaseToolbar>\n </div>\n\n <EditorContent\n class=\"rich-text-editor\"\n :editor=\"editor\"\n :class=\"{ editable: editable && !disabled }\"\n :aria-disabled=\"disabled || undefined\"\n />\n </div>\n\n <KdsSubText\n :id=\"subTextId\"\n :sub-text=\"subTextValue\"\n :error=\"hasSubTextOverride && error\"\n :validating=\"hasSubTextOverride && validating\"\n :preserve-sub-text-space=\"preserveSubTextSpace\"\n />\n </div>\n</template>\n\n<style scoped>\n.editor-wrapper {\n /* Fixed 44px toolbar height per the design (28px content + 8px padding on\n * each side); the small toolbar buttons (24px) center within the content\n * area. */\n --toolbar-height: calc(\n var(--kds-dimension-component-height-1-75x) +\n var(--kds-spacing-container-0-5x) * 2\n );\n\n position: relative;\n height: 100%;\n isolation: isolate;\n\n &.disabled {\n color: var(--kds-color-text-and-icon-disabled);\n }\n}\n\n/* stylelint-disable selector-class-pattern */\n.rich-text-editor {\n height: 100%;\n max-height: v-bind(\"maxHeightStyle\");\n overflow-y: auto;\n\n &.editable {\n padding: var(--kds-spacing-container-0-5x);\n cursor: text;\n background: var(--kds-color-background-input-initial);\n\n & :deep(.ProseMirror) {\n min-height: v-bind(\"minHeightStyle\");\n }\n }\n\n /* stylelint-disable knime/no-deep-nesting */\n & :deep(.ProseMirror) {\n height: 100%;\n font: var(--kds-font-base-body-small);\n\n /* The following rich text styles are kept in sync with KdsDescription. */\n p {\n padding: 0;\n margin: 0 0 var(--kds-spacing-container-0-37x);\n font: var(--kds-font-base-body-small);\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n p.small-text {\n font: var(--kds-font-base-subtext-xsmall);\n }\n\n strong,\n b {\n font-weight: var(--kds-core-font-weight-strong);\n }\n\n i,\n em {\n font-style: italic;\n }\n\n h1 {\n margin: 0;\n font: var(--kds-font-base-display-small);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n h2 {\n margin: 0;\n font: var(--kds-font-base-display-xsmall);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n h3 {\n margin: 0;\n font: var(--kds-font-base-body-medium-strong);\n }\n\n h4 {\n margin: 0;\n font: var(--kds-font-base-body-small-strong);\n }\n\n h5 {\n margin: 0;\n font: var(--kds-font-base-title-small-strong);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n h6 {\n margin: 0;\n font: var(--kds-font-base-title-small);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n blockquote {\n position: relative;\n padding-left: var(--kds-spacing-container-1x);\n margin-left: var(--kds-spacing-container-1x);\n\n &::before {\n position: absolute;\n left: 0;\n width: var(--kds-dimension-component-width-0-25x);\n height: 100%;\n content: \"\";\n background-color: var(--kds-color-border-subtle);\n border-radius: var(--kds-border-radius-container-pill);\n }\n\n & p:last-child {\n margin-bottom: 0;\n }\n }\n\n pre {\n width: fit-content;\n padding: var(--kds-spacing-container-0-75x);\n font: var(--kds-font-base-code-xsmall);\n background: var(--kds-color-surface-subtle);\n border-radius: var(--kds-border-radius-container-0-25x);\n\n & > code {\n padding: 0;\n background: none;\n }\n }\n\n & :not(pre) > code {\n padding: var(--kds-spacing-container-0-12x)\n var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-code-xsmall);\n background: var(--kds-color-surface-subtle);\n box-decoration-break: clone;\n border-radius: var(--kds-border-radius-container-0-12x);\n }\n\n /** keep in sync with KdsLink */\n a {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n max-width: 100%;\n padding: var(--kds-spacing-container-none)\n var(--kds-spacing-container-0-10x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n white-space: nowrap;\n text-decoration-line: underline;\n cursor: pointer;\n border-radius: var(--kds-border-radius-container-0-12x);\n\n &:focus-visible {\n outline: var(--kds-border-action-focused);\n outline-offset: var(--kds-spacing-container-none);\n }\n\n /** internal links */\n &[href^=\"http\"] {\n --link-color: var(--kds-color-text-and-icon-selected);\n\n color: var(--link-color);\n\n &:visited {\n --link-color: var(--kds-color-text-and-icon-info);\n\n color: var(--link-color);\n }\n\n &:hover {\n --link-color: var(--kds-color-text-and-icon-primary-inverted);\n\n color: var(--link-color);\n background-color: var(--kds-color-background-primary-bold-hover);\n }\n\n &:active {\n --link-color: var(--kds-color-text-and-icon-selected-inverted);\n\n color: var(--link-color);\n background-color: var(--kds-color-background-primary-bold-active);\n }\n\n &::after {\n display: block;\n width: var(--kds-dimension-icon-0-56x);\n height: var(--kds-dimension-icon-0-56x);\n margin-left: var(--kds-spacing-container-0-12x);\n content: \"\";\n background-color: var(--link-color);\n mask-image: v-bind(\"externalIcon\");\n mask-repeat: no-repeat;\n mask-size: contain;\n }\n }\n\n /** external links */\n &:not([href^=\"http\"]) {\n color: var(--kds-color-text-and-icon-neutral);\n\n &:visited {\n color: var(--kds-color-text-and-icon-info);\n }\n\n &:hover {\n background-color: var(--kds-color-background-neutral-hover);\n }\n\n &:active {\n background-color: var(--kds-color-background-neutral-active);\n }\n }\n }\n\n ol,\n ul {\n padding-left: var(--kds-spacing-container-2x);\n }\n\n dd {\n margin-left: var(--kds-spacing-container-1x);\n }\n\n table {\n border-spacing: var(--kds-spacing-container-0-25x) 0;\n border-collapse: separate;\n\n td,\n th {\n padding: var(--kds-spacing-container-0-25x);\n }\n\n th {\n font: var(--kds-font-base-body-small-strong);\n text-align: left;\n border-bottom: var(--kds-border-width-icon-stroke-l) solid\n var(--kds-color-border-neutral);\n }\n\n td {\n font: var(--kds-font-base-body-small);\n border-bottom: var(--kds-border-width-icon-stroke-s) solid\n var(--kds-color-border-neutral);\n }\n }\n }\n\n & :deep(.ProseMirror:focus-visible),\n & :deep(.ProseMirror:focus) {\n outline: transparent;\n }\n /* stylelint-enable selector-class-pattern */\n}\n\n.editor-wrapper.with-border {\n border: var(--kds-border-action-input);\n border-radius: var(--kds-border-radius-container-0-37x);\n\n &.disabled {\n border: var(--kds-border-action-disabled);\n }\n\n & .toolbar-wrapper {\n border-top-left-radius: var(--kds-border-radius-container-0-37x);\n border-top-right-radius: var(--kds-border-radius-container-0-37x);\n }\n\n & .rich-text-editor {\n border-bottom-right-radius: var(--kds-border-radius-container-0-37x);\n border-bottom-left-radius: var(--kds-border-radius-container-0-37x);\n }\n}\n\n.editor-wrapper.show-focus-ring {\n outline: var(--kds-border-action-focused);\n outline-offset: var(--kds-spacing-offset-focus);\n}\n\n.embedded-toolbar {\n height: var(--toolbar-height);\n padding: var(--kds-spacing-container-0-5x);\n overflow-x: auto;\n overscroll-behavior: contain;\n white-space: pre;\n scrollbar-width: none; /* for firefox */\n background: var(--kds-color-background-input-initial);\n border-bottom: var(--kds-border-base-muted);\n -ms-overflow-style: none; /* needed to hide scroll bar in edge */\n &::-webkit-scrollbar {\n display: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref, useId, useTemplateRef } from \"vue\";\n\nimport { KdsLabel } from \"@knime/kds-components\";\nimport type { KdsFormFieldExpose } from \"@knime/kds-components\";\n\nimport KdsRichTextEditor from \"./KdsRichTextEditor.vue\";\nimport type { KdsRichTextInputProps } from \"./types\";\n\nconst {\n id = undefined,\n label = undefined,\n ariaLabel = undefined,\n description = undefined,\n ...editorProps\n} = defineProps<KdsRichTextInputProps>();\n\n/** The current rich text value. */\nconst modelValue = defineModel<string>({ default: \"\" });\n\nconst emit = defineEmits<{\n blur: [];\n}>();\n\nconst fallbackId = useId();\nconst inputId = computed(() => id?.trim() || fallbackId);\nconst labelId = computed(() => `${inputId.value}-label`);\n\nconst isHovered = ref(false);\n\nconst editorRef =\n useTemplateRef<InstanceType<typeof KdsRichTextEditor>>(\"editor\");\n\ndefineExpose<KdsFormFieldExpose>({\n focus: () => editorRef.value?.focus(),\n});\n</script>\n\n<template>\n <div\n class=\"kds-rich-text-input\"\n @mouseenter=\"isHovered = true\"\n @mouseleave=\"isHovered = false\"\n >\n <KdsLabel\n v-if=\"label\"\n :id=\"labelId\"\n :label=\"label\"\n :description=\"description\"\n :show-description-button=\"isHovered\"\n />\n <KdsRichTextEditor\n ref=\"editor\"\n v-bind=\"editorProps\"\n v-model=\"modelValue\"\n with-border\n wrapper-focus-ring\n :aria-label=\"label ? undefined : ariaLabel\"\n :aria-labelledby=\"label ? labelId : undefined\"\n @blur=\"emit('blur')\"\n />\n </div>\n</template>\n\n<style scoped>\n.kds-rich-text-input {\n display: flex;\n flex-direction: column;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref, useId, useTemplateRef } from \"vue\";\n\nimport { KdsLabel } from \"@knime/kds-components\";\nimport type { KdsFormFieldExpose } from \"@knime/kds-components\";\n\nimport KdsRichTextEditor from \"./KdsRichTextEditor.vue\";\nimport type { KdsRichTextInputProps } from \"./types\";\n\nconst {\n id = undefined,\n label = undefined,\n ariaLabel = undefined,\n description = undefined,\n ...editorProps\n} = defineProps<KdsRichTextInputProps>();\n\n/** The current rich text value. */\nconst modelValue = defineModel<string>({ default: \"\" });\n\nconst emit = defineEmits<{\n blur: [];\n}>();\n\nconst fallbackId = useId();\nconst inputId = computed(() => id?.trim() || fallbackId);\nconst labelId = computed(() => `${inputId.value}-label`);\n\nconst isHovered = ref(false);\n\nconst editorRef =\n useTemplateRef<InstanceType<typeof KdsRichTextEditor>>(\"editor\");\n\ndefineExpose<KdsFormFieldExpose>({\n focus: () => editorRef.value?.focus(),\n});\n</script>\n\n<template>\n <div\n class=\"kds-rich-text-input\"\n @mouseenter=\"isHovered = true\"\n @mouseleave=\"isHovered = false\"\n >\n <KdsLabel\n v-if=\"label\"\n :id=\"labelId\"\n :label=\"label\"\n :description=\"description\"\n :show-description-button=\"isHovered\"\n />\n <KdsRichTextEditor\n ref=\"editor\"\n v-bind=\"editorProps\"\n v-model=\"modelValue\"\n with-border\n wrapper-focus-ring\n :aria-label=\"label ? undefined : ariaLabel\"\n :aria-labelledby=\"label ? labelId : undefined\"\n @blur=\"emit('blur')\"\n />\n </div>\n</template>\n\n<style scoped>\n.kds-rich-text-input {\n display: flex;\n flex-direction: column;\n}\n</style>\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;AACA,SAAS,eAAe,GAAG,GAAG;CAC7B,KAAK,IAAI,GAAG,KAAK,IAAI;AACtB;AACA,SAAS,kBAAkB,GAAG,GAAG;CAChC,CAAC,QAAQ,KAAK,IAAI,EAAE,YAAY,IAAI,EAAE;CACtC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,GAAG,KAAK,EAAE,KAAK,EAAE;CACnD,OAAO;AACR;AACA,SAAS,gBAAgB,GAAG;CAC3B,IAAI,MAAM,QAAQ,CAAC,GAAG,OAAO;AAC9B;AACA,SAAS,sBAAsB,GAAG,GAAG;CACpC,IAAI,IAAI,QAAQ,IAAI,OAAO,eAAe,OAAO,UA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R;AACD;AACA,IAAM,SAAS,OAAO;CACrB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,QAAQ,OAAO;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,aAAa,OAAO;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,gBAAgB,OAAO;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,WAAW,OAAO;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,mBAAmB,OAAO;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,OAAO,OAAO,CAAC,OAAO,CAAC;AAC7B,IAAM,OAAO,OAAO;CACnB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,MAAM,OAAO;CAClB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,SAAS,OAAO;CACrB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,MAAM,OAAO;CAClB;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,gBAAgB,KAAK,uBAAuB;AAClD,IAAM,WAAW,KAAK,uBAAuB;AAC7C,IAAM,cAAc,KAAK,aAAa;AACtC,IAAM,YAAY,KAAK,8BAA8B;AACrD,IAAM,YAAY,KAAK,gBAAgB;AACvC,IAAM,iBAAiB,KAAK,kGAAkG;AAC9H,IAAM,oBAAoB,KAAK,uBAAuB;AACtD,IAAM,kBAAkB,KAAK,6DAA6D;AA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B,MAAM,UAAU,eAAe,QAAA,IAAI,KAAK,KAAK,UAAU;EACvD,MAAM,UAAU,eAAe,GAAG,QAAQ,MAAM,OAAO;EAEvD,MAAM,YAAY,IAAI,KAAK;EAE3B,MAAM,YACJ,eAAuD,QAAQ;EAEjE,SAAiC,EAC/B,aAAa,UAAU,OAAO,MAAM,EACtC,CAAC;;uBAIC,mBAsBM,OAAA;IArBJ,OAAM;IACL,cAAU,OAAA,OAAA,OAAA,MAAA,WAAE,UAAA,QAAS;IACrB,cAAU,OAAA,OAAA,OAAA,MAAA,WAAE,UAAA,QAAS;OAGd,QAAA,SAAA,UAAA,GADR,YAME,MAAA,QAAA,GAAA;;IAJC,IAAI,QAAA;IACJ,OAAO,QAAA;IACP,aAAa,QAAA;IACb,2BAAyB,UAAA;;;;;;uCAE5B,YASE,2BATF,WASE,EARA,KAAI,SAAQ,GACJ,aAAW;gBACV,WAAA;4EAAU,QAAA;IACnB,eAAA;IACA,sBAAA;IACC,cAAY,QAAA,QAAQ,KAAA,IAAY,QAAA;IAChC,mBAAiB,QAAA,QAAQ,QAAA,QAAU,KAAA;IACnC,QAAI,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,MAAA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../node_modules/.pnpm/dompurify@3.4.17/node_modules/dompurify/dist/purify.es.mjs","../../utils/dist/index.js","../../styles/dist/img/icons/external-link.svg?url","../src/enums.ts","../src/toolbar/KdsCreateLinkModal.vue","../src/toolbar/KdsCreateLinkModal.vue","../src/utils/paragraphTextStyle/index.ts","../src/toolbar/useLinkTool.ts","../src/toolbar/RichTextEditorBaseToolbar.vue","../src/toolbar/RichTextEditorBaseToolbar.vue","../src/toolbar/RichTextEditorToolbar.vue","../src/toolbar/RichTextEditorToolbar.vue","../src/utils/custom-escape.ts","../src/utils/custom-hard-break.ts","../src/utils/custom-link.ts","../src/utils/custom-text-align.ts","../src/utils/paragraphTextStyle/extension.ts","../src/KdsRichTextEditor.vue","../src/KdsRichTextEditor.vue","../src/KdsRichTextInput.vue","../src/KdsRichTextInput.vue"],"sourcesContent":["/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */\nfunction _OverloadYield(e, d) {\n\tthis.v = e, this.k = d;\n}\nfunction _arrayLikeToArray(r, a) {\n\t(null == a || a > r.length) && (a = r.length);\n\tfor (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n\treturn n;\n}\nfunction _arrayWithHoles(r) {\n\tif (Array.isArray(r)) return r;\n}\nfunction _iterableToArrayLimit(r, l) {\n\tvar t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n\tif (null != t) {\n\t\tvar e, n, i, u, a = [], f = !0, o = !1;\n\t\ttry {\n\t\t\tif (i = (t = t.call(r)).next, 0 === l) {\n\t\t\t\tif (Object(t) !== t) return;\n\t\t\t\tf = !1;\n\t\t\t} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n\t\t} catch (r) {\n\t\t\to = !0, n = r;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n\t\t\t} finally {\n\t\t\t\tif (o) throw n;\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}\n}\nfunction _nonIterableRest() {\n\tthrow new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */\nfunction _slicedToArray(r, e) {\n\treturn _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _unsupportedIterableToArray(r, a) {\n\tif (r) {\n\t\tif (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n\t\tvar t = {}.toString.call(r).slice(8, -1);\n\t\treturn \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n\t}\n}\nfunction AsyncGenerator(e) {\n\tvar t, n;\n\tfunction resume(t, n) {\n\t\ttry {\n\t\t\tvar r = e[t](n), o = r.value, u = o instanceof _OverloadYield;\n\t\t\tPromise.resolve(u ? o.v : o).then(function(n) {\n\t\t\t\tif (u) {\n\t\t\t\t\tvar i = \"return\" === t && o.k ? t : \"next\";\n\t\t\t\t\tif (!o.k || n.done) return resume(i, n);\n\t\t\t\t\tn = e[i](n).value;\n\t\t\t\t}\n\t\t\t\tsettle(!!r.done, n);\n\t\t\t}, function(e) {\n\t\t\t\tresume(\"throw\", e);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tsettle(2, e);\n\t\t}\n\t}\n\tfunction settle(e, r) {\n\t\t2 === e ? t.reject(r) : t.resolve({\n\t\t\tvalue: r,\n\t\t\tdone: e\n\t\t}), (t = t.next) ? resume(t.key, t.arg) : n = null;\n\t}\n\tthis._invoke = function(e, r) {\n\t\treturn new Promise(function(o, u) {\n\t\t\tvar i = {\n\t\t\t\tkey: e,\n\t\t\t\targ: r,\n\t\t\t\tresolve: o,\n\t\t\t\treject: u,\n\t\t\t\tnext: null\n\t\t\t};\n\t\t\tn ? n = n.next = i : (t = n = i, resume(e, r));\n\t\t});\n\t}, \"function\" != typeof e.return && (this.return = void 0);\n}\nAsyncGenerator.prototype[\"function\" == typeof Symbol && Symbol.asyncIterator || \"@@asyncIterator\"] = function() {\n\treturn this;\n}, AsyncGenerator.prototype.next = function(e) {\n\treturn this._invoke(\"next\", e);\n}, AsyncGenerator.prototype.throw = function(e) {\n\treturn this._invoke(\"throw\", e);\n}, AsyncGenerator.prototype.return = function(e) {\n\treturn this._invoke(\"return\", e);\n};\nconst entries = Object.entries;\nconst setPrototypeOf = Object.setPrototypeOf;\nconst isFrozen = Object.isFrozen;\nconst getPrototypeOf = Object.getPrototypeOf;\nconst getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nlet freeze = Object.freeze;\nlet seal = Object.seal;\nlet create = Object.create;\nlet _ref = typeof Reflect !== \"undefined\" && Reflect;\nlet apply = _ref.apply;\nlet construct = _ref.construct;\nif (!freeze) freeze = function freeze(x) {\n\treturn x;\n};\nif (!seal) seal = function seal(x) {\n\treturn x;\n};\nif (!apply) apply = function apply(func, thisArg) {\n\tfor (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];\n\treturn func.apply(thisArg, args);\n};\nif (!construct) construct = function construct(Func) {\n\tfor (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];\n\treturn new Func(...args);\n};\nconst arrayForEach = unapply(Array.prototype.forEach);\nArray.prototype.indexOf;\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySlice = unapply(Array.prototype.slice);\nconst arraySplice = unapply(Array.prototype.splice);\nconst arrayIsArray = Array.isArray;\nconst setCreate = unconstruct(Set);\nconst setAdd = unapply(Set.prototype.add);\nconst setHas = unapply(Set.prototype.has);\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\nconst numberToString = unapply(Number.prototype.toString);\nconst booleanToString = unapply(Boolean.prototype.toString);\nconst bigintToString = typeof BigInt === \"undefined\" ? null : unapply(BigInt.prototype.toString);\nconst symbolToString = typeof Symbol === \"undefined\" ? null : unapply(Symbol.prototype.toString);\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\nconst objectToString = unapply(Object.prototype.toString);\nconst regExpTest = unapply(RegExp.prototype.test);\nconst typeErrorCreate = unconstruct(TypeError);\n/**\n* Creates a new function that calls the given function with a specified thisArg and arguments.\n*\n* @param func - The function to be wrapped and called.\n* @returns A new function that calls the given function with a specified thisArg and arguments.\n*/\nfunction unapply(func) {\n\treturn function(thisArg) {\n\t\tif (thisArg instanceof RegExp) thisArg.lastIndex = 0;\n\t\tfor (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];\n\t\treturn apply(func, thisArg, args);\n\t};\n}\n/**\n* Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n*\n* @param func - The constructor function to be wrapped and called.\n* @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n*/\nfunction unconstruct(Func) {\n\treturn function() {\n\t\tfor (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];\n\t\treturn construct(Func, args);\n\t};\n}\n/**\n* Add properties to a lookup table\n*\n* @param set - The set to which elements will be added.\n* @param array - The array containing elements to be added to the set.\n* @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n* @returns The modified set with added elements.\n*/\nfunction addToSet(set, array) {\n\tlet transformCaseFunc = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;\n\tif (setPrototypeOf) setPrototypeOf(set, null);\n\tif (!arrayIsArray(array)) return set;\n\tlet l = array.length;\n\twhile (l--) {\n\t\tlet element = array[l];\n\t\tif (typeof element === \"string\") {\n\t\t\tconst lcElement = transformCaseFunc(element);\n\t\t\tif (lcElement !== element) {\n\t\t\t\tif (!isFrozen(array)) array[l] = lcElement;\n\t\t\t\telement = lcElement;\n\t\t\t}\n\t\t}\n\t\tset[element] = true;\n\t}\n\treturn set;\n}\n/**\n* Clean up an array to harden against CSPP\n*\n* @param array - The array to be cleaned.\n* @returns The cleaned version of the array\n*/\nfunction cleanArray(array) {\n\tfor (let index = 0; index < array.length; index++) if (!objectHasOwnProperty(array, index)) array[index] = null;\n\treturn array;\n}\n/**\n* Shallow clone an object\n*\n* @param object - The object to be cloned.\n* @returns A new object that copies the original.\n*/\nfunction clone(object) {\n\tconst newObject = create(null);\n\tfor (const _ref2 of entries(object)) {\n\t\tvar _ref3 = _slicedToArray(_ref2, 2);\n\t\tconst property = _ref3[0];\n\t\tconst value = _ref3[1];\n\t\tif (objectHasOwnProperty(object, property)) {\n\t\t\tif (arrayIsArray(value)) newObject[property] = cleanArray(value);\n\t\t\telse if (value && typeof value === \"object\" && value.constructor === Object) newObject[property] = clone(value);\n\t\t\telse newObject[property] = value;\n\t\t}\n\t}\n\treturn newObject;\n}\n/**\n* Convert non-node values into strings without depending on direct property access.\n*\n* @param value - The value to stringify.\n* @returns A string representation of the provided value.\n*/\nfunction stringifyValue(value) {\n\tswitch (typeof value) {\n\t\tcase \"string\": return value;\n\t\tcase \"number\": return numberToString(value);\n\t\tcase \"boolean\": return booleanToString(value);\n\t\tcase \"bigint\": return bigintToString ? bigintToString(value) : \"0\";\n\t\tcase \"symbol\": return symbolToString ? symbolToString(value) : \"Symbol()\";\n\t\tcase \"undefined\": return objectToString(value);\n\t\tcase \"function\":\n\t\tcase \"object\": {\n\t\t\tif (value === null) return objectToString(value);\n\t\t\tconst valueAsRecord = value;\n\t\t\tconst valueToString = lookupGetter(valueAsRecord, \"toString\");\n\t\t\tif (typeof valueToString === \"function\") {\n\t\t\t\tconst stringified = valueToString(valueAsRecord);\n\t\t\t\treturn typeof stringified === \"string\" ? stringified : objectToString(stringified);\n\t\t\t}\n\t\t\treturn objectToString(value);\n\t\t}\n\t\tdefault: return objectToString(value);\n\t}\n}\n/**\n* This method automatically checks if the prop is function or getter and behaves accordingly.\n*\n* @param object - The object to look up the getter function in its prototype chain.\n* @param prop - The property name for which to find the getter function.\n* @returns The getter function found in the prototype chain or a fallback function.\n*/\nfunction lookupGetter(object, prop) {\n\twhile (object !== null) {\n\t\tconst desc = getOwnPropertyDescriptor(object, prop);\n\t\tif (desc) {\n\t\t\tif (desc.get) return unapply(desc.get);\n\t\t\tif (typeof desc.value === \"function\") return unapply(desc.value);\n\t\t}\n\t\tobject = getPrototypeOf(object);\n\t}\n\tfunction fallbackValue() {\n\t\treturn null;\n\t}\n\treturn fallbackValue;\n}\n/**\n* Like lookupGetter, but for accessor properties only, and returns null\n* instead of a null-returning fallback when no getter exists on the chain.\n* Lets a caller fall back to a direct property read in environments that\n* lack the getter, where a fallback returning null would be indistinguishable\n* from a legitimate null value (e.g. namespaceURI of a no-namespace element).\n*\n* @param object - The object (usually a prototype) to start the lookup at.\n* @param prop - The accessor property name.\n* @returns The unapplied getter, or null if none was found.\n*/\nfunction lookupAccessor(object, prop) {\n\twhile (object !== null) {\n\t\tconst desc = getOwnPropertyDescriptor(object, prop);\n\t\tif (desc) return desc.get ? unapply(desc.get) : null;\n\t\tobject = getPrototypeOf(object);\n\t}\n\treturn null;\n}\nfunction isRegex(value) {\n\ttry {\n\t\tregExpTest(value, \"\");\n\t\treturn true;\n\t} catch (_unused) {\n\t\treturn false;\n\t}\n}\nconst html$1 = freeze([\n\t\"a\",\n\t\"abbr\",\n\t\"acronym\",\n\t\"address\",\n\t\"area\",\n\t\"article\",\n\t\"aside\",\n\t\"audio\",\n\t\"b\",\n\t\"bdi\",\n\t\"bdo\",\n\t\"big\",\n\t\"blink\",\n\t\"blockquote\",\n\t\"body\",\n\t\"br\",\n\t\"button\",\n\t\"canvas\",\n\t\"caption\",\n\t\"center\",\n\t\"cite\",\n\t\"code\",\n\t\"col\",\n\t\"colgroup\",\n\t\"content\",\n\t\"data\",\n\t\"datalist\",\n\t\"dd\",\n\t\"decorator\",\n\t\"del\",\n\t\"details\",\n\t\"dfn\",\n\t\"dialog\",\n\t\"dir\",\n\t\"div\",\n\t\"dl\",\n\t\"dt\",\n\t\"element\",\n\t\"em\",\n\t\"fieldset\",\n\t\"figcaption\",\n\t\"figure\",\n\t\"font\",\n\t\"footer\",\n\t\"form\",\n\t\"h1\",\n\t\"h2\",\n\t\"h3\",\n\t\"h4\",\n\t\"h5\",\n\t\"h6\",\n\t\"head\",\n\t\"header\",\n\t\"hgroup\",\n\t\"hr\",\n\t\"html\",\n\t\"i\",\n\t\"img\",\n\t\"input\",\n\t\"ins\",\n\t\"kbd\",\n\t\"label\",\n\t\"legend\",\n\t\"li\",\n\t\"main\",\n\t\"map\",\n\t\"mark\",\n\t\"marquee\",\n\t\"menu\",\n\t\"menuitem\",\n\t\"meter\",\n\t\"nav\",\n\t\"nobr\",\n\t\"ol\",\n\t\"optgroup\",\n\t\"option\",\n\t\"output\",\n\t\"p\",\n\t\"picture\",\n\t\"pre\",\n\t\"progress\",\n\t\"q\",\n\t\"rp\",\n\t\"rt\",\n\t\"ruby\",\n\t\"s\",\n\t\"samp\",\n\t\"search\",\n\t\"section\",\n\t\"select\",\n\t\"shadow\",\n\t\"slot\",\n\t\"small\",\n\t\"source\",\n\t\"spacer\",\n\t\"span\",\n\t\"strike\",\n\t\"strong\",\n\t\"style\",\n\t\"sub\",\n\t\"summary\",\n\t\"sup\",\n\t\"table\",\n\t\"tbody\",\n\t\"td\",\n\t\"template\",\n\t\"textarea\",\n\t\"tfoot\",\n\t\"th\",\n\t\"thead\",\n\t\"time\",\n\t\"tr\",\n\t\"track\",\n\t\"tt\",\n\t\"u\",\n\t\"ul\",\n\t\"var\",\n\t\"video\",\n\t\"wbr\"\n]);\nconst svg$1 = freeze([\n\t\"svg\",\n\t\"a\",\n\t\"altglyph\",\n\t\"altglyphdef\",\n\t\"altglyphitem\",\n\t\"animatecolor\",\n\t\"animatemotion\",\n\t\"animatetransform\",\n\t\"circle\",\n\t\"clippath\",\n\t\"defs\",\n\t\"desc\",\n\t\"ellipse\",\n\t\"enterkeyhint\",\n\t\"exportparts\",\n\t\"filter\",\n\t\"font\",\n\t\"g\",\n\t\"glyph\",\n\t\"glyphref\",\n\t\"hkern\",\n\t\"image\",\n\t\"inputmode\",\n\t\"line\",\n\t\"lineargradient\",\n\t\"marker\",\n\t\"mask\",\n\t\"metadata\",\n\t\"mpath\",\n\t\"part\",\n\t\"path\",\n\t\"pattern\",\n\t\"polygon\",\n\t\"polyline\",\n\t\"radialgradient\",\n\t\"rect\",\n\t\"stop\",\n\t\"style\",\n\t\"switch\",\n\t\"symbol\",\n\t\"text\",\n\t\"textpath\",\n\t\"title\",\n\t\"tref\",\n\t\"tspan\",\n\t\"view\",\n\t\"vkern\"\n]);\nconst svgFilters = freeze([\n\t\"feBlend\",\n\t\"feColorMatrix\",\n\t\"feComponentTransfer\",\n\t\"feComposite\",\n\t\"feConvolveMatrix\",\n\t\"feDiffuseLighting\",\n\t\"feDisplacementMap\",\n\t\"feDistantLight\",\n\t\"feDropShadow\",\n\t\"feFlood\",\n\t\"feFuncA\",\n\t\"feFuncB\",\n\t\"feFuncG\",\n\t\"feFuncR\",\n\t\"feGaussianBlur\",\n\t\"feImage\",\n\t\"feMerge\",\n\t\"feMergeNode\",\n\t\"feMorphology\",\n\t\"feOffset\",\n\t\"fePointLight\",\n\t\"feSpecularLighting\",\n\t\"feSpotLight\",\n\t\"feTile\",\n\t\"feTurbulence\"\n]);\nconst svgDisallowed = freeze([\n\t\"animate\",\n\t\"color-profile\",\n\t\"cursor\",\n\t\"discard\",\n\t\"font-face\",\n\t\"font-face-format\",\n\t\"font-face-name\",\n\t\"font-face-src\",\n\t\"font-face-uri\",\n\t\"foreignobject\",\n\t\"hatch\",\n\t\"hatchpath\",\n\t\"mesh\",\n\t\"meshgradient\",\n\t\"meshpatch\",\n\t\"meshrow\",\n\t\"missing-glyph\",\n\t\"script\",\n\t\"set\",\n\t\"solidcolor\",\n\t\"unknown\",\n\t\"use\"\n]);\nconst mathMl$1 = freeze([\n\t\"math\",\n\t\"menclose\",\n\t\"merror\",\n\t\"mfenced\",\n\t\"mfrac\",\n\t\"mglyph\",\n\t\"mi\",\n\t\"mlabeledtr\",\n\t\"mmultiscripts\",\n\t\"mn\",\n\t\"mo\",\n\t\"mover\",\n\t\"mpadded\",\n\t\"mphantom\",\n\t\"mroot\",\n\t\"mrow\",\n\t\"ms\",\n\t\"mspace\",\n\t\"msqrt\",\n\t\"mstyle\",\n\t\"msub\",\n\t\"msup\",\n\t\"msubsup\",\n\t\"mtable\",\n\t\"mtd\",\n\t\"mtext\",\n\t\"mtr\",\n\t\"munder\",\n\t\"munderover\",\n\t\"mprescripts\"\n]);\nconst mathMlDisallowed = freeze([\n\t\"maction\",\n\t\"maligngroup\",\n\t\"malignmark\",\n\t\"mlongdiv\",\n\t\"mscarries\",\n\t\"mscarry\",\n\t\"msgroup\",\n\t\"mstack\",\n\t\"msline\",\n\t\"msrow\",\n\t\"semantics\",\n\t\"annotation\",\n\t\"annotation-xml\",\n\t\"mprescripts\",\n\t\"none\"\n]);\nconst text = freeze([\"#text\"]);\nconst html = freeze([\n\t\"accept\",\n\t\"action\",\n\t\"align\",\n\t\"alt\",\n\t\"autocapitalize\",\n\t\"autocomplete\",\n\t\"autopictureinpicture\",\n\t\"autoplay\",\n\t\"background\",\n\t\"bgcolor\",\n\t\"border\",\n\t\"capture\",\n\t\"cellpadding\",\n\t\"cellspacing\",\n\t\"checked\",\n\t\"cite\",\n\t\"class\",\n\t\"clear\",\n\t\"color\",\n\t\"cols\",\n\t\"colspan\",\n\t\"command\",\n\t\"commandfor\",\n\t\"controls\",\n\t\"controlslist\",\n\t\"coords\",\n\t\"crossorigin\",\n\t\"datetime\",\n\t\"decoding\",\n\t\"default\",\n\t\"dir\",\n\t\"disabled\",\n\t\"disablepictureinpicture\",\n\t\"disableremoteplayback\",\n\t\"download\",\n\t\"draggable\",\n\t\"enctype\",\n\t\"enterkeyhint\",\n\t\"exportparts\",\n\t\"face\",\n\t\"for\",\n\t\"headers\",\n\t\"height\",\n\t\"hidden\",\n\t\"high\",\n\t\"href\",\n\t\"hreflang\",\n\t\"id\",\n\t\"inert\",\n\t\"inputmode\",\n\t\"integrity\",\n\t\"ismap\",\n\t\"kind\",\n\t\"label\",\n\t\"lang\",\n\t\"list\",\n\t\"loading\",\n\t\"loop\",\n\t\"low\",\n\t\"max\",\n\t\"maxlength\",\n\t\"media\",\n\t\"method\",\n\t\"min\",\n\t\"minlength\",\n\t\"multiple\",\n\t\"muted\",\n\t\"name\",\n\t\"nonce\",\n\t\"noshade\",\n\t\"novalidate\",\n\t\"nowrap\",\n\t\"open\",\n\t\"optimum\",\n\t\"part\",\n\t\"pattern\",\n\t\"placeholder\",\n\t\"playsinline\",\n\t\"popover\",\n\t\"popovertarget\",\n\t\"popovertargetaction\",\n\t\"poster\",\n\t\"preload\",\n\t\"pubdate\",\n\t\"radiogroup\",\n\t\"readonly\",\n\t\"rel\",\n\t\"required\",\n\t\"rev\",\n\t\"reversed\",\n\t\"role\",\n\t\"rows\",\n\t\"rowspan\",\n\t\"spellcheck\",\n\t\"scope\",\n\t\"selected\",\n\t\"shape\",\n\t\"size\",\n\t\"sizes\",\n\t\"slot\",\n\t\"span\",\n\t\"srclang\",\n\t\"start\",\n\t\"src\",\n\t\"srcset\",\n\t\"step\",\n\t\"style\",\n\t\"summary\",\n\t\"tabindex\",\n\t\"title\",\n\t\"translate\",\n\t\"type\",\n\t\"usemap\",\n\t\"valign\",\n\t\"value\",\n\t\"width\",\n\t\"wrap\",\n\t\"xmlns\"\n]);\nconst svg = freeze([\n\t\"accent-height\",\n\t\"accumulate\",\n\t\"additive\",\n\t\"alignment-baseline\",\n\t\"amplitude\",\n\t\"ascent\",\n\t\"attributename\",\n\t\"attributetype\",\n\t\"azimuth\",\n\t\"basefrequency\",\n\t\"baseline-shift\",\n\t\"begin\",\n\t\"bias\",\n\t\"by\",\n\t\"class\",\n\t\"clip\",\n\t\"clippathunits\",\n\t\"clip-path\",\n\t\"clip-rule\",\n\t\"color\",\n\t\"color-interpolation\",\n\t\"color-interpolation-filters\",\n\t\"color-profile\",\n\t\"color-rendering\",\n\t\"cx\",\n\t\"cy\",\n\t\"d\",\n\t\"dx\",\n\t\"dy\",\n\t\"diffuseconstant\",\n\t\"direction\",\n\t\"display\",\n\t\"divisor\",\n\t\"dominant-baseline\",\n\t\"dur\",\n\t\"edgemode\",\n\t\"elevation\",\n\t\"end\",\n\t\"exponent\",\n\t\"fill\",\n\t\"fill-opacity\",\n\t\"fill-rule\",\n\t\"filter\",\n\t\"filterunits\",\n\t\"flood-color\",\n\t\"flood-opacity\",\n\t\"font-family\",\n\t\"font-size\",\n\t\"font-size-adjust\",\n\t\"font-stretch\",\n\t\"font-style\",\n\t\"font-variant\",\n\t\"font-weight\",\n\t\"fx\",\n\t\"fy\",\n\t\"g1\",\n\t\"g2\",\n\t\"glyph-name\",\n\t\"glyphref\",\n\t\"gradientunits\",\n\t\"gradienttransform\",\n\t\"height\",\n\t\"href\",\n\t\"id\",\n\t\"image-rendering\",\n\t\"in\",\n\t\"in2\",\n\t\"intercept\",\n\t\"k\",\n\t\"k1\",\n\t\"k2\",\n\t\"k3\",\n\t\"k4\",\n\t\"kerning\",\n\t\"keypoints\",\n\t\"keysplines\",\n\t\"keytimes\",\n\t\"lang\",\n\t\"lengthadjust\",\n\t\"letter-spacing\",\n\t\"kernelmatrix\",\n\t\"kernelunitlength\",\n\t\"lighting-color\",\n\t\"local\",\n\t\"marker-end\",\n\t\"marker-mid\",\n\t\"marker-start\",\n\t\"markerheight\",\n\t\"markerunits\",\n\t\"markerwidth\",\n\t\"maskcontentunits\",\n\t\"maskunits\",\n\t\"max\",\n\t\"mask\",\n\t\"mask-type\",\n\t\"media\",\n\t\"method\",\n\t\"mode\",\n\t\"min\",\n\t\"name\",\n\t\"numoctaves\",\n\t\"offset\",\n\t\"operator\",\n\t\"opacity\",\n\t\"order\",\n\t\"orient\",\n\t\"orientation\",\n\t\"origin\",\n\t\"overflow\",\n\t\"paint-order\",\n\t\"path\",\n\t\"pathlength\",\n\t\"patterncontentunits\",\n\t\"patterntransform\",\n\t\"patternunits\",\n\t\"pointer-events\",\n\t\"points\",\n\t\"preservealpha\",\n\t\"preserveaspectratio\",\n\t\"primitiveunits\",\n\t\"r\",\n\t\"rx\",\n\t\"ry\",\n\t\"radius\",\n\t\"refx\",\n\t\"refy\",\n\t\"repeatcount\",\n\t\"repeatdur\",\n\t\"restart\",\n\t\"result\",\n\t\"rotate\",\n\t\"scale\",\n\t\"seed\",\n\t\"shape-rendering\",\n\t\"slope\",\n\t\"specularconstant\",\n\t\"specularexponent\",\n\t\"spreadmethod\",\n\t\"startoffset\",\n\t\"stddeviation\",\n\t\"stitchtiles\",\n\t\"stop-color\",\n\t\"stop-opacity\",\n\t\"stroke-dasharray\",\n\t\"stroke-dashoffset\",\n\t\"stroke-linecap\",\n\t\"stroke-linejoin\",\n\t\"stroke-miterlimit\",\n\t\"stroke-opacity\",\n\t\"stroke\",\n\t\"stroke-width\",\n\t\"style\",\n\t\"surfacescale\",\n\t\"systemlanguage\",\n\t\"tabindex\",\n\t\"tablevalues\",\n\t\"targetx\",\n\t\"targety\",\n\t\"transform\",\n\t\"transform-origin\",\n\t\"text-anchor\",\n\t\"text-decoration\",\n\t\"text-orientation\",\n\t\"text-rendering\",\n\t\"textlength\",\n\t\"type\",\n\t\"u1\",\n\t\"u2\",\n\t\"unicode\",\n\t\"values\",\n\t\"vector-effect\",\n\t\"viewbox\",\n\t\"visibility\",\n\t\"version\",\n\t\"vert-adv-y\",\n\t\"vert-origin-x\",\n\t\"vert-origin-y\",\n\t\"width\",\n\t\"word-spacing\",\n\t\"wrap\",\n\t\"writing-mode\",\n\t\"xchannelselector\",\n\t\"ychannelselector\",\n\t\"x\",\n\t\"x1\",\n\t\"x2\",\n\t\"xmlns\",\n\t\"y\",\n\t\"y1\",\n\t\"y2\",\n\t\"z\",\n\t\"zoomandpan\"\n]);\nconst mathMl = freeze([\n\t\"accent\",\n\t\"accentunder\",\n\t\"align\",\n\t\"bevelled\",\n\t\"close\",\n\t\"columnalign\",\n\t\"columnlines\",\n\t\"columnspacing\",\n\t\"columnspan\",\n\t\"denomalign\",\n\t\"depth\",\n\t\"dir\",\n\t\"display\",\n\t\"displaystyle\",\n\t\"encoding\",\n\t\"fence\",\n\t\"frame\",\n\t\"height\",\n\t\"href\",\n\t\"id\",\n\t\"largeop\",\n\t\"length\",\n\t\"linethickness\",\n\t\"lquote\",\n\t\"lspace\",\n\t\"mathbackground\",\n\t\"mathcolor\",\n\t\"mathsize\",\n\t\"mathvariant\",\n\t\"maxsize\",\n\t\"minsize\",\n\t\"movablelimits\",\n\t\"notation\",\n\t\"numalign\",\n\t\"open\",\n\t\"rowalign\",\n\t\"rowlines\",\n\t\"rowspacing\",\n\t\"rowspan\",\n\t\"rspace\",\n\t\"rquote\",\n\t\"scriptlevel\",\n\t\"scriptminsize\",\n\t\"scriptsizemultiplier\",\n\t\"selection\",\n\t\"separator\",\n\t\"separators\",\n\t\"stretchy\",\n\t\"subscriptshift\",\n\t\"supscriptshift\",\n\t\"symmetric\",\n\t\"voffset\",\n\t\"width\",\n\t\"xmlns\"\n]);\nconst xml = freeze([\n\t\"xlink:href\",\n\t\"xml:id\",\n\t\"xlink:title\",\n\t\"xml:space\",\n\t\"xmlns:xlink\"\n]);\nconst MUSTACHE_EXPR = seal(/{{[\\w\\W]*|^[\\w\\W]*}}/g);\nconst ERB_EXPR = seal(/<%[\\w\\W]*|^[\\w\\W]*%>/g);\nconst TMPLIT_EXPR = seal(/\\${[\\w\\W]*/g);\nconst DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/);\nconst ARIA_ATTR = seal(/^aria-[\\-\\w]+$/);\nconst IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i);\nconst IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nconst ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g);\nconst DOCTYPE_NAME = seal(/^html$/i);\nconst CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\nconst ELEMENT_MARKUP_PROBE = seal(/<[/\\w!]/g);\nconst COMMENT_MARKUP_PROBE = seal(/<[/\\w]/g);\nconst FALLBACK_TAG_CLOSE = seal(/<\\/no(script|embed|frames)/i);\nconst SELF_CLOSING_TAG = seal(/\\/>/i);\nconst NODE_TYPE = {\n\telement: 1,\n\tattribute: 2,\n\ttext: 3,\n\tcdataSection: 4,\n\tentityReference: 5,\n\tentityNode: 6,\n\tprocessingInstruction: 7,\n\tcomment: 8,\n\tdocument: 9,\n\tdocumentType: 10,\n\tdocumentFragment: 11,\n\tnotation: 12\n};\nconst LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, [\n\t\"style\",\n\t\"script\",\n\t\"xmp\",\n\t\"iframe\",\n\t\"noembed\",\n\t\"noframes\",\n\t\"plaintext\",\n\t\"noscript\"\n]));\nconst getGlobal = function getGlobal() {\n\treturn typeof window === \"undefined\" ? null : window;\n};\n/**\n* Creates a no-op policy for internal use only.\n* Don't export this function outside this module!\n* @param trustedTypes The policy factory.\n* @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n* @return The policy created (or null, if Trusted Types\n* are not supported or creating the policy failed).\n*/\nconst _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n\tif (typeof trustedTypes !== \"object\" || typeof trustedTypes.createPolicy !== \"function\") return null;\n\tlet suffix = null;\n\tconst ATTR_NAME = \"data-tt-policy-suffix\";\n\tif (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) suffix = purifyHostElement.getAttribute(ATTR_NAME);\n\tconst policyName = \"dompurify\" + (suffix ? \"#\" + suffix : \"\");\n\ttry {\n\t\treturn trustedTypes.createPolicy(policyName, {\n\t\t\tcreateHTML(html) {\n\t\t\t\treturn html;\n\t\t\t},\n\t\t\tcreateScriptURL(scriptUrl) {\n\t\t\t\treturn scriptUrl;\n\t\t\t}\n\t\t});\n\t} catch (_) {\n\t\tconsole.warn(\"TrustedTypes policy \" + policyName + \" could not be created.\");\n\t\treturn null;\n\t}\n};\nconst _createHooksMap = function _createHooksMap() {\n\treturn {\n\t\tafterSanitizeAttributes: [],\n\t\tafterSanitizeElements: [],\n\t\tafterSanitizeShadowDOM: [],\n\t\tbeforeSanitizeAttributes: [],\n\t\tbeforeSanitizeElements: [],\n\t\tbeforeSanitizeShadowDOM: [],\n\t\tuponSanitizeAttribute: [],\n\t\tuponSanitizeElement: [],\n\t\tuponSanitizeShadowNode: []\n\t};\n};\n/**\n* Resolve a set-valued configuration option: a fresh set built from\n* cfg[key] when it is an own array property (seeded with a clone of\n* options.base when given, case-normalized via options.transform),\n* the fallback set otherwise.\n*\n* @param cfg the cloned, prototype-free configuration object\n* @param key the configuration property to read\n* @param fallback the set to use when the option is absent or not an array\n* @param options transform and optional base set to merge into\n* @returns the resolved set\n*/\nconst _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {\n\treturn objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;\n};\n/**\n* Resolve an object-valued configuration option: a prototype-free clone\n* of cfg[key] when it is an own, truthy object property, else a fresh\n* fallback built by makeFallback (fresh on every parse, so a previous\n* parse can never leak state into the next one).\n*\n* @param cfg the cloned, prototype-free configuration object\n* @param key the configuration property to read\n* @param makeFallback builds the fallback value when the option is absent\n* @returns the resolved object\n*/\nconst _resolveObjectOption = function _resolveObjectOption(cfg, key, makeFallback) {\n\tconst value = objectHasOwnProperty(cfg, key) ? cfg[key] : void 0;\n\treturn value && typeof value === \"object\" ? clone(value) : makeFallback();\n};\nfunction createDOMPurify() {\n\tlet window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();\n\tconst DOMPurify = (root) => createDOMPurify(root);\n\tDOMPurify.version = \"3.4.17\";\n\tDOMPurify.removed = [];\n\tif (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {\n\t\tDOMPurify.isSupported = false;\n\t\treturn DOMPurify;\n\t}\n\tlet document = window.document;\n\tconst originalDocument = document;\n\tconst currentScript = originalDocument.currentScript;\n\twindow.DocumentFragment;\n\tconst HTMLTemplateElement = window.HTMLTemplateElement, Node = window.Node, Element = window.Element, NodeFilter = window.NodeFilter;\n\twindow.NamedNodeMap === void 0 && (window.NamedNodeMap || window.MozNamedAttrMap);\n\twindow.HTMLFormElement;\n\tconst DOMParser = window.DOMParser, trustedTypes = window.trustedTypes;\n\tconst ElementPrototype = Element.prototype;\n\tconst cloneNode = lookupGetter(ElementPrototype, \"cloneNode\");\n\tconst remove = lookupGetter(ElementPrototype, \"remove\");\n\tconst removeAttributeNode = lookupGetter(ElementPrototype, \"removeAttributeNode\");\n\tconst getNextSibling = lookupGetter(ElementPrototype, \"nextSibling\");\n\tconst getChildNodes = lookupGetter(ElementPrototype, \"childNodes\");\n\tconst getParentNode = lookupGetter(ElementPrototype, \"parentNode\");\n\tconst getShadowRoot = lookupGetter(ElementPrototype, \"shadowRoot\");\n\tconst getAttributes = lookupGetter(ElementPrototype, \"attributes\");\n\tconst getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, \"nodeType\") : null;\n\tconst getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, \"nodeName\") : null;\n\tconst getOwnerDocument = Node && Node.prototype ? lookupGetter(Node.prototype, \"ownerDocument\") : null;\n\tconst _readNodeType = function _readNodeType(node) {\n\t\treturn getNodeType ? getNodeType(node) : node.nodeType;\n\t};\n\tconst _readNodeName = function _readNodeName(node) {\n\t\treturn getNodeName ? getNodeName(node) : node.nodeName;\n\t};\n\tconst getNamespaceURI = lookupAccessor(ElementPrototype, \"namespaceURI\");\n\tconst _readNamespaceURI = function _readNamespaceURI(element) {\n\t\treturn getNamespaceURI ? getNamespaceURI(element) : element.namespaceURI;\n\t};\n\tif (typeof HTMLTemplateElement === \"function\") {\n\t\tconst template = document.createElement(\"template\");\n\t\tif (template.content && template.content.ownerDocument) document = template.content.ownerDocument;\n\t}\n\tlet trustedTypesPolicy;\n\tlet emptyHTML = \"\";\n\tlet defaultTrustedTypesPolicy;\n\tlet defaultTrustedTypesPolicyResolved = false;\n\tlet IN_TRUSTED_TYPES_POLICY = 0;\n\tconst _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {\n\t\tif (IN_TRUSTED_TYPES_POLICY > 0) throw typeErrorCreate(\"A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \\\"DOMPurify and Trusted Types\\\" section of the README.\");\n\t};\n\tconst _createTrustedHTML = function _createTrustedHTML(html) {\n\t\t_assertNotInTrustedTypesPolicy();\n\t\tIN_TRUSTED_TYPES_POLICY++;\n\t\ttry {\n\t\t\treturn trustedTypesPolicy.createHTML(html);\n\t\t} finally {\n\t\t\tIN_TRUSTED_TYPES_POLICY--;\n\t\t}\n\t};\n\tconst _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {\n\t\t_assertNotInTrustedTypesPolicy();\n\t\tIN_TRUSTED_TYPES_POLICY++;\n\t\ttry {\n\t\t\treturn trustedTypesPolicy.createScriptURL(scriptUrl);\n\t\t} finally {\n\t\t\tIN_TRUSTED_TYPES_POLICY--;\n\t\t}\n\t};\n\tconst _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {\n\t\tif (!defaultTrustedTypesPolicyResolved) {\n\t\t\tdefaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n\t\t\tdefaultTrustedTypesPolicyResolved = true;\n\t\t}\n\t\treturn defaultTrustedTypesPolicy;\n\t};\n\tconst _document = document, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;\n\tconst importNode = originalDocument.importNode;\n\tlet hooks = _createHooksMap();\n\t/**\n\t* Expose whether this browser supports running the full DOMPurify.\n\t*/\n\tDOMPurify.isSupported = typeof entries === \"function\" && typeof getParentNode === \"function\" && implementation && implementation.createHTMLDocument !== void 0;\n\tconst MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, TMPLIT_EXPR$1 = TMPLIT_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE, CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;\n\tlet IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n\t/**\n\t* We consider the elements and attributes below to be safe. Ideally\n\t* don't add any new ones but feel free to remove unwanted ones.\n\t*/\n\tlet ALLOWED_TAGS = null;\n\tconst DEFAULT_ALLOWED_TAGS = addToSet({}, [\n\t\t...html$1,\n\t\t...svg$1,\n\t\t...svgFilters,\n\t\t...mathMl$1,\n\t\t...text\n\t]);\n\tlet ALLOWED_ATTR = null;\n\tconst DEFAULT_ALLOWED_ATTR = addToSet({}, [\n\t\t...html,\n\t\t...svg,\n\t\t...mathMl,\n\t\t...xml\n\t]);\n\tlet CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n\t\ttagNameCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tattributeNameCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tallowCustomizedBuiltInElements: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: false\n\t\t}\n\t}));\n\tlet FORBID_TAGS = null;\n\tlet FORBID_ATTR = null;\n\tconst EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {\n\t\ttagCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t},\n\t\tattributeCheck: {\n\t\t\twritable: true,\n\t\t\tconfigurable: false,\n\t\t\tenumerable: true,\n\t\t\tvalue: null\n\t\t}\n\t}));\n\tlet ALLOW_ARIA_ATTR = true;\n\tlet ALLOW_DATA_ATTR = true;\n\tlet ALLOW_UNKNOWN_PROTOCOLS = false;\n\tlet ALLOW_SELF_CLOSE_IN_ATTR = true;\n\tlet SAFE_FOR_TEMPLATES = false;\n\tlet SAFE_FOR_XML = true;\n\tlet WHOLE_DOCUMENT = false;\n\tlet SET_CONFIG = false;\n\tlet SET_CONFIG_ALLOWED_TAGS = null;\n\tlet SET_CONFIG_ALLOWED_ATTR = null;\n\tlet FORCE_BODY = false;\n\tlet RETURN_DOM = false;\n\tlet RETURN_DOM_FRAGMENT = false;\n\tlet RETURN_TRUSTED_TYPE = false;\n\tlet SANITIZE_DOM = true;\n\tlet SANITIZE_NAMED_PROPS = false;\n\tconst SANITIZE_NAMED_PROPS_PREFIX = \"user-content-\";\n\tlet KEEP_CONTENT = true;\n\tlet IN_PLACE = false;\n\tlet IN_PLACE_VISITED = null;\n\tlet USE_PROFILES = {};\n\tlet FORBID_CONTENTS = null;\n\tconst DEFAULT_FORBID_CONTENTS = addToSet({}, [\n\t\t\"annotation-xml\",\n\t\t\"audio\",\n\t\t\"colgroup\",\n\t\t\"desc\",\n\t\t\"foreignobject\",\n\t\t\"head\",\n\t\t\"iframe\",\n\t\t\"math\",\n\t\t\"mi\",\n\t\t\"mn\",\n\t\t\"mo\",\n\t\t\"ms\",\n\t\t\"mtext\",\n\t\t\"noembed\",\n\t\t\"noframes\",\n\t\t\"noscript\",\n\t\t\"plaintext\",\n\t\t\"script\",\n\t\t\"selectedcontent\",\n\t\t\"style\",\n\t\t\"svg\",\n\t\t\"template\",\n\t\t\"thead\",\n\t\t\"title\",\n\t\t\"video\",\n\t\t\"xmp\"\n\t]);\n\tlet DATA_URI_TAGS = null;\n\tconst DEFAULT_DATA_URI_TAGS = addToSet({}, [\n\t\t\"audio\",\n\t\t\"video\",\n\t\t\"img\",\n\t\t\"source\",\n\t\t\"image\",\n\t\t\"track\"\n\t]);\n\tlet URI_SAFE_ATTRIBUTES = null;\n\tconst DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [\n\t\t\"alt\",\n\t\t\"class\",\n\t\t\"for\",\n\t\t\"id\",\n\t\t\"label\",\n\t\t\"name\",\n\t\t\"pattern\",\n\t\t\"placeholder\",\n\t\t\"role\",\n\t\t\"summary\",\n\t\t\"title\",\n\t\t\"value\",\n\t\t\"style\",\n\t\t\"xmlns\"\n\t]);\n\tconst MATHML_NAMESPACE = \"http://www.w3.org/1998/Math/MathML\";\n\tconst SVG_NAMESPACE = \"http://www.w3.org/2000/svg\";\n\tconst HTML_NAMESPACE = \"http://www.w3.org/1999/xhtml\";\n\tlet NAMESPACE = HTML_NAMESPACE;\n\tlet IS_EMPTY_INPUT = false;\n\tlet ALLOWED_NAMESPACES = null;\n\tconst DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [\n\t\tMATHML_NAMESPACE,\n\t\tSVG_NAMESPACE,\n\t\tHTML_NAMESPACE\n\t], stringToString);\n\tconst DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze([\n\t\t\"mi\",\n\t\t\"mo\",\n\t\t\"mn\",\n\t\t\"ms\",\n\t\t\"mtext\"\n\t]);\n\tlet MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);\n\tconst DEFAULT_HTML_INTEGRATION_POINTS = freeze([\"annotation-xml\"]);\n\tlet HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);\n\tconst COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [\n\t\t\"title\",\n\t\t\"style\",\n\t\t\"font\",\n\t\t\"a\",\n\t\t\"script\"\n\t]);\n\tlet PARSER_MEDIA_TYPE = null;\n\tconst SUPPORTED_PARSER_MEDIA_TYPES = [\"application/xhtml+xml\", \"text/html\"];\n\tconst DEFAULT_PARSER_MEDIA_TYPE = \"text/html\";\n\tlet transformCaseFunc = null;\n\tlet CONFIG = null;\n\tconst formElement = document.createElement(\"form\");\n\tconst isRegexOrFunction = function isRegexOrFunction(testValue) {\n\t\treturn testValue instanceof RegExp || testValue instanceof Function;\n\t};\n\t/**\n\t* _parseConfig\n\t*\n\t* @param cfg optional config literal\n\t*/\n\tconst _parseConfig = function _parseConfig() {\n\t\tlet cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n\t\tif (CONFIG && CONFIG === cfg) return;\n\t\tif (!cfg || typeof cfg !== \"object\") cfg = {};\n\t\tcfg = clone(cfg);\n\t\tPARSER_MEDIA_TYPE = SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n\t\ttransformCaseFunc = PARSER_MEDIA_TYPE === \"application/xhtml+xml\" ? stringToString : stringToLowerCase;\n\t\tALLOWED_TAGS = _resolveSetOption(cfg, \"ALLOWED_TAGS\", DEFAULT_ALLOWED_TAGS, { transform: transformCaseFunc });\n\t\tALLOWED_ATTR = _resolveSetOption(cfg, \"ALLOWED_ATTR\", DEFAULT_ALLOWED_ATTR, { transform: transformCaseFunc });\n\t\tALLOWED_NAMESPACES = _resolveSetOption(cfg, \"ALLOWED_NAMESPACES\", DEFAULT_ALLOWED_NAMESPACES, { transform: stringToString });\n\t\tURI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, \"ADD_URI_SAFE_ATTR\", DEFAULT_URI_SAFE_ATTRIBUTES, {\n\t\t\ttransform: transformCaseFunc,\n\t\t\tbase: DEFAULT_URI_SAFE_ATTRIBUTES\n\t\t});\n\t\tDATA_URI_TAGS = _resolveSetOption(cfg, \"ADD_DATA_URI_TAGS\", DEFAULT_DATA_URI_TAGS, {\n\t\t\ttransform: transformCaseFunc,\n\t\t\tbase: DEFAULT_DATA_URI_TAGS\n\t\t});\n\t\tFORBID_CONTENTS = _resolveSetOption(cfg, \"FORBID_CONTENTS\", DEFAULT_FORBID_CONTENTS, { transform: transformCaseFunc });\n\t\tFORBID_TAGS = _resolveSetOption(cfg, \"FORBID_TAGS\", clone({}), { transform: transformCaseFunc });\n\t\tFORBID_ATTR = _resolveSetOption(cfg, \"FORBID_ATTR\", clone({}), { transform: transformCaseFunc });\n\t\tUSE_PROFILES = objectHasOwnProperty(cfg, \"USE_PROFILES\") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === \"object\" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;\n\t\tALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;\n\t\tALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;\n\t\tALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;\n\t\tALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false;\n\t\tSAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;\n\t\tSAFE_FOR_XML = cfg.SAFE_FOR_XML !== false;\n\t\tWHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;\n\t\tRETURN_DOM = cfg.RETURN_DOM || false;\n\t\tRETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;\n\t\tRETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false;\n\t\tFORCE_BODY = cfg.FORCE_BODY || false;\n\t\tSANITIZE_DOM = cfg.SANITIZE_DOM !== false;\n\t\tSANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;\n\t\tKEEP_CONTENT = cfg.KEEP_CONTENT !== false;\n\t\tIN_PLACE = cfg.IN_PLACE || false;\n\t\tIS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;\n\t\tNAMESPACE = typeof cfg.NAMESPACE === \"string\" ? cfg.NAMESPACE : HTML_NAMESPACE;\n\t\tMATHML_TEXT_INTEGRATION_POINTS = _resolveObjectOption(cfg, \"MATHML_TEXT_INTEGRATION_POINTS\", () => addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS));\n\t\tHTML_INTEGRATION_POINTS = _resolveObjectOption(cfg, \"HTML_INTEGRATION_POINTS\", () => addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS));\n\t\tconst customElementHandling = _resolveObjectOption(cfg, \"CUSTOM_ELEMENT_HANDLING\", () => create(null));\n\t\tCUSTOM_ELEMENT_HANDLING = create(null);\n\t\tif (objectHasOwnProperty(customElementHandling, \"tagNameCheck\") && isRegexOrFunction(customElementHandling.tagNameCheck)) CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;\n\t\tif (objectHasOwnProperty(customElementHandling, \"attributeNameCheck\") && isRegexOrFunction(customElementHandling.attributeNameCheck)) CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;\n\t\tif (objectHasOwnProperty(customElementHandling, \"allowCustomizedBuiltInElements\") && typeof customElementHandling.allowCustomizedBuiltInElements === \"boolean\") CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;\n\t\tseal(CUSTOM_ELEMENT_HANDLING);\n\t\tif (SAFE_FOR_TEMPLATES) ALLOW_DATA_ATTR = false;\n\t\tif (RETURN_DOM_FRAGMENT) RETURN_DOM = true;\n\t\tif (USE_PROFILES) {\n\t\t\tALLOWED_TAGS = addToSet({}, text);\n\t\t\tALLOWED_ATTR = create(null);\n\t\t\tif (USE_PROFILES.html === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, html$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, html);\n\t\t\t}\n\t\t\tif (USE_PROFILES.svg === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, svg$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, svg);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t\tif (USE_PROFILES.svgFilters === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, svgFilters);\n\t\t\t\taddToSet(ALLOWED_ATTR, svg);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t\tif (USE_PROFILES.mathMl === true) {\n\t\t\t\taddToSet(ALLOWED_TAGS, mathMl$1);\n\t\t\t\taddToSet(ALLOWED_ATTR, mathMl);\n\t\t\t\taddToSet(ALLOWED_ATTR, xml);\n\t\t\t}\n\t\t}\n\t\tEXTRA_ELEMENT_HANDLING.tagCheck = null;\n\t\tEXTRA_ELEMENT_HANDLING.attributeCheck = null;\n\t\tif (objectHasOwnProperty(cfg, \"ADD_TAGS\")) {\n\t\t\tif (typeof cfg.ADD_TAGS === \"function\") EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;\n\t\t\telse if (arrayIsArray(cfg.ADD_TAGS)) {\n\t\t\t\tif (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) ALLOWED_TAGS = clone(ALLOWED_TAGS);\n\t\t\t\taddToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n\t\t\t}\n\t\t}\n\t\tif (objectHasOwnProperty(cfg, \"ADD_ATTR\")) {\n\t\t\tif (typeof cfg.ADD_ATTR === \"function\") EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;\n\t\t\telse if (arrayIsArray(cfg.ADD_ATTR)) {\n\t\t\t\tif (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) ALLOWED_ATTR = clone(ALLOWED_ATTR);\n\t\t\t\taddToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n\t\t\t}\n\t\t}\n\t\tif (objectHasOwnProperty(cfg, \"ADD_FORBID_CONTENTS\") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {\n\t\t\tif (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) FORBID_CONTENTS = clone(FORBID_CONTENTS);\n\t\t\taddToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);\n\t\t}\n\t\tif (KEEP_CONTENT) ALLOWED_TAGS[\"#text\"] = true;\n\t\tif (WHOLE_DOCUMENT) addToSet(ALLOWED_TAGS, [\n\t\t\t\"html\",\n\t\t\t\"head\",\n\t\t\t\"body\"\n\t\t]);\n\t\tif (ALLOWED_TAGS.table) {\n\t\t\taddToSet(ALLOWED_TAGS, [\"tbody\"]);\n\t\t\tdelete FORBID_TAGS.tbody;\n\t\t}\n\t\tif (cfg.TRUSTED_TYPES_POLICY) {\n\t\t\tif (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== \"function\") throw typeErrorCreate(\"TRUSTED_TYPES_POLICY configuration option must provide a \\\"createHTML\\\" hook.\");\n\t\t\tif (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== \"function\") throw typeErrorCreate(\"TRUSTED_TYPES_POLICY configuration option must provide a \\\"createScriptURL\\\" hook.\");\n\t\t\tconst previousTrustedTypesPolicy = trustedTypesPolicy;\n\t\t\ttrustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\t\t\ttry {\n\t\t\t\temptyHTML = _createTrustedHTML(\"\");\n\t\t\t} catch (error) {\n\t\t\t\ttrustedTypesPolicy = previousTrustedTypesPolicy;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} else if (cfg.TRUSTED_TYPES_POLICY === null) {\n\t\t\ttrustedTypesPolicy = void 0;\n\t\t\temptyHTML = \"\";\n\t\t} else {\n\t\t\tif (trustedTypesPolicy === void 0) trustedTypesPolicy = _getDefaultTrustedTypesPolicy();\n\t\t\tif (trustedTypesPolicy && typeof emptyHTML === \"string\") emptyHTML = _createTrustedHTML(\"\");\n\t\t}\n\t\tif (freeze) freeze(cfg);\n\t\tCONFIG = cfg;\n\t};\n\tconst ALL_SVG_TAGS = addToSet({}, [\n\t\t...svg$1,\n\t\t...svgFilters,\n\t\t...svgDisallowed\n\t]);\n\tconst ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n\t/**\n\t* Namespace rules for an element in the SVG namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === HTML_NAMESPACE) return tagName === \"svg\";\n\t\tif (parent.namespaceURI === MATHML_NAMESPACE) return tagName === \"svg\" && (parentTagName === \"annotation-xml\" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n\t\treturn Boolean(ALL_SVG_TAGS[tagName]);\n\t};\n\t/**\n\t* Namespace rules for an element in the MathML namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === HTML_NAMESPACE) return tagName === \"math\";\n\t\tif (parent.namespaceURI === SVG_NAMESPACE) return tagName === \"math\" && HTML_INTEGRATION_POINTS[parentTagName];\n\t\treturn Boolean(ALL_MATHML_TAGS[tagName]);\n\t};\n\t/**\n\t* Namespace rules for an element in the HTML namespace.\n\t*\n\t* @param tagName the element's lowercase tag name\n\t* @param parent the (possibly simulated) parent node\n\t* @param parentTagName the parent's lowercase tag name\n\t* @returns true if a spec-compliant parser could produce this element\n\t*/\n\tconst _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {\n\t\tif (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) return false;\n\t\tif (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) return false;\n\t\treturn !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n\t};\n\t/**\n\t* @param element a DOM element whose namespace is being checked\n\t* @returns Return false if the element has a\n\t* namespace that a spec-compliant parser would never\n\t* return. Return true otherwise.\n\t*/\n\tconst _checkValidNamespace = function _checkValidNamespace(element) {\n\t\tconst elementNamespace = _readNamespaceURI(element);\n\t\tconst tagName = stringToLowerCase(_readNodeName(element));\n\t\tconst parentNode = getParentNode(element);\n\t\tlet parent;\n\t\tlet parentTagName;\n\t\tif (parentNode && _readNodeType(parentNode) === NODE_TYPE.element) {\n\t\t\tparent = { namespaceURI: _readNamespaceURI(parentNode) };\n\t\t\tparentTagName = stringToLowerCase(_readNodeName(parentNode));\n\t\t} else {\n\t\t\tparent = { namespaceURI: NAMESPACE };\n\t\t\tparentTagName = \"template\";\n\t\t}\n\t\tif (!ALLOWED_NAMESPACES[elementNamespace]) return false;\n\t\tif (elementNamespace === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parent, parentTagName);\n\t\tif (elementNamespace === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parent, parentTagName);\n\t\tif (elementNamespace === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parent, parentTagName);\n\t\tif (PARSER_MEDIA_TYPE === \"application/xhtml+xml\" && ALLOWED_NAMESPACES[elementNamespace]) return true;\n\t\treturn false;\n\t};\n\t/**\n\t* _forceRemove\n\t*\n\t* @param node a DOM node\n\t*/\n\tconst _forceRemove = function _forceRemove(node) {\n\t\tarrayPush(DOMPurify.removed, { element: node });\n\t\ttry {\n\t\t\tgetParentNode(node).removeChild(node);\n\t\t} catch (_) {\n\t\t\tremove(node);\n\t\t\tif (!getParentNode(node)) throw typeErrorCreate(\"a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place\");\n\t\t}\n\t};\n\t/**\n\t* _stripAttributeNode\n\t*\n\t* Remove a single Attr node case/namespace-exactly on an attribute-teardown\n\t* path. Name-based removeAttribute() ASCII-lowercases its lookup key for an\n\t* HTML element in an HTML document and so silently misses a case-preserved\n\t* handler (e.g. `ONERROR` off an XML/XHTML import) - the same defect\n\t* _removeAttribute() was fixed for, which a name-based call would reintroduce\n\t* on these IN_PLACE teardown paths. Unlike _removeAttribute this does not\n\t* record into DOMPurify.removed: the neutralize passes intentionally do not\n\t* book-keep. A clobbered/detached node falls back to best-effort name-based\n\t* removal.\n\t*\n\t* @param element the element to strip the attribute from\n\t* @param attribute the Attr node to remove\n\t* @param name the attribute's name, for the fallback path\n\t*/\n\tconst _stripAttributeNode = function _stripAttributeNode(element, attribute, name) {\n\t\ttry {\n\t\t\tremoveAttributeNode(element, attribute);\n\t\t} catch (_) {\n\t\t\ttry {\n\t\t\t\telement.removeAttribute(name);\n\t\t\t} catch (_) {}\n\t\t}\n\t};\n\t/**\n\t* Fail-closed teardown of an in-place root: strip every disallowed attribute\n\t* in the subtree first, so nothing armed is left behind, then remove all\n\t* children and the root's own attributes.\n\t*\n\t* @param root the in-place root to empty\n\t*/\n\tconst _neutralizeRoot = function _neutralizeRoot(root) {\n\t\t_neutralizeSubtree(root);\n\t\tconst childNodes = getChildNodes(root);\n\t\tif (childNodes) arrayForEach(arraySlice(childNodes), (child) => {\n\t\t\ttry {\n\t\t\t\tremove(child);\n\t\t\t} catch (_) {}\n\t\t});\n\t\tconst attributes = _readNodeType(root) === NODE_TYPE.element ? getAttributes(root) : null;\n\t\tif (attributes) for (let i = attributes.length - 1; i >= 0; --i) {\n\t\t\tconst attribute = attributes[i];\n\t\t\tconst name = attribute && attribute.name;\n\t\t\tif (typeof name === \"string\") _stripAttributeNode(root, attribute, name);\n\t\t}\n\t};\n\t/**\n\t* Removes an attribute, preferably as its exact Attr node: name-based\n\t* removal lowercases the name in HTML documents and misses case-preserved\n\t* names, e.g. from imported XHTML.\n\t*\n\t* @param name an Attribute name\n\t* @param element a DOM node\n\t* @param attr the exact Attr node to remove, when the caller has it\n\t*/\n\tconst _removeAttribute = function _removeAttribute(name, element, attr) {\n\t\tif (!attr) try {\n\t\t\tattr = element.getAttributeNode(name);\n\t\t} catch (_) {\n\t\t\tattr = null;\n\t\t}\n\t\tarrayPush(DOMPurify.removed, {\n\t\t\tattribute: attr || null,\n\t\t\tfrom: element\n\t\t});\n\t\ttry {\n\t\t\tif (attr) removeAttributeNode(element, attr);\n\t\t\telse element.removeAttribute(name);\n\t\t} catch (_) {\n\t\t\ttry {\n\t\t\t\telement.removeAttribute(name);\n\t\t\t} catch (_) {}\n\t\t}\n\t\tif (name === \"is\") {\n\t\t\tif (RETURN_DOM || RETURN_DOM_FRAGMENT) try {\n\t\t\t\t_forceRemove(element);\n\t\t\t} catch (_) {}\n\t\t\telse try {\n\t\t\t\telement.setAttribute(name, \"\");\n\t\t\t} catch (_) {}\n\t\t}\n\t};\n\t/**\n\t* Removes every attribute the configuration does not allow. Used to\n\t* neutralize nodes discarded from an in-place tree.\n\t*\n\t* @param element the element to strip\n\t*/\n\tconst _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {\n\t\tconst attributes = getAttributes(element);\n\t\tif (!attributes) return;\n\t\tfor (let i = attributes.length - 1; i >= 0; --i) {\n\t\t\tconst attribute = attributes[i];\n\t\t\tconst name = attribute && attribute.name;\n\t\t\tif (typeof name !== \"string\" || ALLOWED_ATTR[transformCaseFunc(name)]) continue;\n\t\t\t_stripAttributeNode(element, attribute, name);\n\t\t}\n\t};\n\t/**\n\t* Iterative depth-first walk, so deep trees cannot overflow the call stack,\n\t* reading through the cached getters, so clobbering cannot hide children.\n\t* When `visit` returns false, the node's children are skipped. With\n\t* `intoShadow`, open shadow roots are walked after their host's children.\n\t*\n\t* @param root where to start\n\t* @param visit called for every node\n\t* @param intoShadow whether to enter open shadow roots\n\t*/\n\tconst _walkTree = function _walkTree(root, visit) {\n\t\tlet intoShadow = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n\t\tconst stack = [root];\n\t\twhile (stack.length > 0) {\n\t\t\tconst node = stack.pop();\n\t\t\tif (visit(node) === false) continue;\n\t\t\tif (intoShadow && _readNodeType(node) === NODE_TYPE.element) {\n\t\t\t\tconst shadowRoot = getShadowRoot(node);\n\t\t\t\tif (_isDocumentFragment(shadowRoot)) stack.push(shadowRoot);\n\t\t\t}\n\t\t\tconst childNodes = getChildNodes(node);\n\t\t\tif (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);\n\t\t}\n\t};\n\t/**\n\t* Strips disallowed attributes from every element of a discarded subtree,\n\t* so a handler that is already queued (a loading image) cannot fire.\n\t*\n\t* @param root the root of a removed subtree\n\t*/\n\tconst _neutralizeSubtree = function _neutralizeSubtree(root) {\n\t\t_walkTree(root, (node) => {\n\t\t\tif (_readNodeType(node) === NODE_TYPE.element) _stripDisallowedAttributes(node);\n\t\t});\n\t};\n\t/**\n\t* All nodes under `root`, root first, including open shadow roots. Template\n\t* content is not entered, it is inert.\n\t*\n\t* @param root the in-place root\n\t* @return the nodes\n\t*/\n\tconst _collectLiveNodes = function _collectLiveNodes(root) {\n\t\tconst nodes = [];\n\t\t_walkTree(root, (node) => {\n\t\t\tnodes.push(node);\n\t\t}, true);\n\t\treturn nodes;\n\t};\n\t/**\n\t* Strips disallowed attributes from every element that was under the\n\t* in-place root when the call started and no longer is, whatever removed\n\t* or moved it.\n\t*\n\t* @param root the in-place root\n\t* @param before the root's nodes, collected before the walk\n\t*/\n\tconst _neutralizeEscapedElements = function _neutralizeEscapedElements(root, before) {\n\t\tconst reachable = setCreate();\n\t\tarrayForEach(_collectLiveNodes(root), (node) => {\n\t\t\tif (_readNodeType(node) === NODE_TYPE.element) setAdd(reachable, node);\n\t\t});\n\t\tarrayForEach(before, (node) => {\n\t\t\tif (_readNodeType(node) === NODE_TYPE.element && !setHas(reachable, node)) _stripDisallowedAttributes(node);\n\t\t});\n\t};\n\t/**\n\t* Neutralizes everything that left the in-place tree during the call: what\n\t* DOMPurify removed, and what hooks or custom elements removed or moved out.\n\t*\n\t* @param root the in-place root\n\t* @param before the root's nodes, collected before the walk\n\t* @return true if the root itself was removed\n\t*/\n\tconst _neutralizeDiscarded = function _neutralizeDiscarded(root, before) {\n\t\tlet rootRemoved = false;\n\t\tarrayForEach(DOMPurify.removed, (entry) => {\n\t\t\tif (entry.element) {\n\t\t\t\trootRemoved = rootRemoved || entry.element === root;\n\t\t\t\t_neutralizeSubtree(entry.element);\n\t\t\t}\n\t\t});\n\t\t_neutralizeEscapedElements(root, before);\n\t\treturn rootRemoved;\n\t};\n\tconst MAX_UNVISITED_ROUNDS = 8;\n\t/**\n\t* The walk only moves forward, so a node moved to a position it already\n\t* passed is never visited. Give every original node that is still in the\n\t* tree but unvisited the normal treatment, hooks included. Nodes created\n\t* during the call are left alone. Fails closed if the tree keeps changing.\n\t*\n\t* @param root the in-place root\n\t* @param before the root's nodes, collected before the walk\n\t*/\n\tconst _sanitizeUnvisitedNodes = function _sanitizeUnvisitedNodes(root, before) {\n\t\tconst visited = IN_PLACE_VISITED;\n\t\tlet original = null;\n\t\tconst getOriginal = () => {\n\t\t\tif (!original) {\n\t\t\t\toriginal = setCreate();\n\t\t\t\tarrayForEach(before, (beforeNode) => {\n\t\t\t\t\tsetAdd(original, beforeNode);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn original;\n\t\t};\n\t\tfor (let round = 0;; round++) {\n\t\t\tconst live = _collectLiveNodes(root);\n\t\t\tconst containers = [root];\n\t\t\tlet pending = false;\n\t\t\tarrayForEach(live, (node) => {\n\t\t\t\tif (_readNodeType(node) === NODE_TYPE.documentFragment) arrayPush(containers, node);\n\t\t\t\telse if (!pending && !setHas(visited, node)) pending = setHas(getOriginal(), node);\n\t\t\t});\n\t\t\tif (!pending) return;\n\t\t\tif (round >= MAX_UNVISITED_ROUNDS) throw typeErrorCreate(\"the tree kept changing during in-place sanitization; refusing to return it\");\n\t\t\tarrayForEach(containers, (container, index) => {\n\t\t\t\t_sanitizeUnvisitedIn(container, index > 0, root, getOriginal());\n\t\t\t});\n\t\t}\n\t};\n\t/**\n\t* One _sanitizeUnvisitedNodes pass over the root or an open shadow root.\n\t*\n\t* @param container the root or an open shadow root\n\t* @param inShadow whether container is a shadow root\n\t* @param root the in-place root\n\t* @param original the root's nodes collected before the walk, as a set\n\t*/\n\tconst _sanitizeUnvisitedIn = function _sanitizeUnvisitedIn(container, inShadow, root, original) {\n\t\tconst iterator = _createNodeIterator(container);\n\t\tlet node;\n\t\twhile (node = iterator.nextNode()) {\n\t\t\tif (!setHas(original, node) || setHas(IN_PLACE_VISITED, node)) continue;\n\t\t\tif (inShadow) _executeHooks(hooks.uponSanitizeShadowNode, node, null);\n\t\t\t_sanitizeElements(node, root);\n\t\t\t_sanitizeAttributes(node, root);\n\t\t\tif (_isDocumentFragment(node.content)) _sanitizeShadowDOM2(node.content);\n\t\t}\n\t};\n\t/**\n\t* Records that _sanitizeElements processed `node`. No-op outside IN_PLACE.\n\t*\n\t* @param node the node being processed\n\t*/\n\tconst _markVisited = function _markVisited(node) {\n\t\tif (IN_PLACE_VISITED) setAdd(IN_PLACE_VISITED, node);\n\t};\n\t/**\n\t* Patch-linkage attributes (declarative partial updates): `patchsrc`\n\t* always, `for` everywhere except on <label> and <output>. Gated on\n\t* SAFE_FOR_XML. Shared by the IN_PLACE pre-pass and _isValidAttribute.\n\t*\n\t* @param lcName the transformCaseFunc'd attribute name\n\t* @param lcTag the transformCaseFunc'd tag name of the carrying element\n\t* @return true if the attribute is patch linkage and must be dropped\n\t*/\n\tconst _isPatchLinkageAttribute = function _isPatchLinkageAttribute(lcName, lcTag) {\n\t\tif (!SAFE_FOR_XML) return false;\n\t\tif (lcName === \"patchsrc\") return true;\n\t\treturn lcName === \"for\" && lcTag !== \"label\" && lcTag !== \"output\";\n\t};\n\t/**\n\t* IN_PLACE pre-pass: sever all patch linkage before the walk, so no patch\n\t* can fire mid-walk into a part of the tree the walker already passed.\n\t* Removes range markers (processing instructions, comments with markup)\n\t* and strips linkage attributes. It cannot undo a patch that already fired.\n\t*\n\t* TODO: if the shipped feature can patch through `for` on <label>/<output>,\n\t* drop that pair here too (see test/declarative-patch-probe.html).\n\t*\n\t* @param root the in-place root to sweep\n\t*/\n\tconst _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {\n\t\tif (!SAFE_FOR_XML) return;\n\t\t_walkTree(root, (node) => {\n\t\t\tconst nodeType = _readNodeType(node);\n\t\t\tif (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {\n\t\t\t\ttry {\n\t\t\t\t\tremove(node);\n\t\t\t\t} catch (_) {}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (nodeType === NODE_TYPE.element) {\n\t\t\t\tconst element = node;\n\t\t\t\tconst lcTag = transformCaseFunc(_readNodeName(node));\n\t\t\t\ttry {\n\t\t\t\t\tif (element.hasAttribute && element.hasAttribute(\"patchsrc\")) element.removeAttribute(\"patchsrc\");\n\t\t\t\t\tif (element.hasAttribute && element.hasAttribute(\"for\") && _isPatchLinkageAttribute(\"for\", lcTag)) element.removeAttribute(\"for\");\n\t\t\t\t} catch (_) {}\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t};\n\t/**\n\t* _initDocument\n\t*\n\t* @param dirty - a string of dirty markup\n\t* @return a DOM, filled with the dirty markup\n\t*/\n\tconst _initDocument = function _initDocument(dirty) {\n\t\tlet doc = null;\n\t\tlet leadingWhitespace = null;\n\t\tif (FORCE_BODY) dirty = \"<remove></remove>\" + dirty;\n\t\telse {\n\t\t\tconst matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n\t\t\tleadingWhitespace = matches && matches[0];\n\t\t}\n\t\tif (PARSER_MEDIA_TYPE === \"application/xhtml+xml\" && NAMESPACE === HTML_NAMESPACE) dirty = \"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head></head><body>\" + dirty + \"</body></html>\";\n\t\tconst dirtyPayload = trustedTypesPolicy ? _createTrustedHTML(dirty) : dirty;\n\t\tif (NAMESPACE === HTML_NAMESPACE) try {\n\t\t\tdoc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n\t\t} catch (_) {}\n\t\tif (!doc || !doc.documentElement) {\n\t\t\tdoc = implementation.createDocument(NAMESPACE, \"template\", null);\n\t\t\ttry {\n\t\t\t\tdoc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n\t\t\t} catch (_) {}\n\t\t}\n\t\tconst body = doc.body || doc.documentElement;\n\t\tif (dirty && leadingWhitespace) body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n\t\tif (NAMESPACE === HTML_NAMESPACE) return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? \"html\" : \"body\")[0];\n\t\treturn WHOLE_DOCUMENT ? doc.documentElement : body;\n\t};\n\t/**\n\t* Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n\t*\n\t* @param root The root element or node to start traversing on.\n\t* @return The created NodeIterator\n\t*/\n\tconst _createNodeIterator = function _createNodeIterator(root) {\n\t\tconst doc = getOwnerDocument ? getOwnerDocument(root) : root.ownerDocument;\n\t\treturn createNodeIterator.call(doc || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n\t};\n\t/**\n\t* Replace template expression syntax (mustache, ERB, template\n\t* literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub\n\t* sites. Order matters: mustache, then ERB, then template literal.\n\t*\n\t* @param value the string to scrub\n\t* @returns the scrubbed string\n\t*/\n\tconst _stripTemplateExpressions = function _stripTemplateExpressions(value) {\n\t\tvalue = stringReplace(value, MUSTACHE_EXPR$1, \" \");\n\t\tvalue = stringReplace(value, ERB_EXPR$1, \" \");\n\t\tvalue = stringReplace(value, TMPLIT_EXPR$1, \" \");\n\t\treturn value;\n\t};\n\t/**\n\t* Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the\n\t* character data of an element subtree. Used as the final safety net for\n\t* SAFE_FOR_TEMPLATES on every DOM-returning code path so that expressions\n\t* which only form after text-node normalization (e.g. fragments split across\n\t* stripped elements) cannot survive into a template-evaluating framework.\n\t*\n\t* Walks text/comment/CDATA/processing-instruction nodes and mutates `.data`\n\t* in place rather than round-tripping through innerHTML. This preserves\n\t* descendant node references (important for IN_PLACE callers), avoids a\n\t* serialize/reparse cycle, and reads literal character data — which means\n\t* `<%...%>` in text content matches the ERB regex against its real bytes\n\t* instead of the HTML-entity-escaped form innerHTML would produce.\n\t*\n\t* Attribute values are not visited here; SAFE_FOR_TEMPLATES handling for\n\t* attributes is performed during the per-node `_sanitizeAttributes` pass.\n\t*\n\t* @param node The root element whose character data should be scrubbed.\n\t*/\n\tconst _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {\n\t\tvar _node$querySelectorAl;\n\t\t_scrubOwnCharacterData(node);\n\t\tconst templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, \"template\");\n\t\tif (templates) arrayForEach(templates, (tmpl) => {\n\t\t\tif (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);\n\t\t});\n\t};\n\t/**\n\t* _scrubOwnCharacterData\n\t*\n\t* Non-recursive core of _scrubTemplateExpressions: normalize `node` and\n\t* strip template expressions from its own character data only. Does not\n\t* enter <template>.content or attached shadow roots (NodeIterator never\n\t* does). Used by _sanitizeShadowDOM, where every nested template content\n\t* and shadow root is already walked - and therefore scrubbed - by its own\n\t* recursive _sanitizeShadowDOM call; recursing here as well would rescrub\n\t* each nested fragment once per ancestor, which is quadratic in nesting\n\t* depth.\n\t*\n\t* @param node The root whose own character data should be scrubbed.\n\t*/\n\tconst _scrubOwnCharacterData = function _scrubOwnCharacterData(node) {\n\t\tnode.normalize();\n\t\tconst doc = getOwnerDocument ? getOwnerDocument(node) : node.ownerDocument;\n\t\tconst walker = createNodeIterator.call(doc || node, node, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);\n\t\tlet currentNode = walker.nextNode();\n\t\twhile (currentNode) {\n\t\t\tcurrentNode.data = _stripTemplateExpressions(currentNode.data);\n\t\t\tcurrentNode = walker.nextNode();\n\t\t}\n\t};\n\t/**\n\t* _isClobbered\n\t*\n\t* Detect DOM-clobbering on HTMLFormElement nodes. Form is the only HTML\n\t* interface with [LegacyOverrideBuiltIns]; a descendant element with a\n\t* `name` attribute matching a prototype property shadows that property\n\t* on direct reads. We use this check at the IN_PLACE entry-point and\n\t* during attribute sanitization to refuse clobbered forms.\n\t*\n\t* @param element element to check for clobbering attacks\n\t* @return true if clobbered, false if safe\n\t*/\n\tconst _isClobbered = function _isClobbered(element) {\n\t\tconst realTagName = getNodeName ? getNodeName(element) : null;\n\t\tif (typeof realTagName !== \"string\") return false;\n\t\tif (transformCaseFunc(realTagName) !== \"form\") return false;\n\t\treturn typeof element.nodeName !== \"string\" || typeof element.textContent !== \"string\" || typeof element.removeChild !== \"function\" || element.attributes !== getAttributes(element) || typeof element.removeAttribute !== \"function\" || typeof element.removeAttributeNode !== \"function\" || typeof element.getAttributeNode !== \"function\" || typeof element.setAttribute !== \"function\" || typeof element.namespaceURI !== \"string\" || typeof element.insertBefore !== \"function\" || typeof element.hasChildNodes !== \"function\" || element.nodeType !== getNodeType(element) || element.childNodes !== getChildNodes(element);\n\t};\n\t/**\n\t* Checks whether the given value is a DocumentFragment from any realm.\n\t*\n\t* The realm-independent replacement reads `nodeType` through the cached\n\t* Node.prototype getter and compares to the DOCUMENT_FRAGMENT_NODE\n\t* constant (11). nodeType is a numeric value resolved from the node's\n\t* internal slot, identical across realms for the same kind of node.\n\t*\n\t* @param value object to check\n\t* @return true if value is a DocumentFragment-shaped node from any realm\n\t*/\n\tconst _isDocumentFragment = function _isDocumentFragment(value) {\n\t\tif (!getNodeType || typeof value !== \"object\" || value === null) return false;\n\t\ttry {\n\t\t\treturn getNodeType(value) === NODE_TYPE.documentFragment;\n\t\t} catch (_) {\n\t\t\treturn false;\n\t\t}\n\t};\n\t/**\n\t* Checks whether the given object is a DOM node, including nodes that\n\t* originate from a different window/realm (e.g. an iframe's\n\t* contentDocument). The previous `value instanceof Node` check was\n\t* realm-bound: nodes from a different window failed it, causing\n\t* sanitize() to silently stringify them and reset IN_PLACE to false,\n\t* returning the original node unsanitized. See GHSA-4w3q-35jp-p934.\n\t*\n\t* @param value object to check whether it's a DOM node\n\t* @return true if value is a DOM node from any realm\n\t*/\n\tconst _isNode = function _isNode(value) {\n\t\tif (!getNodeType || typeof value !== \"object\" || value === null) return false;\n\t\ttry {\n\t\t\treturn typeof getNodeType(value) === \"number\";\n\t\t} catch (_) {\n\t\t\treturn false;\n\t\t}\n\t};\n\tfunction _executeHooks(hooks, currentNode, data) {\n\t\tif (hooks.length === 0) return;\n\t\tarrayForEach(hooks, (hook) => {\n\t\t\thook.call(DOMPurify, currentNode, data, CONFIG);\n\t\t});\n\t}\n\t/**\n\t* Structural-threat checks that condemn a node regardless of the\n\t* allowlists: mXSS via namespace confusion, risky CSS construction,\n\t* processing instructions, markup-bearing comments. Pure predicate;\n\t* the caller removes. Check order is load-bearing.\n\t*\n\t* @param currentNode the node to inspect\n\t* @param tagName the node's transformCaseFunc'd tag name\n\t* @return true if the node must be removed\n\t*/\n\tconst _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {\n\t\tif (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) return true;\n\t\tif (SAFE_FOR_XML && LITERAL_TEXT_ELEMENTS[tagName] && _readNodeType(currentNode) === NODE_TYPE.element && _readNamespaceURI(currentNode) === HTML_NAMESPACE && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === \"string\" && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent))) return true;\n\t\tif (currentNode.nodeType === NODE_TYPE.processingInstruction) return true;\n\t\tif (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) return true;\n\t\treturn false;\n\t};\n\t/**\n\t* Evaluate a CUSTOM_ELEMENT_HANDLING check (a RegExp or a predicate\n\t* function, per the validation in _parseConfig) against a name.\n\t* Additional arguments are forwarded to predicate functions - the\n\t* attributeNameCheck predicate receives the tag name as its second\n\t* argument. A null/absent check never matches.\n\t*\n\t* @param check the configured tagNameCheck / attributeNameCheck value\n\t* @param name the name to test\n\t* @param args extra arguments forwarded to a predicate function\n\t* @return true if the check matches the name\n\t*/\n\tconst _matchesNameCheck = function _matchesNameCheck(check, name) {\n\t\tif (check instanceof RegExp) return regExpTest(check, name);\n\t\tif (check instanceof Function) {\n\t\t\tfor (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];\n\t\t\treturn Boolean(check(name, ...args));\n\t\t}\n\t\treturn false;\n\t};\n\t/**\n\t* Handle a node whose tag is forbidden or not allowlisted: keep\n\t* allowed custom elements (false return exits _sanitizeElements\n\t* early - the namespace and fallback-tag removal checks are\n\t* intentionally skipped for kept custom elements), else hoist\n\t* content per KEEP_CONTENT and remove.\n\t*\n\t* A kept custom element is the ONLY case in which this function\n\t* returns false, so the caller uses that return value to run the\n\t* afterSanitizeElements hook on the kept element and keep the\n\t* element-hook lifecycle consistent with normal allowlisted\n\t* elements (GHSA-c2j3-45gr-mqc4).\n\t*\n\t* @param currentNode the disallowed node\n\t* @param tagName the node's transformCaseFunc'd tag name\n\t* @return true if the node was removed, false if kept\n\t*/\n\tconst _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName, root) {\n\t\tif (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;\n\t\tif (KEEP_CONTENT && !FORBID_CONTENTS[tagName] && !FORBID_CONTENTS[stringToLowerCase(tagName)]) {\n\t\t\tconst parentNode = getParentNode(currentNode);\n\t\t\tconst childNodes = getChildNodes(currentNode);\n\t\t\tif (childNodes && parentNode) {\n\t\t\t\tconst childCount = childNodes.length;\n\t\t\t\tfor (let i = childCount - 1; i >= 0; --i) {\n\t\t\t\t\tconst hoisted = currentNode === root ? cloneNode(childNodes[i], true) : childNodes[i];\n\t\t\t\t\tparentNode.insertBefore(hoisted, getNextSibling(currentNode));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t_forceRemove(currentNode);\n\t\treturn true;\n\t};\n\t/**\n\t* Fork a hook-mutable allowlist off its shared binding the first time a\n\t* (possibly lazily-installed) uponSanitize* hook is about to see it, so the\n\t* hook cannot widen the per-instance default or the setConfig binding by\n\t* reference and leak past the call. Returns the set unchanged once it is\n\t* already call-local, so repeated calls across elements are idempotent.\n\t*\n\t* @param hookList the uponSanitize* hook array for this event\n\t* @param set the current ALLOWED_TAGS / ALLOWED_ATTR binding\n\t* @param defaultSet the per-instance DEFAULT_ALLOWED_* constant\n\t* @param setConfigSet the captured setConfig() binding, or null\n\t* @return a call-local clone if a hook is present and set is still shared,\n\t* else set unchanged\n\t*/\n\tconst _forkSharedAllowlist = function _forkSharedAllowlist(hookList, set, defaultSet, setConfigSet) {\n\t\tif (hookList.length === 0) return set;\n\t\treturn set === defaultSet || set === setConfigSet ? clone(set) : set;\n\t};\n\t/**\n\t* A hook may have detached the node it was called for. If so, treat it as\n\t* removed and stop processing it; the walk root is exempt. On the IN_PLACE\n\t* path the detached subtree is neutralized right away.\n\t*\n\t* @param currentNode the node a hook may have detached\n\t* @param root the current walk root\n\t* @return true if the node was detached\n\t*/\n\tconst _handleHookDetachedNode = function _handleHookDetachedNode(currentNode, root) {\n\t\tif (currentNode === root || getParentNode(currentNode) !== null) return false;\n\t\tif (IN_PLACE) _neutralizeSubtree(currentNode);\n\t\treturn true;\n\t};\n\t/**\n\t* _sanitizeElements\n\t*\n\t* @protect nodeName\n\t* @protect textContent\n\t* @protect removeChild\n\t* @param currentNode to check for permission to exist\n\t* @return true if node was killed, false if left alive\n\t*/\n\tconst _sanitizeElements = function _sanitizeElements(currentNode, root) {\n\t\t_markVisited(currentNode);\n\t\t_executeHooks(hooks.beforeSanitizeElements, currentNode, null);\n\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\tif (_isClobbered(currentNode)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tconst tagName = transformCaseFunc(_readNodeName(currentNode));\n\t\tALLOWED_TAGS = _forkSharedAllowlist(hooks.uponSanitizeElement, ALLOWED_TAGS, DEFAULT_ALLOWED_TAGS, SET_CONFIG_ALLOWED_TAGS);\n\t\t_executeHooks(hooks.uponSanitizeElement, currentNode, {\n\t\t\ttagName,\n\t\t\tallowedTags: ALLOWED_TAGS\n\t\t});\n\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\tif (_isUnsafeNode(currentNode, tagName)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {\n\t\t\tconst removed = _sanitizeDisallowedNode(currentNode, tagName, root);\n\t\t\tif (removed === false) {\n\t\t\t\t_executeHooks(hooks.afterSanitizeElements, currentNode, null);\n\t\t\t\tif (_handleHookDetachedNode(currentNode, root)) return true;\n\t\t\t}\n\t\t\treturn removed;\n\t\t}\n\t\tif (_readNodeType(currentNode) === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif ((tagName === \"noscript\" || tagName === \"noembed\" || tagName === \"noframes\") && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {\n\t\t\t_forceRemove(currentNode);\n\t\t\treturn true;\n\t\t}\n\t\tif (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n\t\t\tconst content = _stripTemplateExpressions(currentNode.textContent);\n\t\t\tif (currentNode.textContent !== content) {\n\t\t\t\tarrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });\n\t\t\t\tcurrentNode.textContent = content;\n\t\t\t}\n\t\t}\n\t\t_executeHooks(hooks.afterSanitizeElements, currentNode, null);\n\t\treturn _handleHookDetachedNode(currentNode, root);\n\t};\n\t/**\n\t* _isValidAttribute\n\t*\n\t* @param lcTag Lowercase tag name of containing element.\n\t* @param lcName Lowercase attribute name.\n\t* @param value Attribute value.\n\t* @return Returns true if `value` is valid, otherwise false.\n\t*/\n\tconst _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n\t\tif (FORBID_ATTR[lcName]) return false;\n\t\tif (_isPatchLinkageAttribute(lcName, lcTag)) return false;\n\t\tif (SANITIZE_DOM && (lcName === \"id\" || lcName === \"name\") && (value in document || value in formElement)) return false;\n\t\tconst nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);\n\t\tif (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) return true;\n\t\tif (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) return true;\n\t\tif (!nameIsPermitted) return _isBasicCustomElement(lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName, lcTag) || lcName === \"is\" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value);\n\t\tif (URI_SAFE_ATTRIBUTES[lcName]) return true;\n\t\tif (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, \"\"))) return true;\n\t\tif ((lcName === \"src\" || lcName === \"xlink:href\" || lcName === \"href\") && lcTag !== \"script\" && stringIndexOf(value, \"data:\") === 0 && DATA_URI_TAGS[lcTag]) return true;\n\t\tif (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, \"\"))) return true;\n\t\treturn !value;\n\t};\n\tconst RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, [\n\t\t\"annotation-xml\",\n\t\t\"color-profile\",\n\t\t\"font-face\",\n\t\t\"font-face-format\",\n\t\t\"font-face-name\",\n\t\t\"font-face-src\",\n\t\t\"font-face-uri\",\n\t\t\"missing-glyph\"\n\t]);\n\t/**\n\t* _isBasicCustomElement\n\t* checks if at least one dash is included in tagName, and it's not the first char\n\t* for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n\t*\n\t* @param tagName name of the tag of the node to sanitize\n\t* @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n\t*/\n\tconst _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n\t\treturn !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);\n\t};\n\t/**\n\t* Wrap an attribute value in the matching Trusted Types object when\n\t* the active policy requires it. Namespaced attributes pass through\n\t* unchanged (no TT support yet, see\n\t* https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).\n\t*\n\t* @param lcTag lowercase tag name of the containing element\n\t* @param lcName lowercase attribute name\n\t* @param namespaceURI the attribute's namespace, if any\n\t* @param value the attribute value to wrap\n\t* @return the value, wrapped when Trusted Types demand it\n\t*/\n\tconst _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {\n\t\tif (trustedTypesPolicy && typeof trustedTypes === \"object\" && typeof trustedTypes.getAttributeType === \"function\" && !namespaceURI) switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n\t\t\tcase \"TrustedHTML\": return _createTrustedHTML(value);\n\t\t\tcase \"TrustedScriptURL\": return _createTrustedScriptURL(value);\n\t\t}\n\t\treturn value;\n\t};\n\t/**\n\t* Write a modified attribute value back onto the element. On\n\t* success, re-probe for clobbering introduced by the new value and\n\t* remove the element when found; otherwise, when this writeback is the\n\t* recreate half of the SANITIZE_NAMED_PROPS remove-and-recreate, pop the\n\t* removal entry that path recorded so it does not show as removed. On\n\t* failure, remove the attribute instead.\n\t*\n\t* Returns true only on a clean write (the value was set and the new value\n\t* introduced no clobbering). The caller uses that, together with its own\n\t* knowledge of whether this attribute pushed a DOMPurify.removed record, to\n\t* decide whether to pop that record. The pop must happen ONLY for the\n\t* named-prop remove-and-recreate; popping on any other value change (trim,\n\t* template scrubbing, Trusted Types) would consume an unrelated _forceRemove\n\t* subtree-cleanup record and let that detached subtree keep a live event\n\t* handler through the IN_PLACE neutralization pass (SO-001).\n\t*\n\t* @param currentNode the element carrying the attribute\n\t* @param name the attribute name as present on the element\n\t* @param namespaceURI the attribute's namespace, if any\n\t* @param value the new attribute value\n\t* @return true if the value was written without introducing clobbering\n\t*/\n\tconst _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {\n\t\ttry {\n\t\t\tif (namespaceURI) currentNode.setAttributeNS(namespaceURI, name, value);\n\t\t\telse currentNode.setAttribute(name, value);\n\t\t\tif (_isClobbered(currentNode)) {\n\t\t\t\t_forceRemove(currentNode);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (_) {\n\t\t\t_removeAttribute(name, currentNode);\n\t\t\treturn false;\n\t\t}\n\t};\n\t/**\n\t* _isUnsafeAttributeValue\n\t*\n\t* Value-based attribute checks that the attribute walk applies before any\n\t* hook can force-keep an attribute, shared with the public\n\t* isValidAttribute() so that it never approves a value sanitize() would\n\t* strip.\n\t*\n\t* @param name the attribute name as found on the node (case preserved)\n\t* @param value the attribute value\n\t* @returns true if the attribute must be removed because of its value\n\t*/\n\tconst _isUnsafeAttributeValue = function _isUnsafeAttributeValue(name, value) {\n\t\tif (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) return true;\n\t\treturn stringToLowerCase(name) === \"attributename\" && stringMatch(value, \"href\") !== null;\n\t};\n\t/**\n\t* _sanitizeAttributes\n\t*\n\t* @protect attributes\n\t* @protect nodeName\n\t* @protect removeAttribute\n\t* @protect setAttribute\n\t*\n\t* @param currentNode to sanitize\n\t* @param root the current walk root\n\t*/\n\tconst _sanitizeAttributes = function _sanitizeAttributes(currentNode, root) {\n\t\t_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);\n\t\tif (_handleHookDetachedNode(currentNode, root)) return;\n\t\tconst attributes = currentNode.attributes;\n\t\tif (!attributes || _isClobbered(currentNode)) return;\n\t\tALLOWED_ATTR = _forkSharedAllowlist(hooks.uponSanitizeAttribute, ALLOWED_ATTR, DEFAULT_ALLOWED_ATTR, SET_CONFIG_ALLOWED_ATTR);\n\t\tconst hookEvent = {\n\t\t\tattrName: \"\",\n\t\t\tattrValue: \"\",\n\t\t\tkeepAttr: true,\n\t\t\tallowedAttributes: ALLOWED_ATTR,\n\t\t\tforceKeepAttr: void 0\n\t\t};\n\t\tlet l = attributes.length;\n\t\tconst lcTag = transformCaseFunc(currentNode.nodeName);\n\t\twhile (l--) {\n\t\t\tconst attr = attributes[l];\n\t\t\tconst name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;\n\t\t\tconst lcName = transformCaseFunc(name);\n\t\t\tconst initValue = attrValue;\n\t\t\tlet value = name === \"value\" ? initValue : stringTrim(initValue);\n\t\t\tlet recreatedNamedProp = false;\n\t\t\thookEvent.attrName = lcName;\n\t\t\thookEvent.attrValue = value;\n\t\t\thookEvent.keepAttr = true;\n\t\t\thookEvent.forceKeepAttr = void 0;\n\t\t\t_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);\n\t\t\tvalue = hookEvent.attrValue;\n\t\t\tif (SANITIZE_NAMED_PROPS && (lcName === \"id\" || lcName === \"name\") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tvalue = SANITIZE_NAMED_PROPS_PREFIX + value;\n\t\t\t\trecreatedNamedProp = true;\n\t\t\t}\n\t\t\tif (_isUnsafeAttributeValue(name, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (hookEvent.forceKeepAttr) continue;\n\t\t\tif (!hookEvent.keepAttr) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (SAFE_FOR_TEMPLATES) value = _stripTemplateExpressions(value);\n\t\t\tif (!_isValidAttribute(lcTag, lcName, value)) {\n\t\t\t\t_removeAttribute(name, currentNode, attr);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvalue = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);\n\t\t\tif (value !== initValue) {\n\t\t\t\tif (_setAttributeValue(currentNode, name, namespaceURI, value) && recreatedNamedProp) arrayPop(DOMPurify.removed);\n\t\t\t}\n\t\t}\n\t\t_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);\n\t\t_handleHookDetachedNode(currentNode, root);\n\t};\n\t/**\n\t* _sanitizeShadowDOM\n\t*\n\t* @param fragment to iterate over recursively\n\t*/\n\tconst _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {\n\t\tlet shadowNode = null;\n\t\tconst shadowIterator = _createNodeIterator(fragment);\n\t\t_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);\n\t\twhile (shadowNode = shadowIterator.nextNode()) {\n\t\t\t_executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);\n\t\t\t_sanitizeElements(shadowNode, fragment);\n\t\t\t_sanitizeAttributes(shadowNode, fragment);\n\t\t\tif (_isDocumentFragment(shadowNode.content)) _sanitizeShadowDOM2(shadowNode.content);\n\t\t\tif (_readNodeType(shadowNode) === NODE_TYPE.element) {\n\t\t\t\tconst innerSr = getShadowRoot(shadowNode);\n\t\t\t\tif (_isDocumentFragment(innerSr)) {\n\t\t\t\t\t_sanitizeAttachedShadowRoots(innerSr);\n\t\t\t\t\t_sanitizeShadowDOM2(innerSr);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (SAFE_FOR_TEMPLATES) _scrubOwnCharacterData(fragment);\n\t\t_executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);\n\t};\n\t/**\n\t* Sanitizes every attached shadow root under `root`, since the node\n\t* iterator does not enter shadow trees. Needed for IN_PLACE input and for\n\t* DOM input whose clonable shadow roots were copied by importNode().\n\t*\n\t* @param root the subtree root to walk for attached shadow roots\n\t*/\n\tconst _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {\n\t\tconst stack = [{\n\t\t\tnode: root,\n\t\t\tshadow: null\n\t\t}];\n\t\twhile (stack.length > 0) {\n\t\t\tconst item = stack.pop();\n\t\t\tif (item.shadow) {\n\t\t\t\t_sanitizeShadowDOM2(item.shadow);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst node = item.node;\n\t\t\tconst isElement = _readNodeType(node) === NODE_TYPE.element;\n\t\t\tconst childNodes = getChildNodes(node);\n\t\t\tif (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push({\n\t\t\t\tnode: childNodes[i],\n\t\t\t\tshadow: null\n\t\t\t});\n\t\t\tif (isElement) {\n\t\t\t\tconst rootName = getNodeName ? getNodeName(node) : null;\n\t\t\t\tif (typeof rootName === \"string\" && transformCaseFunc(rootName) === \"template\") {\n\t\t\t\t\tconst content = node.content;\n\t\t\t\t\tif (_isDocumentFragment(content)) stack.push({\n\t\t\t\t\t\tnode: content,\n\t\t\t\t\t\tshadow: null\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isElement) {\n\t\t\t\tconst sr = getShadowRoot(node);\n\t\t\t\tif (_isDocumentFragment(sr)) stack.push({\n\t\t\t\t\tnode: null,\n\t\t\t\t\tshadow: sr\n\t\t\t\t}, {\n\t\t\t\t\tnode: sr,\n\t\t\t\t\tshadow: null\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\tDOMPurify.sanitize = function(dirty) {\n\t\tlet cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n\t\tlet body = null;\n\t\tlet importedNode = null;\n\t\tlet currentNode = null;\n\t\tlet returnNode = null;\n\t\tIS_EMPTY_INPUT = !dirty;\n\t\tif (IS_EMPTY_INPUT) dirty = \"<!-->\";\n\t\tif (typeof dirty !== \"string\" && !_isNode(dirty)) {\n\t\t\tdirty = stringifyValue(dirty);\n\t\t\tif (typeof dirty !== \"string\") throw typeErrorCreate(\"dirty is not a string, aborting\");\n\t\t}\n\t\tif (!DOMPurify.isSupported) return dirty;\n\t\tif (SET_CONFIG) {\n\t\t\tALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;\n\t\t\tALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;\n\t\t} else _parseConfig(cfg);\n\t\tif (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) ALLOWED_TAGS = clone(ALLOWED_TAGS);\n\t\tif (hooks.uponSanitizeAttribute.length > 0) ALLOWED_ATTR = clone(ALLOWED_ATTR);\n\t\tDOMPurify.removed = [];\n\t\tconst inPlace = IN_PLACE && typeof dirty !== \"string\" && _isNode(dirty);\n\t\tlet inPlaceNodes = [];\n\t\tconst outerVisited = IN_PLACE_VISITED;\n\t\tif (inPlace) {\n\t\t\t_neutralizePatchLinkage(dirty);\n\t\t\tconst nn = _readNodeName(dirty);\n\t\t\tif (typeof nn === \"string\") {\n\t\t\t\tconst tagName = transformCaseFunc(nn);\n\t\t\t\tif (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n\t\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\t\tthrow typeErrorCreate(\"root node is forbidden and cannot be sanitized in-place\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (_isClobbered(dirty)) {\n\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\tthrow typeErrorCreate(\"root node is clobbered and cannot be sanitized in-place\");\n\t\t\t}\n\t\t\tinPlaceNodes = _collectLiveNodes(dirty);\n\t\t\tIN_PLACE_VISITED = setCreate();\n\t\t} else if (_isNode(dirty)) {\n\t\t\tbody = _initDocument(\"<!---->\");\n\t\t\timportedNode = body.ownerDocument.importNode(dirty, true);\n\t\t\tif (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === \"BODY\") body = importedNode;\n\t\t\telse if (importedNode.nodeName === \"HTML\") body = importedNode;\n\t\t\telse body.appendChild(importedNode);\n\t\t\t_sanitizeAttachedShadowRoots(body);\n\t\t} else {\n\t\t\tif (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && dirty.indexOf(\"<\") === -1) return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(dirty) : dirty;\n\t\t\tbody = _initDocument(dirty);\n\t\t\tif (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : \"\";\n\t\t}\n\t\tif (body && FORCE_BODY) _forceRemove(body.firstChild);\n\t\tconst walkRoot = inPlace ? dirty : body;\n\t\ttry {\n\t\t\tif (inPlace) _sanitizeAttachedShadowRoots(dirty);\n\t\t\tconst nodeIterator = _createNodeIterator(walkRoot);\n\t\t\twhile (currentNode = nodeIterator.nextNode()) {\n\t\t\t\t_sanitizeElements(currentNode, walkRoot);\n\t\t\t\t_sanitizeAttributes(currentNode, walkRoot);\n\t\t\t\tif (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);\n\t\t\t}\n\t\t\tif (inPlace) _sanitizeUnvisitedNodes(dirty, inPlaceNodes);\n\t\t} catch (error) {\n\t\t\tif (inPlace) {\n\t\t\t\t_neutralizeRoot(dirty);\n\t\t\t\t_neutralizeDiscarded(dirty, inPlaceNodes);\n\t\t\t}\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tIN_PLACE_VISITED = outerVisited;\n\t\t}\n\t\tif (inPlace) {\n\t\t\tif (_neutralizeDiscarded(dirty, inPlaceNodes)) throw typeErrorCreate(\"a node selected for removal could not be safely returned; refusing to sanitize in place\");\n\t\t\tif (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(dirty);\n\t\t\treturn dirty;\n\t\t}\n\t\tif (RETURN_DOM) {\n\t\t\tif (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(body);\n\t\t\tif (RETURN_DOM_FRAGMENT) {\n\t\t\t\treturnNode = createDocumentFragment.call(body.ownerDocument);\n\t\t\t\twhile (body.firstChild) returnNode.appendChild(body.firstChild);\n\t\t\t} else returnNode = body;\n\t\t\tif (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) returnNode = importNode.call(originalDocument, returnNode, true);\n\t\t\treturn returnNode;\n\t\t}\n\t\tlet serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\t\tif (WHOLE_DOCUMENT && ALLOWED_TAGS[\"!doctype\"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) serializedHTML = \"<!DOCTYPE \" + body.ownerDocument.doctype.name + \">\\n\" + serializedHTML;\n\t\tif (SAFE_FOR_TEMPLATES) serializedHTML = _stripTemplateExpressions(serializedHTML);\n\t\treturn trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;\n\t};\n\tDOMPurify.setConfig = function() {\n\t\tlet cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n\t\t_parseConfig(cfg);\n\t\tSET_CONFIG = true;\n\t\tSET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;\n\t\tSET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;\n\t};\n\tDOMPurify.clearConfig = function() {\n\t\tCONFIG = null;\n\t\tSET_CONFIG = false;\n\t\tSET_CONFIG_ALLOWED_TAGS = null;\n\t\tSET_CONFIG_ALLOWED_ATTR = null;\n\t\ttrustedTypesPolicy = defaultTrustedTypesPolicy;\n\t\temptyHTML = \"\";\n\t};\n\tDOMPurify.isValidAttribute = function(tag, attr, value) {\n\t\tif (!CONFIG) _parseConfig({});\n\t\tconst lcTag = transformCaseFunc(tag);\n\t\tconst lcName = transformCaseFunc(attr);\n\t\tif (typeof value === \"string\" && (_isUnsafeAttributeValue(attr, value) || !ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value))) return false;\n\t\treturn _isValidAttribute(lcTag, lcName, value);\n\t};\n\tDOMPurify.addHook = function(entryPoint, hookFunction) {\n\t\tif (typeof hookFunction !== \"function\") return;\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\tarrayPush(hooks[entryPoint], hookFunction);\n\t};\n\tDOMPurify.removeHook = function(entryPoint, hookFunction) {\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\tif (hookFunction !== void 0) {\n\t\t\tconst index = arrayLastIndexOf(hooks[entryPoint], hookFunction);\n\t\t\treturn index === -1 ? void 0 : arraySplice(hooks[entryPoint], index, 1)[0];\n\t\t}\n\t\treturn arrayPop(hooks[entryPoint]);\n\t};\n\tDOMPurify.removeHooks = function(entryPoint) {\n\t\tif (!objectHasOwnProperty(hooks, entryPoint)) return;\n\t\thooks[entryPoint] = [];\n\t};\n\tDOMPurify.removeAllHooks = function() {\n\t\thooks = _createHooksMap();\n\t};\n\treturn DOMPurify;\n}\nvar purify_default = createDOMPurify();\nexport { purify_default as default };\n\n//# sourceMappingURL=purify.es.mjs.map","import { getDate, getMonth, getYear, isAfter, isBefore, isValid, set } from \"date-fns\";\nimport prettyBytes from \"pretty-bytes\";\nimport DomPurify from \"dompurify\";\n//#region \\0rolldown/runtime.js\nvar __defProp = Object.defineProperty;\nvar __exportAll = (all, no_symbols) => {\n\tlet target = {};\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n\tif (!no_symbols) __defProp(target, Symbol.toStringTag, { value: \"Module\" });\n\treturn target;\n};\n//#endregion\n//#region src/capitalize.ts\n/**\n* Uppercases first letter of string\n* @param string to be capitalized first string, e.g. \"workflow\"\n* @return Capitalized String, e.g. \"Workflow\"\n*/\nvar capitalize = (input) => input.charAt(0).toUpperCase() + input.substring(1);\nvar formats = {\n\tcustomFormat: (input, delimiter) => capitalize(input.replace(delimiter, \" \").toLowerCase()),\n\tkebabFormat: (input) => formats.customFormat(input, \"-\"),\n\tsnakeFormat: (input) => formats.customFormat(input, \"_\"),\n\tcamelPascalCase: (input) => capitalize((input.match(/([A-Z]?[^A-Z]*)/g) ?? []).slice(0, -1).join(\" \").toLowerCase())\n};\nvar caseFormatter = ({ string, delimiter, format }) => {\n\tif (delimiter) return formats.customFormat(string, delimiter);\n\tif (format) return formats[format](string, delimiter ?? \"\");\n\treturn capitalize(string);\n};\n//#endregion\n//#region src/updateDate.ts\n/**\n* Updates the date part (year, day and month) of a date object (base)\n* time, offset (timezone) and so on will be left untouched.\n*\n* @param base - Date which will be used (copied) to set day, month and year.\n* @param date - Extract day, month and year from this date object.\n* @returns Copy of base with day, month and year of date.\n*/\nvar updateDate_default = (base, date) => {\n\tif (date) {\n\t\tbase = isValid(base) ? base : new Date(Date.UTC(0, 0));\n\t\treturn set(base, {\n\t\t\tyear: getYear(date),\n\t\t\tmonth: getMonth(date),\n\t\t\tdate: getDate(date)\n\t\t});\n\t}\n\treturn base;\n};\n//#endregion\n//#region src/updateTime.ts\n/**\n* Updates the time part (hour, minute, second and millisecond) of a date object (base)\n* date, offset (timezone) and so on will be left untouched.\n*\n* @param base - Date which will be used (copied) to set day, month and year.\n* @param date - Extract hour, minute, second and millisecond from this date object.\n* @returns Copy of base with hour, minute, second and millisecond changed.\n*/\nvar updateTime_default = (base, date) => {\n\tconst d = new Date(base);\n\tif (date) {\n\t\td.setHours(date.getHours());\n\t\td.setMinutes(date.getMinutes());\n\t\td.setSeconds(date.getSeconds());\n\t\td.setMilliseconds(date.getMilliseconds());\n\t}\n\treturn d;\n};\n//#endregion\n//#region src/dateMinMaxCheck.ts\n/**\n* Check if date is before min.\n* @param date\n* @param min\n* @param checkDate - check date part (year, day, month).\n* @param checkTime - check time part (hour, minutes etc.).\n* @returns whether limit is kept or not.\n*/\nvar isBeforeMinDate = (date, min, checkDate, checkTime) => {\n\tif (min) {\n\t\tif (checkTime && checkDate) return isBefore(date, min);\n\t\tif (checkTime) {\n\t\t\tconst base = /* @__PURE__ */ new Date(0);\n\t\t\treturn isBefore(updateTime_default(base, date), updateTime_default(base, min));\n\t\t}\n\t\tif (checkDate) {\n\t\t\tconst base = /* @__PURE__ */ new Date(0);\n\t\t\treturn isBefore(updateDate_default(base, date), updateDate_default(base, min));\n\t\t}\n\t}\n\treturn false;\n};\n/**\n* Check\n* @param date - date to check.\n* @param max - maximum date.\n* @param checkDate - check date part (year, day, month).\n* @param checkTime - check time part (hour, minutes etc.).\n* @returns whether limit is kept or not.\n*/\nvar isAfterMaxDate = (date, max, checkDate, checkTime) => {\n\tif (max) {\n\t\tif (checkTime && checkDate) return isAfter(date, max);\n\t\tif (checkTime) {\n\t\t\tconst base = /* @__PURE__ */ new Date(0);\n\t\t\treturn isAfter(updateTime_default(base, date), updateTime_default(base, max));\n\t\t}\n\t\tif (checkDate) {\n\t\t\tconst base = /* @__PURE__ */ new Date(0);\n\t\t\treturn isAfter(updateDate_default(base, date), updateDate_default(base, max));\n\t\t}\n\t}\n\treturn false;\n};\n//#endregion\n//#region src/debounce.ts\nvar debounce = (callback, wait) => {\n\tlet timer;\n\tlet lastCall = 0;\n\treturn (...args) => {\n\t\tconst [value, index] = args;\n\t\tclearTimeout(timer);\n\t\tconst now = Date.now();\n\t\tif (now - lastCall > wait) {\n\t\t\tlastCall = now;\n\t\t\tcallback(value, index);\n\t\t} else timer = setTimeout(() => {\n\t\t\tlastCall = now;\n\t\t\tcallback(value, index);\n\t\t}, wait);\n\t};\n};\nvar filters = Object.assign({}, ...[\n\t{\n\t\tid: \"search\",\n\t\tnormalize(searchTerm, caseSensitiveSearch) {\n\t\t\treturn caseSensitiveSearch ? searchTerm : searchTerm.toLowerCase();\n\t\t},\n\t\ttest(text, normalizedSearchTerm, caseSensitiveSearch, inverseSearch) {\n\t\t\tconst matches = (caseSensitiveSearch ? text : text.toLowerCase()).includes(normalizedSearchTerm);\n\t\t\treturn inverseSearch ? !matches : matches;\n\t\t}\n\t},\n\t{\n\t\tid: \"wildcard\",\n\t\tnormalize(searchTerm, caseSensitiveSearch) {\n\t\t\tif (searchTerm.length > 0) searchTerm = `^${searchTerm.replace(/[-[\\]{}()+.,\\\\^$|#\\s]/g, \"\\\\$&\").replace(/\\*/g, \".*\").replace(/\\?/g, \".?\")}$`;\n\t\t\telse return { test: () => false };\n\t\t\ttry {\n\t\t\t\treturn new RegExp(searchTerm, caseSensitiveSearch ? \"\" : \"i\");\n\t\t\t} catch (_error) {\n\t\t\t\treturn /$^/;\n\t\t\t}\n\t\t},\n\t\ttest(text, normalizedSearchTerm, caseSensitiveSearch, inverseSearch) {\n\t\t\tconst matches = normalizedSearchTerm.test(text);\n\t\t\treturn inverseSearch ? !matches : matches;\n\t\t}\n\t},\n\t{\n\t\tid: \"regex\",\n\t\tnormalize(searchTerm, caseSensitiveSearch) {\n\t\t\ttry {\n\t\t\t\tconst flags = caseSensitiveSearch ? \"\" : \"i\";\n\t\t\t\treturn new RegExp(`^(${searchTerm})$`, flags);\n\t\t\t} catch (_error) {\n\t\t\t\treturn /$^/;\n\t\t\t}\n\t\t},\n\t\ttest(text, normalizedSearchTerm, caseSensitiveSearch, inverseSearch) {\n\t\t\tconst matches = normalizedSearchTerm.test(text);\n\t\t\treturn inverseSearch ? !matches : matches;\n\t\t}\n\t},\n\t{\n\t\tid: \"type\",\n\t\tnormalize(selectedTypes) {\n\t\t\treturn { test: (type) => selectedTypes.includes(type) };\n\t\t},\n\t\ttest(type, normalizedSearchTerm) {\n\t\t\tif (typeof type === \"undefined\") return false;\n\t\t\treturn normalizedSearchTerm.test(type);\n\t\t}\n\t}\n].map((obj) => ({ [obj.id]: obj })));\n//#endregion\n//#region src/localTimezone.ts\n/**\n* Get the users local timezone.\n*\n* @returns current users timezone (browser based) tz db string (e. g. Europe/Berlin).\n*/\nvar localTimezone_default = () => Intl.DateTimeFormat().resolvedOptions().timeZone;\n//#endregion\n//#region src/format.ts\n/**\n* Converts the specified date String to human readable text containing the day, month, and year.\n* Example: '2018-07-31T09:44:31+00:00' => 'Jul 31, 2018'\n*\n* @param dateString String representation of the Date to format\n* @param useTimeZone to set the timeZone where the user is located, and display local date and time\n* @returns human readable date String\n*/\nvar formatDateString = (dateString, useTimeZone = false) => {\n\tconst date = new Date(dateString);\n\tif (isNaN(date)) throw Error(\"Invalid Date format\");\n\tconst baseDateOptions = {\n\t\tday: \"numeric\",\n\t\tmonth: \"short\",\n\t\tyear: \"numeric\"\n\t};\n\tconst dateOptions = useTimeZone ? {\n\t\t...baseDateOptions,\n\t\ttimeZone: localTimezone_default()\n\t} : baseDateOptions;\n\treturn date.toLocaleDateString(\"en-US\", dateOptions);\n};\n/**\n* Converts the specified time String to human readable text containing the hour (12-hour) and minute.\n* Example: '2018-07-31T09:44:31+00:00' => '9:44 AM'\n*\n* @param timeString String representation of the Date (including time) to format\n* @param useTimeZone to set the timeZone where the user is located, and display local date and time\n* @returns human readable time String\n*/\nvar formatTimeString = (timeString, useTimeZone = false) => {\n\tconst time = new Date(timeString);\n\tif (isNaN(time)) throw Error(\"Invalid Date format\");\n\tconst baseTimeOptions = {\n\t\thour: \"numeric\",\n\t\tminute: \"2-digit\"\n\t};\n\tconst timeOptions = useTimeZone ? {\n\t\t...baseTimeOptions,\n\t\ttimeZone: localTimezone_default()\n\t} : baseTimeOptions;\n\treturn time.toLocaleTimeString(\"en-US\", timeOptions);\n};\n/**\n* Converts the specified time String to human readable text containing the date (day, month, year) and time (hour,\n* minute; 12-hour).\n* Example: '2018-07-31T09:44:31+00:00' => 'Jul 31, 2018 9:44 AM'\n*\n* @param dateTimeString String representation of the Date (including time and date) to format\n* @param useTimeZone to set the timeZone where the user is located, and display local date and time\n* @returns human readable date/time String\n*/\nvar formatDateTimeString = (dateTimeString, useTimeZone = false) => {\n\treturn `${formatDateString(dateTimeString, useTimeZone)} ${formatTimeString(dateTimeString, useTimeZone)}`;\n};\n/**\n* Converts the specified date and time to the user time zone with option to display (day, month, year) only or with time (hour,\n* minute; 12-hour).\n*\n* @param showTime String representation of the Date to convert and format\n* @param String | number} date String representation of the Date to convert and format\n* @returns human readable date/time String converted to user time zone\n*/\nvar formatLocalDateTimeString = (date, showTime) => showTime ? formatDateTimeString(date, true) : formatDateString(date, true);\nvar formatFileSize = (bytes) => {\n\treturn prettyBytes(Number.isFinite(bytes) && bytes >= 0 ? bytes : 0);\n};\n//#endregion\n//#region src/getDeepActiveElement.ts\nvar getDeepActiveElement = () => {\n\tlet element = document?.activeElement;\n\twhile (element?.shadowRoot) element = element?.shadowRoot?.activeElement;\n\treturn element;\n};\n//#endregion\n//#region src/getWrappedAroundIndex.ts\n/**\n* Since (a % b) yields a negative outcome for negative a, we need this method in order\n* to correctly compute wrapped around indices in lists\n* @param {number} index an arbitrary integer\n* @param {number} length a positive integer\n* @returns {number} the non-negative modulo outcome\n*/\nvar getWrappedAroundIndex_default = (index, length) => (index % length + length) % length;\n//#endregion\n//#region src/intervalUtils.ts\nvar intervalUtils_exports = /* @__PURE__ */ __exportAll({\n\tformatIntervalToHumanReadableIntervalString: () => formatIntervalToHumanReadableIntervalString,\n\tformatIntervalToISOIntervalString: () => formatIntervalToISOIntervalString,\n\tisValidHumanReadableIntervalString: () => isValidHumanReadableIntervalString,\n\tisValidISOIntervalString: () => isValidISOIntervalString,\n\tisValidIntervalString: () => isValidIntervalString,\n\tisZero: () => isZero,\n\tparseGenericIntervalString: () => parseGenericIntervalString,\n\tparseHumanReadableIntervalString: () => parseHumanReadableIntervalString,\n\tparseISOIntervalString: () => parseISOIntervalString\n});\nvar extractPeriodFromRegexMatch = (negative, match) => {\n\treturn {\n\t\tnegative,\n\t\tyears: parseInt(match[1] ?? \"0\", 10),\n\t\tmonths: parseInt(match[2] ?? \"0\", 10),\n\t\tweeks: parseInt(match[3] ?? \"0\", 10),\n\t\tdays: parseInt(match[4] ?? \"0\", 10)\n\t};\n};\nvar extractDurationFromRegexMatch = (negative, match) => {\n\tconst milliseconds = parseInt(match[4]?.padEnd(3, \"0\") ?? \"0\", 10);\n\treturn {\n\t\tnegative,\n\t\thours: parseInt(match[1] ?? \"0\", 10),\n\t\tminutes: parseInt(match[2] ?? \"0\", 10),\n\t\tseconds: parseInt(match[3] ?? \"0\", 10),\n\t\tmilliseconds\n\t};\n};\nvar isZero = (interval) => {\n\tif (interval.type === \"DATE\") return interval.interval.years === 0 && interval.interval.months === 0 && interval.interval.weeks === 0 && interval.interval.days === 0;\n\telse return interval.interval.hours === 0 && interval.interval.minutes === 0 && interval.interval.seconds === 0 && interval.interval.milliseconds === 0;\n};\n/**\n* Take an interval object and convert it to an ISO duration or period string. All parts of the\n* relevant part of the Interval object are included in the output, even if they are zero.\n*\n* Technically the ISO standard allows to mix period and duration parts, but we don't support that\n* here because it's incredibly hard to deal with all the edge cases. Maybe in a future ticket.\n*\n* The output here is allowed to be negative, in which case the minus sign is prepended to the\n* output.\n*\n* @param toFormat The PeriodOrDuration object to format\n*/\nvar formatIntervalToISOIntervalString = (toFormat) => {\n\tlet output = \"P\";\n\tif (toFormat.type === \"DATE\") output += `${toFormat.interval.years}Y${toFormat.interval.months}M${toFormat.interval.weeks}W${toFormat.interval.days}D`;\n\telse output += `T${toFormat.interval.hours}H${toFormat.interval.minutes}M${toFormat.interval.seconds}.${toFormat.interval.milliseconds.toString().padStart(3, \"0\")}S`;\n\tif (toFormat.interval.negative) output = `-${output}`;\n\treturn output;\n};\n/**\n* Take an interval object and convert it to a human readable string. Only non-zero parts are\n* included in the output (unless all parts are 0).\n*\n* The output here is allowed to be negative, in which case the minus sign is prepended to the\n* output and we wrap the whole thing in brackets e.g. -(1 year 2 days).\n*\n* @param toFormat The PeriodOrDuration object to format\n*/\nvar formatIntervalToHumanReadableIntervalString = (toFormat) => {\n\tconst formatPart = (value, unit) => {\n\t\tif (value === 0) return \"\";\n\t\telse if (value === 1) return `${value} ${unit} `;\n\t\telse return `${value} ${unit}s `;\n\t};\n\tlet output = \"\";\n\tif (toFormat.type === \"DATE\") {\n\t\tif (isZero(toFormat)) return \"0 days\";\n\t\toutput += formatPart(toFormat.interval.years, \"year\");\n\t\toutput += formatPart(toFormat.interval.months, \"month\");\n\t\toutput += formatPart(toFormat.interval.weeks, \"week\");\n\t\toutput += formatPart(toFormat.interval.days, \"day\");\n\t} else {\n\t\tif (isZero(toFormat)) return \"0 seconds\";\n\t\toutput += formatPart(toFormat.interval.hours, \"hour\");\n\t\toutput += formatPart(toFormat.interval.minutes, \"minute\");\n\t\tconst milliSecondsZero = toFormat.interval.milliseconds === 0;\n\t\tif (toFormat.interval.seconds !== 0 || !milliSecondsZero) if (milliSecondsZero) output += formatPart(toFormat.interval.seconds, \"second\");\n\t\telse output += `${toFormat.interval.seconds}.${toFormat.interval.milliseconds.toString().padStart(3, \"0\")} seconds `;\n\t}\n\tif (toFormat.interval.negative) output = `-(${output.trim()})`;\n\treturn output.trim();\n};\nvar yearsPart = \"(\\\\d+)\\\\s*y(?:ears?)?\";\nvar monthsPart = \"(\\\\d+)\\\\s*m(?:o(?:nths?)?)?\";\nvar weeksPart = \"(\\\\d+)\\\\s*w(?:eeks?)?\";\nvar daysPart = \"(\\\\d+)\\\\s*d(?:ays?)?\";\nvar hoursPart = \"(\\\\d+)\\\\s*h(?:ours?)?\";\nvar minutesPart = \"(\\\\d+)\\\\s*m(?:in(?:s|utes?)?)?\";\nvar secondsPart = \"(\\\\d+)(?:[,.](\\\\d{1,3}))?\\\\s*s(?:ec(?:s|onds?)?)?\";\n/**\n* Matches a human readable period string, e.g. \"1y 2mo 3weeks 4day\" (each part is optional)\n*/\nvar humanReadablePeriodRegex = new RegExp(`^(?:${yearsPart})?\\\\s*(?:${monthsPart})?\\\\s*(?:${weeksPart})?\\\\s*(?:${daysPart})?\\\\s*$`, \"i\");\n/**\n* Matches a human readable duration string, e.g. \"1h 2m 3.456s\" (each part is optional)\n*/\nvar humanReadableDurationRegex = new RegExp(`^(?:${hoursPart})?\\\\s*(?:${minutesPart})?\\\\s*(?:${secondsPart})?$`, \"i\");\n/**\n* Matches a negative human readable period string, e.g. \"-(1y 2mo 3weeks 4day)\" (each part is optional)\n*/\nvar negativeHumanReadablePeriodRegex = new RegExp(`^\\\\s*-\\\\s*\\\\(\\\\s*${humanReadablePeriodRegex.source.replace(/[$^]/g, \"\")}\\\\s*\\\\)\\\\s*$`, \"i\");\n/**\n* Matches a negative human readable period string with one field like \"-1y\" or \"-1w\"\n*/\nvar negativeHumanReadablePeriodRegexWithSingleField = new RegExp(`^\\\\s*-\\\\s*(?:\\\\s*${yearsPart}|${monthsPart}|${weeksPart}|${daysPart})\\\\s*$`, \"i\");\n/**\n* Matches a negative human readable duration string, e.g. \"-(1h 2m 3.456s)\" (each part is optional)\n*/\nvar negativeHumanReadableDurationRegex = new RegExp(`^\\\\s*-\\\\s*\\\\(\\\\s*${humanReadableDurationRegex.source.replace(/[$^]/g, \"\")}\\\\s*\\\\)\\\\s*$`, \"i\");\n/**\n* Matches a negative human readable duration string with one field like \"-1h\" or \"-1.5s\"\n*/\nvar negativeHumanReadableDurationRegexWithSingleField = new RegExp(`^\\\\s*-\\\\s*(?:\\\\s*${hoursPart}|${minutesPart}|${secondsPart})\\\\s*$`, \"i\");\n/**\n* Try to parse a human readable interval string into an Interval object. Any parts not specified\n* are assumed to be zero. Note that the string must be either a period or a duration, not a mix of\n* both. So for example, \"1y 2mo 3weeks 4day\" is fine, as is \"1h 2m 3.456s\". However, \"1y 2mo 1sec\"\n* is not, since it's a mix of both.\n*\n* Negative intervals are allowed, although if multiple fields are provided the string must include\n* brackets, so \"-(1y 2mo)\" is also valid, as is \"-5 seconds\".\n*\n* The string is required to have at least some content, any string that is blank will throw an error.\n*\n* @param intervalString The human readable time string\n*/\nvar parseHumanReadableIntervalString = (intervalString) => {\n\tintervalString = intervalString?.trim();\n\tif (!intervalString) throw new Error(\"Empty interval string\");\n\tconst matchPositivePeriod = humanReadablePeriodRegex.exec(intervalString);\n\tconst matchNegativePeriod = negativeHumanReadablePeriodRegex.exec(intervalString) ?? negativeHumanReadablePeriodRegexWithSingleField.exec(intervalString);\n\tconst matchPositiveDuration = humanReadableDurationRegex.exec(intervalString);\n\tconst matchNegativeDuration = negativeHumanReadableDurationRegex.exec(intervalString) ?? negativeHumanReadableDurationRegexWithSingleField.exec(intervalString);\n\tconst matchPeriod = matchPositivePeriod ?? matchNegativePeriod;\n\tconst matchDuration = matchPositiveDuration ?? matchNegativeDuration;\n\tconst negative = (matchNegativePeriod ?? matchNegativeDuration) !== null;\n\tif (matchDuration && matchPeriod) throw new Error(\"Ambiguous time format\");\n\tif (matchPeriod) return {\n\t\ttype: \"DATE\",\n\t\tinterval: extractPeriodFromRegexMatch(negative, matchPeriod)\n\t};\n\telse if (matchDuration) return {\n\t\ttype: \"TIME\",\n\t\tinterval: extractDurationFromRegexMatch(negative, matchDuration)\n\t};\n\telse throw new Error(`Invalid human readable time: ${intervalString}`);\n};\n/**\n* Check if the given string can be understood as a human readable duration or period string. The\n* type parameter specifies whether the string should be a date, time, or either.\n*\n* @param time the string to check\n* @param expectedType the type of the string - either \"DATE\", \"TIME\", or \"ANY\"\n*/\nvar isValidHumanReadableIntervalString = (time, expectedType) => {\n\ttry {\n\t\tconst validationResult = parseHumanReadableIntervalString(time);\n\t\tconst actualType = validationResult.type;\n\t\tconst negative = validationResult.interval.negative;\n\t\tif (actualType === expectedType || expectedType === \"DATE_OR_TIME\") return {\n\t\t\tvalid: true,\n\t\t\ttype: actualType,\n\t\t\tnegative\n\t\t};\n\t\telse return { valid: false };\n\t} catch (_e) {\n\t\treturn { valid: false };\n\t}\n};\n/**\n* Convert an ISO duration OR period string to an Interval object. So for example,\n* \"P1Y2M3W4D\" is fine, as is \"PT1H2M3.456S\". However, \"P1Y2M3W4D1H2M3.456S\" is not, since\n* it's a mix of both. We're more forgiving than the ISO standard, so we allow for missing parts.\n* Also, the string is allowed to be negative, so \"-P1Y2M3W4D\" is also valid.\n*\n* The string is required to have at least some content, so the strings \"\", \"P\", and \"PT\" are\n* considered invalid (also if they start with a -).\n*\n* @param isoString The ISO duration or period string.\n*/\nvar parseISOIntervalString = (isoString) => {\n\tisoString = isoString?.trim();\n\tif ([\n\t\t\"\",\n\t\t\"P\",\n\t\t\"PT\",\n\t\t\"-\",\n\t\t\"-P\",\n\t\t\"-PT\"\n\t].includes(isoString)) throw new Error(\"Empty ISO duration\");\n\tconst periodRegex = /^-?P(?:(\\d+)Y)?(?:(\\d+)M)?(?:(\\d+)W)?(?:(\\d+)D)?$/;\n\tconst durationRegex = /^-?PT(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+)(?:[,.](\\d{1,3}))?S)?$/;\n\tconst matchPeriod = periodRegex.exec(isoString);\n\tconst matchDuration = durationRegex.exec(isoString);\n\tif (matchPeriod) return {\n\t\ttype: \"DATE\",\n\t\tinterval: extractPeriodFromRegexMatch(isoString.startsWith(\"-\"), matchPeriod)\n\t};\n\telse if (matchDuration) return {\n\t\ttype: \"TIME\",\n\t\tinterval: extractDurationFromRegexMatch(isoString.startsWith(\"-\"), matchDuration)\n\t};\n\telse throw new Error(`Invalid ISO duration: ${isoString}`);\n};\n/**\n* Check if the given string is a valid duration or period ISO string. The type parameter\n* specifies whether the string should be a date, time, or either.\n*\n* @param isoString the string to check\n* @param type the type of the string - either \"DATE\", \"TIME\", or \"ANY\"\n*/\nvar isValidISOIntervalString = (isoString, type) => {\n\ttry {\n\t\tconst validationResult = parseISOIntervalString(isoString);\n\t\tconst actualType = validationResult.type;\n\t\tconst negative = validationResult.interval.negative;\n\t\tif (actualType === type || type === \"DATE_OR_TIME\") return {\n\t\t\tvalid: true,\n\t\t\ttype: actualType,\n\t\t\tnegative\n\t\t};\n\t\telse return { valid: false };\n\t} catch (_e) {\n\t\treturn { valid: false };\n\t}\n};\n/**\n* Try to convert an interval string to an Interval object. The string can be either an ISO\n* duration/period string or a human readable string. If the string is not valid, an error is\n* thrown.\n*\n* @param time the time string, either ISO or human readable\n*/\nvar parseGenericIntervalString = (time) => {\n\tconst validISO = isValidISOIntervalString(time, \"DATE_OR_TIME\");\n\tconst validHumanReadable = isValidHumanReadableIntervalString(time, \"DATE_OR_TIME\");\n\tif (validISO.valid) return parseISOIntervalString(time);\n\telse if (validHumanReadable.valid) return parseHumanReadableIntervalString(time);\n\telse throw new Error(`Invalid interval string: ${time}`);\n};\n/**\n* Check if the given string is a valid interval string, either human readable or ISO. The type parameter\n* specifies whether the string should be a period, duration, or either.\n*\n* @param time the time string to check\n* @param type the type of the string - either \"DATE\", \"TIME\", or \"ANY\"\n*/\nvar isValidIntervalString = (time, type) => {\n\tconst validISO = isValidISOIntervalString(time, type);\n\tconst validHumanReadable = isValidHumanReadableIntervalString(time, type);\n\tif (validISO.valid) return validISO;\n\telse if (validHumanReadable.valid) return validHumanReadable;\n\telse return { valid: false };\n};\n//#endregion\n//#region src/numIntegerDigits.ts\n/**\n* Count the number of integer digits for a given number.\n*\n* @param input number.\n* @returns number of integer digits x has. 1234 = 4 but 1234.44 is also 4.\n*/\nvar numIntegerDigits_default = (input) => Math.max(Math.floor(Math.log10(Math.abs(input))), 0) + 1;\n//#endregion\n//#region src/promise/createAbortablePromise.ts\nvar AbortError = class extends Error {};\n/**\n* Helper to create an abortable promise. Returns an AbortController and a Function\n* that you can pass your async handler to. Whenever the AbortController signal is\n* aborted then the async handler's promise will reject with an AbortError\n*\n* Example:\n* ```\n* import { abortUtils } from \"@knime/utils\"\n* const myFetchCall = async (params...) => {...};\n*\n* try {\n* const { runAbortablePromise, abortController } = createAbortablePromise(() =>\n* myFetchCall(params...),\n* );\n* } catch (e) {\n* if (e instanceof abortUtils.AbortError) {\n* console.info('ignore due to abort');\n* return;\n* }\n* }\n*\n* // somewhere else (while request is in-flight)\n* abortController.abort(new abortUtils.AbortError('reason here'))\n* ```\n*/\nvar createAbortablePromise = () => {\n\tconst abortController = new AbortController();\n\tconst runAbortablePromise = (request) => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst abortListener = ({ target }) => {\n\t\t\t\tabortController.signal.removeEventListener(\"abort\", abortListener);\n\t\t\t\tconst reason = target.reason;\n\t\t\t\treject(reason instanceof AbortError ? reason : new AbortError(reason));\n\t\t\t};\n\t\t\trequest().then(resolve).catch((error) => {\n\t\t\t\tif (error instanceof AbortError) return;\n\t\t\t\treject(error);\n\t\t\t});\n\t\t\tabortController.signal.addEventListener(\"abort\", abortListener);\n\t\t});\n\t};\n\treturn {\n\t\tabortController,\n\t\trunAbortablePromise\n\t};\n};\n//#endregion\n//#region src/promise/createUnwrappedPromise.ts\nvar createUnwrappedPromise = () => {\n\tlet resolve = () => {};\n\tlet reject = () => {};\n\tconst promise = new Promise((res, rej) => {\n\t\tresolve = res;\n\t\treject = rej;\n\t});\n\treturn {\n\t\tresolve,\n\t\treject,\n\t\tpromise\n\t};\n};\n//#endregion\n//#region src/sleep.ts\n/**\n* Returns promise that resolves after ms.\n*/\nfunction sleep(ms) {\n\treturn new Promise((resolve) => setTimeout(resolve, ms));\n}\n/**\n* Helper to add retry capability to an async function\n* @param fn async function\n* @param retryCount max number of retries. defaults to 5\n* @param retryDelayMS delay in-between retries in millisecs. defaults to 0\n* @param excludeError predicate fn to exclude specific errors from causing a retry\n*/\nasync function retryPromise({ fn, retryCount = 5, retryDelayMS = 0, excludeError }) {\n\ttry {\n\t\treturn await fn();\n\t} catch (error) {\n\t\tif (excludeError?.(error)) throw error;\n\t\tif (retryCount > 0) {\n\t\t\tawait sleep(retryDelayMS);\n\t\t\treturn await retryPromise({\n\t\t\t\tfn,\n\t\t\t\tretryCount: retryCount - 1,\n\t\t\t\tretryDelayMS,\n\t\t\t\texcludeError\n\t\t\t});\n\t\t}\n\t\tthrow error;\n\t}\n}\n//#endregion\n//#region src/promise/index.ts\nvar promise_exports = /* @__PURE__ */ __exportAll({\n\tAbortError: () => AbortError,\n\tDEFAULT_RETRY_COUNT: () => 5,\n\tDEFAULT_RETRY_DELAY_MS: () => 0,\n\tcreateAbortablePromise: () => createAbortablePromise,\n\tcreateUnwrappedPromise: () => createUnwrappedPromise,\n\tretryPromise: () => retryPromise\n});\n//#endregion\n//#region src/sanitization.ts\nvar ALLOWED_TAGS = [\n\t\"p\",\n\t\"div\",\n\t\"h1\",\n\t\"h2\",\n\t\"h3\",\n\t\"h4\",\n\t\"h5\",\n\t\"h6\",\n\t\"ul\",\n\t\"ol\",\n\t\"li\",\n\t\"blockquote\",\n\t\"b\",\n\t\"i\",\n\t\"s\",\n\t\"u\",\n\t\"sup\",\n\t\"sub\",\n\t\"ins\",\n\t\"del\",\n\t\"strong\",\n\t\"strike\",\n\t\"tt\",\n\t\"code\",\n\t\"big\",\n\t\"small\",\n\t\"br\",\n\t\"span\",\n\t\"em\"\n];\n/**\n* Sanitizes Raw HTML and only allow specific tags to be used, as per OWASP standards.\n* @param rawHTML\n* @param options.allowStyleAttribute - Allow the style attribute on elements\n* @param options.allowHyperlinks - Allow anchor tags with href attribute\n* @returns sanitized html\n*/\nvar sanitizeHTML = (rawHTML, options = {\n\tallowStyleAttribute: false,\n\tallowHyperlinks: false\n}) => {\n\tconst { allowStyleAttribute, allowHyperlinks } = options;\n\tconst ALLOWED_ATTR = [...allowStyleAttribute ? [\"style\"] : [], ...allowHyperlinks ? [\"href\"] : []];\n\tconst allowedTags = allowHyperlinks ? [...ALLOWED_TAGS, \"a\"] : ALLOWED_TAGS;\n\treturn DomPurify.sanitize(rawHTML, {\n\t\tALLOWED_TAGS: allowedTags,\n\t\tALLOWED_ATTR\n\t});\n};\n/**\n* Removes any HTML tag from the input string. Keeps HTML entities\n* (e.g &nbsp; because these can be considered plain text)\n* @param rawHTML\n* @returns plain text\n*/\nvar stripHTML = (rawHTML) => {\n\treturn DomPurify.sanitize(rawHTML, {\n\t\tALLOWED_TAGS: [],\n\t\tALLOWED_ATTR: []\n\t});\n};\nvar sanitization = {\n\tsanitizeHTML,\n\tstripHTML\n};\n//#endregion\n//#region src/truncateString.ts\nvar defaultMaxLength = 160;\nvar truncateString_default = (string = \"\", maxLength = defaultMaxLength) => {\n\tconst dots = string.length > maxLength ? \"…\" : \"\";\n\treturn `${string.substring(0, maxLength - 1)}${dots}`;\n};\n//#endregion\n//#region src/fileExtensions.ts\n/**\n* Gets the file extension\n* @param nameOrPath can take a full file name (e.g \"file.txt\") or a path to a file\n* (e.g \"file://path/to/file.txt\" OR \"/path/to/file.txt\")\n* @returns just the file extension (e.g \"txt\")\n*/\nvar getFileExtension = (nameOrPath) => {\n\tconst basename = nameOrPath.split(/[\\\\/]/).pop() ?? \"\";\n\tconst parts = basename.split(\".\");\n\tif (basename === \"\" || parts.length === 1) return \"\";\n\treturn parts.at(-1) ?? \"\";\n};\n/**\n* Metadata for .knar files, which corresponds to exported KNIME Workflow Groups\n* or Components\n*/\nvar KNAR = Object.freeze({\n\textension: \"knar\",\n\tmimeType: \"application/vnd.knime.workflow-group+zip\",\n\tmatches(file) {\n\t\treturn getFileExtension(file.name) === this.extension;\n\t}\n});\n/**\n* Metadata for .knwf files, which corresponds to exported KNIME Workflows\n*/\nvar KNWF = Object.freeze({\n\textension: \"knwf\",\n\tmimeType: \"application/vnd.knime.workflow+zip\",\n\tmatches(file) {\n\t\treturn getFileExtension(file.name) === this.extension;\n\t},\n\t/**\n\t* Gets the name of a .knwf file without the extension. If the file is not\n\t* matched as a .knwf file then this function will return the default value,\n\t* which is empty string (\"\") if param is not provided\n\t*/\n\tgetNameOrDefault(file, defaultValue = \"\") {\n\t\tif (!this.matches(file)) return defaultValue;\n\t\treturn file.name.replace(`.${this.extension}`, \"\");\n\t}\n});\nvar knimeFileFormats = {\n\tKNAR,\n\tKNWF\n};\n/**\n* Gets the mime type from a given file. Defaults to `application/octet-stream`\n* if mimeType cannot be detected\n* @param file File\n* @returns mimeType\n*/\nvar getFileMimeType = (file) => {\n\tconst DEFAULT_MIMETYPE = \"application/octet-stream\";\n\tif (!getFileExtension(file.name)) return DEFAULT_MIMETYPE;\n\tif (KNWF.matches(file)) return KNWF.mimeType;\n\tif (KNAR.matches(file)) return KNAR.mimeType;\n\tif (!file.type) return DEFAULT_MIMETYPE;\n\treturn file.type;\n};\n//#endregion\n//#region src/hotkeys/enums.ts\n/**\n* Platforms that influence how modifier keys are rendered. macOS substitutes\n* dedicated glyphs (`⌘`, `⌥`, `⇧`, …), every other platform uses the textual\n* rendering (`Ctrl`, `Alt`, `Shift`, …).\n*/\nvar hotkeyPlatform = {\n\tMAC_OS: \"macOS\",\n\tOTHER: \"other\"\n};\nObject.values(hotkeyPlatform);\n//#endregion\n//#region src/platform/navigator.ts\nvar navigator_exports = /* @__PURE__ */ __exportAll({\n\tisMac: () => isMac,\n\tisWindows: () => isWindows\n});\n/**\n*\n* @returns true if the platform of the user is Mac\n*/\nvar isMac = () => navigator?.userAgent?.toLowerCase()?.includes(\"mac\");\n/**\n*\n* @returns true if the platform of the user is Windows\n*/\nvar isWindows = () => navigator?.userAgent?.toLowerCase()?.includes(\"windows\");\n//#endregion\n//#region src/hotkeys/format.ts\nvar globalKeyMap = {\n\tArrowUp: \"↑\",\n\tArrowDown: \"↓\",\n\tArrowLeft: \"←\",\n\tArrowRight: \"→\",\n\tEnter: \"↵\",\n\t\" \": \"Space\",\n\tCtrlOrCmd: \"Ctrl\"\n};\nvar MacOSkeyMap = {\n\tShift: \"⇧\",\n\tDelete: \"⌫\",\n\tCtrlOrCmd: \"⌘\",\n\tCtrl: \"⌃\",\n\tAlt: \"⌥\",\n\tEnter: \"↩\"\n};\n/**\n* Returns a string representation of a single hotkey. Replaces some special key names with symbols.\n*\n* By default the platform is auto-detected from the user agent via `isMac()`.\n* Pass `platform` to force a specific platform's glyphs — useful for SSR,\n* tests, or rendering multiple platforms on the same page.\n*/\nvar formatHotkey = (hotkey, platform) => {\n\t/**\n\t* Returns the symbol corresponding to the `key` based on the given\n\t* `formatMap`. Otherwise, if not found, returns the same `key` value given\n\t*/\n\tconst mapSymbols = (formatMap) => (key) => formatMap[key] ?? key;\n\t/**\n\t* Pipe function implementation. Receives a list of functions to execute in order\n\t* and will pipe the parameter passed at the end to each function returning the final output\n\t*/\n\tconst pipe = (...fns) => fns.reduce((f, g) => (arg) => g(f(arg)), (arg) => arg);\n\tconst macKeyFormatter = pipe(mapSymbols(MacOSkeyMap), mapSymbols(globalKeyMap));\n\tconst generalKeyFormatter = mapSymbols(globalKeyMap);\n\treturn (platform === void 0 ? isMac() : platform === hotkeyPlatform.MAC_OS) ? macKeyFormatter(hotkey) : generalKeyFormatter(hotkey);\n};\nvar getDefaultSeparator = () => isMac() ? \" \" : \"+\";\n/**\n* Returns a string representation of a list of hotkeys. Replaces some special key names with symbols\n*/\nvar formatHotkeys = (hotkeys, getSeparator = getDefaultSeparator) => hotkeys.map((hotkey) => formatHotkey(hotkey)).join(getSeparator());\n/**\n* Appends a formatted hotkey shortcut to the given string. Useful for tooltips\n*/\nvar textWithHotkeys = (text, hotkeys) => {\n\treturn `${text} – ${formatHotkeys(hotkeys)}`;\n};\n//#endregion\n//#region src/hotkeys/match.ts\n/**\n* Checks whether a pressed `Digit` key falls within a numeric hotkey range such\n* as `1-9`.\n* @param keyCode - The `KeyboardEvent.code` to check (e.g. `Digit5`).\n* @param hotkey - The hotkey token, expected to be a single-digit range like `1-9`.\n* @returns True if the pressed digit lies within the inclusive range.\n*/\nvar isDigitKeyInRange = (keyCode, hotkey) => {\n\tif (hotkey.length !== 3 || !keyCode?.startsWith(\"Digit\")) return false;\n\tconst keyNumber = Number(keyCode.slice(5));\n\tconst [lower, upper] = hotkey.split(\"-\");\n\treturn Boolean(lower) && Boolean(upper) && Number.parseInt(lower, 10) <= keyNumber && keyNumber <= Number.parseInt(upper, 10);\n};\n/**\n* Checks whether a keyboard event matches a hotkey definition. The last token is\n* treated as the character; any preceding tokens are modifiers. The special\n* `CtrlOrCmd` modifier resolves to the platform's primary modifier (Meta/`⌘` on\n* macOS, Ctrl elsewhere).\n* @param event - The keyboard event to check.\n* @param hotkeys - The ordered hotkey tokens (modifiers followed by the character).\n* @returns True if the event matches the given hotkey, otherwise false.\n*/\nvar match = (event, hotkeys) => {\n\tconst { key, code, metaKey, ctrlKey, shiftKey, altKey } = event;\n\tconst modifiers = hotkeys.slice();\n\tconst character = modifiers.pop() ?? \"\";\n\tconst ctrlOrMeta = isMac() ? \"Meta\" : \"Ctrl\";\n\tconst platformModifiers = new Set(modifiers.map((modifier) => modifier === \"CtrlOrCmd\" ? ctrlOrMeta : modifier));\n\tconst metaMatches = Boolean(metaKey) === platformModifiers.has(\"Meta\");\n\tconst ctrlMatches = Boolean(ctrlKey) === platformModifiers.has(\"Ctrl\");\n\tconst shiftMatches = Boolean(shiftKey) === platformModifiers.has(\"Shift\");\n\tconst altMatches = Boolean(altKey) === platformModifiers.has(\"Alt\");\n\tconst keysMatch = key.toUpperCase() === character.toUpperCase() || character.includes(\"-\") && isDigitKeyInRange(code, character) || isMac() && character === \"Delete\" && key === \"Backspace\";\n\treturn metaMatches && ctrlMatches && shiftMatches && altMatches && keysMatch;\n};\n//#endregion\n//#region src/hotkeys/modifiers.ts\n/**\n* Checks if any modifier key (Ctrl, Meta, Alt, or Shift) is pressed.\n* @param event - The keyboard event to check.\n* @returns True if a modifier key is pressed, otherwise false.\n*/\nvar isModifierKeyPressed = (event) => {\n\treturn event.ctrlKey || event.metaKey || event.altKey || event.shiftKey;\n};\n/**\n* Checks if a specific key (or keys) were pressed without any modifier keys.\n* @param event - The keyboard event to check.\n* @param keys - The key or keys to check for.\n* @returns True if the specified key(s) were pressed without modifiers, otherwise false.\n*/\nvar isKeyWithoutModifiers = (event, keys) => {\n\treturn (Array.isArray(keys) ? keys : [keys]).includes(event.key) && !isModifierKeyPressed(event);\n};\n/**\n* Returns the name of the primary modifier key for the current platform.\n*/\nvar getMetaOrCtrlKey = () => {\n\treturn isMac() ? \"metaKey\" : \"ctrlKey\";\n};\n//#endregion\n//#region src/hotkeys/index.ts\n/**\n* Grouped keyboard-shortcut helpers, exposed as a single namespace for\n* ergonomic access (e.g. `hotkeys.formatHotkey`).\n*/\nvar hotkeys = {\n\tformatHotkeys,\n\tformatHotkey,\n\tgetDefaultSeparator,\n\thotkeyPlatform,\n\ttextWithHotkeys,\n\tmatch\n};\n//#endregion\nexport { capitalize, caseFormatter, debounce, filters, formatDateString, formatDateTimeString, formatFileSize, formatLocalDateTimeString, formatTimeString, getDeepActiveElement, getFileExtension, getFileMimeType, localTimezone_default as getLocalTimeZone, getMetaOrCtrlKey, getWrappedAroundIndex_default as getWrappedAroundIndex, hotkeys, intervalUtils_exports as intervalUtils, isAfterMaxDate, isBeforeMinDate, isKeyWithoutModifiers, isModifierKeyPressed, knimeFileFormats, match, navigator_exports as navigatorUtils, numIntegerDigits_default as numIntegerDigits, promise_exports as promise, sanitization, sleep, truncateString_default as truncateString, updateDate_default as updateDate, updateTime_default as updateTime };\n\n//# sourceMappingURL=index.js.map","export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20viewBox='0%200%2012%2012'%3e%3cpath%20d='M5.5%201.5h-3a1%201%200%200%200-1%201v7a1%201%200%200%200%201%201h7a1%201%200%200%200%201-1v-3m0-5L6%205.892M10.5%201.5v2.75m0-2.75H7.75'%20vector-effect='non-scaling-stroke'/%3e%3c/svg%3e\"","export const kdsCharacterCountDisplay = {\n NEVER: \"never\",\n ALWAYS: \"always\",\n AT_LIMIT: \"atLimit\",\n} as const;\n\nexport const kdsCharacterCountDisplays = Object.values(\n kdsCharacterCountDisplay,\n);\n","<script setup lang=\"ts\">\nimport { type Ref, computed, nextTick, ref, watch } from \"vue\";\n\nimport { KdsButton, KdsModal, KdsTextInput } from \"@knime/kds-components\";\n\ntype Props = {\n text: Ref<string>;\n url: Ref<string>;\n isActive: Ref<boolean>;\n isEdit: Ref<boolean>;\n urlValidator: (url: string) => boolean;\n};\n\nconst props = defineProps<Props>();\n\nconst inputRef = ref<HTMLInputElement | null>(null);\n\nconst editedText = ref(props.text.value);\nconst editedUrl = ref(props.url.value);\n\nwatch(\n () => props.isActive.value,\n async (isOpen: boolean) => {\n if (!isOpen) {\n return;\n }\n editedText.value = props.text.value;\n editedUrl.value = props.url.value;\n\n // Wait a tick as KdsModal internally also waits for the DOM to update before calling showModal()\n await nextTick();\n\n // Focus first input field, requestAnimationFrame ensures the browser has un-hidden the modal\n requestAnimationFrame(() => {\n inputRef.value?.focus();\n });\n },\n);\n\nconst emit = defineEmits<{\n addLink: [text: string, url: string];\n removeLink: [];\n cancelAddLink: [];\n}>();\n\nconst closeModal = () => {\n emit(\"cancelAddLink\");\n};\n\nconst onSubmit = () => {\n emit(\"addLink\", editedText.value, editedUrl.value);\n};\n\nconst validateUrl = () => {\n const validScheme = props.urlValidator(editedUrl.value);\n\n return !editedUrl.value || validScheme;\n};\n\nconst isValid = computed(() => {\n const textChanged = editedText.value !== props.text.value;\n const urlChanged = editedUrl.value !== props.url.value;\n const urlNotEmpty = editedUrl.value !== \"\";\n\n return (textChanged || urlChanged) && validateUrl() && urlNotEmpty;\n});\n\nconst onkeyup = (keyupEvent: KeyboardEvent) => {\n if (keyupEvent.key === \"Enter\" && isValid.value) {\n onSubmit();\n }\n};\n</script>\n\n<template>\n <KdsModal\n :active=\"isActive.value\"\n :headline=\"isEdit.value ? 'Edit link' : 'Insert link'\"\n class=\"modal\"\n @close=\"closeModal\"\n >\n <template #body>\n <KdsTextInput\n ref=\"inputRef\"\n v-model=\"editedText\"\n label=\"Link text\"\n type=\"text\"\n @keyup=\"onkeyup\"\n />\n\n <KdsTextInput\n v-model=\"editedUrl\"\n label=\"URL\"\n :sub-text=\"\n !validateUrl() ? 'Enter a valid URL (e.g. https://example.com)' : ''\n \"\n :error=\"!validateUrl()\"\n :preserve-sub-text-space=\"true\"\n @keyup=\"onkeyup\"\n />\n </template>\n\n <template #footer>\n <div class=\"modal-footer\" :class=\"{ 'spread-buttons': isEdit.value }\">\n <KdsButton\n :variant=\"isEdit.value ? 'transparent' : 'outlined'\"\n size=\"small\"\n label=\"Cancel\"\n @click=\"closeModal\"\n />\n <div class=\"controls-apply-group\">\n <KdsButton\n v-if=\"isEdit.value\"\n variant=\"outlined\"\n size=\"small\"\n label=\"Remove URL\"\n @click=\"emit('removeLink')\"\n />\n <KdsButton\n variant=\"filled\"\n size=\"small\"\n :label=\"isEdit.value ? 'Apply' : 'Insert link'\"\n :disabled=\"!isValid\"\n @click=\"onSubmit\"\n />\n </div>\n </div>\n </template>\n </KdsModal>\n</template>\n\n<style scoped>\n.modal {\n --modal-width: var(--kds-dimension-component-width-32x);\n}\n\n.modal-footer {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n justify-content: flex-end;\n width: 100%;\n\n &.spread-buttons {\n justify-content: space-between;\n }\n}\n\n.controls-apply-group {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { type Ref, computed, nextTick, ref, watch } from \"vue\";\n\nimport { KdsButton, KdsModal, KdsTextInput } from \"@knime/kds-components\";\n\ntype Props = {\n text: Ref<string>;\n url: Ref<string>;\n isActive: Ref<boolean>;\n isEdit: Ref<boolean>;\n urlValidator: (url: string) => boolean;\n};\n\nconst props = defineProps<Props>();\n\nconst inputRef = ref<HTMLInputElement | null>(null);\n\nconst editedText = ref(props.text.value);\nconst editedUrl = ref(props.url.value);\n\nwatch(\n () => props.isActive.value,\n async (isOpen: boolean) => {\n if (!isOpen) {\n return;\n }\n editedText.value = props.text.value;\n editedUrl.value = props.url.value;\n\n // Wait a tick as KdsModal internally also waits for the DOM to update before calling showModal()\n await nextTick();\n\n // Focus first input field, requestAnimationFrame ensures the browser has un-hidden the modal\n requestAnimationFrame(() => {\n inputRef.value?.focus();\n });\n },\n);\n\nconst emit = defineEmits<{\n addLink: [text: string, url: string];\n removeLink: [];\n cancelAddLink: [];\n}>();\n\nconst closeModal = () => {\n emit(\"cancelAddLink\");\n};\n\nconst onSubmit = () => {\n emit(\"addLink\", editedText.value, editedUrl.value);\n};\n\nconst validateUrl = () => {\n const validScheme = props.urlValidator(editedUrl.value);\n\n return !editedUrl.value || validScheme;\n};\n\nconst isValid = computed(() => {\n const textChanged = editedText.value !== props.text.value;\n const urlChanged = editedUrl.value !== props.url.value;\n const urlNotEmpty = editedUrl.value !== \"\";\n\n return (textChanged || urlChanged) && validateUrl() && urlNotEmpty;\n});\n\nconst onkeyup = (keyupEvent: KeyboardEvent) => {\n if (keyupEvent.key === \"Enter\" && isValid.value) {\n onSubmit();\n }\n};\n</script>\n\n<template>\n <KdsModal\n :active=\"isActive.value\"\n :headline=\"isEdit.value ? 'Edit link' : 'Insert link'\"\n class=\"modal\"\n @close=\"closeModal\"\n >\n <template #body>\n <KdsTextInput\n ref=\"inputRef\"\n v-model=\"editedText\"\n label=\"Link text\"\n type=\"text\"\n @keyup=\"onkeyup\"\n />\n\n <KdsTextInput\n v-model=\"editedUrl\"\n label=\"URL\"\n :sub-text=\"\n !validateUrl() ? 'Enter a valid URL (e.g. https://example.com)' : ''\n \"\n :error=\"!validateUrl()\"\n :preserve-sub-text-space=\"true\"\n @keyup=\"onkeyup\"\n />\n </template>\n\n <template #footer>\n <div class=\"modal-footer\" :class=\"{ 'spread-buttons': isEdit.value }\">\n <KdsButton\n :variant=\"isEdit.value ? 'transparent' : 'outlined'\"\n size=\"small\"\n label=\"Cancel\"\n @click=\"closeModal\"\n />\n <div class=\"controls-apply-group\">\n <KdsButton\n v-if=\"isEdit.value\"\n variant=\"outlined\"\n size=\"small\"\n label=\"Remove URL\"\n @click=\"emit('removeLink')\"\n />\n <KdsButton\n variant=\"filled\"\n size=\"small\"\n :label=\"isEdit.value ? 'Apply' : 'Insert link'\"\n :disabled=\"!isValid\"\n @click=\"onSubmit\"\n />\n </div>\n </div>\n </template>\n </KdsModal>\n</template>\n\n<style scoped>\n.modal {\n --modal-width: var(--kds-dimension-component-width-32x);\n}\n\n.modal-footer {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n justify-content: flex-end;\n width: 100%;\n\n &.spread-buttons {\n justify-content: space-between;\n }\n}\n\n.controls-apply-group {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n}\n</style>\n","import type { Level } from \"@tiptap/extension-heading\";\nimport type { Editor } from \"@tiptap/vue-3\";\n\nimport type {\n EditorToolSecondaryItem,\n EditorToolSecondaryItemChild,\n} from \"../../toolbar/types\";\n\nconst clearHeading = (editor: Editor) => {\n const maxLevel = 6;\n for (let i = 1; i <= maxLevel; i++) {\n if (editor.isActive(\"heading\", { level: i })) {\n editor\n .chain()\n .focus()\n .toggleHeading({ level: i as Level })\n .run();\n break;\n }\n }\n};\n\nconst getHeadingOptionChild = (level: Level, getEditor: () => Editor) =>\n ({\n id: `${level}`,\n text: `Heading ${level}`,\n hotkey: [\"CtrlOrCmd\", \"Alt\", `${level}`],\n active: () => getEditor().isActive(\"heading\", { level }),\n handler: () => {\n const editor = getEditor();\n editor.chain().focus().toggleHeading({ level }).run();\n },\n }) satisfies EditorToolSecondaryItemChild;\n\nexport const getParagraphTextStyleTool = (\n getEditor: () => Editor,\n): EditorToolSecondaryItem => {\n return {\n id: \"paragraphTextStyle\",\n type: \"secondary\",\n icon: \"textstyles\",\n text: \"Text style\",\n children: [\n {\n id: \"standard\",\n text: \"Standard\",\n hotkey: [\"CtrlOrCmd\", \"Alt\", \"0\"],\n handler: () => {\n const editor = getEditor();\n clearHeading(editor);\n editor.chain().focus().unsetSmallText().run();\n },\n },\n {\n id: \"small\",\n text: \"Small text\",\n hotkey: [\"CtrlOrCmd\", \"Alt\", \"−\"], // this is a wider minus character for aesthetic reasons\n active: () => getEditor().isActive({ smallText: true }),\n handler: () => {\n const editor = getEditor();\n clearHeading(editor);\n editor.chain().focus().setSmallText().run();\n },\n },\n ...Array.from({ length: 6 }, (_, i) =>\n getHeadingOptionChild((i + 1) as Level, getEditor),\n ),\n ],\n };\n};\n","import { computed, onMounted, onUnmounted, ref } from \"vue\";\nimport type { Editor } from \"@tiptap/vue-3\";\n\nimport { getMetaOrCtrlKey } from \"@knime/utils\";\n\nimport type { KdsLinkToolOptions } from \"../utils/custom-link\";\n\nexport const useLinkTool = ({\n editor,\n isRegistered,\n linkToolOptions,\n}: {\n editor: Editor;\n isRegistered: boolean;\n linkToolOptions: KdsLinkToolOptions;\n}) => {\n if (!isRegistered) {\n return null;\n }\n\n const isActive = ref(false);\n const text = ref(\"\");\n const url = ref(\"\");\n const isEdit = computed(() => url.value !== \"\");\n const isReplacingText = ref(false);\n\n const onLinkToolClick = () => {\n const { view, state } = editor;\n const { from, to } = view.state.selection;\n\n const currentLink = editor.getAttributes(\"link\").href;\n url.value = currentLink || \"\";\n\n if (currentLink) {\n const hasSelection = from !== to;\n if (hasSelection) {\n // manually update the cursor position to get the entire link text\n const newCursorPosition = from + Math.floor((to - from) / 2);\n editor.chain().focus().setTextSelection(newCursorPosition).run();\n }\n\n const textBefore =\n view.state.selection.$from.nodeBefore?.textContent ?? \"\";\n const textAfter = view.state.selection.$to.nodeAfter?.textContent ?? \"\";\n\n text.value = textBefore + textAfter;\n } else {\n text.value = state.doc.textBetween(from, to, \"\");\n }\n\n isReplacingText.value = Boolean(currentLink || text.value);\n isActive.value = true;\n };\n\n const onRemoveLink = () => {\n editor.chain().focus().extendMarkRange(\"link\").unsetLink().run();\n\n isActive.value = false;\n isReplacingText.value = false;\n };\n\n const addCustomLink = ({\n isEditing,\n url,\n urlText,\n text,\n }: {\n isEditing: boolean;\n url: string;\n urlText: string;\n text: string;\n }) => {\n if (isEditing) {\n editor\n .chain()\n .focus()\n .setLink({ href: url })\n .command(({ tr }) => {\n tr.insertText(text || urlText);\n return true;\n })\n .run();\n } else {\n // TODO replace this rather complicated way to add a link once the tiptap bug is fixed\n const { view } = editor;\n const { from: startIndex } = view.state.selection;\n\n // escape link with space when creating a new link\n editor\n .chain()\n .focus()\n .insertContent([{ type: \"text\", text: \" \" }])\n .run();\n editor\n .chain()\n .focus()\n .insertContentAt(startIndex, [{ type: \"text\", text: text || urlText }])\n .run();\n\n const { from: endIndex } = view.state.selection;\n\n editor.commands.setTextSelection({\n from: startIndex,\n to: endIndex,\n });\n\n editor.chain().focus().setLink({ href: url }).run();\n }\n };\n\n const onAddLink = (text: string, urlText: string) => {\n editor.chain().focus().extendMarkRange(\"link\").unsetLink().run();\n\n if (urlText) {\n const url = linkToolOptions.sanitizeUrlText?.(urlText) ?? urlText;\n\n addCustomLink({\n isEditing: isReplacingText.value,\n urlText,\n url,\n text,\n });\n }\n\n isActive.value = false;\n isReplacingText.value = false;\n };\n\n const onCancelAddLink = () => {\n isActive.value = false;\n isReplacingText.value = false;\n };\n\n /**\n * Handle custom hotkeys for link tool that are not supported by tiptap.\n */\n const onKeyDown = (event: KeyboardEvent) => {\n if (!editor?.isFocused) {\n return;\n }\n const ctrlPressed = event[getMetaOrCtrlKey()];\n if (ctrlPressed && event.key === \"k\") {\n event.preventDefault();\n onLinkToolClick();\n }\n };\n onMounted(() => {\n window.addEventListener(\"keydown\", onKeyDown);\n });\n\n onUnmounted(() => {\n window.removeEventListener(\"keydown\", onKeyDown);\n });\n\n return {\n onLinkToolClick,\n props: {\n url,\n text,\n isActive,\n isEdit,\n urlValidator: linkToolOptions.urlValidator,\n },\n events: {\n addLink: onAddLink,\n removeLink: onRemoveLink,\n cancelAddLink: onCancelAddLink,\n },\n };\n};\n","<script setup lang=\"ts\">\nimport type { Editor } from \"@tiptap/vue-3\";\n\nimport type { KdsBaseExtensionsConfig } from \"../types\";\nimport type { KdsLinkToolOptions } from \"../utils/custom-link\";\nimport { getParagraphTextStyleTool } from \"../utils/paragraphTextStyle\";\n\nimport type { EditorToolItem, EditorTools } from \"./types\";\nimport { useLinkTool } from \"./useLinkTool\";\n\ntype Props = {\n editor: Editor;\n baseExtensions: KdsBaseExtensionsConfig | { all: true };\n linkToolOptions: KdsLinkToolOptions;\n};\n\nconst props = defineProps<Props>();\n\nconst registerTool = (\n toolName: keyof KdsBaseExtensionsConfig,\n tool: EditorToolItem,\n) => {\n if (\"all\" in props.baseExtensions) {\n return [tool];\n }\n\n return props.baseExtensions[toolName] ? [tool] : [];\n};\n\nconst isToolRegistered = (toolName: keyof KdsBaseExtensionsConfig) => {\n if (\"all\" in props.baseExtensions) {\n return true;\n }\n\n return Boolean(props.baseExtensions[toolName]);\n};\n\nconst isListActive = () =>\n props.editor.isActive(\"orderedList\") || props.editor.isActive(\"bulletList\");\n\nconst linkTool = useLinkTool({\n editor: props.editor,\n isRegistered: isToolRegistered(\"link\"),\n linkToolOptions: props.linkToolOptions,\n});\n\nconst editorTools: EditorTools = [\n ...registerTool(\"bold\", {\n id: \"bold\",\n type: \"primary\",\n text: \"Bold\",\n hotkey: [\"CtrlOrCmd\", \"B\"],\n icon: \"bold\",\n active: () => props.editor.isActive(\"bold\"),\n handler: () => props.editor.chain().focus().toggleBold().run(),\n }),\n\n ...registerTool(\"italic\", {\n id: \"italic\",\n type: \"primary\",\n text: \"Italic\",\n icon: \"italic\",\n hotkey: [\"CtrlOrCmd\", \"I\"],\n active: () => props.editor.isActive(\"italic\"),\n handler: () => props.editor.chain().focus().toggleItalic().run(),\n }),\n\n ...registerTool(\"underline\", {\n id: \"underline\",\n type: \"primary\",\n text: \"Underline\",\n icon: \"underline\",\n hotkey: [\"CtrlOrCmd\", \"U\"],\n active: () => props.editor.isActive(\"underline\"),\n handler: () => props.editor.chain().focus().toggleUnderline().run(),\n }),\n\n ...registerTool(\"bulletList\", {\n id: \"bulletList\",\n type: \"primary\",\n text: \"Bullet list\",\n icon: \"list-bulletpoint\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"8\"],\n active: () => props.editor.isActive(\"bulletList\"),\n handler: () => {\n const commandChain = props.editor.chain().focus();\n if (isToolRegistered(\"textAlign\")) {\n commandChain.setTextAlign(\"left\");\n }\n\n commandChain.toggleBulletList().run();\n },\n }),\n\n ...registerTool(\"orderedList\", {\n id: \"orderedList\",\n type: \"primary\",\n text: \"Ordered list\",\n icon: \"list-number\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"7\"],\n active: () => props.editor.isActive(\"orderedList\"),\n handler: () => {\n const commandChain = props.editor.chain().focus();\n if (isToolRegistered(\"textAlign\")) {\n commandChain.setTextAlign(\"left\");\n }\n\n commandChain.toggleOrderedList().run();\n },\n }),\n\n ...registerTool(\"textAlign\", {\n id: \"align-left\",\n type: \"primary\",\n icon: \"left-aligned\",\n text: \"Align left\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"L\"],\n active: () =>\n !isListActive() && props.editor.isActive({ textAlign: \"left\" }),\n handler: () => props.editor.chain().focus().setTextAlign(\"left\").run(),\n disabled: () => isListActive(),\n }),\n\n ...registerTool(\"textAlign\", {\n id: \"align-center\",\n type: \"primary\",\n icon: \"center-aligned\",\n text: \"Align center\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"E\"],\n active: () =>\n !isListActive() && props.editor.isActive({ textAlign: \"center\" }),\n handler: () => props.editor.chain().focus().setTextAlign(\"center\").run(),\n disabled: () => isListActive(),\n }),\n\n ...registerTool(\"textAlign\", {\n id: \"align-right\",\n type: \"primary\",\n icon: \"right-aligned\",\n text: \"Align right\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"R\"],\n active: () =>\n !isListActive() && props.editor.isActive({ textAlign: \"right\" }),\n handler: () => props.editor.chain().focus().setTextAlign(\"right\").run(),\n disabled: () => isListActive(),\n }),\n\n ...registerTool(\"link\", {\n id: \"link\",\n type: \"primary\",\n icon: \"link\",\n text: \"Link\",\n hotkey: [\"CtrlOrCmd\", \"K\"],\n active: () => props.editor.isActive(\"link\"),\n handler: () => linkTool?.onLinkToolClick(),\n }),\n\n ...registerTool(\n \"paragraphTextStyle\",\n getParagraphTextStyleTool(() => props.editor),\n ),\n\n ...registerTool(\"blockquote\", {\n id: \"blockquote\",\n type: \"secondary\",\n icon: \"quote\",\n text: \"Blockquote\",\n active: () => props.editor.isActive(\"blockquote\"),\n handler: () => props.editor.chain().focus().toggleBlockquote().run(),\n }),\n\n ...registerTool(\"codeBlock\", {\n id: \"codeBlock\",\n type: \"secondary\",\n icon: \"code-block\",\n text: \"Code block\",\n hotkey: [\"CtrlOrCmd\", \"Alt\", \"C\"],\n active: () => props.editor.isActive(\"codeBlock\"),\n handler: () => props.editor.chain().focus().toggleCodeBlock().run(),\n }),\n\n ...registerTool(\"strike\", {\n id: \"strikethrough\",\n type: \"secondary\",\n icon: \"strikethrough\",\n text: \"Strikethrough\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"X\"],\n active: () => props.editor.isActive(\"strike\"),\n handler: () => props.editor.chain().focus().toggleStrike().run(),\n }),\n\n ...registerTool(\"horizontalRule\", {\n id: \"horizontalRule\",\n type: \"secondary\",\n icon: \"divider\",\n text: \"Divider\",\n active: () => false,\n handler: () => props.editor.chain().focus().setHorizontalRule().run(),\n }),\n];\n</script>\n\n<template>\n <slot :tools=\"editorTools\" />\n <slot :link-tool=\"linkTool\" name=\"linkModal\" />\n</template>\n","<script setup lang=\"ts\">\nimport type { Editor } from \"@tiptap/vue-3\";\n\nimport type { KdsBaseExtensionsConfig } from \"../types\";\nimport type { KdsLinkToolOptions } from \"../utils/custom-link\";\nimport { getParagraphTextStyleTool } from \"../utils/paragraphTextStyle\";\n\nimport type { EditorToolItem, EditorTools } from \"./types\";\nimport { useLinkTool } from \"./useLinkTool\";\n\ntype Props = {\n editor: Editor;\n baseExtensions: KdsBaseExtensionsConfig | { all: true };\n linkToolOptions: KdsLinkToolOptions;\n};\n\nconst props = defineProps<Props>();\n\nconst registerTool = (\n toolName: keyof KdsBaseExtensionsConfig,\n tool: EditorToolItem,\n) => {\n if (\"all\" in props.baseExtensions) {\n return [tool];\n }\n\n return props.baseExtensions[toolName] ? [tool] : [];\n};\n\nconst isToolRegistered = (toolName: keyof KdsBaseExtensionsConfig) => {\n if (\"all\" in props.baseExtensions) {\n return true;\n }\n\n return Boolean(props.baseExtensions[toolName]);\n};\n\nconst isListActive = () =>\n props.editor.isActive(\"orderedList\") || props.editor.isActive(\"bulletList\");\n\nconst linkTool = useLinkTool({\n editor: props.editor,\n isRegistered: isToolRegistered(\"link\"),\n linkToolOptions: props.linkToolOptions,\n});\n\nconst editorTools: EditorTools = [\n ...registerTool(\"bold\", {\n id: \"bold\",\n type: \"primary\",\n text: \"Bold\",\n hotkey: [\"CtrlOrCmd\", \"B\"],\n icon: \"bold\",\n active: () => props.editor.isActive(\"bold\"),\n handler: () => props.editor.chain().focus().toggleBold().run(),\n }),\n\n ...registerTool(\"italic\", {\n id: \"italic\",\n type: \"primary\",\n text: \"Italic\",\n icon: \"italic\",\n hotkey: [\"CtrlOrCmd\", \"I\"],\n active: () => props.editor.isActive(\"italic\"),\n handler: () => props.editor.chain().focus().toggleItalic().run(),\n }),\n\n ...registerTool(\"underline\", {\n id: \"underline\",\n type: \"primary\",\n text: \"Underline\",\n icon: \"underline\",\n hotkey: [\"CtrlOrCmd\", \"U\"],\n active: () => props.editor.isActive(\"underline\"),\n handler: () => props.editor.chain().focus().toggleUnderline().run(),\n }),\n\n ...registerTool(\"bulletList\", {\n id: \"bulletList\",\n type: \"primary\",\n text: \"Bullet list\",\n icon: \"list-bulletpoint\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"8\"],\n active: () => props.editor.isActive(\"bulletList\"),\n handler: () => {\n const commandChain = props.editor.chain().focus();\n if (isToolRegistered(\"textAlign\")) {\n commandChain.setTextAlign(\"left\");\n }\n\n commandChain.toggleBulletList().run();\n },\n }),\n\n ...registerTool(\"orderedList\", {\n id: \"orderedList\",\n type: \"primary\",\n text: \"Ordered list\",\n icon: \"list-number\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"7\"],\n active: () => props.editor.isActive(\"orderedList\"),\n handler: () => {\n const commandChain = props.editor.chain().focus();\n if (isToolRegistered(\"textAlign\")) {\n commandChain.setTextAlign(\"left\");\n }\n\n commandChain.toggleOrderedList().run();\n },\n }),\n\n ...registerTool(\"textAlign\", {\n id: \"align-left\",\n type: \"primary\",\n icon: \"left-aligned\",\n text: \"Align left\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"L\"],\n active: () =>\n !isListActive() && props.editor.isActive({ textAlign: \"left\" }),\n handler: () => props.editor.chain().focus().setTextAlign(\"left\").run(),\n disabled: () => isListActive(),\n }),\n\n ...registerTool(\"textAlign\", {\n id: \"align-center\",\n type: \"primary\",\n icon: \"center-aligned\",\n text: \"Align center\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"E\"],\n active: () =>\n !isListActive() && props.editor.isActive({ textAlign: \"center\" }),\n handler: () => props.editor.chain().focus().setTextAlign(\"center\").run(),\n disabled: () => isListActive(),\n }),\n\n ...registerTool(\"textAlign\", {\n id: \"align-right\",\n type: \"primary\",\n icon: \"right-aligned\",\n text: \"Align right\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"R\"],\n active: () =>\n !isListActive() && props.editor.isActive({ textAlign: \"right\" }),\n handler: () => props.editor.chain().focus().setTextAlign(\"right\").run(),\n disabled: () => isListActive(),\n }),\n\n ...registerTool(\"link\", {\n id: \"link\",\n type: \"primary\",\n icon: \"link\",\n text: \"Link\",\n hotkey: [\"CtrlOrCmd\", \"K\"],\n active: () => props.editor.isActive(\"link\"),\n handler: () => linkTool?.onLinkToolClick(),\n }),\n\n ...registerTool(\n \"paragraphTextStyle\",\n getParagraphTextStyleTool(() => props.editor),\n ),\n\n ...registerTool(\"blockquote\", {\n id: \"blockquote\",\n type: \"secondary\",\n icon: \"quote\",\n text: \"Blockquote\",\n active: () => props.editor.isActive(\"blockquote\"),\n handler: () => props.editor.chain().focus().toggleBlockquote().run(),\n }),\n\n ...registerTool(\"codeBlock\", {\n id: \"codeBlock\",\n type: \"secondary\",\n icon: \"code-block\",\n text: \"Code block\",\n hotkey: [\"CtrlOrCmd\", \"Alt\", \"C\"],\n active: () => props.editor.isActive(\"codeBlock\"),\n handler: () => props.editor.chain().focus().toggleCodeBlock().run(),\n }),\n\n ...registerTool(\"strike\", {\n id: \"strikethrough\",\n type: \"secondary\",\n icon: \"strikethrough\",\n text: \"Strikethrough\",\n hotkey: [\"CtrlOrCmd\", \"Shift\", \"X\"],\n active: () => props.editor.isActive(\"strike\"),\n handler: () => props.editor.chain().focus().toggleStrike().run(),\n }),\n\n ...registerTool(\"horizontalRule\", {\n id: \"horizontalRule\",\n type: \"secondary\",\n icon: \"divider\",\n text: \"Divider\",\n active: () => false,\n handler: () => props.editor.chain().focus().setHorizontalRule().run(),\n }),\n];\n</script>\n\n<template>\n <slot :tools=\"editorTools\" />\n <slot :link-tool=\"linkTool\" name=\"linkModal\" />\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport type { Editor } from \"@tiptap/vue-3\";\n\nimport {\n KdsMenuButton,\n type KdsMenuItem,\n KdsToggleButton,\n} from \"@knime/kds-components\";\nimport { type Hotkey } from \"@knime/utils\";\n\nimport type {\n EditorToolPrimaryItem,\n EditorToolSecondaryItem,\n EditorTools,\n} from \"./types\";\n\ntype Props = {\n editor: Editor;\n tools: EditorTools;\n hotkeyFormatter: (hotkey: Array<Hotkey>) => string;\n};\n\nconst props = defineProps<Props>();\n\nconst baseTools = computed(\n () =>\n props.tools.filter(\n ({ type }) => type === \"primary\",\n ) as EditorToolPrimaryItem[],\n);\n\nconst secondaryTools = computed(\n () =>\n props.tools.filter(\n ({ type }) => type === \"secondary\",\n ) as EditorToolSecondaryItem[],\n);\n\nconst getTooltip = (tool: EditorToolPrimaryItem) => {\n const hotkey = tool.hotkey ?? [];\n return hotkey.length > 0\n ? `${tool.text} – ${props.hotkeyFormatter(hotkey)}`\n : tool.text;\n};\n\nconst secondaryToolsMenuItems = computed<KdsMenuItem[]>(() => {\n const tools = secondaryTools.value.map((tool) => {\n const base = {\n id: tool.id,\n text: tool.text,\n disabled: tool.disabled?.(),\n shortcut: tool.hotkey ?? [],\n accessory: {\n type: \"icon\",\n name: tool.icon,\n },\n } satisfies KdsMenuItem;\n\n if (tool.children) {\n return {\n ...base,\n children: tool.children.map((toolChild) => {\n return {\n id: toolChild.id,\n text: toolChild.text,\n shortcut: toolChild.hotkey ?? [],\n handler: () => toolChild.handler(toolChild.id),\n };\n }),\n } satisfies KdsMenuItem;\n }\n\n return {\n ...base,\n handler: () => tool.handler(tool.id),\n } satisfies KdsMenuItem;\n });\n\n return tools;\n});\n</script>\n\n<template>\n <div class=\"tools\">\n <KdsToggleButton\n v-for=\"tool of baseTools\"\n :key=\"tool.id\"\n class=\"tool\"\n :ariaLabel=\"tool.text\"\n :data-testid=\"tool.id\"\n :disabled=\"tool.disabled?.()\"\n :toggled=\"tool.active?.()\"\n :leading-icon=\"tool.icon\"\n :tooltip=\"getTooltip(tool)\"\n variant=\"transparent\"\n size=\"small\"\n @keydown.enter.prevent=\"tool.handler?.(tool.id)\"\n @click.stop=\"tool.handler?.(tool.id)\"\n />\n\n <KdsMenuButton\n v-if=\"secondaryTools.length > 0\"\n :items=\"secondaryToolsMenuItems\"\n leading-icon=\"more-actions\"\n ariaLabel=\"More actions\"\n variant=\"transparent\"\n size=\"small\"\n />\n </div>\n</template>\n\n<style scoped>\n.tools {\n display: flex;\n gap: var(--kds-spacing-container-0-25x);\n align-items: center;\n height: 100%;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport type { Editor } from \"@tiptap/vue-3\";\n\nimport {\n KdsMenuButton,\n type KdsMenuItem,\n KdsToggleButton,\n} from \"@knime/kds-components\";\nimport { type Hotkey } from \"@knime/utils\";\n\nimport type {\n EditorToolPrimaryItem,\n EditorToolSecondaryItem,\n EditorTools,\n} from \"./types\";\n\ntype Props = {\n editor: Editor;\n tools: EditorTools;\n hotkeyFormatter: (hotkey: Array<Hotkey>) => string;\n};\n\nconst props = defineProps<Props>();\n\nconst baseTools = computed(\n () =>\n props.tools.filter(\n ({ type }) => type === \"primary\",\n ) as EditorToolPrimaryItem[],\n);\n\nconst secondaryTools = computed(\n () =>\n props.tools.filter(\n ({ type }) => type === \"secondary\",\n ) as EditorToolSecondaryItem[],\n);\n\nconst getTooltip = (tool: EditorToolPrimaryItem) => {\n const hotkey = tool.hotkey ?? [];\n return hotkey.length > 0\n ? `${tool.text} – ${props.hotkeyFormatter(hotkey)}`\n : tool.text;\n};\n\nconst secondaryToolsMenuItems = computed<KdsMenuItem[]>(() => {\n const tools = secondaryTools.value.map((tool) => {\n const base = {\n id: tool.id,\n text: tool.text,\n disabled: tool.disabled?.(),\n shortcut: tool.hotkey ?? [],\n accessory: {\n type: \"icon\",\n name: tool.icon,\n },\n } satisfies KdsMenuItem;\n\n if (tool.children) {\n return {\n ...base,\n children: tool.children.map((toolChild) => {\n return {\n id: toolChild.id,\n text: toolChild.text,\n shortcut: toolChild.hotkey ?? [],\n handler: () => toolChild.handler(toolChild.id),\n };\n }),\n } satisfies KdsMenuItem;\n }\n\n return {\n ...base,\n handler: () => tool.handler(tool.id),\n } satisfies KdsMenuItem;\n });\n\n return tools;\n});\n</script>\n\n<template>\n <div class=\"tools\">\n <KdsToggleButton\n v-for=\"tool of baseTools\"\n :key=\"tool.id\"\n class=\"tool\"\n :ariaLabel=\"tool.text\"\n :data-testid=\"tool.id\"\n :disabled=\"tool.disabled?.()\"\n :toggled=\"tool.active?.()\"\n :leading-icon=\"tool.icon\"\n :tooltip=\"getTooltip(tool)\"\n variant=\"transparent\"\n size=\"small\"\n @keydown.enter.prevent=\"tool.handler?.(tool.id)\"\n @click.stop=\"tool.handler?.(tool.id)\"\n />\n\n <KdsMenuButton\n v-if=\"secondaryTools.length > 0\"\n :items=\"secondaryToolsMenuItems\"\n leading-icon=\"more-actions\"\n ariaLabel=\"More actions\"\n variant=\"transparent\"\n size=\"small\"\n />\n </div>\n</template>\n\n<style scoped>\n.tools {\n display: flex;\n gap: var(--kds-spacing-container-0-25x);\n align-items: center;\n height: 100%;\n}\n</style>\n","import { Extension } from \"@tiptap/vue-3\";\n\n/**\n * TODO UIEXT-1461 Remove and resolve properly with https://knime-com.atlassian.net/browse/UIEXT-1461-\n */\ntype CustomEscapeExtensionOptions = {\n handler: () => boolean;\n};\n\ndeclare module \"@tiptap/core\" {\n interface ExtensionOptions {\n customEscape: CustomEscapeExtensionOptions;\n }\n}\n\nexport const CustomEscape = Extension.create<CustomEscapeExtensionOptions>({\n name: \"OverrideEscape\",\n\n addOptions() {\n return {\n handler: () => false,\n };\n },\n\n addKeyboardShortcuts() {\n return {\n Escape: this.options.handler,\n };\n },\n});\n","import HardBreak from \"@tiptap/extension-hard-break\";\n\nexport const CustomHardBreak = HardBreak.extend({\n addKeyboardShortcuts() {\n return {\n \"Shift-Enter\": () => this.editor.commands.setHardBreak(),\n };\n },\n});\n","import { getAttributes } from \"@tiptap/core\";\nimport Link from \"@tiptap/extension-link\";\nimport { Plugin, PluginKey } from \"@tiptap/pm/state\";\n\nimport { getMetaOrCtrlKey, navigatorUtils } from \"@knime/utils\";\n\nconst buildUrlRegex = () => {\n const httpPrefixCheck = \"(http://www\\\\.|https://www\\\\.|http://|https://)\";\n\n const urlCheck =\n \"[a-z0-9]+([-.]{1}[a-z0-9]+)*\\\\.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?\";\n\n return new RegExp(`^${httpPrefixCheck}?${urlCheck}$`);\n};\n\nconst URL_REGEX = buildUrlRegex();\n\nexport const validateURL = (href: string) => URL_REGEX.test(href);\n\nexport type KdsLinkToolOptions = {\n /**\n * Custom function that can be supplied to validate urls added with the link tool\n * @param url The url of the link to be added\n */\n urlValidator: (url: string) => boolean;\n /**\n * Custom function that can, e.g., be used to append a protocol like https:// to a url if not present\n * @param url The url of the link to be added\n */\n sanitizeUrlText: (url: string) => string;\n};\n\nexport const kdsDefaultLinkToolOptions: KdsLinkToolOptions = {\n urlValidator: validateURL,\n sanitizeUrlText: (urlText: string) => {\n const containsHttp = [\"http://\", \"https://\"].some((protocol) =>\n urlText.includes(protocol),\n );\n return containsHttp ? urlText : `https://${urlText}`;\n },\n};\n\nexport const CustomLink = Link.extend({\n addAttributes() {\n const modifier = navigatorUtils.isMac() ? \"⌘\" : \"Ctrl +\";\n\n return {\n ...this.parent?.(),\n\n draggable: {\n default: \"false\",\n },\n\n title: {\n default: `Use \"${modifier} click\" to follow link`,\n },\n\n rel: {\n default: \"ugc noopener noreferrer nofollow\",\n },\n };\n },\n\n addProseMirrorPlugins() {\n const plugins: Plugin[] = this.parent?.() || [];\n\n const ctrlClickHandler = new Plugin({\n key: new PluginKey(\"handleControlClick\"),\n props: {\n handleClick(view, _pos, event) {\n const attrs = getAttributes(view.state, \"link\");\n const link = (event.target as HTMLElement)?.closest(\"a\");\n\n const metaOrCtrlKeyPressed = event[getMetaOrCtrlKey()];\n\n if (metaOrCtrlKeyPressed && link && attrs.href) {\n window.open(attrs.href, attrs.target);\n }\n // always return true, otherwise the cursor disappears, which causes some unexpected bugs\n // see: https://knime-com.atlassian.net/browse/HUB-8669\n return true;\n },\n },\n });\n\n plugins.push(ctrlClickHandler);\n\n return plugins;\n },\n});\n","import TextAlign from \"@tiptap/extension-text-align\";\n\nexport const CustomTextAlign = TextAlign.extend({\n addKeyboardShortcuts() {\n const canActivate = () => {\n return !(\n this.editor.isActive(\"bulletList\") ||\n this.editor.isActive(\"orderedList\")\n );\n };\n\n return {\n \"Mod-Shift-l\": () =>\n canActivate() && this.editor.commands.setTextAlign(\"left\"),\n \"Mod-Shift-e\": () =>\n canActivate() && this.editor.commands.setTextAlign(\"center\"),\n \"Mod-Shift-r\": () =>\n canActivate() && this.editor.commands.setTextAlign(\"right\"),\n };\n },\n});\n","import Paragraph from \"@tiptap/extension-paragraph\";\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n fontSize: {\n /**\n * Sets a custom class on the paragraph which is used to set a small font size\n */\n setSmallText: () => ReturnType;\n /**\n * Reverts setSmallText\n */\n unsetSmallText: () => ReturnType;\n };\n }\n}\n\nconst SmallText = Paragraph.extend({\n addAttributes() {\n const smallTextClass = \"small-text\";\n return {\n ...this.parent?.(),\n smallText: {\n default: false,\n parseHTML: (element) => element.className === smallTextClass,\n renderHTML: (attributes) => {\n return attributes.smallText\n ? {\n class: smallTextClass,\n }\n : {};\n },\n },\n };\n },\n\n addCommands() {\n return {\n ...this.parent?.(),\n setSmallText:\n () =>\n ({ commands }) => {\n return commands.toggleNode(this.name, \"paragraph\", {\n smallText: true,\n });\n },\n unsetSmallText:\n () =>\n ({ chain }) => {\n return chain()\n .updateAttributes(this.name, { smallText: false })\n .run();\n },\n };\n },\n\n addKeyboardShortcuts() {\n return {\n ...this.parent?.(),\n \"Mod-Alt--\": () => this.editor.commands.setSmallText(),\n };\n },\n});\n\nexport { SmallText };\n","<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onMounted,\n ref,\n useId,\n useSlots,\n watch,\n} from \"vue\";\nimport CharacterCount from \"@tiptap/extension-character-count\";\nimport StarterKit from \"@tiptap/starter-kit\";\nimport { type AnyExtension, EditorContent, useEditor } from \"@tiptap/vue-3\";\n\nimport { KdsSubText } from \"@knime/kds-components\";\nimport { hotkeys } from \"@knime/utils\";\n\nimport ExternalLinkIconUrl from \"../node_modules/@knime/kds-styles/dist/img/icons/external-link.svg?url\";\n\nimport { kdsCharacterCountDisplay } from \"./enums\";\nimport KdsCreateLinkModal from \"./toolbar/KdsCreateLinkModal.vue\";\nimport RichTextEditorBaseToolbar from \"./toolbar/RichTextEditorBaseToolbar.vue\";\nimport RichTextEditorToolbar from \"./toolbar/RichTextEditorToolbar.vue\";\nimport type { KdsBaseExtensionsConfig, KdsRichTextEditorProps } from \"./types\";\nimport { CustomEscape } from \"./utils/custom-escape\";\nimport { CustomHardBreak } from \"./utils/custom-hard-break\";\nimport {\n CustomLink,\n kdsDefaultLinkToolOptions,\n validateURL,\n} from \"./utils/custom-link\";\nimport { CustomTextAlign } from \"./utils/custom-text-align\";\nimport { SmallText } from \"./utils/paragraphTextStyle/extension\";\n\nconst {\n editable = true,\n minHeight = null,\n maxHeight = null,\n baseExtensions = {} as KdsBaseExtensionsConfig,\n hotkeyFormatter = hotkeys.formatHotkeys,\n customExtensions = [] as Array<AnyExtension>,\n autofocus = false,\n withBorder = true,\n disabled = false,\n linkToolOptions = kdsDefaultLinkToolOptions,\n characterLimit = {},\n subText = undefined,\n error = false,\n validating = false,\n preserveSubTextSpace = false,\n customEscapeHandler = undefined,\n ariaLabel = undefined,\n ariaLabelledby = undefined,\n wrapperFocusRing = false,\n} = defineProps<KdsRichTextEditorProps>();\n\n// we need to define a minimum amount for a character limit so that we\n// can make static calculations for the character counter and show it\n// only when the user has 100 chars or less left\nconst MIN_CHARACTER_LIMIT = 200;\n// number of remaining characters at or below which the counter is surfaced\n// when `display` is set to `atLimit`\nconst AT_LIMIT_THRESHOLD = 100;\n\nconst hardCharacterLimit = editable\n ? Math.max(characterLimit.maxCharacters ?? 1000, MIN_CHARACTER_LIMIT)\n : Infinity;\nconst characterCountDisplay =\n characterLimit.display ?? kdsCharacterCountDisplay.NEVER;\n\nconst slots = useSlots();\n\n// this assumes a svg without any double quotes\nconst externalIcon = `url(\"${ExternalLinkIconUrl}\")`;\n\n/** The current rich text value. */\nconst modelValue = defineModel<string>({ default: \"\" });\n\nconst emit = defineEmits<{\n blur: [];\n}>();\n\nconst isToolEnabled = (extensionName: keyof KdsBaseExtensionsConfig) => {\n if (\"all\" in baseExtensions) {\n return true;\n }\n\n return Boolean(baseExtensions[extensionName]);\n};\n\nconst getStarterKitExtensionConfig = (\n extensionName: keyof KdsBaseExtensionsConfig,\n): false | undefined | Partial<unknown> => {\n return isToolEnabled(extensionName) ? undefined : false;\n};\n\nconst extensions = [\n StarterKit.configure({\n bold: getStarterKitExtensionConfig(\"bold\"),\n italic: getStarterKitExtensionConfig(\"italic\"),\n bulletList: getStarterKitExtensionConfig(\"bulletList\"),\n orderedList: getStarterKitExtensionConfig(\"orderedList\"),\n heading: getStarterKitExtensionConfig(\"heading\"),\n blockquote: getStarterKitExtensionConfig(\"blockquote\"),\n code: getStarterKitExtensionConfig(\"code\"),\n codeBlock: getStarterKitExtensionConfig(\"codeBlock\"),\n horizontalRule: getStarterKitExtensionConfig(\"horizontalRule\"),\n strike: getStarterKitExtensionConfig(\"strike\"),\n underline: getStarterKitExtensionConfig(\"underline\"),\n ...(isToolEnabled(\"paragraphTextStyle\") && { paragraph: false }),\n hardBreak: false,\n // StarterKit v3 bundles a link extension, but we register our own\n // CustomLink (opt-in via baseExtensions) for the custom validation,\n // attributes and ctrl/cmd-click handling, so the bundled one is disabled\n // to avoid a duplicate-extension conflict.\n link: false,\n }),\n\n ...(isToolEnabled(\"paragraphTextStyle\") ? [SmallText] : []),\n ...(isToolEnabled(\"textAlign\")\n ? [\n CustomTextAlign.configure({\n types: [\n isToolEnabled(\"heading\") ? \"heading\" : \"\",\n \"paragraph\",\n ].filter(Boolean),\n\n alignments: [\"left\", \"right\", \"center\"],\n }),\n ]\n : []),\n\n ...(isToolEnabled(\"link\")\n ? [CustomLink.configure({ validate: validateURL, openOnClick: false })]\n : []),\n\n CustomHardBreak,\n CharacterCount.configure({\n limit: hardCharacterLimit,\n }),\n\n ...(customEscapeHandler\n ? [CustomEscape.configure({ handler: customEscapeHandler })]\n : []),\n\n ...customExtensions,\n];\n\nconst subTextId = useId();\n\n// Tracks focus of the editing area itself (not the toolbar). Used to draw the\n// `wrapperFocusRing` only while the user is editing — focusing a toolbar button\n// fires the editor's blur, so the ring correctly disappears.\nconst isEditorFocused = ref(false);\n\nconst editor = useEditor({\n content: modelValue.value,\n editable: editable && !disabled,\n autofocus,\n extensions,\n editorProps: {\n attributes: {\n ...(ariaLabel ? { \"aria-label\": ariaLabel } : {}),\n ...(ariaLabelledby ? { \"aria-labelledby\": ariaLabelledby } : {}),\n \"aria-describedby\": subTextId,\n },\n },\n onUpdate: () => {\n modelValue.value = editor.value?.getHTML() ?? \"\";\n },\n onFocus: () => {\n isEditorFocused.value = true;\n },\n onBlur: () => {\n isEditorFocused.value = false;\n emit(\"blur\");\n },\n});\n\nconst minHeightStyle = computed(() =>\n minHeight ? `${minHeight}px` : \"initial\",\n);\n\nconst focus = () => {\n editor.value?.commands?.focus?.();\n};\n\ndefineExpose({ focus });\n\nconst maxHeightStyle = computed(() =>\n maxHeight ? `${maxHeight}px` : \"initial\",\n);\n\nwatch(modelValue, (newValue) => {\n if (!editor.value) {\n return;\n }\n if (editor.value.getHTML() === newValue) {\n return;\n }\n\n editor.value.commands.setContent(newValue ?? \"\");\n});\n\nwatch(\n [() => editable, () => disabled],\n ([newEditable, newDisabled], [oldEditable, oldDisabled]) => {\n if (!editor.value) {\n return;\n }\n\n const oldValue = oldEditable && !oldDisabled;\n const newValue = newEditable && !newDisabled;\n if (oldValue === newValue) {\n return;\n }\n\n editor.value.setEditable(newValue);\n\n if (autofocus) {\n focus();\n }\n },\n);\n\nonMounted(async () => {\n if (editable && autofocus) {\n await nextTick();\n focus();\n }\n});\n\nconst hasCustomToolbar = slots.customToolbar;\nconst hasTools = computed(() => Object.keys(baseExtensions).length);\n\nconst characterCount = computed(\n () => editor.value?.storage.characterCount.characters() ?? 0,\n);\n\nconst showCharacterCount = computed(() => {\n if (!editor.value || !editable) {\n return false;\n }\n\n switch (characterCountDisplay) {\n case kdsCharacterCountDisplay.ALWAYS:\n return true;\n case kdsCharacterCountDisplay.AT_LIMIT:\n return hardCharacterLimit - characterCount.value <= AT_LIMIT_THRESHOLD;\n default:\n return false;\n }\n});\n\n// A provided `subText` (e.g. a validation message) takes precedence over the\n// character count display.\nconst hasSubTextOverride = computed(() => Boolean(subText));\n\nconst subTextValue = computed(() => {\n if (hasSubTextOverride.value) {\n return subText;\n }\n return showCharacterCount.value\n ? `${characterCount.value} / ${hardCharacterLimit} characters`\n : undefined;\n});\n</script>\n\n<template>\n <div>\n <div\n :class=\"[\n 'editor-wrapper',\n {\n 'with-border': withBorder,\n disabled,\n 'show-focus-ring': wrapperFocusRing && isEditorFocused,\n },\n ]\"\n >\n <div\n v-if=\"hasTools && editor && editable && !disabled\"\n :class=\"['toolbar-wrapper', { 'embedded-toolbar': !hasCustomToolbar }]\"\n >\n <RichTextEditorBaseToolbar\n :editor=\"editor\"\n :base-extensions=\"baseExtensions\"\n :link-tool-options=\"linkToolOptions\"\n >\n <template #default=\"{ tools }\">\n <slot\n name=\"customToolbar\"\n :editor=\"editor\"\n :tools=\"tools\"\n :hotkey-formatter=\"hotkeyFormatter\"\n >\n <RichTextEditorToolbar\n :editor=\"editor\"\n :tools=\"tools\"\n :hotkey-formatter=\"hotkeyFormatter\"\n />\n </slot>\n </template>\n <template #linkModal=\"{ linkTool }\">\n <KdsCreateLinkModal\n v-if=\"isToolEnabled('link') && linkTool\"\n v-bind=\"linkTool.props\"\n v-on=\"linkTool.events\"\n />\n </template>\n </RichTextEditorBaseToolbar>\n </div>\n\n <EditorContent\n class=\"rich-text-editor\"\n :editor=\"editor\"\n :class=\"{ editable: editable && !disabled }\"\n :aria-disabled=\"disabled || undefined\"\n />\n </div>\n\n <KdsSubText\n :id=\"subTextId\"\n :sub-text=\"subTextValue\"\n :error=\"hasSubTextOverride && error\"\n :validating=\"hasSubTextOverride && validating\"\n :preserve-sub-text-space=\"preserveSubTextSpace\"\n />\n </div>\n</template>\n\n<style scoped>\n.editor-wrapper {\n /* Fixed 44px toolbar height per the design (28px content + 8px padding on\n * each side); the small toolbar buttons (24px) center within the content\n * area. */\n --toolbar-height: calc(\n var(--kds-dimension-component-height-1-75x) +\n var(--kds-spacing-container-0-5x) * 2\n );\n\n position: relative;\n height: 100%;\n isolation: isolate;\n\n &.disabled {\n color: var(--kds-color-text-and-icon-disabled);\n }\n}\n\n/* stylelint-disable selector-class-pattern */\n.rich-text-editor {\n height: 100%;\n max-height: v-bind(\"maxHeightStyle\");\n overflow-y: auto;\n\n &.editable {\n padding: var(--kds-spacing-container-0-5x);\n cursor: text;\n background: var(--kds-color-background-input-initial);\n\n & :deep(.ProseMirror) {\n min-height: v-bind(\"minHeightStyle\");\n }\n }\n\n /* stylelint-disable knime/no-deep-nesting */\n & :deep(.ProseMirror) {\n height: 100%;\n font: var(--kds-font-base-body-small);\n\n /* The following rich text styles are kept in sync with KdsDescription. */\n p {\n padding: 0;\n margin: 0 0 var(--kds-spacing-container-0-37x);\n font: var(--kds-font-base-body-small);\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n p.small-text {\n font: var(--kds-font-base-subtext-xsmall);\n }\n\n strong,\n b {\n font-weight: var(--kds-core-font-weight-strong);\n }\n\n i,\n em {\n font-style: italic;\n }\n\n h1 {\n margin: 0;\n font: var(--kds-font-base-display-small);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n h2 {\n margin: 0;\n font: var(--kds-font-base-display-xsmall);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n h3 {\n margin: 0;\n font: var(--kds-font-base-body-medium-strong);\n }\n\n h4 {\n margin: 0;\n font: var(--kds-font-base-body-small-strong);\n }\n\n h5 {\n margin: 0;\n font: var(--kds-font-base-title-small-strong);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n h6 {\n margin: 0;\n font: var(--kds-font-base-title-small);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n blockquote {\n position: relative;\n padding-left: var(--kds-spacing-container-1x);\n margin-left: var(--kds-spacing-container-1x);\n\n &::before {\n position: absolute;\n left: 0;\n width: var(--kds-dimension-component-width-0-25x);\n height: 100%;\n content: \"\";\n background-color: var(--kds-color-border-subtle);\n border-radius: var(--kds-border-radius-container-pill);\n }\n\n & p:last-child {\n margin-bottom: 0;\n }\n }\n\n pre {\n width: fit-content;\n padding: var(--kds-spacing-container-0-75x);\n font: var(--kds-font-base-code-xsmall);\n background: var(--kds-color-surface-subtle);\n border-radius: var(--kds-border-radius-container-0-25x);\n\n & > code {\n padding: 0;\n background: none;\n }\n }\n\n & :not(pre) > code {\n padding: var(--kds-spacing-container-0-12x)\n var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-code-xsmall);\n background: var(--kds-color-surface-subtle);\n box-decoration-break: clone;\n border-radius: var(--kds-border-radius-container-0-12x);\n }\n\n /** keep in sync with KdsLink */\n a {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n max-width: 100%;\n padding: var(--kds-spacing-container-none)\n var(--kds-spacing-container-0-10x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n white-space: nowrap;\n text-decoration-line: underline;\n cursor: pointer;\n border-radius: var(--kds-border-radius-container-0-12x);\n\n &:focus-visible {\n outline: var(--kds-border-action-focused);\n outline-offset: var(--kds-spacing-container-none);\n }\n\n /** internal links */\n &[href^=\"http\"] {\n --link-color: var(--kds-color-text-and-icon-selected);\n\n color: var(--link-color);\n\n &:visited {\n --link-color: var(--kds-color-text-and-icon-info);\n\n color: var(--link-color);\n }\n\n &:hover {\n --link-color: var(--kds-color-text-and-icon-primary-inverted);\n\n color: var(--link-color);\n background-color: var(--kds-color-background-primary-bold-hover);\n }\n\n &:active {\n --link-color: var(--kds-color-text-and-icon-selected-inverted);\n\n color: var(--link-color);\n background-color: var(--kds-color-background-primary-bold-active);\n }\n\n &::after {\n display: block;\n width: var(--kds-dimension-icon-0-5x);\n height: var(--kds-dimension-icon-0-5x);\n margin-left: var(--kds-spacing-container-0-12x);\n content: \"\";\n background-color: var(--link-color);\n mask-image: v-bind(\"externalIcon\");\n mask-repeat: no-repeat;\n mask-size: contain;\n }\n }\n\n /** external links */\n &:not([href^=\"http\"]) {\n color: var(--kds-color-text-and-icon-neutral);\n\n &:visited {\n color: var(--kds-color-text-and-icon-info);\n }\n\n &:hover {\n background-color: var(--kds-color-background-neutral-hover);\n }\n\n &:active {\n background-color: var(--kds-color-background-neutral-active);\n }\n }\n }\n\n ol,\n ul {\n padding-left: var(--kds-spacing-container-2x);\n }\n\n dd {\n margin-left: var(--kds-spacing-container-1x);\n }\n\n table {\n border-spacing: var(--kds-spacing-container-0-25x) 0;\n border-collapse: separate;\n\n td,\n th {\n padding: var(--kds-spacing-container-0-25x);\n }\n\n th {\n font: var(--kds-font-base-body-small-strong);\n text-align: left;\n border-bottom: var(--kds-border-width-icon-stroke-l) solid\n var(--kds-color-border-neutral);\n }\n\n td {\n font: var(--kds-font-base-body-small);\n border-bottom: var(--kds-border-width-icon-stroke-s) solid\n var(--kds-color-border-neutral);\n }\n }\n }\n\n & :deep(.ProseMirror:focus-visible),\n & :deep(.ProseMirror:focus) {\n outline: transparent;\n }\n /* stylelint-enable selector-class-pattern */\n}\n\n.editor-wrapper.with-border {\n border: var(--kds-border-action-input);\n border-radius: var(--kds-border-radius-container-0-37x);\n\n &.disabled {\n border: var(--kds-border-action-disabled);\n }\n\n & .toolbar-wrapper {\n border-top-left-radius: var(--kds-border-radius-container-0-37x);\n border-top-right-radius: var(--kds-border-radius-container-0-37x);\n }\n\n & .rich-text-editor {\n border-bottom-right-radius: var(--kds-border-radius-container-0-37x);\n border-bottom-left-radius: var(--kds-border-radius-container-0-37x);\n }\n}\n\n.editor-wrapper.show-focus-ring {\n outline: var(--kds-border-action-focused);\n outline-offset: var(--kds-spacing-offset-focus);\n}\n\n.embedded-toolbar {\n height: var(--toolbar-height);\n padding: var(--kds-spacing-container-0-5x);\n overflow-x: auto;\n overscroll-behavior: contain;\n white-space: pre;\n scrollbar-width: none; /* for firefox */\n background: var(--kds-color-background-input-initial);\n border-bottom: var(--kds-border-base-muted);\n -ms-overflow-style: none; /* needed to hide scroll bar in edge */\n &::-webkit-scrollbar {\n display: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onMounted,\n ref,\n useId,\n useSlots,\n watch,\n} from \"vue\";\nimport CharacterCount from \"@tiptap/extension-character-count\";\nimport StarterKit from \"@tiptap/starter-kit\";\nimport { type AnyExtension, EditorContent, useEditor } from \"@tiptap/vue-3\";\n\nimport { KdsSubText } from \"@knime/kds-components\";\nimport { hotkeys } from \"@knime/utils\";\n\nimport ExternalLinkIconUrl from \"../node_modules/@knime/kds-styles/dist/img/icons/external-link.svg?url\";\n\nimport { kdsCharacterCountDisplay } from \"./enums\";\nimport KdsCreateLinkModal from \"./toolbar/KdsCreateLinkModal.vue\";\nimport RichTextEditorBaseToolbar from \"./toolbar/RichTextEditorBaseToolbar.vue\";\nimport RichTextEditorToolbar from \"./toolbar/RichTextEditorToolbar.vue\";\nimport type { KdsBaseExtensionsConfig, KdsRichTextEditorProps } from \"./types\";\nimport { CustomEscape } from \"./utils/custom-escape\";\nimport { CustomHardBreak } from \"./utils/custom-hard-break\";\nimport {\n CustomLink,\n kdsDefaultLinkToolOptions,\n validateURL,\n} from \"./utils/custom-link\";\nimport { CustomTextAlign } from \"./utils/custom-text-align\";\nimport { SmallText } from \"./utils/paragraphTextStyle/extension\";\n\nconst {\n editable = true,\n minHeight = null,\n maxHeight = null,\n baseExtensions = {} as KdsBaseExtensionsConfig,\n hotkeyFormatter = hotkeys.formatHotkeys,\n customExtensions = [] as Array<AnyExtension>,\n autofocus = false,\n withBorder = true,\n disabled = false,\n linkToolOptions = kdsDefaultLinkToolOptions,\n characterLimit = {},\n subText = undefined,\n error = false,\n validating = false,\n preserveSubTextSpace = false,\n customEscapeHandler = undefined,\n ariaLabel = undefined,\n ariaLabelledby = undefined,\n wrapperFocusRing = false,\n} = defineProps<KdsRichTextEditorProps>();\n\n// we need to define a minimum amount for a character limit so that we\n// can make static calculations for the character counter and show it\n// only when the user has 100 chars or less left\nconst MIN_CHARACTER_LIMIT = 200;\n// number of remaining characters at or below which the counter is surfaced\n// when `display` is set to `atLimit`\nconst AT_LIMIT_THRESHOLD = 100;\n\nconst hardCharacterLimit = editable\n ? Math.max(characterLimit.maxCharacters ?? 1000, MIN_CHARACTER_LIMIT)\n : Infinity;\nconst characterCountDisplay =\n characterLimit.display ?? kdsCharacterCountDisplay.NEVER;\n\nconst slots = useSlots();\n\n// this assumes a svg without any double quotes\nconst externalIcon = `url(\"${ExternalLinkIconUrl}\")`;\n\n/** The current rich text value. */\nconst modelValue = defineModel<string>({ default: \"\" });\n\nconst emit = defineEmits<{\n blur: [];\n}>();\n\nconst isToolEnabled = (extensionName: keyof KdsBaseExtensionsConfig) => {\n if (\"all\" in baseExtensions) {\n return true;\n }\n\n return Boolean(baseExtensions[extensionName]);\n};\n\nconst getStarterKitExtensionConfig = (\n extensionName: keyof KdsBaseExtensionsConfig,\n): false | undefined | Partial<unknown> => {\n return isToolEnabled(extensionName) ? undefined : false;\n};\n\nconst extensions = [\n StarterKit.configure({\n bold: getStarterKitExtensionConfig(\"bold\"),\n italic: getStarterKitExtensionConfig(\"italic\"),\n bulletList: getStarterKitExtensionConfig(\"bulletList\"),\n orderedList: getStarterKitExtensionConfig(\"orderedList\"),\n heading: getStarterKitExtensionConfig(\"heading\"),\n blockquote: getStarterKitExtensionConfig(\"blockquote\"),\n code: getStarterKitExtensionConfig(\"code\"),\n codeBlock: getStarterKitExtensionConfig(\"codeBlock\"),\n horizontalRule: getStarterKitExtensionConfig(\"horizontalRule\"),\n strike: getStarterKitExtensionConfig(\"strike\"),\n underline: getStarterKitExtensionConfig(\"underline\"),\n ...(isToolEnabled(\"paragraphTextStyle\") && { paragraph: false }),\n hardBreak: false,\n // StarterKit v3 bundles a link extension, but we register our own\n // CustomLink (opt-in via baseExtensions) for the custom validation,\n // attributes and ctrl/cmd-click handling, so the bundled one is disabled\n // to avoid a duplicate-extension conflict.\n link: false,\n }),\n\n ...(isToolEnabled(\"paragraphTextStyle\") ? [SmallText] : []),\n ...(isToolEnabled(\"textAlign\")\n ? [\n CustomTextAlign.configure({\n types: [\n isToolEnabled(\"heading\") ? \"heading\" : \"\",\n \"paragraph\",\n ].filter(Boolean),\n\n alignments: [\"left\", \"right\", \"center\"],\n }),\n ]\n : []),\n\n ...(isToolEnabled(\"link\")\n ? [CustomLink.configure({ validate: validateURL, openOnClick: false })]\n : []),\n\n CustomHardBreak,\n CharacterCount.configure({\n limit: hardCharacterLimit,\n }),\n\n ...(customEscapeHandler\n ? [CustomEscape.configure({ handler: customEscapeHandler })]\n : []),\n\n ...customExtensions,\n];\n\nconst subTextId = useId();\n\n// Tracks focus of the editing area itself (not the toolbar). Used to draw the\n// `wrapperFocusRing` only while the user is editing — focusing a toolbar button\n// fires the editor's blur, so the ring correctly disappears.\nconst isEditorFocused = ref(false);\n\nconst editor = useEditor({\n content: modelValue.value,\n editable: editable && !disabled,\n autofocus,\n extensions,\n editorProps: {\n attributes: {\n ...(ariaLabel ? { \"aria-label\": ariaLabel } : {}),\n ...(ariaLabelledby ? { \"aria-labelledby\": ariaLabelledby } : {}),\n \"aria-describedby\": subTextId,\n },\n },\n onUpdate: () => {\n modelValue.value = editor.value?.getHTML() ?? \"\";\n },\n onFocus: () => {\n isEditorFocused.value = true;\n },\n onBlur: () => {\n isEditorFocused.value = false;\n emit(\"blur\");\n },\n});\n\nconst minHeightStyle = computed(() =>\n minHeight ? `${minHeight}px` : \"initial\",\n);\n\nconst focus = () => {\n editor.value?.commands?.focus?.();\n};\n\ndefineExpose({ focus });\n\nconst maxHeightStyle = computed(() =>\n maxHeight ? `${maxHeight}px` : \"initial\",\n);\n\nwatch(modelValue, (newValue) => {\n if (!editor.value) {\n return;\n }\n if (editor.value.getHTML() === newValue) {\n return;\n }\n\n editor.value.commands.setContent(newValue ?? \"\");\n});\n\nwatch(\n [() => editable, () => disabled],\n ([newEditable, newDisabled], [oldEditable, oldDisabled]) => {\n if (!editor.value) {\n return;\n }\n\n const oldValue = oldEditable && !oldDisabled;\n const newValue = newEditable && !newDisabled;\n if (oldValue === newValue) {\n return;\n }\n\n editor.value.setEditable(newValue);\n\n if (autofocus) {\n focus();\n }\n },\n);\n\nonMounted(async () => {\n if (editable && autofocus) {\n await nextTick();\n focus();\n }\n});\n\nconst hasCustomToolbar = slots.customToolbar;\nconst hasTools = computed(() => Object.keys(baseExtensions).length);\n\nconst characterCount = computed(\n () => editor.value?.storage.characterCount.characters() ?? 0,\n);\n\nconst showCharacterCount = computed(() => {\n if (!editor.value || !editable) {\n return false;\n }\n\n switch (characterCountDisplay) {\n case kdsCharacterCountDisplay.ALWAYS:\n return true;\n case kdsCharacterCountDisplay.AT_LIMIT:\n return hardCharacterLimit - characterCount.value <= AT_LIMIT_THRESHOLD;\n default:\n return false;\n }\n});\n\n// A provided `subText` (e.g. a validation message) takes precedence over the\n// character count display.\nconst hasSubTextOverride = computed(() => Boolean(subText));\n\nconst subTextValue = computed(() => {\n if (hasSubTextOverride.value) {\n return subText;\n }\n return showCharacterCount.value\n ? `${characterCount.value} / ${hardCharacterLimit} characters`\n : undefined;\n});\n</script>\n\n<template>\n <div>\n <div\n :class=\"[\n 'editor-wrapper',\n {\n 'with-border': withBorder,\n disabled,\n 'show-focus-ring': wrapperFocusRing && isEditorFocused,\n },\n ]\"\n >\n <div\n v-if=\"hasTools && editor && editable && !disabled\"\n :class=\"['toolbar-wrapper', { 'embedded-toolbar': !hasCustomToolbar }]\"\n >\n <RichTextEditorBaseToolbar\n :editor=\"editor\"\n :base-extensions=\"baseExtensions\"\n :link-tool-options=\"linkToolOptions\"\n >\n <template #default=\"{ tools }\">\n <slot\n name=\"customToolbar\"\n :editor=\"editor\"\n :tools=\"tools\"\n :hotkey-formatter=\"hotkeyFormatter\"\n >\n <RichTextEditorToolbar\n :editor=\"editor\"\n :tools=\"tools\"\n :hotkey-formatter=\"hotkeyFormatter\"\n />\n </slot>\n </template>\n <template #linkModal=\"{ linkTool }\">\n <KdsCreateLinkModal\n v-if=\"isToolEnabled('link') && linkTool\"\n v-bind=\"linkTool.props\"\n v-on=\"linkTool.events\"\n />\n </template>\n </RichTextEditorBaseToolbar>\n </div>\n\n <EditorContent\n class=\"rich-text-editor\"\n :editor=\"editor\"\n :class=\"{ editable: editable && !disabled }\"\n :aria-disabled=\"disabled || undefined\"\n />\n </div>\n\n <KdsSubText\n :id=\"subTextId\"\n :sub-text=\"subTextValue\"\n :error=\"hasSubTextOverride && error\"\n :validating=\"hasSubTextOverride && validating\"\n :preserve-sub-text-space=\"preserveSubTextSpace\"\n />\n </div>\n</template>\n\n<style scoped>\n.editor-wrapper {\n /* Fixed 44px toolbar height per the design (28px content + 8px padding on\n * each side); the small toolbar buttons (24px) center within the content\n * area. */\n --toolbar-height: calc(\n var(--kds-dimension-component-height-1-75x) +\n var(--kds-spacing-container-0-5x) * 2\n );\n\n position: relative;\n height: 100%;\n isolation: isolate;\n\n &.disabled {\n color: var(--kds-color-text-and-icon-disabled);\n }\n}\n\n/* stylelint-disable selector-class-pattern */\n.rich-text-editor {\n height: 100%;\n max-height: v-bind(\"maxHeightStyle\");\n overflow-y: auto;\n\n &.editable {\n padding: var(--kds-spacing-container-0-5x);\n cursor: text;\n background: var(--kds-color-background-input-initial);\n\n & :deep(.ProseMirror) {\n min-height: v-bind(\"minHeightStyle\");\n }\n }\n\n /* stylelint-disable knime/no-deep-nesting */\n & :deep(.ProseMirror) {\n height: 100%;\n font: var(--kds-font-base-body-small);\n\n /* The following rich text styles are kept in sync with KdsDescription. */\n p {\n padding: 0;\n margin: 0 0 var(--kds-spacing-container-0-37x);\n font: var(--kds-font-base-body-small);\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n p.small-text {\n font: var(--kds-font-base-subtext-xsmall);\n }\n\n strong,\n b {\n font-weight: var(--kds-core-font-weight-strong);\n }\n\n i,\n em {\n font-style: italic;\n }\n\n h1 {\n margin: 0;\n font: var(--kds-font-base-display-small);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n h2 {\n margin: 0;\n font: var(--kds-font-base-display-xsmall);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n h3 {\n margin: 0;\n font: var(--kds-font-base-body-medium-strong);\n }\n\n h4 {\n margin: 0;\n font: var(--kds-font-base-body-small-strong);\n }\n\n h5 {\n margin: 0;\n font: var(--kds-font-base-title-small-strong);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n h6 {\n margin: 0;\n font: var(--kds-font-base-title-small);\n color: var(--kds-color-text-and-icon-neutral);\n }\n\n blockquote {\n position: relative;\n padding-left: var(--kds-spacing-container-1x);\n margin-left: var(--kds-spacing-container-1x);\n\n &::before {\n position: absolute;\n left: 0;\n width: var(--kds-dimension-component-width-0-25x);\n height: 100%;\n content: \"\";\n background-color: var(--kds-color-border-subtle);\n border-radius: var(--kds-border-radius-container-pill);\n }\n\n & p:last-child {\n margin-bottom: 0;\n }\n }\n\n pre {\n width: fit-content;\n padding: var(--kds-spacing-container-0-75x);\n font: var(--kds-font-base-code-xsmall);\n background: var(--kds-color-surface-subtle);\n border-radius: var(--kds-border-radius-container-0-25x);\n\n & > code {\n padding: 0;\n background: none;\n }\n }\n\n & :not(pre) > code {\n padding: var(--kds-spacing-container-0-12x)\n var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-code-xsmall);\n background: var(--kds-color-surface-subtle);\n box-decoration-break: clone;\n border-radius: var(--kds-border-radius-container-0-12x);\n }\n\n /** keep in sync with KdsLink */\n a {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n max-width: 100%;\n padding: var(--kds-spacing-container-none)\n var(--kds-spacing-container-0-10x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n white-space: nowrap;\n text-decoration-line: underline;\n cursor: pointer;\n border-radius: var(--kds-border-radius-container-0-12x);\n\n &:focus-visible {\n outline: var(--kds-border-action-focused);\n outline-offset: var(--kds-spacing-container-none);\n }\n\n /** internal links */\n &[href^=\"http\"] {\n --link-color: var(--kds-color-text-and-icon-selected);\n\n color: var(--link-color);\n\n &:visited {\n --link-color: var(--kds-color-text-and-icon-info);\n\n color: var(--link-color);\n }\n\n &:hover {\n --link-color: var(--kds-color-text-and-icon-primary-inverted);\n\n color: var(--link-color);\n background-color: var(--kds-color-background-primary-bold-hover);\n }\n\n &:active {\n --link-color: var(--kds-color-text-and-icon-selected-inverted);\n\n color: var(--link-color);\n background-color: var(--kds-color-background-primary-bold-active);\n }\n\n &::after {\n display: block;\n width: var(--kds-dimension-icon-0-5x);\n height: var(--kds-dimension-icon-0-5x);\n margin-left: var(--kds-spacing-container-0-12x);\n content: \"\";\n background-color: var(--link-color);\n mask-image: v-bind(\"externalIcon\");\n mask-repeat: no-repeat;\n mask-size: contain;\n }\n }\n\n /** external links */\n &:not([href^=\"http\"]) {\n color: var(--kds-color-text-and-icon-neutral);\n\n &:visited {\n color: var(--kds-color-text-and-icon-info);\n }\n\n &:hover {\n background-color: var(--kds-color-background-neutral-hover);\n }\n\n &:active {\n background-color: var(--kds-color-background-neutral-active);\n }\n }\n }\n\n ol,\n ul {\n padding-left: var(--kds-spacing-container-2x);\n }\n\n dd {\n margin-left: var(--kds-spacing-container-1x);\n }\n\n table {\n border-spacing: var(--kds-spacing-container-0-25x) 0;\n border-collapse: separate;\n\n td,\n th {\n padding: var(--kds-spacing-container-0-25x);\n }\n\n th {\n font: var(--kds-font-base-body-small-strong);\n text-align: left;\n border-bottom: var(--kds-border-width-icon-stroke-l) solid\n var(--kds-color-border-neutral);\n }\n\n td {\n font: var(--kds-font-base-body-small);\n border-bottom: var(--kds-border-width-icon-stroke-s) solid\n var(--kds-color-border-neutral);\n }\n }\n }\n\n & :deep(.ProseMirror:focus-visible),\n & :deep(.ProseMirror:focus) {\n outline: transparent;\n }\n /* stylelint-enable selector-class-pattern */\n}\n\n.editor-wrapper.with-border {\n border: var(--kds-border-action-input);\n border-radius: var(--kds-border-radius-container-0-37x);\n\n &.disabled {\n border: var(--kds-border-action-disabled);\n }\n\n & .toolbar-wrapper {\n border-top-left-radius: var(--kds-border-radius-container-0-37x);\n border-top-right-radius: var(--kds-border-radius-container-0-37x);\n }\n\n & .rich-text-editor {\n border-bottom-right-radius: var(--kds-border-radius-container-0-37x);\n border-bottom-left-radius: var(--kds-border-radius-container-0-37x);\n }\n}\n\n.editor-wrapper.show-focus-ring {\n outline: var(--kds-border-action-focused);\n outline-offset: var(--kds-spacing-offset-focus);\n}\n\n.embedded-toolbar {\n height: var(--toolbar-height);\n padding: var(--kds-spacing-container-0-5x);\n overflow-x: auto;\n overscroll-behavior: contain;\n white-space: pre;\n scrollbar-width: none; /* for firefox */\n background: var(--kds-color-background-input-initial);\n border-bottom: var(--kds-border-base-muted);\n -ms-overflow-style: none; /* needed to hide scroll bar in edge */\n &::-webkit-scrollbar {\n display: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref, useId, useTemplateRef } from \"vue\";\n\nimport { KdsLabel } from \"@knime/kds-components\";\nimport type { KdsFormFieldExpose } from \"@knime/kds-components\";\n\nimport KdsRichTextEditor from \"./KdsRichTextEditor.vue\";\nimport type { KdsRichTextInputProps } from \"./types\";\n\nconst {\n id = undefined,\n label = undefined,\n ariaLabel = undefined,\n description = undefined,\n ...editorProps\n} = defineProps<KdsRichTextInputProps>();\n\n/** The current rich text value. */\nconst modelValue = defineModel<string>({ default: \"\" });\n\nconst emit = defineEmits<{\n blur: [];\n}>();\n\nconst fallbackId = useId();\nconst inputId = computed(() => id?.trim() || fallbackId);\nconst labelId = computed(() => `${inputId.value}-label`);\n\nconst isHovered = ref(false);\n\nconst editorRef =\n useTemplateRef<InstanceType<typeof KdsRichTextEditor>>(\"editor\");\n\ndefineExpose<KdsFormFieldExpose>({\n focus: () => editorRef.value?.focus(),\n});\n</script>\n\n<template>\n <div\n class=\"kds-rich-text-input\"\n @mouseenter=\"isHovered = true\"\n @mouseleave=\"isHovered = false\"\n >\n <KdsLabel\n v-if=\"label\"\n :id=\"labelId\"\n :label=\"label\"\n :description=\"description\"\n :show-description-button=\"isHovered\"\n />\n <KdsRichTextEditor\n ref=\"editor\"\n v-bind=\"editorProps\"\n v-model=\"modelValue\"\n with-border\n wrapper-focus-ring\n :aria-label=\"label ? undefined : ariaLabel\"\n :aria-labelledby=\"label ? labelId : undefined\"\n @blur=\"emit('blur')\"\n />\n </div>\n</template>\n\n<style scoped>\n.kds-rich-text-input {\n display: flex;\n flex-direction: column;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref, useId, useTemplateRef } from \"vue\";\n\nimport { KdsLabel } from \"@knime/kds-components\";\nimport type { KdsFormFieldExpose } from \"@knime/kds-components\";\n\nimport KdsRichTextEditor from \"./KdsRichTextEditor.vue\";\nimport type { KdsRichTextInputProps } from \"./types\";\n\nconst {\n id = undefined,\n label = undefined,\n ariaLabel = undefined,\n description = undefined,\n ...editorProps\n} = defineProps<KdsRichTextInputProps>();\n\n/** The current rich text value. */\nconst modelValue = defineModel<string>({ default: \"\" });\n\nconst emit = defineEmits<{\n blur: [];\n}>();\n\nconst fallbackId = useId();\nconst inputId = computed(() => id?.trim() || fallbackId);\nconst labelId = computed(() => `${inputId.value}-label`);\n\nconst isHovered = ref(false);\n\nconst editorRef =\n useTemplateRef<InstanceType<typeof KdsRichTextEditor>>(\"editor\");\n\ndefineExpose<KdsFormFieldExpose>({\n focus: () => editorRef.value?.focus(),\n});\n</script>\n\n<template>\n <div\n class=\"kds-rich-text-input\"\n @mouseenter=\"isHovered = true\"\n @mouseleave=\"isHovered = false\"\n >\n <KdsLabel\n v-if=\"label\"\n :id=\"labelId\"\n :label=\"label\"\n :description=\"description\"\n :show-description-button=\"isHovered\"\n />\n <KdsRichTextEditor\n ref=\"editor\"\n v-bind=\"editorProps\"\n v-model=\"modelValue\"\n with-border\n wrapper-focus-ring\n :aria-label=\"label ? undefined : ariaLabel\"\n :aria-labelledby=\"label ? labelId : undefined\"\n @blur=\"emit('blur')\"\n />\n </div>\n</template>\n\n<style scoped>\n.kds-rich-text-input {\n display: flex;\n flex-direction: column;\n}\n</style>\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;AACA,SAAS,eAAe,GAAG,GAAG;CAC7B,KAAK,IAAI,GAAG,KAAK,IAAI;AACtB;AACA,SAAS,kBAAkB,GAAG,GAAG;CAChC,CAAC,QAAQ,KAAK,IAAI,EAAE,YAAY,IAAI,EAAE;CACtC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,CAAC,GAAG,IAAI,GAAG,KAAK,EAAE,KAAK,EAAE;CACnD,OAAO;AACR;AACA,SAAS,gBAAgB,GAAG;CAC3B,IAAI,MAAM,QAAQ,CAAC,GAAG,OAAO;AAC9B;AACA,SAAS,sBAAsB,GAAG,GAAG;CACpC,IAAI,IAAI,QAAQ,IAAI,OAAO,eAAe,OAAO,UAAU,EAAE,OAAO,aAAa,EAAE;CACnF,IAAI,QAAQ,GAAG;EACd,IAAI,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;EACrC,IAAI;GACH,IAAI,KAAK,IAAI,EAAE,KAAK,CAAC,EAAA,CAAG,MAAM,MAAM,GAAG;IACtC,IAAI,OAAO,CAAC,MAAM,GAAG;IACrB,IAAI,CAAC;GACN,OAAO,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,CAAC,EAAA,CAAG,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,EAAE,WAAW,IAAI,IAAI,CAAC;EACtF,S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AAI,OAAO,kBAAkB,YAAY;IACxC,MAAM,cAAc,cAAc,aAAa;IAC/C,OAAO,OAAO,gBAAgB,WAAW,cAAc,eAAe,WAAW;GAClF;GACA,OAAO,eAAe,KAAK;EAC5B;EACA,SAAS,OAAO,eAAe,KAAK;CACrC;AACD;;;;;;;;AAQA,SAAS,aAAa,QAAQ,MAAM;CACnC,OAAO,WAAW,MAAM;EACvB,MAAM,OAAO,yBAAyB,QAAQ,IAAI;EAClD,IAAI,MAAM;GACT,IAAI,KAAK,KAAK,OAAO,QAAQ,KAAK,GAAG;GACrC,IAAI,OAAO,KAAK,UAAU,YAAY,OAAO,QAAQ,KAAK,KAAK;EAChE;EACA,SAAS,eAAe,MAAM;CAC/B;CACA,SAAS,gBAAgB;EACxB,OAAO;CACR;CACA,OAAO;AACR;;;;;;;;;;;;AAYA,SAAS,eAAe,QAAQ,MAAM;CACrC,OAAO,WAAW,MAAM;EACvB,MAAM,OAAO,yBAAyB,QAAQ,IAAI;EAClD,IAAI,MAAM,OAAO,KAAK,MAAM,QAAQ,KAAK,GAAG,IAAI;EAChD,SAAS,eAAe,MAAM;CAC/B;CACA,OAAO;AACR;AACA,SAAS,QAAQ,OAAO;CACvB,IAAI;EACH,WAAW,OAAO,EAAE;EACpB,OAAO;CACR,SAAS,SAAS;EACjB,OAAO;CACR;AACD;AACA,IAAM,SAAS,OAAO;CACrB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,QAAQ,OAAO;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,aAAa,OAAO;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,gBAAgB,OAAO;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,WAAW,OAAO;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,mBAAmB,OAAO;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,OAAO,OAAO,CAAC,OAAO,CAAC;AAC7B,IAAM,OAAO,OAAO;CACnB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,MAAM,OAAO;CAClB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,SAAS,OAAO;CACrB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,MAAM,OAAO;CAClB;CACA;CACA;CACA;CACA;AACD,CAAC;AACD,IAAM,gBAAgB,KAAK,uBAAuB;AAClD,IAAM,WAAW,KAAK,uBAAuB;AAC7C,IAAM,cAAc,KAAK,aAAa;AACtC,IAAM,YAAY,KAAK,8BAA8B;AACrD,IAAM,YAAY,KAAK,gBAAgB;AACvC,IAAM,iBAAiB,KAAK,kGAAkG;AAC9H,IAAM,oBAAoB,KAAK,uBAAuB;AACtD,IAAM,kBAAkB,KAAK,6DAA6D;AAC1F,IAAM,eAAe,KAAK,SAAS;AACnC,IAAM,iBAAiB,KAAK,0BAA0B;AACtD,IAAM,uBAAuB,KAAK,UAAU;AAC5C,IAAM,uBAAuB,KAAK,SAAS;AAC3C,IAAM,qBAAqB,KAAK,6BAA6B;AAC7D,IAAM,mBAAmB,KAAK,MAAM;AACpC,IAAM,YAAY;CACjB,SAAS;CACT,WAAW;CACX,MAAM;CACN,cAAc;CACd,iBAAiB;CACjB,YAAY;CACZ,uBAAuB;CACvB,SAAS;CACT,UAAU;CACV,cAAc;CACd,kBAAkB;CAClB,UAAU;AACX;AACA,IAAM,wBAAwB,OAAO,SAAS,CAAC,GAAG;CAC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