@digital-realty/ui-knowledgebase 0.1.4 → 0.1.5-IXUAT-11252.561639
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/README.md +14 -0
- package/dist/ui-knowledgebase.js +11 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -535,6 +535,20 @@ The breadcrumb trail (e.g. `Knowledge Base › User Guides`) on category and top
|
|
|
535
535
|
|
|
536
536
|
**Dependencies:** none (labels passed in by the page view).
|
|
537
537
|
|
|
538
|
+
**Implemented:** `src/components/kb-breadcrumb.ts` — `<kb-breadcrumb current=${label}>`. The KB
|
|
539
|
+
trail is always two levels, so the component bakes in the fixed `Knowledge Base` root (a link
|
|
540
|
+
to the landing page) and the page passes only the current page's label; the current crumb is
|
|
541
|
+
plain text (`aria-current="page"`). Markup mirrors legacy: `nav[aria-label="breadcrumb"] > ol`
|
|
542
|
+
with a MUI-NavigateNext chevron separator. Styling copied from the legacy KB (measured): Open
|
|
543
|
+
Sans 400 16px/20px, letter-spacing 0.15px, brand navy at 70% (`rgba(9,34,65,0.7)`), underlined
|
|
544
|
+
link, separator margin 12.5px. The root path comes from `src/routes/base-path.ts` (split out
|
|
545
|
+
of `routes.ts` so this leaf component doesn't pull in the views / externalized `ix-*` elements,
|
|
546
|
+
keeping it unit-testable). Wired into the category and topic views (not details — legacy has no
|
|
547
|
+
breadcrumb there). One deliberate divergence from legacy: the current crumb is plain text, not a
|
|
548
|
+
self-link, per this ticket's "non-clickable" spec. Vitest tests cover the structure and the
|
|
549
|
+
empty-label case. _Current label is the uid/code until the real category/topic views
|
|
550
|
+
(KB-7/KB-8) pass the title/name._
|
|
551
|
+
|
|
538
552
|
### KB-20 · `kb-whats-new-year-filter`
|
|
539
553
|
|
|
540
554
|
**Type:** Story
|
package/dist/ui-knowledgebase.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{LitElement as e,css as t,html as n,nothing as r}from"lit";import{customElement as i,property as a,state as o}from"lit/decorators.js";import{Router as s}from"@vaadin/router";import{unsafeHTML as c}from"lit/directives/unsafe-html.js";var l=null;function u(e,t,n){l=new s(e,{baseUrl:t}),l.setRoutes(n)}function d(){return l}function f(){l?.unsubscribe(),l?.removeRoutes(),l=null}
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(e,t){return ne(e)||re(e,t)||ie(e,t)||g()}function ie(e,t){if(e){if(typeof e==`string`)return h(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}function v(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof m;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}v.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},v.prototype.next=function(e){return this._invoke(`next`,e)},v.prototype.throw=function(e){return this._invoke(`throw`,e)},v.prototype.return=function(e){return this._invoke(`return`,e)};var ae=Object.entries,oe=Object.setPrototypeOf,y=Object.isFrozen,b=Object.getPrototypeOf,se=Object.getOwnPropertyDescriptor,x=Object.freeze,S=Object.seal,ce=Object.create,le=typeof Reflect<`u`&&Reflect,C=le.apply,ue=le.construct;x||=function(e){return e},S||=function(e){return e},C||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},ue||=function(e){return new e(...[...arguments].slice(1))};var de=k(Array.prototype.forEach);Array.prototype.indexOf;var fe=k(Array.prototype.lastIndexOf),pe=k(Array.prototype.pop),me=k(Array.prototype.push);Array.prototype.slice;var he=k(Array.prototype.splice),ge=Array.isArray,_e=k(String.prototype.toLowerCase),ve=k(String.prototype.toString),ye=k(String.prototype.match),be=k(String.prototype.replace),xe=k(String.prototype.indexOf),Se=k(String.prototype.trim),w=k(Number.prototype.toString),Ce=k(Boolean.prototype.toString),we=typeof BigInt>`u`?null:k(BigInt.prototype.toString),Te=typeof Symbol>`u`?null:k(Symbol.prototype.toString),T=k(Object.prototype.hasOwnProperty),E=k(Object.prototype.toString),D=k(RegExp.prototype.test),O=Ee(TypeError);function k(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return C(e,t,n)}}function Ee(e){return function(){return ue(e,[...arguments])}}function A(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_e;if(oe&&oe(e,null),!ge(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(y(t)||(t[r]=e),i=e)}e[i]=!0}return e}function De(e){for(let t=0;t<e.length;t++)T(e,t)||(e[t]=null);return e}function j(e){let t=ce(null);for(let r of ae(e)){var n=_(r,2);let i=n[0],a=n[1];T(e,i)&&(t[i]=ge(a)?De(a):a&&typeof a==`object`&&a.constructor===Object?j(a):a)}return t}function Oe(e){switch(typeof e){case`string`:return e;case`number`:return w(e);case`boolean`:return Ce(e);case`bigint`:return we?we(e):`0`;case`symbol`:return Te?Te(e):`Symbol()`;case`undefined`:return E(e);case`function`:case`object`:{if(e===null)return E(e);let t=e,n=M(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:E(e)}return E(e)}default:return E(e)}}function M(e,t){for(;e!==null;){let n=se(e,t);if(n){if(n.get)return k(n.get);if(typeof n.value==`function`)return k(n.value)}e=b(e)}function n(){return null}return n}function ke(e){try{return D(e,``),!0}catch{return!1}}var Ae=x(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),je=x(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Me=x([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Ne=x([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Pe=x(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Fe=x([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Ie=x([`#text`]),Le=x(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Re=x(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),ze=x(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Be=x([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ve=S(/{{[\w\W]*|^[\w\W]*}}/g),He=S(/<%[\w\W]*|^[\w\W]*%>/g),Ue=S(/\${[\w\W]*/g),We=S(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ge=S(/^aria-[\-\w]+$/),Ke=S(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),qe=S(/^(?:\w+script|data):/i),Je=S(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ye=S(/^html$/i),Xe=S(/^[a-z][.\w]*(-[.\w]+)+$/i),Ze=S(/<[/\w!]/g),Qe=S(/<[/\w]/g),$e=S(/<\/no(script|embed|frames)/i),et=S(/\/>/i),N={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},tt=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],nt=x(A({},tt)),rt=function(){let e={};return de(tt,t=>{e[t]=S(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),x(e)}(),it=function(){return typeof window>`u`?null:window},at=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},ot=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},P=function(e,t,n,r){return T(e,t)&&ge(e[t])?A(r.base?j(r.base):{},e[t],r.transform):n},st=function(e,t,n){let r=T(e,t)?e[t]:void 0;return r&&typeof r==`object`?j(r):n()};function ct(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:it(),t=e=>ct(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==N.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=M(d,`cloneNode`),p=M(d,`remove`),ee=M(d,`removeAttributeNode`),te=M(d,`nextSibling`),m=M(d,`childNodes`),h=M(d,`parentNode`),ne=M(d,`shadowRoot`),re=M(d,`attributes`),g=o&&o.prototype?M(o.prototype,`nodeType`):null,_=o&&o.prototype?M(o.prototype,`nodeName`):null,ie=o&&o.prototype?M(o.prototype,`ownerDocument`):null,v=function(e){return g?g(e):e.nodeType},oe=function(e){return _?_(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let y,b=``,se,le=!1,C=0,ue=function(){if(C>0)throw O(`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.`)},w=function(e){ue(),C++;try{return y.createHTML(e)}finally{C--}},Ce=function(e){ue(),C++;try{return y.createScriptURL(e)}finally{C--}},we=function(){return le||=(se=at(u,i),!0),se},Te=n,E=Te.implementation,k=Te.createNodeIterator,Ee=Te.createDocumentFragment,De=Te.getElementsByTagName,tt=r.importNode,F=ot();t.isSupported=typeof ae==`function`&&typeof h==`function`&&E&&E.createHTMLDocument!==void 0;let lt=Ve,ut=He,dt=Ue,ft=We,pt=Ge,mt=qe,ht=Je,gt=Xe,I=Ke,L=null,_t=A({},[...Ae,...je,...Me,...Pe,...Ie]),R=null,vt=A({},[...Le,...Re,...ze,...Be]),z=Object.seal(ce(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),B=null,yt=null,V=Object.seal(ce(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),bt=!0,xt=!0,St=!1,H=!0,U=!1,W=!0,G=!1,Ct=!1,K=null,wt=null,q=!1,J=!1,Y=!1,Tt=!1,Et=!0,Dt=!1,Ot=`user-content-`,kt=!0,At=!1,jt={},Mt=null,Nt=A({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Pt=null,Ft=A({},[`audio`,`video`,`img`,`source`,`image`,`track`]),It=null,Lt=A({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Rt=`http://www.w3.org/1998/Math/MathML`,zt=`http://www.w3.org/2000/svg`,X=`http://www.w3.org/1999/xhtml`,Bt=X,Vt=!1,Ht=null,Ut=A({},[Rt,zt,X],ve),Wt=x([`mi`,`mo`,`mn`,`ms`,`mtext`]),Gt=A({},Wt),Kt=x([`annotation-xml`]),qt=A({},Kt),Jt=A({},[`title`,`style`,`font`,`a`,`script`]),Yt=null,Xt=[`application/xhtml+xml`,`text/html`],Z=null,Zt=null,Qt=n.createElement(`form`),$t=function(e){return e instanceof RegExp||e instanceof Function},en=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Zt&&Zt===e)return;(!e||typeof e!=`object`)&&(e={}),e=j(e),Yt=Xt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Z=Yt===`application/xhtml+xml`?ve:_e,L=P(e,`ALLOWED_TAGS`,_t,{transform:Z}),R=P(e,`ALLOWED_ATTR`,vt,{transform:Z}),Ht=P(e,`ALLOWED_NAMESPACES`,Ut,{transform:ve}),It=P(e,`ADD_URI_SAFE_ATTR`,Lt,{transform:Z,base:Lt}),Pt=P(e,`ADD_DATA_URI_TAGS`,Ft,{transform:Z,base:Ft}),Mt=P(e,`FORBID_CONTENTS`,Nt,{transform:Z}),B=P(e,`FORBID_TAGS`,j({}),{transform:Z}),yt=P(e,`FORBID_ATTR`,j({}),{transform:Z}),jt=T(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?j(e.USE_PROFILES):e.USE_PROFILES:!1,bt=e.ALLOW_ARIA_ATTR!==!1,xt=e.ALLOW_DATA_ATTR!==!1,St=e.ALLOW_UNKNOWN_PROTOCOLS||!1,H=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,U=e.SAFE_FOR_TEMPLATES||!1,W=e.SAFE_FOR_XML!==!1,G=e.WHOLE_DOCUMENT||!1,J=e.RETURN_DOM||!1,Y=e.RETURN_DOM_FRAGMENT||!1,Tt=e.RETURN_TRUSTED_TYPE||!1,q=e.FORCE_BODY||!1,Et=e.SANITIZE_DOM!==!1,Dt=e.SANITIZE_NAMED_PROPS||!1,kt=e.KEEP_CONTENT!==!1,At=e.IN_PLACE||!1,I=ke(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Ke,Bt=typeof e.NAMESPACE==`string`?e.NAMESPACE:X,Gt=st(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>A({},Wt)),qt=st(e,`HTML_INTEGRATION_POINTS`,()=>A({},Kt));let t=st(e,`CUSTOM_ELEMENT_HANDLING`,()=>ce(null));if(z=ce(null),T(t,`tagNameCheck`)&&$t(t.tagNameCheck)&&(z.tagNameCheck=t.tagNameCheck),T(t,`attributeNameCheck`)&&$t(t.attributeNameCheck)&&(z.attributeNameCheck=t.attributeNameCheck),T(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(z.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),S(z),U&&(xt=!1),Y&&(J=!0),jt&&(L=A({},Ie),R=ce(null),jt.html===!0&&(A(L,Ae),A(R,Le)),jt.svg===!0&&(A(L,je),A(R,Re),A(R,Be)),jt.svgFilters===!0&&(A(L,Me),A(R,Re),A(R,Be)),jt.mathMl===!0&&(A(L,Pe),A(R,ze),A(R,Be))),V.tagCheck=null,V.attributeCheck=null,T(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?V.tagCheck=e.ADD_TAGS:ge(e.ADD_TAGS)&&(L===_t&&(L=j(L)),A(L,e.ADD_TAGS,Z))),T(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?V.attributeCheck=e.ADD_ATTR:ge(e.ADD_ATTR)&&(R===vt&&(R=j(R)),A(R,e.ADD_ATTR,Z))),T(e,`ADD_FORBID_CONTENTS`)&&ge(e.ADD_FORBID_CONTENTS)&&(Mt===Nt&&(Mt=j(Mt)),A(Mt,e.ADD_FORBID_CONTENTS,Z)),kt&&(L[`#text`]=!0),G&&A(L,[`html`,`head`,`body`]),L.table&&(A(L,[`tbody`]),delete B.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw O(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw O(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=y;y=e.TRUSTED_TYPES_POLICY;try{b=w(``)}catch(e){throw y=t,e}}else e.TRUSTED_TYPES_POLICY===null?(y=void 0,b=``):(y===void 0&&(y=we()),y&&typeof b==`string`&&(b=w(``)));x&&x(e),Zt=e},tn=A({},[...je,...Me,...Ne]),nn=A({},[...Pe,...Fe]),rn=function(e,t,n){return t.namespaceURI===X?e===`svg`:t.namespaceURI===Rt?e===`svg`&&(n===`annotation-xml`||Gt[n]):!!tn[e]},an=function(e,t,n){return t.namespaceURI===X?e===`math`:t.namespaceURI===zt?e===`math`&&qt[n]:!!nn[e]},on=function(e,t,n){return t.namespaceURI===zt&&!qt[n]||t.namespaceURI===Rt&&!Gt[n]?!1:!nn[e]&&(Jt[e]||!tn[e])},sn=function(e){let t=h(e);(!t||!t.tagName)&&(t={namespaceURI:Bt,tagName:`template`});let n=_e(e.tagName),r=_e(t.tagName);return Ht[e.namespaceURI]?e.namespaceURI===zt?rn(n,t,r):e.namespaceURI===Rt?an(n,t,r):e.namespaceURI===X?on(n,t,r):!!(Yt===`application/xhtml+xml`&&Ht[e.namespaceURI]):!1},Q=function(e){me(t.removed,{element:e});try{h(e).removeChild(e)}catch{if(p(e),!h(e))throw O(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},cn=function(e,t,n){try{ee(e,t)}catch{try{e.removeAttribute(n)}catch{}}},ln=function(e){fn(e);let t=m(e);if(t){let e=[];de(t,t=>{me(e,t)}),de(e,e=>{try{p(e)}catch{}})}let n=re(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&cn(e,r,i)}},un=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}me(t.removed,{attribute:r||null,from:n});try{r?ee(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(J||Y)try{Q(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},dn=function(e){let t=re(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||R[Z(i)]||cn(e,r,i)}},fn=function(e){let t=[e];for(;t.length>0;){let e=t.pop();v(e)===N.element&&dn(e);let n=m(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},pn=function(e,t){return W?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},mn=function(e){if(!W)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=v(e);if(n===N.processingInstruction||n===N.comment&&D(Qe,e.data)){try{p(e)}catch{}continue}if(n===N.element){let t=e,n=Z(oe(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&pn(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=m(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},hn=function(e){let t=null,r=null;if(q)e=`<remove></remove>`+e;else{let t=ye(e,/^[\r\n\t ]+/);r=t&&t[0]}Yt===`application/xhtml+xml`&&Bt===X&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=y?w(e):e;if(Bt===X)try{t=new l().parseFromString(i,Yt)}catch{}if(!t||!t.documentElement){t=E.createDocument(Bt,`template`,null);try{t.documentElement.innerHTML=Vt?b:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Bt===X?De.call(t,G?`html`:`body`)[0]:G?t.documentElement:a},gn=function(e){let t=ie?ie(e):e.ownerDocument;return k.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},_n=function(e){return e=be(e,lt,` `),e=be(e,ut,` `),e=be(e,dt,` `),e},vn=function(e){e.normalize();let t=ie?ie(e):e.ownerDocument,n=k.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=_n(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&de(i,e=>{bn(e.content)&&vn(e.content)})},yn=function(e){let t=_?_(e):null;return typeof t!=`string`||Z(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==re(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==g(e)||e.childNodes!==m(e)},bn=function(e){if(!g||typeof e!=`object`||!e)return!1;try{return g(e)===N.documentFragment}catch{return!1}},xn=function(e){if(!g||typeof e!=`object`||!e)return!1;try{return typeof g(e)==`number`}catch{return!1}};function $(e,n,r){e.length!==0&&de(e,e=>{e.call(t,n,r,Zt)})}let Sn=function(e,t){return!!(W&&e.hasChildNodes()&&!xn(e.firstElementChild)&&D(Ze,e.textContent)&&D(Ze,e.innerHTML)||W&&e.namespaceURI===X&&nt[t]&&(xn(e.firstElementChild)||typeof e.textContent==`string`&&D(rt[t],e.textContent))||e.nodeType===N.processingInstruction||W&&e.nodeType===N.comment&&D(Qe,e.data))},Cn=function(e,t){return e instanceof RegExp?D(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},wn=function(e,t,n){if(!B[t]&&An(t)&&Cn(z.tagNameCheck,t))return!1;if(kt&&!Mt[t]){let t=h(e),r=m(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,te(e))}}}return Q(e),!0},Tn=function(e,t,n,r){return e.length===0?t:t===n||t===r?j(t):t},En=function(e,t){return e===t||h(e)!==null?!1:(At&&fn(e),!0)},Dn=function(e,n){if($(F.beforeSanitizeElements,e,null),En(e,n))return!0;if(yn(e))return Q(e),!0;let r=Z(oe(e));if(L=Tn(F.uponSanitizeElement,L,_t,K),$(F.uponSanitizeElement,e,{tagName:r,allowedTags:L}),En(e,n))return!0;if(Sn(e,r))return Q(e),!0;if(B[r]||!(V.tagCheck instanceof Function&&V.tagCheck(r))&&!L[r]){let t=wn(e,r,n);return t===!1&&($(F.afterSanitizeElements,e,null),En(e,n))?!0:t}if(v(e)===N.element&&!sn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&D($e,e.innerHTML))return Q(e),!0;if(U&&e.nodeType===N.text){let n=_n(e.textContent);e.textContent!==n&&(me(t.removed,{element:e.cloneNode()}),e.textContent=n)}return $(F.afterSanitizeElements,e,null),En(e,n)},On=function(e,t,r){if(yt[t]||pn(t,e)||Et&&(t===`id`||t===`name`)&&(r in n||r in Qt))return!1;let i=R[t]||V.attributeCheck instanceof Function&&V.attributeCheck(t,e);return xt&&D(ft,t)||bt&&D(pt,t)?!0:i?It[t]||D(I,be(r,ht,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&xe(r,`data:`)===0&&Pt[e]||St&&!D(mt,be(r,ht,``))?!0:!r:An(e)&&Cn(z.tagNameCheck,e)&&Cn(z.attributeNameCheck,t,e)||t===`is`&&z.allowCustomizedBuiltInElements&&Cn(z.tagNameCheck,r)},kn=A({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),An=function(e){return!kn[_e(e)]&&D(gt,e)},jn=function(e,t,n,r){if(y&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return w(r);case`TrustedScriptURL`:return Ce(r)}return r},Mn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!yn(e)||(Q(e),!1)}catch{return un(t,e),!1}},Nn=function(e,n){if($(F.beforeSanitizeAttributes,e,null),En(e,n))return;let r=e.attributes;if(!r||yn(e))return;R=Tn(F.uponSanitizeAttribute,R,vt,wt);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0},a=r.length,o=Z(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=Z(s),d=l,f=s===`value`?d:Se(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,$(F.uponSanitizeAttribute,e,i),f=i.attrValue,Dt&&(u===`id`||u===`name`)&&xe(f,Ot)!==0&&(un(s,e,n),f=Ot+f,p=!0),W&&D(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){un(s,e,n);continue}if(u===`attributename`&&ye(f,`href`)){un(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){un(s,e,n);continue}if(!H&&D(et,f)){un(s,e,n);continue}if(U&&(f=_n(f)),!On(o,u,f)){un(s,e,n);continue}f=jn(o,u,c,f),f!==d&&Mn(e,s,c,f)&&p&&pe(t.removed)}}$(F.afterSanitizeAttributes,e,null),En(e,n)},Pn=function(e){let t=null,n=gn(e);for($(F.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if($(F.uponSanitizeShadowNode,t,null),Dn(t,e),Nn(t,e),bn(t.content)&&Pn(t.content),v(t)===N.element){let e=ne(t);bn(e)&&(Fn(e),Pn(e))}$(F.afterSanitizeShadowDOM,e,null)},Fn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Pn(e.shadow);continue}let n=e.node,r=v(n)===N.element,i=m(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=_?_(n):null;if(typeof e==`string`&&Z(e)===`template`){let e=n.content;bn(e)&&t.push({node:e,shadow:null})}}if(r){let e=ne(n);bn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Vt=!e,Vt&&(e=`<!-->`),typeof e!=`string`&&!xn(e)&&(e=Oe(e),typeof e!=`string`))throw O(`dirty is not a string, aborting`);if(!t.isSupported)return e;Ct?(L=K,R=wt):en(n),(F.uponSanitizeElement.length>0||F.uponSanitizeAttribute.length>0)&&(L=j(L)),F.uponSanitizeAttribute.length>0&&(R=j(R)),t.removed=[];let c=At&&typeof e!=`string`&&xn(e);if(c){mn(e);let t=oe(e);if(typeof t==`string`){let n=Z(t);if(!L[n]||B[n])throw ln(e),O(`root node is forbidden and cannot be sanitized in-place`)}if(yn(e))throw ln(e),O(`root node is clobbered and cannot be sanitized in-place`);try{Fn(e)}catch(t){throw ln(e),t}}else if(xn(e))i=hn(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===N.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Fn(i);else{if(!J&&!U&&!G&&e.indexOf(`<`)===-1)return y&&Tt?w(e):e;if(i=hn(e),!i)return J?null:Tt?b:``}i&&q&&Q(i.firstChild);let l=c?e:i;try{let e=gn(l);for(;o=e.nextNode();)Dn(o,l),Nn(o,l),bn(o.content)&&Pn(o.content)}catch(n){throw c&&(ln(e),de(t.removed,e=>{e.element&&fn(e.element)})),n}if(c){let n=!1;if(de(t.removed,t=>{t.element&&(t.element===e&&(n=!0),fn(t.element))}),n)throw O(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return U&&vn(e),e}if(J){if(U&&vn(i),Y)for(s=Ee.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(R.shadowroot||R.shadowrootmode)&&(s=tt.call(r,s,!0)),s}let u=G?i.outerHTML:i.innerHTML;return G&&L[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&D(Ye,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
3
|
-
`+u),
|
|
1
|
+
import{LitElement as e,css as t,html as n,nothing as r}from"lit";import{customElement as i,property as a,state as o}from"lit/decorators.js";import{Router as s}from"@vaadin/router";import{unsafeHTML as c}from"lit/directives/unsafe-html.js";var l=null;function u(e,t,n){l=new s(e,{baseUrl:t}),l.setRoutes(n)}function d(){return l}function f(){l?.unsubscribe(),l?.removeRoutes(),l=null}var p=window.registeredApps?.[`ui-knowledgebase`]?.path??`/knowledge-base`,ee=e=>e===p||e.startsWith(`${p}/`);function te(e,t,n){if(e!=null){if(Array.isArray(e)){e.forEach((e,r)=>te(e,`${t}[${r}]`,n));return}if(typeof e==`object`){for(let[r,i]of Object.entries(e))i!==void 0&&te(i,`${t}[${r}]`,n);return}n.push(`${encodeURIComponent(t)}=${encodeURIComponent(String(e))}`)}}function m(e){let t=[];for(let[n,r]of Object.entries(e))r!==void 0&&te(r,n,t);return t.length?`?${t.join(`&`)}`:``}function h(e,t){return e?/^https?:\/\//i.test(e)?e:`${t.replace(/\/+$/,``)}${e.startsWith(`/`)?e:`/${e}`}`:``}function ne(e,t){this.v=e,this.k=t}function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g(e){if(Array.isArray(e))return e}function _(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function ie(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ae(e,t){return g(e)||_(e,t)||oe(e,t)||ie()}function oe(e,t){if(e){if(typeof e==`string`)return re(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?re(e,t):void 0}}function v(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof ne;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}v.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},v.prototype.next=function(e){return this._invoke(`next`,e)},v.prototype.throw=function(e){return this._invoke(`throw`,e)},v.prototype.return=function(e){return this._invoke(`return`,e)};var se=Object.entries,y=Object.setPrototypeOf,ce=Object.isFrozen,le=Object.getPrototypeOf,ue=Object.getOwnPropertyDescriptor,b=Object.freeze,x=Object.seal,de=Object.create,fe=typeof Reflect<`u`&&Reflect,S=fe.apply,pe=fe.construct;b||=function(e){return e},x||=function(e){return e},S||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},pe||=function(e){return new e(...[...arguments].slice(1))};var C=D(Array.prototype.forEach);Array.prototype.indexOf;var me=D(Array.prototype.lastIndexOf),he=D(Array.prototype.pop),ge=D(Array.prototype.push);Array.prototype.slice;var _e=D(Array.prototype.splice),ve=Array.isArray,ye=D(String.prototype.toLowerCase),be=D(String.prototype.toString),xe=D(String.prototype.match),Se=D(String.prototype.replace),Ce=D(String.prototype.indexOf),we=D(String.prototype.trim),Te=D(Number.prototype.toString),Ee=D(Boolean.prototype.toString),De=typeof BigInt>`u`?null:D(BigInt.prototype.toString),Oe=typeof Symbol>`u`?null:D(Symbol.prototype.toString),w=D(Object.prototype.hasOwnProperty),ke=D(Object.prototype.toString),T=D(RegExp.prototype.test),E=Ae(TypeError);function D(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return S(e,t,n)}}function Ae(e){return function(){return pe(e,[...arguments])}}function O(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ye;if(y&&y(e,null),!ve(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ce(t)||(t[r]=e),i=e)}e[i]=!0}return e}function k(e){for(let t=0;t<e.length;t++)w(e,t)||(e[t]=null);return e}function A(e){let t=de(null);for(let r of se(e)){var n=ae(r,2);let i=n[0],a=n[1];w(e,i)&&(t[i]=ve(a)?k(a):a&&typeof a==`object`&&a.constructor===Object?A(a):a)}return t}function je(e){switch(typeof e){case`string`:return e;case`number`:return Te(e);case`boolean`:return Ee(e);case`bigint`:return De?De(e):`0`;case`symbol`:return Oe?Oe(e):`Symbol()`;case`undefined`:return ke(e);case`function`:case`object`:{if(e===null)return ke(e);let t=e,n=j(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:ke(e)}return ke(e)}default:return ke(e)}}function j(e,t){for(;e!==null;){let n=ue(e,t);if(n){if(n.get)return D(n.get);if(typeof n.value==`function`)return D(n.value)}e=le(e)}function n(){return null}return n}function Me(e){try{return T(e,``),!0}catch{return!1}}var Ne=b(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Pe=b(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Fe=b([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Ie=b([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Le=b(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Re=b([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),ze=b([`#text`]),Be=b(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Ve=b(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),He=b(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Ue=b([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),We=x(/{{[\w\W]*|^[\w\W]*}}/g),Ge=x(/<%[\w\W]*|^[\w\W]*%>/g),Ke=x(/\${[\w\W]*/g),qe=x(/^data-[\-\w.\u00B7-\uFFFF]+$/),Je=x(/^aria-[\-\w]+$/),Ye=x(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Xe=x(/^(?:\w+script|data):/i),Ze=x(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Qe=x(/^html$/i),$e=x(/^[a-z][.\w]*(-[.\w]+)+$/i),et=x(/<[/\w!]/g),tt=x(/<[/\w]/g),nt=x(/<\/no(script|embed|frames)/i),rt=x(/\/>/i),M={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},it=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],at=b(O({},it)),ot=function(){let e={};return C(it,t=>{e[t]=x(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),b(e)}(),st=function(){return typeof window>`u`?null:window},ct=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},lt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},N=function(e,t,n,r){return w(e,t)&&ve(e[t])?O(r.base?A(r.base):{},e[t],r.transform):n},ut=function(e,t,n){let r=w(e,t)?e[t]:void 0;return r&&typeof r==`object`?A(r):n()};function dt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:st(),t=e=>dt(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==M.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=j(d,`cloneNode`),p=j(d,`remove`),ee=j(d,`removeAttributeNode`),te=j(d,`nextSibling`),m=j(d,`childNodes`),h=j(d,`parentNode`),ne=j(d,`shadowRoot`),re=j(d,`attributes`),g=o&&o.prototype?j(o.prototype,`nodeType`):null,_=o&&o.prototype?j(o.prototype,`nodeName`):null,ie=o&&o.prototype?j(o.prototype,`ownerDocument`):null,ae=function(e){return g?g(e):e.nodeType},oe=function(e){return _?_(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let v,y=``,ce,le=!1,ue=0,fe=function(){if(ue>0)throw E(`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.`)},S=function(e){fe(),ue++;try{return v.createHTML(e)}finally{ue--}},pe=function(e){fe(),ue++;try{return v.createScriptURL(e)}finally{ue--}},Te=function(){return le||=(ce=ct(u,i),!0),ce},Ee=n,De=Ee.implementation,Oe=Ee.createNodeIterator,ke=Ee.createDocumentFragment,D=Ee.getElementsByTagName,Ae=r.importNode,k=lt();t.isSupported=typeof se==`function`&&typeof h==`function`&&De&&De.createHTMLDocument!==void 0;let it=We,ft=Ge,pt=Ke,mt=qe,ht=Je,gt=Xe,P=Ze,_t=$e,vt=Ye,F=null,I=O({},[...Ne,...Pe,...Fe,...Le,...ze]),L=null,yt=O({},[...Be,...Ve,...He,...Ue]),R=Object.seal(de(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),bt=null,z=null,B=Object.seal(de(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),xt=!0,St=!0,Ct=!1,wt=!0,V=!1,H=!0,U=!1,Tt=!1,W=null,G=null,K=!1,q=!1,J=!1,Et=!1,Dt=!0,Ot=!1,kt=`user-content-`,At=!0,jt=!1,Mt={},Nt=null,Pt=O({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ft=null,It=O({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Lt=null,Rt=O({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),zt=`http://www.w3.org/1998/Math/MathML`,Bt=`http://www.w3.org/2000/svg`,Y=`http://www.w3.org/1999/xhtml`,Vt=Y,Ht=!1,Ut=null,Wt=O({},[zt,Bt,Y],be),Gt=b([`mi`,`mo`,`mn`,`ms`,`mtext`]),Kt=O({},Gt),qt=b([`annotation-xml`]),Jt=O({},qt),Yt=O({},[`title`,`style`,`font`,`a`,`script`]),Xt=null,Zt=[`application/xhtml+xml`,`text/html`],X=null,Qt=null,$t=n.createElement(`form`),en=function(e){return e instanceof RegExp||e instanceof Function},tn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Qt&&Qt===e)return;(!e||typeof e!=`object`)&&(e={}),e=A(e),Xt=Zt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,X=Xt===`application/xhtml+xml`?be:ye,F=N(e,`ALLOWED_TAGS`,I,{transform:X}),L=N(e,`ALLOWED_ATTR`,yt,{transform:X}),Ut=N(e,`ALLOWED_NAMESPACES`,Wt,{transform:be}),Lt=N(e,`ADD_URI_SAFE_ATTR`,Rt,{transform:X,base:Rt}),Ft=N(e,`ADD_DATA_URI_TAGS`,It,{transform:X,base:It}),Nt=N(e,`FORBID_CONTENTS`,Pt,{transform:X}),bt=N(e,`FORBID_TAGS`,A({}),{transform:X}),z=N(e,`FORBID_ATTR`,A({}),{transform:X}),Mt=w(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?A(e.USE_PROFILES):e.USE_PROFILES:!1,xt=e.ALLOW_ARIA_ATTR!==!1,St=e.ALLOW_DATA_ATTR!==!1,Ct=e.ALLOW_UNKNOWN_PROTOCOLS||!1,wt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,V=e.SAFE_FOR_TEMPLATES||!1,H=e.SAFE_FOR_XML!==!1,U=e.WHOLE_DOCUMENT||!1,q=e.RETURN_DOM||!1,J=e.RETURN_DOM_FRAGMENT||!1,Et=e.RETURN_TRUSTED_TYPE||!1,K=e.FORCE_BODY||!1,Dt=e.SANITIZE_DOM!==!1,Ot=e.SANITIZE_NAMED_PROPS||!1,At=e.KEEP_CONTENT!==!1,jt=e.IN_PLACE||!1,vt=Me(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Ye,Vt=typeof e.NAMESPACE==`string`?e.NAMESPACE:Y,Kt=ut(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>O({},Gt)),Jt=ut(e,`HTML_INTEGRATION_POINTS`,()=>O({},qt));let t=ut(e,`CUSTOM_ELEMENT_HANDLING`,()=>de(null));if(R=de(null),w(t,`tagNameCheck`)&&en(t.tagNameCheck)&&(R.tagNameCheck=t.tagNameCheck),w(t,`attributeNameCheck`)&&en(t.attributeNameCheck)&&(R.attributeNameCheck=t.attributeNameCheck),w(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(R.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),x(R),V&&(St=!1),J&&(q=!0),Mt&&(F=O({},ze),L=de(null),Mt.html===!0&&(O(F,Ne),O(L,Be)),Mt.svg===!0&&(O(F,Pe),O(L,Ve),O(L,Ue)),Mt.svgFilters===!0&&(O(F,Fe),O(L,Ve),O(L,Ue)),Mt.mathMl===!0&&(O(F,Le),O(L,He),O(L,Ue))),B.tagCheck=null,B.attributeCheck=null,w(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?B.tagCheck=e.ADD_TAGS:ve(e.ADD_TAGS)&&(F===I&&(F=A(F)),O(F,e.ADD_TAGS,X))),w(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?B.attributeCheck=e.ADD_ATTR:ve(e.ADD_ATTR)&&(L===yt&&(L=A(L)),O(L,e.ADD_ATTR,X))),w(e,`ADD_FORBID_CONTENTS`)&&ve(e.ADD_FORBID_CONTENTS)&&(Nt===Pt&&(Nt=A(Nt)),O(Nt,e.ADD_FORBID_CONTENTS,X)),At&&(F[`#text`]=!0),U&&O(F,[`html`,`head`,`body`]),F.table&&(O(F,[`tbody`]),delete bt.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw E(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw E(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=v;v=e.TRUSTED_TYPES_POLICY;try{y=S(``)}catch(e){throw v=t,e}}else e.TRUSTED_TYPES_POLICY===null?(v=void 0,y=``):(v===void 0&&(v=Te()),v&&typeof y==`string`&&(y=S(``)));b&&b(e),Qt=e},nn=O({},[...Pe,...Fe,...Ie]),rn=O({},[...Le,...Re]),an=function(e,t,n){return t.namespaceURI===Y?e===`svg`:t.namespaceURI===zt?e===`svg`&&(n===`annotation-xml`||Kt[n]):!!nn[e]},on=function(e,t,n){return t.namespaceURI===Y?e===`math`:t.namespaceURI===Bt?e===`math`&&Jt[n]:!!rn[e]},sn=function(e,t,n){return t.namespaceURI===Bt&&!Jt[n]||t.namespaceURI===zt&&!Kt[n]?!1:!rn[e]&&(Yt[e]||!nn[e])},cn=function(e){let t=h(e);(!t||!t.tagName)&&(t={namespaceURI:Vt,tagName:`template`});let n=ye(e.tagName),r=ye(t.tagName);return Ut[e.namespaceURI]?e.namespaceURI===Bt?an(n,t,r):e.namespaceURI===zt?on(n,t,r):e.namespaceURI===Y?sn(n,t,r):!!(Xt===`application/xhtml+xml`&&Ut[e.namespaceURI]):!1},Z=function(e){ge(t.removed,{element:e});try{h(e).removeChild(e)}catch{if(p(e),!h(e))throw E(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},ln=function(e,t,n){try{ee(e,t)}catch{try{e.removeAttribute(n)}catch{}}},un=function(e){fn(e);let t=m(e);if(t){let e=[];C(t,t=>{ge(e,t)}),C(e,e=>{try{p(e)}catch{}})}let n=re(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&ln(e,r,i)}},Q=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}ge(t.removed,{attribute:r||null,from:n});try{r?ee(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(q||J)try{Z(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},dn=function(e){let t=re(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||L[X(i)]||ln(e,r,i)}},fn=function(e){let t=[e];for(;t.length>0;){let e=t.pop();ae(e)===M.element&&dn(e);let n=m(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},pn=function(e,t){return H?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},mn=function(e){if(!H)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=ae(e);if(n===M.processingInstruction||n===M.comment&&T(tt,e.data)){try{p(e)}catch{}continue}if(n===M.element){let t=e,n=X(oe(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&pn(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=m(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},hn=function(e){let t=null,r=null;if(K)e=`<remove></remove>`+e;else{let t=xe(e,/^[\r\n\t ]+/);r=t&&t[0]}Xt===`application/xhtml+xml`&&Vt===Y&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=v?S(e):e;if(Vt===Y)try{t=new l().parseFromString(i,Xt)}catch{}if(!t||!t.documentElement){t=De.createDocument(Vt,`template`,null);try{t.documentElement.innerHTML=Ht?y:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Vt===Y?D.call(t,U?`html`:`body`)[0]:U?t.documentElement:a},gn=function(e){let t=ie?ie(e):e.ownerDocument;return Oe.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},_n=function(e){return e=Se(e,it,` `),e=Se(e,ft,` `),e=Se(e,pt,` `),e},vn=function(e){e.normalize();let t=ie?ie(e):e.ownerDocument,n=Oe.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=_n(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&C(i,e=>{bn(e.content)&&vn(e.content)})},yn=function(e){let t=_?_(e):null;return typeof t!=`string`||X(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==re(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==g(e)||e.childNodes!==m(e)},bn=function(e){if(!g||typeof e!=`object`||!e)return!1;try{return g(e)===M.documentFragment}catch{return!1}},xn=function(e){if(!g||typeof e!=`object`||!e)return!1;try{return typeof g(e)==`number`}catch{return!1}};function $(e,n,r){e.length!==0&&C(e,e=>{e.call(t,n,r,Qt)})}let Sn=function(e,t){return!!(H&&e.hasChildNodes()&&!xn(e.firstElementChild)&&T(et,e.textContent)&&T(et,e.innerHTML)||H&&e.namespaceURI===Y&&at[t]&&(xn(e.firstElementChild)||typeof e.textContent==`string`&&T(ot[t],e.textContent))||e.nodeType===M.processingInstruction||H&&e.nodeType===M.comment&&T(tt,e.data))},Cn=function(e,t){return e instanceof RegExp?T(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},wn=function(e,t,n){if(!bt[t]&&An(t)&&Cn(R.tagNameCheck,t))return!1;if(At&&!Nt[t]){let t=h(e),r=m(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,te(e))}}}return Z(e),!0},Tn=function(e,t,n,r){return e.length===0?t:t===n||t===r?A(t):t},En=function(e,t){return e===t||h(e)!==null?!1:(jt&&fn(e),!0)},Dn=function(e,n){if($(k.beforeSanitizeElements,e,null),En(e,n))return!0;if(yn(e))return Z(e),!0;let r=X(oe(e));if(F=Tn(k.uponSanitizeElement,F,I,W),$(k.uponSanitizeElement,e,{tagName:r,allowedTags:F}),En(e,n))return!0;if(Sn(e,r))return Z(e),!0;if(bt[r]||!(B.tagCheck instanceof Function&&B.tagCheck(r))&&!F[r]){let t=wn(e,r,n);return t===!1&&($(k.afterSanitizeElements,e,null),En(e,n))?!0:t}if(ae(e)===M.element&&!cn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&T(nt,e.innerHTML))return Z(e),!0;if(V&&e.nodeType===M.text){let n=_n(e.textContent);e.textContent!==n&&(ge(t.removed,{element:e.cloneNode()}),e.textContent=n)}return $(k.afterSanitizeElements,e,null),En(e,n)},On=function(e,t,r){if(z[t]||pn(t,e)||Dt&&(t===`id`||t===`name`)&&(r in n||r in $t))return!1;let i=L[t]||B.attributeCheck instanceof Function&&B.attributeCheck(t,e);return St&&T(mt,t)||xt&&T(ht,t)?!0:i?Lt[t]||T(vt,Se(r,P,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Ce(r,`data:`)===0&&Ft[e]||Ct&&!T(gt,Se(r,P,``))?!0:!r:An(e)&&Cn(R.tagNameCheck,e)&&Cn(R.attributeNameCheck,t,e)||t===`is`&&R.allowCustomizedBuiltInElements&&Cn(R.tagNameCheck,r)},kn=O({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),An=function(e){return!kn[ye(e)]&&T(_t,e)},jn=function(e,t,n,r){if(v&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return S(r);case`TrustedScriptURL`:return pe(r)}return r},Mn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!yn(e)||(Z(e),!1)}catch{return Q(t,e),!1}},Nn=function(e,n){if($(k.beforeSanitizeAttributes,e,null),En(e,n))return;let r=e.attributes;if(!r||yn(e))return;L=Tn(k.uponSanitizeAttribute,L,yt,G);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0},a=r.length,o=X(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=X(s),d=l,f=s===`value`?d:we(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,$(k.uponSanitizeAttribute,e,i),f=i.attrValue,Ot&&(u===`id`||u===`name`)&&Ce(f,kt)!==0&&(Q(s,e,n),f=kt+f,p=!0),H&&T(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){Q(s,e,n);continue}if(u===`attributename`&&xe(f,`href`)){Q(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){Q(s,e,n);continue}if(!wt&&T(rt,f)){Q(s,e,n);continue}if(V&&(f=_n(f)),!On(o,u,f)){Q(s,e,n);continue}f=jn(o,u,c,f),f!==d&&Mn(e,s,c,f)&&p&&he(t.removed)}}$(k.afterSanitizeAttributes,e,null),En(e,n)},Pn=function(e){let t=null,n=gn(e);for($(k.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if($(k.uponSanitizeShadowNode,t,null),Dn(t,e),Nn(t,e),bn(t.content)&&Pn(t.content),ae(t)===M.element){let e=ne(t);bn(e)&&(Fn(e),Pn(e))}$(k.afterSanitizeShadowDOM,e,null)},Fn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Pn(e.shadow);continue}let n=e.node,r=ae(n)===M.element,i=m(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=_?_(n):null;if(typeof e==`string`&&X(e)===`template`){let e=n.content;bn(e)&&t.push({node:e,shadow:null})}}if(r){let e=ne(n);bn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ht=!e,Ht&&(e=`<!-->`),typeof e!=`string`&&!xn(e)&&(e=je(e),typeof e!=`string`))throw E(`dirty is not a string, aborting`);if(!t.isSupported)return e;Tt?(F=W,L=G):tn(n),(k.uponSanitizeElement.length>0||k.uponSanitizeAttribute.length>0)&&(F=A(F)),k.uponSanitizeAttribute.length>0&&(L=A(L)),t.removed=[];let c=jt&&typeof e!=`string`&&xn(e);if(c){mn(e);let t=oe(e);if(typeof t==`string`){let n=X(t);if(!F[n]||bt[n])throw un(e),E(`root node is forbidden and cannot be sanitized in-place`)}if(yn(e))throw un(e),E(`root node is clobbered and cannot be sanitized in-place`);try{Fn(e)}catch(t){throw un(e),t}}else if(xn(e))i=hn(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===M.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Fn(i);else{if(!q&&!V&&!U&&e.indexOf(`<`)===-1)return v&&Et?S(e):e;if(i=hn(e),!i)return q?null:Et?y:``}i&&K&&Z(i.firstChild);let l=c?e:i;try{let e=gn(l);for(;o=e.nextNode();)Dn(o,l),Nn(o,l),bn(o.content)&&Pn(o.content)}catch(n){throw c&&(un(e),C(t.removed,e=>{e.element&&fn(e.element)})),n}if(c){let n=!1;if(C(t.removed,t=>{t.element&&(t.element===e&&(n=!0),fn(t.element))}),n)throw E(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return V&&vn(e),e}if(q){if(V&&vn(i),J)for(s=ke.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(L.shadowroot||L.shadowrootmode)&&(s=Ae.call(r,s,!0)),s}let u=U?i.outerHTML:i.innerHTML;return U&&F[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&T(Qe,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
3
|
+
`+u),V&&(u=_n(u)),v&&Et?S(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};tn(e),Tt=!0,W=F,G=L},t.clearConfig=function(){Qt=null,Tt=!1,W=null,G=null,v=ce,y=``},t.isValidAttribute=function(e,t,n){Qt||tn({});let r=X(e),i=X(t);return On(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&w(k,e)&&ge(k[e],t)},t.removeHook=function(e,t){if(w(k,e)){if(t!==void 0){let n=me(k[e],t);return n===-1?void 0:_e(k[e],n,1)[0]}return he(k[e])}},t.removeHooks=function(e){w(k,e)&&(k[e]=[])},t.removeAllHooks=function(){k=lt()},t}var ft=dt();function pt(e){return ft.sanitize(e,{USE_PROFILES:{html:!0}})}function mt(e,t){let n=new DOMParser().parseFromString(e,`text/html`);return n.querySelectorAll(`a[href]`).forEach(e=>{let n=e.getAttribute(`href`)??``,r=n.startsWith(`/uploads/`)?h(n,t):n;r!==n&&e.setAttribute(`href`,r),ht(r)&&(e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener noreferrer`))}),n.querySelectorAll(`img[src]`).forEach(e=>{let n=e.getAttribute(`src`)??``;n.startsWith(`/uploads/`)&&e.setAttribute(`src`,h(n,t))}),n.body.innerHTML}function ht(e){if(!/^https?:\/\//i.test(e))return!1;try{return new URL(e).origin!==window.location.origin}catch{return!1}}function gt(e,t){let r=mt(pt(e??``),t);return n`${c(r)}`}function P(e,t){if(!e||!e.url)return null;let n;if(e.formats){n={};for(let[r,i]of Object.entries(e.formats))i?.url&&(n[r]={url:h(i.url,t),width:i.width,height:i.height})}return{url:h(e.url,t),alternativeText:e.alternativeText??null,mime:e.mime,name:e.name,width:e.width,height:e.height,formats:n}}var _t=e=>e===`text`||e===`accordion`||e===`video_card`||e===`document_card`?e:void 0;function vt(e){return{documentId:e.documentId??``,code:e.code??``,name:e.name??``,icon:e.icon}}function F(e,t){return{documentId:e.documentId??``,uid:e.uid??``,title:e.title??``,subtitle:e.subtitle,icon:e.icon,image:P(e.image,t),behavior:_t(e.behavior),order:e.order,showSortBy:e.showSortBy??!1,showFilterByTopic:e.showFilterByTopic??!1}}function I(e,t){return{documentId:e.documentId??``,uid:e.uid??``,title:e.title??``,abstract:e.abstract,body:gt(e.text,t),behavior:_t(e.behavior),featured:e.featured??!1,duration:e.duration,dateAdded:e.dateAdded,publishedAt:e.publishedAt??null,topics:(e.topics??[]).map(vt),category:e.category?F(e.category,t):null,thumbnail:P(e.thumbnail,t),video:P(e.video,t),documents:(e.documents??[]).map(e=>P(e,t)).filter(e=>e!==null)}}function L(e,t){return e?{heading:e.heading??``,description:e.description??``,backgroundImage:P(e.backgroundImage,t)}:null}var yt=class extends Error{constructor(e,t){super(e,t?.cause===void 0?void 0:{cause:t.cause}),this.name=`KbApiError`,this.status=t?.status}};function R(e){return!e.uid||!e.title?null:{uid:e.uid,title:e.title,categoryUid:e.category?.uid??``,categoryIcon:e.category?.icon}}var bt=`whats-new`,z=100,B={thumbnail:!0,video:!0,documents:!0,topics:!0,category:!0};function xt(e){let t=e.apiBaseUrl.replace(/\/+$/,``),n=e.mediaBaseUrl,r=e.previewDrafts?`draft`:`published`,i=e.locale,a=e.fetch??globalThis.fetch.bind(globalThis);async function o(e,n){let o=m({...n,status:r,locale:i}),s=`${t}/api/${e}${o}`,c;try{c=await a(s)}catch(t){throw new yt(`Network error fetching ${e}`,{cause:t})}if(!c.ok)throw new yt(`Strapi responded ${c.status} for ${e}`,{status:c.status});let l;try{l=await c.json()}catch(t){throw new yt(`Invalid JSON from ${e}`,{cause:t})}return l.data}async function s(e,t){return await o(e,t)??[]}return{async getLanding(){let[e,t,r,i,a]=await Promise.all([o(`index-page`,{populate:{backgroundImage:!0}}),s(`categories`,{populate:{image:!0},sort:[`order:asc`],pagination:{pageSize:z}}),s(`topics`,{sort:[`order:asc`],pagination:{pageSize:z}}),s(`posts`,{filters:{featured:{$eq:!0}},populate:B,sort:[`dateAdded:desc`],pagination:{pageSize:z}}),s(`posts`,{filters:{category:{uid:{$eq:bt}}},populate:B,sort:[`dateAdded:desc`],pagination:{pageSize:z}})]);return{indexPage:L(e,n),categories:t.map(e=>F(e,n)),topics:r.map(e=>vt(e)),featured:i.map(e=>I(e,n)),whatsNew:a.map(e=>I(e,n))}},async getCategory(e){let[t,r]=await Promise.all([s(`categories`,{filters:{uid:{$eq:e}},populate:{image:!0},pagination:{pageSize:1}}),s(`posts`,{filters:{category:{uid:{$eq:e}}},populate:B,sort:[`dateAdded:desc`],pagination:{pageSize:z}})]);return{category:t[0]?F(t[0],n):null,posts:r.map(e=>I(e,n))}},async getTopic(e){let[t,r]=await Promise.all([s(`topics`,{filters:{code:{$eq:e}},pagination:{pageSize:1}}),s(`posts`,{filters:{topics:{code:{$eq:e}}},populate:B,sort:[`dateAdded:desc`],pagination:{pageSize:z}})]);return{topic:t[0]?vt(t[0]):null,posts:r.map(e=>I(e,n))}},async getPost(e){let t=await s(`posts`,{filters:{uid:{$eq:e}},populate:B,pagination:{pageSize:1}});return t[0]?I(t[0],n):null},async getPostLinks(e){let t={};return e?.categoryUid&&(t.category={uid:{$eq:e.categoryUid}}),e?.topicCode&&(t.topics={code:{$eq:e.topicCode}}),(await s(`posts`,{fields:[`uid`,`title`],populate:{category:{fields:[`uid`,`icon`]}},filters:Object.keys(t).length?t:void 0,sort:[`title:asc`],pagination:{pageSize:z}})).map(R).filter(e=>e!==null)}}}function St(e){let t=new Map;function n(e,n){let r=t.get(e);if(r)return r;let i=n().catch(n=>{throw t.delete(e),n});return t.set(e,i),i}return{getLanding:()=>n(`landing`,()=>e.getLanding()),getCategory:t=>n(`category:${t}`,()=>e.getCategory(t)),getTopic:t=>n(`topic:${t}`,()=>e.getTopic(t)),getPost:t=>n(`post:${t}`,()=>e.getPost(t)),getPostLinks:t=>n(`postlinks:${t?.categoryUid??``}:${t?.topicCode??``}`,()=>e.getPostLinks(t)),invalidate:e=>{e?t.delete(e):t.clear()}}}function Ct(){let e=window.gpConfig?.[`ui-knowledgebase`],t=e?.[`KB:strapiBaseUrl`];if(!t)throw Error(`ui-knowledgebase config not loaded: window.gpConfig['ui-knowledgebase']['KB:strapiBaseUrl'] is missing. Ensure config.json is fetched before the KB route renders.`);return{apiBaseUrl:t,mediaBaseUrl:t,previewDrafts:e?.[`KB:previewDraftContent`]??!1,locale:`en`}}var wt;function V(){return wt||=St(xt(Ct())),wt}function H(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var U=class extends e{constructor(...e){super(...e),this.loading=!0,this.error=!1,this.data=null}static{this.styles=t`
|
|
4
4
|
:host {
|
|
5
5
|
display: block;
|
|
6
6
|
padding: 1rem;
|
|
@@ -18,7 +18,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
18
18
|
button {
|
|
19
19
|
cursor: pointer;
|
|
20
20
|
}
|
|
21
|
-
`}connectedCallback(){super.connectedCallback(),this.load()}async load(){this.loading=!0,this.error=!1;try{this.data=await
|
|
21
|
+
`}connectedCallback(){super.connectedCallback(),this.load()}async load(){this.loading=!0,this.error=!1;try{this.data=await V().getLanding()}catch{this.error=!0}finally{this.loading=!1}}render(){if(this.loading)return n`<p class="muted">Loading…</p>`;if(this.error||!this.data)return n`
|
|
22
22
|
<p role="alert">Couldn't load the Knowledge Base.</p>
|
|
23
23
|
<button @click=${()=>void this.load()}>Retry</button>
|
|
24
24
|
`;let{indexPage:e,categories:t,topics:i,featured:a,whatsNew:o}=this.data;return n`
|
|
@@ -32,7 +32,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
32
32
|
<ul>
|
|
33
33
|
${t.map(e=>n`
|
|
34
34
|
<li>
|
|
35
|
-
<a href="${
|
|
35
|
+
<a href="${p}/category/${e.uid}">${e.title}</a>
|
|
36
36
|
${e.subtitle?n`<span class="muted"> — ${e.subtitle}</span>`:r}
|
|
37
37
|
</li>
|
|
38
38
|
`)}
|
|
@@ -42,7 +42,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
42
42
|
<section>
|
|
43
43
|
<h2>Topics</h2>
|
|
44
44
|
<ul>
|
|
45
|
-
${i.map(e=>n`<li><a href="${
|
|
45
|
+
${i.map(e=>n`<li><a href="${p}/topic/${e.code}">${e.name}</a></li>`)}
|
|
46
46
|
</ul>
|
|
47
47
|
</section>
|
|
48
48
|
|
|
@@ -59,12 +59,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
59
59
|
<ul>
|
|
60
60
|
${e.map(e=>n`
|
|
61
61
|
<li>
|
|
62
|
-
<a href="${
|
|
62
|
+
<a href="${p}/details/${e.uid}">${e.title}</a>
|
|
63
63
|
${e.abstract?n`<span class="muted"> — ${e.abstract}</span>`:r}
|
|
64
64
|
</li>
|
|
65
65
|
`)}
|
|
66
66
|
</ul>
|
|
67
|
-
`}};H([o()],U.prototype,`loading`,void 0),H([o()],U.prototype,`error`,void 0),H([o()],U.prototype,`data`,void 0),U=H([i(`kb-landing-view`)],U);var
|
|
67
|
+
`}};H([o()],U.prototype,`loading`,void 0),H([o()],U.prototype,`error`,void 0),H([o()],U.prototype,`data`,void 0),U=H([i(`kb-landing-view`)],U);var Tt=class extends e{constructor(...e){super(...e),this.uid=``}static{this.styles=t`
|
|
68
68
|
:host {
|
|
69
69
|
display: block;
|
|
70
70
|
padding: 1rem;
|
|
@@ -72,7 +72,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
72
72
|
`}onAfterEnter(e){this.uid=String(e.params.uid??``)}render(){return n`
|
|
73
73
|
<a href="/knowledge-base">← Knowledge Base</a>
|
|
74
74
|
<h1>Category: ${this.uid}</h1>
|
|
75
|
-
`}};H([o()],
|
|
75
|
+
`}};H([o()],Tt.prototype,`uid`,void 0),Tt=H([i(`kb-category-view`)],Tt);var W=class extends e{constructor(...e){super(...e),this.code=``}static{this.styles=t`
|
|
76
76
|
:host {
|
|
77
77
|
display: block;
|
|
78
78
|
padding: 1rem;
|
|
@@ -80,7 +80,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
80
80
|
`}onAfterEnter(e){this.code=String(e.params.code??``)}render(){return n`
|
|
81
81
|
<a href="/knowledge-base">← Knowledge Base</a>
|
|
82
82
|
<h1>Topic: ${this.code}</h1>
|
|
83
|
-
`}};H([o()],
|
|
83
|
+
`}};H([o()],W.prototype,`code`,void 0),W=H([i(`kb-topic-view`)],W);var G=class extends e{constructor(...e){super(...e),this.uid=``}static{this.styles=t`
|
|
84
84
|
:host {
|
|
85
85
|
display: block;
|
|
86
86
|
padding: 1rem;
|
|
@@ -88,4 +88,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
88
88
|
`}onAfterEnter(e){this.uid=String(e.params.uid??``)}render(){return n`
|
|
89
89
|
<a href="/knowledge-base">← Knowledge Base</a>
|
|
90
90
|
<h1>Details: ${this.uid}</h1>
|
|
91
|
-
`}};H([o()],
|
|
91
|
+
`}};H([o()],G.prototype,`uid`,void 0),G=H([i(`kb-details-view`)],G);var K={Landing:`kb-landing`,Category:`kb-category`,Topic:`kb-topic`,Details:`kb-details`},q=[{path:p,children:[{name:K.Landing,path:`/`,component:`kb-landing-view`},{name:K.Category,path:`/category/:uid`,component:`kb-category-view`},{name:K.Topic,path:`/topic/:code`,component:`kb-topic-view`},{name:K.Details,path:`/details/:uid`,component:`kb-details-view`}]},{path:`(.*)`,component:`no-elem`}],J=class extends e{constructor(...e){super(...e),this.baseUrl=`/`,this.active=!1,this.outlet=document.createElement(`main`),this.onLocationChanged=e=>{let{router:t,location:n}=e.detail;t===d()&&(this.active=ee(n.pathname))}}connectedCallback(){super.connectedCallback(),window.addEventListener(`vaadin-router-location-changed`,this.onLocationChanged),u(this.outlet,this.baseUrl,q),this.dispatchEvent(new CustomEvent(`mfe-loaded`,{detail:{routes:q}}))}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener(`vaadin-router-location-changed`,this.onLocationChanged),f(),this.active=!1}render(){return this.active?n`${this.outlet}`:r}};H([a({type:String})],J.prototype,`baseUrl`,void 0),H([o()],J.prototype,`active`,void 0),J=H([i(`ui-knowledgebase`)],J);export{J as UiKnowledgebase};
|