1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DLt6aX47.js","./BJ-8wcDK.js","./entry.BuR1r4uC.css"])))=>i.map(i=>d[i]); 2import{L as Ir,a8 as vr,E as Lr,j as $n,I as Cr,ae as g,F as re,aM as Tt,_ as f,e as v,aK as Or,h as A,ah as P,aL as z,aJ as Q,r as Xt,c as Nr,bN as Mr,V as Pr,ai as h,af as T,n as N,ao as F,m as Ce,aQ as Kt,aI as Un,aH as zr,l as $r,bS as Ur}from"./BJ-8wcDK.js";import Fr from"./BGtasuda.js";import Br from"./BsiThJPx.js";import Hr from"./D6h1pJQZ.js";import Wr from"./CUq_Q3Do.js";import Dr from"./CZPqKB7V.js";import jr from"./Dj8QggB4.js";import qr from"./CGgFrDYw.js";import Vr from"./9sFQgbR2.js";import{c as Xe,a as $,d as Ke}from"./BLwm6qNg.js";import{a as Fn,f as Yr}from"./Crf3DMPw.js";import{V as Oe}from"./DUkNh-op.js";import{V as ze}from"./d1BVNX0v.js";import{a as Zr,V as Xr}from"./DN4g89QP.js";import{V as Kr}from"./DZaX1b8o.js";import{V as Gr}from"./DyDlyf1g.js";const Bn=t=>{const e=new Date;return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()};function Hn(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,s=Array(e);n<e;n++)s[n]=t[n];return s}function Qr(t){if(Array.isArray(t))return t}function Jr(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var s,r,o,a,c=[],d=!0,p=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(d=(s=o.call(n)).done)&&(c.push(s.value),c.length!==e);d=!0);}catch(y){p=!0,r=y}finally{try{if(!d&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(p)throw r}}return c}}function es(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ts(t,e){return Qr(t)||Jr(t,e)||ns(t,e)||es()}function ns(t,e){if(t){if(typeof t=="string")return Hn(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hn(t,e):void 0}}const ar=Object.entries,Wn=Object.setPrototypeOf,rs=Object.isFrozen,ss=Object.getPrototypeOf,is=Object.getOwnPropertyDescriptor;let ae=Object.freeze,pe=Object.seal,tt=Object.create,cr=typeof Reflect<"u"&&Reflect,nn=cr.apply,rn=cr.construct;ae||(ae=function(e){return e});pe||(pe=function(e){return e});nn||(nn=function(e,n){for(var s=arguments.length,r=new Array(s>2?s-2:0),o=2;o<s;o++)r[o-2]=arguments[o];return e.apply(n,r)});rn||(rn=function(e){for(var n=arguments.length,s=new Array(n>1?n-1:0),r=1;r<n;r++)s[r-1]=arguments[r];return new e(...s)});const $e=X(Array.prototype.forEach),os=X(Array.prototype.lastIndexOf),Dn=X(Array.prototype.pop),Ge=X(Array.prototype.push),ls=X(Array.prototype.splice),le=Array.isArray,pt=X(String.prototype.toLowerCase),Gt=X(String.prototype.toString),jn=X(String.prototype.match),Qe=X(String.prototype.replace),qn=X(String.prototype.indexOf),as=X(String.prototype.trim),cs=X(Number.prototype.toString),us=X(Boolean.prototype.toString),Vn=typeof BigInt>"u"?null:X(BigInt.prototype.toString),Yn=typeof Symbol>"u"?null:X(Symbol.prototype.toString),H=X(Object.prototype.hasOwnProperty),ct=X(Object.prototype.toString),te=X(RegExp.prototype.test),Je=ps(TypeError);function X(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,s=new Array(n>1?n-1:0),r=1;r<n;r++)s[r-1]=arguments[r];return nn(t,e,s)}}function ps(t){return function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return rn(t,n)}}function E(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pt;if(Wn&&Wn(t,null),!le(e))return t;let s=e.length;for(;s--;
vendor: 4,415 bytes, line 3
3){let r=e[s];if(typeof r=="string"){const o=n(r);o!==r&&(rs(e)||(e[s]=o),r=o)}t[r]=!0}return t}function hs(t){for(let e=0;e<t.length;e++)H(t,e)||(t[e]=null);return t}function se(t){const e=tt(null);for(const s of ar(t)){var n=ts(s,2);const r=n[0],o=n[1];H(t,r)&&(le(o)?e[r]=hs(o):o&&typeof o=="object"&&o.constructor===Object?e[r]=se(o):e[r]=o)}return e}function ds(t){switch(typeof t){case"string":return t;case"number":return cs(t);case"boolean":return us(t);case"bigint":return Vn?Vn(t):"0";case"symbol":return Yn?Yn(t):"Symbol()";case"undefined":return ct(t);case"function":case"object":{if(t===null)return ct(t);const e=t,n=_e(e,"toString");if(typeof n=="function"){const s=n(e);return typeof s=="string"?s:ct(s)}return ct(t)}default:return ct(t)}}function _e(t,e){for(;t!==null;){const s=is(t,e);if(s){if(s.get)return X(s.get);if(typeof s.value=="function")return X(s.value)}t=ss(t)}function n(){return null}return n}function fs(t){try{return te(t,""),!0}catch{return!1}}const Zn=ae(["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"]),Qt=ae(["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"]),Jt=ae(["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"]),ms=ae(["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"]),en=ae(["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"]),gs=ae(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Xn=ae(["#text"]),Kn=ae(["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","
3spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),tn=ae(["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","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-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"]),Gn=ae(["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"]),wt=ae(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),bs=pe(/{{[\w\W]*|^[\w\W]*}}/g),ks=pe(/<%[\w\W]*|^[\w\W]*%>/g),ys=pe(/\${[\w\W]*/g),xs=pe(/^data-[\-\w.\u00B7-\uFFFF]+$/),_s=pe(/^aria-[\-\w]+$/),Qn=pe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ts=pe(/^(?:\w+script|data):/i),ws=pe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ss=pe(/^html$/i),As=pe(/^[a-z][.\w]*(-[.\w]+)+$/i),xe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Es=function(){return typeof window>"u"?null:window},Rs=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let s=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(s=n.getAttribute(r));const o="dompurify"+(s?"#"+s:"");try{return e.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Jn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ur(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Es();const e=k=>ur(k);if(e.version="3.4.8",e.removed=[],!t||!t.document||t.document.nodeType!==xe.document||!t.Element)return e.isSupported=!1,e;let n=t.document;const s=n,r=s.currentScript;t.DocumentFragment;const o=t.HTMLTemplateElement,a=t.Node,c=t.Element,d=t.NodeFilter,p=t.NamedNodeMap;p===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const y=t.DOMParser,b=t.trustedTypes,S=c.prototype,U=_e(S,"cloneNode"),O=_e(S,"remove"),ce=_e(S,"nextSibling"),we=_e(S,"childNodes"),Se=_e(S,"parentNode"),Ae=_e(S,"shadowRoot"),rt=_e(S,"attributes"),ee=a&&a.prototype?_e(a.prototype,"nodeType"):null,oe=a&&a.prototype?_e(a.prototype,"nodeName"):null;if(typeof o=="function"){const k=n.createElement("template");k.content&&k.content.ownerDocument&&(n=k.content.ownerDocument)}let W,Ie="",_=0;const x=function(i){if(_>0)throw Je('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');_++;try{return W.createHTML(i)}finally{_--}},D=n,V=D.implementation,be=D.createNodeIterator,Ee=D.createDocumentFragment,st=
3D.getElementsByTagName,Lt=s.importNode;let Y=Jn();e.isSupported=typeof ar=="function"&&typeof Se=="function"&&V&&V.createHTMLDocument!==void 0;const He=bs,We=ks,he=ys,Ct=xs,w=_s,Ot=Ts,l=ws,Nt=As;let ne=Qn,B=null;const Mt=E({},[...Zn,...Qt,...Jt,...en,...Xn]);let Z=null;const Pt=E({},[...Kn,...tn,...Gn,...wt]);let j=Object.seal(tt(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,ft=null;const ve=Object.seal(tt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let bn=!0,zt=!0,kn=!1,yn=!0,Le=!1,ot=!0,Me=!1,$t=!1,Ut=!1,De=!1,mt=!1,gt=!1,xn=!0,_n=!1;const Tn="user-content-";let Ft=!0,lt=!1,je={},ke=null;const Bt=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let wn=null;const Sn=E({},["audio","video","img","source","image","track"]);let Ht=null;const An=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bt="http://www.w3.org/1998/Math/MathML",kt="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let qe=ye,Wt=!1,Dt=null;const _r=E({},[bt,kt,ye],Gt);let jt=E({},["mi","mo","mn","ms","mtext"]),qt=E({},["annotation-xml"]);const Tr=E({},["title","style","font","a","script"]);let at=null;const wr=["application/xhtml+xml","text/html"],Sr="text/html";let q=null,Ve=null;const Ar=n.createElement("form"),En=function(i){return i instanceof RegExp||i instanceof Function},Vt=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ve&&Ve===i)return;(!i||typeof i!="object")&&(i={}),i=se(i),at=wr.indexOf(i.PARSER_MEDIA_TYPE)===-1?Sr:i.PARSER_MEDIA_TYPE,q=at==="application/xhtml+xml"?Gt:pt,B=H(i,"ALLOWED_TAGS")&&le(i.ALLOWED_TAGS)?E({},i.ALLOWED_TAGS,q):Mt,Z=H(i,"ALLOWED_ATTR")&&le(i.ALLOWED_ATTR)?E({},i.ALLOWED_ATTR,q):Pt,Dt=H(i,"ALLOWED_NAMESPACES")&&le(i.ALLOWED_NAMESPACES)?E({},i.ALLOWED_NAMESPACES,Gt):_r,Ht=H(i,"ADD_URI_SAFE_ATTR")&&le(i.ADD_URI_SAFE_ATTR)?E(se(An),i.ADD_URI_SAFE_ATTR,q):An,wn=H(i,"ADD_DATA_URI_TAGS")&&le(i.ADD_DATA_URI_TAGS)?E(se(Sn),i.ADD_DATA_URI_TAGS,q):Sn,ke=H(i,"FORBID_CONTENTS")&&le(i.FORBID_CONTENTS)?E({},i.FORBID_CONTENTS,q):Bt,it=H(i,"FORBID_TAGS")&&le(i.FORBID_TAGS)?E({},i.FORBID_TAGS,q):se({}),ft=H(i,"FORBID_ATTR")&&le(i.FORBID_ATTR)?E({},i.FORBID_ATTR,q):se({}),je=H(i,"USE_PROFILES")?i.USE_PROFILES&&typeof i.USE_PROFILES=="object"?se(i.USE_PROFILES):i.USE_PROFILES:!1,bn=i.ALLOW_ARIA_ATTR!==!1,zt=i.ALLOW_DATA_ATTR!==!1,kn=i.ALLOW_UNKNOWN_PROTOCOLS||!1,yn=i.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Le=i.SAFE_FOR_TEMPLATES||!1,ot=i.SAFE_FOR_XML!==!1,Me=i.WHOLE_DOCUMENT||!1,De=i.RETURN_DOM||!1,mt=i.RETURN_DOM_FRAGMENT||!1,gt=i.RETURN_TRUSTED_TYPE||!1,Ut=i.FORCE_BODY||!1,xn=i.SANITIZE_DOM!==!1,_n=i.SANITIZE_NAMED_PROPS||!1,Ft=i.KEEP_CONTENT!==!1,lt=i.IN_PLACE||!1,ne=fs(i.ALLOWED_URI_REGEXP)?i.ALLOWED_URI_REGEXP:Qn,qe=typeof i.NAMESPACE=="string"?i.NAMESPACE:ye,jt=H(i,"MATHML_TEXT_INTEGRATION_POINTS")&&i.MATHML_TEXT_INTEGRATION_POINTS&&typeof i.MATHML_TEXT_INTEGRATION_POINTS=="object"?se(i.MATHML_TEXT_INTEGRATION_POINTS):E({},["mi","mo","mn","ms","mtext"]),qt=H(i,"HTML_INTEGRATION_POINTS")&&i.HTML_INTEGRATION_POINTS&&typeof i.HTML_INTEGRATION_POINTS=="object"?se(i.HTML_INTEGRATION_POINTS):E({},["annotation-xml"]);const u=H(i,"CUSTOM_ELEMENT_HANDLING")&&i.CUSTOM_ELEMENT_HANDLING&&typeof i.CUSTOM_ELEMENT_HANDLING=="object"?se(i.CUSTOM_ELEMENT_HANDLING):tt(null);if(j=tt(null),H(u,"tagNameCheck")&&En(u.tagNameCheck)&&(j.tagNameCheck=u.tagNameCheck),H(u,"attributeNameCheck")&&En(u.attributeNameCheck)&&(j.attributeNameCheck=u.attributeNameCheck),H(u,"allowCustomizedBuiltInElements")&&typeof u.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=u.allowCustomizedBuiltInElements),Le&&(zt=!1),mt&&(De=!0),je&&(B=E({},Xn),Z=tt(null),je.html===!0&&(E(B,Zn),E(Z,Kn)),je.svg===!0&&(E(B,Qt),E(Z,tn),E(Z,wt)),je.svgFilters===!0&&(E(B,Jt),E(Z,tn),E(Z,wt)),je.mathMl===!0&&(E(B,en),E(Z,Gn),E(Z,wt))),ve.tagCheck=null,ve.attributeCheck=null,H(i,"ADD_TAGS")&&(typeof i.ADD_TAGS=="function"?ve.tagCheck=i.ADD_TAGS:le(i.ADD_TAGS)&&(B===Mt&&(B=se(B)),E(B,i.ADD_TAGS,q))),H(i,"ADD_ATTR")&&(typeof i.ADD_ATTR=="function"?ve.attributeCheck=i.ADD_ATTR:le(i.ADD_ATTR)&&(Z===Pt&&(Z=se(Z)),E(Z,i.ADD_ATTR,q))),H(i,"ADD_URI_SAFE_ATTR")&&le(i.ADD_URI_SAFE_ATTR)&&E(Ht,i.ADD_URI_SAFE_ATTR,q),H(i,"FORBID_CONTENTS")&&le(i.FORBID_CONTENTS)&&(ke===Bt&&(ke=se(ke)),E(ke,i.FORBID_CONTENTS,q)),H(i,"ADD_FORBID_CONTENTS")&&le(i.ADD_FORBID_CONTENTS)&&(ke===Bt&&(ke=se(ke)),E(ke,i.ADD_FORBID_CONTENTS,q)),Ft&&(B["#text"]=!0),Me&&E(B,["html","head","body"]),B.table&&(E(B,["tbody"]),delete it.tbody),i.TRUSTED_TYPES_POLICY){if(typeof i.TRUSTED_TYPES_POLICY.createHTML!="function")throw Je('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof i.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Je('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const m=W;W=i.TRUSTED_TYPES_POLICY;try{Ie=x("")}catch(L){throw W=m,L}}else W===void 0&&i.TRUSTED_TYPES_POLICY!==null&&(W=Rs(b,r)),W&&typeof Ie=="string"&&(Ie=x(""));(Y.uponSanitizeElement.length>0||Y.uponSanitizeAttribute.length>0)&&B===Mt&&(B=se(B)),Y.uponSanitizeAttribute.length>0&&Z===Pt&&(Z=se(Z)),ae&&ae(i),Ve=i},Rn=E({},[...Qt,...Jt,...ms]),In=E({},[...en,...gs]),Er=function(i){let u=Se(i);(!u||!u.tagName)&&(u={namespaceURI:qe,tagName:"template"});const m=pt(i.tagName),L=pt(u.tagName);return Dt[i.namespaceURI]?i.namespaceURI===kt?u.namespaceURI===ye?m==="svg":u.namespaceURI===bt?m==="svg"&&(L==="annotation-xml"||jt[L]):!!Rn[m]:i.namespaceURI===bt?u.namespaceURI===ye?m==="math":u.namespaceURI===kt?m==="math"&&qt[L]:!!In[m]:i.namespaceURI===ye?u.namespaceURI===kt&&!qt[L]||u.namespaceURI===bt&&!jt[L]?!1:!In[m]&&(Tr[m]||!Rn[m]):!!(at==="application/xhtml+xml"&&Dt[i.namespaceURI]):!1},de=function(i){Ge(e.removed,{element:i});try{Se(i).removeChild(i)}catch{O(i)}},Pe=function(i,u){try{Ge(e.removed,{attribute:u.getAttributeNode(i),from:u})}catch{Ge(e.removed,{attribute:null,from:u})}if(u.removeAttribute(i),i==="is")if(De||mt)try{de(u)}catch{}else try{u.setAttribute(i,"")}catch{}},vn=function(i){let u=null,m=null;if(Ut)i="<remove></remove>"+i;else{const M=jn(i,/^[\r\n\t ]+/);m=M&&M[0]}at==="application/xhtml+xml"&&qe===ye&&(i='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+i+"</body></html>");const L=W?x(i):i;if(qe===ye)try{u=new y().parseFromString(L,at)}catch{}if(!u||!u.documentElement){u=V.createDocument(qe,"template",null);try{u.documentElement.innerHTML=Wt?Ie:L}catch{}}const R=u.body||u.documentElement;return i&&m&&R.insertBefore(n.createTextNode(m),R.childNodes[0]||null),qe===ye?st.call(u,Me?"html":"body")[0]:Me?u.documentElement:R},Ln=function(i){return be.call(i.ownerDocument||i,i,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Yt=function(i){var u,m;i.normalize();const L=be.call(i.ownerDocument||i,i,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null);let R=L.nextNode();for(;R;){let G=R.data;$e([He,We,he],ue=>{G=Qe(G,ue," ")}),R.data=G,R=L.nextNode()}const M=(u=(m=i.querySelectorAll)===null||m===void 0?void 0:m.call(i,"template"))!==null&&u!==void 0?u:[];$e(Array.from(M),G=>{Ye(G.content)&&Yt(G.content)})},yt=function(i){const u=oe?oe(i):null;return typeof u!="string"||q(u)!=="form"?!1:typeof i.nodeName!="string"||typeof i.textContent!="string"||typeof i.removeChild!="function"||i.attributes!==rt(i)||typeof i.removeAttribute!="function"||typeof i.setAttribute!="function"||typeof i.namespaceURI!="string"||typeof i.insertBefore!="function"||typeof i.hasChildNodes!="function"||i.nodeType!==ee(i)||i.childNodes!==we(i)},Ye=function(i){if(!ee||typeof i!="object"||i===null)return!1;try{return ee(i)===xe.documentFragment}catch{return!1}},xt=function(i){if(!ee||typeof i!="object"||i===null)return!1;try{return typeof ee(i)=="number"}catch{return!1}};function Re(k,i,u){$e(k,m=>{m.call(e,i,u,Ve)})}const Cn=function(i){let u=null;if(Re(Y.beforeSanitizeElements,i,null),yt(i))return de(i),!0;const m=q(oe?oe(i):i.nodeName);if(Re(Y.uponSanitizeElement,i,{tagName:m,allowedTags:B}),ot&&i.hasChildNodes()&&!xt(i.firstElementChild)&&te(/<[/\w!]/g,i.innerHTML)&&te(/<[/\w!]/g,i.textContent)||ot&&i.namespaceURI===ye&&m==="style"&&xt(i.firstElementChild)||i.nodeType===xe.progressingInstruction||ot&&i.nodeType===xe.comment&&te(/<[/\w]/g,i.data))return de(i),!0;if(it[m]||!(ve.tagCheck instanceof Function&&ve.tagCheck(m))&&!B[m]){if(!it[m]&&Nn(m)&&(j.tagNameCheck instanceof RegExp&&te(j.tagNameCheck,m)||j.tagNameCheck instanceof Function&&j.tagNameCheck(m)))return!1;if(Ft&&!ke[m]){const R=Se(i),M=we(i);if(M&&R){const G=M.length;for(let ue=G-1;ue>=0;--ue){const fe=U(M[ue],!0);R.insertBefore(fe,ce(i))}}}return de(i),!0}return(ee?ee(i):i.nodeType)===xe.element&&!Er(i)||(m==="noscript"||m==="noembed"||m==="noframes")&&te(/<\/no(script|embed|frames)/i,i.innerHTML)?(de(i),!0):(Le&&i.nodeType===xe.text&&(u=i.textContent,$e([He,We,he],R=>{u=Qe(u,R," ")}),i.textContent!==u&&(Ge(e.removed,{element:i.cloneNode()}),i.textContent=u)),Re(Y.afterSanitizeElements,i,null),!1)},On=function(i,u,m){if(ft[u]||xn&&(u==="id"||u==="name")&&(m in n||m in Ar))return!1;const L=Z[u]||ve.attributeCheck instanceof Function&&ve.attributeCheck(u,i);
3if(!(zt&&!ft[u]&&te(Ct,u))){if(!(bn&&te(w,u))){if(!L||ft[u]){if(!(Nn(i)&&(j.tagNameCheck instanceof RegExp&&te(j.tagNameCheck,i)||j.tagNameCheck instanceof Function&&j.tagNameCheck(i))&&(j.attributeNameCheck instanceof RegExp&&te(j.attributeNameCheck,u)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(u,i))||u==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&te(j.tagNameCheck,m)||j.tagNameCheck instanceof Function&&j.tagNameCheck(m))))return!1}else if(!Ht[u]){if(!te(ne,Qe(m,l,""))){if(!((u==="src"||u==="xlink:href"||u==="href")&&i!=="script"&&qn(m,"data:")===0&&wn[i])){if(!(kn&&!te(Ot,Qe(m,l,"")))){if(m)return!1}}}}}}return!0},Rr=E({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Nn=function(i){return!Rr[pt(i)]&&te(Nt,i)},Mn=function(i){Re(Y.beforeSanitizeAttributes,i,null);const u=i.attributes;if(!u||yt(i))return;const m={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0};let L=u.length;for(;L--;){const R=u[L],M=R.name,G=R.namespaceURI,ue=R.value,fe=q(M),Zt=ue;let J=M==="value"?Zt:as(Zt);if(m.attrName=fe,m.attrValue=J,m.keepAttr=!0,m.forceKeepAttr=void 0,Re(Y.uponSanitizeAttribute,i,m),J=m.attrValue,_n&&(fe==="id"||fe==="name")&&qn(J,Tn)!==0&&(Pe(M,i),J=Tn+J),ot&&te(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,J)){Pe(M,i);continue}if(fe==="attributename"&&jn(J,"href")){Pe(M,i);continue}if(m.forceKeepAttr)continue;if(!m.keepAttr){Pe(M,i);continue}if(!yn&&te(/\/>/i,J)){Pe(M,i);continue}Le&&$e([He,We,he],zn=>{J=Qe(J,zn," ")});const Pn=q(i.nodeName);if(!On(Pn,fe,J)){Pe(M,i);continue}if(W&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!G)switch(b.getAttributeType(Pn,fe)){case"TrustedHTML":{J=x(J);break}case"TrustedScriptURL":{J=W.createScriptURL(J);break}}if(J!==Zt)try{G?i.setAttributeNS(G,M,J):i.setAttribute(M,J),yt(i)?de(i):Dn(e.removed)}catch{Pe(M,i)}}Re(Y.afterSanitizeAttributes,i,null)},_t=function(i){let u=null;const m=Ln(i);for(Re(Y.beforeSanitizeShadowDOM,i,null);u=m.nextNode();)if(Re(Y.uponSanitizeShadowNode,u,null),Cn(u),Mn(u),Ye(u.content)&&_t(u.content),(ee?ee(u):u.nodeType)===xe.element){const R=Ae?Ae(u):u.shadowRoot;Ye(R)&&(Ze(R),_t(R))}Re(Y.afterSanitizeShadowDOM,i,null)},Ze=function(i){const u=ee?ee(i):i.nodeType;if(u===xe.element){const R=Ae?Ae(i):i.shadowRoot;Ye(R)&&(Ze(R),_t(R))}const m=we?we(i):i.childNodes;if(!m)return;const L=[];$e(m,R=>{Ge(L,R)});for(const R of L)Ze(R);if(u===xe.element){const R=oe?oe(i):null;if(typeof R=="string"&&q(R)==="template"){const M=i.content;Ye(M)&&Ze(M)}}};return e.sanitize=function(k){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=null,m=null,L=null,R=null;if(Wt=!k,Wt&&(k="<!-->"),typeof k!="string"&&!xt(k)&&(k=ds(k),typeof k!="string"))throw Je("dirty is not a string, aborting");if(!e.isSupported)return k;if($t||Vt(i),e.removed=[],typeof k=="string"&&(lt=!1),lt){const ue=oe?oe(k):k.nodeName;if(typeof ue=="string"){const fe=q(ue);if(!B[fe]||it[fe])throw Je("root node is forbidden and cannot be sanitized in-place")}if(yt(k))throw Je("root node is clobbered and cannot be sanitized in-place");Ze(k)}else if(xt(k))u=vn("<!---->"),m=u.ownerDocument.importNode(k,!0),m.nodeType===xe.element&&m.nodeName==="BODY"||m.nodeName==="HTML"?u=m:u.appendChild(m),Ze(m);else{if(!De&&!Le&&!Me&&k.indexOf("<")===-1)return W&>?x(k):k;if(u=vn(k),!u)return De?null:gt?Ie:""}u&&Ut&&de(u.firstChild);const M=Ln(lt?k:u);for(;L=M.nextNode();)Cn(L),Mn(L),Ye(L.content)&&_t(L.content);if(lt)return Le&&Yt(k),k;if(De){if(Le&&Yt(u),mt)for(R=Ee.call(u.ownerDocument);u.firstChild;)R.appendChild(u.firstChild);else R=u;return(Z.shadowroot||Z.shadowrootmode)&&(R=Lt.call(s,R,!0)),R}let G=Me?u.outerHTML:u.innerHTML;return Me&&B["!doctype"]&&u.ownerDocument&&u.ownerDocument.doctype&&u.ownerDocument.doctype.name&&te(Ss,u.ownerDocument.doctype.name)&&(G="<!DOCTYPE "+u.ownerDocument.doctype.name+`> 4`+G),Le&&$e([He,We,he],ue=>{G=Qe(G,ue," ")}),W&>?x(G):G},e.setConfig=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vt(k),$t=!0},e.clearConfig=function(){Ve=null,$t=!1},e.isValidAttribute=function(k,i,u){Ve||Vt({});const m=q(k),L=q(i);return On(m,L,u)},e.addHook=function(k,i){typeof i=="function"&&Ge(Y[k],i)},e.removeHook=function(k,i){if(i!==void 0){const u=os(Y[k],i);return u===-1?void 0:ls(Y[k],u,1)[0]}return Dn(Y[k])},e.removeHooks=function(k){Y[k]=[]},e.removeAllHooks=function(){Y=Jn()},e}var K=ur(),Is=K;K.sanitize.bind(K);K.isSupported;K.addHook.bind(K);K.removeHook.bind(K);K.removeHooks.bind(K);K.removeAllHooks.bind(K);K.setConfig.bind(K);K.clearConfig.bind(K);K.isValidAttribute.bind(K);K.version;K.removed;function an(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Be=an();function pr(t){Be=t}var Ue={exec:()=>null};function et(t){let e=[];return n=>{let s=Math.max(0,Math.min(3,n-1)),r=e[s];return r||(r=t(s),e[s]=r),r}}function I(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,o)=>
vendor: 4,256 bytes, line 4
4{let a=typeof o=="string"?o:o.source;return a=a.replace(ie.caret,"$1"),n=n.replace(r,a),s},getRegex:()=>new RegExp(n,e)};return s}var vs=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),ie={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:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:et(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:et(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:et(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:et(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:et(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:et(t=>new RegExp(`^ {0,${t}}>`))},Ls=/^(?:[ \t]*(?:\n|$))+/,Cs=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Os=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,dt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ns=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,cn=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,hr=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,dr=I(hr).replace(/bull/g,cn).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ms=I(hr).replace(/bull/g,cn).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),un=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ps=/^[^\n]+/,pn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,zs=I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",pn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),$s=I(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,cn).getRegex(),It="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",hn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Us=I("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>
4)[\\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",hn).replace("tag",It).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fr=I(un).replace("hr",dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",It).getRegex(),Fs=I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",fr).getRegex(),dn={blockquote:Fs,code:Cs,def:zs,fences:Os,heading:Ns,hr:dt,html:Us,lheading:dr,list:$s,newline:Ls,paragraph:fr,table:Ue,text:Ps},er=I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",It).getRegex(),Bs={...dn,lheading:Ms,table:er,paragraph:I(un).replace("hr",dt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",er).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",It).getRegex()},Hs={...dn,html:I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",hn).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:Ue,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:I(un).replace("hr",dt).replace("heading",` *#{1,6} *[^ 5]`).replace("lheading",dr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ws=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ds=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,mr=/^( {2,}|\\)\n(?!\s*$)/,js=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,nt=/[\p{P}\p{S}]/u,vt=/[\s\p{P}\p{S}]/u,fn=/[^\s\p{P}\p{S}]/u,qs=I(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,vt).getRegex(),gr=/(?!~)[\p{P}\p{S}]/u,Vs=/(?!~)[\s\p{P}\p{S}]/u,Ys=/(?:[^\s\p{P}\p{S}]|~)/u,Zs=I(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",vs?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),br=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Xs=I(br,"u").replace(/punct/g,nt).getRegex(),Ks=I(br,"u").replace(/punct/g,gr).getRegex(),kr="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Gs=I(kr,"gu").replace(/notPunctSpace/g,fn).replace(/punctSpace/g,vt).replace(/punct/g,nt).getRegex(),Qs=I(kr,"gu").replace(/notPunctSpace/g,Ys).replace(/punctSpace/g,Vs).replace(/punct/g,gr).getRegex(),Js=I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,fn).replace(/punctSpace/g,vt).replace(/punct/g,nt).getRegex(),ei=I(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,nt).getRegex(),ti="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",ni=I(ti,"gu").replace(/notPunctSpace/g,fn).replace(/punctSpace/g,vt).replace(/punct/g,nt).getRegex(),ri=I(/\\(punct)/,"gu").replace(/punct/g,nt).getRegex(),si=I(/^<(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(),ii=I(hn).replace("(?:-->|$)","-->").getRegex(),oi=I("^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",ii).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),At=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,li=I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",At).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),yr=I(/^!?\[(label)\]\[(ref)\]/).replace("label",At).replace("ref",pn).getRegex(),xr=I(/^!?\[(ref)\](?:\[\])?/).replace("ref",pn).getRegex(),ai=I("reflink|nolink(?!\\()","g").replace("reflink",yr).replace("nolink",xr).getRegex(),tr=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,mn={_backpedal:Ue,anyPunctuation:ri,autolink:si,blockSkip:Zs,br:mr,code:Ds,del:Ue,delLDelim:Ue,delRDelim:Ue,emStrongLDelim:Xs,emStrongRDelimAst:Gs,emStrongRDelimUnd:Js,escape:Ws,link:li,nolink:xr,punctuation:qs,reflink:yr,reflinkSearch:ai,tag:oi,text:js,url:Ue},ci={...mn,link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",At).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",At).getRegex()},sn={...mn,emStrongRDelimAst:Qs,emStrongLDelim:Ks,delLDelim:ei,delRDelim:ni,url:I(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",tr).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:I(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",tr).getRegex()},ui={...sn,br:I(mr).replace("{2,}","*").getRegex(),text:I(sn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},St={normal:dn,gfm:Bs,pedantic:Hs}
vendor: 13,827 bytes, lines 5-35
5,ut={normal:mn,gfm:sn,breaks:ui,pedantic:ci},pi={"&":"&","<":"<",">":">",'"':""","'":"'"},nr=t=>pi[t];function Te(t,e){if(e){if(ie.escapeTest.test(t))return t.replace(ie.escapeReplace,nr)}else if(ie.escapeTestNoEncode.test(t))return t.replace(ie.escapeReplaceNoEncode,nr);return t}function rr(t){try{t=encodeURI(t).replace(ie.percentDecode,"%")}catch{return null}return t}function sr(t,e){let n=t.replace(ie.findPipe,(o,a,c)=>{let d=!1,p=a;for(;--p>=0&&c[p]==="\\";)d=!d;return d?"|":" |"}),s=n.split(ie.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(ie.slashPipe,"|");return s}function Ne(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s&&t.charAt(s-r-1)===e;)r++;return t.slice(0,s-r)}function ir(t){let e=t.split(` 6`),n=e.length-1;for(;n>=0&&ie.blankLine.test(e[n]);)n--;return e.length-n<=2?t:e.slice(0,n+1).join(` 7`)}function hi(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function di(t,e=0){let n=e,s="";for(let r of t)if(r===" "){let o=4-n%4;s+=" ".repeat(o),n+=o}else s+=r,n++;return s}function or(t,e,n,s,r){let o=e.href,a=e.title||null,c=t[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let d={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:a,text:c,tokens:s.inlineTokens(c)};return s.state.inLink=!1,d}function fi(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(` 8`).map(o=>{let a=o.match(n.other.beginningSpace);if(a===null)return o;let[c]=a;return c.length>=r.length?o.slice(r.length):o}).join(` 9`)}var Et=class{options;rules;lexer;constructor(t){this.options=t||Be}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=this.options.pedantic?e[0]:ir(e[0]),s=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:s}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],s=fi(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let s=Ne(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:Ne(e[0],` 10`),depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Ne(e[0],` 11`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=Ne(e[0],` 12`).split(` 13`),s="",r="",o=[];for(;n.length>0;){let a=!1,c=[],d;for(d=0;d<n.length;d++)if(this.rules.other.blockquoteStart.test(n[d]))c.push(n[d]),a=!0;else if(!a)c.push(n[d]);else break;n=n.slice(d);let p=c.join(` 14`),y=p.replace(this.rules.other.blockquoteSetextReplace,` 15 $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s} 16${p}`:p,r=r?`${r} 17${y}`:y;let b=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(y,o,!0),this.lexer.state.top=b,n.length===0)break;let S=o.at(-1);if(S?.type==="code")break;if(S?.type==="blockquote"){let U=S,O=U.raw+` 18`+n.join(` 19`),ce=this.blockquote(O);o[o.length-1]=ce,s=s.substring(0,s.length-U.raw.length)+ce.raw,r=r.substring(0,r.length-U.text.length)+ce.text;break}else if(S?.type==="list"){let U=S,O=U.raw+` 20`+n.join(` 21`),ce=this.list(O);o[o.length-1]=ce,s=s.substring(0,s.length-S.raw.length)+ce.raw,r=r.substring(0,r.length-U.raw.length)+ce.raw,n=O.substring(o.at(-1).raw.length).split(` 22`);continue}}return{type:"blockquote",raw:s,tokens:o,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let o=this.rules.other.listItemRegex(n),a=!1;for(;t;){let d=!1,p="",y="";if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;p=e[0],t=t.substring(p.length);let b=di(e[2].split(` 23`,1)[0],e[1].length),S=t.split(` 24`,1)[0],U=!b.trim(),O=0;if(this.options.pedantic?(O=2,y=b.trimStart()):U?O=e[1].length+1:(O=b.search(this.rules.other.nonSpaceChar),O=O>4?1:O,y=b.slice(O),O+=e[1].length),U&&this.rules.other.blankLine.test(S)&&(p+=S+` 25`,t=t.substring(S.length+1),d=!0),!d){let ce=this.rules.other.nextBulletRegex(O),we=this.rules.other.hrRegex(O),Se=this.rules.other.fencesBeginRegex(O),Ae=this.rules.other.headingBeginRegex(O),rt=this.rules.other.htmlBeginRegex(O),ee=this.rules.other.blockquoteBeginRegex(O);for(;t;){let oe=t.split(` 26`,1)[0],W;if(S=oe,this.options.pedantic?(S=S.replace(this.rules.other.listReplaceNesting," "),W=S):W=S.replace(this.rules.other.tabCharGlobal," "),Se.test(S)||Ae.test(S)||rt.test(S)||ee.test(S)||ce.test(S)||we.test(S))break;if(W.search(this.rules.other.nonSpaceChar)>=O||!S.trim())y+=` 27`+W.slice(O);else{if(U||b.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Se.test(b)||Ae.test(b)||we.test(b))break;y+=` 28`+S}U=!S.trim(),p+=oe+` 29`,t=t.substring(oe.length+1),b=W.slice(O)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(a=!0)),r.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(y),loose:!1,text:y,tokens:[]}),r.raw+=p}let c=r.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let d of r.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 b=this.lexer.inlineQueue.length-1;b>=0;b--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[b].src)){this.lexer.inlineQueue[b].src=this.lexer.inlineQueue[b].src.replace(this.rules.other.listReplaceTask,"");break}let y=this.rules.other.listTaskCheckbox.exec(d.raw);if(y){let b={type:"checkbox",raw:y[0]+" ",checked:y[0]!=="[ ]"};d.checked=b.checked,r.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=b.raw+d.tokens[0].raw,d.tokens[0].text=b.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(b)):d.tokens.unshift({type:"paragraph",raw:b.raw,text:b.raw,tokens:[b]}):d.tokens.unshift(b)}}else d.task&&(d.task=!1);if(!r.loose){let y=d.tokens.filter(S=>S.type==="space"),b=y.length>0&&y.some(S=>this.rules.other.anyLine.test(S.raw));r.loose=b}}if(r.loose)for(let d of r.items){d.loose=!0;for(let p of d.tokens)p.type==="text"&&(p.type="paragraph")}return r}}html(t){let e=this.rules.block.html.exec(t);if(e){let n=ir(e[0]);return{type:"html",block:!0,raw:n,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:n}}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:Ne(e[0],` 30`),href:s,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=sr(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(` 31`):[],o={type:"table",raw:Ne(e[0],` 32`),header:[],align:[],rows:[]};if(n.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?o.align.push("right"):this.rules.other.tableAlignCenter.test(a)?o.align.push("center"):this.rules.other.tableAlignLeft.test(a)?o.align.push("left"):o.align.push(null);for(let a=0;a<n.length;a++)o.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:o.align[a]});for(let a of r)o.rows.push(sr(a,o.header.length).map((c,d)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:o.align[d]})));return o}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:Ne(e[0],` 33`),depth:e[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===` 34`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);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(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=Ne(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=hi(e[2],"()");if(o===-2)return;if(o>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let s=e[2],r="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],r=o[3])}else r=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),or(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[s.toLowerCase()];if(!r){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return or(n,r,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,o,a,c=r,d=0,p=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*t.length+r);(s=p.exec(e))!==null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(a=[...o].length,s[3]||s[4]){c+=a;continue}else if((s[5]||s[6])&&r%3&&!((r+a)%3)){d+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c+d);let y=[...s[0]][0].length,b=t.slice(0,r+s.index+y+a);if(Math.min(r,a)%2){let U=b.slice(1,-1);return{type:"em",raw:b,text:U,tokens:this.lexer.inlineTokens(U)}}let S=b.slice(2,-2);return{type:"strong",raw:b,text:S,tokens:this.lexer.inlineTokens(S)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,o,a,c=r,d=this.rules.inline.delRDelim;for(d.lastIndex=0,e=e.slice(-1*t.length+r);(s=d.exec(e))!==null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o||(a=[...o].length,a!==r))continue;if(s[3]||s[4]){c+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c);let p=[...s[0]][0].length,y=t.slice(0,r+s.index+p+a),b=y.slice(r,-r);return{type:"del",raw:y,text:b,tokens:this.lexer.inlineTokens(b)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,s;return e[2]==="@"?(n=e[1],s="mailto:"+n):(n=e[1],s=n),{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},me=class on{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Be,this.options.tokenizer=this.options.tokenizer||new Et,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 n={other:ie,block:St.normal,inline:ut.normal};this.options.pedantic?(n.block=St.pedantic,n.inline=ut.pedantic):this.options.gfm&&(n.block=St.gfm,this.options.breaks?n.inline=ut.breaks:n.inline=ut.gfm),this.tokenizer.rules=n}static get rules(){return{block:St,inline:ut}}static lex(e,n){return new on(n).lex(e)}static lexInline(e,n){return new on(n).inlineTokens(e)}lex(e){e=e.replace(ie.carriageReturn,` 35`),this.blockTokens(e,this.tokens);for(let n=0;
vendor: 4,936 bytes, lines 35-48
35n<this.inlineQueue.length;n++){let s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(ie.tabCharGlobal," ").replace(ie.spaceLine,""));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let o;if(this.options.extensions?.block?.some(c=>(o=c.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=n.at(-1);o.raw.length===1&&c!==void 0?c.raw+=` 36`:n.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let c=n.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(` 37`)?"":` 38`)+o.raw,c.text+=` 39`+o.text,this.inlineQueue.at(-1).src=c.text):n.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let c=n.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(` 40`)?"":` 41`)+o.raw,c.text+=` 42`+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},n.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),n.push(o);continue}let a=e;if(this.options.extensions?.startBlock){let c=1/0,d=e.slice(1),p;this.options.extensions.startBlock.forEach(y=>{p=y.call({lexer:this},d),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(a=e.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(a))){let c=n.at(-1);s&&c?.type==="paragraph"?(c.raw+=(c.raw.endsWith(` 43`)?"":` 44`)+o.raw,c.text+=` 45`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(o),s=a.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let c=n.at(-1);c?.type==="text"?(c.raw+=(c.raw.endsWith(` 46`)?"":` 47`)+o.raw,c.text+=` 48`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let s=e,r=null;if(this.tokens.links){let p=Object.keys(this.tokens.links);if(p.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!==null;)p.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!==null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!==null;)o=r[2]?r[2].length:0,s=s.slice(0,r.index+o)+"["+"a".repeat(r[0].length-o-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let a=!1,c="",d=1/0;for(;e;){if(e.length<d)d=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}a||(c=""),a=!1;let p;if(this.options.extensions?.inline?.some(b=>(p=b.call({lexer:this},e,n))?(e=e.substring(p.raw.length),n.push(p),!0):!1))continue;if(p=this.tokenizer.escape(e)){e=e.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.tag(e)){e=e.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.link(e)){e=e.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(p.raw.length);let b=n.at(-1);p.type==="text"&&b?.type==="text"?(b.raw+=p.raw,b.text+=p.text):n.push(p);continue}if(p=this.tokenizer.emStrong(e,s,c)){e=e.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.codespan(e)){e=e.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.br(e)){e=e.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.del(e,s,c)){e=e.substring(p.raw.length),n.push(p);continue}if(p=this.tokenizer.autolink(e)){e=e.substring(p.raw.length),n.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(e))){e=e.substring(p.raw.length),n.push(p);continue}let y=e;if(this.options.extensions?.startInline){let b=1/0,S=e.slice(1),U;this.options.extensions.startInline.forEach(O=>{U=O.call({lexer:this},S),typeof U=="number"&&U>=0&&(b=Math.min(b,U))}),b<1/0&&b>=0&&(y=e.substring(0,b+1))}if(p=this.tokenizer.inlineText(y)){e=e.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(c=
vendor: 4,850 bytes, lines 48-66
48p.raw.slice(-1)),a=!0;let b=n.at(-1);b?.type==="text"?(b.raw+=p.raw,b.text+=p.text):n.push(p);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}infiniteLoopError(e){let n="Infinite loop on byte: "+e;if(this.options.silent)console.error(n);else throw new Error(n)}},Rt=class{options;parser;constructor(t){this.options=t||Be}space(t){return""}code({text:t,lang:e,escaped:n}){let s=(e||"").match(ie.notSpaceStart)?.[0],r=t.replace(ie.endingNewline,"")+` 49`;return s?'<pre><code class="language-'+Te(s)+'">'+(n?r:Te(r,!0))+`</code></pre> 50`:"<pre><code>"+(n?r:Te(r,!0))+`</code></pre> 51`}blockquote({tokens:t}){return`<blockquote> 52${this.parser.parse(t)}</blockquote> 53`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}> 54`}hr(t){return`<hr> 55`}list(t){let e=t.ordered,n=t.start,s="";for(let a=0;a<t.items.length;a++){let c=t.items[a];s+=this.listitem(c)}let r=e?"ol":"ul",o=e&&n!==1?' start="'+n+'"':"";return"<"+r+o+`> 56`+s+"</"+r+`> 57`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li> 58`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p> 59`}table(t){let e="",n="";for(let r=0;r<t.header.length;r++)n+=this.tablecell(t.header[r]);e+=this.tablerow({text:n});let s="";for(let r=0;r<t.rows.length;r++){let o=t.rows[r];n="";for(let a=0;a<o.length;a++)n+=this.tablecell(o[a]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table> 60<thead> 61`+e+`</thead> 62`+s+`</table> 63`}tablerow({text:t}){return`<tr> 64${t}</tr> 65`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}> 66`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Te(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let s=this.parser.parseInline(n),r=rr(t);if(r===null)return s;t=r;let o='<a href="'+t+'"';return e&&(o+=' title="'+Te(e)+'"'),o+=">"+s+"</a>",o}image({href:t,title:e,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=rr(t);if(r===null)return Te(n);t=r;let o=`<img src="${t}" alt="${Te(n)}"`;return e&&(o+=` title="${Te(e)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Te(t.text)}},gn=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},ge=class ln{options;renderer;textRenderer;constructor(e){this.options=e||Be,this.options.renderer=this.options.renderer||new Rt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new gn}static parse(e,n){return new ln(n).parse(e)}static parseInline(e,n){return new ln(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let a=r,c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=c||"";continue}}let o=r;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let s="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){s+=c||"";continue}}let a=o;switch(a.type){case"escape":{s+=n.text(a);break}case"html":{s+=n.html(a);break}case"link":{s+=n.link(a);break}case"image":{s+=n.image(a);break}case"checkbox":{s+=n.checkbox(a);break}case"strong":{s+=n.strong(a);break}case"em":{s+=n.em(a);break}case"codespan":{s+=n.codespan(a);break}
66case"br":{s+=n.br(a);break}case"del":{s+=n.del(a);break}case"text":{s+=n.text(a);break}default:{let c='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return s}},ht=class{options;block;constructor(t){this.options=t||Be}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?me.lex:me.lexInline}provideParser(t=this.block){return t?ge.parse:ge.parseInline}},mi=class{defaults=an();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ge;Renderer=Rt;TextRenderer=gn;Lexer=me;Tokenizer=Et;Hooks=ht;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let s of t)switch(n=n.concat(e.call(this,s)),s.type){case"table":{let r=s;for(let o of r.header)n=n.concat(this.walkTokens(o.tokens,e));for(let o of r.rows)for(let a of o)n=n.concat(this.walkTokens(a.tokens,e));break}case"list":{let r=s;n=n.concat(this.walkTokens(r.items,e));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{let a=r[o].flat(1/0);n=n.concat(this.walkTokens(a,e))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let o=e.renderers[r.name];o?e.renderers[r.name]=function(...a){let c=r.renderer.apply(this,a);return c===!1&&(c=o.apply(this,a)),c}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=e[r.level];o?o.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),s.extensions=e),n.renderer){let r=this.defaults.renderer||new Rt(this.defaults);for(let o in n.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let a=o,c=n.renderer[a],d=r[a];r[a]=(...p)=>{let y=c.apply(r,p);return y===!1&&(y=d.apply(r,p)),y||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new Et(this.defaults);for(let o in n.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let a=o,c=n.tokenizer[a],d=r[a];r[a]=(...p)=>{let y=c.apply(r,p);return y===!1&&(y=d.apply(r,p)),y}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new ht;for(let o in n.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let a=o,c=n.hooks[a],d=r[a];ht.passThroughHooks.has(o)?r[a]=p=>{if(this.defaults.async&&ht.passThroughHooksRespectAsync.has(o))return(async()=>{let b=await c.call(r,p);return d.call(r,b)})();let y=c.call(r,p);return d.call(r,y)}:r[a]=(...p)=>{if(this.defaults.async)return(async()=>{let b=await c.apply(r,p);return b===!1&&(b=await d.apply(r,p)),b})();let y=c.apply(r,p);return y===!1&&(y=d.apply(r,p)),y}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,o=n.walkTokens;s.walkTokens=function(a){let c=[];return c.push(o.call(this,a)),r&&(c=c.concat(r.call(this,a))),c}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return me.lex(t,e??this.defaults)}parser(t,e){return ge.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let s={...n},r={...this.defaults,...s},o=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return o(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 o(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=t),r.async)return(async()=>{let a=r.hooks?await r.hooks.preprocess(e):e,c=await(r.hooks?await r.hooks.provideLexer(t):t?me.lex:me.lexInline)(a,r),d=r.hooks?await r.hooks.processAllTokens(c):c;r.walkTokens&&await Promise.all(this.walkTokens(d,r.walkTokens));let p=await(r.hooks?await r.hooks.provideParser(t):t?ge.parse:ge.parseInline)(d,r);return r.hooks?await r.hooks.postprocess(p):p})().catch(o);try{r.hooks&&(e=r.hooks.preprocess(e));let a=(r.hooks?r.hooks.provideLexer(t):t?me.lex:me.lexInline)(e,r);r.hooks&&(a=r.hooks.processAllTokens(a)),r.walkTokens&&this.walkTokens(a,r.walkTokens);let c=(r.hooks?r.hooks.provideParser(t):t?ge.parse:ge.parseInline)(a,r);return r.hooks&&(c=r.hooks.postprocess(c)),c}catch(a){return o(a)}}}onError(t,e){return n=>{if(n.message+=` 67Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Te(n.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(n);throw n}}},Fe=new mi;function C(t,e){return Fe.parse(t,e)}C.options=C.setOptions=function(t){return Fe.setOptions(t),C.defaults=Fe.defaults,pr(C.defaults),C};C.getDefaults=an;C.defaults=Be;C.use=function(...t){return Fe.use(...t),C.defaults=Fe.defaults,pr(C.defaults),C};C.walkTokens=function(t,e){return Fe.walkTokens(t,e)};C.parseInline=Fe.parseInline;C.Parser=ge;C.parser=ge.parse;C.Renderer=Rt;C.TextRenderer=gn;C.Lexer=me;C.lexer=me.lex;C.Tokenizer=Et;C.Hooks=ht;C.parse=C;C.options;C.setOptions;C.use;C.walkTokens;C.parseInline;ge.parse;me.lex;const lr=t=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),gi=t=>{const e=new C.Renderer;e.code=({text:s,lang:r})=>(r||"").toLowerCase()==="mermaid"?`<div class="kifi-mermaid">${lr(s)}</div>`:`<pre><code>${lr(s)}</code></pre>`;const n=C.parse(t,{breaks:!0,gfm:!0,renderer:e});return Is.sanitize(n)},bi={class:"chat-date-divider"},ki={class:"chat-date-divider__chip"},yi={key:0},xi=["onClick"],_i={class:"text-caption font-weight-medium"},Ti={key:1,class:"reply-preview-video d-flex align-center justify-center flex-shrink-0",style:{width:"40px",height:"40px",background:"rgba(0, 0, 0, 0.2)","border-radius":"4px"}},wi={key:2,class:"reply-preview-audio d-flex align-center justify-center flex-shrink-0",style:{width:"40px",height:"40px",background:"rgba(0, 0, 0, 0.2)","border-radius":"4px"}},Si={key:3,class:"reply-preview-document d-flex align-center justify-center flex-shrink-0",style:{width:"40px",height:"40px",background:"rgba(0, 0, 0, 0.2)","border-radius":"4px"}},Ai={key:4,class:"reply-preview-location d-flex align-center justify-center flex-shrink-0",style:{width:"40px",height:"40px",background:"rgba(0, 0, 0, 0.2)","border-radius":"4px"}},Ei={key:5,class:"reply-preview-contact d-flex align-center justify-center flex-shrink-0",style:{width:"40px",height:"40px",background:"rgba(0, 0, 0, 0.2)","border-radius":"4px"}},Ri={key:1,class:"d-flex align-center gap-2 text-medium-emphasis"},Ii={class:"text-body-2"},vi={key:2,class:"mb-0 text-base text-medium-emphasis"},Li={key:3},Ci=["innerHTML"],Oi={key:1,class:"mb-0 text-base text-medium-emphasis"},Ni={key:4},Mi={key:1,class:"d-flex align-center gap-2 text-medium-emphasis mb-2"},Pi={class:"text-body-2"},zi=["innerHTML"],$i={key:3,class:"mb-0 text-base mt-2 text-medium-emphasis"},Ui={key:0,class:"d-flex align-center gap-2 text-medium-emphasis"},Fi={class:"text-body-2"},Bi={key:1,class:"mb-0 text-base text-medium-emphasis"},Hi={key:2,class:"mb-0 text-base mt-2"},Wi={key:0,class:"d-flex align-center gap-2 text-medium-emphasis"},Di={class:"text-body-2"},ji={key:1,class:"mb-0 text-base text-medium-emphasis"},qi={key:2,class:"mb-0 text-base mt-2"},Vi={key:0,class:"d-flex align-center gap-2 text-medium-emphasis"},Yi={class:"text-body-2"},Zi={key:1,class:"mb-0 text-base text-medium-emphasis"},Xi={key:2,class:"mb-0 text-base mt-2"},Ki={key:9,class:"mb-0 text-base text-medium-emphasis"},Gi={key:11,class:"mb-0 text-base text-medium-emphasis"},Qi={class:"d-flex align-center gap-2"},Ji={class:"text-body-1 font-weight-medium"},eo={key:0,class:"order-details"},to={class:"order-item mb-2"},no={class:"order-label"},ro={class:"order-value"},so={class:"order-item mb-2"},io={class:"order-label"},oo={key:0,class:"order-item mb-2"},lo={class:"order-label"},ao={class:"order-value"},co={key:1,class:"order-item"},uo={class:"order-label"},po={class:"order-value"},ho=["innerHTML"],fo={key:1,class:"mb-0 text-base mt-2 text-medium-emphasis"},mo={key:13},go={key:0,class:"mb-3 text-base"},bo={key:1,class:"mb-3 text-base text-medium-emphasis"},ko={class:"quick-actions"},yo={key:14,class:"unsupported-message"},xo={class:"d-flex align-center gap-2 text-disabled"},_o={class:"text-body-2"},To=["innerHTML"],wo={key:1,class:"mb-0 text-base mt-2 text-medium-emphasis"},So={class:"chat-message-meta__icons"},Ao={key:0,class:"d-flex align-center ga-2 align-self-end"},Eo={class:"text-sm text-error"},Ro={key:0,class:"chat-group d-flex align-start mb-6 flex-row-reverse"},Io={class:"chat-avatar ms-4"},vo=Ir({__name:"ChatLog",props:{messages:{},isTyping:{type:Boolean,default:!1},customer:{default:null},userProfilePicture:{default:null},autoReply:{type:Boolean,default:!1}},emits:["reply-to"],setup(t,{emit:e}){const n=t,s=e,{t:r,locale:o}=vr({useScope:"global"}),a=Xt(null),c=Xt(!1),d=Xt(null),p=_=>{d.value=_,c.value=!0},y=_=>!!_&&_.trim()!=="",b=_=>_.isOutbound===!0&&!_.sentAt,S=(_,x=!1)=>
67{if(!_)return null;switch(String(_).toUpperCase()){case Ke.SENT:return{icon:"tabler-check",colorClass:"chat-message-status--neutral",opacity:.95};case Ke.DEL:return{icon:"tabler-checks",colorClass:"chat-message-status--neutral",opacity:.95};case Ke.READ:return{icon:"tabler-checks",colorClass:"text-info",opacity:1};case Ke.FAIL:return{icon:"tabler-x",colorClass:x?"text-on-primary":"text-error",opacity:1};case Ke.UNK:default:return{icon:"tabler-clock",colorClass:"chat-message-status--neutral",opacity:.85}}},U=_=>{if(!_)return null;const x=new Date(_);return Number.isNaN(x.getTime())?null:x},O=_=>{const x=new Date;return x.setHours(0,0,0,0),x.setDate(x.getDate()-1),_.getDate()===x.getDate()&&_.getMonth()===x.getMonth()&&_.getFullYear()===x.getFullYear()},ce=_=>{const x=U(_);return x?[x.getFullYear(),String(x.getMonth()+1).padStart(2,"0"),String(x.getDate()).padStart(2,"0")].join("-"):""},we=_=>_?Yr(_,{hour:"numeric",minute:"numeric"}):"",Se=_=>{if(!_)return"";const x=new Date(_);return Number.isNaN(x.getTime())?"":new Intl.DateTimeFormat("en-US",Bn(x)?{hour:"numeric",minute:"numeric"}:{month:"short",day:"numeric",hour:"numeric",minute:"numeric"}).format(x)},Ae=_=>{if(typeof _!="string"||!_)return"";let x=_;
67return x=x.replace(/\\\|/g,"|"),x=x.replace(/\\n/g,` 68`),x=x.split(` 69`).map(D=>D.trim()).join(` 70`),gi(x)},rt=_=>{const x=U(_);if(!x)return"";if(Bn(x))return r("widgets.dateRange.presets.today","Today");if(O(x))return r("widgets.dateRange.presets.yesterday","Yesterday");const D=new Date,V=x.getFullYear()!==D.getFullYear();return new Intl.DateTimeFormat(o.value||void 0,{weekday:"long",day:"numeric",month:"long",...V?{year:"numeric"}:{}}).format(x)},ee=_=>{const x=_.createdBy?.user_info?.first_name?.trim()||"",D=_.createdBy?.user_info?.last_name?.trim()||"";return[x,D].filter(Boolean).join(" ").trim()||_.createdBy?.email?.trim()||""},oe=_=>_.createdBy?.user_info?.profile_picture?.trim()||null,W=Nr(()=>{if(!n.messages.length)return[];const _=[];for(const x of n.messages){const D=ce(x.timestamp),V=rt(x.timestamp),be={key:x.id,dateKey:D,dateLabel:V,senderId:x.sender,messages:[x]},Ee=_[_.length-1];Ee&&Ee.dateKey===D?Ee.groups.push(be):_.push({dateKey:D,dateLabel:V,groups:[be]})}return _}),Ie=async()=>{if(!a.value)return;const _=a.value.querySelectorAll(".kifi-mermaid:not([data-mermaid-processed='true'])");if(!_.length)return;const x=(await Mr(async()=>{const{default:D}=await import("./DLt6aX47.js").then(V=>V.bl);return{default:D}},__vite__mapDeps([0,1,2]),import.meta.url)).default;x.initialize({startOnLoad:!1,securityLevel:"strict"});for(const[D,V]of Array.from(_).entries()){V.dataset.mermaidProcessed="true";const be=V.textContent?.trim();if(be)try{const Ee=`kifi-mermaid-${Date.now()}-${D}`,{svg:st}=await x.render(Ee,be);V.innerHTML=st,V.classList.add("kifi-mermaid-rendered")}catch{V.classList.add("kifi-mermaid-error")}}};return Lr(()=>n.messages.map(_=>`${_.id}:${_.text}`).join("|"),async()=>{await $n(),await Ie()},{flush:"post"}),Cr(async()=>{await $n(),await Ie()}),(_,x)=>{const D=Pr("IconBtn"),V=Fr,be=Br,Ee=Hr,st=Wr,Lt=Dr,Y=jr,He=qr,We=Vr;return h(),g("div",{ref_key:"chatLogRef",ref:a,class:"chat-log"},[(h(!0),g(re,null,Tt(f(W),(he,Ct)=>(h(),g("div",{key:he.dateKey},[A("div",bi,[A("div",ki,T(he.dateLabel),1)]),(h(!0),g(re,null,Tt(he.groups,(w,Ot)=>(h(),g("div",{key:w.key,class:N(["chat-group d-flex align-start",[{"flex-row-reverse":w.senderId==="user","mb-6":!(Ct===f(W).length-1&&Ot===he.groups.length-1)}]])},[A("div",{class:N(["chat-avatar position-relative",w.senderId==="user"?"ms-4":"me-4"])},[w.senderId==="user"?(h(),g(re,{key:0},[w.messages[0]?.isBusinessApp?(h(),F(ze,{key:0,location:"top"},{activator:P(({props:l})=>[v(Oe,Ce({ref_for:!0},l,{size:"32",color:"success",variant:"tonal"}),{default:P(()=>[v(z,{icon:"tabler-device-mobile-message"})]),_:1},16)]),default:P(()=>[A("span",null,T(f(r)("modules.careflow.chat.business_app_message","Sent from WhatsApp Business app")),1)]),_:1})):w.messages[0]?.isCampaign?(h(),F(ze,{key:1,location:"top"},{activator:P(({props:l})=>[v(Oe,Ce({ref_for:!0},l,{size:"32",color:"info",variant:"tonal"}),{default:P(()=>[v(z,{icon:"tabler-speakerphone"})]),_:1},16)]),default:P(()=>[A("span",null,T(f(r)("modules.careflow.chat.campaign_message","This message is coming from a campaign.")),1)]),_:1})):w.messages[0]?.role===f(Xe).ASS||w.messages[0]?.role==="ASS"?(h(),F(Oe,{key:2,size:"32",color:"primary",variant:"tonal"},{default:P(()=>[v(z,{icon:"tabler-robot"})]),_:1})):(h(),g(re,{key:3},[ee(w.messages[0])?(h(),F(ze,{key:0,location:"top"},{activator:P(({props:l})=>[oe(w.messages[0])?(h(),F(Oe,Ce({key:0,ref_for:!0},l,{size:"32",image:oe(w.messages[0])}),null,16,["image"])):(h(),F(Oe,Ce({key:1,ref_for:!0},l,{size:"32",color:"primary",variant:"tonal"}),{default:P(()=>[A("span",null,T(f(Fn)(ee(w.messages[0]))),1)]),_:2},1040))]),default:P(()=>[A("span",null,T(ee(w.messages[0])),1)]),_:2},1024)):(h(),F(Oe,{key:1,size:"32",color:"primary",variant:"tonal"},{default:P(()=>[v(z,{icon:"tabler-user"})]),_:1}))],64))],64)):(h(),F(Oe,{key:1,size:"32",color:"primary",variant:"tonal"},{default:P(()=>[w.messages[0]?.role===f(Xe).ASS||w.messages[0]?.role==="ASS"?(h(),F(z,{key:0,icon:"tabler-robot"})):(h(),g(re,{key:1},[t.customer?(h(),g("span",yi,T(f(Fn)(t.customer.displayname||t.customer.phone||t.customer.email||"")),1)):(h(),F(z,{key:1,icon:"tabler-user"}))],64))]),_:2},1024))],2),A("div",{class:N(["chat-body d-inline-flex flex-column",w.senderId==="user"?"align-end":"align-start"])},[(h(!0),g(re,null,Tt(w.messages,(l,Nt)=>(h(),g("div",{key:l.id,class:"chat-message-block d-flex flex-column ga-1"},[A("div",{class:N(["chat-content py-3 px-4 elevation-2 position-relative chat-message-bubble chat-message-wrapper",[w.senderId==="bot"?"chat-left align-self-start":"bg-primary text-white chat-right al
70ign-self-end",w.messages.length-1!==Nt?"mb-2":"mb-1",l.type===f($).VID?"has-video-message":"",b(l)?"chat-message-disabled":""]]),style:{"background-color":"rgb(var(--v-theme-surface))"}},[t.autoReply?Q("",!0):(h(),g("div",{key:0,class:"chat-message-reply-action",onClick:Kt(ne=>s("reply-to",l),["stop"])},[v(D,{size:"small",variant:"text",class:"chat-reply-btn"},{default:P(()=>[v(z,{icon:"tabler-corner-up-left",size:"18"})]),_:1})],8,xi)),l.replyTo?(h(),g("div",{key:1,class:N(["message-reply-quote-bubble mb-2 pa-2 rounded",w.senderId==="bot"?"reply-quote-left":"reply-quote-right"]),style:{width:"100%","box-sizing":"border-box"}},[A("div",{class:N(["d-flex align-center gap-1 mb-1",w.senderId==="bot"?"text-medium-emphasis":"text-white"])},[v(z,{icon:"tabler-corner-up-left",size:"14",class:N(w.senderId==="bot"?"text-medium-emphasis":"text-white")},null,8,["class"]),A("span",_i,T(l.replyTo.sender==="bot"?f(r)("modules.careflow.chat.customer"):f(r)("modules.careflow.chat.you")),1)],2),A("div",{class:N(["d-flex align-center gap-1 overflow-hidden",w.senderId==="bot"?"text-disabled":"text-white"])},[(l.replyTo.type===f($).IMG||l.replyTo.type===f($).STK||l.replyTo.type==="image"||l.replyTo.type==="sticker"||l.replyTo.type==="IMG"||l.replyTo.type==="STK")&&y(l.replyTo.mediaUrl||l.replyTo.imageUrl)?(h(),F(V,{key:0,src:l.replyTo.mediaUrl||l.replyTo.imageUrl,"fallback-title":String(l.replyTo.type)===String(f($).STK)||String(l.replyTo.type)==="STK"||String(l.replyTo.type)==="sticker"?f(r)("modules.careflow.chat.sticker_unavailable"):f(r)("modules.careflow.chat.image_unavailable"),"fallback-icon":"tabler-photo-off","max-height":40,"max-width":40,"min-height":40,"min-width":40,class:"flex-shrink-0",clickable:!0,"compact-fallback":!0,onClick:Kt(ne=>p(l.replyTo.mediaUrl||l.replyTo.imageUrl),["stop"])},null,8,["src","fallback-title","onClick"])):l.replyTo.type===f($).VID&&y(l.replyTo.imageUrl||l.replyTo.mediaUrl)?(h(),g("div",Ti,[v(z,{icon:"tabler-player-play-filled",size:"20",class:N(w.senderId==="bot"?"text-disabled":"text-white")},null,8,["class"])])):l.replyTo.type===f($).AUD&&y(l.replyTo.mediaUrl||l.replyTo.imageUrl)?(h(),g("div",wi,[v(z,{icon:"tabler-music",size:"20",class:N(w.senderId==="bot"?"text-disabled":"text-white")},null,8,["class"])])):l.replyTo.type===f($).DOC&&y(l.replyTo.mediaUrl||l.replyTo.imageUrl)?(h(),g("div",Si,[v(z,{icon:"tabler-file",size:"20",class:N(w.senderId==="bot"?"text-disabled":"text-white")},null,8,["class"])])):(l.replyTo.type==="location"||l.replyTo.type===f($).LOC)&&l.replyTo.location?(h(),g("div",Ai,[v(z,{icon:"tabler-map-pin",size:"20",class:N(w.senderId==="bot"?"text-disabled":"text-white")},null,8,["class"])])):(l.replyTo.type==="contact"||l.replyTo.type===f($).CON)&&l.replyTo.contact?(h(),g("div",Ei,[v(z,{icon:"tabler-user",size:"20",class:N(w.senderId==="bot"?"text-disabled":"text-white")},null,8,["class"])])):Q("",!0),l.replyTo.text&&l.replyTo.text.trim()?(h(),g("p",{key:6,class:N(["text-body-2 mb-0 text-truncate flex-grow-1 min-width-0",w.senderId==="bot"?"text-disabled":"text-white"])},T(l.replyTo.text),3)):l.replyTo.type===f($).IMG||l.replyTo.type===f($).STK||l.replyTo.type==="image"||l.replyTo.type==="sticker"||l.replyTo.type==="IMG"||l.replyTo.type==="STK"?(h(),g("p",{key:7,class:N(["text-body-2 mb-0 text-truncate flex-grow-1 min-width-0",w.senderId==="bot"?"text-medium-emphasis":"text-white"])},T(String(l.replyTo.type)===String(f($).STK)||String(l.replyTo.type)==="STK"||String(l.replyTo.type)==="sticker"?f(r)("modules.careflow.chat.sticker"):f(r)("modules.careflow.chat.image")),3)):l.replyTo.type===f($).TXT||l.replyTo.type==="text"?(h(),g("p",{key:8,class:N(["text-body-2 mb-0 text-truncate flex-grow-1 min-width-0",w.senderId==="bot"?"text-medium-emphasis":"text-white"])},T(f(r)("modules.careflow.chat.empty_message","Empty message")),3)):l.replyTo.type===f($).VID?(h(),g("p",{key:9,class:N(["text-body-2 mb-0 text-truncate flex-grow-1 min-width-0",w.senderId==="bot"?"text-medium-emphasis":"text-white"])},T(f(r)("modules.careflow.chat.video")),3)):l.replyTo.type===f($).AUD?(h(),g("p",{key:10,class:N(["text-body-2 mb-0 text-truncate flex-grow-1 min-width-0",w.senderId==="bot"?"text-medium-emphasis":"text-white"])},T(f(r)("modules.careflow.chat.audio")),3)):l.replyTo.type===f($).DOC?(h(),g("p",{key:11,class:N(["text-body-2 mb-0 text-truncate flex-grow-1 min-width-0",w.senderId==="bot"?"text-medium-emphasis":"text-white"])},T(f(r)("modules.careflow.chat.document")),3)):l.replyTo.type==="location"||l.replyTo.type===f($).LOC?(h(),g("p",{key:12,class:N(["text-body-2 mb-0 text-truncate flex-grow-1 min-width-0",w.senderId==="bot"?"text-medium-emphasis":"text-white"])},T(f(r)("modules.careflow.chat.location")),3)):l.replyTo.type==="contact"||l.replyTo.type===f($).CON?(h(),g("p",{key:13,class:N(["text-body-2 mb-0 text-truncate flex-grow-1 min-width-0",w.senderId==="bot"?"text-medium-emphasis":"text-white"])},T(f(r)("modules.careflow.chat.contact")),3)):Q("",!0)],2)],2)):Q("",!0),String(l.type)===String(f($).STK)||String(l.type)==="STK"||String(l.type)==="sticker"||String(l.type)==="Sticker"?(h(),g(re,{key:2}
70,[y(l.mediaUrl||l.imageUrl)?(h(),F(be,{key:0,"sticker-url":l.mediaUrl||l.imageUrl||"","is-outgoing":w.senderId==="user"},null,8,["sticker-url","is-outgoing"])):l.text&&String(l.text).trim()?(h(),g("div",Ri,[v(z,{icon:"tabler-mood-smile",size:"20"}),A("span",Ii,T(f(r)("modules.careflow.chat.sticker")),1)])):(h(),g("p",vi,T(f(r)("modules.careflow.chat.empty_message","Empty message")),1))],64)):l.type===f($).TXT||l.type==="text"?(h(),g("div",Li,[l.text&&String(l.text).trim()?(h(),g("div",{key:0,class:N(["mb-0 text-base chat-message-html",{"chat-message-html-bot":w.senderId==="bot"||l.role===f(Xe).ASS||l.role==="ASS"}]),innerHTML:Ae(l.text)},null,10,Ci)):(h(),g("p",Oi,T(f(r)("modules.careflow.chat.empty_message","Empty message")),1))])):l.type===f($).IMG||l.type==="image"?(h(),g("div",Ni,[y(l.imageUrl||l.mediaUrl)?(h(),F(V,{key:0,src:l.imageUrl||l.mediaUrl,alt:l.text||f(r)("modules.careflow.chat.image"),"fallback-title":f(r)("modules.careflow.chat.image_unavailable"),"fallback-icon":"tabler-photo-off",class:N(["message-image rounded cursor-pointer",l.text?"mb-2":"mb-0"]),clickable:!0,"max-height":200,"max-width":200,width:"auto",height:"auto",onClick:Kt(ne=>p(l.imageUrl||l.mediaUrl),["stop"])},null,8,["src","alt","fallback-title","class","onClick"])):(h(),g("div",Mi,[v(z,{icon:"tabler-photo",size:"20"}),A("span",Pi,T(f(r)("modules.careflow.chat.image")),1)])),l.text&&String(l.text).trim()?(h(),g("div",{key:2,class:N(["mb-0 text-base mt-2 chat-message-html",{"chat-message-html-bot":w.senderId==="bot"||l.role===f(Xe).ASS||l.role==="ASS"}]),innerHTML:l.text},null,10,zi)):!y(l.imageUrl||l.mediaUrl)&&(!l.text||!String(l.text).trim())?(h(),g("p",$i,T(f(r)("modules.careflow.chat.empty_message","Empty message")),1)):Q("",!0)])):l.type===f($).VID?(h(),g(re,{key:5},[y(l.mediaUrl||l.imageUrl)?(h(),F(Ee,{key:0,"video-url":l.mediaUrl||l.imageUrl||"","thumbnail-url":l.imageUrl,caption:l.text,"is-outgoing":w.senderId==="user"},null,8,["video-url","thumbnail-url","caption","is-outgoing"])):(h(),g(re,{key:1},[l.text&&String(l.text).trim()?(h(),g("div",Ui,[v(z,{icon:"tabler-video",size:"20"}),A("span",Fi,T(f(r)("modules.careflow.chat.video")),1)])):(h(),g("p",Bi,T(f(r)("modules.careflow.chat.empty_message","Empty message")),1)),l.text&&String(l.text).trim()?(h(),g("p",Hi,T(l.text),1)):Q("",!0)],64))],64)):l.type===f($).AUD?(h(),g(re,{key:6},[y(l.mediaUrl||l.imageUrl)?(h(),F(st,{key:0,"audio-url":l.mediaUrl||l.imageUrl||"",caption:l.text,"is-outgoing":w.senderId==="user"},null,8,["audio-url","caption","is-outgoing"])):(h(),g(re,{key:1},[l.text&&String(l.text).trim()?(h(),g("div",Wi,[v(z,{icon:"tabler-music",size:"20"}),A("span",Di,T(f(r)("modules.careflow.chat.audio")),1)])):(h(),g("p",ji,T(f(r)("modules.careflow.chat.empty_message","Empty message")),1)),l.text&&String(l.text).trim()?(h(),g("p",qi,T(l.text),1)):Q("",!0)],64))],64)):l.type===f($).DOC?(h(),g(re,{key:7},[y(l.mediaUrl||l.imageUrl)?(h(),F(Lt,{key:0,"document-url":l.mediaUrl||l.imageUrl||"","file-name":l.fileName,"file-size":l.fileSize,"mime-type":l.mimeType,caption:l.text,"is-outgoing":w.senderId==="user"},null,8,["document-url","file-name","file-size","mime-type","caption","is-outgoing"])):(h(),g(re,{key:1},[l.text&&String(l.text).trim()?(h(),g("div",Vi,[v(z,{icon:"tabler-file",size:"20"}),A("span",Yi,T(f(r)("modules.careflow.chat.document")),1)])):(h(),g("p",Zi,T(f(r)("modules.careflow.chat.empty_message","Empty message")),1)),l.text&&String(l.text).trim()?(h(),g("p",Xi,T(l.text),1)):Q("",!0)],64))],64)):(l.type==="location"||l.type===f($).LOC)&&l.location?(h(),F(Y,{key:8,latitude:l.location.latitude,longitude:l.location.longitude,name:l.location.name,address:l.location.address,"is-outgoing":w.senderId==="user"},null,8,["latitude","longitude","name","address","is-outgoing"])):(l.type==="location"||l.type===f($).LOC)&&!l.location?(h(),g("p",Ki,T(f(r)("modules.careflow.chat.empty_message","Empty message")),1)):l.contact?(h(),F(He,{key:10,contact:l.contact,"is-outgoing":w.senderId==="user"},null,8,["contact","is-outgoing"])):(l.type==="contact"||l.type===f($).CON)&&!l.contact?(h(),g("p",Gi,T(f(r)("modules.careflow.chat.empty_message","Empty message")),1)):l.type==="order_info"?(h(),g(re,{key:12},[v(Gr,{variant:"text",class:"bg-transparent"},{default:P(()=>[v(Zr,{class:"pa-0 pb-2"},{default:P(()=>[A("div",Qi,[v(z,{icon:"tabler-package",size:"20"}),A("span",Ji,T(f(r)("modules.careflow.chat.order_info.title")),1)])]),_:1}),v(Xr,{class:"pa-0"},{default:P(()=>[l.order?(h(),g("div",eo,[A("div",to,[A("span",no,T(f(r)("modules.careflow.chat.order_info.order_id"))+": ",1),A("span",ro,T(l.order.order_id),1)]),A("div",so,[A("span",io,T(f(r)("modules.careflow.chat.order_info.status"))+": ",1),v(Kr,{color:l.order.status==="completed"?"success":l.order.status==="pending"?"warning":"info",size:"small",variant:"tonal"},{default:P(()=>[Un(T(l.order.status),1)]),_:2},1032,["color"])]),l.order.total?(h(),g("div",oo,[A("span",lo,T(f(r)("modules.careflow.chat.order_info.total"))+": ",1),A("span",ao,T(l.order.currency||"$")+T(l.order.total),1)])):Q("",!0),l.order.items?(h(),g("div",co,[A("span",uo,T(f(r)("modules.careflow.chat.order_info.items"))+": ",1),A("span",po,T(l.order.items),1)])):Q("",!0)])):Q("",!0)]),_:2},1024)]),_:2},1024),l.text&&String(l.text).trim()?(h(),g("div",{key:0,class:N(["mb-0 text-base mt-2 chat-message-html",{"chat-message-html-bot":w.senderId==="bot"||l.role===f(Xe).ASS||l.role==="ASS"}]),innerHTML:l.text},null,10,ho)):!l.text||!String(l.text).trim()?(h(),g("p",fo,T(f(r)("modules.careflow.chat.empty_message","Empty message")),1)):Q("",!0)],64)):l.type==="quick_actions"?(h(),g("div",mo,[l.text&&String(l.text).trim()?(h(),g("p",go,T(l.text),1)):(h(),g("p",bo,T(f(r)("modules.careflow.chat.empty_message","Empty message")),1)),A("div",ko,[(h(!0),g(re,null,Tt(l.actions,(ne,B)=>(h(),F(zr,{key:B,color:ne.color||"primary",variant:"outlined",size:"small",class:"ma-1",onClick:()=>{}},{default:P(()=>[Un(T(ne.label),1)]),_:2},1032,["color"]))),128))])])):(h(),g("div",yo,[A("div",xo,[v(z,{icon:"tabler-alert-circle",size:"18"}),A("span",_o,T(f(r)("modules.careflow.chat.unsupported_message_type")),1)]),l.text&&String(l.text).trim()?(h(),g("div",{key:0,class:N(["mb-0 text-base mt-2 chat-message-html",{"chat-message-html-bot":w.senderId==="bot"||l.role===f(Xe).ASS||l.role==="ASS"}]),innerHTML:l.text}
70,null,10,To)):y(l.mediaUrl||l.imageUrl)?Q("",!0):(h(),g("p",wo,T(f(r)("modules.careflow.chat.empty_message","Empty message")),1))])),A("div",{class:N(["chat-message-meta mt-2",{"chat-message-meta--outgoing":w.senderId==="user","chat-message-meta--incoming":w.senderId==="bot"}])},[A("div",So,[w.senderId==="user"&&l.isOutbound?(h(),F(ze,{key:0,location:"top"},{activator:P(({props:ne})=>[v(z,Ce({ref_for:!0},ne,{icon:"tabler-send",size:"14",color:b(l)?"warning":"info"}),null,16,["color"])]),default:P(()=>[A("span",null,T(b(l)?f(r)("modules.careflow.chat.message_not_sent","This message has not been sent yet. It will be sent when the customer becomes reachable."):f(r)("modules.careflow.chat.outbound")),1)]),_:2},1024)):Q("",!0),l.channel?(h(),F(ze,{key:1,location:"top"},{activator:P(({props:ne})=>[v(z,Ce({ref_for:!0},ne,{icon:l.channel==="WA"?"tabler-brand-whatsapp":l.channel==="FB"?"tabler-brand-facebook":"tabler-brand-instagram",color:l.channel==="WA"?"success":l.channel==="FB"?"info":"error",size:"14"}),null,16,["icon","color"])]),default:P(()=>[A("span",null,T(l.channel==="WA"?"WhatsApp":l.channel==="FB"?"Facebook":"Instagram"),1)]),_:2},1024)):Q("",!0),l.isEdited?(h(),F(ze,{key:2,location:"top"},{activator:P(({props:ne})=>[v(z,Ce({ref_for:!0},ne,{icon:"tabler-pencil",size:"12",class:"chat-message-status--neutral"}),null,16)]),default:P(()=>[A("span",null,T(f(r)("modules.careflow.chat.message_edited_at",{date:Se(l.editedAt)})),1)]),_:2},1024)):Q("",!0)]),A("span",null,T(we(l.timestamp)),1),w.senderId==="user"&&l.messageStatus?(h(),g(re,{key:0},[String(l.messageStatus).toUpperCase()===f(Ke).FAIL?(h(),F(ze,{key:0,location:"top"},{activator:P(({props:ne})=>[v(z,Ce({ref_for:!0},ne,{icon:"tabler-x",size:"13",class:"text-error",style:{opacity:1}}),null,16)]),default:P(()=>[A("span",null,T(f(r)("modules.careflow.chat.message_failed","This message failed to send. Please try again.")),1)]),_:1})):(h(),F(z,{key:1,icon:S(l.messageStatus,!0)?.icon||"tabler-clock",size:"13",class:N(S(l.messageStatus,!0)?.colorClass||"text-disabled"),style:$r({opacity:S(l.messageStatus,!0)?.opacity??1})},null,8,["icon","class","style"]))],64)):Q("",!0)],2)],2),l.alert?(h(),g("div",Ao,[v(z,{icon:"tabler-alert-circle",color:"error"}),A("span",Eo,T(f(r)("kifi.message-send-failed")),1)])):Q("",!0)]))),128))],2)],2))),128))]))),128)),v(We,{modelValue:f(c),"onUpdate:modelValue":x[0]||(x[0]=he=>Or(c)?c.value=he:null),"media-url":f(d)},null,8,["modelValue","media-url"]),t.isTyping?(h(),g("div",Ro,[A("div",Io,[v(Oe,{size:"32",color:"primary",variant:"tonal"},{default:P(()=>[v(z,{icon:"tabler-robot"})]),_:1})]),x[1]||(x[1]=A("div",{class:"chat-body d-inline-flex flex-column align-end"},[A("div",{class:"chat-content elevation-2 chat-right typing-indicator"},[A("span"),A("span"),A("span")])],-1))])):Q("",!0)],512)}}}),Lo=Object.assign(Ur(vo,[["__scopeId","data-v-fa544f62"]]),{__name:"ChatLog"}),Yo=Object.freeze(Object.defineProperty({__proto__:null,default:Lo},Symbol.toStringTag,{value:"Module"}));export{Yo as C,Lo as _,K as p};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.