@loomweaver/frame-kit 0.9.4 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,71 +1,71 @@
1
- /* @loomweaver/frame-kit 0.9.4 — lw-elements.global.js. Generated by build.mjs; do not edit. Serve the dist/ files same-origin under /frame-kit/. */
2
- "use strict";(()=>{function b(o,t){let e=o;if(Object.hasOwn(o,t)){let r=e[t];delete e[t],e[t]=r}}function C(o,t,e){e==null?o.removeAttribute(t):o.setAttribute(t,e)}function Jo(o,t,e){let r=["lw-btn",`lw-btn--${o}`];return t==="sm"&&r.push("lw-btn--sm"),e&&r.push("lw-btn--icon"),r}var tr="lw-button",$e=class extends HTMLElement{static observedAttributes=["variant","size","icon-only","disabled"];get variant(){return this.getAttribute("variant")??"default"}set variant(t){C(this,"variant",t)}get size(){return this.getAttribute("size")??"md"}set size(t){C(this,"size",t)}get iconOnly(){return this.hasAttribute("icon-only")}set iconOnly(t){this.toggleAttribute("icon-only",t)}get disabled(){return this.hasAttribute("disabled")}set disabled(t){this.toggleAttribute("disabled",t)}connectedCallback(){b(this,"variant"),b(this,"size"),b(this,"iconOnly"),b(this,"disabled"),this.setAttribute("role","button"),this.addEventListener("keydown",this.onKeydown),this.render()}disconnectedCallback(){this.removeEventListener("keydown",this.onKeydown)}attributeChangedCallback(){this.isConnected&&this.render()}onKeydown=t=>{!(t.key==="Enter"||t.key===" ")||this.disabled||(t.preventDefault(),this.click())};render(){let t=[...this.classList].filter(e=>e.startsWith("lw-btn"));this.classList.remove(...t),this.classList.add(...Jo(this.variant,this.size,this.iconOnly)),this.setAttribute("aria-disabled",String(this.disabled)),this.tabIndex=this.disabled?-1:0}};function er(){typeof customElements<"u"&&!customElements.get(tr)&&customElements.define(tr,$e)}function or(o,t){(t==null||t>o.length)&&(t=o.length);for(var e=0,r=Array(t);e<t;e++)r[e]=o[e];return r}function b0(o){if(Array.isArray(o))return o}function M0(o,t){var e=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(e!=null){var r,n,s,c,a=[],d=!0,p=!1;try{if(s=(e=e.call(o)).next,t!==0)for(;!(d=(r=s.call(e)).done)&&(a.push(r.value),a.length!==t);d=!0);}catch(m){p=!0,n=m}finally{try{if(!d&&e.return!=null&&(c=e.return(),Object(c)!==c))return}finally{if(p)throw n}}return a}}function y0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A0(o,t){return b0(o)||M0(o,t)||C0(o,t)||y0()}function C0(o,t){if(o){if(typeof o=="string")return or(o,t);var e={}.toString.call(o).slice(8,-1);return e==="Object"&&o.constructor&&(e=o.constructor.name),e==="Map"||e==="Set"?Array.from(o):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?or(o,t):void 0}}var mr=Object.entries,rr=Object.setPrototypeOf,T0=Object.isFrozen,E0=Object.getPrototypeOf,L0=Object.getOwnPropertyDescriptor,O=Object.freeze,P=Object.seal,Bt=Object.create,kr=typeof Reflect<"u"&&Reflect,Ye=kr.apply,Ke=kr.construct;O||(O=function(t){return t});P||(P=function(t){return t});Ye||(Ye=function(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];return t.apply(e,n)});Ke||(Ke=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return new t(...r)});var Lt=R(Array.prototype.forEach),S0=R(Array.prototype.lastIndexOf),nr=R(Array.prototype.pop),St=R(Array.prototype.push),B0=R(Array.prototype.splice),dt=Array.isArray,$t=R(String.prototype.toLowerCase),Ue=R(String.prototype.toString),ir=R(String.prototype.match),Nt=R(String.prototype.replace),sr=R(String.prototype.indexOf),H0=R(String.prototype.trim),R0=R(Number.prototype.toString),j0=R(Boolean.prototype.toString),ar=typeof BigInt>"u"?null:R(BigInt.prototype.toString),lr=typeof Symbol>"u"?null:R(Symbol.prototype.toString),Z=R(Object.prototype.hasOwnProperty),zt=R(Object.prototype.toString),j=R(RegExp.prototype.test),mt=Z0(TypeError);function R(o){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return Ye(o,t,r)}}function Z0(o){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Ke(o,e)}}function _(o,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$t;if(rr&&rr(o,null),!dt(t))return o;let r=t.length;for(;r--;){let n=t[r];if(typeof n=="string"){let s=e(n);s!==n&&(T0(t)||(t[r]=s),n=s)}o[n]=!0}return o}function V0(o){for(let t=0;t<o.length;t++)Z(o,t)||(o[t]=null);return o}function D(o){let t=Bt(null);for(let r of mr(o)){var e=A0(r,2);let n=e[0],s=e[1];Z(o,n)&&(dt(s)?t[n]=V0(s):s&&typeof s=="object"&&s.constructor===Object?t[n]=D(s):t[n]=s)}return t}function I0(o){switch(typeof o){case"string":return o;case"number":return R0(o);case"boolean":return j0(o);case"bigint":return ar?ar(o):"0";case"symbol":return lr?lr(o):"Symbol()";case"undefined":return zt(o);case"function":case"object":{if(o===null)return zt(o);let t=o,e=K(t,"toString");if(typeof e=="function"){let r=e(t);return typeof r=="string"?r:zt(r)}return zt(o)}default:return zt(o)}}function K(o,t){for(;o!==null;){let r=L0(o,t);if(r){if(r.get)return R(r.get);if(typeof r.value=="function")return R(r.value)}o=E0(o)}function e(){return null}return e}function O0(o){try{return j(o,""),!0}catch{return!1}}var cr=O(["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"]),Fe=O(["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"]),Ge=O(["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"]),P0=O(["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"]),We=O(["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"]),D0=O(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),hr=O(["#text"]),dr=O(["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"]),qe=O(["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","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","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"]),ur=O(["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"]),le=O(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),N0=P(/{{[\w\W]*|^[\w\W]*}}/g),z0=P(/<%[\w\W]*|^[\w\W]*%>/g),$0=P(/\${[\w\W]*/g),U0=P(/^data-[\-\w.\u00B7-\uFFFF]+$/),F0=P(/^aria-[\-\w]+$/),pr=P(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G0=P(/^(?:\w+script|data):/i),W0=P(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q0=P(/^html$/i),Y0=P(/^[a-z][.\w]*(-[.\w]+)+$/i),wr=P(/<[/\w!]/g),gr=P(/<[/\w]/g),K0=P(/<\/no(script|embed|frames)/i),X0=P(/\/>/i),W={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Q0=function(){return typeof window>"u"?null:window},J0=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null,n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(r=e.getAttribute(n));let s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},vr=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ht=function(t,e,r,n){return Z(t,e)&&dt(t[e])?_(n.base?D(n.base):{},t[e],n.transform):r};function fr(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Q0(),t=u=>fr(u);if(t.version="3.4.13",t.removed=[],!o||!o.document||o.document.nodeType!==W.document||!o.Element)return t.isSupported=!1,t;let e=o.document,r=e,n=r.currentScript;o.DocumentFragment;let s=o.HTMLTemplateElement,c=o.Node,a=o.Element,d=o.NodeFilter,p=o.NamedNodeMap;p===void 0&&(o.NamedNodeMap||o.MozNamedAttrMap),o.HTMLFormElement;let m=o.DOMParser,v=o.trustedTypes,k=a.prototype,V=K(k,"cloneNode"),M=K(k,"remove"),q=K(k,"nextSibling"),Y=K(k,"childNodes"),J=K(k,"parentNode"),jt=K(k,"shadowRoot"),Zt=K(k,"attributes"),I=c&&c.prototype?K(c.prototype,"nodeType"):null,$=c&&c.prototype?K(c.prototype,"nodeName"):null,tt=c&&c.prototype?K(c.prototype,"ownerDocument"):null;if(typeof s=="function"){let u=e.createElement("template");u.content&&u.content.ownerDocument&&(e=u.content.ownerDocument)}let U,wt="",Ae,Co=!1,Vt=0,To=function(){if(Vt>0)throw mt('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.')},Mt=function(i){To(),Vt++;try{return U.createHTML(i)}finally{Vt--}},qn=function(i){To(),Vt++;try{return U.createScriptURL(i)}finally{Vt--}},Yn=function(){return Co||(Ae=J0(v,n),Co=!0),Ae},Kt=e,Ce=Kt.implementation,Eo=Kt.createNodeIterator,Kn=Kt.createDocumentFragment,Xn=Kt.getElementsByTagName,Qn=r.importNode,T=vr();t.isSupported=typeof mr=="function"&&typeof J=="function"&&Ce&&Ce.createHTMLDocument!==void 0;let Jn=N0,t0=z0,e0=$0,o0=U0,r0=F0,n0=G0,Lo=W0,i0=Y0,So=pr,E=null,Te=_({},[...cr,...Fe,...Ge,...We,...hr]),L=null,Ee=_({},[...dr,...qe,...ur,...le]),H=Object.seal(Bt(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}})),It=null,Bo=null,st=Object.seal(Bt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ho=!0,Le=!0,Ro=!1,jo=!0,at=!1,lt=!0,gt=!1,Se=!1,Xt=null,Qt=null,Be=!1,yt=!1,Jt=!1,te=!1,Zo=!0,Vo=!1,Io="user-content-",He=!0,ee=!1,At={},et=null,Re=_({},["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"]),Oo=null,Po=_({},["audio","video","img","source","image","track"]),je=null,Do=_({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),oe="http://www.w3.org/1998/Math/MathML",re="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml",Ct=ot,Ze=!1,Ve=null,s0=_({},[oe,re,ot],Ue),No=O(["mi","mo","mn","ms","mtext"]),Ie=_({},No),zo=O(["annotation-xml"]),Oe=_({},zo),a0=_({},["title","style","font","a","script"]),Ot=null,l0=["application/xhtml+xml","text/html"],c0="text/html",S=null,Tt=null,h0=e.createElement("form"),$o=function(i){return i instanceof RegExp||i instanceof Function},Pe=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Tt&&Tt===i)return;(!i||typeof i!="object")&&(i={}),i=D(i),Ot=l0.indexOf(i.PARSER_MEDIA_TYPE)===-1?c0:i.PARSER_MEDIA_TYPE,S=Ot==="application/xhtml+xml"?Ue:$t,E=ht(i,"ALLOWED_TAGS",Te,{transform:S}),L=ht(i,"ALLOWED_ATTR",Ee,{transform:S}),Ve=ht(i,"ALLOWED_NAMESPACES",s0,{transform:Ue}),je=ht(i,"ADD_URI_SAFE_ATTR",Do,{transform:S,base:Do}),Oo=ht(i,"ADD_DATA_URI_TAGS",Po,{transform:S,base:Po}),et=ht(i,"FORBID_CONTENTS",Re,{transform:S}),It=ht(i,"FORBID_TAGS",D({}),{transform:S}),Bo=ht(i,"FORBID_ATTR",D({}),{transform:S}),At=Z(i,"USE_PROFILES")?i.USE_PROFILES&&typeof i.USE_PROFILES=="object"?D(i.USE_PROFILES):i.USE_PROFILES:!1,Ho=i.ALLOW_ARIA_ATTR!==!1,Le=i.ALLOW_DATA_ATTR!==!1,Ro=i.ALLOW_UNKNOWN_PROTOCOLS||!1,jo=i.ALLOW_SELF_CLOSE_IN_ATTR!==!1,at=i.SAFE_FOR_TEMPLATES||!1,lt=i.SAFE_FOR_XML!==!1,gt=i.WHOLE_DOCUMENT||!1,yt=i.RETURN_DOM||!1,Jt=i.RETURN_DOM_FRAGMENT||!1,te=i.RETURN_TRUSTED_TYPE||!1,Be=i.FORCE_BODY||!1,Zo=i.SANITIZE_DOM!==!1,Vo=i.SANITIZE_NAMED_PROPS||!1,He=i.KEEP_CONTENT!==!1,ee=i.IN_PLACE||!1,So=O0(i.ALLOWED_URI_REGEXP)?i.ALLOWED_URI_REGEXP:pr,Ct=typeof i.NAMESPACE=="string"?i.NAMESPACE:ot,Ie=Z(i,"MATHML_TEXT_INTEGRATION_POINTS")&&i.MATHML_TEXT_INTEGRATION_POINTS&&typeof i.MATHML_TEXT_INTEGRATION_POINTS=="object"?D(i.MATHML_TEXT_INTEGRATION_POINTS):_({},No),Oe=Z(i,"HTML_INTEGRATION_POINTS")&&i.HTML_INTEGRATION_POINTS&&typeof i.HTML_INTEGRATION_POINTS=="object"?D(i.HTML_INTEGRATION_POINTS):_({},zo);let l=Z(i,"CUSTOM_ELEMENT_HANDLING")&&i.CUSTOM_ELEMENT_HANDLING&&typeof i.CUSTOM_ELEMENT_HANDLING=="object"?D(i.CUSTOM_ELEMENT_HANDLING):Bt(null);if(H=Bt(null),Z(l,"tagNameCheck")&&$o(l.tagNameCheck)&&(H.tagNameCheck=l.tagNameCheck),Z(l,"attributeNameCheck")&&$o(l.attributeNameCheck)&&(H.attributeNameCheck=l.attributeNameCheck),Z(l,"allowCustomizedBuiltInElements")&&typeof l.allowCustomizedBuiltInElements=="boolean"&&(H.allowCustomizedBuiltInElements=l.allowCustomizedBuiltInElements),P(H),at&&(Le=!1),Jt&&(yt=!0),At&&(E=_({},hr),L=Bt(null),At.html===!0&&(_(E,cr),_(L,dr)),At.svg===!0&&(_(E,Fe),_(L,qe),_(L,le)),At.svgFilters===!0&&(_(E,Ge),_(L,qe),_(L,le)),At.mathMl===!0&&(_(E,We),_(L,ur),_(L,le))),st.tagCheck=null,st.attributeCheck=null,Z(i,"ADD_TAGS")&&(typeof i.ADD_TAGS=="function"?st.tagCheck=i.ADD_TAGS:dt(i.ADD_TAGS)&&(E===Te&&(E=D(E)),_(E,i.ADD_TAGS,S))),Z(i,"ADD_ATTR")&&(typeof i.ADD_ATTR=="function"?st.attributeCheck=i.ADD_ATTR:dt(i.ADD_ATTR)&&(L===Ee&&(L=D(L)),_(L,i.ADD_ATTR,S))),Z(i,"ADD_URI_SAFE_ATTR")&&dt(i.ADD_URI_SAFE_ATTR)&&_(je,i.ADD_URI_SAFE_ATTR,S),Z(i,"FORBID_CONTENTS")&&dt(i.FORBID_CONTENTS)&&(et===Re&&(et=D(et)),_(et,i.FORBID_CONTENTS,S)),Z(i,"ADD_FORBID_CONTENTS")&&dt(i.ADD_FORBID_CONTENTS)&&(et===Re&&(et=D(et)),_(et,i.ADD_FORBID_CONTENTS,S)),He&&(E["#text"]=!0),gt&&_(E,["html","head","body"]),E.table&&(_(E,["tbody"]),delete It.tbody),i.TRUSTED_TYPES_POLICY){if(typeof i.TRUSTED_TYPES_POLICY.createHTML!="function")throw mt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof i.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw mt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let h=U;U=i.TRUSTED_TYPES_POLICY;try{wt=Mt("")}catch(w){throw U=h,w}}else i.TRUSTED_TYPES_POLICY===null?(U=void 0,wt=""):(U===void 0&&(U=Yn()),U&&typeof wt=="string"&&(wt=Mt("")));O&&O(i),Tt=i},Uo=_({},[...Fe,...Ge,...P0]),Fo=_({},[...We,...D0]),d0=function(i,l,h){return l.namespaceURI===ot?i==="svg":l.namespaceURI===oe?i==="svg"&&(h==="annotation-xml"||Ie[h]):!!Uo[i]},u0=function(i,l,h){return l.namespaceURI===ot?i==="math":l.namespaceURI===re?i==="math"&&Oe[h]:!!Fo[i]},p0=function(i,l,h){return l.namespaceURI===re&&!Oe[h]||l.namespaceURI===oe&&!Ie[h]?!1:!Fo[i]&&(a0[i]||!Uo[i])},w0=function(i){let l=J(i);(!l||!l.tagName)&&(l={namespaceURI:Ct,tagName:"template"});let h=$t(i.tagName),w=$t(l.tagName);return Ve[i.namespaceURI]?i.namespaceURI===re?d0(h,l,w):i.namespaceURI===oe?u0(h,l,w):i.namespaceURI===ot?p0(h,l,w):!!(Ot==="application/xhtml+xml"&&Ve[i.namespaceURI]):!1},ct=function(i){St(t.removed,{element:i});try{J(i).removeChild(i)}catch{if(M(i),!J(i))throw mt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},ne=function(i){Pt(i);let l=Y(i);if(l){let w=[];Lt(l,g=>{St(w,g)}),Lt(w,g=>{try{M(g)}catch{}})}let h=Zt(i);if(h)for(let w=h.length-1;w>=0;--w){let g=h[w],f=g&&g.name;if(typeof f=="string")try{i.removeAttribute(f)}catch{}}},vt=function(i,l){try{St(t.removed,{attribute:l.getAttributeNode(i),from:l})}catch{St(t.removed,{attribute:null,from:l})}if(l.removeAttribute(i),i==="is")if(yt||Jt)try{ct(l)}catch{}else try{l.setAttribute(i,"")}catch{}},g0=function(i){let l=Zt(i);if(l)for(let h=l.length-1;h>=0;--h){let w=l[h],g=w&&w.name;if(!(typeof g!="string"||L[S(g)]))try{i.removeAttribute(g)}catch{}}},Pt=function(i){let l=[i];for(;l.length>0;){let h=l.pop();(I?I(h):h.nodeType)===W.element&&g0(h);let g=Y(h);if(g)for(let f=g.length-1;f>=0;--f)l.push(g[f])}},v0=function(i){if(!lt)return;let l=[i];for(;l.length>0;){let h=l.pop(),w=I?I(h):h.nodeType;if(w===W.processingInstruction||w===W.comment&&j(gr,h.data)){try{M(h)}catch{}continue}if(w===W.element){let f=h,A=S($?$(h):h.nodeName);try{f.hasAttribute&&f.hasAttribute("patchsrc")&&f.removeAttribute("patchsrc"),f.hasAttribute&&f.hasAttribute("for")&&A!=="label"&&A!=="output"&&f.removeAttribute("for")}catch{}}let g=Y(h);if(g)for(let f=g.length-1;f>=0;--f)l.push(g[f])}},Go=function(i){let l=null,h=null;if(Be)i="<remove></remove>"+i;else{let f=ir(i,/^[\r\n\t ]+/);h=f&&f[0]}Ot==="application/xhtml+xml"&&Ct===ot&&(i='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+i+"</body></html>");let w=U?Mt(i):i;if(Ct===ot)try{l=new m().parseFromString(w,Ot)}catch{}if(!l||!l.documentElement){l=Ce.createDocument(Ct,"template",null);try{l.documentElement.innerHTML=Ze?wt:w}catch{}}let g=l.body||l.documentElement;return i&&h&&g.insertBefore(e.createTextNode(h),g.childNodes[0]||null),Ct===ot?Xn.call(l,gt?"html":"body")[0]:gt?l.documentElement:g},Wo=function(i){let l=tt?tt(i):i.ownerDocument;return Eo.call(l||i,i,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},ie=function(i){return i=Nt(i,Jn," "),i=Nt(i,t0," "),i=Nt(i,e0," "),i},De=function(i){var l;i.normalize();let h=tt?tt(i):i.ownerDocument,w=Eo.call(h||i,i,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null),g=w.nextNode();for(;g;)g.data=ie(g.data),g=w.nextNode();let f=(l=i.querySelectorAll)===null||l===void 0?void 0:l.call(i,"template");f&&Lt(f,A=>{Et(A.content)&&De(A.content)})},se=function(i){let l=$?$(i):null;return typeof l!="string"||S(l)!=="form"?!1:typeof i.nodeName!="string"||typeof i.textContent!="string"||typeof i.removeChild!="function"||i.attributes!==Zt(i)||typeof i.removeAttribute!="function"||typeof i.setAttribute!="function"||typeof i.namespaceURI!="string"||typeof i.insertBefore!="function"||typeof i.hasChildNodes!="function"||i.nodeType!==I(i)||i.childNodes!==Y(i)},Et=function(i){if(!I||typeof i!="object"||i===null)return!1;try{return I(i)===W.documentFragment}catch{return!1}},Dt=function(i){if(!I||typeof i!="object"||i===null)return!1;try{return typeof I(i)=="number"}catch{return!1}};function rt(u,i,l){u.length!==0&&Lt(u,h=>{h.call(t,i,l,Tt)})}let m0=function(i,l){return!!(lt&&i.hasChildNodes()&&!Dt(i.firstElementChild)&&j(wr,i.textContent)&&j(wr,i.innerHTML)||lt&&i.namespaceURI===ot&&l==="style"&&Dt(i.firstElementChild)||i.nodeType===W.processingInstruction||lt&&i.nodeType===W.comment&&j(gr,i.data))},k0=function(i,l,h){if(!It[l]&&Xo(l)&&(H.tagNameCheck instanceof RegExp&&j(H.tagNameCheck,l)||H.tagNameCheck instanceof Function&&H.tagNameCheck(l)))return!1;if(He&&!et[l]){let w=J(i),g=Y(i);if(g&&w){let f=g.length;for(let A=f-1;A>=0;--A){let B=i===h?V(g[A],!0):g[A];w.insertBefore(B,q(i))}}}return ct(i),!0},qo=function(i,l,h,w){return i.length===0?l:l===h||l===w?D(l):l},Yo=function(i,l){if(rt(T.beforeSanitizeElements,i,null),i!==l&&J(i)===null)return ee&&Pt(i),!0;if(se(i))return ct(i),!0;let h=S($?$(i):i.nodeName);if(E=qo(T.uponSanitizeElement,E,Te,Xt),rt(T.uponSanitizeElement,i,{tagName:h,allowedTags:E}),i!==l&&J(i)===null)return ee&&Pt(i),!0;if(m0(i,h))return ct(i),!0;if(It[h]||!(st.tagCheck instanceof Function&&st.tagCheck(h))&&!E[h]){let g=k0(i,h,l);return g===!1&&rt(T.afterSanitizeElements,i,null),g}if((I?I(i):i.nodeType)===W.element&&!w0(i)||(h==="noscript"||h==="noembed"||h==="noframes")&&j(K0,i.innerHTML))return ct(i),!0;if(at&&i.nodeType===W.text){let g=ie(i.textContent);i.textContent!==g&&(St(t.removed,{element:i.cloneNode()}),i.textContent=g)}return rt(T.afterSanitizeElements,i,null),!1},Ko=function(i,l,h){if(Bo[l]||lt&&l==="patchsrc"||lt&&l==="for"&&i!=="label"&&i!=="output"||Zo&&(l==="id"||l==="name")&&(h in e||h in h0))return!1;let w=L[l]||st.attributeCheck instanceof Function&&st.attributeCheck(l,i);if(!(Le&&j(o0,l))){if(!(Ho&&j(r0,l))){if(w){if(!je[l]){if(!j(So,Nt(h,Lo,""))){if(!((l==="src"||l==="xlink:href"||l==="href")&&i!=="script"&&sr(h,"data:")===0&&Oo[i])){if(!(Ro&&!j(n0,Nt(h,Lo,"")))){if(h)return!1}}}}}else if(!(Xo(i)&&(H.tagNameCheck instanceof RegExp&&j(H.tagNameCheck,i)||H.tagNameCheck instanceof Function&&H.tagNameCheck(i))&&(H.attributeNameCheck instanceof RegExp&&j(H.attributeNameCheck,l)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(l,i))||l==="is"&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&j(H.tagNameCheck,h)||H.tagNameCheck instanceof Function&&H.tagNameCheck(h))))return!1}}return!0},f0=_({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Xo=function(i){return!f0[$t(i)]&&j(i0,i)},x0=function(i,l,h,w){if(U&&typeof v=="object"&&typeof v.getAttributeType=="function"&&!h)switch(v.getAttributeType(i,l)){case"TrustedHTML":return Mt(w);case"TrustedScriptURL":return qn(w)}return w},_0=function(i,l,h,w){try{h?i.setAttributeNS(h,l,w):i.setAttribute(l,w),se(i)?ct(i):nr(t.removed)}catch{vt(l,i)}},Qo=function(i){rt(T.beforeSanitizeAttributes,i,null);let l=i.attributes;if(!l||se(i))return;L=qo(T.uponSanitizeAttribute,L,Ee,Qt);let h={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0},w=l.length,g=S(i.nodeName);for(;w--;){let f=l[w],A=f.name,B=f.namespaceURI,F=f.value,G=S(A),ze=F,z=A==="value"?ze:H0(ze);if(h.attrName=G,h.attrValue=z,h.keepAttr=!0,h.forceKeepAttr=void 0,rt(T.uponSanitizeAttribute,i,h),z=h.attrValue,Vo&&(G==="id"||G==="name")&&sr(z,Io)!==0&&(vt(A,i),z=Io+z),lt&&j(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,z)){vt(A,i);continue}if(G==="attributename"&&ir(z,"href")){vt(A,i);continue}if(!h.forceKeepAttr){if(!h.keepAttr){vt(A,i);continue}if(!jo&&j(X0,z)){vt(A,i);continue}if(at&&(z=ie(z)),!Ko(g,G,z)){vt(A,i);continue}z=x0(g,G,B,z),z!==ze&&_0(i,A,B,z)}}rt(T.afterSanitizeAttributes,i,null)},ae=function(i){let l=null,h=Wo(i);for(rt(T.beforeSanitizeShadowDOM,i,null);l=h.nextNode();)if(rt(T.uponSanitizeShadowNode,l,null),Yo(l,i),Qo(l),Et(l.content)&&ae(l.content),(I?I(l):l.nodeType)===W.element){let g=jt(l);Et(g)&&(Ne(g),ae(g))}rt(T.afterSanitizeShadowDOM,i,null)},Ne=function(i){let l=[{node:i,shadow:null}];for(;l.length>0;){let h=l.pop();if(h.shadow){ae(h.shadow);continue}let w=h.node,f=(I?I(w):w.nodeType)===W.element,A=Y(w);if(A)for(let B=A.length-1;B>=0;--B)l.push({node:A[B],shadow:null});if(f){let B=$?$(w):null;if(typeof B=="string"&&S(B)==="template"){let F=w.content;Et(F)&&l.push({node:F,shadow:null})}}if(f){let B=jt(w);Et(B)&&l.push({node:null,shadow:B},{node:B,shadow:null})}}};return t.sanitize=function(u){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=null,h=null,w=null,g=null;if(Ze=!u,Ze&&(u="<!-->"),typeof u!="string"&&!Dt(u)&&(u=I0(u),typeof u!="string"))throw mt("dirty is not a string, aborting");if(!t.isSupported)return u;Se?(E=Xt,L=Qt):Pe(i),(T.uponSanitizeElement.length>0||T.uponSanitizeAttribute.length>0)&&(E=D(E)),T.uponSanitizeAttribute.length>0&&(L=D(L)),t.removed=[];let f=ee&&typeof u!="string"&&Dt(u);if(f){v0(u);let F=$?$(u):u.nodeName;if(typeof F=="string"){let G=S(F);if(!E[G]||It[G])throw ne(u),mt("root node is forbidden and cannot be sanitized in-place")}if(se(u))throw ne(u),mt("root node is clobbered and cannot be sanitized in-place");try{Ne(u)}catch(G){throw ne(u),G}}else if(Dt(u))l=Go("<!---->"),h=l.ownerDocument.importNode(u,!0),h.nodeType===W.element&&h.nodeName==="BODY"||h.nodeName==="HTML"?l=h:l.appendChild(h),Ne(h);else{if(!yt&&!at&&!gt&&u.indexOf("<")===-1)return U&&te?Mt(u):u;if(l=Go(u),!l)return yt?null:te?wt:""}l&&Be&&ct(l.firstChild);let A=f?u:l;try{let F=Wo(A);for(;w=F.nextNode();)Yo(w,A),Qo(w),Et(w.content)&&ae(w.content)}catch(F){throw f&&(ne(u),Lt(t.removed,G=>{G.element&&Pt(G.element)})),F}if(f)return Lt(t.removed,F=>{F.element&&Pt(F.element)}),at&&De(u),u;if(yt){if(at&&De(l),Jt)for(g=Kn.call(l.ownerDocument);l.firstChild;)g.appendChild(l.firstChild);else g=l;return(L.shadowroot||L.shadowrootmode)&&(g=Qn.call(r,g,!0)),g}let B=gt?l.outerHTML:l.innerHTML;return gt&&E["!doctype"]&&l.ownerDocument&&l.ownerDocument.doctype&&l.ownerDocument.doctype.name&&j(q0,l.ownerDocument.doctype.name)&&(B="<!DOCTYPE "+l.ownerDocument.doctype.name+`>
4
- `+B),at&&(B=ie(B)),U&&te?Mt(B):B},t.setConfig=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Pe(u),Se=!0,Xt=E,Qt=L},t.clearConfig=function(){Tt=null,Se=!1,Xt=null,Qt=null,U=Ae,wt=""},t.isValidAttribute=function(u,i,l){Tt||Pe({});let h=S(u),w=S(i);return Ko(h,w,l)},t.addHook=function(u,i){typeof i=="function"&&Z(T,u)&&St(T[u],i)},t.removeHook=function(u,i){if(Z(T,u)){if(i!==void 0){let l=S0(T[u],i);return l===-1?void 0:B0(T[u],l,1)[0]}return nr(T[u])}},t.removeHooks=function(u){Z(T,u)&&(T[u]=[])},t.removeAllHooks=function(){T=vr()},t}var ce=fr();var xr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"></path></svg>';var _r='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"></path></svg>';var br='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"></path></svg>';var Mr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"></path></svg>';var yr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"></path></svg>',Ar='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"></path></svg>';var Cr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M3 7.5 7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"></path></svg>';var Xe='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"></path></svg>';var Qe='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5"></path></svg>';var Tr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"></path></svg>',Er='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"></path></svg>';var Lr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5"></path></svg>';var Sr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"></path></svg>';var Br='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"></path></svg>';var Hr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"></path></svg>';var Rr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M6.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM12.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM18.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"></path></svg>';var jr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"></path></svg>';var Zr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"></path></svg>';var Vr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"></path></svg>';var Ir='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"></path></svg>',Or='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"></path></svg>';var Pr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"></path></svg>';var Dr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M5 12h14"></path></svg>',Nr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"></path></svg>';var zr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"></path></svg>';var $r='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"></path></svg>';var Ur='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z"></path></svg>';var Fr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"></path></svg>';var Gr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 0 1-1.125-1.125v-3.75ZM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-8.25ZM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-2.25Z"></path></svg>';var Wr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"></path></svg>';var qr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"></path></svg>';var Yr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z"></path></svg>';var Kr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"></path></svg>',Xr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"></path></svg>';var Qr={themeLight:Wr,themeDark:Nr,themeSystem:Br,chevronsLeft:Tr,chevronsRight:Er,chevronDown:Lr,check:Qe,close:Xr,pin:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M8 4h8M10.5 4v7M13.5 4v7M7 11h10M12 11v9"/></svg>',save:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M17 3.75H5.25a1.5 1.5 0 0 0-1.5 1.5v13.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5V7l-3.25-3.25Z"/><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 3.75v4.5h6.5v-4.5M7.75 20.25v-7h8.5v7"/></svg>',splitPanes:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M4 5.25h16a.75.75 0 0 1 .75.75v12a.75.75 0 0 1-.75.75H4a.75.75 0 0 1-.75-.75V6a.75.75 0 0 1 .75-.75ZM12 5.25v13.5"/></svg>',splitPanesDown:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M4 5.25h16a.75.75 0 0 1 .75.75v12a.75.75 0 0 1-.75.75H4a.75.75 0 0 1-.75-.75V6a.75.75 0 0 1 .75-.75ZM3.25 12h17.5"/></svg>',sidebarLeftOpen:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path fill="currentColor" fill-opacity=".28" stroke="none" d="M3.75 3H9v18H3.75a.75.75 0 0 1-.75-.75V3.75A.75.75 0 0 1 3.75 3Z"/><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3h16.5a.75.75 0 0 1 .75.75v16.5a.75.75 0 0 1-.75.75H3.75a.75.75 0 0 1-.75-.75V3.75A.75.75 0 0 1 3.75 3ZM9 3v18"/></svg>',sidebarLeftClosed:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3h16.5a.75.75 0 0 1 .75.75v16.5a.75.75 0 0 1-.75.75H3.75a.75.75 0 0 1-.75-.75V3.75A.75.75 0 0 1 3.75 3ZM9 3v18"/></svg>',sidebarRightOpen:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path fill="currentColor" fill-opacity=".28" stroke="none" d="M15 3h5.25a.75.75 0 0 1 .75.75v16.5a.75.75 0 0 1-.75.75H15V3Z"/><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3h16.5a.75.75 0 0 1 .75.75v16.5a.75.75 0 0 1-.75.75H3.75a.75.75 0 0 1-.75-.75V3.75A.75.75 0 0 1 3.75 3ZM15 3v18"/></svg>',sidebarRightClosed:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3h16.5a.75.75 0 0 1 .75.75v16.5a.75.75 0 0 1-.75.75H3.75a.75.75 0 0 1-.75-.75V3.75A.75.75 0 0 1 3.75 3ZM15 3v18"/></svg>',workspaces:Gr,menu:Xe,more:Rr,document:Hr,openWork:Yr,navigator:Xe,outline:Ir,add:$r,edit:zr,trash:qr,preview:Zr,sort:Cr,reset:_r,undo:Mr,info:Vr,lock:Or,success:Qe,warning:jr,error:Kr,settings:Sr,help:Fr,search:Pr,plugin:Ur,download:xr,maximize:Ar,popout:br,restore:yr,minimize:Dr};var he=new Map(Object.entries(Qr));function Jr(o){return he.get(o)}function tn(o){return he.has(o)}function Je(o){return ce.sanitize(o,{USE_PROFILES:{svg:!0,svgFilters:!0}})}function to(o,t){he.set(o,t)}function en(o){he.delete(o)}var ut="lw-icon",t1="1.25rem",eo=class extends HTMLElement{static observedAttributes=["name","size","aria-label"];get name(){return this.getAttribute("name")??""}set name(t){C(this,"name",t)}get size(){return this.getAttribute("size")??t1}set size(t){C(this,"size",t)}connectedCallback(){b(this,"name"),b(this,"size"),this.render()}attributeChangedCallback(){this.refresh()}refresh(){this.isConnected&&this.render()}render(){this.innerHTML=Jr(this.name)??"";let t=this.querySelector("svg");t&&(t.setAttribute("width",this.size),t.setAttribute("height",this.size)),this.getAttribute("aria-label")?(this.setAttribute("role","img"),this.removeAttribute("aria-hidden")):(this.setAttribute("aria-hidden","true"),this.removeAttribute("role"))}};function on(){typeof customElements<"u"&&!customElements.get(ut)&&customElements.define(ut,eo)}function io(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var xt=io();function dn(o){xt=o}var kt={exec:()=>null};function Ht(o){let t=[];return e=>{let r=Math.max(0,Math.min(3,e-1)),n=t[r];return n||(n=o(r),t[r]=n),n}}function x(o,t=""){let e=typeof o=="string"?o:o.source,r={replace:(n,s)=>{let c=typeof s=="string"?s:s.source;return c=c.replace(N.caret,"$1"),e=e.replace(n,c),r},getRegex:()=>new RegExp(e,t)};return r}var e1=((o="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+o)}catch{return!1}})(),N={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:o=>new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ht(o=>new RegExp(`^ {0,${o}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ht(o=>new RegExp(`^ {0,${o}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Ht(o=>new RegExp(`^ {0,${o}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ht(o=>new RegExp(`^ {0,${o}}#`)),htmlBeginRegex:Ht(o=>new RegExp(`^ {0,${o}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Ht(o=>new RegExp(`^ {0,${o}}>`))},o1=/^(?:[ \t]*(?:\n|$))+/,r1=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,n1=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Gt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,i1=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,so=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,un=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,pn=x(un).replace(/bull/g,so).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),s1=x(un).replace(/bull/g,so).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ao=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,a1=/^[^\n]+/,lo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,l1=x(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",lo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),c1=x(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,so).getRegex(),ge="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",co=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,h1=x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",co).replace("tag",ge).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wn=o=>x(ao).replace("hr",Gt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list",o).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ge).getRegex(),d1=wn(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),u1=wn(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),p1=x(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",u1).getRegex(),ho={blockquote:p1,code:r1,def:l1,fences:n1,heading:i1,hr:Gt,html:h1,lheading:pn,list:c1,newline:o1,paragraph:d1,table:kt,text:a1},rn=x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Gt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ge).getRegex(),w1={...ho,lheading:s1,table:rn,paragraph:x(ao).replace("hr",Gt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",rn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ge).getRegex()},g1={...ho,html:x(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",co).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:kt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:x(ao).replace("hr",Gt).replace("heading",` *#{1,6} *[^
5
- ]`).replace("lheading",pn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},v1=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,m1=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,gn=/^( {2,}|\\)\n(?!\s*$)/,k1=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,it=/[\p{P}\p{S}]/u,Rt=/[\s\p{P}\p{S}]/u,Wt=/[^\s\p{P}\p{S}]/u,f1=x(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Rt).getRegex(),x1=/[\p{Pi}\p{Ps}"']/u,vn=/(?!~)[\p{P}\p{S}]/u,_1=/(?!~)[\s\p{P}\p{S}]/u,b1=/(?:[^\s\p{P}\p{S}]|~)/u,M1=x(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",e1?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),mn=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,y1=x(mn,"u").replace(/punct/g,it).getRegex(),A1=x(mn,"u").replace(/punct/g,vn).getRegex(),C1=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,T1=x(C1,"u").replace(/openQuote/g,x1).replace(/punct/g,it).getRegex(),kn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",E1=x(kn,"gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,Rt).replace(/punct/g,it).getRegex(),L1=x(kn,"gu").replace(/notPunctSpace/g,b1).replace(/punctSpace/g,_1).replace(/punct/g,vn).getRegex(),S1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",B1=x(S1,"gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,Rt).replace(/punct/g,it).getRegex(),H1=x("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,Rt).replace(/punct/g,it).getRegex(),R1="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",j1=x(R1,"gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,Rt).replace(/punct/g,it).getRegex(),Z1=x(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,it).getRegex(),V1="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",I1=x(V1,"gu").replace(/notPunctSpace/g,Wt).replace(/punctSpace/g,Rt).replace(/punct/g,it).getRegex(),O1=x(/\\(punct)/,"gu").replace(/punct/g,it).getRegex(),P1=x(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),D1=x(co).replace("(?:-->|$)","-->").getRegex(),N1=x("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",D1).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ue=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,z1=x(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",ue).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fn=x(/^!?\[(label)\]\[(ref)\]/).replace("label",ue).replace("ref",lo).getRegex(),xn=x(/^!?\[(ref)\](?:\[\])?/).replace("ref",lo).getRegex(),$1=x("reflink|nolink(?!\\()","g").replace("reflink",fn).replace("nolink",xn).getRegex(),nn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,uo={_backpedal:kt,anyPunctuation:O1,autolink:P1,blockSkip:M1,br:gn,code:m1,del:kt,delLDelim:kt,delRDelim:kt,emStrongLDelim:y1,emStrongRDelimAst:E1,emStrongRDelimUnd:H1,escape:v1,link:z1,nolink:xn,punctuation:f1,reflink:fn,reflinkSearch:$1,tag:N1,text:k1,url:kt},U1={...uo,emStrongLDelim:T1,emStrongRDelimAst:B1,emStrongRDelimUnd:j1,link:x(/^!?\[(label)\]\((.*?)\)/).replace("label",ue).getRegex(),reflink:x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ue).getRegex()},oo={...uo,emStrongRDelimAst:L1,emStrongLDelim:A1,delLDelim:Z1,delRDelim:I1,url:x(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",nn).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:x(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",nn).getRegex()},F1={...oo,br:x(gn).replace("{2,}","*").getRegex(),text:x(oo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},de={normal:ho,gfm:w1,pedantic:g1},Ut={normal:uo,gfm:oo,breaks:F1,pedantic:U1},G1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},sn=o=>G1[o];function nt(o,t){if(t){if(N.escapeTest.test(o))return o.replace(N.escapeReplace,sn)}else if(N.escapeTestNoEncode.test(o))return o.replace(N.escapeReplaceNoEncode,sn);return o}function an(o){try{o=encodeURI(o).replace(N.percentDecode,"%")}catch{return null}return o}function ln(o,t){let e=o.replace(N.findPipe,(s,c,a)=>{let d=!1,p=c;for(;--p>=0&&a[p]==="\\";)d=!d;return d?"|":" |"}),r=e.split(N.splitPipe),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(N.slashPipe,"|");return r}function pt(o,t,e){let r=o.length;if(r===0)return"";let n=0;for(;n<r;){let s=o.charAt(r-n-1);if(s===t&&!e)n++;else if(s!==t&&e)n++;else break}return o.slice(0,r-n)}function cn(o){let t=o.split(`
6
- `),e=t.length-1;for(;e>=0&&N.blankLine.test(t[e]);)e--;return t.length-e<=2?o:t.slice(0,e+1).join(`
7
- `)}function W1(o,t){if(o.indexOf(t[1])===-1)return-1;let e=0;for(let r=0;r<o.length;r++)if(o[r]==="\\")r++;else if(o[r]===t[0])e++;else if(o[r]===t[1]&&(e--,e<0))return r;return e>0?-2:-1}function q1(o,t=0){let e=t,r="";for(let n of o)if(n===" "){let s=4-e%4;r+=" ".repeat(s),e+=s}else r+=n,e++;return r}function hn(o,t,e,r,n){let s=t.href,c=t.title||null,a=o[1].replace(n.other.outputLinkReplace,"$1");r.state.inLink=!0;let d={type:o[0].charAt(0)==="!"?"image":"link",raw:e,href:s,title:c,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,d}function Y1(o,t,e){let r=o.match(e.other.indentCodeCompensation);if(r===null)return t;let n=r[1];return t.split(`
8
- `).map(s=>{let c=s.match(e.other.beginningSpace);if(c===null)return s;let[a]=c;return a.length>=n.length?s.slice(n.length):s}).join(`
9
- `)}var pe=class{options;rules;lexer;constructor(o){this.options=o||xt}space(o){let t=this.rules.block.newline.exec(o);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(o){let t=this.rules.block.code.exec(o);if(t){let e=this.options.pedantic?t[0]:cn(t[0]),r=e.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e,codeBlockStyle:"indented",text:r}}}fences(o){let t=this.rules.block.fences.exec(o);if(t){let e=t[0],r=Y1(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(o){let t=this.rules.block.heading.exec(o);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let r=pt(e,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(e=r.trim())}return{type:"heading",raw:pt(t[0],`
10
- `),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(o){let t=this.rules.block.hr.exec(o);if(t)return{type:"hr",raw:pt(t[0],`
11
- `)}}blockquote(o){let t=this.rules.block.blockquote.exec(o);if(t){let e=pt(t[0],`
1
+ /* @loomweaver/frame-kit 0.9.6 — lw-elements.global.js. Generated by build.mjs; do not edit. Serve the dist/ files same-origin under /frame-kit/. */
2
+ "use strict";(()=>{var T0="#6b7280",L0="rgba(255, 255, 255, 0.14)",S0="#ffffff";function er(o,e,t,r,n,s){o.save(),o.beginPath(),o.rect(e,t,r,n),o.clip(),o.fillStyle=T0,o.fillRect(e,t,r,n),o.strokeStyle=L0,o.lineWidth=6,o.beginPath();for(let l=-n;l<r;l+=28)o.moveTo(e+l,t+n),o.lineTo(e+l+n,t);o.stroke(),o.fillStyle=S0,o.textAlign="center",o.textBaseline="middle",o.font=`600 ${Math.max(11,Math.min(16,n/14))}px system-ui, sans-serif`,o.fillText(s,e+r/2,t+n/2,r-16),o.restore()}function tr(o){return!Number.isFinite(o)||o<=0?1:Math.min(4,Math.max(.05,o))}function b(o,e){let t=o;if(Object.hasOwn(o,e)){let r=t[e];delete t[e],t[e]=r}}function C(o,e,t){t==null?o.removeAttribute(e):o.setAttribute(e,t)}function or(o,e,t){let r=["lw-btn",`lw-btn--${o}`];return e==="sm"&&r.push("lw-btn--sm"),t&&r.push("lw-btn--icon"),r}var rr="lw-button",$t=class extends HTMLElement{static observedAttributes=["variant","size","icon-only","disabled"];get variant(){return this.getAttribute("variant")??"default"}set variant(e){C(this,"variant",e)}get size(){return this.getAttribute("size")??"md"}set size(e){C(this,"size",e)}get iconOnly(){return this.hasAttribute("icon-only")}set iconOnly(e){this.toggleAttribute("icon-only",e)}get disabled(){return this.hasAttribute("disabled")}set disabled(e){this.toggleAttribute("disabled",e)}connectedCallback(){b(this,"variant"),b(this,"size"),b(this,"iconOnly"),b(this,"disabled"),this.setAttribute("role","button"),this.addEventListener("keydown",this.onKeydown),this.render()}disconnectedCallback(){this.removeEventListener("keydown",this.onKeydown)}attributeChangedCallback(){this.isConnected&&this.render()}onKeydown=e=>{!(e.key==="Enter"||e.key===" ")||this.disabled||(e.preventDefault(),this.click())};render(){let e=[...this.classList].filter(t=>t.startsWith("lw-btn"));this.classList.remove(...e),this.classList.add(...or(this.variant,this.size,this.iconOnly)),this.setAttribute("aria-disabled",String(this.disabled)),this.tabIndex=this.disabled?-1:0}};function nr(){typeof customElements<"u"&&!customElements.get(rr)&&customElements.define(rr,$t)}function ir(o,e){(e==null||e>o.length)&&(e=o.length);for(var t=0,r=Array(e);t<e;t++)r[t]=o[t];return r}function E0(o){if(Array.isArray(o))return o}function B0(o,e){var t=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(t!=null){var r,n,s,l,a=[],h=!0,p=!1;try{if(s=(t=t.call(o)).next,e!==0)for(;!(h=(r=s.call(t)).done)&&(a.push(r.value),a.length!==e);h=!0);}catch(m){p=!0,n=m}finally{try{if(!h&&t.return!=null&&(l=t.return(),Object(l)!==l))return}finally{if(p)throw n}}return a}}function H0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R0(o,e){return E0(o)||B0(o,e)||j0(o,e)||H0()}function j0(o,e){if(o){if(typeof o=="string")return ir(o,e);var t={}.toString.call(o).slice(8,-1);return t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set"?Array.from(o):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ir(o,e):void 0}}var xr=Object.entries,sr=Object.setPrototypeOf,Z0=Object.isFrozen,V0=Object.getPrototypeOf,I0=Object.getOwnPropertyDescriptor,P=Object.freeze,O=Object.seal,Be=Object.create,_r=typeof Reflect<"u"&&Reflect,Yt=_r.apply,Kt=_r.construct;P||(P=function(e){return e});O||(O=function(e){return e});Yt||(Yt=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];return e.apply(t,n)});Kt||(Kt=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return new e(...r)});var Se=R(Array.prototype.forEach),P0=R(Array.prototype.lastIndexOf),ar=R(Array.prototype.pop),Ee=R(Array.prototype.push),O0=R(Array.prototype.splice),de=Array.isArray,$e=R(String.prototype.toLowerCase),Ut=R(String.prototype.toString),lr=R(String.prototype.match),Ne=R(String.prototype.replace),cr=R(String.prototype.indexOf),D0=R(String.prototype.trim),N0=R(Number.prototype.toString),z0=R(Boolean.prototype.toString),hr=typeof BigInt>"u"?null:R(BigInt.prototype.toString),dr=typeof Symbol>"u"?null:R(Symbol.prototype.toString),Z=R(Object.prototype.hasOwnProperty),ze=R(Object.prototype.toString),j=R(RegExp.prototype.test),me=$0(TypeError);function R(o){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Yt(o,e,r)}}function $0(o){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Kt(o,t)}}function _(o,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$e;if(sr&&sr(o,null),!de(e))return o;let r=e.length;for(;r--;){let n=e[r];if(typeof n=="string"){let s=t(n);s!==n&&(Z0(e)||(e[r]=s),n=s)}o[n]=!0}return o}function U0(o){for(let e=0;e<o.length;e++)Z(o,e)||(o[e]=null);return o}function D(o){let e=Be(null);for(let r of xr(o)){var t=R0(r,2);let n=t[0],s=t[1];Z(o,n)&&(de(s)?e[n]=U0(s):s&&typeof s=="object"&&s.constructor===Object?e[n]=D(s):e[n]=s)}return e}function F0(o){switch(typeof o){case"string":return o;case"number":return N0(o);case"boolean":return z0(o);case"bigint":return hr?hr(o):"0";case"symbol":return dr?dr(o):"Symbol()";case"undefined":return ze(o);case"function":case"object":{if(o===null)return ze(o);let e=o,t=K(e,"toString");if(typeof t=="function"){let r=t(e);return typeof r=="string"?r:ze(r)}return ze(o)}default:return ze(o)}}function K(o,e){for(;o!==null;){let r=I0(o,e);if(r){if(r.get)return R(r.get);if(typeof r.value=="function")return R(r.value)}o=V0(o)}function t(){return null}return t}function G0(o){try{return j(o,""),!0}catch{return!1}}var ur=P(["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"]),Ft=P(["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"]),Gt=P(["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"]),W0=P(["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"]),Wt=P(["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"]),q0=P(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pr=P(["#text"]),wr=P(["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"]),qt=P(["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","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","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"]),gr=P(["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"]),lt=P(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Y0=O(/{{[\w\W]*|^[\w\W]*}}/g),K0=O(/<%[\w\W]*|^[\w\W]*%>/g),X0=O(/\${[\w\W]*/g),Q0=O(/^data-[\-\w.\u00B7-\uFFFF]+$/),J0=O(/^aria-[\-\w]+$/),vr=O(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),e1=O(/^(?:\w+script|data):/i),t1=O(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),o1=O(/^html$/i),r1=O(/^[a-z][.\w]*(-[.\w]+)+$/i),mr=O(/<[/\w!]/g),kr=O(/<[/\w]/g),n1=O(/<\/no(script|embed|frames)/i),i1=O(/\/>/i),W={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},s1=function(){return typeof window>"u"?null:window},a1=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null,n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));let s="dompurify"+(r?"#"+r:"");try{return e.createPolicy(s,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},fr=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},he=function(e,t,r,n){return Z(e,t)&&de(e[t])?_(n.base?D(n.base):{},e[t],n.transform):r};function br(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s1(),e=u=>br(u);if(e.version="3.4.13",e.removed=[],!o||!o.document||o.document.nodeType!==W.document||!o.Element)return e.isSupported=!1,e;let t=o.document,r=t,n=r.currentScript;o.DocumentFragment;let s=o.HTMLTemplateElement,l=o.Node,a=o.Element,h=o.NodeFilter,p=o.NamedNodeMap;p===void 0&&(o.NamedNodeMap||o.MozNamedAttrMap),o.HTMLFormElement;let m=o.DOMParser,v=o.trustedTypes,k=a.prototype,V=K(k,"cloneNode"),y=K(k,"remove"),q=K(k,"nextSibling"),Y=K(k,"childNodes"),J=K(k,"parentNode"),je=K(k,"shadowRoot"),Ze=K(k,"attributes"),I=l&&l.prototype?K(l.prototype,"nodeType"):null,$=l&&l.prototype?K(l.prototype,"nodeName"):null,ee=l&&l.prototype?K(l.prototype,"ownerDocument"):null;if(typeof s=="function"){let u=t.createElement("template");u.content&&u.content.ownerDocument&&(t=u.content.ownerDocument)}let U,we="",At,To=!1,Ve=0,Lo=function(){if(Ve>0)throw me('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.')},ye=function(i){Lo(),Ve++;try{return U.createHTML(i)}finally{Ve--}},Jn=function(i){Lo(),Ve++;try{return U.createScriptURL(i)}finally{Ve--}},e0=function(){return To||(At=a1(v,n),To=!0),At},Ke=t,Ct=Ke.implementation,So=Ke.createNodeIterator,t0=Ke.createDocumentFragment,o0=Ke.getElementsByTagName,r0=r.importNode,T=fr();e.isSupported=typeof xr=="function"&&typeof J=="function"&&Ct&&Ct.createHTMLDocument!==void 0;let n0=Y0,i0=K0,s0=X0,a0=Q0,l0=J0,c0=e1,Eo=t1,h0=r1,Bo=vr,L=null,Tt=_({},[...ur,...Ft,...Gt,...Wt,...pr]),S=null,Lt=_({},[...wr,...qt,...gr,...lt]),H=Object.seal(Be(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}})),Ie=null,Ho=null,se=Object.seal(Be(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ro=!0,St=!0,jo=!1,Zo=!0,ae=!1,le=!0,ge=!1,Et=!1,Xe=null,Qe=null,Bt=!1,Me=!1,Je=!1,et=!1,Vo=!0,Io=!1,Po="user-content-",Ht=!0,tt=!1,Ae={},te=null,Rt=_({},["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"]),Oo=null,Do=_({},["audio","video","img","source","image","track"]),jt=null,No=_({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ot="http://www.w3.org/1998/Math/MathML",rt="http://www.w3.org/2000/svg",oe="http://www.w3.org/1999/xhtml",Ce=oe,Zt=!1,Vt=null,d0=_({},[ot,rt,oe],Ut),zo=P(["mi","mo","mn","ms","mtext"]),It=_({},zo),$o=P(["annotation-xml"]),Pt=_({},$o),u0=_({},["title","style","font","a","script"]),Pe=null,p0=["application/xhtml+xml","text/html"],w0="text/html",E=null,Te=null,g0=t.createElement("form"),Uo=function(i){return i instanceof RegExp||i instanceof Function},Ot=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Te&&Te===i)return;(!i||typeof i!="object")&&(i={}),i=D(i),Pe=p0.indexOf(i.PARSER_MEDIA_TYPE)===-1?w0:i.PARSER_MEDIA_TYPE,E=Pe==="application/xhtml+xml"?Ut:$e,L=he(i,"ALLOWED_TAGS",Tt,{transform:E}),S=he(i,"ALLOWED_ATTR",Lt,{transform:E}),Vt=he(i,"ALLOWED_NAMESPACES",d0,{transform:Ut}),jt=he(i,"ADD_URI_SAFE_ATTR",No,{transform:E,base:No}),Oo=he(i,"ADD_DATA_URI_TAGS",Do,{transform:E,base:Do}),te=he(i,"FORBID_CONTENTS",Rt,{transform:E}),Ie=he(i,"FORBID_TAGS",D({}),{transform:E}),Ho=he(i,"FORBID_ATTR",D({}),{transform:E}),Ae=Z(i,"USE_PROFILES")?i.USE_PROFILES&&typeof i.USE_PROFILES=="object"?D(i.USE_PROFILES):i.USE_PROFILES:!1,Ro=i.ALLOW_ARIA_ATTR!==!1,St=i.ALLOW_DATA_ATTR!==!1,jo=i.ALLOW_UNKNOWN_PROTOCOLS||!1,Zo=i.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ae=i.SAFE_FOR_TEMPLATES||!1,le=i.SAFE_FOR_XML!==!1,ge=i.WHOLE_DOCUMENT||!1,Me=i.RETURN_DOM||!1,Je=i.RETURN_DOM_FRAGMENT||!1,et=i.RETURN_TRUSTED_TYPE||!1,Bt=i.FORCE_BODY||!1,Vo=i.SANITIZE_DOM!==!1,Io=i.SANITIZE_NAMED_PROPS||!1,Ht=i.KEEP_CONTENT!==!1,tt=i.IN_PLACE||!1,Bo=G0(i.ALLOWED_URI_REGEXP)?i.ALLOWED_URI_REGEXP:vr,Ce=typeof i.NAMESPACE=="string"?i.NAMESPACE:oe,It=Z(i,"MATHML_TEXT_INTEGRATION_POINTS")&&i.MATHML_TEXT_INTEGRATION_POINTS&&typeof i.MATHML_TEXT_INTEGRATION_POINTS=="object"?D(i.MATHML_TEXT_INTEGRATION_POINTS):_({},zo),Pt=Z(i,"HTML_INTEGRATION_POINTS")&&i.HTML_INTEGRATION_POINTS&&typeof i.HTML_INTEGRATION_POINTS=="object"?D(i.HTML_INTEGRATION_POINTS):_({},$o);let c=Z(i,"CUSTOM_ELEMENT_HANDLING")&&i.CUSTOM_ELEMENT_HANDLING&&typeof i.CUSTOM_ELEMENT_HANDLING=="object"?D(i.CUSTOM_ELEMENT_HANDLING):Be(null);if(H=Be(null),Z(c,"tagNameCheck")&&Uo(c.tagNameCheck)&&(H.tagNameCheck=c.tagNameCheck),Z(c,"attributeNameCheck")&&Uo(c.attributeNameCheck)&&(H.attributeNameCheck=c.attributeNameCheck),Z(c,"allowCustomizedBuiltInElements")&&typeof c.allowCustomizedBuiltInElements=="boolean"&&(H.allowCustomizedBuiltInElements=c.allowCustomizedBuiltInElements),O(H),ae&&(St=!1),Je&&(Me=!0),Ae&&(L=_({},pr),S=Be(null),Ae.html===!0&&(_(L,ur),_(S,wr)),Ae.svg===!0&&(_(L,Ft),_(S,qt),_(S,lt)),Ae.svgFilters===!0&&(_(L,Gt),_(S,qt),_(S,lt)),Ae.mathMl===!0&&(_(L,Wt),_(S,gr),_(S,lt))),se.tagCheck=null,se.attributeCheck=null,Z(i,"ADD_TAGS")&&(typeof i.ADD_TAGS=="function"?se.tagCheck=i.ADD_TAGS:de(i.ADD_TAGS)&&(L===Tt&&(L=D(L)),_(L,i.ADD_TAGS,E))),Z(i,"ADD_ATTR")&&(typeof i.ADD_ATTR=="function"?se.attributeCheck=i.ADD_ATTR:de(i.ADD_ATTR)&&(S===Lt&&(S=D(S)),_(S,i.ADD_ATTR,E))),Z(i,"ADD_URI_SAFE_ATTR")&&de(i.ADD_URI_SAFE_ATTR)&&_(jt,i.ADD_URI_SAFE_ATTR,E),Z(i,"FORBID_CONTENTS")&&de(i.FORBID_CONTENTS)&&(te===Rt&&(te=D(te)),_(te,i.FORBID_CONTENTS,E)),Z(i,"ADD_FORBID_CONTENTS")&&de(i.ADD_FORBID_CONTENTS)&&(te===Rt&&(te=D(te)),_(te,i.ADD_FORBID_CONTENTS,E)),Ht&&(L["#text"]=!0),ge&&_(L,["html","head","body"]),L.table&&(_(L,["tbody"]),delete Ie.tbody),i.TRUSTED_TYPES_POLICY){if(typeof i.TRUSTED_TYPES_POLICY.createHTML!="function")throw me('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof i.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw me('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let d=U;U=i.TRUSTED_TYPES_POLICY;try{we=ye("")}catch(w){throw U=d,w}}else i.TRUSTED_TYPES_POLICY===null?(U=void 0,we=""):(U===void 0&&(U=e0()),U&&typeof we=="string"&&(we=ye("")));P&&P(i),Te=i},Fo=_({},[...Ft,...Gt,...W0]),Go=_({},[...Wt,...q0]),v0=function(i,c,d){return c.namespaceURI===oe?i==="svg":c.namespaceURI===ot?i==="svg"&&(d==="annotation-xml"||It[d]):!!Fo[i]},m0=function(i,c,d){return c.namespaceURI===oe?i==="math":c.namespaceURI===rt?i==="math"&&Pt[d]:!!Go[i]},k0=function(i,c,d){return c.namespaceURI===rt&&!Pt[d]||c.namespaceURI===ot&&!It[d]?!1:!Go[i]&&(u0[i]||!Fo[i])},f0=function(i){let c=J(i);(!c||!c.tagName)&&(c={namespaceURI:Ce,tagName:"template"});let d=$e(i.tagName),w=$e(c.tagName);return Vt[i.namespaceURI]?i.namespaceURI===rt?v0(d,c,w):i.namespaceURI===ot?m0(d,c,w):i.namespaceURI===oe?k0(d,c,w):!!(Pe==="application/xhtml+xml"&&Vt[i.namespaceURI]):!1},ce=function(i){Ee(e.removed,{element:i});try{J(i).removeChild(i)}catch{if(y(i),!J(i))throw me("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},nt=function(i){Oe(i);let c=Y(i);if(c){let w=[];Se(c,g=>{Ee(w,g)}),Se(w,g=>{try{y(g)}catch{}})}let d=Ze(i);if(d)for(let w=d.length-1;w>=0;--w){let g=d[w],f=g&&g.name;if(typeof f=="string")try{i.removeAttribute(f)}catch{}}},ve=function(i,c){try{Ee(e.removed,{attribute:c.getAttributeNode(i),from:c})}catch{Ee(e.removed,{attribute:null,from:c})}if(c.removeAttribute(i),i==="is")if(Me||Je)try{ce(c)}catch{}else try{c.setAttribute(i,"")}catch{}},x0=function(i){let c=Ze(i);if(c)for(let d=c.length-1;d>=0;--d){let w=c[d],g=w&&w.name;if(!(typeof g!="string"||S[E(g)]))try{i.removeAttribute(g)}catch{}}},Oe=function(i){let c=[i];for(;c.length>0;){let d=c.pop();(I?I(d):d.nodeType)===W.element&&x0(d);let g=Y(d);if(g)for(let f=g.length-1;f>=0;--f)c.push(g[f])}},_0=function(i){if(!le)return;let c=[i];for(;c.length>0;){let d=c.pop(),w=I?I(d):d.nodeType;if(w===W.processingInstruction||w===W.comment&&j(kr,d.data)){try{y(d)}catch{}continue}if(w===W.element){let f=d,A=E($?$(d):d.nodeName);try{f.hasAttribute&&f.hasAttribute("patchsrc")&&f.removeAttribute("patchsrc"),f.hasAttribute&&f.hasAttribute("for")&&A!=="label"&&A!=="output"&&f.removeAttribute("for")}catch{}}let g=Y(d);if(g)for(let f=g.length-1;f>=0;--f)c.push(g[f])}},Wo=function(i){let c=null,d=null;if(Bt)i="<remove></remove>"+i;else{let f=lr(i,/^[\r\n\t ]+/);d=f&&f[0]}Pe==="application/xhtml+xml"&&Ce===oe&&(i='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+i+"</body></html>");let w=U?ye(i):i;if(Ce===oe)try{c=new m().parseFromString(w,Pe)}catch{}if(!c||!c.documentElement){c=Ct.createDocument(Ce,"template",null);try{c.documentElement.innerHTML=Zt?we:w}catch{}}let g=c.body||c.documentElement;return i&&d&&g.insertBefore(t.createTextNode(d),g.childNodes[0]||null),Ce===oe?o0.call(c,ge?"html":"body")[0]:ge?c.documentElement:g},qo=function(i){let c=ee?ee(i):i.ownerDocument;return So.call(c||i,i,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},it=function(i){return i=Ne(i,n0," "),i=Ne(i,i0," "),i=Ne(i,s0," "),i},Dt=function(i){var c;i.normalize();let d=ee?ee(i):i.ownerDocument,w=So.call(d||i,i,h.SHOW_TEXT|h.SHOW_COMMENT|h.SHOW_CDATA_SECTION|h.SHOW_PROCESSING_INSTRUCTION,null),g=w.nextNode();for(;g;)g.data=it(g.data),g=w.nextNode();let f=(c=i.querySelectorAll)===null||c===void 0?void 0:c.call(i,"template");f&&Se(f,A=>{Le(A.content)&&Dt(A.content)})},st=function(i){let c=$?$(i):null;return typeof c!="string"||E(c)!=="form"?!1:typeof i.nodeName!="string"||typeof i.textContent!="string"||typeof i.removeChild!="function"||i.attributes!==Ze(i)||typeof i.removeAttribute!="function"||typeof i.setAttribute!="function"||typeof i.namespaceURI!="string"||typeof i.insertBefore!="function"||typeof i.hasChildNodes!="function"||i.nodeType!==I(i)||i.childNodes!==Y(i)},Le=function(i){if(!I||typeof i!="object"||i===null)return!1;try{return I(i)===W.documentFragment}catch{return!1}},De=function(i){if(!I||typeof i!="object"||i===null)return!1;try{return typeof I(i)=="number"}catch{return!1}};function re(u,i,c){u.length!==0&&Se(u,d=>{d.call(e,i,c,Te)})}let b0=function(i,c){return!!(le&&i.hasChildNodes()&&!De(i.firstElementChild)&&j(mr,i.textContent)&&j(mr,i.innerHTML)||le&&i.namespaceURI===oe&&c==="style"&&De(i.firstElementChild)||i.nodeType===W.processingInstruction||le&&i.nodeType===W.comment&&j(kr,i.data))},y0=function(i,c,d){if(!Ie[c]&&Qo(c)&&(H.tagNameCheck instanceof RegExp&&j(H.tagNameCheck,c)||H.tagNameCheck instanceof Function&&H.tagNameCheck(c)))return!1;if(Ht&&!te[c]){let w=J(i),g=Y(i);if(g&&w){let f=g.length;for(let A=f-1;A>=0;--A){let B=i===d?V(g[A],!0):g[A];w.insertBefore(B,q(i))}}}return ce(i),!0},Yo=function(i,c,d,w){return i.length===0?c:c===d||c===w?D(c):c},Ko=function(i,c){if(re(T.beforeSanitizeElements,i,null),i!==c&&J(i)===null)return tt&&Oe(i),!0;if(st(i))return ce(i),!0;let d=E($?$(i):i.nodeName);if(L=Yo(T.uponSanitizeElement,L,Tt,Xe),re(T.uponSanitizeElement,i,{tagName:d,allowedTags:L}),i!==c&&J(i)===null)return tt&&Oe(i),!0;if(b0(i,d))return ce(i),!0;if(Ie[d]||!(se.tagCheck instanceof Function&&se.tagCheck(d))&&!L[d]){let g=y0(i,d,c);return g===!1&&re(T.afterSanitizeElements,i,null),g}if((I?I(i):i.nodeType)===W.element&&!f0(i)||(d==="noscript"||d==="noembed"||d==="noframes")&&j(n1,i.innerHTML))return ce(i),!0;if(ae&&i.nodeType===W.text){let g=it(i.textContent);i.textContent!==g&&(Ee(e.removed,{element:i.cloneNode()}),i.textContent=g)}return re(T.afterSanitizeElements,i,null),!1},Xo=function(i,c,d){if(Ho[c]||le&&c==="patchsrc"||le&&c==="for"&&i!=="label"&&i!=="output"||Vo&&(c==="id"||c==="name")&&(d in t||d in g0))return!1;let w=S[c]||se.attributeCheck instanceof Function&&se.attributeCheck(c,i);if(!(St&&j(a0,c))){if(!(Ro&&j(l0,c))){if(w){if(!jt[c]){if(!j(Bo,Ne(d,Eo,""))){if(!((c==="src"||c==="xlink:href"||c==="href")&&i!=="script"&&cr(d,"data:")===0&&Oo[i])){if(!(jo&&!j(c0,Ne(d,Eo,"")))){if(d)return!1}}}}}else if(!(Qo(i)&&(H.tagNameCheck instanceof RegExp&&j(H.tagNameCheck,i)||H.tagNameCheck instanceof Function&&H.tagNameCheck(i))&&(H.attributeNameCheck instanceof RegExp&&j(H.attributeNameCheck,c)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(c,i))||c==="is"&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&j(H.tagNameCheck,d)||H.tagNameCheck instanceof Function&&H.tagNameCheck(d))))return!1}}return!0},M0=_({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Qo=function(i){return!M0[$e(i)]&&j(h0,i)},A0=function(i,c,d,w){if(U&&typeof v=="object"&&typeof v.getAttributeType=="function"&&!d)switch(v.getAttributeType(i,c)){case"TrustedHTML":return ye(w);case"TrustedScriptURL":return Jn(w)}return w},C0=function(i,c,d,w){try{d?i.setAttributeNS(d,c,w):i.setAttribute(c,w),st(i)?ce(i):ar(e.removed)}catch{ve(c,i)}},Jo=function(i){re(T.beforeSanitizeAttributes,i,null);let c=i.attributes;if(!c||st(i))return;S=Yo(T.uponSanitizeAttribute,S,Lt,Qe);let d={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:S,forceKeepAttr:void 0},w=c.length,g=E(i.nodeName);for(;w--;){let f=c[w],A=f.name,B=f.namespaceURI,F=f.value,G=E(A),zt=F,z=A==="value"?zt:D0(zt);if(d.attrName=G,d.attrValue=z,d.keepAttr=!0,d.forceKeepAttr=void 0,re(T.uponSanitizeAttribute,i,d),z=d.attrValue,Io&&(G==="id"||G==="name")&&cr(z,Po)!==0&&(ve(A,i),z=Po+z),le&&j(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,z)){ve(A,i);continue}if(G==="attributename"&&lr(z,"href")){ve(A,i);continue}if(!d.forceKeepAttr){if(!d.keepAttr){ve(A,i);continue}if(!Zo&&j(i1,z)){ve(A,i);continue}if(ae&&(z=it(z)),!Xo(g,G,z)){ve(A,i);continue}z=A0(g,G,B,z),z!==zt&&C0(i,A,B,z)}}re(T.afterSanitizeAttributes,i,null)},at=function(i){let c=null,d=qo(i);for(re(T.beforeSanitizeShadowDOM,i,null);c=d.nextNode();)if(re(T.uponSanitizeShadowNode,c,null),Ko(c,i),Jo(c),Le(c.content)&&at(c.content),(I?I(c):c.nodeType)===W.element){let g=je(c);Le(g)&&(Nt(g),at(g))}re(T.afterSanitizeShadowDOM,i,null)},Nt=function(i){let c=[{node:i,shadow:null}];for(;c.length>0;){let d=c.pop();if(d.shadow){at(d.shadow);continue}let w=d.node,f=(I?I(w):w.nodeType)===W.element,A=Y(w);if(A)for(let B=A.length-1;B>=0;--B)c.push({node:A[B],shadow:null});if(f){let B=$?$(w):null;if(typeof B=="string"&&E(B)==="template"){let F=w.content;Le(F)&&c.push({node:F,shadow:null})}}if(f){let B=je(w);Le(B)&&c.push({node:null,shadow:B},{node:B,shadow:null})}}};return e.sanitize=function(u){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=null,d=null,w=null,g=null;if(Zt=!u,Zt&&(u="<!-->"),typeof u!="string"&&!De(u)&&(u=F0(u),typeof u!="string"))throw me("dirty is not a string, aborting");if(!e.isSupported)return u;Et?(L=Xe,S=Qe):Ot(i),(T.uponSanitizeElement.length>0||T.uponSanitizeAttribute.length>0)&&(L=D(L)),T.uponSanitizeAttribute.length>0&&(S=D(S)),e.removed=[];let f=tt&&typeof u!="string"&&De(u);if(f){_0(u);let F=$?$(u):u.nodeName;if(typeof F=="string"){let G=E(F);if(!L[G]||Ie[G])throw nt(u),me("root node is forbidden and cannot be sanitized in-place")}if(st(u))throw nt(u),me("root node is clobbered and cannot be sanitized in-place");try{Nt(u)}catch(G){throw nt(u),G}}else if(De(u))c=Wo("<!---->"),d=c.ownerDocument.importNode(u,!0),d.nodeType===W.element&&d.nodeName==="BODY"||d.nodeName==="HTML"?c=d:c.appendChild(d),Nt(d);else{if(!Me&&!ae&&!ge&&u.indexOf("<")===-1)return U&&et?ye(u):u;if(c=Wo(u),!c)return Me?null:et?we:""}c&&Bt&&ce(c.firstChild);let A=f?u:c;try{let F=qo(A);for(;w=F.nextNode();)Ko(w,A),Jo(w),Le(w.content)&&at(w.content)}catch(F){throw f&&(nt(u),Se(e.removed,G=>{G.element&&Oe(G.element)})),F}if(f)return Se(e.removed,F=>{F.element&&Oe(F.element)}),ae&&Dt(u),u;if(Me){if(ae&&Dt(c),Je)for(g=t0.call(c.ownerDocument);c.firstChild;)g.appendChild(c.firstChild);else g=c;return(S.shadowroot||S.shadowrootmode)&&(g=r0.call(r,g,!0)),g}let B=ge?c.outerHTML:c.innerHTML;return ge&&L["!doctype"]&&c.ownerDocument&&c.ownerDocument.doctype&&c.ownerDocument.doctype.name&&j(o1,c.ownerDocument.doctype.name)&&(B="<!DOCTYPE "+c.ownerDocument.doctype.name+`>
4
+ `+B),ae&&(B=it(B)),U&&et?ye(B):B},e.setConfig=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ot(u),Et=!0,Xe=L,Qe=S},e.clearConfig=function(){Te=null,Et=!1,Xe=null,Qe=null,U=At,we=""},e.isValidAttribute=function(u,i,c){Te||Ot({});let d=E(u),w=E(i);return Xo(d,w,c)},e.addHook=function(u,i){typeof i=="function"&&Z(T,u)&&Ee(T[u],i)},e.removeHook=function(u,i){if(Z(T,u)){if(i!==void 0){let c=P0(T[u],i);return c===-1?void 0:O0(T[u],c,1)[0]}return ar(T[u])}},e.removeHooks=function(u){Z(T,u)&&(T[u]=[])},e.removeAllHooks=function(){T=fr()},e}var ct=br();var yr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"></path></svg>';var Mr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"></path></svg>';var Ar='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"></path></svg>';var Cr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"></path></svg>';var Tr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"></path></svg>',Lr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"></path></svg>';var Sr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M3 7.5 7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"></path></svg>';var Xt='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"></path></svg>';var Qt='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5"></path></svg>';var Er='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"></path></svg>',Br='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"></path></svg>';var Hr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5"></path></svg>';var Rr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"></path></svg>';var jr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"></path></svg>';var Zr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"></path></svg>';var Vr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M6.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM12.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM18.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"></path></svg>';var Ir='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"></path></svg>';var Pr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"></path></svg>';var Or='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"></path></svg>';var Dr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"></path></svg>',Nr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"></path></svg>';var zr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"></path></svg>';var $r='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M5 12h14"></path></svg>',Ur='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"></path></svg>';var Fr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"></path></svg>';var Gr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"></path></svg>';var Wr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z"></path></svg>';var qr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"></path></svg>';var Yr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 0 1-1.125-1.125v-3.75ZM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-8.25ZM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-2.25Z"></path></svg>';var Kr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"></path></svg>';var Xr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"></path></svg>';var Qr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z"></path></svg>';var Jr='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"></path></svg>',en='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-slot="icon" style="stroke-width:var(--ng-icon__stroke-width, 1.5)"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"></path></svg>';var tn={themeLight:Kr,themeDark:Ur,themeSystem:jr,chevronsLeft:Er,chevronsRight:Br,chevronDown:Hr,check:Qt,close:en,pin:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M8 4h8M10.5 4v7M13.5 4v7M7 11h10M12 11v9"/></svg>',save:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M17 3.75H5.25a1.5 1.5 0 0 0-1.5 1.5v13.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5V7l-3.25-3.25Z"/><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 3.75v4.5h6.5v-4.5M7.75 20.25v-7h8.5v7"/></svg>',splitPanes:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M4 5.25h16a.75.75 0 0 1 .75.75v12a.75.75 0 0 1-.75.75H4a.75.75 0 0 1-.75-.75V6a.75.75 0 0 1 .75-.75ZM12 5.25v13.5"/></svg>',splitPanesDown:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M4 5.25h16a.75.75 0 0 1 .75.75v12a.75.75 0 0 1-.75.75H4a.75.75 0 0 1-.75-.75V6a.75.75 0 0 1 .75-.75ZM3.25 12h17.5"/></svg>',sidebarLeftOpen:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path fill="currentColor" fill-opacity=".28" stroke="none" d="M3.75 3H9v18H3.75a.75.75 0 0 1-.75-.75V3.75A.75.75 0 0 1 3.75 3Z"/><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3h16.5a.75.75 0 0 1 .75.75v16.5a.75.75 0 0 1-.75.75H3.75a.75.75 0 0 1-.75-.75V3.75A.75.75 0 0 1 3.75 3ZM9 3v18"/></svg>',sidebarLeftClosed:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3h16.5a.75.75 0 0 1 .75.75v16.5a.75.75 0 0 1-.75.75H3.75a.75.75 0 0 1-.75-.75V3.75A.75.75 0 0 1 3.75 3ZM9 3v18"/></svg>',sidebarRightOpen:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path fill="currentColor" fill-opacity=".28" stroke="none" d="M15 3h5.25a.75.75 0 0 1 .75.75v16.5a.75.75 0 0 1-.75.75H15V3Z"/><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3h16.5a.75.75 0 0 1 .75.75v16.5a.75.75 0 0 1-.75.75H3.75a.75.75 0 0 1-.75-.75V3.75A.75.75 0 0 1 3.75 3ZM15 3v18"/></svg>',sidebarRightClosed:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3h16.5a.75.75 0 0 1 .75.75v16.5a.75.75 0 0 1-.75.75H3.75a.75.75 0 0 1-.75-.75V3.75A.75.75 0 0 1 3.75 3ZM15 3v18"/></svg>',workspaces:Yr,menu:Xt,more:Vr,document:Zr,openWork:Qr,navigator:Xt,outline:Dr,add:Gr,edit:Fr,trash:Xr,preview:Pr,sort:Sr,reset:Mr,undo:Cr,info:Or,lock:Nr,success:Qt,warning:Ir,error:Jr,settings:Rr,help:qr,search:zr,plugin:Wr,download:yr,maximize:Lr,popout:Ar,restore:Tr,minimize:$r};var ht=new Map(Object.entries(tn));function on(o){return ht.get(o)}function rn(o){return ht.has(o)}function Jt(o){return ct.sanitize(o,{USE_PROFILES:{svg:!0,svgFilters:!0}})}function eo(o,e){ht.set(o,e)}function nn(o){ht.delete(o)}var ue="lw-icon",l1="1.25rem",to=class extends HTMLElement{static observedAttributes=["name","size","aria-label"];get name(){return this.getAttribute("name")??""}set name(e){C(this,"name",e)}get size(){return this.getAttribute("size")??l1}set size(e){C(this,"size",e)}connectedCallback(){b(this,"name"),b(this,"size"),this.render()}attributeChangedCallback(){this.refresh()}refresh(){this.isConnected&&this.render()}render(){this.innerHTML=on(this.name)??"";let e=this.querySelector("svg");e&&(e.setAttribute("width",this.size),e.setAttribute("height",this.size)),this.getAttribute("aria-label")?(this.setAttribute("role","img"),this.removeAttribute("aria-hidden")):(this.setAttribute("aria-hidden","true"),this.removeAttribute("role"))}};function sn(){typeof customElements<"u"&&!customElements.get(ue)&&customElements.define(ue,to)}function io(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var xe=io();function wn(o){xe=o}var ke={exec:()=>null};function He(o){let e=[];return t=>{let r=Math.max(0,Math.min(3,t-1)),n=e[r];return n||(n=o(r),e[r]=n),n}}function x(o,e=""){let t=typeof o=="string"?o:o.source,r={replace:(n,s)=>{let l=typeof s=="string"?s:s.source;return l=l.replace(N.caret,"$1"),t=t.replace(n,l),r},getRegex:()=>new RegExp(t,e)};return r}var c1=((o="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+o)}catch{return!1}})(),N={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:o=>new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:He(o=>new RegExp(`^ {0,${o}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:He(o=>new RegExp(`^ {0,${o}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:He(o=>new RegExp(`^ {0,${o}}(?:\`\`\`|~~~)`)),headingBeginRegex:He(o=>new RegExp(`^ {0,${o}}#`)),htmlBeginRegex:He(o=>new RegExp(`^ {0,${o}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:He(o=>new RegExp(`^ {0,${o}}>`))},h1=/^(?:[ \t]*(?:\n|$))+/,d1=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,u1=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ge=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,p1=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,so=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,gn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,vn=x(gn).replace(/bull/g,so).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),w1=x(gn).replace(/bull/g,so).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ao=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,g1=/^[^\n]+/,lo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,v1=x(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",lo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),m1=x(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,so).getRegex(),gt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",co=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,k1=x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",co).replace("tag",gt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),mn=o=>x(ao).replace("hr",Ge).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list",o).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",gt).getRegex(),f1=mn(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),x1=mn(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),_1=x(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",x1).getRegex(),ho={blockquote:_1,code:d1,def:v1,fences:u1,heading:p1,hr:Ge,html:k1,lheading:vn,list:m1,newline:h1,paragraph:f1,table:ke,text:g1},an=x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ge).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",gt).getRegex(),b1={...ho,lheading:w1,table:an,paragraph:x(ao).replace("hr",Ge).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",an).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",gt).getRegex()},y1={...ho,html:x(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",co).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ke,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:x(ao).replace("hr",Ge).replace("heading",` *#{1,6} *[^
5
+ ]`).replace("lheading",vn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},M1=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,A1=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,kn=/^( {2,}|\\)\n(?!\s*$)/,C1=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ie=/[\p{P}\p{S}]/u,Re=/[\s\p{P}\p{S}]/u,We=/[^\s\p{P}\p{S}]/u,T1=x(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Re).getRegex(),L1=/[\p{Pi}\p{Ps}"']/u,fn=/(?!~)[\p{P}\p{S}]/u,S1=/(?!~)[\s\p{P}\p{S}]/u,E1=/(?:[^\s\p{P}\p{S}]|~)/u,B1=x(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",c1?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),xn=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,H1=x(xn,"u").replace(/punct/g,ie).getRegex(),R1=x(xn,"u").replace(/punct/g,fn).getRegex(),j1=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Z1=x(j1,"u").replace(/openQuote/g,L1).replace(/punct/g,ie).getRegex(),_n="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",V1=x(_n,"gu").replace(/notPunctSpace/g,We).replace(/punctSpace/g,Re).replace(/punct/g,ie).getRegex(),I1=x(_n,"gu").replace(/notPunctSpace/g,E1).replace(/punctSpace/g,S1).replace(/punct/g,fn).getRegex(),P1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",O1=x(P1,"gu").replace(/notPunctSpace/g,We).replace(/punctSpace/g,Re).replace(/punct/g,ie).getRegex(),D1=x("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,We).replace(/punctSpace/g,Re).replace(/punct/g,ie).getRegex(),N1="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",z1=x(N1,"gu").replace(/notPunctSpace/g,We).replace(/punctSpace/g,Re).replace(/punct/g,ie).getRegex(),$1=x(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ie).getRegex(),U1="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",F1=x(U1,"gu").replace(/notPunctSpace/g,We).replace(/punctSpace/g,Re).replace(/punct/g,ie).getRegex(),G1=x(/\\(punct)/,"gu").replace(/punct/g,ie).getRegex(),W1=x(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),q1=x(co).replace("(?:-->|$)","-->").getRegex(),Y1=x("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",q1).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ut=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,K1=x(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",ut).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),bn=x(/^!?\[(label)\]\[(ref)\]/).replace("label",ut).replace("ref",lo).getRegex(),yn=x(/^!?\[(ref)\](?:\[\])?/).replace("ref",lo).getRegex(),X1=x("reflink|nolink(?!\\()","g").replace("reflink",bn).replace("nolink",yn).getRegex(),ln=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,uo={_backpedal:ke,anyPunctuation:G1,autolink:W1,blockSkip:B1,br:kn,code:A1,del:ke,delLDelim:ke,delRDelim:ke,emStrongLDelim:H1,emStrongRDelimAst:V1,emStrongRDelimUnd:D1,escape:M1,link:K1,nolink:yn,punctuation:T1,reflink:bn,reflinkSearch:X1,tag:Y1,text:C1,url:ke},Q1={...uo,emStrongLDelim:Z1,emStrongRDelimAst:O1,emStrongRDelimUnd:z1,link:x(/^!?\[(label)\]\((.*?)\)/).replace("label",ut).getRegex(),reflink:x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ut).getRegex()},oo={...uo,emStrongRDelimAst:I1,emStrongLDelim:R1,delLDelim:$1,delRDelim:F1,url:x(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ln).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:x(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ln).getRegex()},J1={...oo,br:x(kn).replace("{2,}","*").getRegex(),text:x(oo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},dt={normal:ho,gfm:b1,pedantic:y1},Ue={normal:uo,gfm:oo,breaks:J1,pedantic:Q1},e5={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},cn=o=>e5[o];function ne(o,e){if(e){if(N.escapeTest.test(o))return o.replace(N.escapeReplace,cn)}else if(N.escapeTestNoEncode.test(o))return o.replace(N.escapeReplaceNoEncode,cn);return o}function hn(o){try{o=encodeURI(o).replace(N.percentDecode,"%")}catch{return null}return o}function dn(o,e){let t=o.replace(N.findPipe,(s,l,a)=>{let h=!1,p=l;for(;--p>=0&&a[p]==="\\";)h=!h;return h?"|":" |"}),r=t.split(N.splitPipe),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(N.slashPipe,"|");return r}function pe(o,e,t){let r=o.length;if(r===0)return"";let n=0;for(;n<r;){let s=o.charAt(r-n-1);if(s===e&&!t)n++;else if(s!==e&&t)n++;else break}return o.slice(0,r-n)}function un(o){let e=o.split(`
6
+ `),t=e.length-1;for(;t>=0&&N.blankLine.test(e[t]);)t--;return e.length-t<=2?o:e.slice(0,t+1).join(`
7
+ `)}function t5(o,e){if(o.indexOf(e[1])===-1)return-1;let t=0;for(let r=0;r<o.length;r++)if(o[r]==="\\")r++;else if(o[r]===e[0])t++;else if(o[r]===e[1]&&(t--,t<0))return r;return t>0?-2:-1}function o5(o,e=0){let t=e,r="";for(let n of o)if(n===" "){let s=4-t%4;r+=" ".repeat(s),t+=s}else r+=n,t++;return r}function pn(o,e,t,r,n){let s=e.href,l=e.title||null,a=o[1].replace(n.other.outputLinkReplace,"$1");r.state.inLink=!0;let h={type:o[0].charAt(0)==="!"?"image":"link",raw:t,href:s,title:l,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,h}function r5(o,e,t){let r=o.match(t.other.indentCodeCompensation);if(r===null)return e;let n=r[1];return e.split(`
8
+ `).map(s=>{let l=s.match(t.other.beginningSpace);if(l===null)return s;let[a]=l;return a.length>=n.length?s.slice(n.length):s}).join(`
9
+ `)}var pt=class{options;rules;lexer;constructor(o){this.options=o||xe}space(o){let e=this.rules.block.newline.exec(o);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(o){let e=this.rules.block.code.exec(o);if(e){let t=this.options.pedantic?e[0]:un(e[0]),r=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:r}}}fences(o){let e=this.rules.block.fences.exec(o);if(e){let t=e[0],r=r5(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(o){let e=this.rules.block.heading.exec(o);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let r=pe(t,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(t=r.trim())}return{type:"heading",raw:pe(e[0],`
10
+ `),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(o){let e=this.rules.block.hr.exec(o);if(e)return{type:"hr",raw:pe(e[0],`
11
+ `)}}blockquote(o){let e=this.rules.block.blockquote.exec(o);if(e){let t=pe(e[0],`
12
12
  `).split(`
13
- `),r="",n="",s=[];for(;e.length>0;){let c=!1,a=[],d;for(d=0;d<e.length;d++)if(this.rules.other.blockquoteStart.test(e[d]))a.push(e[d]),c=!0;else if(!c)a.push(e[d]);else break;e=e.slice(d);let p=a.join(`
13
+ `),r="",n="",s=[];for(;t.length>0;){let l=!1,a=[],h;for(h=0;h<t.length;h++)if(this.rules.other.blockquoteStart.test(t[h]))a.push(t[h]),l=!0;else if(!l)a.push(t[h]);else break;t=t.slice(h);let p=a.join(`
14
14
  `),m=p.replace(this.rules.other.blockquoteSetextReplace,`
15
15
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
16
16
  ${p}`:p,n=n?`${n}
17
- ${m}`:m;let v=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,s,!0),this.lexer.state.top=v,e.length===0)break;let k=s.at(-1);if(k?.type==="code")break;if(k?.type==="blockquote"){let V=k,M=e.join(`
17
+ ${m}`:m;let v=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,s,!0),this.lexer.state.top=v,t.length===0)break;let k=s.at(-1);if(k?.type==="code")break;if(k?.type==="blockquote"){let V=k,y=t.join(`
18
18
  `),q=V.raw+`
19
- `+M.replace(this.rules.other.blockquoteSetextReplace2,""),Y=this.blockquote(q);s[s.length-1]=Y,r=`${r}
20
- ${M}`,n=n.substring(0,n.length-V.text.length)+Y.text;break}else if(k?.type==="list"){let V=k,M=V.raw+`
21
- `+e.join(`
22
- `),q=this.list(M);s[s.length-1]=q,r=r.substring(0,r.length-k.raw.length)+q.raw,n=n.substring(0,n.length-V.raw.length)+q.raw,e=M.substring(s.at(-1).raw.length).split(`
23
- `);continue}}return{type:"blockquote",raw:r,tokens:s,text:n}}}list(o){let t=this.rules.block.list.exec(o);if(t){let e=t[1].trim(),r=e.length>1,n={type:"list",raw:"",ordered:r,start:r?+e.slice(0,-1):"",loose:!1,items:[]};e=r?`\\d{1,9}\\${e.slice(-1)}`:`\\${e}`,this.options.pedantic&&(e=r?e:"[*+-]");let s=this.rules.other.listItemRegex(e),c=!1;for(;o;){let d=!1,p="",m="";if(!(t=s.exec(o))||this.rules.block.hr.test(o))break;p=t[0],o=o.substring(p.length);let v=q1(t[2].split(`
24
- `,1)[0],t[1].length),k=o.split(`
25
- `,1)[0],V=!v.trim(),M=0;if(this.options.pedantic?(M=2,m=v.trimStart()):V?M=t[1].length+1:(M=v.search(this.rules.other.nonSpaceChar),M=M>4?1:M,m=v.slice(M),M+=t[1].length),V&&this.rules.other.blankLine.test(k)&&(p+=k+`
26
- `,o=o.substring(k.length+1),d=!0),!d){let q=this.rules.other.nextBulletRegex(M),Y=this.rules.other.hrRegex(M),J=this.rules.other.fencesBeginRegex(M),jt=this.rules.other.headingBeginRegex(M),Zt=this.rules.other.htmlBeginRegex(M),I=this.rules.other.blockquoteBeginRegex(M);for(;o;){let $=o.split(`
27
- `,1)[0],tt;if(k=$,this.options.pedantic?(k=k.replace(this.rules.other.listReplaceNesting," "),tt=k):tt=k.replace(this.rules.other.tabCharGlobal," "),J.test(k)||jt.test(k)||Zt.test(k)||I.test(k)||q.test(k)||Y.test(k))break;if(tt.search(this.rules.other.nonSpaceChar)>=M||!k.trim())m+=`
28
- `+tt.slice(M);else{if(V||v.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||J.test(v)||jt.test(v)||Y.test(v))break;m+=`
19
+ `+y.replace(this.rules.other.blockquoteSetextReplace2,""),Y=this.blockquote(q);s[s.length-1]=Y,r=`${r}
20
+ ${y}`,n=n.substring(0,n.length-V.text.length)+Y.text;break}else if(k?.type==="list"){let V=k,y=V.raw+`
21
+ `+t.join(`
22
+ `),q=this.list(y);s[s.length-1]=q,r=r.substring(0,r.length-k.raw.length)+q.raw,n=n.substring(0,n.length-V.raw.length)+q.raw,t=y.substring(s.at(-1).raw.length).split(`
23
+ `);continue}}return{type:"blockquote",raw:r,tokens:s,text:n}}}list(o){let e=this.rules.block.list.exec(o);if(e){let t=e[1].trim(),r=t.length>1,n={type:"list",raw:"",ordered:r,start:r?+t.slice(0,-1):"",loose:!1,items:[]};t=r?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=r?t:"[*+-]");let s=this.rules.other.listItemRegex(t),l=!1;for(;o;){let h=!1,p="",m="";if(!(e=s.exec(o))||this.rules.block.hr.test(o))break;p=e[0],o=o.substring(p.length);let v=o5(e[2].split(`
24
+ `,1)[0],e[1].length),k=o.split(`
25
+ `,1)[0],V=!v.trim(),y=0;if(this.options.pedantic?(y=2,m=v.trimStart()):V?y=e[1].length+1:(y=v.search(this.rules.other.nonSpaceChar),y=y>4?1:y,m=v.slice(y),y+=e[1].length),V&&this.rules.other.blankLine.test(k)&&(p+=k+`
26
+ `,o=o.substring(k.length+1),h=!0),!h){let q=this.rules.other.nextBulletRegex(y),Y=this.rules.other.hrRegex(y),J=this.rules.other.fencesBeginRegex(y),je=this.rules.other.headingBeginRegex(y),Ze=this.rules.other.htmlBeginRegex(y),I=this.rules.other.blockquoteBeginRegex(y);for(;o;){let $=o.split(`
27
+ `,1)[0],ee;if(k=$,this.options.pedantic?(k=k.replace(this.rules.other.listReplaceNesting," "),ee=k):ee=k.replace(this.rules.other.tabCharGlobal," "),J.test(k)||je.test(k)||Ze.test(k)||I.test(k)||q.test(k)||Y.test(k))break;if(ee.search(this.rules.other.nonSpaceChar)>=y||!k.trim())m+=`
28
+ `+ee.slice(y);else{if(V||v.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||J.test(v)||je.test(v)||Y.test(v))break;m+=`
29
29
  `+k}V=!k.trim(),p+=$+`
30
- `,o=o.substring($.length+1),v=tt.slice(M)}}n.loose||(c?n.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(c=!0)),n.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(m),loose:!1,text:m,tokens:[]}),n.raw+=p}let a=n.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let d of n.items){this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]);let p=d.tokens[0];if(d.task&&(p?.type==="text"||p?.type==="paragraph")){d.text=d.text.replace(this.rules.other.listReplaceTask,""),p.raw=p.raw.replace(this.rules.other.listReplaceTask,""),p.text=p.text.replace(this.rules.other.listReplaceTask,"");for(let v=this.lexer.inlineQueue.length-1;v>=0;v--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[v].src)){this.lexer.inlineQueue[v].src=this.lexer.inlineQueue[v].src.replace(this.rules.other.listReplaceTask,"");break}let m=this.rules.other.listTaskCheckbox.exec(d.raw);if(m){let v={type:"checkbox",raw:m[0]+" ",checked:m[0]!=="[ ]"};d.checked=v.checked,n.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=v.raw+d.tokens[0].raw,d.tokens[0].text=v.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(v)):d.tokens.unshift({type:"paragraph",raw:v.raw,text:v.raw,tokens:[v]}):d.tokens.unshift(v)}}else d.task&&(d.task=!1);if(!n.loose){let m=d.tokens.filter(k=>k.type==="space"),v=m.length>0&&m.some(k=>this.rules.other.anyLine.test(k.raw));n.loose=v}}if(n.loose)for(let d of n.items){d.loose=!0;for(let p of d.tokens)p.type==="text"&&(p.type="paragraph")}return n}}html(o){let t=this.rules.block.html.exec(o);if(t){let e=cn(t[0]);return{type:"html",block:!0,raw:e,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:e}}}def(o){let t=this.rules.block.def.exec(o);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:pt(t[0],`
31
- `),href:r,title:n}}}table(o){let t=this.rules.block.table.exec(o);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let e=ln(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
32
- `):[],s={type:"table",raw:pt(t[0],`
33
- `),header:[],align:[],rows:[]};if(e.length===r.length){for(let c of r)this.rules.other.tableAlignRight.test(c)?s.align.push("right"):this.rules.other.tableAlignCenter.test(c)?s.align.push("center"):this.rules.other.tableAlignLeft.test(c)?s.align.push("left"):s.align.push(null);for(let c=0;c<e.length;c++)s.header.push({text:e[c],tokens:this.lexer.inline(e[c]),header:!0,align:s.align[c]});for(let c of n)s.rows.push(ln(c,s.header.length).map((a,d)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:s.align[d]})));return s}}lheading(o){let t=this.rules.block.lheading.exec(o);if(t){let e=t[1].trim();return{type:"heading",raw:pt(t[0],`
34
- `),depth:t[2].charAt(0)==="="?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(o){let t=this.rules.block.paragraph.exec(o);if(t){let e=t[1].charAt(t[1].length-1)===`
35
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(o){let t=this.rules.block.text.exec(o);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(o){let t=this.rules.inline.escape.exec(o);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(o){let t=this.rules.inline.tag.exec(o);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(o){let t=this.rules.inline.link.exec(o);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let s=pt(e.slice(0,-1),"\\");if((e.length-s.length)%2===0)return}else{let s=W1(t[2],"()");if(s===-2)return;if(s>-1){let c=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,c).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],n=s[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r=r.slice(1):r=r.slice(1,-1)),hn(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(o,t){let e;if((e=this.rules.inline.reflink.exec(o))||(e=this.rules.inline.nolink.exec(o))){let r=(e[2]||e[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[r.toLowerCase()];if(!n){let s=e[0].charAt(0);return{type:"text",raw:s,text:s}}return hn(e,n,e[0],this.lexer,this.rules)}}emStrong(o,t,e=""){let r=this.rules.inline.emStrongLDelim.exec(o);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&e.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!e||this.rules.inline.punctuation.exec(e))){let n=[...r[0]].length-1,s,c,a=n,d=0,p=r[0][0],m=e===p,v=p==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,t=t.slice(-1*o.length+n);(r=v.exec(t))!==null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(c=[...s].length,r[3]||r[4]){a+=c;continue}else if(r[5]||r[6]){if(n%3&&!((n+c)%3)){d+=c;continue}if(m)break}if(a-=c,a>0)continue;c=Math.min(c,c+a+d);let k=[...r[0]][0].length,V=o.slice(0,n+r.index+k+c);if(Math.min(n,c)%2){let q=V.slice(1,-1);return{type:"em",raw:V,text:q,tokens:this.lexer.inlineTokens(q)}}let M=V.slice(2,-2);return{type:"strong",raw:V,text:M,tokens:this.lexer.inlineTokens(M)}}}}codespan(o){let t=this.rules.inline.code.exec(o);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(o){let t=this.rules.inline.br.exec(o);if(t)return{type:"br",raw:t[0]}}del(o,t,e=""){let r=this.rules.inline.delLDelim.exec(o);if(r&&(!r[1]||!e||this.rules.inline.punctuation.exec(e))){let n=[...r[0]].length-1,s,c,a=n,d=this.rules.inline.delRDelim;for(d.lastIndex=0,t=t.slice(-1*o.length+n);(r=d.exec(t))!==null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s||(c=[...s].length,c!==n))continue;if(r[3]||r[4]){a+=c;continue}if(a-=c,a>0)continue;c=Math.min(c,c+a);let p=[...r[0]][0].length,m=o.slice(0,n+r.index+p+c),v=m.slice(n,-n);return{type:"del",raw:m,text:v,tokens:this.lexer.inlineTokens(v)}}}}autolink(o){let t=this.rules.inline.autolink.exec(o);if(t){let e,r;return t[2]==="@"?(e=t[1],r="mailto:"+e):(e=t[1],r=e),{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(o){let t;if(t=this.rules.inline.url.exec(o)){let e,r;if(t[2]==="@")e=t[0],r="mailto:"+e;else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0]);e=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(o){let t=this.rules.inline.text.exec(o);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},X=class ro{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||xt,this.options.tokenizer=this.options.tokenizer||new pe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:N,block:de.normal,inline:Ut.normal};this.options.pedantic?(e.block=de.pedantic,e.inline=Ut.pedantic):this.options.gfm&&(e.block=de.gfm,this.options.breaks?e.inline=Ut.breaks:e.inline=Ut.gfm),this.tokenizer.rules=e}static get rules(){return{block:de,inline:Ut}}static lex(t,e){return new ro(e).lex(t)}static lexInline(t,e){return new ro(e).inlineTokens(t)}lex(t){t=t.replace(N.carriageReturn,`
36
- `),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let r=this.inlineQueue[e];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(N.tabCharGlobal," ").replace(N.spaceLine,""));let n=1/0;for(;t;){if(t.length<n)n=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let s;if(this.options.extensions?.block?.some(a=>(s=a.call({lexer:this},t,e))?(t=t.substring(s.raw.length),e.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let a=e.at(-1);s.raw.length===1&&a!==void 0?a.raw+=`
37
- `:e.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let a=e.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
30
+ `,o=o.substring($.length+1),v=ee.slice(y)}}n.loose||(l?n.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(l=!0)),n.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(m),loose:!1,text:m,tokens:[]}),n.raw+=p}let a=n.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let h of n.items){this.lexer.state.top=!1,h.tokens=this.lexer.blockTokens(h.text,[]);let p=h.tokens[0];if(h.task&&(p?.type==="text"||p?.type==="paragraph")){h.text=h.text.replace(this.rules.other.listReplaceTask,""),p.raw=p.raw.replace(this.rules.other.listReplaceTask,""),p.text=p.text.replace(this.rules.other.listReplaceTask,"");for(let v=this.lexer.inlineQueue.length-1;v>=0;v--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[v].src)){this.lexer.inlineQueue[v].src=this.lexer.inlineQueue[v].src.replace(this.rules.other.listReplaceTask,"");break}let m=this.rules.other.listTaskCheckbox.exec(h.raw);if(m){let v={type:"checkbox",raw:m[0]+" ",checked:m[0]!=="[ ]"};h.checked=v.checked,n.loose?h.tokens[0]&&["paragraph","text"].includes(h.tokens[0].type)&&"tokens"in h.tokens[0]&&h.tokens[0].tokens?(h.tokens[0].raw=v.raw+h.tokens[0].raw,h.tokens[0].text=v.raw+h.tokens[0].text,h.tokens[0].tokens.unshift(v)):h.tokens.unshift({type:"paragraph",raw:v.raw,text:v.raw,tokens:[v]}):h.tokens.unshift(v)}}else h.task&&(h.task=!1);if(!n.loose){let m=h.tokens.filter(k=>k.type==="space"),v=m.length>0&&m.some(k=>this.rules.other.anyLine.test(k.raw));n.loose=v}}if(n.loose)for(let h of n.items){h.loose=!0;for(let p of h.tokens)p.type==="text"&&(p.type="paragraph")}return n}}html(o){let e=this.rules.block.html.exec(o);if(e){let t=un(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(o){let e=this.rules.block.def.exec(o);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:pe(e[0],`
31
+ `),href:r,title:n}}}table(o){let e=this.rules.block.table.exec(o);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=dn(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
32
+ `):[],s={type:"table",raw:pe(e[0],`
33
+ `),header:[],align:[],rows:[]};if(t.length===r.length){for(let l of r)this.rules.other.tableAlignRight.test(l)?s.align.push("right"):this.rules.other.tableAlignCenter.test(l)?s.align.push("center"):this.rules.other.tableAlignLeft.test(l)?s.align.push("left"):s.align.push(null);for(let l=0;l<t.length;l++)s.header.push({text:t[l],tokens:this.lexer.inline(t[l]),header:!0,align:s.align[l]});for(let l of n)s.rows.push(dn(l,s.header.length).map((a,h)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:s.align[h]})));return s}}lheading(o){let e=this.rules.block.lheading.exec(o);if(e){let t=e[1].trim();return{type:"heading",raw:pe(e[0],`
34
+ `),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(o){let e=this.rules.block.paragraph.exec(o);if(e){let t=e[1].charAt(e[1].length-1)===`
35
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(o){let e=this.rules.block.text.exec(o);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(o){let e=this.rules.inline.escape.exec(o);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(o){let e=this.rules.inline.tag.exec(o);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(o){let e=this.rules.inline.link.exec(o);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let s=pe(t.slice(0,-1),"\\");if((t.length-s.length)%2===0)return}else{let s=t5(e[2],"()");if(s===-2)return;if(s>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let r=e[2],n="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],n=s[3])}else n=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r=r.slice(1):r=r.slice(1,-1)),pn(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(o,e){let t;if((t=this.rules.inline.reflink.exec(o))||(t=this.rules.inline.nolink.exec(o))){let r=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[r.toLowerCase()];if(!n){let s=t[0].charAt(0);return{type:"text",raw:s,text:s}}return pn(t,n,t[0],this.lexer,this.rules)}}emStrong(o,e,t=""){let r=this.rules.inline.emStrongLDelim.exec(o);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!t||this.rules.inline.punctuation.exec(t))){let n=[...r[0]].length-1,s,l,a=n,h=0,p=r[0][0],m=t===p,v=p==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,e=e.slice(-1*o.length+n);(r=v.exec(e))!==null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(l=[...s].length,r[3]||r[4]){a+=l;continue}else if(r[5]||r[6]){if(n%3&&!((n+l)%3)){h+=l;continue}if(m)break}if(a-=l,a>0)continue;l=Math.min(l,l+a+h);let k=[...r[0]][0].length,V=o.slice(0,n+r.index+k+l);if(Math.min(n,l)%2){let q=V.slice(1,-1);return{type:"em",raw:V,text:q,tokens:this.lexer.inlineTokens(q)}}let y=V.slice(2,-2);return{type:"strong",raw:V,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(o){let e=this.rules.inline.code.exec(o);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(o){let e=this.rules.inline.br.exec(o);if(e)return{type:"br",raw:e[0]}}del(o,e,t=""){let r=this.rules.inline.delLDelim.exec(o);if(r&&(!r[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...r[0]].length-1,s,l,a=n,h=this.rules.inline.delRDelim;for(h.lastIndex=0,e=e.slice(-1*o.length+n);(r=h.exec(e))!==null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s||(l=[...s].length,l!==n))continue;if(r[3]||r[4]){a+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a);let p=[...r[0]][0].length,m=o.slice(0,n+r.index+p+l),v=m.slice(n,-n);return{type:"del",raw:m,text:v,tokens:this.lexer.inlineTokens(v)}}}}autolink(o){let e=this.rules.inline.autolink.exec(o);if(e){let t,r;return e[2]==="@"?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(o){let e;if(e=this.rules.inline.url.exec(o)){let t,r;if(e[2]==="@")t=e[0],r="mailto:"+t;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);t=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(o){let e=this.rules.inline.text.exec(o);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},X=class ro{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||xe,this.options.tokenizer=this.options.tokenizer||new pt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:N,block:dt.normal,inline:Ue.normal};this.options.pedantic?(t.block=dt.pedantic,t.inline=Ue.pedantic):this.options.gfm&&(t.block=dt.gfm,this.options.breaks?t.inline=Ue.breaks:t.inline=Ue.gfm),this.tokenizer.rules=t}static get rules(){return{block:dt,inline:Ue}}static lex(e,t){return new ro(t).lex(e)}static lexInline(e,t){return new ro(t).inlineTokens(e)}lex(e){e=e.replace(N.carriageReturn,`
36
+ `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let r=this.inlineQueue[t];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(N.tabCharGlobal," ").replace(N.spaceLine,""));let n=1/0;for(;e;){if(e.length<n)n=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let s;if(this.options.extensions?.block?.some(a=>(s=a.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let a=t.at(-1);s.raw.length===1&&a!==void 0?a.raw+=`
37
+ `:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
38
38
  `)?"":`
39
39
  `)+s.raw,a.text+=`
40
- `+s.text,this.inlineQueue.at(-1).src=a.text):e.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),e.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),e.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),e.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),e.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),e.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),e.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let a=e.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
40
+ `+s.text,this.inlineQueue.at(-1).src=a.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
41
41
  `)?"":`
42
42
  `)+s.raw,a.text+=`
43
- `+s.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},e.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),e.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),e.push(s);continue}let c=t;if(this.options.extensions?.startBlock){let a=1/0,d=t.slice(1),p;this.options.extensions.startBlock.forEach(m=>{p=m.call({lexer:this},d),typeof p=="number"&&p>=0&&(a=Math.min(a,p))}),a<1/0&&a>=0&&(c=t.substring(0,a+1))}if(this.state.top&&(s=this.tokenizer.paragraph(c))){let a=e.at(-1);r&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
43
+ `+s.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},t.push(s));continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let l=e;if(this.options.extensions?.startBlock){let a=1/0,h=e.slice(1),p;this.options.extensions.startBlock.forEach(m=>{p=m.call({lexer:this},h),typeof p=="number"&&p>=0&&(a=Math.min(a,p))}),a<1/0&&a>=0&&(l=e.substring(0,a+1))}if(this.state.top&&(s=this.tokenizer.paragraph(l))){let a=t.at(-1);r&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
44
44
  `)?"":`
45
45
  `)+s.raw,a.text+=`
46
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(s),r=c.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let a=e.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
46
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(s),r=l.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let a=t.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
47
47
  `)?"":`
48
48
  `)+s.raw,a.text+=`
49
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(s);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){this.tokenizer.lexer=this;let r=t;if(this.tokens.links){let a=Object.keys(this.tokens.links);a.length>0&&(r=r.replace(this.tokenizer.rules.inline.reflinkSearch,d=>a.includes(d.slice(d.lastIndexOf("[")+1,-1))?"["+"a".repeat(d.length-2)+"]":d))}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,"++"),r=r.replace(this.tokenizer.rules.inline.blockSkip,(a,d,p)=>{let m=p?p.length:0;return a.slice(0,m)+"["+"a".repeat(a.length-m-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let n=!1,s="",c=1/0;for(;t;){if(t.length<c)c=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}n||(s=""),n=!1;let a;if(this.options.extensions?.inline?.some(p=>(a=p.call({lexer:this},t,e))?(t=t.substring(a.raw.length),e.push(a),!0):!1))continue;if(a=this.tokenizer.escape(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.tag(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.link(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(a.raw.length);let p=e.at(-1);a.type==="text"&&p?.type==="text"?(p.raw+=a.raw,p.text+=a.text):e.push(a);continue}if(a=this.tokenizer.emStrong(t,r,s)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.codespan(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.br(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.del(t,r,s)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.autolink(t)){t=t.substring(a.raw.length),e.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(t))){t=t.substring(a.raw.length),e.push(a);continue}let d=t;if(this.options.extensions?.startInline){let p=1/0,m=t.slice(1),v;this.options.extensions.startInline.forEach(k=>{v=k.call({lexer:this},m),typeof v=="number"&&v>=0&&(p=Math.min(p,v))}),p<1/0&&p>=0&&(d=t.substring(0,p+1))}if(a=this.tokenizer.inlineText(d)){t=t.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(s=a.raw.slice(-1)),n=!0;let p=e.at(-1);p?.type==="text"?(p.raw+=a.raw,p.text+=a.text):e.push(a);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return e}infiniteLoopError(t){let e="Infinite loop on byte: "+t;if(this.options.silent)console.error(e);else throw new Error(e)}},we=class{options;parser;constructor(o){this.options=o||xt}space(o){return""}code({text:o,lang:t,escaped:e}){let r=(t||"").match(N.notSpaceStart)?.[0],n=o.replace(N.endingNewline,"")+`
50
- `;return r?'<pre><code class="language-'+nt(r)+'">'+(e?n:nt(n,!0))+`</code></pre>
51
- `:"<pre><code>"+(e?n:nt(n,!0))+`</code></pre>
49
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(s);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let r=e;if(this.tokens.links){let a=Object.keys(this.tokens.links);a.length>0&&(r=r.replace(this.tokenizer.rules.inline.reflinkSearch,h=>a.includes(h.slice(h.lastIndexOf("[")+1,-1))?"["+"a".repeat(h.length-2)+"]":h))}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,"++"),r=r.replace(this.tokenizer.rules.inline.blockSkip,(a,h,p)=>{let m=p?p.length:0;return a.slice(0,m)+"["+"a".repeat(a.length-m-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let n=!1,s="",l=1/0;for(;e;){if(e.length<l)l=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}n||(s=""),n=!1;let a;if(this.options.extensions?.inline?.some(p=>(a=p.call({lexer:this},e,t))?(e=e.substring(a.raw.length),t.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let p=t.at(-1);a.type==="text"&&p?.type==="text"?(p.raw+=a.raw,p.text+=a.text):t.push(a);continue}if(a=this.tokenizer.emStrong(e,r,s)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.del(e,r,s)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),t.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),t.push(a);continue}let h=e;if(this.options.extensions?.startInline){let p=1/0,m=e.slice(1),v;this.options.extensions.startInline.forEach(k=>{v=k.call({lexer:this},m),typeof v=="number"&&v>=0&&(p=Math.min(p,v))}),p<1/0&&p>=0&&(h=e.substring(0,p+1))}if(a=this.tokenizer.inlineText(h)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(s=a.raw.slice(-1)),n=!0;let p=t.at(-1);p?.type==="text"?(p.raw+=a.raw,p.text+=a.text):t.push(a);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},wt=class{options;parser;constructor(o){this.options=o||xe}space(o){return""}code({text:o,lang:e,escaped:t}){let r=(e||"").match(N.notSpaceStart)?.[0],n=o.replace(N.endingNewline,"")+`
50
+ `;return r?'<pre><code class="language-'+ne(r)+'">'+(t?n:ne(n,!0))+`</code></pre>
51
+ `:"<pre><code>"+(t?n:ne(n,!0))+`</code></pre>
52
52
  `}blockquote({tokens:o}){return`<blockquote>
53
53
  ${this.parser.parse(o)}</blockquote>
54
- `}html({text:o}){return o}def(o){return""}heading({tokens:o,depth:t}){return`<h${t}>${this.parser.parseInline(o)}</h${t}>
54
+ `}html({text:o}){return o}def(o){return""}heading({tokens:o,depth:e}){return`<h${e}>${this.parser.parseInline(o)}</h${e}>
55
55
  `}hr(o){return`<hr>
56
- `}list(o){let t=o.ordered,e=o.start,r="";for(let c=0;c<o.items.length;c++){let a=o.items[c];r+=this.listitem(a)}let n=t?"ol":"ul",s=t&&e!==1?' start="'+e+'"':"";return"<"+n+s+`>
56
+ `}list(o){let e=o.ordered,t=o.start,r="";for(let l=0;l<o.items.length;l++){let a=o.items[l];r+=this.listitem(a)}let n=e?"ol":"ul",s=e&&t!==1?' start="'+t+'"':"";return"<"+n+s+`>
57
57
  `+r+"</"+n+`>
58
58
  `}listitem(o){return`<li>${this.parser.parse(o.tokens)}</li>
59
59
  `}checkbox({checked:o}){return"<input "+(o?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:o}){return`<p>${this.parser.parseInline(o)}</p>
60
- `}table(o){let t="",e="";for(let n=0;n<o.header.length;n++)e+=this.tablecell(o.header[n]);t+=this.tablerow({text:e});let r="";for(let n=0;n<o.rows.length;n++){let s=o.rows[n];e="";for(let c=0;c<s.length;c++)e+=this.tablecell(s[c]);r+=this.tablerow({text:e})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
60
+ `}table(o){let e="",t="";for(let n=0;n<o.header.length;n++)t+=this.tablecell(o.header[n]);e+=this.tablerow({text:t});let r="";for(let n=0;n<o.rows.length;n++){let s=o.rows[n];t="";for(let l=0;l<s.length;l++)t+=this.tablecell(s[l]);r+=this.tablerow({text:t})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
61
61
  <thead>
62
- `+t+`</thead>
62
+ `+e+`</thead>
63
63
  `+r+`</table>
64
64
  `}tablerow({text:o}){return`<tr>
65
65
  ${o}</tr>
66
- `}tablecell(o){let t=this.parser.parseInline(o.tokens),e=o.header?"th":"td";return(o.align?`<${e} align="${o.align}">`:`<${e}>`)+t+`</${e}>
67
- `}strong({tokens:o}){return`<strong>${this.parser.parseInline(o)}</strong>`}em({tokens:o}){return`<em>${this.parser.parseInline(o)}</em>`}codespan({text:o}){return`<code>${nt(o,!0)}</code>`}br(o){return"<br>"}del({tokens:o}){return`<del>${this.parser.parseInline(o)}</del>`}link({href:o,title:t,tokens:e}){let r=this.parser.parseInline(e),n=an(o);if(n===null)return r;o=n;let s='<a href="'+o+'"';return t&&(s+=' title="'+nt(t)+'"'),s+=">"+r+"</a>",s}image({href:o,title:t,text:e,tokens:r}){r&&(e=this.parser.parseInline(r,this.parser.textRenderer));let n=an(o);if(n===null)return nt(e);o=n;let s=`<img src="${o}" alt="${nt(e)}"`;return t&&(s+=` title="${nt(t)}"`),s+=">",s}text(o){return"tokens"in o&&o.tokens?this.parser.parseInline(o.tokens):"escaped"in o&&o.escaped?o.text:nt(o.text)}},po=class{strong({text:o}){return o}em({text:o}){return o}codespan({text:o}){return o}del({text:o}){return o}html({text:o}){return o}text({text:o}){return o}link({text:o}){return""+o}image({text:o}){return""+o}br(){return""}checkbox({raw:o}){return o}},Q=class no{options;renderer;textRenderer;constructor(t){this.options=t||xt,this.options.renderer=this.options.renderer||new we,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new po}static parse(t,e){return new no(e).parse(t)}static parseInline(t,e){return new no(e).parseInline(t)}parse(t){this.renderer.parser=this;let e="";for(let r=0;r<t.length;r++){let n=t[r];if(this.options.extensions?.renderers?.[n.type]){let c=n,a=this.options.extensions.renderers[c.type].call({parser:this},c);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(c.type)){e+=a||"";continue}}let s=n;switch(s.type){case"space":{e+=this.renderer.space(s);break}case"hr":{e+=this.renderer.hr(s);break}case"heading":{e+=this.renderer.heading(s);break}case"code":{e+=this.renderer.code(s);break}case"table":{e+=this.renderer.table(s);break}case"blockquote":{e+=this.renderer.blockquote(s);break}case"list":{e+=this.renderer.list(s);break}case"checkbox":{e+=this.renderer.checkbox(s);break}case"html":{e+=this.renderer.html(s);break}case"def":{e+=this.renderer.def(s);break}case"paragraph":{e+=this.renderer.paragraph(s);break}case"text":{e+=this.renderer.text(s);break}default:{let c='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return e}parseInline(t,e=this.renderer){this.renderer.parser=this;let r="";for(let n=0;n<t.length;n++){let s=t[n];if(this.options.extensions?.renderers?.[s.type]){let a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(s.type)){r+=a||"";continue}}let c=s;switch(c.type){case"escape":{r+=e.text(c);break}case"html":{r+=e.html(c);break}case"link":{r+=e.link(c);break}case"image":{r+=e.image(c);break}case"checkbox":{r+=e.checkbox(c);break}case"strong":{r+=e.strong(c);break}case"em":{r+=e.em(c);break}case"codespan":{r+=e.codespan(c);break}case"br":{r+=e.br(c);break}case"del":{r+=e.del(c);break}case"text":{r+=e.text(c);break}default:{let a='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}},Ft=class{options;block;constructor(o){this.options=o||xt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(o){return o}postprocess(o){return o}processAllTokens(o){return o}emStrongMask(o){return o}provideLexer(o=this.block){return o?X.lex:X.lexInline}provideParser(o=this.block){return o?Q.parse:Q.parseInline}},K1=class{defaults=io();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Q;Renderer=we;TextRenderer=po;Lexer=X;Tokenizer=pe;Hooks=Ft;constructor(...o){this.use(...o)}walkTokens(o,t){let e=[];for(let r of o)switch(e=e.concat(t.call(this,r)),r.type){case"table":{let n=r;for(let s of n.header)e=e.concat(this.walkTokens(s.tokens,t));for(let s of n.rows)for(let c of s)e=e.concat(this.walkTokens(c.tokens,t));break}case"list":{let n=r;e=e.concat(this.walkTokens(n.items,t));break}default:{let n=r;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(s=>{let c=n[s].flat(1/0);e=e.concat(this.walkTokens(c,t))}):n.tokens&&(e=e.concat(this.walkTokens(n.tokens,t)))}}return e}use(...o){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return o.forEach(e=>{let r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let s=t.renderers[n.name];s?t.renderers[n.name]=function(...c){let a=n.renderer.apply(this,c);return a===!1&&(a=s.apply(this,c)),a}:t.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=t[n.level];s?s.unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&(n.level==="block"?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:n.level==="inline"&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),r.extensions=t),e.renderer){let n=this.defaults.renderer||new we(this.defaults);for(let s in e.renderer){if(!(s in n))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let c=s,a=e.renderer[c],d=n[c];n[c]=(...p)=>{let m=a.apply(n,p);return m===!1&&(m=d.apply(n,p)),m||""}}r.renderer=n}if(e.tokenizer){let n=this.defaults.tokenizer||new pe(this.defaults);for(let s in e.tokenizer){if(!(s in n))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let c=s,a=e.tokenizer[c],d=n[c];n[c]=(...p)=>{let m=a.apply(n,p);return m===!1&&(m=d.apply(n,p)),m}}r.tokenizer=n}if(e.hooks){let n=this.defaults.hooks||new Ft;for(let s in e.hooks){if(!(s in n))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let c=s,a=e.hooks[c],d=n[c];Ft.passThroughHooks.has(s)?n[c]=p=>{if(this.defaults.async&&Ft.passThroughHooksRespectAsync.has(s))return(async()=>{let v=await a.call(n,p);return d.call(n,v)})();let m=a.call(n,p);return d.call(n,m)}:n[c]=(...p)=>{if(this.defaults.async)return(async()=>{let v=await a.apply(n,p);return v===!1&&(v=await d.apply(n,p)),v})();let m=a.apply(n,p);return m===!1&&(m=d.apply(n,p)),m}}r.hooks=n}if(e.walkTokens){let n=this.defaults.walkTokens,s=e.walkTokens;r.walkTokens=function(c){let a=[];return a.push(s.call(this,c)),n&&(a=a.concat(n.call(this,c))),a}}this.defaults={...this.defaults,...r}}),this}setOptions(o){return this.defaults={...this.defaults,...o},this}lexer(o,t){return X.lex(o,t??this.defaults)}parser(o,t){return Q.parse(o,t??this.defaults)}parseMarkdown(o){return(t,e)=>{let r={...e},n={...this.defaults,...r},s=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&r.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=o),n.async)return(async()=>{let c=n.hooks?await n.hooks.preprocess(t):t,a=await(n.hooks?await n.hooks.provideLexer(o):o?X.lex:X.lexInline)(c,n),d=n.hooks?await n.hooks.processAllTokens(a):a;n.walkTokens&&await Promise.all(this.walkTokens(d,n.walkTokens));let p=await(n.hooks?await n.hooks.provideParser(o):o?Q.parse:Q.parseInline)(d,n);return n.hooks?await n.hooks.postprocess(p):p})().catch(s);try{n.hooks&&(t=n.hooks.preprocess(t));let c=(n.hooks?n.hooks.provideLexer(o):o?X.lex:X.lexInline)(t,n);n.hooks&&(c=n.hooks.processAllTokens(c)),n.walkTokens&&this.walkTokens(c,n.walkTokens);let a=(n.hooks?n.hooks.provideParser(o):o?Q.parse:Q.parseInline)(c,n);return n.hooks&&(a=n.hooks.postprocess(a)),a}catch(c){return s(c)}}}onError(o,t){return e=>{if(e.message+=`
68
- Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error occurred:</p><pre>"+nt(e.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(e);throw e}}},ft=new K1;function y(o,t){return ft.parse(o,t)}y.options=y.setOptions=function(o){return ft.setOptions(o),y.defaults=ft.defaults,dn(y.defaults),y};y.getDefaults=io;y.defaults=xt;function X1(...o){return ft.use(...o),y.defaults=ft.defaults,dn(y.defaults),y}y.use=X1;y.walkTokens=function(o,t){return ft.walkTokens(o,t)};y.parseInline=ft.parseInline;y.Parser=Q;y.parser=Q.parse;y.Renderer=we;y.TextRenderer=po;y.Lexer=X;y.lexer=X.lex;y.Tokenizer=pe;y.Hooks=Ft;y.parse=y;var C5=y.options,T5=y.setOptions,E5=y.walkTokens,L5=y.parseInline;var S5=Q.parse,B5=X.lex;var _n="lw-markdown",wo=class extends HTMLElement{static observedAttributes=["source"];prose;get source(){return this.getAttribute("source")??""}set source(t){C(this,"source",t)}connectedCallback(){b(this,"source"),this.prose||(this.prose=document.createElement("div"),this.prose.className="prose prose-sm max-w-none prose-lw",this.append(this.prose)),this.render(this.prose)}attributeChangedCallback(){this.prose&&this.render(this.prose)}render(t){let e=y.parse(this.source,{async:!1,gfm:!0,breaks:!0});t.innerHTML=ce.sanitize(e)}};function bn(){typeof customElements<"u"&&!customElements.get(_n)&&customElements.define(_n,wo)}var Mn="lw-menu",yn="lw-menu-item",me=4,ve=4,Q1="lw-menu-select",J1="lw-menu-dismiss";function go(o,t,e){return o>=me&&o+t<=e-me}function ke(o,t,e){return Math.max(me,Math.min(o,e-t-me))}function An(o,t,e,r){return go(o,e,r)?o:go(t,e,r)?t:ke(o,e,r)}function Cn(o,t,e,r){return go(o,e,r)?o:ke(t-e,e,r)}var vo=class extends HTMLElement{static observedAttributes=["label","command","disabled","icon","shortcut","checkbox","checked"];get label(){return this.getAttribute("label")}set label(t){C(this,"label",t)}get command(){return this.getAttribute("command")}set command(t){C(this,"command",t)}connectedCallback(){b(this,"label"),b(this,"command"),this.tabIndex=-1,this.render()}attributeChangedCallback(){this.isConnected&&this.render()}render(){let t=this.hasAttribute("checkbox"),e=this.hasAttribute("checked");this.setAttribute("role",t?"menuitemcheckbox":"menuitem"),t?this.setAttribute("aria-checked",String(e)):this.removeAttribute("aria-checked"),this.setAttribute("aria-disabled",String(this.hasAttribute("disabled")));let r=document.createElement("span");r.className="lw-menu-item-lead",r.setAttribute("aria-hidden","true");let n;if(t?n=e?"check":null:n=this.getAttribute("icon"),n){let a=document.createElement("lw-icon");a.setAttribute("name",n),a.setAttribute("size","0.9rem"),r.append(a)}let s=document.createElement("span");s.className="lw-menu-item-label",s.textContent=this.getAttribute("label")??"",this.replaceChildren(r,s);let c=this.getAttribute("shortcut");if(c){let a=document.createElement("span");a.className="lw-menu-item-shortcut",a.setAttribute("aria-hidden","true"),a.textContent=c,this.append(a)}}},mo=class extends HTMLElement{active=-1;connectedCallback(){this.setAttribute("role","menu"),this.tabIndex=-1,this.addEventListener("keydown",this.onKeydown),this.addEventListener("click",this.onClick),queueMicrotask(()=>{this.isConnected&&this.focus()})}disconnectedCallback(){this.removeEventListener("keydown",this.onKeydown),this.removeEventListener("click",this.onClick)}openAt(t,e){let{width:r,height:n}=this.getBoundingClientRect();this.place(ke(t,r,window.innerWidth),ke(e,n,window.innerHeight))}openBeside(t,e){let{width:r,height:n}=this.getBoundingClientRect(),s=window.innerWidth,c=window.innerHeight,a={x:t.right+ve,y:t.bottom+ve},d={x:t.left-ve-r,y:t.top-ve-n};if(e==="left"||e==="right"){let v=e==="right"?a.x:d.x,k=e==="right"?d.x:a.x;this.place(An(v,k,r,s),Cn(t.top,t.bottom,n,c));return}let p=e==="bottom"?a.y:d.y,m=e==="bottom"?d.y:a.y;this.place(Cn(t.left,t.right,r,s),An(p,m,n,c))}onKeydown=t=>this.handleKeydown(t);onClick=t=>{let e=t.target?.closest('[role^="menuitem"]');e&&!this.isDisabled(e)&&this.select(e)};place(t,e){this.style.left=`${t}px`,this.style.top=`${e}px`}items(){return[...this.querySelectorAll('[role^="menuitem"]')].filter(t=>!this.isDisabled(t))}isDisabled(t){return t.getAttribute("aria-disabled")==="true"||t.hasAttribute("disabled")}setActive(t){let e=this.items();if(e.length===0)return;this.active=(t+e.length)%e.length;for(let[n,s]of e.entries())s.tabIndex=n===this.active?0:-1;let r=e[this.active];r.focus(),r.scrollIntoView?.({block:"nearest"})}select(t){this.dispatchEvent(new CustomEvent(Q1,{detail:{command:t.getAttribute("command")},bubbles:!0}))}handleKeydown(t){switch(t.key){case"ArrowDown":{this.setActive(this.active<0?0:this.active+1);break}case"ArrowUp":{this.setActive((this.active<0?this.items().length:this.active)-1);break}case"Home":{this.setActive(0);break}case"End":{this.setActive(this.items().length-1);break}case"Enter":case" ":{let e=this.active>=0?this.items()[this.active]:void 0;e&&this.select(e);break}case"Escape":case"Tab":{this.dispatchEvent(new CustomEvent(J1,{bubbles:!0}));return}default:return}t.preventDefault()}};function Tn(){typeof customElements>"u"||(customElements.get(yn)||customElements.define(yn,vo),customElements.get(Mn)||customElements.define(Mn,mo))}function En(o,t){return o===void 0?!1:o===t||o.startsWith(t===""?"":`${t}/`)}var ko="data-lw-nav-part";function _t(o,t,e){let r=[...o.children].find(s=>s.getAttribute(ko)===t);if(r instanceof HTMLElement&&r.localName===e)return r;r?.remove();let n=document.createElement(e);return n.setAttribute(ko,t),n}function fe(o,t){fo(o,t)?.remove()}function fo(o,t){return[...o.children].find(e=>e.getAttribute(ko)===t)}function Ln(o,t,e){let r=_t(o,t,ut);r.setAttribute("name",e),r.setAttribute("size","1rem"),r.classList.add("lw-nav-glyph"),r.parentElement!==o&&o.prepend(r)}function Sn(o,t){let e=null;for(let r of o)t(r)&&(e===null||r.length>e.length)&&(e=r);return e}function xe(o){return o.getAttribute("path")??""}var bt="lw-nav-item",_e=class extends HTMLElement{static observedAttributes=["path","label","icon"];get path(){return this.getAttribute("path")??""}set path(t){C(this,"path",t)}get label(){return this.getAttribute("label")??""}set label(t){C(this,"label",t)}get icon(){return this.getAttribute("icon")}set icon(t){C(this,"icon",t)}connectedCallback(){b(this,"path"),b(this,"label"),b(this,"icon"),this.setAttribute("role","button"),this.classList.add("lw-nav-item"),this.tabIndex=0,this.addEventListener("keydown",this.onKeydown),this.render()}disconnectedCallback(){this.removeEventListener("keydown",this.onKeydown)}attributeChangedCallback(){this.isConnected&&this.render()}onKeydown=t=>{t.key!=="Enter"&&t.key!==" "||(t.preventDefault(),this.click())};render(){let t=this.icon;t?Ln(this,"glyph",t):fe(this,"glyph");let e=_t(this,"label","span");e.className="lw-nav-item-label",e.textContent=this.label,e.parentElement!==this&&this.insertBefore(e,this.glyphEnd())}glyphEnd(){let t=fo(this,"glyph");return t?t.nextSibling:this.firstChild}};var Bn=new Map;function Hn(o,t){return Bn.get(o)??t}function Rn(o,t){Bn.set(o,t)}var xo="lw-nav-group",be=class extends HTMLElement{static observedAttributes=["label","key","collapsed"];observer;drawnItems=-1;get label(){return this.getAttribute("label")??""}set label(t){C(this,"label",t)}get key(){return this.getAttribute("key")??this.label}set key(t){C(this,"key",t)}get collapsed(){return this.hasAttribute("collapsed")}set collapsed(t){this.toggleAttribute("collapsed",t)}get open(){return this.itemCount()===0||!Hn(this.key,this.collapsed)}connectedCallback(){b(this,"label"),b(this,"key"),b(this,"collapsed"),this.classList.add("lw-nav-group"),this.observer=new MutationObserver(()=>this.onChildren()),this.observer.observe(this,{childList:!0}),this.render()}disconnectedCallback(){this.observer?.disconnect(),this.observer=void 0}attributeChangedCallback(){this.isConnected&&this.render()}toggle(){this.itemCount()!==0&&(Rn(this.key,this.open),this.render())}onChildren(){this.itemCount()!==this.drawnItems&&this.render()}itemCount(){return[...this.children].filter(t=>t.localName===bt).length}render(){let t=this.itemCount();this.drawnItems=t;let e=_t(this,"heading","button");if(e.className="lw-nav-group-heading",e.setAttribute("type","button"),e.toggleAttribute("disabled",t===0),t===0?e.removeAttribute("aria-expanded"):e.setAttribute("aria-expanded",String(this.open)),e.parentElement!==this&&(e.addEventListener("click",()=>this.toggle()),this.prepend(e)),t===0)fe(e,"chevron");else{let n=_t(e,"chevron",ut);n.setAttribute("name","chevronDown"),n.setAttribute("size","0.875rem"),n.className="lw-nav-chevron",n.parentElement!==e&&e.prepend(n)}let r=_t(e,"label","span");r.className="lw-nav-group-label",r.textContent=this.label,r.parentElement!==e&&e.append(r),this.dataset.open=String(this.open)}};var _o="lw-nav-tree",t5="lw-nav-select",bo=class extends HTMLElement{static observedAttributes=["current"];observer;get current(){return this.getAttribute("current")}set current(t){C(this,"current",t)}connectedCallback(){b(this,"current"),this.setAttribute("role","navigation"),this.classList.add("lw-nav-tree"),this.addEventListener("click",this.onClick),this.observer=new MutationObserver(()=>this.mark()),this.observer.observe(this,{childList:!0,subtree:!0,attributeFilter:["path"]}),this.mark()}disconnectedCallback(){this.removeEventListener("click",this.onClick),this.observer?.disconnect(),this.observer=void 0}attributeChangedCallback(){this.isConnected&&this.mark()}onClick=t=>{let e=t.target?.closest(bt);!e||!this.owns(e)||this.dispatchEvent(new CustomEvent(t5,{detail:{path:xe(e)},bubbles:!0}))};mark(){let t=this.items(),e=this.current??void 0,r=Sn(t.map(n=>xe(n)),n=>En(e,n));for(let n of t)r!==null&&xe(n)===r?n.setAttribute("aria-current","page"):n.removeAttribute("aria-current")}items(){return[...this.querySelectorAll(bt)].filter(t=>this.owns(t))}owns(t){return t.closest(_o)===this}};function jn(){typeof customElements>"u"||(customElements.get(bt)||customElements.define(bt,_e),customElements.get(xo)||customElements.define(xo,be),customElements.get(_o)||customElements.define(_o,bo))}var Zn="lw-progress-ring";var Mo=class extends HTMLElement{static observedAttributes=["value","max","size"];connectedCallback(){this.render()}attributeChangedCallback(){this.isConnected&&this.render()}num(t,e){let r=this.getAttribute(t);if(r===null||r.trim()==="")return e;let n=Number(r);return Number.isFinite(n)?n:e}render(){let t=Math.max(this.num("max",100),1),e=Math.min(Math.max(this.num("value",0),0),t),r=Math.round(e/t*100),n=this.getAttribute("size")??"2.5rem";this.style.width=n,this.style.height=n,this.setAttribute("role","progressbar"),this.setAttribute("aria-valuenow",String(e)),this.setAttribute("aria-valuemin","0"),this.setAttribute("aria-valuemax",String(t)),this.innerHTML=`<svg class="lw-progress-ring-svg" viewBox="0 0 36 36" aria-hidden="true"><circle class="lw-progress-ring-track" cx="18" cy="18" r="${15.9155}"></circle><circle class="lw-progress-ring-value" cx="18" cy="18" r="${15.9155}" transform="rotate(-90 18 18)" stroke-dasharray="100" stroke-dashoffset="${100-r}"></circle><text class="lw-progress-ring-text" x="18" y="18">${r}%</text></svg>`}};function Vn(){typeof customElements<"u"&&!customElements.get(Zn)&&customElements.define(Zn,Mo)}var qt="lw-option",Me=class extends HTMLElement{get value(){return this.getAttribute("value")}set value(t){C(this,"value",t)}get icon(){return this.getAttribute("icon")}set icon(t){C(this,"icon",t)}connectedCallback(){b(this,"value"),b(this,"icon")}};function In(o){return[...o.querySelectorAll(qt)].map(t=>({value:t.getAttribute("value")??"",label:(t.textContent??"").trim(),icon:t.getAttribute("icon"),disabled:t.hasAttribute("disabled")}))}function On(o){let t=document.createElement("button");t.type="button",t.className="lw-select-trigger",t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",o.listboxId),t.style.setProperty("anchor-name",o.anchorName),t.addEventListener("click",o.onToggle),t.addEventListener("keydown",o.onKeydown);let e=document.createElement("span");e.className="lw-select-value";let r=document.createElement("span");return r.className="lw-select-chevron",r.setAttribute("aria-hidden","true"),r.textContent="\u25BE",t.append(e,r),{trigger:t,valueSlot:e}}function Pn(o){let t=document.createElement("div");return t.id=o.listboxId,t.className="lw-select-listbox",t.setAttribute("role","listbox"),t.hidden=!0,t.style.setProperty("position-anchor",o.anchorName),t.addEventListener("keydown",o.onKeydown),t}function Dn(o,t,e,r){o.textContent="",e&&o.append(zn(e)),(!e||!r)&&o.append(document.createTextNode(t))}function Nn(o){let t=o.choice,e=document.createElement("div");return e.className="lw-select-option",e.setAttribute("role","option"),e.id=o.id,e.dataset.value=t.value,e.setAttribute("aria-selected",String(o.selected)),e.tabIndex=-1,t.disabled&&e.setAttribute("aria-disabled","true"),t.icon&&e.append(zn(t.icon)),e.append(document.createTextNode(t.label)),e.addEventListener("click",()=>{t.disabled||o.onPick()}),e.addEventListener("pointermove",o.onHover),e}function zn(o){let t=document.createElement("span");return t.className="lw-select-glyph",t.setAttribute("aria-hidden","true"),t.textContent=o,t}var $n="lw-select",e5="lw-select-change",o5=0,r5=500,yo=class o extends HTMLElement{static observedAttributes=["value","label","placeholder","disabled","compact"];selectId=o5++;anchorName=`--lw-select-${this.selectId}`;listboxId=`lw-select-listbox-${this.selectId}`;open=!1;activeIndex=0;typeahead="";typeaheadTimer;trigger;valueSlot;listbox;observer;get value(){return this.getAttribute("value")}set value(t){C(this,"value",t)}get compact(){return this.hasAttribute("compact")}set compact(t){this.toggleAttribute("compact",t)}connectedCallback(){b(this,"value"),this.trigger||this.buildControl(),this.observer=new MutationObserver(()=>this.syncTrigger()),this.observe(),this.syncTrigger()}disconnectedCallback(){this.observer?.disconnect(),document.removeEventListener("pointerdown",this.onOutsidePointer,!0),this.typeaheadTimer!==void 0&&clearTimeout(this.typeaheadTimer)}attributeChangedCallback(t){this.trigger&&(o.observedAttributes.includes(t)&&this.syncTrigger(),t==="disabled"&&this.hasAttribute("disabled")&&this.close(!1))}onOutsidePointer=t=>{this.contains(t.target)||this.close(!1)};observe(){this.observer?.observe(this,{childList:!0,characterData:!0,subtree:!0,attributes:!0})}write(t){this.observer?.disconnect();try{t()}finally{this.observe()}}choices(){return In(this)}selectedChoice(){let t=this.value;return this.choices().find(e=>e.value===t)}buildControl(){let{trigger:t,valueSlot:e}=On({anchorName:this.anchorName,listboxId:this.listboxId,onToggle:()=>this.toggle(),onKeydown:n=>this.onTriggerKeydown(n)}),r=Pn({anchorName:this.anchorName,listboxId:this.listboxId,onKeydown:n=>this.onListboxKeydown(n)});this.append(t,r),this.trigger=t,this.valueSlot=e,this.listbox=r}syncTrigger(){let t=this.trigger,e=this.valueSlot;if(!t||!e)return;let r=this.getAttribute("label"),n=this.selectedChoice(),s=n?.label??this.getAttribute("placeholder")??"",c=this.compact&&n?.icon!=null;this.write(()=>{t.disabled=this.hasAttribute("disabled"),r!==null&&(t.setAttribute("aria-label",c?`${r}: ${s}`:r),this.listbox?.setAttribute("aria-label",r)),Dn(e,s,n?.icon??null,c)})}toggle(){this.open?this.close():this.openListbox()}openListbox(){let t=this.listbox,e=this.trigger;if(this.open||this.hasAttribute("disabled")||!t||!e)return;this.renderOptions(),this.open=!0,this.write(()=>{t.hidden=!1,e.setAttribute("aria-expanded","true")});let n=this.choices().findIndex(s=>s.value===this.value);this.setActive(Math.max(0,n)),document.addEventListener("pointerdown",this.onOutsidePointer,{capture:!0})}close(t=!0){let e=this.listbox,r=this.trigger;!this.open||!e||!r||(this.open=!1,this.write(()=>{e.hidden=!0,e.replaceChildren(),r.setAttribute("aria-expanded","false")}),document.removeEventListener("pointerdown",this.onOutsidePointer,!0),t&&r.focus())}renderOptions(){let t=this.listbox;if(!t)return;let e=this.choices().map((r,n)=>Nn({choice:r,id:`${this.listboxId}-opt-${n}`,selected:r.value===this.value,onPick:()=>this.commit(r.value),onHover:()=>this.setActive(n)}));this.write(()=>t.replaceChildren(...e))}setActive(t){if(!this.listbox)return;let e=[...this.listbox.children];if(e.length===0)return;this.activeIndex=Math.max(0,Math.min(t,e.length-1)),this.write(()=>{for(let[n,s]of e.entries())s.classList.toggle("is-active",n===this.activeIndex),s.tabIndex=n===this.activeIndex?0:-1});let r=e[this.activeIndex];r.focus(),r.scrollIntoView?.({block:"nearest"})}onTriggerKeydown(t){["ArrowDown","ArrowUp","Enter"," "].includes(t.key)&&(t.preventDefault(),this.openListbox())}onListboxKeydown(t){let e=this.choices().length-1;switch(t.key){case"ArrowDown":{this.setActive(this.activeIndex>=e?0:this.activeIndex+1);break}case"ArrowUp":{this.setActive(this.activeIndex<=0?e:this.activeIndex-1);break}case"Home":{this.setActive(0);break}case"End":{this.setActive(e);break}case"Enter":case" ":{this.commitActive();break}case"Escape":{this.close();break}case"Tab":{this.close(!1);return}default:{t.key.length===1&&this.onTypeahead(t.key);return}}t.preventDefault()}onTypeahead(t){this.typeahead+=t.toLowerCase(),this.typeaheadTimer!==void 0&&clearTimeout(this.typeaheadTimer),this.typeaheadTimer=setTimeout(()=>this.typeahead="",r5);let e=this.choices().findIndex(r=>!r.disabled&&r.label.toLowerCase().startsWith(this.typeahead));e!==-1&&this.setActive(e)}commitActive(){let t=this.choices()[this.activeIndex];t&&!t.disabled&&this.commit(t.value)}commit(t){let e=t!==this.value;this.value=t,this.close(),e&&this.dispatchEvent(new CustomEvent(e5,{detail:{value:t},bubbles:!0}))}};function Un(){typeof customElements>"u"||(customElements.get(qt)||customElements.define(qt,Me),customElements.get($n)||customElements.define($n,yo))}var Fn=600,ye=6,Yt=4,n5=0,i5=16,s5=6,Gn="lw-tooltip",Ao=class extends HTMLElement{static observedAttributes=["text","position","delay-ms","max-width"];bubble;trigger;showTimer;pointer;get text(){return this.getAttribute("text")}set text(t){C(this,"text",t)}get position(){return this.getAttribute("position")??"top"}set position(t){C(this,"position",t)}connectedCallback(){b(this,"text"),b(this,"position"),this.render(),this.trigger=this.parentElement??void 0,this.trigger?.addEventListener("pointerenter",this.onEnter),this.trigger?.addEventListener("pointermove",this.onMove),this.trigger?.addEventListener("pointerleave",this.onLeave),this.trigger?.addEventListener("focusin",this.onFocusIn),this.trigger?.addEventListener("focusout",this.onFocusOut)}disconnectedCallback(){this.hide(),this.trigger?.removeEventListener("pointerenter",this.onEnter),this.trigger?.removeEventListener("pointermove",this.onMove),this.trigger?.removeEventListener("pointerleave",this.onLeave),this.trigger?.removeEventListener("focusin",this.onFocusIn),this.trigger?.removeEventListener("focusout",this.onFocusOut),this.trigger=void 0}attributeChangedCallback(){this.isConnected&&this.render()}onEnter=t=>this.scheduleShow(t);onMove=t=>{t.pointerType==="mouse"&&(this.pointer={x:t.clientX,y:t.clientY})};onLeave=()=>this.hide();onFocusIn=()=>this.scheduleShow();onFocusOut=()=>this.hide();render(){let t=(this.getAttribute("text")??"").trim();if(!t){this.bubble?.remove(),this.bubble=void 0;return}let e=this.bubble??this.createBubble();e.textContent=t,e.style.maxWidth=this.getAttribute("max-width")??"16rem"}createBubble(){let t=document.createElement("span");return t.className="lw-tooltip-bubble",t.setAttribute("role","tooltip"),t.setAttribute("popover","manual"),this.append(t),this.bubble=t,t}scheduleShow(t){t&&t.pointerType!=="mouse"||(this.pointer=t?{x:t.clientX,y:t.clientY}:void 0,this.clearTimer(),this.showTimer=setTimeout(()=>this.show(),this.delayMs()))}delayMs(){let t=this.getAttribute("delay-ms");if(t===null||t.trim()==="")return Fn;let e=Number(t);return Number.isFinite(e)&&e>=0?e:Fn}show(){let t=this.bubble;if(!(!t?.isConnected||typeof t.showPopover!="function")){try{t.showPopover()}catch{return}this.placeBubble(t)}}placeBubble(t){let e=t.getBoundingClientRect(),r,n;if(this.pointer){r=this.pointer.x+n5;let a=this.pointer.y+i5;n=a+e.height+Yt>window.innerHeight?this.pointer.y-e.height-s5:a}else if(this.trigger){let a=this.trigger.getBoundingClientRect(),d=a.left+a.width/2-e.width/2,p=a.top+a.height/2-e.height/2;switch(this.position){case"bottom":{[r,n]=[d,a.bottom+ye];break}case"left":{[r,n]=[a.left-e.width-ye,p];break}case"right":{[r,n]=[a.right+ye,p];break}default:[r,n]=[d,a.top-e.height-ye]}}else return;let s=window.innerWidth-e.width-Yt,c=window.innerHeight-e.height-Yt;t.style.left=`${Math.round(Math.max(Yt,Math.min(r,s)))}px`,t.style.top=`${Math.round(Math.max(Yt,Math.min(n,c)))}px`}hide(){this.clearTimer();let t=this.bubble;if(!(!t||typeof t.hidePopover!="function"))try{t.hidePopover()}catch{return}}clearTimer(){this.showTimer!==void 0&&(clearTimeout(this.showTimer),this.showTimer=void 0)}};function Wn(){typeof customElements<"u"&&!customElements.get(Gn)&&customElements.define(Gn,Ao)}function a5(o){let t=document.documentElement;for(let[e,r]of Object.entries(o.tokens??{}))t.style.setProperty(e,r);if(o.rootFontSize&&(t.style.fontSize=o.rootFontSize),o.theme){let e=o.theme==="dark";t.classList.toggle("dark",e),document.body?.classList.toggle("dark",e)}l5(o.icons)}function l5(o){let t=Object.entries(o??{});if(t.length!==0){for(let[e,r]of t)to(e,Je(r));for(let e of document.querySelectorAll(ut))e.refresh()}}function c5(){let o=new Map,t,e=r=>{let n=o.get(r);if(n)return n;let s={value:void 0,loaded:!1,listeners:[]};return o.set(r,s),t?.stateWatch(r),s};return{connect(r){t=r;for(let n of o.keys())r.stateWatch(n)},apply(r,n,s){let c=e(r);c.value=n,c.loaded=s;for(let a of c.listeners)a(n,s)},watch(r){let n=e(r);return{value:()=>n.value,loaded:()=>n.loaded,set:s=>{n.value=s,t?.stateSet(r,s)},clear:()=>{n.value=void 0,t?.stateClear(r)},dispose:()=>{o.delete(r),t?.stateUnwatch(r)},onChange:s=>{n.listeners.push(s)}}}}}function h5(){Wn(),Un(),Tn(),er(),bn(),on(),Vn(),jn();let o=c5(),t={setIcon:(e,r)=>to(e,Je(r)),removeIcon:en,hasIcon:tn,applySurfaceState:a5,connectState:e=>(o.connect(e),o),state:o};return globalThis.LwFrame=t,t}h5();})();
66
+ `}tablecell(o){let e=this.parser.parseInline(o.tokens),t=o.header?"th":"td";return(o.align?`<${t} align="${o.align}">`:`<${t}>`)+e+`</${t}>
67
+ `}strong({tokens:o}){return`<strong>${this.parser.parseInline(o)}</strong>`}em({tokens:o}){return`<em>${this.parser.parseInline(o)}</em>`}codespan({text:o}){return`<code>${ne(o,!0)}</code>`}br(o){return"<br>"}del({tokens:o}){return`<del>${this.parser.parseInline(o)}</del>`}link({href:o,title:e,tokens:t}){let r=this.parser.parseInline(t),n=hn(o);if(n===null)return r;o=n;let s='<a href="'+o+'"';return e&&(s+=' title="'+ne(e)+'"'),s+=">"+r+"</a>",s}image({href:o,title:e,text:t,tokens:r}){r&&(t=this.parser.parseInline(r,this.parser.textRenderer));let n=hn(o);if(n===null)return ne(t);o=n;let s=`<img src="${o}" alt="${ne(t)}"`;return e&&(s+=` title="${ne(e)}"`),s+=">",s}text(o){return"tokens"in o&&o.tokens?this.parser.parseInline(o.tokens):"escaped"in o&&o.escaped?o.text:ne(o.text)}},po=class{strong({text:o}){return o}em({text:o}){return o}codespan({text:o}){return o}del({text:o}){return o}html({text:o}){return o}text({text:o}){return o}link({text:o}){return""+o}image({text:o}){return""+o}br(){return""}checkbox({raw:o}){return o}},Q=class no{options;renderer;textRenderer;constructor(e){this.options=e||xe,this.options.renderer=this.options.renderer||new wt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new po}static parse(e,t){return new no(t).parse(e)}static parseInline(e,t){return new no(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let r=0;r<e.length;r++){let n=e[r];if(this.options.extensions?.renderers?.[n.type]){let l=n,a=this.options.extensions.renderers[l.type].call({parser:this},l);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(l.type)){t+=a||"";continue}}let s=n;switch(s.type){case"space":{t+=this.renderer.space(s);break}case"hr":{t+=this.renderer.hr(s);break}case"heading":{t+=this.renderer.heading(s);break}case"code":{t+=this.renderer.code(s);break}case"table":{t+=this.renderer.table(s);break}case"blockquote":{t+=this.renderer.blockquote(s);break}case"list":{t+=this.renderer.list(s);break}case"checkbox":{t+=this.renderer.checkbox(s);break}case"html":{t+=this.renderer.html(s);break}case"def":{t+=this.renderer.def(s);break}case"paragraph":{t+=this.renderer.paragraph(s);break}case"text":{t+=this.renderer.text(s);break}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let r="";for(let n=0;n<e.length;n++){let s=e[n];if(this.options.extensions?.renderers?.[s.type]){let a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(s.type)){r+=a||"";continue}}let l=s;switch(l.type){case"escape":{r+=t.text(l);break}case"html":{r+=t.html(l);break}case"link":{r+=t.link(l);break}case"image":{r+=t.image(l);break}case"checkbox":{r+=t.checkbox(l);break}case"strong":{r+=t.strong(l);break}case"em":{r+=t.em(l);break}case"codespan":{r+=t.codespan(l);break}case"br":{r+=t.br(l);break}case"del":{r+=t.del(l);break}case"text":{r+=t.text(l);break}default:{let a='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}},Fe=class{options;block;constructor(o){this.options=o||xe}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(o){return o}postprocess(o){return o}processAllTokens(o){return o}emStrongMask(o){return o}provideLexer(o=this.block){return o?X.lex:X.lexInline}provideParser(o=this.block){return o?Q.parse:Q.parseInline}},n5=class{defaults=io();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Q;Renderer=wt;TextRenderer=po;Lexer=X;Tokenizer=pt;Hooks=Fe;constructor(...o){this.use(...o)}walkTokens(o,e){let t=[];for(let r of o)switch(t=t.concat(e.call(this,r)),r.type){case"table":{let n=r;for(let s of n.header)t=t.concat(this.walkTokens(s.tokens,e));for(let s of n.rows)for(let l of s)t=t.concat(this.walkTokens(l.tokens,e));break}case"list":{let n=r;t=t.concat(this.walkTokens(n.items,e));break}default:{let n=r;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(s=>{let l=n[s].flat(1/0);t=t.concat(this.walkTokens(l,e))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,e)))}}return t}use(...o){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return o.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let s=e.renderers[n.name];s?e.renderers[n.name]=function(...l){let a=n.renderer.apply(this,l);return a===!1&&(a=s.apply(this,l)),a}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[n.level];s?s.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),r.extensions=e),t.renderer){let n=this.defaults.renderer||new wt(this.defaults);for(let s in t.renderer){if(!(s in n))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let l=s,a=t.renderer[l],h=n[l];n[l]=(...p)=>{let m=a.apply(n,p);return m===!1&&(m=h.apply(n,p)),m||""}}r.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new pt(this.defaults);for(let s in t.tokenizer){if(!(s in n))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let l=s,a=t.tokenizer[l],h=n[l];n[l]=(...p)=>{let m=a.apply(n,p);return m===!1&&(m=h.apply(n,p)),m}}r.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new Fe;for(let s in t.hooks){if(!(s in n))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let l=s,a=t.hooks[l],h=n[l];Fe.passThroughHooks.has(s)?n[l]=p=>{if(this.defaults.async&&Fe.passThroughHooksRespectAsync.has(s))return(async()=>{let v=await a.call(n,p);return h.call(n,v)})();let m=a.call(n,p);return h.call(n,m)}:n[l]=(...p)=>{if(this.defaults.async)return(async()=>{let v=await a.apply(n,p);return v===!1&&(v=await h.apply(n,p)),v})();let m=a.apply(n,p);return m===!1&&(m=h.apply(n,p)),m}}r.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,s=t.walkTokens;r.walkTokens=function(l){let a=[];return a.push(s.call(this,l)),n&&(a=a.concat(n.call(this,l))),a}}this.defaults={...this.defaults,...r}}),this}setOptions(o){return this.defaults={...this.defaults,...o},this}lexer(o,e){return X.lex(o,e??this.defaults)}parser(o,e){return Q.parse(o,e??this.defaults)}parseMarkdown(o){return(e,t)=>{let r={...t},n={...this.defaults,...r},s=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&r.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=o),n.async)return(async()=>{let l=n.hooks?await n.hooks.preprocess(e):e,a=await(n.hooks?await n.hooks.provideLexer(o):o?X.lex:X.lexInline)(l,n),h=n.hooks?await n.hooks.processAllTokens(a):a;n.walkTokens&&await Promise.all(this.walkTokens(h,n.walkTokens));let p=await(n.hooks?await n.hooks.provideParser(o):o?Q.parse:Q.parseInline)(h,n);return n.hooks?await n.hooks.postprocess(p):p})().catch(s);try{n.hooks&&(e=n.hooks.preprocess(e));let l=(n.hooks?n.hooks.provideLexer(o):o?X.lex:X.lexInline)(e,n);n.hooks&&(l=n.hooks.processAllTokens(l)),n.walkTokens&&this.walkTokens(l,n.walkTokens);let a=(n.hooks?n.hooks.provideParser(o):o?Q.parse:Q.parseInline)(l,n);return n.hooks&&(a=n.hooks.postprocess(a)),a}catch(l){return s(l)}}}onError(o,e){return t=>{if(t.message+=`
68
+ Please report this to https://github.com/markedjs/marked.`,o){let r="<p>An error occurred:</p><pre>"+ne(t.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(t);throw t}}},fe=new n5;function M(o,e){return fe.parse(o,e)}M.options=M.setOptions=function(o){return fe.setOptions(o),M.defaults=fe.defaults,wn(M.defaults),M};M.getDefaults=io;M.defaults=xe;function i5(...o){return fe.use(...o),M.defaults=fe.defaults,wn(M.defaults),M}M.use=i5;M.walkTokens=function(o,e){return fe.walkTokens(o,e)};M.parseInline=fe.parseInline;M.Parser=Q;M.parser=Q.parse;M.Renderer=wt;M.TextRenderer=po;M.Lexer=X;M.lexer=X.lex;M.Tokenizer=pt;M.Hooks=Fe;M.parse=M;var N5=M.options,z5=M.setOptions,$5=M.walkTokens,U5=M.parseInline;var F5=Q.parse,G5=X.lex;var Mn="lw-markdown",wo=class extends HTMLElement{static observedAttributes=["source"];prose;get source(){return this.getAttribute("source")??""}set source(e){C(this,"source",e)}connectedCallback(){b(this,"source"),this.prose||(this.prose=document.createElement("div"),this.prose.className="prose prose-sm max-w-none prose-lw",this.append(this.prose)),this.render(this.prose)}attributeChangedCallback(){this.prose&&this.render(this.prose)}render(e){let t=M.parse(this.source,{async:!1,gfm:!0,breaks:!0});e.innerHTML=ct.sanitize(t)}};function An(){typeof customElements<"u"&&!customElements.get(Mn)&&customElements.define(Mn,wo)}var Cn="lw-menu",Tn="lw-menu-item",mt=4,vt=4,s5="lw-menu-select",a5="lw-menu-dismiss";function go(o,e,t){return o>=mt&&o+e<=t-mt}function kt(o,e,t){return Math.max(mt,Math.min(o,t-e-mt))}function Ln(o,e,t,r){return go(o,t,r)?o:go(e,t,r)?e:kt(o,t,r)}function Sn(o,e,t,r){return go(o,t,r)?o:kt(e-t,t,r)}var vo=class extends HTMLElement{static observedAttributes=["label","command","disabled","icon","shortcut","checkbox","checked"];get label(){return this.getAttribute("label")}set label(e){C(this,"label",e)}get command(){return this.getAttribute("command")}set command(e){C(this,"command",e)}connectedCallback(){b(this,"label"),b(this,"command"),this.tabIndex=-1,this.render()}attributeChangedCallback(){this.isConnected&&this.render()}render(){let e=this.hasAttribute("checkbox"),t=this.hasAttribute("checked");this.setAttribute("role",e?"menuitemcheckbox":"menuitem"),e?this.setAttribute("aria-checked",String(t)):this.removeAttribute("aria-checked"),this.setAttribute("aria-disabled",String(this.hasAttribute("disabled")));let r=document.createElement("span");r.className="lw-menu-item-lead",r.setAttribute("aria-hidden","true");let n;if(e?n=t?"check":null:n=this.getAttribute("icon"),n){let a=document.createElement("lw-icon");a.setAttribute("name",n),a.setAttribute("size","0.9rem"),r.append(a)}let s=document.createElement("span");s.className="lw-menu-item-label",s.textContent=this.getAttribute("label")??"",this.replaceChildren(r,s);let l=this.getAttribute("shortcut");if(l){let a=document.createElement("span");a.className="lw-menu-item-shortcut",a.setAttribute("aria-hidden","true"),a.textContent=l,this.append(a)}}},mo=class extends HTMLElement{active=-1;connectedCallback(){this.setAttribute("role","menu"),this.tabIndex=-1,this.addEventListener("keydown",this.onKeydown),this.addEventListener("click",this.onClick),queueMicrotask(()=>{this.isConnected&&this.focus()})}disconnectedCallback(){this.removeEventListener("keydown",this.onKeydown),this.removeEventListener("click",this.onClick)}openAt(e,t){let{width:r,height:n}=this.getBoundingClientRect();this.place(kt(e,r,window.innerWidth),kt(t,n,window.innerHeight))}openBeside(e,t){let{width:r,height:n}=this.getBoundingClientRect(),s=window.innerWidth,l=window.innerHeight,a={x:e.right+vt,y:e.bottom+vt},h={x:e.left-vt-r,y:e.top-vt-n};if(t==="left"||t==="right"){let v=t==="right"?a.x:h.x,k=t==="right"?h.x:a.x;this.place(Ln(v,k,r,s),Sn(e.top,e.bottom,n,l));return}let p=t==="bottom"?a.y:h.y,m=t==="bottom"?h.y:a.y;this.place(Sn(e.left,e.right,r,s),Ln(p,m,n,l))}onKeydown=e=>this.handleKeydown(e);onClick=e=>{let t=e.target?.closest('[role^="menuitem"]');t&&!this.isDisabled(t)&&this.select(t)};place(e,t){this.style.left=`${e}px`,this.style.top=`${t}px`}items(){return[...this.querySelectorAll('[role^="menuitem"]')].filter(e=>!this.isDisabled(e))}isDisabled(e){return e.getAttribute("aria-disabled")==="true"||e.hasAttribute("disabled")}setActive(e){let t=this.items();if(t.length===0)return;this.active=(e+t.length)%t.length;for(let[n,s]of t.entries())s.tabIndex=n===this.active?0:-1;let r=t[this.active];r.focus(),r.scrollIntoView?.({block:"nearest"})}select(e){this.dispatchEvent(new CustomEvent(s5,{detail:{command:e.getAttribute("command")},bubbles:!0}))}handleKeydown(e){switch(e.key){case"ArrowDown":{this.setActive(this.active<0?0:this.active+1);break}case"ArrowUp":{this.setActive((this.active<0?this.items().length:this.active)-1);break}case"Home":{this.setActive(0);break}case"End":{this.setActive(this.items().length-1);break}case"Enter":case" ":{let t=this.active>=0?this.items()[this.active]:void 0;t&&this.select(t);break}case"Escape":case"Tab":{this.dispatchEvent(new CustomEvent(a5,{bubbles:!0}));return}default:return}e.preventDefault()}};function En(){typeof customElements>"u"||(customElements.get(Tn)||customElements.define(Tn,vo),customElements.get(Cn)||customElements.define(Cn,mo))}function Bn(o,e){return o===void 0?!1:o===e||o.startsWith(e===""?"":`${e}/`)}var ko="data-lw-nav-part";function _e(o,e,t){let r=[...o.children].find(s=>s.getAttribute(ko)===e);if(r instanceof HTMLElement&&r.localName===t)return r;r?.remove();let n=document.createElement(t);return n.setAttribute(ko,e),n}function ft(o,e){fo(o,e)?.remove()}function fo(o,e){return[...o.children].find(t=>t.getAttribute(ko)===e)}function Hn(o,e,t){let r=_e(o,e,ue);r.setAttribute("name",t),r.setAttribute("size","1rem"),r.classList.add("lw-nav-glyph"),r.parentElement!==o&&o.prepend(r)}function Rn(o,e){let t=null;for(let r of o)e(r)&&(t===null||r.length>t.length)&&(t=r);return t}function xt(o){return o.getAttribute("path")??""}var be="lw-nav-item",_t=class extends HTMLElement{static observedAttributes=["path","label","icon"];get path(){return this.getAttribute("path")??""}set path(e){C(this,"path",e)}get label(){return this.getAttribute("label")??""}set label(e){C(this,"label",e)}get icon(){return this.getAttribute("icon")}set icon(e){C(this,"icon",e)}connectedCallback(){b(this,"path"),b(this,"label"),b(this,"icon"),this.setAttribute("role","button"),this.classList.add("lw-nav-item"),this.tabIndex=0,this.addEventListener("keydown",this.onKeydown),this.render()}disconnectedCallback(){this.removeEventListener("keydown",this.onKeydown)}attributeChangedCallback(){this.isConnected&&this.render()}onKeydown=e=>{e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),this.click())};render(){let e=this.icon;e?Hn(this,"glyph",e):ft(this,"glyph");let t=_e(this,"label","span");t.className="lw-nav-item-label",t.textContent=this.label,t.parentElement!==this&&this.insertBefore(t,this.glyphEnd())}glyphEnd(){let e=fo(this,"glyph");return e?e.nextSibling:this.firstChild}};var jn=new Map;function Zn(o,e){return jn.get(o)??e}function Vn(o,e){jn.set(o,e)}var xo="lw-nav-group",bt=class extends HTMLElement{static observedAttributes=["label","key","collapsed"];observer;drawnItems=-1;get label(){return this.getAttribute("label")??""}set label(e){C(this,"label",e)}get key(){return this.getAttribute("key")??this.label}set key(e){C(this,"key",e)}get collapsed(){return this.hasAttribute("collapsed")}set collapsed(e){this.toggleAttribute("collapsed",e)}get open(){return this.itemCount()===0||!Zn(this.key,this.collapsed)}connectedCallback(){b(this,"label"),b(this,"key"),b(this,"collapsed"),this.classList.add("lw-nav-group"),this.observer=new MutationObserver(()=>this.onChildren()),this.observer.observe(this,{childList:!0}),this.render()}disconnectedCallback(){this.observer?.disconnect(),this.observer=void 0}attributeChangedCallback(){this.isConnected&&this.render()}toggle(){this.itemCount()!==0&&(Vn(this.key,this.open),this.render())}onChildren(){this.itemCount()!==this.drawnItems&&this.render()}itemCount(){return[...this.children].filter(e=>e.localName===be).length}render(){let e=this.itemCount();this.drawnItems=e;let t=_e(this,"heading","button");if(t.className="lw-nav-group-heading",t.setAttribute("type","button"),t.toggleAttribute("disabled",e===0),e===0?t.removeAttribute("aria-expanded"):t.setAttribute("aria-expanded",String(this.open)),t.parentElement!==this&&(t.addEventListener("click",()=>this.toggle()),this.prepend(t)),e===0)ft(t,"chevron");else{let n=_e(t,"chevron",ue);n.setAttribute("name","chevronDown"),n.setAttribute("size","0.875rem"),n.className="lw-nav-chevron",n.parentElement!==t&&t.prepend(n)}let r=_e(t,"label","span");r.className="lw-nav-group-label",r.textContent=this.label,r.parentElement!==t&&t.append(r),this.dataset.open=String(this.open)}};var _o="lw-nav-tree",l5="lw-nav-select",bo=class extends HTMLElement{static observedAttributes=["current"];observer;get current(){return this.getAttribute("current")}set current(e){C(this,"current",e)}connectedCallback(){b(this,"current"),this.setAttribute("role","navigation"),this.classList.add("lw-nav-tree"),this.addEventListener("click",this.onClick),this.observer=new MutationObserver(()=>this.mark()),this.observer.observe(this,{childList:!0,subtree:!0,attributeFilter:["path"]}),this.mark()}disconnectedCallback(){this.removeEventListener("click",this.onClick),this.observer?.disconnect(),this.observer=void 0}attributeChangedCallback(){this.isConnected&&this.mark()}onClick=e=>{let t=e.target?.closest(be);!t||!this.owns(t)||this.dispatchEvent(new CustomEvent(l5,{detail:{path:xt(t)},bubbles:!0}))};mark(){let e=this.items(),t=this.current??void 0,r=Rn(e.map(n=>xt(n)),n=>Bn(t,n));for(let n of e)r!==null&&xt(n)===r?n.setAttribute("aria-current","page"):n.removeAttribute("aria-current")}items(){return[...this.querySelectorAll(be)].filter(e=>this.owns(e))}owns(e){return e.closest(_o)===this}};function In(){typeof customElements>"u"||(customElements.get(be)||customElements.define(be,_t),customElements.get(xo)||customElements.define(xo,bt),customElements.get(_o)||customElements.define(_o,bo))}var Pn="lw-progress-ring";var yo=class extends HTMLElement{static observedAttributes=["value","max","size"];connectedCallback(){this.render()}attributeChangedCallback(){this.isConnected&&this.render()}num(e,t){let r=this.getAttribute(e);if(r===null||r.trim()==="")return t;let n=Number(r);return Number.isFinite(n)?n:t}render(){let e=Math.max(this.num("max",100),1),t=Math.min(Math.max(this.num("value",0),0),e),r=Math.round(t/e*100),n=this.getAttribute("size")??"2.5rem";this.style.width=n,this.style.height=n,this.setAttribute("role","progressbar"),this.setAttribute("aria-valuenow",String(t)),this.setAttribute("aria-valuemin","0"),this.setAttribute("aria-valuemax",String(e)),this.innerHTML=`<svg class="lw-progress-ring-svg" viewBox="0 0 36 36" aria-hidden="true"><circle class="lw-progress-ring-track" cx="18" cy="18" r="${15.9155}"></circle><circle class="lw-progress-ring-value" cx="18" cy="18" r="${15.9155}" transform="rotate(-90 18 18)" stroke-dasharray="100" stroke-dashoffset="${100-r}"></circle><text class="lw-progress-ring-text" x="18" y="18">${r}%</text></svg>`}};function On(){typeof customElements<"u"&&!customElements.get(Pn)&&customElements.define(Pn,yo)}var qe="lw-option",yt=class extends HTMLElement{get value(){return this.getAttribute("value")}set value(e){C(this,"value",e)}get icon(){return this.getAttribute("icon")}set icon(e){C(this,"icon",e)}connectedCallback(){b(this,"value"),b(this,"icon")}};function Dn(o){return[...o.querySelectorAll(qe)].map(e=>({value:e.getAttribute("value")??"",label:(e.textContent??"").trim(),icon:e.getAttribute("icon"),disabled:e.hasAttribute("disabled")}))}function Nn(o){let e=document.createElement("button");e.type="button",e.className="lw-select-trigger",e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-expanded","false"),e.setAttribute("aria-controls",o.listboxId),e.style.setProperty("anchor-name",o.anchorName),e.addEventListener("click",o.onToggle),e.addEventListener("keydown",o.onKeydown);let t=document.createElement("span");t.className="lw-select-value";let r=document.createElement("span");return r.className="lw-select-chevron",r.setAttribute("aria-hidden","true"),r.textContent="\u25BE",e.append(t,r),{trigger:e,valueSlot:t}}function zn(o){let e=document.createElement("div");return e.id=o.listboxId,e.className="lw-select-listbox",e.setAttribute("role","listbox"),e.hidden=!0,e.style.setProperty("position-anchor",o.anchorName),e.addEventListener("keydown",o.onKeydown),e}function $n(o,e,t,r){o.textContent="",t&&o.append(Fn(t)),(!t||!r)&&o.append(document.createTextNode(e))}function Un(o){let e=o.choice,t=document.createElement("div");return t.className="lw-select-option",t.setAttribute("role","option"),t.id=o.id,t.dataset.value=e.value,t.setAttribute("aria-selected",String(o.selected)),t.tabIndex=-1,e.disabled&&t.setAttribute("aria-disabled","true"),e.icon&&t.append(Fn(e.icon)),t.append(document.createTextNode(e.label)),t.addEventListener("click",()=>{e.disabled||o.onPick()}),t.addEventListener("pointermove",o.onHover),t}function Fn(o){let e=document.createElement("span");return e.className="lw-select-glyph",e.setAttribute("aria-hidden","true"),e.textContent=o,e}var Gn="lw-select",c5="lw-select-change",h5=0,d5=500,Mo=class o extends HTMLElement{static observedAttributes=["value","label","placeholder","disabled","compact"];selectId=h5++;anchorName=`--lw-select-${this.selectId}`;listboxId=`lw-select-listbox-${this.selectId}`;open=!1;activeIndex=0;typeahead="";typeaheadTimer;trigger;valueSlot;listbox;observer;get value(){return this.getAttribute("value")}set value(e){C(this,"value",e)}get compact(){return this.hasAttribute("compact")}set compact(e){this.toggleAttribute("compact",e)}connectedCallback(){b(this,"value"),this.trigger||this.buildControl(),this.observer=new MutationObserver(()=>this.syncTrigger()),this.observe(),this.syncTrigger()}disconnectedCallback(){this.observer?.disconnect(),document.removeEventListener("pointerdown",this.onOutsidePointer,!0),this.typeaheadTimer!==void 0&&clearTimeout(this.typeaheadTimer)}attributeChangedCallback(e){this.trigger&&(o.observedAttributes.includes(e)&&this.syncTrigger(),e==="disabled"&&this.hasAttribute("disabled")&&this.close(!1))}onOutsidePointer=e=>{this.contains(e.target)||this.close(!1)};observe(){this.observer?.observe(this,{childList:!0,characterData:!0,subtree:!0,attributes:!0})}write(e){this.observer?.disconnect();try{e()}finally{this.observe()}}choices(){return Dn(this)}selectedChoice(){let e=this.value;return this.choices().find(t=>t.value===e)}buildControl(){let{trigger:e,valueSlot:t}=Nn({anchorName:this.anchorName,listboxId:this.listboxId,onToggle:()=>this.toggle(),onKeydown:n=>this.onTriggerKeydown(n)}),r=zn({anchorName:this.anchorName,listboxId:this.listboxId,onKeydown:n=>this.onListboxKeydown(n)});this.append(e,r),this.trigger=e,this.valueSlot=t,this.listbox=r}syncTrigger(){let e=this.trigger,t=this.valueSlot;if(!e||!t)return;let r=this.getAttribute("label"),n=this.selectedChoice(),s=n?.label??this.getAttribute("placeholder")??"",l=this.compact&&n?.icon!=null;this.write(()=>{e.disabled=this.hasAttribute("disabled"),r!==null&&(e.setAttribute("aria-label",l?`${r}: ${s}`:r),this.listbox?.setAttribute("aria-label",r)),$n(t,s,n?.icon??null,l)})}toggle(){this.open?this.close():this.openListbox()}openListbox(){let e=this.listbox,t=this.trigger;if(this.open||this.hasAttribute("disabled")||!e||!t)return;this.renderOptions(),this.open=!0,this.write(()=>{e.hidden=!1,t.setAttribute("aria-expanded","true")});let n=this.choices().findIndex(s=>s.value===this.value);this.setActive(Math.max(0,n)),document.addEventListener("pointerdown",this.onOutsidePointer,{capture:!0})}close(e=!0){let t=this.listbox,r=this.trigger;!this.open||!t||!r||(this.open=!1,this.write(()=>{t.hidden=!0,t.replaceChildren(),r.setAttribute("aria-expanded","false")}),document.removeEventListener("pointerdown",this.onOutsidePointer,!0),e&&r.focus())}renderOptions(){let e=this.listbox;if(!e)return;let t=this.choices().map((r,n)=>Un({choice:r,id:`${this.listboxId}-opt-${n}`,selected:r.value===this.value,onPick:()=>this.commit(r.value),onHover:()=>this.setActive(n)}));this.write(()=>e.replaceChildren(...t))}setActive(e){if(!this.listbox)return;let t=[...this.listbox.children];if(t.length===0)return;this.activeIndex=Math.max(0,Math.min(e,t.length-1)),this.write(()=>{for(let[n,s]of t.entries())s.classList.toggle("is-active",n===this.activeIndex),s.tabIndex=n===this.activeIndex?0:-1});let r=t[this.activeIndex];r.focus(),r.scrollIntoView?.({block:"nearest"})}onTriggerKeydown(e){["ArrowDown","ArrowUp","Enter"," "].includes(e.key)&&(e.preventDefault(),this.openListbox())}onListboxKeydown(e){let t=this.choices().length-1;switch(e.key){case"ArrowDown":{this.setActive(this.activeIndex>=t?0:this.activeIndex+1);break}case"ArrowUp":{this.setActive(this.activeIndex<=0?t:this.activeIndex-1);break}case"Home":{this.setActive(0);break}case"End":{this.setActive(t);break}case"Enter":case" ":{this.commitActive();break}case"Escape":{this.close();break}case"Tab":{this.close(!1);return}default:{e.key.length===1&&this.onTypeahead(e.key);return}}e.preventDefault()}onTypeahead(e){this.typeahead+=e.toLowerCase(),this.typeaheadTimer!==void 0&&clearTimeout(this.typeaheadTimer),this.typeaheadTimer=setTimeout(()=>this.typeahead="",d5);let t=this.choices().findIndex(r=>!r.disabled&&r.label.toLowerCase().startsWith(this.typeahead));t!==-1&&this.setActive(t)}commitActive(){let e=this.choices()[this.activeIndex];e&&!e.disabled&&this.commit(e.value)}commit(e){let t=e!==this.value;this.value=e,this.close(),t&&this.dispatchEvent(new CustomEvent(c5,{detail:{value:e},bubbles:!0}))}};function Wn(){typeof customElements>"u"||(customElements.get(qe)||customElements.define(qe,yt),customElements.get(Gn)||customElements.define(Gn,Mo))}var qn=600,Mt=6,Ye=4,u5=0,p5=16,w5=6,Yn="lw-tooltip",Ao=class extends HTMLElement{static observedAttributes=["text","position","delay-ms","max-width"];bubble;trigger;showTimer;pointer;get text(){return this.getAttribute("text")}set text(e){C(this,"text",e)}get position(){return this.getAttribute("position")??"top"}set position(e){C(this,"position",e)}connectedCallback(){b(this,"text"),b(this,"position"),this.render(),this.trigger=this.parentElement??void 0,this.trigger?.addEventListener("pointerenter",this.onEnter),this.trigger?.addEventListener("pointermove",this.onMove),this.trigger?.addEventListener("pointerleave",this.onLeave),this.trigger?.addEventListener("focusin",this.onFocusIn),this.trigger?.addEventListener("focusout",this.onFocusOut)}disconnectedCallback(){this.hide(),this.trigger?.removeEventListener("pointerenter",this.onEnter),this.trigger?.removeEventListener("pointermove",this.onMove),this.trigger?.removeEventListener("pointerleave",this.onLeave),this.trigger?.removeEventListener("focusin",this.onFocusIn),this.trigger?.removeEventListener("focusout",this.onFocusOut),this.trigger=void 0}attributeChangedCallback(){this.isConnected&&this.render()}onEnter=e=>this.scheduleShow(e);onMove=e=>{e.pointerType==="mouse"&&(this.pointer={x:e.clientX,y:e.clientY})};onLeave=()=>this.hide();onFocusIn=()=>this.scheduleShow();onFocusOut=()=>this.hide();render(){let e=(this.getAttribute("text")??"").trim();if(!e){this.bubble?.remove(),this.bubble=void 0;return}let t=this.bubble??this.createBubble();t.textContent=e,t.style.maxWidth=this.getAttribute("max-width")??"16rem"}createBubble(){let e=document.createElement("span");return e.className="lw-tooltip-bubble",e.setAttribute("role","tooltip"),e.setAttribute("popover","manual"),this.append(e),this.bubble=e,e}scheduleShow(e){e&&e.pointerType!=="mouse"||(this.pointer=e?{x:e.clientX,y:e.clientY}:void 0,this.clearTimer(),this.showTimer=setTimeout(()=>this.show(),this.delayMs()))}delayMs(){let e=this.getAttribute("delay-ms");if(e===null||e.trim()==="")return qn;let t=Number(e);return Number.isFinite(t)&&t>=0?t:qn}show(){let e=this.bubble;if(!(!e?.isConnected||typeof e.showPopover!="function")){try{e.showPopover()}catch{return}this.placeBubble(e)}}placeBubble(e){let t=e.getBoundingClientRect(),r,n;if(this.pointer){r=this.pointer.x+u5;let a=this.pointer.y+p5;n=a+t.height+Ye>window.innerHeight?this.pointer.y-t.height-w5:a}else if(this.trigger){let a=this.trigger.getBoundingClientRect(),h=a.left+a.width/2-t.width/2,p=a.top+a.height/2-t.height/2;switch(this.position){case"bottom":{[r,n]=[h,a.bottom+Mt];break}case"left":{[r,n]=[a.left-t.width-Mt,p];break}case"right":{[r,n]=[a.right+Mt,p];break}default:[r,n]=[h,a.top-t.height-Mt]}}else return;let s=window.innerWidth-t.width-Ye,l=window.innerHeight-t.height-Ye;e.style.left=`${Math.round(Math.max(Ye,Math.min(r,s)))}px`,e.style.top=`${Math.round(Math.max(Ye,Math.min(n,l)))}px`}hide(){this.clearTimer();let e=this.bubble;if(!(!e||typeof e.hidePopover!="function"))try{e.hidePopover()}catch{return}}clearTimer(){this.showTimer!==void 0&&(clearTimeout(this.showTimer),this.showTimer=void 0)}};function Kn(){typeof customElements<"u"&&!customElements.get(Yn)&&customElements.define(Yn,Ao)}var g5="data-lw-withhold";function v5(o){let e=document.documentElement;for(let[t,r]of Object.entries(o.tokens??{}))e.style.setProperty(t,r);if(o.rootFontSize&&(e.style.fontSize=o.rootFontSize),o.theme){let t=o.theme==="dark";e.classList.toggle("dark",t),document.body?.classList.toggle("dark",t)}m5(o.icons)}function m5(o){let e=Object.entries(o??{});if(e.length!==0){for(let[t,r]of e)eo(t,Jt(r));for(let t of document.querySelectorAll(ue))t.refresh()}}function k5(){let o=new Map,e,t=r=>{let n=o.get(r);if(n)return n;let s={value:void 0,loaded:!1,listeners:[]};return o.set(r,s),e?.stateWatch(r),s};return{connect(r){e=r;for(let n of o.keys())r.stateWatch(n)},apply(r,n,s){let l=t(r);l.value=n,l.loaded=s;for(let a of l.listeners)a(n,s)},watch(r){let n=t(r);return{value:()=>n.value,loaded:()=>n.loaded,set:s=>{n.value=s,e?.stateSet(r,s)},clear:()=>{n.value=void 0,e?.stateClear(r)},dispose:()=>{o.delete(r),e?.stateUnwatch(r)},onChange:s=>{n.listeners.push(s)}}}}}var Xn=new URL("snapdom.global.js",document.currentScript?.src??location.href).href,Co;function f5(){return Co??=new Promise((o,e)=>{let t=document.createElement("script");t.src=Xn,t.addEventListener("load",()=>o()),t.addEventListener("error",()=>{Co=void 0,e(new Error(`the surface renderer could not be loaded from ${Xn}`))}),document.head.append(t)}),Co}var x5=`[${CSS.escape(g5)}]`;function _5(o){return[...o.querySelectorAll(x5)].filter(e=>e!==document.body&&e!==document.documentElement)}function b5(o,e,t,r){let n=_5(e);if(n.length===0)return;let s=o.getContext("2d");if(!s)return;let l=e.getBoundingClientRect();for(let a of n){let h=a.getBoundingClientRect();er(s,(h.left-l.left)*t,(h.top-l.top)*t,h.width*t,h.height*t,r)}}async function Qn(o){await f5();let e=globalThis.LwSnapdom;if(!e)throw new Error("the surface renderer did not install itself");let t=document.body??document.documentElement,r=tr(o?.scale??devicePixelRatio),n=await e.snapdom.toCanvas(t,{scale:r});return b5(n,t,r,o?.withheldLabel??""),{image:n.toDataURL(o?.mediaType??"image/png",o?.quality),width:n.width,height:n.height}}function y5(){Kn(),Wn(),En(),nr(),An(),sn(),On(),In();let o=k5(),e={setIcon:(t,r)=>eo(t,Jt(r)),removeIcon:nn,hasIcon:rn,applySurfaceState:v5,connectState:t=>(o.connect(t),o),state:o,capture:Qn,surfaceMethods:t=>({...t,capture:Qn})};return globalThis.LwFrame=e,e}y5();})();
69
69
  /*! Bundled license information:
70
70
 
71
71
  dompurify/dist/purify.es.mjs: