PageSourceSearch

https://xyc.ai/static/js/async/5384.1d37556c51.js

js xyc.ai collected 2026-10-05 14:39:42 UTC 165,094 bytes, 102 lines download raw bytes

1/*! LICENSE: 5384.1d37556c51.js.LICENSE.txt */
2"use strict";(self.rspackChunknewapi_web=self.rspackChunknewapi_web||[]).push([[5384],{30633(e,t,r){r.d(t,{Ak:()=>n});let n=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&r[e]];return t}},69788(e,t,r){r.d(t,{y:()=>n});var n=function(e,t){if(!(this instanceof n))return new n(e,t);this.url=e,t=t||{},this.headers=t.headers||{},this.payload=void 0!==t.payload?t.payload:"",this.method=t.method||this.payload&&"POST"||"GET",this.withCredentials=!!t.withCredentials,this.debug=!!t.debug,this.autoReconnect=void 0!==t.autoReconnect&&t.autoReconnect,this.reconnectDelay=void 0!==t.reconnectDelay?t.reconnectDelay:3e3,this.maxRetries=void 0!==t.maxRetries?t.maxRetries:null,this.retryCount=0,this.reconnectTimer=null,this.useLastEventId=void 0===t.useLastEventId||t.useLastEventId,this.FIELD_SEPARATOR=":",this.listeners={},this.xhr=null,this.readyState=n.INITIALIZING,this.progress=0,this.chunk="",this.lastEventId="",this._hasParsedBom=!1,this.addEventListener=function(e,t){void 0===this.listeners[e]&&(this.listeners[e]=[]),-1===this.listeners[e].indexOf(t)&&this.listeners[e].push(t)},this.removeEventListener=function(e,t){if(void 0===this.listeners[e])return;let r=[];this.listeners[e].forEach(function(e){e!==t&&r.push(e)}),0===r.length?delete this.listeners[e]:this.listeners[e]=r},this.dispatchEvent=function(e){if(!e)return!0;this.debug&&console.debug(e),e.source=this;let t="on"+e.type;return(!this.hasOwnProperty(t)||(this[t].call(this,e),!e.defaultPrevented))&&(!this.listeners[e.type]||this.listeners[e.type].every(function(t){return t(e),!e.defaultPrevented}))},this._markClosed=function(){if(this.xhr=null,this.progress=0,this.chunk="",this._setReadyState(n.CLOSED),this.autoReconnect){if(null!==this.maxRetries&&this.retryCount>=this.maxRetries){this.debug&&console.debug(`SSE max retries (${this.maxRetries}) reached, stopping reconnection attempts`),this.autoReconnect=!1,this.close();return}this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.debug&&console.debug(`SSE will attempt to reconnect in ${this.reconnectDelay}ms (attempt ${this.retryCount+1}${this.maxRetries?"/"+this.maxRetries:""})`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.retryCount++,this.stream()},this.reconnectDelay)}},this._setReadyState=function(e){let t=new CustomEvent("readystatechange");t.readyState=e,this.readyState=e,this.dispatchEvent(t)},this._onStreamFailure=function(e){let t=new CustomEvent("error");t.responseCode=e.currentTarget.status,t.data=e.currentTarget.response,this.dispatchEvent(t),this._markClosed()},this._onStreamAbort=function(){this.dispatchEvent(new CustomEvent("abort")),this._markClosed()},this._onStreamProgress=function(e){if(!this.xhr)return;if(this.xhr.status<200||this.xhr.status>=300)return void this._onStreamFailure(e);this.retryCount=0;let t=this.xhr.responseText.substring(this.progress);this.progress+=t.length,this._hasParsedBom||0!==this.chunk.length||(65279===t.charCodeAt(0)&&(t=t.substring(1)),this._hasParsedBom=!0);let r=(this.chunk+t).split(/(\r\n\r\n|\r\r|\n\n)/g),n=r.pop();r.forEach((function(e){e.trim().length>0&&this.dispatchEvent(this._parseEventChunk(e))}).bind(this)),this.chunk=n},this._onStreamLoaded=function(e){this._onStreamProgress(e),this.dispatchEvent(this._parseEventChunk(this.chunk)),this.chunk="",this._markClosed()},this._parseEventChunk=function(e){if(!e||0===e.length)return null;this.debug&&console.debug(e);let t={id:null,retry:null,data:null,event:null};
2if(e.split(/\n|\r\n|\r/).forEach((function(e){let r,n,l=e.indexOf(this.FIELD_SEPARATOR);if(l>0){let t=" "===e[l+1]?2:1;r=e.substring(0,l),n=e.substring(l+t)}else{if(!(l<0))return;r=e,n=""}r in t&&("data"===r&&null!==t[r]?t.data+="\n"+n:t[r]=n)}).bind(this)),null!==t.id&&-1===t.id.indexOf("\0")&&(this.lastEventId=t.id),null!==t.retry&&/^[0-9]+$/.test(t.retry)&&(this.reconnectDelay=parseInt(t.retry,10)),null===t.data)return null;let r=new CustomEvent(t.event||"message");return r.id=t.id,r.data=t.data||"",r.lastEventId=this.lastEventId,r},this._onReadyStateChange=function(){if(this.xhr&&this.xhr.readyState===XMLHttpRequest.HEADERS_RECEIVED){let e={};for(let t of this.xhr.getAllResponseHeaders().trim().split("\r\n")){let[r,...n]=t.split(":"),l=n.join(":").trim();e[r.trim().toLowerCase()]=e[r.trim().toLowerCase()]||[],e[r.trim().toLowerCase()].push(l)}let t=new CustomEvent("open");t.responseCode=this.xhr.status,t.headers=e,this.dispatchEvent(t),this._setReadyState(n.OPEN)}},this.stream=function(){if(!this.xhr){for(let e in this._setReadyState(n.CONNECTING),this.xhr=new XMLHttpRequest,this.xhr.addEventListener("progress",this._onStreamProgress.bind(this)),this.xhr.addEventListener("load",this._onStreamLoaded.bind(this)),this.xhr.addEventListener("readystatechange",this._onReadyStateChange.bind(this)),this.xhr.addEventListener("error",this._onStreamFailure.bind(this)),this.xhr.addEventListener("abort",this._onStreamAbort.bind(this)),this.xhr.open(this.method,this.url),this.headers)this.xhr.setRequestHeader(e,this.headers[e]);this.useLastEventId&&this.lastEventId.length>0&&this.xhr.setRequestHeader("Last-Event-ID",this.lastEventId),this.xhr.withCredentials=this.withCredentials,this.xhr.send(this.payload)}},this.close=function(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.autoReconnect=!1,this.xhr&&this.xhr.abort()},(void 0===t.start||t.start)&&this.stream()};n.INITIALIZING=-1,n.CONNECTING=0,n.OPEN=1,n.CLOSED=2},8850(e,t,r){let n,l,s,o,i;r.d(t,{A:()=>lF,C:()=>lW,c:()=>rJ,f:()=>nm,l:()=>lK});var a=r(68413),c=r(12837);let d="indicator",u="text-only",p="remove";function h(e,t){if("string"!=typeof e)return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{}return null}}let m=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),f=new Set(["javascript:","data:","file:","vbscript:"]);function g(e,t,r,n=!1,l=!1,s=[]){if(!e)return null;if("string"==typeof e&&e.startsWith("#")&&!l)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if("string"==typeof e&&e.startsWith("data:"))return l&&n&&e.startsWith("data:image/")?e:null;if("string"==typeof e&&e.startsWith("blob:")){try{let t=new URL(e);if("blob:"===t.protocol&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&"invalid"!==t)return e}}catch{}return null}let o=h(e,r);if(!o||f.has(o.protocol)||!(m.has(o.protocol)||s.includes(o.protocol)||s.includes("*")))return null;if("mailto:"===o.protocol||!o.protocol.match(/^https?:$/))return o.href;let i="string"==typeof e&&(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"));return o&&t.some(e=>{let t=h(e,r);return!!t&&t.origin===o.origin&&o.href.startsWith(t.href)})?i?o.pathname+o.search+o.hash:o.href:t.includes("*")?"https:"!==o.protocol&&"http:"!==o.protocol?null:i?o.pathname+o.search+o.hash:o.href:null}let b=Symbol("node-seen");var x=r(64835);let k=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],y={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...k,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...k],h2:[["className","sr-only"]],img:[...k,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...k,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...k],table:[...k],ul:[...k,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]};var w=r(95405),v=r(14097);let j={}.hasOwnProperty;function C(e,t){if(t&&"object"==typeof t)switch("string"==typeof t.type?t.type:""){case"comment":var r,n,l=e,s=t;if(l.schema.allowComments){let e="string"==typeof s.value?s.value:"",t=e.indexOf("--\x3e"),r={type:"comment",value:t<0?e:e.slice(0,t)};return L(r,s),r}return;case"doctype":var o=e,i=t;if(o.schema.allowDoctypes){let e={type:"doctype"};return L(e,i),e}return;case"element":return function(e,t){let r="string"==typeof t.tagName?t.tagName:"";e.stack.push(r);let n=N(e,t.children),l=function(e,t){let r,n=e.stack[e.stack.length-1],l=e.schema.attributes,s=e.schema.required,o=l&&j.call(l,n)?l[n]:void 0,i=l&&j.call(l,"*")?l["*"]:void 0,a=t&&"object"==typeof t?t:{},c={};for(r in a)if(j.call(a,r)){let t=a[r],n=S(e,R(o,r),r,t);null==n&&(n=S(e,R(i,r),r,t)),null!=n&&(c[r]=n)}if(s&&j.call(s,n)){let e=s[n];for(r in e)j.call(e,r)&&!j.call(c,r)&&(c[r]=e[r])}return c}(e,t.properties);e.stack.pop();let s=!1;if(r&&"*"!==r&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(s=!0,e.schema.ancestors&&j.call(e.schema.ancestors,r))){let t=e.schema.ancestors[r],n=-1;for(s=!1;++n<t.length;)e.stack.includes(t[n])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(r)?n:void 0;let o={type:"element",tagName:r,properties:l,children:n};return L(o,t),o}(e,t);case"root":let a;return L(a={type:"root",children:N(e,(r=t).children)},r),a;case"text":let c;return L(c={type:"text",value:"string"==typeof(n=t).value?n.value:""},n),c}}function N(e,t){let r=[];if(Array.isArray(t)){let n=-1;for(;++n<t.length;){let l=C(e,t[n]);l&&(Array.isArray(l)?r.push(...l):r.push(l))}}return r}function S(e,t,r,n){return t?Array.isArray(n)?function(e,t,r,n){let l=-1,s=[];for(;++l<n.length;){let o=$(e,t,r,n[l]);("number"==typeof o||"string"==typeof o)&&s.push(o)}return s}(e,t,r,n):$(e,t,r,n):void 0}function $(e,t,r,n){if(("boolean"==typeof n||"number"==typeof n||"string"==typeof n)&&function(e,t,r){let n=e.sc
2hema.protocols&&j.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!n||0===n.length)return!0;let l=String(r),s=l.indexOf(":"),o=l.indexOf("?"),i=l.indexOf("#"),a=l.indexOf("/");if(s<0||a>-1&&s>a||o>-1&&s>o||i>-1&&s>i)return!0;let c=-1;for(;++c<n.length;){let e=n[c];if(s===e.length&&l.slice(0,e.length)===e)return!0}return!1}(e,r,n)){if("object"==typeof t&&t.length>1){let e=!1,r=0;for(;++r<t.length;){let l=t[r];if(l&&"object"==typeof l&&"flags"in l){if(l.test(String(n))){e=!0;break}}else if(l===n){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(r)?e.schema.clobberPrefix+n:n}}function L(e,t){let r=(0,v.G1)(t);t.data&&(e.data=(0,w.A)(t.data)),r&&(e.position=r)}function R(e,t){let r,n=-1;if(e)for(;++n<e.length;){let l=e[n],s="string"==typeof l?l:l[0];if(s===t)return l;"data*"===s&&(r=l)}if(t.length>4&&"data"===t.slice(0,4).toLowerCase())return r}function T(e){return function(t){let r,n;return r={type:"root",children:[]},(n=C({schema:e?{...y,...e}:y,stack:[]},t))&&(Array.isArray(n)?1===n.length?r=n[0]:r.children=n:r=n),r}}var z=r(91359),E=Object.defineProperty,A=Object.defineProperties,I=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,H=(e,t,r)=>t in e?E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,O=(e,t)=>{for(var r in t||(t={}))P.call(t,r)&&H(e,r,t[r]);if(M)for(var r of M(t))_.call(t,r)&&H(e,r,t[r]);return e},D=(e,t)=>{let r=!1,n=!1;for(let l=0;l<t;l+=1){if("\\"===e[l]&&l+1<e.length&&"`"===e[l+1]){l+=1;continue}if("```"===e.substring(l,l+3)){n=!n,l+=2;continue}n||"`"!==e[l]||(r=!r)}return r||n},q=(e,t)=>{let r="```"===e.substring(t,t+3),n=t>0&&"```"===e.substring(t-1,t+2),l=t>1&&"```"===e.substring(t-2,t+1);return r||n||l},V=(e,t)=>{let r=!1,n=!1,l=-1;for(let s=0;s<e.length;s+=1){if("\\"===e[s]&&s+1<e.length&&"`"===e[s+1]){s+=1;continue}if("```"===e.substring(s,s+3)){n=!n,s+=2;continue}if(!n&&"`"===e[s])if(r){if(l<t&&t<s)return!0;r=!1,l=-1}else r=!0,l=s}return!1},B=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,F=/(\*\*)([^*]*\*?)$/,Z=/(__)([^_]*?)$/,W=/(\*\*\*)([^*]*?)$/,G=/(\*)([^*]*?)$/,K=/(_)([^_]*?)$/,U=/(`)([^`]*?)$/,Q=/(~~)([^~]*?)$/,X=/^[\s_~*`]*$/,Y=/^[\s]*[-*+][\s]+$/,J=/[\p{L}\p{N}_]/u,ee=/^```[^`\n]*```?$/,et=/^\*{4,}
2$/,er=/(__)([^_]+)_$/,en=/(~~)([^~]+)~$/,el=/~~/g,es=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||95===t||J.test(e)},eo=(e,t)=>{let r=1;for(let n=t+1;n<e.length;n+=1)if("["===e[n])r+=1;else if("]"===e[n]&&0==(r-=1))return n;return -1},ei=(e,t)=>{let r=!1,n=!1;for(let l=0;l<e.length&&l<t;l+=1){if("\\"===e[l]&&"$"===e[l+1]){l+=1;continue}"$"===e[l]&&("$"===e[l+1]?(n=!n,l+=1,r=!1):n||(r=!r))}return r||n},ea=(e,t)=>{for(let r=t;r<e.length;r+=1){if(")"===e[r])return!0;if(e[r]===`
3`)break}return!1},ec=(e,t)=>{for(let r=t-1;r>=0&&")"!==e[r];r-=1){if("("===e[r])return r>0&&"]"===e[r-1]&&ea(e,t);if(e[r]===`
4`)break}return!1},ed=(e,t,r)=>{let n=0;for(let r=t-1;r>=0;r-=1)if(e[r]===`
5`){n=r+1;break}let l=e.length;for(let r=t;r<e.length;r+=1)if(e[r]===`
6`){l=r;break}let s=e.substring(n,l),o=0,i=!1;for(let e of s)if(e===r)o+=1;else if(" "!==e&&"	"!==e){i=!0;break}return o>=3&&!i},eu=(e,t,r,n)=>!!("\\"===r||e.includes("$")&&ei(e,t))||("*"!==r&&"*"===n?(t<e.length-2?e[t+2]:"")!=="*":!!("*"===r||r&&n&&es(r)&&es(n)||(!r||" "===r||"	"===r||r===`
7`)&&(!n||" "===n||"	"===n||n===`
8`))),ep=e=>{let t=0,r=!1,n=e.length;for(let l=0;l<n;l+=1){if("`"===e[l]&&l+2<n&&"`"===e[l+1]&&"`"===e[l+2]){r=!r,l+=2;continue}if(r||"*"!==e[l])continue;let s=l>0?e[l-1]:"",o=l<n-1?e[l+1]:"";eu(e,l,s,o)||(t+=1)}return t},eh=(e,t,r,n)=>!!("\\"===r||e.includes("$")&&ei(e,t)||ec(e,t)||((e,t)=>{for(let r=t-1;r>=0&&">"!==e[r];r-=1){if("<"===e[r]){let t=r+1<e.length?e[r+1]:"";return t>="a"&&t<="z"||t>="A"&&t<="Z"||"/"===t}if(e[r]===`
9`)break}return!1})(e,t)||"_"===r||"_"===n||r&&n&&es(r)&&es(n)),em=e=>{let t=0,r=!1;for(let n=0;n<e.length;n+=1){if("`"===e[n]&&n+2<e.length&&"`"===e[n+1]&&"`"===e[n+2]){r=!r,n+=2;continue}r||"*"===e[n]&&n+1<e.length&&"*"===e[n+1]&&(t+=1,n+=1)}return t},ef=e=>{let t=0,r=!1;for(let n=0;n<e.length;n+=1){if("`"===e[n]&&n+2<e.length&&"`"===e[n+1]&&"`"===e[n+2]){r=!r,n+=2;continue}r||"_"===e[n]&&n+1<e.length&&"_"===e[n+1]&&(t+=1,n+=1)}return t},eg=e=>{let t=!1;for(let r=0;r<e.length;r+=1){if("`"===e[r]&&r+2<e.length&&"`"===e[r+1]&&"`"===e[r+2]){t=!t,r+=2;continue}if(!t&&"_"===e[r]&&"_"!==e[r-1]&&"_"!==e[r+1]&&"\\"!==e[r-1]&&!ei(e,r)&&!ec(e,r)){let t=r>0?e[r-1]:"",n=r<e.length-1?e[r+1]:"";if(t&&n&&es(t)&&es(n))continue;return r}}return -1},eb=/<[a-zA-Z/][^>]*$/,ex=(e,t)=>t>=2&&"```"===e.substring(t-2,t+1)||t>=1&&"```"===e.substring(t-1,t+2)||t<=e.length-3&&"```"===e.substring(t,t+3),ek=(e,t,r)=>{let n=t>0&&"!"===e[t-1],l=n?t-1:t;if(!e.substring(t+1).includes("]")||-1===eo(e,t)){let s=e.substring(0,l);if(n)return s;if("text-only"===r){let r=((e,t)=>{for(let r=0;r<t;r++)if("["===e[r]&&!D(e,r)){if(r>0&&"!"===e[r-1])continue;let t=eo(e,r);if(-1===t)return r;if(t+1<e.length&&"("===e[t+1]){let n=e.indexOf(")",t+2);-1!==n&&(r=n)}}return t})(e,t);return e.substring(0,r)+e.substring(r+1)}return`${e}](streamdown:incomplete-link)`}return null},ey=(e,t="protocol")=>{let r=e.lastIndexOf("](");if(-1!==r&&!D(e,r)){let n=((e,t,r)=>{if(e.substring(t+2).includes(")"))return null;let n=((e,t)=>{let r=1;for(let n=t-1;n>=0;n-=1)if("]"===e[n])r+=1;else if("["===e[n]&&0==(r-=1))return n;return -1})(e,t);if(-1===n||D(e,n))return null;let l=n>0&&"!"===e[n-1],s=e.substring(0,l?n-1:n);if(l)return s;let o=e.substring(n+1,t);return"text-only"===r?`${s}${o}`:`${s}[${o}](streamdown:incomplete-link)`})(e,r,t);if(null!==n)return n}for(let r=e.length-1;r>=0;r-=1)if("["===e[r]&&!D(e,r)){let n=ek(e,r,t);if(null!==n)return n}return e},ew=/^-{1,2}$/,ev=/^[\s]*-{1,2}[\s]+$/,ej=/^={1,2}$/,eC=/^[\s]*={1,2}[\s]+$/,eN=RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),eS=[{handler:{name:"singleTilde",handle:e=>e&&"string"==typeof e&&e.includes("~")?e.replace(eN,(t,r)=>D(e,r)?t:"\\~"):e,priority:0},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:e=>e&&"string"==typeof e&&e.includes(">")?e.replace(B,(t,r,n,l)=>D(e,l)?t:`${r}\\>${n}`):e,priority:5},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:e=>{let t=e.match(eb);return!t||void 0===t.index||D(e,t.index)?e:e.substring(0,t.index).trimEnd()},priority:10},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:e=>{if(!e||"string"!=typeof e)return e;let t=e.lastIndexOf(`
10`);if(-1===t)return e;let r=e.substring(t+1),n=e.substring(0,t),l=r.trim();if(ew.test(l)&&!r.match(ev)){let t=n.split(`
11`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(ej.test(l)&&!r.match(eC)){let t=n.split(`
12`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}return e},priority:15},optionKey:"setextHeadings"},{handler:{name:"links",handle:ey,priority:20},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:e=>{let t,r;if(et.test(e))return e;let n=e.match(W);if(!n)return e;let l=n[2],s=e.lastIndexOf(n[1]);return!l||X.test(l)||D(e,s)||V(e,s)||ed(e,s,"*")?e:(e=>{let t=0,r=0,n=!1;for(let l=0;l<e.length;l+=1){if("`"===e[l]&&l+2<e.length&&"`"===e[l+1]&&"`"===e[l+2]){r>=3&&(t+=Math.floor(r/3)),r=0,n=!n,l+=2;continue}n||("*"===e[l]?r+=1:(r>=3&&(t+=Math.floor(r/3)),r=0))}return r>=3&&(t+=Math.floor(r/3)),t})(e)%2==1?(t=em(e),r=ep(e),t%2==0&&r%2==0)?e:`${e}***`:e},priority:30},optionKey:"boldItalic"},{handler:{name:"bold",handle:e=>{let t=e.match(F);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return D(e,n)||V(e,n)||((e,t,r)=>{if(!t||X.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
13`),l=e.substring(-1===n?0:n+1,r);return!!(Y.test(l)&&t.includes(`
14`))||ed(e,r,"*")})(e,r,n)?e:em(e)%2==1?r.endsWith("*")?`${e}*`:`${e}**`:e},priority:35},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:e=>{let t=e.match(Z);if(!t){let t=e.match(er);if(t){let r=e.lastIndexOf(t[1]);if(!(D(e,r)||V(e,r))&&ef(e)%2==1)return`${e}_`}return e}let r=t[2],n=e.lastIndexOf(t[1]);return D(e,n)||V(e,n)||((e,t,r)=>{if(!t||X.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
15`),l=e.substring(-1===n?0:n+1,r);return!!(Y.test(l)&&t.includes(`
16`))||ed(e,r,"_")})(e,r,n)?e:ef(e)%2==1?`${e}__`:e},priority:40},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:e=>{if(!e.match(G))return e;let t=(e=>{let t=!1;for(let r=0;r<e.length;r+=1){if("`"===e[r]&&r+2<e.length&&"`"===e[r+1]&&"`"===e[r+2]){t=!t,r+=2;continue}if(!t&&"*"===e[r]&&"*"!==e[r-1]&&"*"!==e[r+1]&&"\\"!==e[r-1]&&!ei(e,r)){let t=r>0?e[r-1]:"",n=r<e.length-1?e[r+1]:"";if((!t||" "===t||"	"===t||t===`
17`)&&(!n||" "===n||"	"===n||n===`
18`)||t&&n&&es(t)&&es(n))continue;return r}}return -1})(e);if(-1===t||D(e,t)||V(e,t))return e;let r=e.substring(t+1);return!r||X.test(r)?e:ep(e)%2==1?`${e}*`:e},priority:41},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:e=>{if(!e.match(K))return e;let t=eg(e);if(-1===t)return e;let r=e.substring(t+1);if(!r||X.test(r)||D(e,t)||V(e,t))return e;if((e=>{let t=0,r=!1,n=e.length;for(let l=0;l<n;l+=1){if("`"===e[l]&&l+2<n&&"`"===e[l+1]&&"`"===e[l+2]){r=!r,l+=2;continue}if(r||"_"!==e[l])continue;let s=l>0?e[l-1]:"",o=l<n-1?e[l+1]:"";eh(e,l,s,o)||(t+=1)}return t})(e)%2==1){let t=(e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(em(t)%2!=1)return null;let r=t.indexOf("**"),n=eg(t);return -1!==r&&-1!==n&&r<n?`${t}_**`:null})(e);return null!==t?t:(e=>{let t=e.length;for(;t>0&&e[t-1]===`
19`;)t-=1;if(t<e.length){let r=e.slice(0,t),n=e.slice(t);return`${r}_${n}`}return`${e}_`})(e)}return e},priority:42},optionKey:"italic"},{handler:{name:"inlineCode",handle:e=>{let t=!e.match(ee)||e.includes(`
20`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e;if(null!==t)return t;let r=e.match(U);if(r&&(e.match(/```/g)||[]).length%2!=1){let t=r[2];if(!t||X.test(t))return e;if((e=>{let t=0;for(let r=0;r<e.length;r+=1){if("\\"===e[r]&&r+1<e.length&&"`"===e[r+1]){r+=1;continue}"`"!==e[r]||q(e,r)||(t+=1)}return t})(e)%2==1)return`${e}\``}return e},priority:50},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:e=>{var t,r;let n=e.match(Q);if(n){let r=n[2];if(!r||X.test(r))return e;let l=e.lastIndexOf(n[1]);if(D(e,l)||V(e,l))return e;if((null==(t=e.match(el))?void 0:t.length)%2==1)return`${e}~~`}else{let t=e.match(en);if(t){let n=e.lastIndexOf(t[0].slice(0,2));if(D(e,n)||V(e,n))return e;if((null==(r=e.match(el))?void 0:r.length)%2==1)return`${e}~`}}return e},priority:60},optionKey:"strikethrough"},{handler:{name:"katex",handle:e=>(e=>{let t=0,r=!1;for(let n=0;n<e.length-1;n+=1)"`"!==e[n]||ex(e,n)||(r=!r),r||"$"!==e[n]||"$"!==e[n+1]||(t+=1,n+=1);return t})(e)%2==0?e:(e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return -1===t||-1===e.indexOf(`
21`,t)||e.endsWith(`
22`)?`${e}$$`:`${e}
23$$`})(e),priority:70},optionKey:"katex"},{handler:{name:"inlineKatex",handle:e=>(e=>{let t=0,r=!1;for(let n=0;n<e.length;n+=1){if("\\"===e[n]){n+=1;continue}
23if("`"===e[n]&&!ex(e,n)){r=!r;continue}r||"$"!==e[n]||(n+1<e.length&&"$"===e[n+1]?n+=1:t+=1)}return t})(e)%2==1?`${e}$`:e,priority:75},optionKey:"inlineKatex"}],e$=r(15658),eL=r(18333);let eR=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),eT=[],ez=(e,t,r)=>{if(0==e.length-t)return r.classGroupId;let n=e[t],l=r.nextPart.get(n);if(l){let r=ez(e,t+1,l);if(r)return r}let s=r.validators;if(null===s)return;let o=0===t?e.join("-"):e.slice(t).join("-"),i=s.length;for(let e=0;e<i;e++){let t=s[e];if(t.validator(o))return t.classGroupId}},eE=(e,t)=>{let r=eR();for(let n in e)eA(e[n],r,n,t);return r},eA=(e,t,r,n)=>{let l=e.length;for(let s=0;s<l;s++)eI(e[s],t,r,n)},eI=(e,t,r,n)=>{"string"==typeof e?eM(e,t,r):"function"==typeof e?eP(e,t,r,n):e_(e,t,r,n)},eM=(e,t,r)=>{(""===e?t:eH(t,e)).classGroupId=r},eP=(e,t,r,n)=>{eO(e)?eA(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:r,validator:e}))},e_=(e,t,r,n)=>{let l=Object.entries(e),s=l.length;for(let e=0;e<s;e++){let[s,o]=l[e];eA(o,eH(t,s),r,n)}},eH=(e,t)=>{let r=e,n=t.split("-"),l=n.length;for(let e=0;e<l;e++){let t=n[e],l=r.nextPart.get(t);l||(l=eR(),r.nextPart.set(t,l)),r=l}return r},eO=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,eD=[],eq=(e,t,r,n,l)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:l}),eV=/\s+/,eB=e=>{let t;if("string"==typeof e)return e;let r="";for(let n=0;n<e.length;n++)e[n]&&(t=eB(e[n]))&&(r&&(r+=" "),r+=t);return r},eF=[],eZ=e=>{let t=t=>t[e]||eF;return t.isThemeGetter=!0,t},eW=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,eG=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eK=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,eU=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eQ=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,eX=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,eY=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eJ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,e0=e=>eK.test(e),e1=e=>!!e&&!Number.isNaN(Number(e)),e5=e=>!!e&&Number.isInteger(Number(e)),e2=e=>e.endsWith("%")&&e1(e.slice(0,-1)),e3=e=>eU.test(e),e6=()=>!0,e9=e=>eQ.test(e)&&!eX.test(e),e4=()=>!1,e7=e=>eY.test(e),e8=e=>eJ.test(e),te=e=>!tr(e)&&!td(e),tt=e=>tx(e,tv,e4),tr=e=>eW.test(e),tn=e=>tx(e,tj,e9),tl=e=>tx(e,tC,e1),ts=e=>tx(e,tS,e6),to=e=>tx(e,tN,e4),ti=e=>tx(e,ty,e4),ta=e=>tx(e,tw,e8),tc=e=>tx(e,t$,e7),td=e=>eG.test(e),tu=e=>tk(e,tj),tp=e=>tk(e,tN),th=e=>tk(e,ty),tm=e=>tk(e,tv),tf=e=>tk(e,tw),tg=e=>tk(e,t$,!0),tb=e=>tk(e,tS,!0),tx=(e,t,r)=>{let n=eW.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},tk=(e,t,r=!1)=>{let n=eG.exec(e);return!!n&&(n[1]?t(n[1]):r)},ty=e=>"position"===e||"percentage"===e,tw=e=>"image"===e||"url"===e,tv=e=>"length"===e||"size"===e||"bg-size"===e,tj=e=>"length"===e,tC=e=>"number"===e,tN=e=>"family-name"===e,tS=e=>"number"===e||"weight"===e,t$=e=>"shadow"===e,tL=(lr=()=>{let e=eZ("color"),t=eZ("font"),r=eZ("text"),n=eZ("font-weight"),l=eZ("tracking"),s=eZ("leading"),o=eZ("breakpoint"),i=eZ("container"),a=eZ("spacing"),c=eZ("radius"),d=eZ("shadow"),u=eZ("inset-shadow"),p=eZ("text-shadow"),h=eZ("drop-shadow"),m=eZ("blur"),f=eZ("perspective"),g=eZ("aspect"),b=eZ("ease"),x=eZ("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...y(),td,tr],v=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],C=()=>[td,tr,a],N=()=>[e0,"full","auto",...C()],S=()=>[e5,"none","subgrid",td,tr],$=()=>["auto",{span:["full",e5,td,tr]},e5,td,tr],L=()=>[e5,"auto",td,tr],R=()=>["auto","min","max","fr",td,tr],T=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...C()],A=()=>[e0,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],I=()=>[e0,"screen","full","dvw","lvw","svw","min","max","fit",...C()],M=()=>[e0,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],P=()=>[e,td,tr],_=()=>[...y(),th,ti,{position:[td,tr]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",tm,tt,{size:[td,tr]}],D=()=>[e2,tu,tn],q=()=>["","none","full",c,td,tr],V=()=>
vendor: 7,101 bytes, line 23
23["",e1,tu,tn],B=()=>["solid","dashed","dotted","double"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[e1,e2,th,ti],W=()=>["","none",m,td,tr],G=()=>["none",e1,td,tr],K=()=>["none",e1,td,tr],U=()=>[e1,td,tr],Q=()=>[e0,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[e3],breakpoint:[e3],color:[e6],container:[e3],"drop-shadow":[e3],ease:["in","out","in-out"],font:[te],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[e3],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[e3],shadow:[e3],spacing:["px",e1],text:[e3],"text-shadow":[e3],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",e0,tr,td,g]}],container:["container"],columns:[{columns:[e1,tr,td,i]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:v()}],"overflow-x":[{"overflow-x":v()}],"overflow-y":[{"overflow-y":v()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{"inset-s":N(),start:N()}],end:[{"inset-e":N(),end:N()}],"inset-bs":[{"inset-bs":N()}],"inset-be":[{"inset-be":N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[e5,"auto",td,tr]}],basis:[{basis:[e0,"full","auto",i,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[e1,e0,"auto","initial","none",tr]}],grow:[{grow:["",e1,td,tr]}],shrink:[{shrink:["",e1,td,tr]}],order:[{order:[e5,"first","last","none",td,tr]}],"grid-cols":[{"grid-cols":S()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":S()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...T(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...T()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":T()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mbs:[{mbs:E()}],mbe:[{mbe:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],"inline-size":[{inline:["auto",...I()]}],"min-inline-size":[{"min-inline":["auto",...I()]}],"max-inline-size":[{"max-inline":["none",...I()]}],"block-size":[{block:["auto",...M()]}],"min-block-size":[{"min-block":["auto",...M()]}],"max-block-size":[{"max-block":["none",...M()]}],w:[{w:[i,"screen",...A()]}],"min-w":[{"min-w":[i,"screen","none",...A()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[o]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",r,tu,tn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,tb,ts]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",e2,tr]}],"font-family":[{font:[tp,to,t]}],"font-features":[{"font-features":[tr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,td,tr]}],"line-clamp":[{"line-clamp":[e1,"none",td,tl]}],leading:[{leading:[s,...C()]}],"list-image":[{"list-image":["none",td,tr]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",td,tr]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[e1,"from-font","auto",td,tn]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[e1,"auto",td,tr]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",td,tr]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",td,tr]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},e5,td,tr],radial:["",td,tr],conic:[e5,td,tr]},tf,ta]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:D()}
23],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-bs":[{"border-bs":V()}],"border-w-be":[{"border-be":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":V()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...B(),"hidden","none"]}],"divide-style":[{divide:[...B(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}
vendor: 4,198 bytes, line 23
23],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[e1,td,tr]}],"outline-w":[{outline:["",e1,tu,tn]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",d,tg,tc]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",u,tg,tc]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[e1,tn]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",p,tg,tc]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[e1,td,tr]}],"mix-blend":[{"mix-blend":[...F(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":F()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[e1]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[td,tr]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[e1]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",td,tr]}],filter:[{filter:["","none",td,tr]}],blur:[{blur:W()}],brightness:[{brightness:[e1,td,tr]}],contrast:[{contrast:[e1,td,tr]}],"drop-shadow":[{"drop-shadow":["","none",h,tg,tc]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",e1,td,tr]}],"hue-rotate":[{"hue-rotate":[e1,td,tr]}],invert:[{invert:["",e1,td,tr]}],saturate:[{saturate:[e1,td,tr]}],sepia:[{sepia:["",e1,td,tr]}],"backdrop-filter":[{"backdrop-filter":["","none",td,tr]}],"backdrop-blur":[{"backdrop-blur":W()}],"backdrop-brightness":[{"backdrop-brightness":[e1,td,tr]}],"backdrop-contrast":[{"backdrop-contrast":[e1,td,tr]}
23],"backdrop-grayscale":[{"backdrop-grayscale":["",e1,td,tr]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[e1,td,tr]}],"backdrop-invert":[{"backdrop-invert":["",e1,td,tr]}],"backdrop-opacity":[{"backdrop-opacity":[e1,td,tr]}],"backdrop-saturate":[{"backdrop-saturate":[e1,td,tr]}],"backdrop-sepia":[{"backdrop-sepia":["",e1,td,tr]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",td,tr]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[e1,"initial",td,tr]}],ease:[{ease:["linear","initial",b,td,tr]}],delay:[{delay:[e1,td,tr]}],animate:[{animate:["none",x,td,tr]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,td,tr]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:K()}],"scale-x":[{"scale-x":K()}],"scale-y":[{"scale-y":K()}],"scale-z":[{"scale-z":K()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[td,tr,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Q()}],"translate-x":[{"translate-x":Q()}],"translate-y":[{"translate-y":Q()}],"translate-z":[{"translate-z":Q()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",td,tr]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",td,tr]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[e1,tu,tn,tl]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},i=e=>{let t=l(e);if(t)return t;let r=((e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:l,sortModifiers:s}=t,o=[],i=e.trim().split(eV),a="";for(let e=i.length-1;e>=0;e-=1){let t=i[e],{isExternal:c,modifiers:d,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:h}=r(t);if(c){a=t+(a.length>0?" "+a:a);continue}let m=!!h,f=n(m?p.substring(0,h):p);if(!f){if(!m||!(f=n(p))){a=t+(a.length>0?" "+a:a);continue}m=!1}let g=0===d.length?"":1===d.length?d[0]:s(d).join(":"),b=u?g+"!":g,x=b+f;if(o.indexOf(x)>-1)continue;o.push(x);let k=l(f,m);for(let e=0;e<k.length;++e){let t=k[e];o.push(b+t)}a=t+(a.length>0?" "+a:a)}return a})(e,n);return s(e,r),r},o=e=>{var t;let r;return l=(n={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null),l=(l,s)=>{r[l]=s,++t>e&&(t=0,n=r,r=Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(l(e,t),t):void 0},set(e,t){e in r?r[e]=t:l(e,t)}}})((t=[].reduce((e,t)=>
23t(e),lr())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:r}=e,n=e=>{let t,r=[],n=0,l=0,s=0,o=e.length;for(let i=0;i<o;i++){let o=e[i];if(0===n&&0===l){if(":"===o){r.push(e.slice(s,i)),s=i+1;continue}if("/"===o){t=i;continue}}"["===o?n++:"]"===o?n--:"("===o?l++:")"===o&&l--}let i=0===r.length?e:e.slice(s),a=i,c=!1;return i.endsWith("!")?(a=i.slice(0,-1),c=!0):i.startsWith("!")&&(a=i.slice(1),c=!0),eq(r,c,a,t&&t>s?t-s:void 0)};if(t){let e=t+":",r=n;n=t=>t.startsWith(e)?r(t.slice(e.length)):eq(eD,!1,t,void 0,!0)}if(r){let e=n;n=t=>r({className:t,parseClassName:e})}return n})(t),sortModifiers:(r=new Map,t.orderSensitiveModifiers.forEach((e,t)=>{r.set(e,1e6+t)}),e=>{let t=[],n=[];for(let l=0;l<e.length;l++){let s=e[l],o="["===s[0],i=r.has(s);o||i?(n.length>0&&(n.sort(),t.push(...n),n=[]),t.push(s)):n.push(s)}return n.length>0&&(n.sort(),t.push(...n)),t}),...(e=>{let t=(e=>{let{theme:t,classGroups:r}=e;return eE(r,t)})(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]")){var r;let t,n,l;return -1===(r=e).slice(1,-1).indexOf(":")?void 0:(n=(t=r.slice(1,-1)).indexOf(":"),(l=t.slice(0,n))?"arbitrary.."+l:void 0)}let n=e.split("-"),l=+(""===n[0]&&n.length>1);return ez(n,l,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=n[e],l=r[e];if(t){if(l){let e=Array(l.length+t.length);for(let t=0;t<l.length;t++)e[t]=l[t];for(let r=0;r<t.length;r++)e[l.length+r]=t[r];return e}return t}return l||eT}return r[e]||eT}}})(t)}).cache.get,s=n.cache.set,o=i,i(e)},(...e)=>o(((...e)=>{let t,r,n=0,l="";for(;n<e.length;)(t=e[n++])&&(r=eB(t))&&(l&&(l+=" "),l+=r);return l})(...e)));var tR=r(72361),tT=r(60140),tz=r(38102),tE=r(51564),tA=r(11020),tI=r(61789),tM=r(68435);function tP(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var t_=tP(),tH={exec:()=>null};function tO(e,t=""){let r="string"==typeof e?e:e.source,n={replace:(e,t)=>{let l="string"==typeof t?t:t.source;return l=l.replace(tq.caret,"$1"),r=r.replace(e,l),n},getRegex:()=>new RegExp(r,t)};return n}var tD=(()=>{try{return!!RegExp("(?<=1)(?<!1)")}catch{return!1}})(),tq={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:e=>RegExp(`^( {0,3}${e})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},tV=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tB=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,tF=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tZ=tO(tF).replace(/bull/g,tB).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(),tW=tO(tF).replace(/bull/g,tB).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(),tG=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,tK=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,t
vendor: 4,164 bytes, lines 23-24
23U=tO(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",tK).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),tQ=tO(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tB).getRegex(),tX="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",tY=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,tJ=tO("^ {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|/?>)[\\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",tY).replace("tag",tX).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t0=tO(tG).replace("hr",tV).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]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tX).getRegex(),t1={blockquote:tO(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",t0).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:tU,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:tV,html:tJ,lheading:tZ,list:tQ,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:t0,table:tH,text:/^[^\n]+/},t5=tO("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",tV).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",tX).getRegex(),t2={...t1,lheading:tW,table:t5,paragraph:tO(tG).replace("hr",tV).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",t5).replace("blockquote"," {0,3}>").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",tX).getRegex()},t3={...t1,html:tO("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",tY).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:tH,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:tO(tG).replace("hr",tV).replace("heading",` *#{1,6} *[^
24]`).replace("lheading",tZ).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},t6=/^( {2,}|\\)\n(?!\s*$)/,t9=/[\p{P}\p{S}]/u,t4=/[\s\p{P}\p{S}]/u,t7=/[^\s\p{P}\p{S}]/u,t8=tO(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,t4).getRegex(),re=/(?!~)[\p{P}\p{S}]/u,rt=tO(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("prec
24ode-",tD?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),rr=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,rn=tO(rr,"u").replace(/punct/g,t9).getRegex(),rl=tO(rr,"u").replace(/punct/g,re).getRegex(),rs="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ro=tO(rs,"gu").replace(/notPunctSpace/g,t7).replace(/punctSpace/g,t4).replace(/punct/g,t9).getRegex(),ri=tO(rs,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,re).getRegex(),ra=tO("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,t7).replace(/punctSpace/g,t4).replace(/punct/g,t9).getRegex(),rc=tO(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,t9).getRegex(),rd=tO("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,t7).replace(/punctSpace/g,t4).replace(/punct/g,t9).getRegex(),ru=tO(/\\(punct)/,"gu").replace(/punct/g,t9).getRegex(),rp=tO(/^<(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(),rh=tO(tY).replace("(?:--\x3e|$)","--\x3e").getRegex(),rm=tO("^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",rh).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),rf=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,rg=tO(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",rf).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rb=tO(/^!?\[(label)\]\[(ref)\]/).replace("label",rf).replace("ref",tK).getRegex(),rx=tO(/^!?\[(ref)\](?:\[\])?/).replace("ref",tK).getRegex(),rk=tO("reflink|nolink(?!\\()","g").replace("reflink",rb).replace("nolink",rx).getRegex(),ry=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,rw={_backpedal:tH,anyPunctuation:ru,autolink:rp,blockSkip:rt,br:t6,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:tH,delLDelim:tH,delRDelim:tH,emStrongLDelim:rn,emStrongRDelimAst:ro,emStrongRDelimUnd:ra,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}
24~])/,link:rg,nolink:rx,punctuation:t8,reflink:rb,reflinkSearch:rk,tag:rm,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:tH},rv={...rw,link:tO(/^!?\[(label)\]\((.*?)\)/).replace("label",rf).getRegex(),reflink:tO(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rf).getRegex()},rj={...rw,emStrongRDelimAst:ri,emStrongLDelim:rl,delLDelim:rc,delRDelim:rd,url:tO(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ry).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:tO(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ry).getRegex()},rC={...rj,br:tO(t6).replace("{2,}","*").getRegex(),text:tO(rj.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},rN={normal:t1,gfm:t2,pedantic:t3},rS={normal:rw,gfm:rj,breaks:rC,pedantic:rv},r$={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},rL=e=>r$[e];function rR(e,t){if(t){if(tq.escapeTest.test(e))return e.replace(tq.escapeReplace,rL)}else if(tq.escapeTestNoEncode.test(e))return e.replace(tq.escapeReplaceNoEncode,rL);return e}function rT(e){try{e=encodeURI(e).replace(tq.percentDecode,"%")}catch{return null}return e}function rz(e,t){let r=e.replace(tq.findPipe,(e,t,r)=>{let n=!1,l=t;for(;--l>=0&&"\\"===r[l];)n=!n;return n?"|":" |"}).split(tq.splitPipe),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(tq.slashPipe,"|");return r}function rE(e,t,r){let n=e.length;if(0===n)return"";let l=0;for(;l<n;){let s=e.charAt(n-l-1);if(s!==t||r)if(s!==t&&r)l++;else break;else l++}return e.slice(0,n-l)}function rA(e,t,r,n,l){let s=t.href,o=t.title||null,i=e[1].replace(l.other.outputLinkReplace,"$1");n.state.inLink=!0;let a={type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:s,title:o,text:i,tokens:n.inlineTokens(i)};return n.state.inLink=!1,a}var rI=class{options;rules;lexer;constructor(e){this.options=e||t_}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:rE(e,`
25`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],r=function(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(null===n)return t;let l=n[1];return t.split(`
26`).map(e=>{let t=e.match(r.other.beginningSpace);if(null===t)return e;let[n]=t;return n.length>=l.length?e.slice(l.length):e}).join(`
27`)}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=rE(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:rE(t[0],`
28`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=rE(t[0],`
29`).split(`
30`),r="",n="",l=[];for(;e.length>0;){let t=!1,s=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))s.push(e[o]),t=!0;else if(t)break;else s.push(e[o]);e=e.slice(o);let i=s.join(`
31`),a=i.replace(this.rules.other.blockquoteSetextReplace,`
32    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
33${i}`:i,n=n?`${n}
34${a}`:a;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(a,l,!0),this.lexer.state.top=c,0===e.length)break;let d=l.at(-1);if(d?.type==="code")break;if(d?.type==="blockquote"){let t=d.raw+`
35`+e.join(`
36`),s=this.blockquote(t);l[l.length-1]=s,r=r.substring(0,r.length-d.raw.length)+s.raw,n=n.substring(0,n.length-d.text.length)+s.text;break}if(d?.type==="list"){let t=d.raw+`
37`+e.join(`
38`),s=this.list(t);l[l.length-1]=s,r=r.substring(0,r.length-d.raw.length)+s.raw,n=n.substring(0,n.length-d.raw.length)+s.raw,e=t.substring(l.at(-1).raw.length).split(`
39`);continue}}return{type:"blockquote",raw:r,tokens:l,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),n=r.length>1,l={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let s=this.rules.other.listItemRegex(r),o=!1;for(;e;){let r=!1,n="",i="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let a=function(e,t=0){let r=t,n="";for(let t of e)if("	"===t){let e=4-r%4;n+=" ".repeat(e),r+=e}else n+=t,r++;return n}(t[2].split(`
40`,1)[0],t[1].length),c=e.split(`
41`,1)[0],d=!a.trim(),u=0;if(this.options.pedantic?(u=2,i=a.trimStart()):d?u=t[1].length+1:(u=(u=a.search(this.rules.other.nonSpaceChar))>4?1:u,i=a.slice(u),u+=t[1].length),d&&this.rules.other.blankLine.test(c)&&(n+=c+`
42`,e=e.substring(c.length+1),r=!0),!r){let t=this.rules.other.nextBulletRegex(u),r=this.rules.other.hrRegex(u),l=this.rules.other.fencesBeginRegex(u),s=this.rules.other.headingBeginRegex(u),o=this.rules.other.htmlBeginRegex(u),p=this.rules.other.blockquoteBeginRegex(u);for(;e;){let h=e.split(`
43`,1)[0],m;if(c=h,m=this.options.pedantic?c=c.replace(this.rules.other.listReplaceNesting,"  "):c.replace(this.rules.other.tabCharGlobal,"    "),l.test(c)||s.test(c)||o.test(c)||p.test(c)||t.test(c)||r.test(c))break;if(m.search(this.rules.other.nonSpaceChar)>=u||!c.trim())i+=`
44`+m.slice(u);else{if(d||a.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||l.test(a)||s.test(a)||r.test(a))break;i+=`
45`+c}d=!c.trim(),n+=h+`
46`,e=e.substring(h.length+1),a=m.slice(u)}}l.loose||(o?l.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(o=!0)),l.items.push({type:"list_item",raw:n,task:!!this.options.gfm&&this.rules.other.listIsTask.test(i),loose:!1,text:i,tokens:[]}),l.raw+=n}let i=l.items.at(-1);if(!i)return;for(let e of(i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd(),l.raw=l.raw.trimEnd(),l.items)){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,""),e.tokens[0]?.type==="text"||e.tokens[0]?.type==="paragraph"){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,"");break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let r={type:"checkbox",raw:t[0]+" ",checked:"[ ]"!==t[0]};e.checked=r.checked,l.loose?e.tokens[0]&&["paragraph","text"].includes(e.tokens[0].type)&&"tokens"in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=r.raw+e.tokens[0].raw,e.tokens[0].text=r.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(r)):e.tokens.unshift({type:"paragraph",raw:r.raw,text:r.raw,tokens:[r]}):e.tokens.unshift(r)}}if(!l.loose){let t=e.tokens.filter(e=>
46"space"===e.type);l.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(l.loose)for(let e of l.items)for(let t of(e.loose=!0,e.tokens))"text"===t.type&&(t.type="paragraph");return l}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=rz(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
47`):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let e of n)this.rules.other.tableAlignRight.test(e)?s.align.push("right"):this.rules.other.tableAlignCenter.test(e)?s.align.push("center"):this.rules.other.tableAlignLeft.test(e)?s.align.push("left"):s.align.push(null);for(let e=0;e<r.length;e++)s.header.push({text:r[e],tokens:this.lexer.inline(r[e]),header:!0,align:s.align[e]});for(let e of l)s.rows.push(rz(e,s.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:s.align[t]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
48`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=rE(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e){if(-1===e.indexOf(")"))return -1;let t=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if("("===e[r])t++;else if(")"===e[r]&&--t<0)return r;return t>0?-2:-1}(t[2]);if(-2===e)return;if(e>-1){let r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r.slice(1):r.slice(1,-1)),rA(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return rA(r,e,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!r||this.rules.inline.punctuation.exec(r))){let r=[...n[0]].length-1,l,s,o=r,i=0,a="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+r);null!==(n=a.exec(t));){if(!(l=n[1]||n[2]||n[3]||n[4]||n[5]||n[6]))continue;if(s=[...l].length,n[3]||n[4]){o+=s;continue}if((n[5]||n[6])&&r%3&&!((r+s)%3)){i+=s;continue}if((o-=s)>0)continue;s=Math.min(s,s+o+i);let t=[...n[0]][0].length,a=e.slice(0,r+n.index+t+s);if(Math.min(r,s)%2){let e=a.slice(1,-1);return{type:"em",raw:a,text:e,tokens:this.lexer.inlineTokens(e)}}let c=a.slice(2,-2);return{type:"strong",raw:a,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let n=this.rules.inline.delLDelim.exec(e);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let r=[...n[0]].length-1,l,s,o=r,i=this.rules.inline.delRDelim;for(i.lastIndex=0,t=t.slice(-1*e.length+r);null!==(n=i.exec(t));){if(!(l=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])||(s=[...l].length)!==r)continue;if(n[3]||n[4]){o+=s;continue}if((o-=s)>0)continue;s=Math.min(s,s+o);let t=[...n[0]][0].length,i=e.slice(0,r+n.index+t+s),a=i.slice(r,-r);return{type:"del",raw:i,text:a,tokens:this.lexer.inlineTokens(a)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,r;return r="@"===t[2]?"mailto:"+(e=t[1]):e=t[1],{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,r;if("@"===t[2])r="mailto:"+(e=t[0]);else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0])e=t[0],r="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},rM=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||t_,this.options.tokenizer=this.options.tokenizer||new rI,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:tq,block:rN.normal,inline:rS.normal};this.options.pedantic?(t.block=rN.pedantic,t.inline=rS.pedantic):this.options.gfm&&(t.block=rN.gfm,this.options.breaks?t.inline=rS.breaks:t.inline=rS.gfm),this.tokenizer.rules=t}static get rules(){return{block:rN,inline:rS}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(e){e=e.replace(tq.carriageReturn,`
49`),this.blockTokens(e,this.tokens);for(let e=0;
49e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(tq.tabCharGlobal,"    ").replace(tq.spaceLine,""));e;){let n;if(this.options.extensions?.block?.some(r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);let r=t.at(-1);1===n.raw.length&&void 0!==r?r.raw+=`
50`:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);let r=t.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(`
51`)?"":`
52`)+n.raw,r.text+=`
53`+n.text,this.inlineQueue.at(-1).src=r.text):t.push(n);continue}if((n=this.tokenizer.fences(e))||(n=this.tokenizer.heading(e))||(n=this.tokenizer.hr(e))||(n=this.tokenizer.blockquote(e))||(n=this.tokenizer.list(e))||(n=this.tokenizer.html(e))){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length);let r=t.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(`
54`)?"":`
55`)+n.raw,r.text+=`
56`+n.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},t.push(n));continue}if((n=this.tokenizer.table(e))||(n=this.tokenizer.lheading(e))){e=e.substring(n.raw.length),t.push(n);continue}let l=e;if(this.options.extensions?.startBlock){let t=1/0,r=e.slice(1),n;this.options.extensions.startBlock.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(l=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let s=t.at(-1);r&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
57`)?"":`
58`)+n.raw,s.text+=`
59`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):t.push(n),r=l.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);let r=t.at(-1);r?.type==="text"?(r.raw+=(r.raw.endsWith(`
60`)?"":`
61`)+n.raw,r.text+=`
62`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(n);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r;this.tokenizer.lexer=this;let n=e,l=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!==(l=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!==(l=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,l.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!==(l=this.tokenizer.rules.inline.blockSkip.exec(n));)r=l[2]?l[2].length:0,n=n.slice(0,l.index+r)+"["+"a".repeat(l[0].length-r-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let s=!1,o="";for(;e;){let r;if(s||(o=""),s=!1,this.options.extensions?.inline?.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if((r=this.tokenizer.escape(e))||(r=this.tokenizer.tag(e))||(r=this.tokenizer.link(e))){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===r.type&&n?.type==="text"?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if((r=this.tokenizer.emStrong(e,n,o))||(r=this.tokenizer.codespan(e))||(r=this.tokenizer.br(e))||(r=this.tokenizer.del(e,n,o))||(r=this.tokenizer.autolink(e))||!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let l=e;if(this.options.extensions?.startInline){let t=1/0,r=e.slice(1),n;this.options.extensions.startInline.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(l=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(l)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(o=r.raw.slice(-1)),s=!0;let n=t.at(-1);n?.type==="text"?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}},rP=class{options;parser;constructor(e){this.options=e||t_}space(e){return""}code({text:e,lang:t,escaped:r}){let n=(t||"").match(tq.notSpaceStart)?.[0],l=e.replace(tq.endingNewline,"")+`
63`;return n?'<pre><code class="language-'+rR(n)+'">'+(r?l:rR(l,!0))+`</code></pre>
64`:"<pre><code>"+(r?l:rR(l,!0))+`</code></pre>
65`}blockquote({tokens:e}){return`<blockquote>
66${this.parser.parse(e)}</blockquote>
67`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
68`}hr(e){return`<hr>
69`}list(e){let t=e.ordered,r=e.start,n="";for(let t=0;t<e.items.length;t++){let r=e.items[t];n+=this.listitem(r)}let l=t?"ol":"ul";return"<"+l+(t&&1!==r?' start="'+r+'"':"")+`>
70`+n+"</"+l+`>
71`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
72`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
73`}table(e){let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.tablecell(e.header[t]);t+=this.tablerow({text:r});let n="";for(let t=0;t<e.rows.length;t++){let l=e.rows[t];r="";for(let e=0;e<l.length;e++)r+=this.tablecell(l[e]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
74<thead>
75`+t+`</thead>
76`+n+`</table>
77`}tablerow({text:e}){return`<tr>
78${e}</tr>
79`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
80`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${rR(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let n=this.parser.parseInline(r),l=rT(e);if(null===l)return n;let s='<a href="'+(e=l)+'"';return t&&(s+=' title="'+rR(t)+'"'),s+=">"+n+"</a>"}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let l=rT(e);if(null===l)return rR(r);e=l;let s=`<img src="${e}" alt="${rR(r)}"`;return t&&(s+=` title="${rR(t)}"`),s+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:rR(e.text)}},r_=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},rH=class e{options;renderer;textRenderer;constructor(e){this.options=e||t_,this.options.renderer=this.options.renderer||new rP,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new r_}static parse(t,r){return new e(r).parse(t)}static parseInline(t,r){return new e(r).parseInline(t)}parse(e){this.renderer.parser=this;let t="";for(let r=0;r<e.length;r++){let n=e[r];if(this.options.extensions?.renderers?.[n.type]){let e=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.t
vendor: 7,134 bytes, lines 80-81
80ype)){t+=e||"";continue}}switch(n.type){case"space":t+=this.renderer.space(n);break;case"hr":t+=this.renderer.hr(n);break;case"heading":t+=this.renderer.heading(n);break;case"code":t+=this.renderer.code(n);break;case"table":t+=this.renderer.table(n);break;case"blockquote":t+=this.renderer.blockquote(n);break;case"list":t+=this.renderer.list(n);break;case"checkbox":t+=this.renderer.checkbox(n);break;case"html":t+=this.renderer.html(n);break;case"def":t+=this.renderer.def(n);break;case"paragraph":t+=this.renderer.paragraph(n);break;case"text":t+=this.renderer.text(n);break;default:{let e='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let r="";for(let n=0;n<e.length;n++){let l=e[n];if(this.options.extensions?.renderers?.[l.type]){let e=this.options.extensions.renderers[l.type].call({parser:this},l);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){r+=e||"";continue}}switch(l.type){case"escape":case"text":r+=t.text(l);break;case"html":r+=t.html(l);break;case"link":r+=t.link(l);break;case"image":r+=t.image(l);break;case"checkbox":r+=t.checkbox(l);break;case"strong":r+=t.strong(l);break;case"em":r+=t.em(l);break;case"codespan":r+=t.codespan(l);break;case"br":r+=t.br(l);break;case"del":r+=t.del(l);break;default:{let e='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return r}},rO=class{options;block;constructor(e){this.options=e||t_}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?rM.lex:rM.lexInline}provideParser(e=this.block){return e?rH.parse:rH.parseInline}},rD=new class{defaults=tP();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=rH;Renderer=rP;TextRenderer=r_;Lexer=rM;Tokenizer=rI;Hooks=rO;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":for(let e of n.header)r=r.concat(this.walkTokens(e.tokens,t));for(let e of n.rows)for(let n of e)r=r.concat(this.walkTokens(n.tokens,t));break;case"list":r=r.concat(this.walkTokens(n.items,t));break;default:{let e=n;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(n=>{let l=e[n].flat(1/0);r=r.concat(this.walkTokens(l,t))}):e.tokens&&(r=r.concat(this.walkTokens(e.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error("extension name required");if("renderer"in e){let r=t.renderers[e.name];r?t.renderers[e.name]=function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:t.renderers[e.name]=e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw Error("extension level must be 'block' or 'inline'");let r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),r.extensions=t),e.renderer){let t=this.defaults.renderer||new rP(this.defaults);for(let r in e.renderer){if(!(r in t))throw Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let n=e.renderer[r],l=t[r];t[r]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=l.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new rI(this.defaults);for(let r in e.tokenizer){if(!(r in t))throw Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let n=e.tokenizer[r],l=t[r];t[r]=(...e)=>{let r=n.apply(t,e);return!1===r&&(r=l.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new rO;for(let r in e.hooks){if(!(r in t))throw Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let n=e.hooks[r],l=t[r];rO.passThroughHooks.has(r)?t[r]=e=>{if(this.defaults.async&&rO.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await n.call(t,e);return l.call(t,r)})();let s=n.call(t,e);return l.call(t,s)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let r=await n.apply(t,e);return!1===r&&(r=await l.apply(t,e)),r})();let r=n.apply(t,e);return!1===r&&(r=l.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return rM.lex(e,t??this.defaults)}parser(e,t){return rH.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},l={...this.defaults,...n},s=this.onError(!!l.silent,!!l.async);if(!0===this.defaults.async&&!1===n.async)return s(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return s(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return s(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=e),l.async)return(async()=>{let r=l.hooks?await l.hooks.preprocess(t):t,n=await (l.hooks?await l.hooks.provideLexer(e):e?rM.lex:rM.lexInline)(r,l),s=l.hooks?await l.hooks.processAllTokens(n):n;l.walkTokens&&await Promise.all(this.walkTokens(s,l.walkTokens));let o=await (l.hooks?await l.hooks.provideParser(e):e?rH.parse:rH.parseInline)(s,l);return l.hooks?await l.hooks.postprocess(o):o})().catch(s);try{l.hooks&&(t=l.hooks.preprocess(t));let r=(l.hooks?l.hooks.provideLexer(e):e?rM.lex:rM.lexInline)(t,l);l.hooks&&(r=l.hooks.processAllTokens(r)),l.walkTokens&&this.walkTokens(r,l.walkTokens);let n=(l.hooks?l.hooks.provideParser(e):e?rH.parse:rH.parseInline)(r,l);return l.hooks&&(n=l.hooks.postprocess(n)),n}catch(e){return s(e)}}}onError(e,t){return r=>{if(r.message+=`
81Please report this to https://github.com/markedjs/marked.`,e){let e="<p>An error occurred:</p><pre>"+rR(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function rq(e,t){return rD.parse(e,t)}rq.options=rq.setOptions=function(e){return rD.setOptions(e),rq.defaults=rD.defaults,t_=rq.defaults,rq},rq.getDefaults=tP,rq.defaults=t_,rq.use=function(...e){return rD.use(...e),rq.defaults=rD.defaults,t_=rq.defaults,rq},rq.walkTokens=function(e,t){return rD.walkTokens(e,t)},rq.parseInline=rD.parseInline,rq.Parser=rH,rq.parser=rH.parse,rq.Re
81nderer=rP,rq.TextRenderer=r_,rq.Lexer=rM,rq.lexer=rM.lex,rq.Tokenizer=rI,rq.Hooks=rO,rq.parse=rq,rq.options,rq.setOptions,rq.use,rq.walkTokens,rq.parseInline,rH.parse,rM.lex;var rV=/\s/,rB=/^\s+$/,rF=new Set(["code","pre","svg","math","annotation"]),rZ=0;function rW(e){var t,r,n,l,s;let o={animation:null!=(t=null==e?void 0:e.animation)?t:"fadeIn",duration:null!=(r=null==e?void 0:e.duration)?r:150,easing:null!=(n=null==e?void 0:e.easing)?n:"ease",sep:null!=(l=null==e?void 0:e.sep)?l:"word",stagger:null!=(s=null==e?void 0:e.stagger)?s:40},i={prevContentLength:0,lastRenderCharCount:0},a=rZ++,c=()=>e=>{let t={count:0,newIndex:0};(0,e$.V)(e,"text",(e,r)=>((e,t,r,n,l)=>{let s=t.at(-1);if(!(s&&"children"in s))return;if(t.some(e=>"object"==typeof e&&null!==e&&"type"in e&&"element"===e.type&&rF.has(e.tagName)))return"skip";let o=s.children.indexOf(e);if(-1===o)return;let i=e.value;if(!i.trim()){l.count+=i.length;return}let a="char"===r.sep?(e=>{let t=[],r="";for(let n of e)rV.test(n)?r+=n:(r&&(t.push(r),r=""),t.push(n));return r&&t.push(r),t})(i):(e=>{let t=[],r="",n=!1;for(let l of e){let e=rV.test(l);e!==n&&r&&(t.push(r),r=""),r+=l,n=e}return r&&t.push(r),t})(i),c=n.prevContentLength,d=a.map(e=>{var t,n,s;let o,i=l.count;if(l.count+=e.length,rB.test(e))return{type:"text",value:e};let a=c>0&&i<c,d=a?0:l.newIndex++*r.stagger;return t=r.animation,n=r.duration,s=r.easing,o=`--sd-animation:sd-${t};--sd-duration:${a?0:n}ms;--sd-easing:${s}`,d&&(o+=`;--sd-delay:${d}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:o},children:[{type:"text",value:e}]}});return s.children.splice(o,1,...d),o+d.length})(e,r,o,i,t)),i.lastRenderCharCount=t.count,i.prevContentLength=0};return Object.defineProperty(c,"name",{value:`rehypeAnimate$${a}`}),{name:"animate",type:"animate",rehypePlugin:c,setPrevContentLength(e){i.prevContentLength=e},getLastRenderCharCount(){let e=i.lastRenderCharCount;return i.lastRenderCharCount=0,e}}}rW();var rG=(0,a.createContext)(!1),rK=(...e)=>tL((0,eL.$)(e)),rU=(e,t,r)=>{let n="string"==typeof t&&r.startsWith("text/csv")?"\uFEFF":"",l="string"==typeof t?new Blob([n+t],{type:r}):t,s=URL.createObjectURL(l),o=document.createElement("a");o.href=s,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(s)},rQ=(0,a.createContext)(rK),rX=()=>(0,a.useContext)(rQ),rY=rK("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),rJ=(0,a.memo)(({children:e,result:t,language:r,className:n,startLine:l,lineNumbers:s=!0,...o})=>{let i=rX(),c=(0,a.useMemo)(()=>i(rY),[i]),d=(0,a.useMemo)(()=>{let e={};return t.bg&&(e["--sdm-bg"]=t.bg),t.fg&&(e["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(e,(e=>{let t={};for(let r of e.split(";")){let e=r.indexOf(":");if(e>0){let n=r.slice(0,e).trim(),l=r.slice(e+1).trim();n&&l&&(t[n]=l)}}return t})(t.rootStyle)),e},[t.bg,t.fg,t.rootStyle]);return(0,tR.jsx)("div",{className:i(n,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":r,"data-streamdown":"code-block-body",...o,children:(0,tR.jsx)("pre",{className:i(n,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:d,children:(0,tR.jsx)("code",{className:s?i("[counter-increment:line_0] [counter-reset:line]"):void 0,style:s&&l&&l>1?{counterReset:`line ${l-1}`}:void 0,children:t.tokens.map((e,t)=>(0,tR.jsx)("span",{className:s?c:void 0,children:0===e.length||1===e.length&&""===e[0].content?`
82`:e.map((e,t)=>{let r={},n=!!e.bgColor;if(e.color&&(r["--sdm-c"]=e.color),e.bgColor&&(r["--sdm-tbg"]=e.bgColor),e.htmlStyle)for(let[t,l]of Object.entries(e.htmlStyle))"color"===t?r["--sdm-c"]=l:"background-color"===t?(r["--sdm-tbg"]=l,n=!0):r[t]=l;return(0,tR.jsx)("span",{className:i("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",n&&"bg-[var(--sdm-tbg)]",n&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:r,...e.htmlAttrs,children:e.content},t)})},t))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),r0=({className:e,language:t,style:r,isIncomplete:n,...l})=>{let s=rX();return(0,tR.jsx)("div",{className:s("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":n||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...r},...l})},r1=(0,a.createContext)({code:""}),r5=()=>(0,a.useContext)(r1),r2=({language:e})=>{let t=rX();return(0,tR.jsx)("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:(0,tR.jsx)("span",{className:t("ml-1 font-mono lowercase"),children:e})})},r3=(0,a.lazy)(()=>r.e(4161).then(r.bind(r,3528)).then(e=>({default:e.HighlightedCodeBlockBody}))),r6=({code:e,language:t,className:r,children:n,isIncomplete:l=!1,startLine:s,lineNumbers:o,...i})=>{let c=rX(),d=(0,a.useMemo)(()=>(e=>{let t=e.length;for(;t>0&&e[t-1]===`
83`;)t--;return e.slice(0,t)})(e),[e]),u=(0,a.useMemo)(()=>({bg:"transparent",fg:"inherit",tokens:d.split(`
84`).map(e=>[{content:e,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[d]);return(0,tR.jsx)(r1.Provider,{value:{code:e},children:(0,tR.jsxs)(r0,{isIncomplete:l,language:t,children:[(0,tR.jsx)(r2,{language:t}),n?(0,tR.jsx)("div",{className:c("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:(0,tR.jsx)("div",{className:c("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:n})}):null,(0,tR.jsx)(a.Suspense,{fallback:(0,tR.jsx)(rJ,{className:r,language:t,lineNumbers:o,result:u,startLine:s,...i}),children:(0,tR.jsx)(r3,{className:r,code:d,language:t,lineNumbers:o,raw:u,startLine:s,...i})})]})})},r9={CheckIcon:e=>(0,tR.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tR.jsx)("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),CopyIcon:e=>(0,tR.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tR.jsx)("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),DownloadIcon:e=>(0,tR.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tR.jsx)("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.
8468342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),ExternalLinkIcon:e=>(0,tR.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tR.jsx)("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),Loader2Icon:e=>(0,tR.jsxs)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[(0,tR.jsx)("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),(0,tR.jsx)("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),(0,tR.jsx)("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),(0,tR.jsx)("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),(0,tR.jsx)("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),(0,tR.jsx)("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),(0,tR.jsx)("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,tR.jsx)("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),(0,tR.jsx)("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),(0,tR.jsx)("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),Maximize2Icon:e=>(0,tR.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tR.jsx)("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),RotateCcwIcon:e=>(0,tR.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tR.jsx)("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),XIcon:e=>(0,tR.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tR.jsx)("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),ZoomInIcon:e=>(0,tR.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tR.jsx)("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),ZoomOutIcon:e=>(0,tR.jsx)("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tR.jsx)("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})})},r4=(0,a.createContext)(r9),r7=({icons:e,children:t})=>{let r=(0,a.useRef)(e),n=(0,a.useRef)(e?{...r9,...e}:r9);((e,t)=>
84{if(e===t)return!0;if(!(e&&t))return e===t;let r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(r=>e[r]===t[r])})(r.current,e)||(r.current=e,n.current=e?{...r9,...e}:r9);let l=n.current;return(0,tR.jsx)(r4.Provider,{value:l,children:t})},r8=()=>(0,a.useContext)(r4),ne={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},nt=(0,a.createContext)(ne),nr=()=>(0,a.useContext)(nt),nn=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:l,code:s,...o})=>{let i=rX(),[c,d]=(0,a.useState)(!1),u=(0,a.useRef)(0),{code:p}=r5(),{isAnimating:h}=(0,a.useContext)(lF),m=nr(),f=null!=s?s:p,g=async()=>{var n;if("u"<typeof window||!(null!=(n=null==navigator?void 0:navigator.clipboard)&&n.writeText)){null==t||t(Error("Clipboard API not available"));return}try{c||(await navigator.clipboard.writeText(f),d(!0),null==e||e(),u.current=window.setTimeout(()=>d(!1),r))}catch(e){null==t||t(e)}};(0,a.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let b=r8(),x=c?b.CheckIcon:b.CopyIcon;return(0,tR.jsx)("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",l),"data-streamdown":"code-block-copy-button",disabled:h,onClick:g,title:m.copyCode,type:"button",...o,children:null!=n?n:(0,tR.jsx)(x,{size:14})})},nl={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},ns=({onDownload:e,onError:t,language:r,children:n,className:l,code:s,...o})=>
84{let i=rX(),{code:c}=r5(),{isAnimating:d}=(0,a.useContext)(lF),u=nr(),p=r8(),h=null!=s?s:c,m=`file.${r&&r in nl?nl[r]:"txt"}`;return(0,tR.jsx)("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",l),"data-streamdown":"code-block-download-button",disabled:d,onClick:()=>{try{rU(m,h,"text/plain"),null==e||e()}catch(e){null==t||t(e)}},title:u.downloadFile,type:"button",...o,children:null!=n?n:(0,tR.jsx)(p.DownloadIcon,{size:14})})},no=()=>{let{Loader2Icon:e}=r8(),t=rX();return(0,tR.jsxs)("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[(0,tR.jsx)("div",{className:t("h-[46px] w-full bg-muted/80")}),(0,tR.jsx)("div",{className:t("flex w-full items-center justify-center p-4"),children:(0,tR.jsx)(e,{className:t("size-4 animate-spin")})})]})},ni=/\.[^/.]+$/,na=0,nc=()=>{1===(na+=1)&&(document.body.style.overflow="hidden")},nd=()=>{0===(na=Math.max(0,na-1))&&(document.body.style.overflow="")},nu=({url:e,isOpen:t,onClose:r,onConfirm:n})=>{let{CheckIcon:l,CopyIcon:s,ExternalLinkIcon:o,XIcon:i}=r8(),c=rX(),[d,u]=(0,a.useState)(!1),p=nr(),h=(0,a.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)}catch(e){}},[e]),m=(0,a.useCallback)(()=>{n(),r()},[n,r]);return(0,a.useEffect)(()=>{if(t){nc();let e=e=>{"Escape"===e.key&&r()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e),nd()}}},[t,r]),t?(0,tR.jsx)("div",{className:c("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:r,onKeyDown:e=>{"Escape"===e.key&&r()},role:"button",tabIndex:0,children:(0,tR.jsxs)("div",{className:c("relative mx-4 flex w-full max-w-md flex-col gap-4 roun
84ded-xl border bg-background p-6 shadow-lg"),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:"presentation",children:[(0,tR.jsx)("button",{className:c("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:r,title:p.close,type:"button",children:(0,tR.jsx)(i,{size:16})}),(0,tR.jsxs)("div",{className:c("flex flex-col gap-2"),children:[(0,tR.jsxs)("div",{className:c("flex items-center gap-2 font-semibold text-lg"),children:[(0,tR.jsx)(o,{size:20}),(0,tR.jsx)("span",{children:p.openExternalLink})]}),(0,tR.jsx)("p",{className:c("text-muted-foreground text-sm"),children:p.externalLinkWarning})]}),(0,tR.jsx)("div",{className:c("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),(0,tR.jsxs)("div",{className:c("flex gap-2"),children:[(0,tR.jsx)("button",{className:c("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:h,type:"button",children:d?(0,tR.jsxs)(tR.Fragment,{children:[(0,tR.jsx)(l,{size:14}),(0,tR.jsx)("span",{children:p.copied})]}):(0,tR.jsxs)(tR.Fragment,{children:[(0,tR.jsx)(s,{size:14}),(0,tR.jsx)("span",{children:p.copyLink})]})}),(0,tR.jsxs)("button",{className:c("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:m,type:"button",children:[(0,tR.jsx)(o,{size:14}),(0,tR.jsx)("span",{children:p.openLink})]})]})]})}):null},np=(0,a.createContext)(null),nh=()=>(0,a.useContext)(np),nm=()=>{var e;let t=nh();return null!=(e=null==t?void 0:t.code)?e:null},nf=()=>{var e;let t=nh();return null!=(e=null==t?void 0:t.mermaid)?e:null},ng=({chart:e,children:t,className:r,onDownload:n,config:l,onError:s})=>{let o=rX(),[i,c]=(0,a.useState)(!1),d=(0,a.useRef)(null),{isAnimating:u}=(0,a.useContext)(lF),p=r8(),h=nf(),m=nr(),f=async t=>{try{if("mmd"===t){rU("diagram.mmd",e,"text/plain"),c(!1),null==n||n(t);return}if(!h){null==s||s(Error("Mermaid plugin not available"));return}let o=h.getMermaid(l),i=e.split("").reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),a=`mermaid-${Math.abs(i)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:d}=await o.render(a,e);if(!d){null==s||s(Error("SVG not found. Please wait for the diagram to render."));return}if("svg"===t){rU("diagram.svg",d,"image/svg+xml"),c(!1),null==n||n(t);return}if("png"===t){var r;let e=await (r=d,new Promise((e,t)=>{let n="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(r))),l=new Image;l.crossOrigin="anonymous",l.onload=()=>{let r=document.createElement("canvas"),n=5*l.width,s=5*l.height;r.width=n,r.height=s;let o=r.getContext("2d");o?(o.drawImage(l,0,0,n,s),r.toBlob(r=>{r?e(r):t(Error("Failed to create PNG blob"))},"image/png")):t(Error("Failed to create 2D canvas context for PNG export"))},l.onerror=()=>t(Error("Failed to load SVG image")),l.src=n}));rU("diagram.png",e,"image/png"),null==n||n(t),c(!1);return}}catch(e){null==s||s(e)}};return(0,a.useEffect)(()=>{let e=e=>{let t=e.composedPath();d.current&&!t.includes(d.current)&&c(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,tR.jsxs)("div",{className:o("relative"),ref:d,children:[(0,tR.jsx)("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:u,onClick:()=>c(!i),title:m.downloadDiagram,type:"button",children:null!=t?t:(0,tR.jsx)(p.DownloadIcon,{size:14})}),i?(0,tR.jsxs)("div",{className:o("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[(0,tR.jsx)("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("svg"),title:m.downloadDiagramAsSvg,type:"button",children:m.mermaidFormatSvg}),(0,tR.jsx)("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("png"),title:m.downloadDiagramAsPng,type:"button",children:m.mermaidFormatPng}),(0,tR.jsx)("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("mmd"),title:m.downloadDiagramAsMmd,type:"button",children:m.mermaidFormatMmd})]}):null]})},nb=({chart:e,config:t,onFullscreen:r,onExit:n,className:l,...s})=>{let{Maximize2Icon:o,XIcon:i}=r8(),c=rX(),[d,u]=(0,a.useState)(!1),{isAnimating:p,controls:h}=(0,a.useContext)(lF),m=nr(),f=(()=>
84{if("boolean"==typeof h)return h;let e=h.mermaid;return!1!==e&&(!0===e||void 0===e||!1!==e.panZoom)})(),g=()=>{u(!d)};return(0,a.useEffect)(()=>{if(d){nc();let e=e=>{"Escape"===e.key&&u(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e),nd()}}},[d]),(0,a.useEffect)(()=>{d?null==r||r():n&&n()},[d,r,n]),(0,tR.jsxs)(tR.Fragment,{children:[(0,tR.jsx)("button",{className:c("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",l),disabled:p,onClick:g,title:m.viewFullscreen,type:"button",...s,children:(0,tR.jsx)(o,{size:14})}),d?(0,tT.createPortal)((0,tR.jsxs)("div",{className:c("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:g,onKeyDown:e=>{"Escape"===e.key&&g()},role:"button",tabIndex:0,children:[(0,tR.jsx)("button",{className:c("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:g,title:m.exitFullscreen,type:"button",children:(0,tR.jsx)(i,{size:20})}),(0,tR.jsx)("div",{className:c("flex size-full items-center justify-center p-4"),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:"presentation",children:(0,tR.jsx)(lK,{chart:e,className:c("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:f})})]}),document.body):null]})},nx=e=>{var t,r;let n=[],l=[];for(let r of e.querySelectorAll("thead th"))n.push((null==(t=r.textContent)?void 0:t.trim())||"");for(let t of e.querySelectorAll("tbody tr")){let e=[];
84for(let n of t.querySelectorAll("td"))e.push((null==(r=n.textContent)?void 0:r.trim())||"");l.push(e)}return{headers:n,rows:l}},nk=e=>{let{headers:t,rows:r}=e,n=e=>{let t=!1,r=!1;for(let n of e){if('"'===n){t=!0,r=!0;break}(","===n||n===`
85`)&&(t=!0)}return t?r?`"${e.replace(/"/g,'""')}"`:`"${e}"`:e},l=Array(t.length>0?r.length+1:r.length),s=0;for(let e of(t.length>0&&(l[s]=t.map(n).join(","),s+=1),r))l[s]=e.map(n).join(","),s+=1;return l.join(`
86`)},ny=e=>{let{headers:t,rows:r}=e,n=e=>{let t=!1;for(let r of e)if("	"===r||r===`
87`||"\r"===r){t=!0;break}if(!t)return e;let r=[];for(let t of e)"	"===t?r.push("\\t"):t===`
88`?r.push("\\n"):"\r"===t?r.push("\\r"):r.push(t);return r.join("")},l=Array(t.length>0?r.length+1:r.length),s=0;for(let e of(t.length>0&&(l[s]=t.map(n).join("	"),s+=1),r))l[s]=e.map(n).join("	"),s+=1;return l.join(`
89`)},nw=e=>{let t=!1;for(let r of e)if("\\"===r||"|"===r){t=!0;break}if(!t)return e;let r=[];for(let t of e)"\\"===t?r.push("\\\\"):"|"===t?r.push("\\|"):r.push(t);return r.join("")},nv=e=>{let{headers:t,rows:r}=e;if(0===t.length)return"";let n=Array(r.length+2),l=0,s=t.map(e=>nw(e));n[l]=`| ${s.join(" | ")} |`,l+=1;let o=Array(t.length);for(let e=0;e<t.length;e+=1)o[e]="---";for(let e of(n[l]=`| ${o.join(" | ")} |`,l+=1,r))if(e.length<t.length){let r=Array(t.length);for(let n=0;n<t.length;n+=1)r[n]=n<e.length?nw(e[n]):"";n[l]=`| ${r.join(" | ")} |`,l+=1}else{let t=e.map(e=>nw(e));n[l]=`| ${t.join(" | ")} |`,l+=1}return n.join(`
90`)},nj=({children:e,className:t,onCopy:r,onError:n,timeout:l=2e3})=>{let s=rX(),[o,i]=(0,a.useState)(!1),[c,d]=(0,a.useState)(!1),u=(0,a.useRef)(null),p=(0,a.useRef)(0),{isAnimating:h}=(0,a.useContext)(lF),m=nr(),f=async e=>{var t,s;if("u"<typeof window||!(null!=(t=null==navigator?void 0:navigator.clipboard)&&t.write)){null==n||n(Error("Clipboard API not available"));return}try{let t=null==(s=u.current)?void 0:s.closest('[data-streamdown="table-wrapper"]'),o=null==t?void 0:t.querySelector("table");if(!o){null==n||n(Error("Table not found"));return}let a=nx(o),c=(({csv:nk,tsv:ny,md:nv})[e]||nv)(a),h=new ClipboardItem({"text/plain":new Blob([c],{type:"text/plain"}),"text/html":new Blob([o.outerHTML],{type:"text/html"})});await navigator.clipboard.write([h]),d(!0),i(!1),null==r||r(e),p.current=window.setTimeout(()=>d(!1),l)}catch(e){null==n||n(e)}};(0,a.useEffect)(()=>{let e=e=>{let t=e.composedPath();u.current&&!t.includes(u.current)&&i(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e),window.clearTimeout(p.current)}},[]);let g=r8(),b=c?g.CheckIcon:g.CopyIcon;return(0,tR.jsxs)("div",{className:s("relative"),ref:u,children:[(0,tR.jsx)("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:h,onClick:()=>i(!o),title:m.copyTable,type:"button",children:null!=e?e:(0,tR.jsx)(b,{height:14,width:14})}),o?(0,tR.jsxs)("div",{className:s("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[(0,tR.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("md"),title:m.copyTableAsMarkdown,type:"button",children:m.tableFormatMarkdown}),(0,tR.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("csv"),title:m.copyTableAsCsv,type:"button",children:m.tableFormatCsv}),(0,tR.jsx)("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("tsv"),title:m.copyTableAsTsv,type:"button",children:m.tableFormatTsv})]}):null]})},nC=({children:e,className:t,onDownload:r,onError:n})=>{let l=rX(),[s,o]=(0,a.useState)(!1),i=(0,a.useRef)(null),{isAnimating:c}=(0,a.useContext)(lF),d=nr(),u=r8(),p=e=>{var t;try{let l=null==(t=i.current)?void 0:t.closest('[data-streamdown="table-wrapper"]'),s=null==l?void 0:l.querySelector("table");if(!s){null==n||n(Error("Table not found"));return}let a=nx(s),c="csv"===e?nk(a):nv(a);rU(`table.${"csv"===e?"csv":"md"}`,c,"csv"===e?"text/csv":"text/markdown"),o(!1),null==r||r(e)}catch(e){null==n||n(e)}};return(0,a.useEffect)(()=>{let e=e=>{let t=e.composedPath();i.current&&!t.includes(i.current)&&o(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,tR.jsxs)("div",{className:l("relative"),ref:i,children:[(0,tR.jsx)("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:()=>o(!s),title:d.downloadTable,type:"button",children:null!=e?e:(0,tR.jsx)(u.DownloadIcon,{size:14})}),s?(0,tR.jsxs)("div",{className:l("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[(0,tR.jsx)("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("csv"),title:d.downloadTableAsCsv,type:"button",children:d.tableFormatCsv}),(0,tR.jsx)("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>
90p("markdown"),title:d.downloadTableAsMarkdown,type:"button",children:d.tableFormatMarkdown})]}):null]})},nN=({children:e,className:t,showCopy:r=!0,showDownload:n=!0})=>{let{Maximize2Icon:l,XIcon:s}=r8(),o=rX(),[i,c]=(0,a.useState)(!1),{isAnimating:d}=(0,a.useContext)(lF),u=nr(),p=()=>{c(!1)};return(0,a.useEffect)(()=>{if(i){nc();let e=e=>{"Escape"===e.key&&c(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e),nd()}}},[i]),(0,tR.jsxs)(tR.Fragment,{children:[(0,tR.jsx)("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>{c(!0)},title:u.viewFullscreen,type:"button",children:(0,tR.jsx)(l,{size:14})}),i?(0,tT.createPortal)((0,tR.jsx)("div",{"aria-label":u.viewFullscreen,"aria-modal":"true",className:o("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:p,onKeyDown:e=>{"Escape"===e.key&&p()},role:"dialog",children:(0,tR.jsxs)("div",{className:o("flex h-full flex-col"),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:"presentation",children:[(0,tR.jsxs)("div",{className:o("flex items-center justify-end gap-1 p-4"),children:[r?(0,tR.jsx)(nj,{}):null,n?(0,tR.jsx)(nC,{}):null,(0,tR.jsx)("button",{className:o("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:p,title:u.exitFullscreen,type:"button",children:(0,tR.jsx)(s,{size:20})})]}),(0,tR.jsx)("div",{className:o("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:(0,tR.jsx)("table",{className:o("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},nS=({children:e,className:t,showControls:r,showCopy:n=!0,showDownload:l=!0,showFullscreen:s=!0,...o})=>{let i=rX(),a=r&&n,c=r&&l,d=r&&s,u=a||c||d;return(0,tR.jsxs)("div",{className:i("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[u?(0,tR.jsxs)("div",{className:i("flex items-center justify-end gap-1"),children:[a?(0,tR.jsx)(nj,{}):null,c?(0,tR.jsx)(nC,{}):null,d?(0,tR.jsx)(nN,{showCopy:a,showDownload:c,children:e}):null]}):null,(0,tR.jsx)("div",{className:i("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:(0,tR.jsx)("table",{className:i("w-full divide-y divide-border",t),"data-streamdown":"table",...o,children:e})})]})},n$=/startLine=(\d+)/,nL=/\bnoLineNumbers\b/,nR=(0,a.lazy)(()=>r.e(124).then(r.bind(r,84071)).then(e=>({default:e.Mermaid}))),nT=/language-([^\s]+)/;function nz(e,t){if(!(null!=e&&e.position||null!=t&&t.position))return!0;if(!(null!=e&&e.position&&null!=t&&t.position))return!1;let r=e.position.start,n=t.position.start,l=e.position.end,s=t.position.end;return(null==r?void 0:r.line)===(null==n?void 0:n.line)&&(null==r?void 0:r.column)===(null==n?void 0:n.column)&&(null==l?void 0:l.line)===(null==s?void 0:s.line)&&(null==l?void 0:l.column)===(null==s?void 0:s.column)}function nE(e,t){return e.className===t.className&&nz(e.node,t.node)}var nA=(e,t)=>"boolean"==typeof e?e:!1!==e[t],nI=(e,t)=>{if("boolean"==typeof e)return e;let r=e.table;return!1!==r&&(!0===r||void 0===r||!1!==r[t])},nM=(e,t)=>{if("boolean"==typeof e)return e;let r=e.code;return!1!==r&&(!0===r||void 0===r||!1!==r[t])},nP=(e,t)=>{if("boolean"==typeof e)return e;let r=e.mermaid;return!1!==r&&(!0===r||void 0===r||!1!==r[t])},n_=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("ol",{className:l("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e})},(e,t)=>nE(e,t));n_.displayName="MarkdownOl";var nH=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("li",{className:l("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:e})},(e,t)=>e.className===t.className&&nz(e.node,t.node));nH.displayName="MarkdownLi";var nO=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("ul",{className:l("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e})},(e,t)=>nE(e,t));nO.displayName="MarkdownUl";var nD=(0,a.memo)(({className:e,node:t,...r})=>{let n=rX();return(0,tR.jsx)("hr",{className:n("my-6 border-border",e),"data-streamdown":"horizontal-rule",...r})},(e,t)=>nE(e,t));nD.displayName="MarkdownHr";var nq=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("span",{className:l("font-semibold",t),"data-streamdown":"strong",...n,children:e})},(e,t)=>nE(e,t));nq.displayName="MarkdownStrong";var nV=(0,a.memo)(({children:e,className:t,href:r,node:n,...l})=>{let s=rX(),{linkSafety:o}=(0,a.useContext)(lF),[i,c]=(0,a.useState)(!1),d="streamdown:incomplete-link"===r,u=(0,a.useCallback)(async e=>
90{if(!(!(null!=o&&o.enabled&&r)||d)){if(e.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(r))return void window.open(r,"_blank","noreferrer");c(!0)}},[o,r,d]),p=(0,a.useCallback)(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),h={url:null!=r?r:"",isOpen:i,onClose:(0,a.useCallback)(()=>{c(!1)},[]),onConfirm:p};return null!=o&&o.enabled&&r?(0,tR.jsxs)(tR.Fragment,{children:[(0,tR.jsx)("button",{className:s("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":d,"data-streamdown":"link",onClick:u,type:"button",children:e}),o.renderModal?o.renderModal(h):(0,tR.jsx)(nu,{...h})]}):(0,tR.jsx)("a",{className:s("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":d,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...l,children:e})},(e,t)=>nE(e,t)&&e.href===t.href);nV.displayName="MarkdownA";var nB=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("h1",{className:l("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e})},(e,t)=>nE(e,t));nB.displayName="MarkdownH1";var nF=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("h2",{className:l("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e})},(e,t)=>nE(e,t));nF.displayName="MarkdownH2";var nZ=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("h3",{className:l("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e})},(e,t)=>nE(e,t));nZ.displayName="MarkdownH3";var nW=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("h4",{className:l("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e})},(e,t)=>nE(e,t));nW.displayName="MarkdownH4";var nG=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("h5",{className:l("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e})},(e,t)=>nE(e,t));nG.displayName="MarkdownH5";var nK=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("h6",{className:l("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e})},(e,t)=>nE(e,t));nK.displayName="MarkdownH6";var nU=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let{controls:l}=(0,a.useContext)(lF),s=nA(l,"table"),o=nI(l,"copy"),i=nI(l,"download"),c=nI(l,"fullscreen");return(0,tR.jsx)(nS,{className:t,showControls:s,showCopy:o,showDownload:i,showFullscreen:c,...n,children:e})},(e,t)=>nE(e,t));nU.displayName="MarkdownTable";var nQ=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("thead",{className:l("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e})},(e,t)=>nE(e,t));nQ.displayName="MarkdownThead";var nX=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("tbody",{className:l("divide-y divide-border",t),"data-streamdown":"table-body",...n,children:e})},(e,t)=>nE(e,t));nX.displayName="MarkdownTbody";var nY=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("tr",{className:l("border-border",t),"data-streamdown":"table-row",...n,children:e})},(e,t)=>nE(e,t));nY.displayName="MarkdownTr";var nJ=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("th",{className:l("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...n,children:e})},(e,t)=>nE(e,t));nJ.displayName="MarkdownTh";var n0=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("td",{className:l("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e})},(e,t)=>nE(e,t));n0.displayName="MarkdownTd";var n1=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("blockquote",{className:l("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...n,children:e})},(e,t)=>nE(e,t));n1.displayName="MarkdownBlockquote";var n5=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("sup",{className:l("text-sm",t),"data-streamdown":"superscript",...n,children:e})},(e,t)=>nE(e,t));n5.displayName="MarkdownSup";var n2=(0,a.memo)(({children:e,className:t,node:r,...n})=>{let l=rX();return(0,tR.jsx)("sub",{className:l("text-sm",t),"data-streamdown":"subscript",...n,children:e})},(e,t)=>nE(e,t));n2.displayName="MarkdownSub";var n3=(0,a.memo)(({children:e,className:t,node:r,...n})=>{if("data-footnotes"in n){let r=Array.isArray(e)?e.map(e=>{if(!(0,a.isValidElement)(e))return e;if(e.type===n_){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!(e=>{var t,r;if(!(0,a.isValidElement)(e))return!1;let n=Array.isArray(e.props.children)?e.props.children:[e.props.children],l=!1,s=!1;for(let e of n)if(e){if("string"==typeof e)""!==e.trim()&&(l=!0);else if((0,a.isValidElement)(e)){if((null==(t=e.props)?void 0:t["data-footnote-backref"])!==void 0)s=!0;else for(let t of Array.isArray(e.props.children)?e.props.children:[e.props.children])if("string"==typeof t&&""!==t.trim()||(0,a.isValidElement)(t)&&(null==(r=t.props)?void 0:r["data-footnote-backref"])===void 0){l=!0;break}}}return s&&!l})(e));return 0===t.length?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(r)?r.some(e=>null!==e):null!==r)?(0,tR.jsx)("section",{className:t,...n,children:r}):null}return(0,tR.jsx)("section",{className:t,...n,children:e})},(e,t)=>nE(e,t));
90n3.displayName="MarkdownSection";var n6=(0,a.memo)(({node:e,className:t,children:r,...n})=>{var l,s,o;let i,c=rX(),d=!("data-block"in n),{mermaid:u,controls:p,lineNumbers:h}=(0,a.useContext)(lF),m=nf(),f=(0,a.useContext)(rG),g=null==t?void 0:t.match(nT),b=null!=(l=null==g?void 0:g.at(1))?l:"",x=null!=(i=nh())&&i.renderers&&b&&null!=(o=i.renderers.find(e=>Array.isArray(e.language)?e.language.includes(b):e.language===b))?o:null;if(d)return(0,tR.jsx)("code",{className:c("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...n,children:r});let k=null==(s=null==e?void 0:e.properties)?void 0:s.metastring,y=null==k?void 0:k.match(n$),w=y?Number.parseInt(y[1],10):void 0,v=!(k&&nL.test(k))&&!1!==h,j="";if((0,a.isValidElement)(r)&&r.props&&"object"==typeof r.props&&"children"in r.props&&"string"==typeof r.props.children?j=r.props.children:"string"==typeof r&&(j=r),x){let e=x.component;return(0,tR.jsx)(a.Suspense,{fallback:(0,tR.jsx)(no,{}),children:(0,tR.jsx)(e,{code:j,isIncomplete:f,language:b,meta:k})})}if("mermaid"===b&&m){let e=nA(p,"mermaid"),r=nP(p,"download"),n=nP(p,"copy"),l=nP(p,"fullscreen"),s=nP(p,"panZoom");return(0,tR.jsx)(a.Suspense,{fallback:(0,tR.jsx)(no,{}),children:(0,tR.jsxs)("div",{className:c("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[(0,tR.jsx)("div",{className:c("flex h-8 items-center text-muted-foreground text-xs"),children:(0,tR.jsx)("span",{className:c("ml-1 font-mono lowercase"),children:"mermaid"})}),e&&(r||n||l)?(0,tR.jsx)("div",{className:c("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:(0,tR.jsxs)("div",{className:c("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[r?(0,tR.jsx)(ng,{chart:j,config:null==u?void 0:u.config}):null,n?(0,tR.jsx)(nn,{code:j}):null,l?(0,tR.jsx)(nb,{chart:j,config:null==u?void 0:u.config}):null]})}):null,(0,tR.jsx)("div",{className:c("rounded-md border border-border bg-background"),children:(0,tR.jsx)(nR,{chart:j,config:null==u?void 0:u.config,showControls:s})})]})})}let C=nA(p,"code"),N=nM(p,"download"),S=nM(p,"copy");return(0,tR.jsx)(r6,{className:t,code:j,isIncomplete:f,language:b,lineNumbers:v,startLine:void 0!==w&&w>=1?w:void 0,children:C?(0,tR.jsxs)(tR.Fragment,{children:[N?(0,tR.jsx)(ns,{code:j,language:b}):null,S?(0,tR.jsx)(nn,{}):null]}):null})},(e,t)=>e.className===t.className&&nz(e.node,t.node));n6.displayName="MarkdownCode";var n9=(0,a.memo)(({node:e,className:t,src:r,alt:n,onLoad:l,onError:s,...o})=>{let{DownloadIcon:i}=r8(),c=rX(),d=(0,a.useRef)(null),[u,p]=(0,a.useState)(!1),[h,m]=(0,a.useState)(!1),f=nr(),g=null!=o.width||null!=o.height,b=(u||g)&&!h,x=h&&!g;(0,a.useEffect)(()=>{let e=d.current;if(null!=e&&e.complete){let t=e.naturalWidth>0;p(t),m(!t)}},[]);let k=(0,a.useCallback)(e=>{p(!0),m(!1),null==l||l(e)},[l]),y=(0,a.useCallback)(e=>{p(!1),m(!0),null==s||s(e)},[s]),w=async()=>{if(r)try{let e=await (await fetch(r)).blob(),t=new URL(r,window.location.origin).pathname.split("/").pop()||"",l=t.split(".").pop(),s=t.includes(".")&&void 0!==l&&l.length<=4,o="";if(s)o=t;else{let r=e.type,l="png";r.includes("jpeg")||r.includes("jpg")?l="jpg":r.includes("png")?l="png":r.includes("svg")?l="svg":r.includes("gif")?l="gif":r.includes("webp")&&(l="webp"),o=`${(n||t||"image").replace(ni,"")}.${l}`}rU(o,e,e.type)}catch(e){window.open(r,"_blank")}};return r?(0,tR.jsxs)("div",{className:c("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[(0,tR.jsx)("img",{alt:n,className:c("max-w-full rounded-lg",x&&"hidden",t),"data-streamdown":"image",onError:y,onLoad:k,ref:d,src:r,...o}),x&&(0,tR.jsx)("span",{className:c("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:f.imageNotAvailable}),(0,tR.jsx)("div",{className:c("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),b&&(0,tR.jsx)("button",{className:c("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:w,title:f.downloadImage,type:"button",children:(0,tR.jsx)(i,{size:14})})]}):null},(e,t)=>e.className===t.className&&nz(e.node,t.node));n9.displayName="MarkdownImg";var n4=(0,a.memo)(({children:e,node:t,...r})=>{let n=(Array.isArray(e)?e:[e]).filter(e=>null!=e&&""!==e);if(1===n.length&&(0,a.isValidElement)(n[0])){let t=n[0].props.node,r=null==t?void 0:t.tagName;if("img"===r||"code"===r&&"data-block"in n[0].props)return(0,tR.jsx)(tR.Fragment,{children:e})}return(0,tR.jsx)("p",{...r,children:e})},(e,t)=>nE(e,t));n4.displayName="MarkdownParagraph";var n7={ol:n_,li:nH,ul:nO,hr:nD,strong:nq,a:nV,h1:nB,h2:nF,h3:nZ,h4:nW,h5:nG,h6:nK,table:nU,thead:nQ,tbody:nX,tr:nY,th:nJ,td:n0,blockquote:n1,code:n6,img:n9,pre:({children:e})=>(0,a.isValidElement)(e)?(0,a.cloneElement)(e,{"data-block":"true"}):e,sup:n5,sub:n2,p:n4,section:n3},n8=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,le=/\p{L}/u;function lt(e){for(let t of e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"")){if(n8.test(t))return"rtl";if(le.test(t))break}return"ltr"}var lr,ln,ll,ls,lo,li=/^[ \t]{0,3}(`{3,}|~{3,})/,la=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,lc=e=>{let t=e.split(`
91`),r=null,n=0;for(let e of t){let t=li.exec(e);if(null===r){if(t){let e=t[1];r=e[0],n=e.length}}else if(t){let e=t[1],l=e[0],s=e.length;l===r&&s>=n&&(r=null,n=0)}}return null!==r},ld=()=>e=>{(0,c.YR)(e,"html",(e,t,r)=>{r&&"number"==typeof t&&(r.children[t]={type:"text",value:e.value})})},lu=[],lp={allowDangerousHtml:!0},lh=new WeakMap,lm=new class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let r=e.rehypePlugins,n=e.remarkPlugins,l=e.remarkRehypeOptions;if(!(r||n||l)){let t="default";return this.keyCache.set(e,t),t}let s=e=>{if(!e||0===e.length)return"";let t="";for(let r=0;r<e.length;r+=1){let n=e[r];if(r>0&&(t+=","),Array.isArray(n)){let[e,r]=n;if("function"==typeof e){let r=lh.get(e);r||(r=e.name,lh.set(e,r)),t+=r}else t+=String(e);t+=":",t+=JSON.stringify(r)}else if("function"==typeof n){let e=lh.get(n);e||(e=n.name,lh.set(n,e)),t+=e}else t+=String(n)}return t},o=s(r),i=s(n),a=l?JSON.stringify(l):"",c=`${i}::${o}::${a}`;return this.keyCache.set(e,c),c}get(e){let t=this.generateCacheKey(e),r=this.cache.get(t);return r&&(this.cache.delete(t),this.cache.set(t,r)),r}set(e,t){let r=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(r,t)}clear(){this.cache.clear()}},lf=e=>{let t=lg(e),r=e.children||"";return lk(t.runSync(t.parse(r),r),e)},lg=e=>{let t=lm.get(e);if(t)return t;let r=lb(e);return lm.set(e,r),r},lb=e=>{let t=e.rehypePlugins||lu,r=e.remarkPlugins||lu,n=t.some(e=>Array.isArray(e)?e[0]===x.A:e===x.A)?r:[...r,ld],l=e.remarkRehypeOptions?{...lp,...e.remarkRehypeOptions}:lp;return(0,tM.l)().use(tA.A).use(n).use(tI.A,l).use(t)},lx=e=>e,lk=(e,t)=>{let{allowElement:r,allowedElements:n,disallowedElements:l,skipHtml:s,unwrapDisallowed:o,urlTransform:i}=t;if(r||n||l||s||i){let t=i||lx;(0,c.YR)(e,(e,i,a)=>{var c;let d;return"raw"===e.type&&a&&"number"==typeof i?(c=e.value,s?a.children.splice(i,1):a.children[i]={type:"text",value:c},i):"element"===e.type&&(((e,t)=>{var r;for(let n in tE.$)if(Object.hasOwn(tE.$,n)&&Object.hasOwn(e.properties,n)){let l=e.properties[n],s=tE.$[n];(null===s||s.includes(e.tagName))&&(e.properties[n]=null!=(r=t(String(l||""),n,e))?r:void 0)}})(e,t),d=!1,n?d=!n.includes(e.tagName):l&&(d=l.includes(e.tagName)),!d&&r&&"number"==typeof i&&(d=!r(e,i,a)),d&&a&&"number"==typeof i)?(o&&e.children?a.children.splice(i,1,...e.children):a.children.splice(i,1),i):void 0})}return(0,tz.H)(e,{Fragment:tR.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:tR.jsx,jsxs:tR.jsxs,passKeys:!0,passNode:!0})},ly=/\[\^[\w-]{1,200}\](?!:)/,lw=/\[\^[\w-]{1,200}\]:/,lv=/<(\w+)[\s>]/,lj=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),lC=new Map,lN=new Map,lS=(e,t)=>{if(lj.has(t.toLowerCase()))return 0;let r=e.match((e=>{let t=e.toLowerCase(),r=lC.get(t);if(r)return r;let n=RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return lC.set(t,n),n})(t));if(!r)return 0;let n=0;for(let e of r)e.trimEnd().endsWith("/>")||(n+=1);return n},l$=(e,t)=>{let r=e.match((e=>{let t=e.toLowerCase(),r=lN.get(t);if(r)return r;let n=RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return lN.set(t,n),n})(t));return r?r.length:0},lL=e=>{let t=0;for(let r=0;r<e.length-1;r+=1)"$"===e[r]&&"$"===e[r+1]&&(t+=1,r+=1);return t},lR=e=>{let t=ly.test(e),r=lw.test(e);
91if(t||r)return[e];let n=rM.lex(e,{gfm:!0}),l=[],s=[],o=!1;for(let e of n){let t=e.raw,r=l.length;if(s.length>0){l[r-1]+=t;let e=s.at(-1),n=lS(t,e),o=l$(t,e);for(let t=0;t<n;t+=1)s.push(e);for(let t=0;t<o;t+=1)s.length>0&&s.at(-1)===e&&s.pop();continue}if("html"===e.type&&e.block){let e=t.match(lv);if(e){let r=e[1];lS(t,r)>l$(t,r)&&s.push(r)}}if(r>0&&!o){let e=l[r-1];if(lL(e)%2==1){l[r-1]=e+t;continue}}l.push(t),"space"!==e.type&&(o="code"===e.type)}return l},lT=/([\\`*_~[\]|])/g,lz=e=>e.replace(lT,"\\$1"),lE=e=>"text"===e.type?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(lE).join(""):"",lA=e=>t=>{if(!e||0===e.length)return;let r=new Set(e.map(e=>e.toLowerCase()));(0,c.YR)(t,"element",e=>{if(r.has(e.tagName.toLowerCase())){let t=lE(e);e.children=t?[{type:"text",value:t}]:[]}})},lI=/^[ \t]*<[\w!/?-]/,lM=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,lP={...y,protocols:{...y.protocols,href:[...null!=(ll=null==(ln=y.protocols)?void 0:ln.href)?ll:[],"tel"]},attributes:{...y.attributes,code:[...null!=(lo=null==(ls=y.attributes)?void 0:ls.code)?lo:[],"metastring"]}},l_={raw:x.A,sanitize:[T,lP],harden:[function({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:r=[],allowDataImages:n=!1,allowedProtocols:l=[],blockedImageClass:s="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:o="text-gray-500",linkBlockPolicy:i=d,imageBlockPolicy:a=d}){let h=t.length&&!t.every(e=>"*"===e),m=r.length&&!r.every(e=>"*"===e);if(!e&&(h||m))throw Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{var h,m,f,x,k,y,w,v,j;let C,N=(h=e,m=t,f=r,x=n,k=l,y=s,w=o,v=i,j=a,C=(e,t,r)=>{if("element"!==e.type||e[b])return!0;if("a"===e.tagName){let n=g(e.properties.href,m,h,!1,!1,k);if(null!==n)return e.properties.href=n,e.properties.target="_blank",e.properties.rel="noopener noreferrer",!0;if(e[b]=!0,(0,c.YR)(e,C),r&&"number"==typeof t){let n=v===p?{type:"remove"}:v===u?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:w},children:[...e.children,{type:"text",value:" [blocked]"}]}};if("remove"===n.type)return r.children.splice(t,1),["skip",t];r.children[t]=n.element}return"skip"}if("img"===e.tagName){let n=g(e.properties.src,f,h,x,!0,k);if(null===n){if(e[b]=!0,(0,c.YR)(e,C),r&&"number"==typeof t){let n=function(e,t,r){if(t===p)return{type:"remove"};if(t===u){let t=String(e.properties.alt||"");return t?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:t}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:r},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}(e,j,y);if("remove"===n.type)return r.children.splice(t,1),["skip",t];r.children[t]=n.element}return"skip"}e.properties.src=n}return!0});(function e(t){if("children"in t&&Array.isArray(t.children))for(let r of(t.children=t.children.filter(e=>null!=e),t.children))e(r)})(d),(0,c.YR)(d,N)}},{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},lH={gfm:[z.A,{}],codeMeta:()=>e=>{(0,c.YR)(e,"code",e=>{var t,r;e.meta&&(e.data=null!=(t=e.data)?t:{},e.data.hProperties={...null!=(r=e.data.hProperties)?r:{},metastring:e.meta})})}},lO=Object.values(l_),lD=Object.values(lH),lq={block:" ▋",circle:" ●"},lV=["github-light","github-dark"],lB={enabled:!0},lF=(0,a.createContext)({shikiTheme:lV,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:lB}),lZ=(0,a.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:r,index:n,isIncomplete:l,dir:s,animatePlugin:o,...i})=>{if(o){let e=o.getLastRenderCharCount();o.setPrevContentLength(e)}let a="string"==typeof e&&r&&"string"==typeof e&&0!==e.length&&lI.test(e)?e.replace(lM,"$1"):e,c=(0,tR.jsx)(lf,{...i,children:a});return(0,tR.jsx)(rG.Provider,{value:l,children:s?(0,tR.jsx)("div",{dir:s,style:{display:"contents"},children:c}):c})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let r=Object.keys(e.components||{}),n=Object.keys(t.components||{});if(r.length!==n.length||r.some(r=>{var n,l;return(null==(n=e.components)?void 0:n[r])!==(null==(l=t.components)?void 0:l[r])}))return!1}return e.rehypePlugins===t.rehypePlugins&&e.remarkPlugins===t.remarkPlugins});lZ.displayName="Block";var lW=(0,a.memo)(({children:e,mode:t="streaming",dir:r,parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:l=!1,components:s,rehypePlugins:o=lO,remarkPlugins:i=lD,className:c,shikiTheme:d=lV,mermaid:u,controls:p=!0,isAnimating:h=!1,animated:m,BlockComponent:f=lZ,parseMarkdownIntoBlocksFn:g=lR,caret:b,plugins:x,remend:k,linkSafety:y=lB,lineNumbers:w=!0,allowedTags:v,literalTagContent:j,translations:C,icons:N,prefix:S,onAnimationStart:$,onAnimationEnd:L,...R})=>{let z=(0,a.useId)(),[E,M]=(0,a.useTransition)(),P=(0,a.useMemo)(()=>S?(...e)=>((e,t)=>{if(!e||!t)return t;let r=`${e}:`;
91return t.split(/\s+/).filter(Boolean).map(t=>t.startsWith(r)?t:`${e}:${t}`).join(" ")})(S,tL((0,eL.$)(e))):rK,[S]),_=(0,a.useRef)(null),H=(0,a.useRef)($),D=(0,a.useRef)(L);H.current=$,D.current=L,(0,a.useEffect)(()=>{var e,r,n;if("static"===t)return;let l=_.current;if(_.current=h,null===l){h&&(null==(e=H.current)||e.call(H));return}h&&!l?null==(r=H.current)||r.call(H):!h&&l&&(null==(n=D.current)||n.call(D))},[h,t]);let q=(0,a.useMemo)(()=>v?Object.keys(v):[],[v]),V=(0,a.useMemo)(()=>{if("string"!=typeof e)return"";let r="streaming"===t&&n?((e,t)=>{var r,n;let l;if(!e||"string"!=typeof e)return e;let s=e.endsWith(" ")&&!e.endsWith("  ")?e.slice(0,-1):e;for(let{handler:e,earlyReturn:o}of[...(l=null!=(n=null==t?void 0:t.linkMode)?n:"protocol",eS.filter(({handler:e,optionKey:r})=>"links"===e.name?!1!==(null==t?void 0:t.links)||!1!==(null==t?void 0:t.images):"inlineKatex"===e.name?!0===(null==t?void 0:t.inlineKatex):!1!==(null==t?void 0:t[r])).map(({handler:e,earlyReturn:t})=>"links"===e.name?{handler:A(O({},e),I({handle:e=>ey(e,l)})),earlyReturn:"protocol"===l?t:void 0}:{handler:e,earlyReturn:t})),...(null!=(r=null==t?void 0:t.handlers)?r:[]).map(e=>{var t;return{handler:A(O({},e),I({priority:null!=(t=e.priority)?t:100})),earlyReturn:void 0}})].sort((e,t)=>{var r,n;return(null!=(r=e.handler.priority)?r:0)-(null!=(n=t.handler.priority)?n:0)}))if(s=e.handle(s),null!=o&&o(s))break;return s})(e,k):e;return j&&j.length>0&&(r=((e,t)=>{if(!t.length)return e;let r=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,"gi");r=r.replace(t,(e,t,r,n)=>t+lz(r).replace(/\n\n/g,"&#10;&#10;")+n)}return r})(r,j)),q.length>0&&(r=((e,t)=>{if(!t.length)return e;let r=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,"gi");r=r.replace(t,(e,t,r,n)=>{if(!r.includes(`
92
93`))return t+r+n;let l=r.replace(/\n\n/g,`
94<!---->
95`),s=(l.startsWith(`
96`)?"":`
97`)+l+(l.endsWith(`
98`)?"":`
99`);return`${t}${s}${n}
100
101`})}return r})(r,q)),r},[e,t,n,k,q,j]),B=(0,a.useMemo)(()=>g(V),[V,g]),[F,Z]=(0,a.useState)(B);(0,a.useEffect)(()=>{"streaming"!==t||Q?Z(B):M(()=>{Z(B)})},[B,t]);let W="streaming"===t?F:B,G=(0,a.useMemo)(()=>"auto"===r?W.map(lt):void 0,[W,r]),K=(0,a.useMemo)(()=>W.map((e,t)=>`${z}-${t}`),[W.length,z]),U=(0,a.useMemo)(()=>!0===m?"true":m?JSON.stringify(m):"",[m]),Q=(0,a.useMemo)(()=>U?"true"===U?rW():rW(m):null,[U]),X=(0,a.useMemo)(()=>{var e,r;return{shikiTheme:null!=(r=null==(e=null==x?void 0:x.code)?void 0:e.getThemes())?r:d,controls:p,isAnimating:h,lineNumbers:w,mode:t,mermaid:u,linkSafety:y}},[d,p,h,w,t,u,y,null==x?void 0:x.code]),Y=(0,a.useMemo)(()=>C?JSON.stringify(C):"",[C]),J=(0,a.useMemo)(()=>({...ne,...C}),[Y]),ee=(0,a.useMemo)(()=>{let{inlineCode:e,...t}=null!=s?s:{},r={...n7,...t};if(e){let t=r.code;r.code=r=>"data-block"in r?t?(0,a.createElement)(t,r):null:(0,a.createElement)(e,r)}return r},[s]),et=(0,a.useMemo)(()=>{let e=[];return null!=x&&x.cjk&&(e=[...e,...x.cjk.remarkPluginsBefore]),e=[...e,...i],null!=x&&x.cjk&&(e=[...e,...x.cjk.remarkPluginsAfter]),null!=x&&x.math&&(e=[...e,x.math.remarkPlugin]),e},[i,null==x?void 0:x.math,null==x?void 0:x.cjk]),er=(0,a.useMemo)(()=>{var e;let t=o;if(v&&Object.keys(v).length>0&&o===lO){let r={...lP,tagNames:[...null!=(e=lP.tagNames)?e:[],...Object.keys(v)],attributes:{...lP.attributes,...v}};t=[l_.raw,[T,r],l_.harden]}return j&&j.length>0&&(t=[...t,[lA,j]]),null!=x&&x.math&&(t=[...t,x.math.rehypePlugin]),Q&&h&&(t=[...t,Q.rehypePlugin]),t},[o,null==x?void 0:x.math,Q,h,v,j]),en=(0,a.useMemo)(()=>{if(!h||0===W.length)return!1;let e=W.at(-1);return lc(e)||(e=>{for(let t of e.split(`
102`)){let e=t.trim();if(e.length>0&&e.includes("|")&&la.test(e))return!0}return!1})(e)},[h,W]),el=(0,a.useMemo)(()=>b&&h&&!en?{"--streamdown-caret":`"${lq[b]}"`}:void 0,[b,h,en]);return"static"===t?(0,tR.jsx)(nt.Provider,{value:J,children:(0,tR.jsx)(np.Provider,{value:null!=x?x:null,children:(0,tR.jsx)(lF.Provider,{value:X,children:(0,tR.jsx)(r7,{icons:N,children:(0,tR.jsx)(rQ.Provider,{value:P,children:(0,tR.jsx)("div",{className:P("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",c),dir:"auto"===r?lt(V):r,children:(0,tR.jsx)(lf,{components:ee,rehypePlugins:er,remarkPlugins:et,...R,children:V})})})})})})}):(0,tR.jsx)(nt.Provider,{value:J,children:(0,tR.jsx)(np.Provider,{value:null!=x?x:null,children:(0,tR.jsx)(lF.Provider,{value:X,children:(0,tR.jsx)(r7,{icons:N,children:(0,tR.jsx)(rQ.Provider,{value:P,children:(0,tR.jsxs)("div",{className:P("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",b&&!en?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,c),style:el,children:[0===W.length&&b&&h&&(0,tR.jsx)("span",{}),W.map((e,t)=>{var s;let o=t===W.length-1,i=h&&o&&lc(e);return(0,tR.jsx)(f,{animatePlugin:Q,components:ee,content:e,dir:null!=(s=null==G?void 0:G[t])?s:"auto"!==r?r:void 0,index:t,isIncomplete:i,rehypePlugins:er,remarkPlugins:et,shouldNormalizeHtmlIndentation:l,shouldParseIncompleteMarkdown:n,...R},K[t])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);lW.displayName="Streamdown";var lG=({children:e,className:t,minZoom:r=.5,maxZoom:n=3,zoomStep:l=.1,showControls:s=!0,initialZoom:o=1,fullscreen:i=!1})=>{let{RotateCcwIcon:c,ZoomInIcon:d,ZoomOutIcon:u}=r8(),p=rX(),h=(0,a.useRef)(null),m=(0,a.useRef)(null),[f,g]=(0,a.useState)(o),[b,x]=(0,a.useState)({x:0,y:0}),[k,y]=(0,a.useState)(!1),[w,v]=(0,a.useState)({x:0,y:0}),[j,C]=(0,a.useState)({x:0,y:0}),N=(0,a.useCallback)(e=>{g(t=>Math.max(r,Math.min(n,t+e)))},[r,n]),S=(0,a.useCallback)(()=>{N(l)},[N,l]),$=(0,a.useCallback)(()=>{N(-l)},[N,l]),L=(0,a.useCallback)(()=>{g(o),x({x:0,y:0})}
102,[o]),R=(0,a.useCallback)(e=>{e.preventDefault(),N(e.deltaY>0?-l:l)},[N,l]),T=(0,a.useCallback)(e=>{if(0!==e.button||!1===e.isPrimary)return;y(!0),v({x:e.clientX,y:e.clientY}),C(b);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[b]),z=(0,a.useCallback)(e=>{if(!k)return;e.preventDefault();let t=e.clientX-w.x,r=e.clientY-w.y;x({x:j.x+t,y:j.y+r})},[k,w,j]),E=(0,a.useCallback)(e=>{y(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,a.useEffect)(()=>{let e=h.current;if(e)return e.addEventListener("wheel",R,{passive:!1}),()=>{e.removeEventListener("wheel",R)}},[R]),(0,a.useEffect)(()=>{let e=m.current;if(e&&k)return document.body.style.userSelect="none",e.addEventListener("pointermove",z,{passive:!1}),e.addEventListener("pointerup",E),e.addEventListener("pointercancel",E),()=>{document.body.style.userSelect="",e.removeEventListener("pointermove",z),e.removeEventListener("pointerup",E),e.removeEventListener("pointercancel",E)}},[k,z,E]),(0,tR.jsxs)("div",{className:p("relative flex flex-col",i?"h-full w-full":"min-h-28 w-full",t),ref:h,style:{cursor:k?"grabbing":"grab"},children:[s?(0,tR.jsxs)("div",{className:p("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",i?"bottom-4 left-4":"bottom-2 left-2"),children:[(0,tR.jsx)("button",{className:p("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:f>=n,onClick:S,title:"Zoom in",type:"button",children:(0,tR.jsx)(d,{size:16})}),(0,tR.jsx)("button",{className:p("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:f<=r,onClick:$,title:"Zoom out",type:"button",children:(0,tR.jsx)(u,{size:16})}),(0,tR.jsx)("button",{className:p("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:L,title:"Reset zoom and pan",type:"button",children:(0,tR.jsx)(c,{size:16})})]}):null,(0,tR.jsx)("div",{className:p("flex-1 origin-center transition-transform duration-150 ease-out",i?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:T,ref:m,role:"application",style:{transform:`translate(${b.x}px, ${b.y}px) scale(${f})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},lK=({chart:e,className:t,config:r,fullscreen:n=!1,showControls:l=!0})=>{let s=rX(),[o,i]=(0,a.useState)(null),[c,d]=(0,a.useState)(!1),[u,p]=(0,a.useState)(""),[h,m]=(0,a.useState)(""),[f,g]=(0,a.useState)(0),{mermaid:b}=(0,a.useContext)(lF),x=nf(),k=null==b?void 0:b.errorComponent,{shouldRender:y,containerRef:w}=function(e={}){let{immediate:t=!1,debounceDelay:r=300,rootMargin:n="300px",idleTimeout:l=500}=e,[s,o]=(0,a.useState)(!1),i=(0,a.useRef)(null),c=(0,a.useRef)(null),d=(0,a.useRef)(null),u=(0,a.useMemo)(()=>e=>{let t=Date.now();return window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},[]),p=(0,a.useMemo)(()=>"u">typeof window&&window.requestIdleCallback?(e,t)=>window.requestIdleCallback(e,t):u,[u]),h=(0,a.useMemo)(()=>"u">typeof window&&window.cancelIdleCallback?e=>window.cancelIdleCallback(e):e=>{clearTimeout(e)},[]);return(0,a.useEffect)(()=>{if(t)return void o(!0);let e=i.current;if(!e)return;c.current&&(clearTimeout(c.current),c.current=null),d.current&&(h(d.current),d.current=null);let s=()=>{c.current&&(clearTimeout(c.current),c.current=null),d.current&&(h(d.current),d.current=null)},a=(e,t)=>{e.isIntersecting?(s(),c.current=window.setTimeout(()=>{var e,r;let n=t.takeRecords();(0===n.length||null!=(r=null==(e=n.at(-1))?void 0:e.isIntersecting)&&r)&&(d.current=p(e=>{e.timeRemaining()>0||e.didTimeout?(o(!0),t.disconnect()):d.current=p(()=>{o(!0),t.disconnect()},{timeout:l/2})},{timeout:l}))},r)):s()},u=new IntersectionObserver(e=>{for(let t of e)a(t,u)},{rootMargin:n,threshold:0});return u.observe(e),()=>{c.current&&clearTimeout(c.current),d.current&&h(d.current),u.disconnect()}},[t,r,n,l,h,p]),{shouldRender:s,containerRef:i}}({immediate:n});return((0,a.useEffect)(()=>
102{if(y){if(!x)return void i("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");(async()=>{try{i(null),d(!0);let t=x.getMermaid(r),n=e.split("").reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),l=`mermaid-${Math.abs(n)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:s}=await t.render(l,e);p(s),m(s)}catch(e){h||u||i(e instanceof Error?e.message:"Failed to render Mermaid chart")}finally{d(!1)}})()}},[e,r,f,y,x]),y||u||h)?!c||u||h?!o||u||h?(0,tR.jsx)("div",{className:s("size-full",t),"data-streamdown":"mermaid",ref:w,children:(0,tR.jsx)(lG,{className:s(n?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:n,maxZoom:3,minZoom:.5,showControls:l,zoomStep:.1,children:(0,tR.jsx)("div",{"aria-label":"Mermaid chart",className:s("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:u||h},role:"img"})})}):k?(0,tR.jsx)("div",{ref:w,children:(0,tR.jsx)(k,{chart:e,error:o,retry:()=>g(e=>e+1)})}):(0,tR.jsxs)("div",{className:s("rounded-md bg-red-50 p-4",t),ref:w,children:[(0,tR.jsxs)("p",{className:s("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",o]}),(0,tR.jsxs)("details",{className:s("mt-2"),children:[(0,tR.jsx)("summary",{className:s("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),(0,tR.jsx)("pre",{className:s("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]}):(0,tR.jsx)("div",{className:s("my-4 flex justify-center p-4",t),ref:w,children:(0,tR.jsxs)("div",{className:s("flex items-center space-x-2 text-muted-foreground"),children:[(0,tR.jsx)("div",{className:s("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),(0,tR.jsx)("span",{className:s("text-sm"),children:"Loading diagram..."})]})}):(0,tR.jsx)("div",{className:s("my-4 min-h-[200px]",t),ref:w})}},95164(e,t,r){r.d(t,{jH:()=>n.C});var n=r(8850)},22669(e,t,r){r.d(t,{z:()=>p,B:()=>h});var n=r(68413);let l={damping:.7,stiffness:.05,mass:1.25},s=1e3/60,o=!1;function i(e,t){let r=(0,n.useCallback)(t=>(r.current=t,e(t)),t);return r}globalThis.document?.addEventListener("mousedown",()=>{o=!0}),globalThis.document?.addEventListener("mouseup",()=>{o=!1}),globalThis.document?.addEventListener("click",()=>{o=!1});let a=new Map;function c(...e){let t={...l},r=!1;for(let n of e){if("instant"===n){r=!0;continue}"object"==typeof n&&(r=!1,t.damping=n.damping??t.damping,t.stiffness=n.stiffness??t.stiffness,t.mass=n.mass??t.mass)}let n=JSON.stringify(t);return a.has(n)||a.set(n,Object.freeze(t)),r?"instant":a.get(n)}let d=(0,n.createContext)(null),u="u">typeof window?n.useLayoutEffect:n.useEffect;function p({instance:e,children:t,resize:r,initial:l,mass:a,damping:h,stiffness:m,targetScrollTop:f,contextRef:g,...b}){let x=(0,n.useRef)(null),k=((e={})=>{let[t,r]=(0,n.useState)(!1),[l,a]=(0,n.useState)(!1!==e.initial),[d,u]=(0,n.use
102State)(!1),p=(0,n.useRef)(null);p.current=e;let h=(0,n.useCallback)(()=>{if(!o)return!1;let e=window.getSelection();if(!e||!e.rangeCount)return!1;let t=e.getRangeAt(0);return t.commonAncestorContainer.contains(w.current)||w.current?.contains(t.commonAncestorContainer)},[]),m=(0,n.useCallback)(e=>{g.isAtBottom=e,a(e)},[]),f=(0,n.useCallback)(e=>{g.escapedFromLock=e,r(e)},[]),g=(0,n.useMemo)(()=>{let r;return{escapedFromLock:t,isAtBottom:l,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return w.current?.scrollTop??0},set scrollTop(scrollTop){if(w.current){let{scrollBehavior:e}=getComputedStyle(w.current);"auto"!==e&&(w.current.style.scrollBehavior="auto"),w.current.scrollTop=scrollTop,g.ignoreScrollToTop=w.current.scrollTop,"auto"!==e&&(w.current.style.scrollBehavior=e)}},get targetScrollTop(){if(!w.current||!v.current)return 0;return w.current.scrollHeight-1-w.current.clientHeight},get calculatedTargetScrollTop(){if(!w.current||!v.current)return 0;let{targetScrollTop:t}=this;if(!e.targetScrollTop)return t;if(r?.targetScrollTop===t)return r.calculatedScrollTop;let n=Math.max(Math.min(e.targetScrollTop(t,{scrollElement:w.current,contentElement:v.current}),t),0);return r={targetScrollTop:t,calculatedScrollTop:n},requestAnimationFrame(()=>{r=void 0}),n},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=70}}},[]),b=(0,n.useCallback)((e={})=>{let t;"string"==typeof e&&(e={animation:e}),e.preserveScrollPosition||m(!0);let r=Date.now()+(Number(e.wait)||0),n=c(p.current,e.animation),{ignoreEscapes:l=!1}=e,o=g.calculatedTargetScrollTop;e.duration instanceof Promise?e.duration.finally(()=>{t=Date.now()}):t=r+(e.duration??0);let i=async()=>{let e=new Promise(requestAnimationFrame).then(()=>{if(!g.isAtBottom)return g.animation=void 0,!1;let{scrollTop:a}=g,d=performance.now(),u=(d-(g.lastTick??d))/s;if(g.animation||(g.animation={behavior:n,promise:e,ignoreEscapes:l}),g.animation.behavior===n&&(g.lastTick=d),h()||r>Date.now())return i();if(a<Math.min(o,g.calculatedTargetScrollTop)){if(g.animation?.behavior===n){if("instant"===n)return g.scrollTop=g.calculatedTargetScrollTop,i();g.velocity=(n.damping*g.velocity+n.stiffness*g.scrollDifference)/n.mass,g.accumulated+=g.velocity*u,g.scrollTop+=g.accumulated,g.scrollTop!==a&&(g.accumulated=0)}return i()}return t>Date.now()?(o=g.calculatedTargetScrollTop,i()):(g.animation=void 0,g.scrollTop<g.calculatedTargetScrollTop)?b({animation:c(p.current,p.current.resize),ignoreEscapes:l,duration:Math.max(0,t-Date.now())||void 0}):g.isAtBottom});return e.then(e=>(requestAnimationFrame(()=>{g.animation||(g.lastTick=void 0,g.velocity=0)}),e))};return(!0!==e.wait&&(g.animation=void 0),g.animation?.behavior===n)?g.animation.promise:i()},[m,h,g]),x=(0,n.useCallback)(()=>{f(!0),m(!1)},[f,m]),k=(0,n.useCallback)(({target:e})=>{if(e!==w.current)return;let{scrollTop:t,ignoreScrollToTop:r}=g,{lastScrollTop:n=t}=g;g.lastScrollTop=t,g.ignoreScrollToTop=void 0,r&&r>t&&(n=r),u(g.isNearBottom),setTimeout(()=>{if(g.resizeDifference||t===r)return;if(h()){f(!0),m(!1);return}let e=t>n,l=t<n;if(g.animation?.ignoreEscapes){g.scrollTop=n;return}l&&(f(!0),m(!1)),e&&f(!1),!g.escapedFromLock&&g.isNearBottom&&m(!0)},1)},[f,m,h,g]),y=(0,n.useCallback)(({target:e,deltaY:t})=>{let r=e;for(;!["scroll","auto"].includes(getComputedStyle(r).overflow);){if(!r.parentElement)return;r=r.parentElement}r===w.current&&t<0&&w.current.scrollHeight>w.current.clientHeight&&!g.animation?.ignoreEscapes&&(f(!0),m(!1))},[f,m,g]),w=i(e=>{w.current?.removeEventListener("scroll",k),w.current?.removeEventListener("wheel",y),e?.addEventListener("scroll",k,{passive:!0}),e?.addEventListener("wheel",y,{passive:!0})},[]),v=i(e=>{let t;g.resizeObserver?.disconnect(),e&&(g.resizeObserver=new ResizeObserver(([e])=>{let{height:r}=e.contentRect,n=r-(t??r);if(g.resizeDifference=n,g.scrollTop>g.targetScrollTop&&(g.scrollTop=g.targetScrollTop),u(g.isNearBottom),n>=0){let e=c(p.current,t?p.current.resize:p.current.initial);b({animation:e,wait:!0,preserveScrollPosition:!0,duration:"instant"===e?void 0:350})}else g.isNearBottom&&(f(!1),m(!0));t=r,requestAnimationFrame(()=>{setTimeout(()=>{g.resizeDifference===n&&(g.resizeDifference=0)},1)})}),g.resizeObserver?.observe(e))},[]);return{contentRef:v,scrollRef:w,scrollToBottom:b,stopScroll:x,isAtBottom:l||d,isNearBottom:d,escapedFromLock:t,state:g}})({mass:a,damping:h,stiffness:m,resize:r,initial:l,targetScrollTop:n.useCallback((e,t)=>{let r=$?.targetScrollTop??f;return r?.(e,t)??e},[f])}),{scrollRef:y,contentRef:w,scrollToBottom:v,stopScroll:j,isAtBottom:C,escapedFromLock:N,state:S}=e??k,$=(0,n.useMemo)(()=>({scrollToBottom:v,stopScroll:j,scrollRef:y,isAtBottom:C,escapedFromLock:N,contentRef:w,state:S,get targetScrollTop(){return x.current},set targetScrollTop(targetScrollTop){x.current=targetScrollTop}}),[v,C,w,y,j,N,S]);return(0,n.useImperativeHandle)(g,()=>$,[$]),u(()=>{y.current&&"visible"===getComputedStyle(y.current).overflow&&(y.current.style.overflow="auto")},[]),n.createElement(d.Provider,{value:$},n.createElement("div",{...b},"function"==typeof t?t($):t))}function h(){let e=(0,n.useContext)(d);if(!e)throw Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}(p||(p={})).Content=function({children:e,scrollClassName:t,...r}){let l=h();return n.createElement("div",{ref:l.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:t},n.createElement("div",{...r,ref:l.contentRef},"function"==typeof e?e(l):e))}}}]);

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.