/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/marked-highlight@2.2.4/lib/index.umd.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).markedHighlight={})}(this,(function(e){"use strict";function t(e){return(e||"").match(/\S*/)[0]}function n(e){return t=>{"string"==typeof t&&t!==e.text&&(e.escaped=!0,e.text=t)}}const i=/[&<>"']/,o=new RegExp(i.source,"g"),r=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,s=new RegExp(r.source,"g"),g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},a=e=>g[e];function c(e,t){if(t){if(i.test(e))return e.replace(o,a)}else if(r.test(e))return e.replace(s,a);return e}e.markedHighlight=function(e){if("function"==typeof e&&(e={highlight:e}),!e||"function"!=typeof e.highlight)throw new Error("Must provide highlight function");return"string"!=typeof e.langPrefix&&(e.langPrefix="language-"),"string"!=typeof e.emptyLangClass&&(e.emptyLangClass=""),{async:!!e.async,walkTokens(i){if("code"!==i.type)return;const o=t(i.lang);if(e.async)return Promise.resolve(e.highlight(i.text,o,i.lang||"")).then(n(i));const r=e.highlight(i.text,o,i.lang||"");if(r instanceof Promise)throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");n(i)(r)},useNewRenderer:!0,renderer:{code(n,i,o){"object"==typeof n&&(o=n.escaped,i=n.lang,n=n.text);const r=t(i),s=r?e.langPrefix+c(r):e.emptyLangClass,g=s?` class="${s}"`:"";return n=n.replace(/\n$/,""),`<pre><code${g}>${o?n:c(n,!0)}\n</code></pre>`}}}}}));
//# sourceMappingURL=/sm/281623870b75da1ac109e059f289eca8504d687ecf494bd03265adb3b0db4d7d.map