PageSourceSearch

https://rightblogger.com/_next/static/immutable/chunks/1b6v83amgcg2t.js

js rightblogger.com collected 2026-09-24 08:34:45 UTC 164,063 bytes, 115 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a0bfc6-307d-0000-0374-180b6fd21f14";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="9274d222-e31f-51fb-ae0e-b3afb2e163d4")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33478,e=>{"use strict";let t,r,n,l,o;var s=e.i(191788),a=e.i(931188),i=e.i(869701);let c="indicator",d="text-only",u="remove";function p(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 h=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),m=new Set(["javascript:","data:","file:","vbscript:"]);function f(e,t,r,n=!1,l=!1,o=[]){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 s=p(e,r);if(!s||m.has(s.protocol)||!(h.has(s.protocol)||o.includes(s.protocol)||o.includes("*")))return null;if("mailto:"===s.protocol||!s.protocol.match(/^https?:$/))return s.href;let a="string"==typeof e&&(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"));return s&&t.some(e=>{let t=p(e,r);return!!t&&t.origin===s.origin&&s.href.startsWith(t.href)})?a?s.pathname+s.search+s.hash:s.href:t.includes("*")?"https:"!==s.protocol&&"http:"!==s.protocol?null:a?s.pathname+s.search+s.hash:s.href:null}let g=Symbol("node-seen");var b=e.i(331858),x=e.i(30941),k=e.i(379479);let y=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],w={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...y,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...y],h2:[["className","sr-only"]],img:[...y,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...y,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...y],table:[...y],ul:[...y,["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"]},v={}.hasOwnProperty;function j(e,t){if(t&&"object"==typeof t)switch("string"==typeof t.type?t.type:""){case"comment":var r,n,l=e,o=t;if(l.schema.allowComments){let e="string"==typeof o.value?o.value:"",t=e.indexOf("-->"),r={type:"comment",value:t<0?e:e.slice(0,t)};return S(r,o),r}return;case"doctype":var s=e,a=t;if(s.schema.allowDoctypes){let e={type:"doctype"};return S(e,a),e}return;case"element":return function(e,t){let r="string"==typeof t.tagName?t.tagName:"";e.stack.push(r);let n=C(e,t.children),l=function(e,t){let r,n=e.stack[e.stack.length-1],l=e.schema.attributes,o=e.schema.required,s=l&&v.call(l,n)?l[n]:void 0,a=l&&v.call(l,"*")?l["*"]:void 0,i=t&&"object"==typeof t?t:{},c={};for(r in i)if(v.call(i,r)){let t=i[r],n=N(e,L(s,r),r,t);null==n&&(n=N(e,L(a,r),r,t)),null!=n&&(c[r]=n)}if(o&&v.call(o,n)){let e=o[n];for(r in e)v.call(e,r)&&!v.call(c,r)&&(c[r]=e[r])}return c}(e,t.properties);e.stack.pop();let o=!1;if(r&&"*"!==r&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(o=!0,e.schema.ancestors&&v.call(e.schema.ancestors,r))){let t=e.schema.ancestors[r],n=-1;for(o=!1;++n<t.length;)e.stack.includes(t[n])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(r)?n:void 0;let s={type:"element",tagName:r,properties:l,children:n};return S(s,t),s}(e,t);case"root":let i;return S(i={type:"root",children:C(e,(r=t).children)},r),i;case"text":let c;return S(c={type:"text",value:"string"==typeof(n=t).value?n.value:""},n),c}}function C(e,t){let r=[];if(Array.isArray(t)){let n=-1;for(;++n<t.length;){let l=j(e,t[n]);l&&(Array.isArray(l)?r.push(...l):r.push(l))}}return r}function N(e,t,r,n){return t?Array.isArray(n)?function(e,t,r,n){let l=-1,o=[];for(;++l<n.length;){let s=$(e,t,r,n[l]);("number"==typeof s||"string"==typeof s)&&o.push(s)}return o}(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
1hema.protocols&&v.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!n||0===n.length)return!0;let l=String(r),o=l.indexOf(":"),s=l.indexOf("?"),a=l.indexOf("#"),i=l.indexOf("/");if(o<0||i>-1&&o>i||s>-1&&o>s||a>-1&&o>a)return!0;let c=-1;for(;++c<n.length;){let e=n[c];if(o===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 S(e,t){let r=(0,k.position)(t);t.data&&(e.data=(0,x.default)(t.data)),r&&(e.position=r)}function L(e,t){let r,n=-1;if(e)for(;++n<e.length;){let l=e[n],o="string"==typeof l?l:l[0];if(o===t)return l;"data*"===o&&(r=l)}if(t.length>4&&"data"===t.slice(0,4).toLowerCase())return r}function z(e){return function(t){let r,n;return r={type:"root",children:[]},(n=j({schema:e?{...w,...e}:w,stack:[]},t))&&(Array.isArray(n)?1===n.length?r=n[0]:r.children=n:r=n),r}}var M=e.i(3812),R=Object.defineProperty,A=Object.defineProperties,T=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,H=(e,t,r)=>t in e?R(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(I)for(var r of I(t))E.call(t,r)&&H(e,r,t[r]);return e},_=null,D=(e,t)=>{let r=_;return(null===r||r.text!==e)&&(_=r={text:e,lookup:(e=>{let t=new Uint8Array(e.length+1),r=!1,n=!1,l=0;for(;l<e.length;){if("\\"===e[l]&&l+1<e.length&&"`"===e[l+1]){let e=r||n?1:0;t[l+1]=e,t[l+2]=e,l+=2;continue}if("```"===e.substring(l,l+3)){n=!n;let o=r||n?1:0,s=Math.min(l+3,e.length);for(let e=l+1;e<=s;e+=1)t[e]=o;l=s;continue}n||"`"!==e[l]||(r=!r),t[l+1]=r||n?1:0,l+=1}return t})(e)}),1===r.lookup[Math.min(t,e.length)]},V=(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},q=(e,t)=>{let r=!1,n=!1,l=-1;for(let o=0;o<e.length;o+=1){if("\\"===e[o]&&o+1<e.length&&"`"===e[o+1]){o+=1;continue}if("```"===e.substring(o,o+3)){n=!n,o+=2;continue}if(!n&&"`"===e[o])if(r){if(l<t&&t<o)return!0;r=!1,l=-1}else r=!0,l=o}return!1},B=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,F=/(\*\*)([^*]*\*?)$/,Z=/(__)([^_]*?)$/,W=/(\*\*\*)([^*]*?)$/,K=/(\*)([^*]*?)$/,G=/(_)([^_]*?)$/,U=/(`)([^`]*?)$/,Q=/(~~)([^~]*?)$/,X=/^[\s_~*`]*$/,J=/^[\s]*[-*+][\s]+$/,Y=/[\p{L}\p{N}_]/u,ee=/^```[^`\n]*```?$/,et=/^\*{4,}
1$/,er=/(__)([^_]+)_$/,en=/(~~)([^~]+)~$/,el=/~~/g,eo=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||Y.test(e)},es=(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},ea=e=>"inlineLatex"===e||"blockLatex"===e,ei=(e,t)=>"["===t&&"none"===e?"blockLatex":"]"===t&&"blockLatex"===e?"none":"("===t&&"none"===e?"inlineLatex":")"===t&&"inlineLatex"===e?"none":null,ec=(e,t)=>t?"blockDollar"===e?"none":"blockDollar":"blockDollar"===e?e:"inlineDollar"===e?"none":"inlineDollar",ed=(e,t)=>{let r="none";for(let n=0;n<e.length&&n<t;n+=1){if("\\"===e[n]&&"$"===e[n+1]){n+=1;continue}if("\\"===e[n]){let t=ei(r,e[n+1]);if(null!==t){r=t,n+=1;continue}}if("$"===e[n]&&!ea(r)){let t="$"===e[n+1];r=ec(r,t),t&&(n+=1)}}return"none"!==r},eu=(e,t)=>{for(let r=t;r<e.length;r+=1){if(")"===e[r])return!0;if(e[r]===`
2`)break}return!1},ep=(e,t)=>{for(let r=t-1;r>=0&&")"!==e[r];r-=1){if("("===e[r])return r>0&&"]"===e[r-1]&&eu(e,t);if(e[r]===`
3`)break}return!1},eh=(e,t,r)=>{let n=0;for(let r=t-1;r>=0;r-=1)if(e[r]===`
4`){n=r+1;break}let l=e.length;for(let r=t;r<e.length;r+=1)if(e[r]===`
5`){l=r;break}let o=e.substring(n,l),s=0,a=!1;for(let e of o)if(e===r)s+=1;else if(" "!==e&&"	"!==e){a=!0;break}return s>=3&&!a},em=e=>e.includes("$")||e.includes("\\(")||e.includes("\\["),ef=(e,t,r,n)=>!!("\\"===r||em(e)&&ed(e,t))||("*"!==r&&"*"===n?(t<e.length-2?e[t+2]:"")!=="*":"*"===r||(!r||" "===r||"	"===r||r===`
6`)&&(!n||" "===n||"	"===n||n===`
7`)),eg=e=>" "===e||"	"===e||e===`
8`,eb=(e,t,r,n)=>{let l=!!(e&&t&&eo(e)&&eo(t)),o=!!t&&!eg(t),s=!!e&&!eg(e);return l&&r%2==0&&!n?{count:!1}:s&&r%2==1||o?{count:!0,inWordAsteriskChain:l}:{count:!1}},ex=e=>{let t=0,r=!1,n=!1,l=e.length;for(let o=0;o<l;o+=1){if("`"===e[o]&&o+2<l&&"`"===e[o+1]&&"`"===e[o+2]){r=!r,o+=2;continue}if(r)continue;if("*"!==e[o]){eo(e[o])||(n=!1);continue}let s=o>0?e[o-1]:"",a=o<l-1?e[o+1]:"";if(ef(e,o,s,a))continue;let i=eb(s,a,t,n);i.count&&(t+=1,n=i.inWordAsteriskChain)}return t},ek=(e,t,r,n)=>!!("\\"===r||em(e)&&ed(e,t)||ep(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&&eo(r)&&eo(n)),ey=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},ew=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},ev=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]&&!ed(e,r)&&!ep(e,r)){let t=r>0?e[r-1]:"",n=r<e.length-1?e[r+1]:"";if(t&&n&&eo(t)&&eo(n))continue;return r}}return -1},ej=/<[a-zA-Z/][^>]*$/,eC=(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),eN=(e,t,r)=>{let n=t>0&&"!"===e[t-1],l=n?t-1:t;if(!e.substring(t+1).includes("]")||-1===es(e,t)){let o=e.substring(0,l);if(n)return o;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=es(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},e$=(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],o=e.substring(0,l?n-1:n);if(l)return o;let s=e.substring(n+1,t);return"text-only"===r?`${o}${s}`:`${o}[${s}](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=eN(e,r,t);if(null!==n)return n}return e},eS=/^-{1,2}$/,eL=/^[\s]*-{1,2}[\s]+$/,ez=/^={1,2}$/,eM=/^[\s]*={1,2}[\s]+$/,eR=/([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu,eA=[{handler:{name:"singleTilde",handle:e=>e&&"string"==typeof e&&e.includes("~")?e.replace(eR,(t,r,n)=>D(e,n+r.length)?t:`${r}\\~`):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(ej);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(eS.test(l)&&!r.match(eL)){let t=n.split(`
11`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(ez.test(l)&&!r.match(eM)){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:e$,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],o=e.lastIndexOf(n[1]);return!l||X.test(l)||D(e,o)||q(e,o)||eh(e,o,"*")?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=ey(e),r=ex(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)||q(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!!(J.test(l)&&t.includes(`
14`))||eh(e,r,"*")})(e,r,n)?e:ey(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)||q(e,r))&&ew(e)%2==1)return`${e}_`}return e}let r=t[2],n=e.lastIndexOf(t[1]);return D(e,n)||q(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!!(J.test(l)&&t.includes(`
16`))||eh(e,r,"_")})(e,r,n)?e:ew(e)%2==1?`${e}__`:e},priority:40},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:e=>{if(!e.match(K))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]&&!ed(e,r)){let t=r>0?e[r-1]:"",n=r<e.length-1?e[r+1]:"",l=!t||eg(t),o=!n||eg(n);if(l&&o||t&&n&&eo(t)&&eo(n)||o)continue;return r}}return -1})(e);if(-1===t||D(e,t)||q(e,t))return e;let r=e.substring(t+1);return!r||X.test(r)?e:ex(e)%2==1?`${e}*`:e},priority:41},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:e=>{if(!e.match(G))return e;let t=ev(e);
16if(-1===t)return e;let r=e.substring(t+1);if(!r||X.test(r)||D(e,t)||q(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 o=l>0?e[l-1]:"",s=l<n-1?e[l+1]:"";ek(e,l,o,s)||(t+=1)}return t})(e)%2==1){let t=(e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(ey(t)%2!=1)return null;let r=t.indexOf("**"),n=ev(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]===`
17`;)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(`
18`)?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]||V(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)||q(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)||q(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]||eC(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(`
19`,t)||e.endsWith(`
20`)?`${e}$$`:`${e}
21$$`})(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}if("`"===e[n]&&!eC(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"}],eT=e.i(56206);let eI=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),eP=[],eE=(e,t,r)=>{if(0==e.length-t)return r.classGroupId;let n=e[t],l=r.nextPart.get(n);if(l){let r=eE(e,t+1,l);if(r)return r}let o=r.validators;if(null===o)return;let s=0===t?e.join("-"):e.slice(t).join("-"),a=o.length;for(let e=0;e<a;e++){let t=o[e];if(t.validator(s))return t.classGroupId}},eH=(e,t)=>{let r=eI();for(let n in e)eO(e[n],r,n,t);return r},eO=(e,t,r,n)=>{let l=e.length;for(let o=0;o<l;o++)e_(e[o],t,r,n)},e_=(e,t,r,n)=>{"string"==typeof e?eD(e,t,r):"function"==typeof e?eV(e,t,r,n):eq(e,t,r,n)},eD=(e,t,r)=>{(""===e?t:eB(t,e)).classGroupId=r},eV=(e,t,r,n)=>{eF(e)?eO(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:r,validator:e}))},eq=(e,t,r,n)=>{let l=Object.entries(e),o=l.length;for(let e=0;e<o;e++){let[o,s]=l[e];eO(s,eB(t,o),r,n)}},eB=(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=eI(),r.nextPart.set(t,l)),r=l}return r},eF=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,eZ=[],eW=(e,t,r,n,l)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:l}),eK=/\s+/,eG=e=>{let t;if("string"==typeof e)return e;let r="";for(let n=0;n<e.length;n++)e[n]&&(t=eG(e[n]))&&(r&&(r+=" "),r+=t);return r},eU=[],eQ=e=>{let t=t=>t[e]||eU;return t.isThemeGetter=!0,t.themeKey=e,t},eX=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,eJ=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eY=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,e0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,e1=/\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$/,e5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,e2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,e3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,e6=e=>eY.test(e),e9=e=>!!e&&!Number.isNaN(Number(e)),e4=e=>
21!!e&&Number.isInteger(Number(e)),e7=e=>e.endsWith("%")&&e9(e.slice(0,-1)),e8=e=>e0.test(e),te=()=>!0,tt=e=>e1.test(e)&&!e5.test(e),tr=()=>!1,tn=e=>e2.test(e),tl=e=>e3.test(e),to=e=>!ti(e)&&!tg(e),ts=e=>e.startsWith("@container")&&("/"===e[10]&&void 0!==e[11]||"s"===e[11]&&void 0!==e[16]&&e.startsWith("-size/",10)||"n"===e[11]&&void 0!==e[18]&&e.startsWith("-normal/",10)),ta=e=>tC(e,tL,tr),ti=e=>eX.test(e),tc=e=>tC(e,tz,tt),td=e=>tC(e,tM,e9),tu=e=>tC(e,tA,te),tp=e=>tC(e,tR,tr),th=e=>tC(e,t$,tr),tm=e=>tC(e,tS,tl),tf=e=>tC(e,tT,tn),tg=e=>eJ.test(e),tb=e=>tN(e,tz),tx=e=>tN(e,tR),tk=e=>tN(e,t$),ty=e=>tN(e,tL),tw=e=>tN(e,tS),tv=e=>tN(e,tT,!0),tj=e=>tN(e,tA,!0),tC=(e,t,r)=>{let n=eX.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},tN=(e,t,r=!1)=>{let n=eJ.exec(e);return!!n&&(n[1]?t(n[1]):r)},t$=e=>"position"===e||"percentage"===e,tS=e=>"image"===e||"url"===e,tL=e=>"length"===e||"size"===e||"bg-size"===e,tz=e=>"length"===e,tM=e=>"number"===e,tR=e=>"family-name"===e,tA=e=>"number"===e||"weight"===e,tT=e=>"shadow"===e,tI=(l2=()=>{let e=eQ("color"),t=eQ("font"),r=eQ("text"),n=eQ("font-weight"),l=eQ("tracking"),o=eQ("leading"),s=eQ("breakpoint"),a=eQ("container"),i=eQ("spacing"),c=eQ("radius"),d=eQ("shadow"),u=eQ("inset-shadow"),p=eQ("text-shadow"),h=eQ("drop-shadow"),m=eQ("blur"),f=eQ("perspective"),g=eQ("aspect"),b=eQ("ease"),x=eQ("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(),tg,ti],v=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],C=()=>[tg,ti,i],N=()=>[e6,"full","auto",...C()],$=()=>[e4,"none","subgrid",tg,ti],S=()=>["auto",{span:["full",e4,tg,ti]},e4,tg,ti],L=()=>[e4,"auto",tg,ti],z=()=>["auto","min","max","fr",tg,ti],M=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...C()],T=()=>[e6,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],I=()=>[a,e6,"screen","full","dvw","lvw","svw","min","max","fit",...C()],P=()=>[e6,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],E=()=>[e,tg,ti],H=()=>[...y(),tk,th,{position:[tg,ti]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",ty,ta,{size:[tg,ti]}],D=()=>[e7,tb,tc],V=()=>["","none","full",c,tg,ti],q=()=>["",e9,tb,tc],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=()=>[e9,e7,tk,th],W=()=>["","none",m,tg,ti],K=()=>["none",e9,tg,ti],G=()=>["none",e9,tg,ti],U=()=>[e9,tg,ti],Q=()=>[e6,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[e8],breakpoint:[e8],color:[te],container:[e8],"drop-shadow":[e8],ease:["in","out","in-out"],font:[to],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[e8],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[e8],shadow:[e8],spacing:["px",e9],text:[e8],"text-shadow":[e8],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",e6,ti,tg,g]}],container:["container"],"container-type":[{"@container":["","normal","size",tg,ti]}],"container-named":[ts],columns:[{columns:[e9,"auto",ti,tg,a]}],"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()}
vendor: 4,788 bytes, line 21
21],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[e4,"auto",tg,ti]}],basis:[{basis:[e6,"full","auto",a,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[e9,e6,"auto","initial","none",ti]}],grow:[{grow:["",e9,tg,ti]}],shrink:[{shrink:["",e9,tg,ti]}],order:[{order:[e4,"first","last","none",tg,ti]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:S()}],"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":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...M(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...M()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":M()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],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:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:T()}],"inline-size":[{inline:["auto",...I()]}],"min-inline-size":[{"min-inline":["auto",...I()]}],"max-inline-size":[{"max-inline":["none",...I()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[a,"screen",...T()]}],"min-w":[{"min-w":[a,"screen","none",...T()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...T()]}],h:[{h:["screen","lh",...T()]}],"min-h":[{"min-h":["screen","lh","none",...T()]}],"max-h":[{"max-h":["screen","lh","none",...T()]}],"font-size":[{text:["base",r,tb,tc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,tj,tu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",e7,ti]}],"font-family":[{font:[tx,tp,t]}],"font-features":[{"font-features":[ti]}],"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,tg,ti]}],"line-clamp":[{"line-clamp":[e9,"none",tg,td]}],leading:[{leading:["none",o,...C()]}],"list-image":[{"list-image":["none",tg,ti]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",tg,ti]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[e9,"from-font","auto",tg,tc]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[e9,"auto",tg,ti]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[e4,tg,ti]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",tg,ti]}],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",tg,ti]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},e4,tg,ti],radial:["",tg,ti],conic:["",e4,tg,ti]},tw,tm]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:D()}
vendor: 7,363 bytes, line 21
21],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-bs":[{"border-bs":q()}],"border-w-be":[{"border-be":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...B(),"hidden","none"]}],"divide-style":[{divide:[...B(),"hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-bs":[{"border-bs":E()}],"border-color-be":[{"border-be":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[e9,tg,ti]}],"outline-w":[{outline:["",e9,tb,tc]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","inner","none",d,tv,tf]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",u,tv,tf]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[e9,tc]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",p,tv,tf]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[e9,tg,ti]}],"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":[e9]}],"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":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"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":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"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":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"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":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"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":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"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":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"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":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[tg,ti]}],"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":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"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":[e9]}],"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":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",tg,ti]}],filter:[{filter:["","none",tg,ti]}],blur:[{blur:W()}],brightness:[{brightness:[e9,tg,ti]}],contrast:[{contrast:[e9,tg,ti]}],"drop-shadow":[{"drop-shadow":["","none",h,tv,tf]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",e9,tg,ti]}],"hue-rotate":[{"hue-rotate":[e9,tg,ti]}],invert:[{invert:["",e9,tg,ti]}],saturate:[{saturate:[e9,tg,ti]}],sepia:[{sepia:["",e9,tg,ti]}],"backdrop-filter":[{"backdrop-filter":["","none",tg,ti]}],"backdrop-blur":[{"backdrop-blur":W()}],"backdrop-brightness":[{"backdrop-brightness":[e9,tg,ti]}],"backdrop-contrast":[{"backdrop-contrast":[e9,tg,ti]}],"backdrop-grayscale":[{"backdrop-grayscale":["",e9,tg,ti]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[e9,tg,ti]}],"backdrop-invert":[{"backdrop-invert":["",e9,tg,ti]}],"backdrop-opacity":[{"backdrop-opacity":[e9,tg,ti]}],"backdrop-saturate":[{"backdrop-saturate":[e9,tg,ti]}],"backdrop-sepia":[{"backdrop-sepia":["",e9,tg,ti]}],"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",tg,ti]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[e9,"initial",tg,ti]}],ease:[{ease:["linear","initial",b,tg,ti]}],delay:[{delay:[e9,tg,ti]}],animate:[{animate:["none",x,tg,ti]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,tg,ti]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[tg,ti,"","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"],zoom:[{zoom:[e4,tg,ti]}],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}
21],"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",tg,ti]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":E()}],"scrollbar-track-color":[{"scrollbar-track":E()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"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",tg,ti]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[e9,tb,tc,td]}],stroke:[{stroke:["none",...E()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],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":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","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-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","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-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","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-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","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-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},o=e=>{let l=r(e);if(l)return l;let o=((e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:l,sortModifiers:o,postfixLookupClassGroupIds:s}=t,a=[],i=e.trim().split(eK),c="";for(let e=i.length-1;e>=0;e-=1){let t,d=i[e],{isExternal:u,modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:f}=r(d);if(u){c=d+(c.length>0?" "+c:c);continue}let g=!!f;if(g){let e=(t=n(m.substring(0,f)))&&s[t]?n(m):void 0;e&&e!==t&&(t=e,g=!1)}else t=n(m);if(!t){if(!g||!(t=n(m))){c=d+(c.length>0?" "+c:c);continue}g=!1}let b=0===p.length?"":1===p.length?p[0]:o(p).join(":"),x=h?b+"!":b,k=x+t;if(a.indexOf(k)>-1)continue;a.push(k);let y=l(t,g);for(let e=0;e<y.length;++e){let t=y[e];a.push(x+t)}c=d+(c.length>0?" "+c:c)}return c})(e,t);return n(e,o),o},l=e=>{var s;let a;return r=(t={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null),l=(l,o)=>{r[l]=o,++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)}}})((s=[].reduce((e,t)=>
21t(e),l2())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:r}=e,n=e=>{let t,r=[],n=0,l=0,o=0,s=e.length;for(let a=0;a<s;a++){let s=e[a];if(0===n&&0===l){if(":"===s){r.push(e.slice(o,a)),o=a+1;continue}if("/"===s){t=a;continue}}"["===s?n++:"]"===s?n--:"("===s?l++:")"===s&&l--}let a=0===r.length?e:e.slice(o),i=a,c=!1;return a.endsWith("!")?(i=a.slice(0,-1),c=!0):a.startsWith("!")&&(i=a.slice(1),c=!0),eW(r,c,i,t&&t>o?t-o:void 0)};if(t){let e=t+":",r=n;n=t=>t.startsWith(e)?r(t.slice(e.length)):eW(eZ,!1,t,void 0,!0)}if(r){let e=n;n=t=>r({className:t,parseClassName:e})}return n})(s),sortModifiers:(a=new Map,s.orderSensitiveModifiers.forEach((e,t)=>{a.set(e,1e6+t)}),e=>{let t=[],r=[];for(let n=0;n<e.length;n++){let l=e[n],o="["===l[0],s=a.has(l);o||s?(r.length>0&&(r.sort(),t.push(...r),r=[]),t.push(l)):r.push(l)}return r.length>0&&(r.sort(),t.push(...r)),t}),postfixLookupClassGroupIds:(e=>{let t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let e=0;e<r.length;e++)t[r[e]]=!0;return t})(s),...(e=>{let t=(e=>{let{theme:t,classGroups:r}=e;return eH(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 eE(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||eP}return r[e]||eP}}})(s)}).cache.get,n=t.cache.set,l=o,o(e)},(...e)=>l(((...e)=>{let t,r,n=0,l="";for(;n<e.length;)(t=e[n++])&&(r=eG(t))&&(l&&(l+=" "),l+=r);return l})(...e)));var tP=e.i(391398),tE=e.i(730943),tH=e.i(347954),tO=e.i(219802),t_=e.i(715105),tD=e.i(353309),tV=e.i(502916);function tq(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var tB=tq(),tF={exec:()=>null};function tZ(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(tK.caret,"$1"),r=r.replace(e,l),n},getRegex:()=>new RegExp(r,t)};return n}var tW=(()=>{try{return!!RegExp("(?<=1)(?<!1)")}catch{return!1}})(),tK={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)}}>`)},tG=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tU=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,tQ=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tX=tZ(tQ).replace(/bull/g,tU).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(),tJ=tZ(tQ).replace(/bull/g,tU).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(),tY=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,t0=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,t1=tZ(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",t0).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),t5=tZ(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tU).getRegex(),t2="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",t3=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,t6=tZ("^ {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|/?>
vendor: 10,339 bytes, lines 21-32
21)[\\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",t3).replace("tag",t2).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t9=tZ(tY).replace("hr",tG).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",t2).getRegex(),t4={blockquote:tZ(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",t9).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:t1,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:tG,html:t6,lheading:tX,list:t5,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:t9,table:tF,text:/^[^\n]+/},t7=tZ("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",tG).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",t2).getRegex(),t8={...t4,lheading:tJ,table:t7,paragraph:tZ(tY).replace("hr",tG).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",t7).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",t2).getRegex()},re={...t4,html:tZ("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",t3).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:tF,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:tZ(tY).replace("hr",tG).replace("heading",` *#{1,6} *[^
22]`).replace("lheading",tX).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},rt=/^( {2,}|\\)\n(?!\s*$)/,rr=/[\p{P}\p{S}]/u,rn=/[\s\p{P}\p{S}]/u,rl=/[^\s\p{P}\p{S}]/u,ro=tZ(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,rn).getRegex(),rs=/(?!~)[\p{P}\p{S}]/u,ra=tZ(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",tW?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ri=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,rc=tZ(ri,"u").replace(/punct/g,rr).getRegex(),rd=tZ(ri,"u").replace(/punct/g,rs).getRegex(),ru="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",rp=tZ(ru,"gu").replace(/notPunctSpace/g,rl).replace(/punctSpace/g,rn).replace(/punct/g,rr).getRegex(),rh=tZ(ru,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,rs).getRegex(),rm=tZ("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,rl).replace(/punctSpace/g,rn).replace(/punct/g,rr).getRegex(),rf=tZ(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,rr).getRegex(),rg=tZ("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,rl).replace(/punctSpace/g,rn).replace(/punct/g,rr).getRegex(),rb=tZ(/\\(punct)/,"gu").replace(/punct/g,rr).getRegex(),rx=tZ(/^<(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(),rk=tZ(t3).replace("(?:-->|$)","-->").getRegex(),ry=tZ("^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",rk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),rw=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,rv=tZ(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",rw).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rj=tZ(/^!?\[(label)\]\[(ref)\]/).replace("label",rw).replace("ref",t0).getRegex(),rC=tZ(/^!?\[(ref)\](?:\[\])?/).replace("ref",t0).getRegex(),rN=tZ("reflink|nolink(?!\\()","g").replace("reflink",rj).replace("nolink",rC).getRegex(),r$=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,rS={_backpedal:tF,anyPunctuation:rb,autolink:rx,blockSkip:ra,br:rt,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:tF,delLDelim:tF,delRDelim:tF,emStrongLDelim:rc,emStrongRDelimAst:rp,emStrongRDelimUnd:rm,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:rv,nolink:rC,punctuation:ro,reflink:rj,reflinkSearch:rN,tag:ry,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:tF},rL={...rS,link:tZ(/^!?\[(label)\]\((.*?)\)/).replace("label",rw).getRegex(),reflink:tZ(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rw).getRegex()},rz={...rS,emStrongRDelimAst:rh,emStrongLDelim:rd,delLDelim:rf,delRDelim:rg,url:tZ(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",r$).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:tZ(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",r$).getRegex()},rM={...rz,br:tZ(rt).replace("{2,}","*").getRegex(),text:tZ(rz.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},rR={normal:t4,gfm:t8,pedantic:re},rA={normal:rS,gfm:rz,breaks:rM,pedantic:rL},rT={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},rI=e=>rT[e];function rP(e,t){if(t){if(tK.escapeTest.test(e))return e.replace(tK.escapeReplace,rI)}else if(tK.escapeTestNoEncode.test(e))return e.replace(tK.escapeReplaceNoEncode,rI);return e}function rE(e){try{e=encodeURI(e).replace(tK.percentDecode,"%")}catch{return null}return e}function rH(e,t){let r=e.replace(tK.findPipe,(e,t,r)=>{let n=!1,l=t;for(;--l>=0&&"\\"===r[l];)n=!n;return n?"|":" |"}).split(tK.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(tK.slashPipe,"|");return r}function rO(e,t,r){let n=e.length;if(0===n)return"";let l=0;for(;l<n;){let o=e.charAt(n-l-1);if(o!==t||r)if(o!==t&&r)l++;else break;else l++}return e.slice(0,n-l)}function r_(e,t,r,n,l){let o=t.href,s=t.title||null,a=e[1].replace(l.other.outputLinkReplace,"$1");n.state.inLink=!0;let i={type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:o,title:s,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,i}var rD=class{options;rules;lexer;constructor(e){this.options=e||tB}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:rO(e,`
23`)}}}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(`
24`).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(`
25`)}(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=rO(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:rO(t[0],`
26`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=rO(t[0],`
27`).split(`
28`),r="",n="",l=[];for(;e.length>0;){let t=!1,o=[],s;for(s=0;s<e.length;s++)if(this.rules.other.blockquoteStart.test(e[s]))o.push(e[s]),t=!0;else if(t)break;else o.push(e[s]);e=e.slice(s);let a=o.join(`
29`),i=a.replace(this.rules.other.blockquoteSetextReplace,`
30    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
31${a}`:a,n=n?`${n}
32${i}`:i;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(i,l,!0),this.lexer.state.top=c,
320===e.length)break;let d=l.at(-1);if(d?.type==="code")break;if(d?.type==="blockquote"){let t=d.raw+`
33`+e.join(`
34`),o=this.blockquote(t);l[l.length-1]=o,r=r.substring(0,r.length-d.raw.length)+o.raw,n=n.substring(0,n.length-d.text.length)+o.text;break}if(d?.type==="list"){let t=d.raw+`
35`+e.join(`
36`),o=this.list(t);l[l.length-1]=o,r=r.substring(0,r.length-d.raw.length)+o.raw,n=n.substring(0,n.length-d.raw.length)+o.raw,e=t.substring(l.at(-1).raw.length).split(`
37`);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 o=this.rules.other.listItemRegex(r),s=!1;for(;e;){let r=!1,n="",a="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let i=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(`
38`,1)[0],t[1].length),c=e.split(`
39`,1)[0],d=!i.trim(),u=0;if(this.options.pedantic?(u=2,a=i.trimStart()):d?u=t[1].length+1:(u=(u=i.search(this.rules.other.nonSpaceChar))>4?1:u,a=i.slice(u),u+=t[1].length),d&&this.rules.other.blankLine.test(c)&&(n+=c+`
40`,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),o=this.rules.other.headingBeginRegex(u),s=this.rules.other.htmlBeginRegex(u),p=this.rules.other.blockquoteBeginRegex(u);for(;e;){let h=e.split(`
41`,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)||o.test(c)||s.test(c)||p.test(c)||t.test(c)||r.test(c))break;if(m.search(this.rules.other.nonSpaceChar)>=u||!c.trim())a+=`
42`+m.slice(u);else{if(d||i.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||l.test(i)||o.test(i)||r.test(i))break;a+=`
43`+c}d=!c.trim(),n+=h+`
44`,e=e.substring(h.length+1),i=m.slice(u)}}l.loose||(s?l.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(s=!0)),l.items.push({type:"list_item",raw:n,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]}),l.raw+=n}let a=l.items.at(-1);if(!a)return;for(let e of(a.raw=a.raw.trimEnd(),a.text=a.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=>"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=rH(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
45`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let e of n)this.rules.other.tableAlignRight.test(e)?o.align.push("right"):this.rules.other.tableAlignCenter.test(e)?o.align.push("center"):this.rules.other.tableAlignLeft.test(e)?o.align.push("left"):o.align.push(null);for(let e=0;e<r.length;e++)o.header.push({text:r[e],tokens:this.lexer.inline(r[e]),header:!0,align:o.align[e]});for(let e of l)o.rows.push(rH(e,o.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]})));return o}}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)===`
46`?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=rO(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)),r_
46(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 r_(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,o,s=r,a=0,i="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;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]))continue;if(o=[...l].length,n[3]||n[4]){s+=o;continue}if((n[5]||n[6])&&r%3&&!((r+o)%3)){a+=o;continue}if((s-=o)>0)continue;o=Math.min(o,o+s+a);let t=[...n[0]][0].length,i=e.slice(0,r+n.index+t+o);if(Math.min(r,o)%2){let e=i.slice(1,-1);return{type:"em",raw:i,text:e,tokens:this.lexer.inlineTokens(e)}}let c=i.slice(2,-2);return{type:"strong",raw:i,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,o,s=r,a=this.rules.inline.delRDelim;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])||(o=[...l].length)!==r)continue;if(n[3]||n[4]){s+=o;continue}if((s-=o)>0)continue;o=Math.min(o,o+s);let t=[...n[0]][0].length,a=e.slice(0,r+n.index+t+o),i=a.slice(r,-r);return{type:"del",raw:a,text:i,tokens:this.lexer.inlineTokens(i)}}}}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}}}},rV=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||tB,this.options.tokenizer=this.options.tokenizer||new rD,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:tK,block:rR.normal,inline:rA.normal};this.options.pedantic?(t.block=rR.pedantic,t.inline=rA.pedantic):this.options.gfm&&(t.block=rR.gfm,this.options.breaks?t.inline=rA.breaks:t.inline=rA.gfm),this.tokenizer.rules=t}static get rules(){return{block:rR,inline:rA}}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(tK.carriageReturn,`
47`),this.blockTokens(e,this.tokens);for(let e=0;e<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(tK.tabCharGlobal,"    ").replace(tK.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+=`
48`: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(`
49`)?"":`
50`)+n.raw,r.text+=`
51`+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(`
52`)?"":`
53`)+n.raw,r.text+=`
54`+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}
54,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 o=t.at(-1);r&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
55`)?"":`
56`)+n.raw,o.text+=`
57`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.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(`
58`)?"":`
59`)+n.raw,r.text+=`
60`+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 o=!1,s="";for(;e;){let r;if(o||(s=""),o=!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,s))||(r=this.tokenizer.codespan(e))||(r=this.tokenizer.br(e))||(r=this.tokenizer.del(e,n,s))||(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)&&(s=r.raw.slice(-1)),o=!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}},rq=class{options;parser;constructor(e){this.options=e||tB}space(e){return""}code({text:e,lang:t,escaped:r}){let n=(t||"").match(tK.notSpaceStart)?.[0],l=e.replace(tK.endingNewline,"")+`
61`;return n?'<pre><code class="language-'+rP(n)+'">'+(r?l:rP(l,!0))+`</code></pre>
62`:"<pre><code>"+(r?l:rP(l,!0))+`</code></pre>
63`}blockquote({tokens:e}){return`<blockquote>
64${this.parser.parse(e)}</blockquote>
65`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
66`}hr(e){return`<hr>
67`}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+'"':"")+`>
68`+n+"</"+l+`>
69`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
70`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
71`}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>
72<thead>
73`+t+`</thead>
74`+n+`</table>
75`}tablerow({text:e}){return`<tr>
76${e}</tr>
77`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
78`}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>${rP(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=rE(e);if(null===l)return n;let o='<a href="'+(e=l)+'"';return t&&(o+=' title="'+rP(t)+'"'),o+=">"+n+"</a>"}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let l=rE(e);if(null===l)return rP(r);e=l;let o=`<img src="${e}" alt="${rP(r)}"`;return t&&(o+=` title="${rP(t)}"`),o+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:rP(e.text)}},rB=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}},rF=class e{options;renderer;textRenderer;constructor(e){this.options=e||tB,this.options.renderer=this.options.renderer||new rq,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new rB}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
78ype)){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}},rZ=class{options;block;constructor(e){this.options=e||tB}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(){return this.block?rV.lex:rV.lexInline}provideParser(){return this.block?rF.parse:rF.parseInline}},rW=new class{defaults=tq();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=rF;Renderer=rq;TextRenderer=rB;Lexer=rV;Tokenizer=rD;Hooks=rZ;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 rq(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 rD(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 rZ;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];rZ.passThroughHooks.has(r)?t[r]=e=>{if(this.defaults.async&&rZ.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await n.call(t,e);return l.call(t,r)})();let o=n.call(t,e);return l.call(t,o)}: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 rV.lex(e,t??this.defaults)}parser(e,t){return rF.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},l={...this.defaults,...n},o=this.onError(!!l.silent,!!l.async);if(!0===this.defaults.async&&!1===n.async)return o(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 o(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return o(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?rV.lex:rV.lexInline)(r,l),o=l.hooks?await l.hooks.processAllTokens(n):n;l.walkTokens&&await Promise.all(this.walkTokens(o,l.walkTokens));let s=await (l.hooks?await l.hooks.provideParser():e?rF.parse:rF.parseInline)(o,l);return l.hooks?await l.hooks.postprocess(s):s})().catch(o);try{l.hooks&&(t=l.hooks.preprocess(t));let r=(l.hooks?l.hooks.provideLexer():e?rV.lex:rV.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?rF.parse:rF.parseInline)(r,l);return l.hooks&&(n=l.hooks.postprocess(n)),n}catch(e){return o(e)}}}onError(e,t){return r=>{if(r.message+=`
79Please report this to https://github.com/markedjs/marked.`,e){let e="<p>An error occurred:</p><pre>"+rP(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function rK(e,t){return rW.parse(e,t)}rK.options=rK.setOptions=function(e){return rW.setOptions(e),rK.defaults=rW.defaults,tB=rK.defaults,rK},rK.getDefaults=tq,rK.defaults=tB,rK.use=function(...e){return rW.use(...e),rK.defaults=rW.defaults,tB=rK.defaults,rK},rK.walkTokens=function(e,t){return rW.walkTokens(e,t)},rK.parseInline=rW.parseInline,rK.Parser=rF,rK.parser=rF.parse,rK.Renderer=rq,rK.TextRenderer=rB,rK.Lexer=rV,rK.lexer=rV.lex,rK.Tokenizer=rD,rK.Hooks=rZ,rK.parse=rK,rK.options,rK.setOptions,rK.use,rK.walkTokens,rK.parseInline,rF.parse,rV.lex;var rG=()=>"u"<typeof performance?Date.now():performance.now();function rU(e){var t,r;let n=null!=(t=null==e?void 0:e.now)?t:rG,l=null!=(r=null==e?void 0:e.maxBacklogMs)?r:320,o=0,s=0;return{now:n,beginPass(e){s=Math.min(Math.max(o,e),e+l)},mark:()=>s,rewind(e){s=e},take(e,t,r){if(e<=0)return{baseDelay:0,step:Math.max(0,t)};let n=Math.max(0,t),o=0===n?0:Math.min(n,4),a=Math.max(s,r),i=r+l,c=a+Math.max(0,e-1)*n,d=n;c>i&&e>
791&&(d=a<i?Math.max(o,(i-a)/(e-1)):o);let u=Math.max(0,Math.round(a-r));return s=a+e*d,{baseDelay:u,step:d}},commitPass(){o=s}}}var rQ=/\s/,rX=/^\s+$/,rJ=new Set(["pre","svg","math","annotation"]),rY=new Set(["img","hr"]),r0=e=>"object"==typeof e&&null!==e&&"type"in e&&"element"===e.type,r1=e=>e.some(e=>r0(e)&&rJ.has(e.tagName)),r5=new Set(["ul","ol","li"]),r2=e=>{for(let t of e.children)if(r0(t)){if("input"===t.tagName)return t;if(r5.has(t.tagName))continue;let e=r2(t);if(e)return e}},r3=(e,t,r,n)=>{null!=e.properties||(e.properties={}),e.properties["data-sd-animate"]=!0;let l="string"==typeof e.properties.style?`${e.properties.style};`:"";e.properties.style=`${l}--sd-animation:sd-${t.animation};--sd-duration:${r}ms;--sd-easing:${t.easing};--sd-delay:${Math.round(n)}ms`},r6=e=>{let t=[],r="",n=!1;for(let l of e){let e=rQ.test(l);if(e!==n&&r){if(e){r+=l,n=!0;continue}t.push(r),r=""}r+=l,n=e}return r&&t.push(r),t},r9=e=>{let t=[],r="";for(let n of e)rQ.test(n)?t.length>0&&!rX.test(t.at(-1))?t[t.length-1]+=n:r+=n:(r&&(t.push(r),r=""),t.push(n));return r&&(t.length>0?t[t.length-1]+=r:t.push(r)),t},r4=(e,t)=>!(e>0&&t<e),r7=e=>r0(e)&&rY.has(e.tagName),r8=0;function ne(e){var t,r,n,l,o;let s={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!=(o=null==e?void 0:e.stagger)?o:40,timeline:null==e?void 0:e.timeline},i={committedCharCount:0,prevContentLength:0,lastRenderCharCount:0,pendingMark:null},c=r8++,d=()=>e=>{var t,r;let n,l,o={count:0,newIndex:0};i.prevContentLength=i.committedCharCount;let c=s.timeline,d=null!=(t=null==c?void 0:c.now())?t:rG();c&&(null===i.pendingMark?i.pendingMark=c.mark():c.rewind(i.pendingMark));let u=c?c.take((r=i.prevContentLength,n=0,l=0,(0,a.visitParents)(e,e=>"text"===e.type||r7(e),(e,t)=>{if(r1(t))return a.SKIP;if(r7(e)){r4(r,l)&&(n+=1),l+=1;return}let o=e.value;if(!o.trim()){l+=o.length;return}for(let e of"char"===s.sep?r9(o):r6(o)){let t=l;l+=e.length,!rX.test(e)&&r4(r,t)&&(n+=1)}}),n),s.stagger,d):{baseDelay:0,step:s.stagger};(0,a.visitParents)(e,e=>"text"===e.type||r7(e),(e,t)=>{if("text"===e.type)return((e,t,r,n,l,o)=>{var s;let i=t.at(-1);if(!(i&&"children"in i))return;if(r1(t))return a.SKIP;let c=i.children.indexOf(e);if(-1===c)return;let d=e.value;if(!d.trim()){l.count+=d.length;return}let u="char"===r.sep?r9(d):r6(d),p=n.prevContentLength,h=!1,m=(e=>{for(let t=e.length-1;t>=0;t--){let r=e[t];if(r0(r)&&"li"===r.tagName)return r}})(t),f=!!(m&&!(null!=(s=m.properties)&&s["data-sd-animate-marker"])),g=!1,b=u.map(e=>{var t,n,s,a;let i,c=l.count;if(l.count+=e.length,rX.test(e))return{type:"text",value:e};let d=p>0&&c<p,u=d?0:o.baseDelay+l.newIndex++*o.step;if(h=!0,m&&f&&!g){let e,n,l=d?0:r.duration;t=r.easing,null!=m.properties||(m.properties={}),m.properties["data-sd-animate-marker"]=!0,e="string"==typeof m.properties.style?`${m.properties.style};`:"",m.properties.style=`${e}--sd-marker-duration:${l}ms;--sd-marker-delay:${Math.round(u)}ms;--sd-marker-easing:${t}`,(n=r2(m))&&r3(n,r,l,u),g=!0}return n=r.animation,s=r.duration,a=r.easing,i=`--sd-animation:sd-${n};--sd-duration:${d?0:s}ms;--sd-easing:${a}`,u&&(i+=`;--sd-delay:${Math.round(u)}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:i},children:[{type:"text",value:e}]}});return h&&(e=>{var t;for(let r=e.length-1;r>=0;r-=1){let n=e[r];if(r0(n)){if(null!=(t=n.properties)&&t["data-sd-animated"])break;n.properties={...n.properties,"data-sd-animated":!0}}}})(t),i.children.splice(c,1,...b),c+b.length})(e,t,s,i,o,u);((e,t,r,n,l,o)=>{if(r1(t))return;let s=n.prevContentLength,a=l.count;l.count+=1;let i=s>0&&a<s,c=i?0:o.baseDelay+l.newIndex++*o.step;r3(e,r,i?0:r.duration,c)})(e,t,s,i,o,u)}),i.lastRenderCharCount=o.count,i.prevContentLength=0};return Object.defineProperty(d,"name",{value:`rehypeAnimate$${c}`}),{name:"animate",type:"animate",rehypePlugin:d,setPrevContentLength(e){i.committedCharCount=e,i.prevContentLength=e},getLastRenderCharCount:()=>i.lastRenderCharCount,commit(){i.committedCharCount=i.lastRenderCharCount,i.pendingMark=null}}}ne();var nt=(0,s.createContext)(!1),nr=(...e)=>tI((0,eT.clsx)(e)),nn=(e,t,r)=>{let n="string"==typeof t&&r.startsWith("text/csv")?"\uFEFF":"",l="string"==typeof t?new Blob([n+t],{type:r}):t,o=URL.createObjectURL(l),s=document.createElement("a");s.href=o,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(o)},nl=(0,s.createContext)(nr),no=()=>(0,s.useContext)(nl),ns=e=>{if(void 0!==e&&0!==e&&e!==1/0){if("number"==typeof e)return Number.isFinite(e)&&e>0?`${e}px`:void 0;
79if("0"!==e&&"none"!==e&&"Infinity"!==e)return e}},na=(e,t,r)=>{let n=(0,s.useRef)(null),l=(0,s.useRef)(!0),o=(0,s.useRef)(!1);return(0,s.useEffect)(()=>{let e=n.current;if(!(e&&t))return;let r=()=>{l.current=e.scrollHeight-e.scrollTop-e.clientHeight<8};return e.addEventListener("scroll",r,{passive:!0}),()=>e.removeEventListener("scroll",r)},[t]),(0,s.useEffect)(()=>{e&&!o.current&&(l.current=!0),e||(l.current=!0),o.current=e},[e]),(0,s.useEffect)(()=>{let r=n.current;r&&t&&e&&l.current&&r.scrollTo({top:r.scrollHeight,behavior:"instant"})},[e,t,r]),n},ni=nr("block"),nc=nr("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"),nd=(0,s.memo)(({children:e,result:t,language:r,className:n,maxHeight:l,startLine:o,lineNumbers:a=!0,...i})=>{let c=no(),{isAnimating:d}=(0,s.useContext)(od),u=ns(l),p=na(d,!!u,t),h=(0,s.useMemo)(()=>c(nc),[c]),m=(0,s.useMemo)(()=>c(ni),[c]),f=(0,s.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,tP.jsx)("div",{className:c(n,u?"overflow-y-auto":null,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":r,"data-streamdown":"code-block-body",ref:p,style:u?{maxHeight:u}:void 0,...i,children:(0,tP.jsx)("pre",{className:c(n,"bg-[var(--sdm-bg,inherit)]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit))]"),style:f,children:(0,tP.jsx)("code",{className:a?c("[counter-increment:line_0] [counter-reset:line]"):void 0,style:a&&o&&o>1?{counterReset:`line ${o-1}`}:void 0,children:t.tokens.map((e,t)=>(0,tP.jsx)("span",{className:a?h:m,children:0===e.length||1===e.length&&""===e[0].content?`
80`: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,tP.jsx)("span",{className:c("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))})})})}),nu=({className:e,language:t,style:r,isIncomplete:n,...l})=>{let o=no();return(0,tP.jsx)("div",{className:o("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})},np=(0,s.createContext)({code:""}),nh=()=>(0,s.useContext)(np),nm=({language:e})=>{let t=no();return(0,tP.jsx)("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:(0,tP.jsx)("span",{className:t("ml-1 font-mono lowercase"),children:e})})},nf=(0,s.lazy)(()=>e.A(928619).then(e=>({default:e.HighlightedCodeBlockBody}))),ng=({code:e,language:t,className:r,children:n,isIncomplete:l=!1,startLine:o,lineNumbers:a,...i})=>{let c=no(),{codeBlockMaxHeight:d}=(0,s.useContext)(od),u=(0,s.useMemo)(()=>(e=>{let t=e.length;for(;t>0&&e[t-1]===`
81`;)t--;return e.slice(0,t)})(e),[e]),p=(0,s.useMemo)(()=>({bg:"transparent",fg:"inherit",tokens:u.split(`
82`).map(e=>[{content:e,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[u]);return(0,tP.jsx)(np.Provider,{value:{code:e},children:(0,tP.jsxs)(nu,{dir:"ltr",isIncomplete:l,language:t,children:[(0,tP.jsx)(nm,{language:t}),n?(0,tP.jsx)("div",{className:c("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:(0,tP.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,tP.jsx)(s.Suspense,{fallback:(0,tP.jsx)(nd,{className:r,language:t,lineNumbers:a,maxHeight:d,result:p,startLine:o,...i}),children:(0,tP.jsx)(nf,{className:r,code:u,language:t,lineNumbers:a,maxHeight:d,raw:p,startLine:o,...i})})]})})},nb={CheckIcon:e=>(0,tP.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tP.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,tP.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tP.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,tP.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tP.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.
8268342 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,tP.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tP.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,tP.jsxs)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[(0,tP.jsx)("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),(0,tP.jsx)("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),(0,tP.jsx)("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),(0,tP.jsx)("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),(0,tP.jsx)("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),(0,tP.jsx)("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),(0,tP.jsx)("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,tP.jsx)("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),(0,tP.jsx)("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),(0,tP.jsx)("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),Maximize2Icon:e=>(0,tP.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tP.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,tP.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tP.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,tP.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tP.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,tP.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tP.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,tP.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,tP.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"})})},nx=(0,s.createContext)(nb),nk=({icons:e,children:t})=>{let r=(0,s.useRef)(e),n=(0,s.useRef)(e?{...nb,...e}:nb);((e,t)=>
82{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?{...nb,...e}:nb);let l=n.current;return(0,tP.jsx)(nx.Provider,{value:l,children:t})},ny=()=>(0,s.useContext)(nx),nw={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",zoomIn:"Zoom in",zoomOut:"Zoom out",resetView:"Reset zoom and pan",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"},nv=(0,s.createContext)(nw),nj=()=>(0,s.useContext)(nv),nC=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:l,code:o,...a})=>{let i=no(),[c,d]=(0,s.useState)(!1),u=(0,s.useRef)(0),{code:p}=nh(),{isAnimating:h}=(0,s.useContext)(od),m=nj(),f=null!=o?o: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,s.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let b=ny(),x=c?b.CheckIcon:b.CopyIcon;return(0,tP.jsxs)(tP.Fragment,{children:[(0,tP.jsx)("button",{"aria-label":m.copyCode,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",...a,children:null!=n?n:(0,tP.jsx)(x,{"aria-hidden":"true",size:14})}),c&&(0,tP.jsx)("output",{"aria-live":"polite",className:"sr-only",children:m.copied})]})},nN=(e,t,r)=>{if("boolean"==typeof e)return r;let n=e[t];if("object"!=typeof n)return r;let l=n.download;return"object"!=typeof l?r:l.filename||r},n$={"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:o,...a}
82)=>{let i=no(),{code:c}=nh(),{isAnimating:d,controls:u}=(0,s.useContext)(od),p=nj(),h=ny(),m=null!=o?o:c,f=r&&r in n$?n$[r]:"txt",g=`${nN(u,"code","file")}.${f}`;return(0,tP.jsx)("button",{"aria-label":p.downloadFile,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{nn(g,m,"text/plain"),null==e||e()}catch(e){null==t||t(e)}},title:p.downloadFile,type:"button",...a,children:null!=n?n:(0,tP.jsx)(h.DownloadIcon,{size:14})})},nL=()=>{let{Loader2Icon:e}=ny(),t=no();return(0,tP.jsxs)("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[(0,tP.jsx)("div",{className:t("h-[46px] w-full bg-muted/80")}),(0,tP.jsx)("div",{className:t("flex w-full items-center justify-center p-4"),children:(0,tP.jsx)(e,{className:t("size-4 animate-spin")})})]})},nz=/\.[^/.]+$/,nM=({node:e,className:t,src:r,alt:n,onLoad:l,onError:o,showControls:a=!0,showDownloadControl:i=!0,...c})=>{let{DownloadIcon:d}=ny(),u=no(),p=(0,s.useRef)(null),[h,m]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),b=nj(),x=null!=c.width||null!=c.height,k=(h||x)&&!f&&a&&i,y=f&&!x;(0,s.useEffect)(()=>{let e=p.current;if(null!=e&&e.complete){let t=e.naturalWidth>0;m(t),g(!t)}},[]);let w=(0,s.useCallback)(e=>{m(!0),g(!1),null==l||l(e)},[l]),v=(0,s.useCallback)(e=>{m(!1),g(!0),null==o||o(e)},[o]),j=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(),o=t.includes(".")&&void 0!==l&&l.length<=4,s="";if(o)s=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"),s=`${(n||t||"image").replace(nz,"")}.${l}`}nn(s,e,e.type)}catch(e){window.open(r,"_blank")}};return r?(0,tP.jsxs)("div",{className:u("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[(0,tP.jsx)("img",{alt:n,className:u("max-w-full rounded-lg",y&&"hidden",t),"data-streamdown":"image",onError:v,onLoad:w,ref:p,src:r,...c}),y&&(0,tP.jsx)("span",{className:u("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:b.imageNotAvailable}),a&&(0,tP.jsx)("div",{className:u("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"),"data-streamdown":"image-overlay"}),k&&(0,tP.jsx)("button",{className:u("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:j,title:b.downloadImage,type:"button",children:(0,tP.jsx)(d,{size:14})})]}):null},nR=0,nA=()=>{1===(nR+=1)&&(document.body.style.overflow="hidden")},nT=()=>{0===(nR=Math.max(0,nR-1))&&(document.body.style.overflow="")},nI=({url:e,isOpen:t,onClose:r,onConfirm:n})=>{let{CheckIcon:l,CopyIcon:o,ExternalLinkIcon:a,XIcon:i}=ny(),c=no(),[d,u]=(0,s.useState)(!1),p=nj(),h=(0,s.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)}catch(e){}},[e]),m=(0,s.useCallback)(()=>{n(),r()},[n,r]);if((0,s.useEffect)(()=>{if(t){nA();let e=e=>{"Escape"===e.key&&r()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e),nT()}}},[t,r]),!t||"u"<typeof document)return null;let f=(0,tP.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,tP.jsxs)("div",{className:c("relative mx-4 flex w-full max-w-md flex-col gap-4 roun
82ded-xl border bg-background p-6 shadow-lg"),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:"presentation",children:[(0,tP.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,tP.jsx)(i,{size:16})}),(0,tP.jsxs)("div",{className:c("flex flex-col gap-2"),children:[(0,tP.jsxs)("div",{className:c("flex items-center gap-2 font-semibold text-lg"),children:[(0,tP.jsx)(a,{size:20}),(0,tP.jsx)("span",{children:p.openExternalLink})]}),(0,tP.jsx)("p",{className:c("text-muted-foreground text-sm"),children:p.externalLinkWarning})]}),(0,tP.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,tP.jsxs)("div",{className:c("flex gap-2"),children:[(0,tP.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,tP.jsxs)(tP.Fragment,{children:[(0,tP.jsx)(l,{size:14}),(0,tP.jsx)("span",{children:p.copied})]}):(0,tP.jsxs)(tP.Fragment,{children:[(0,tP.jsx)(o,{size:14}),(0,tP.jsx)("span",{children:p.copyLink})]})}),(0,tP.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,tP.jsx)(a,{size:14}),(0,tP.jsx)("span",{children:p.openLink})]})]})]})});return(0,tE.createPortal)(f,document.body)},nP=(0,s.createContext)(null),nE=()=>(0,s.useContext)(nP),nH=()=>{var e;let t=nE();return null!=(e=null==t?void 0:t.mermaid)?e:null},nO=({chart:e,children:t,className:r,onDownload:n,config:l,onError:o})=>{let a=no(),[i,c]=(0,s.useState)(!1),d=(0,s.useRef)(null),{isAnimating:u,controls:p}=(0,s.useContext)(od),h=ny(),m=nH(),f=nj(),g=nN(p,"mermaid","diagram"),b=async t=>{try{if("mmd"===t){let r=`${g}.mmd`;nn(r,e,"text/plain"),c(!1),null==n||n(t);return}if(!m){null==o||o(Error("Mermaid plugin not available"));return}let s=m.getMermaid(l),a=e.split("").reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),i=`mermaid-${Math.abs(a)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:d}=await s.render(i,e);if(!d){null==o||o(Error("SVG not found. Please wait for the diagram to render."));return}let u=(e=>{if("u"<typeof DOMParser||"u"<typeof XMLSerializer)return e;let t=new DOMParser().parseFromString(e,"text/html").querySelector("svg");return t?new XMLSerializer().serializeToString(t):e})(d);if("svg"===t){let e=`${g}.svg`;nn(e,u,"image/svg+xml"),c(!1),null==n||n(t);return}if("png"===t){var r;let e=await (r=u,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,o=5*l.height;r.width=n,r.height=o;let s=r.getContext("2d");s?(s.drawImage(l,0,0,n,o),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}));nn(`${g}.png`,e,"image/png"),null==n||n(t),c(!1);return}}catch(e){null==o||o(e)}};return(0,s.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,tP.jsxs)("div",{className:a("relative"),ref:d,children:[(0,tP.jsx)("button",{"aria-label":f.downloadDiagram,className:a("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:f.downloadDiagram,type:"button",children:null!=t?t:(0,tP.jsx)(h.DownloadIcon,{"aria-hidden":"true",size:14})}),i?(0,tP.jsxs)("div",{className:a("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,tP.jsx)("button",{"aria-label":f.downloadDiagramAsSvg,className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("svg"),title:f.downloadDiagramAsSvg,type:"button",children:f.mermaidFormatSvg}),(0,tP.jsx)("button",{"aria-label":f.downloadDiagramAsPng,className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("png"),title:f.downloadDiagramAsPng,type:"button",children:f.mermaidFormatPng}),(0,tP.jsx)("button",{"aria-label":f.downloadDiagramAsMmd,className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("mmd"),title:f.downloadDiagramAsMmd,type:"button",children:f.mermaidFormatMmd})]}):null]})},n_=({chart:e,config:t,onFullscreen:r,onExit:n,className:l,...o})=>{let{Maximize2Icon:a,XIcon:i}
82=ny(),c=no(),[d,u]=(0,s.useState)(!1),{isAnimating:p,controls:h}=(0,s.useContext)(od),m=nj(),f=(()=>{if("boolean"==typeof h)return h;let e=h.mermaid;return!1!==e&&(!0===e||void 0===e||!1!==e.panZoom)})(),g=(()=>{if("boolean"==typeof h)return h;let e=h.mermaid;return!1!==e&&(!0===e||void 0===e||!1!==e.download)})(),b=(()=>{if("boolean"==typeof h)return h;let e=h.mermaid;return!1!==e&&(!0===e||void 0===e||!1!==e.copy)})(),x=()=>{u(!d)};return(0,s.useEffect)(()=>{if(d){nA();let e=e=>{"Escape"===e.key&&u(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e),nT()}}},[d]),(0,s.useEffect)(()=>{d?null==r||r():n&&n()},[d,r,n]),(0,tP.jsxs)(tP.Fragment,{children:[(0,tP.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:x,title:m.viewFullscreen,type:"button",...o,"aria-label":m.viewFullscreen,children:(0,tP.jsx)(a,{"aria-hidden":"true",size:14})}),d?(0,tE.createPortal)((0,tP.jsxs)("div",{"aria-label":m.viewFullscreen,"aria-modal":"true",className:c("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),"data-streamdown":"mermaid-fullscreen",onClick:x,onKeyDown:e=>{"Escape"===e.key&&x()},role:"dialog",children:[(0,tP.jsxs)("div",{className:c("absolute top-4 right-4 z-10 flex items-center gap-1"),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:"presentation",children:[g?(0,tP.jsx)(nO,{chart:e,config:t}):null,b?(0,tP.jsx)(nC,{code:e}):null,(0,tP.jsx)("button",{"aria-label":m.exitFullscreen,className:c("rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:x,title:m.exitFullscreen,type:"button",children:(0,tP.jsx)(i,{"aria-hidden":"true",size:20})})]}),(0,tP.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,tP.jsx)(om,{chart:e,className:c("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:f})})]}),document.body):null]})};function nD(e){var t;return e.nodeType===Node.TEXT_NODE?null!=(t=e.textContent)?t:"":e.nodeType!==Node.ELEMENT_NODE?"":"BR"===e.tagName?`
83`:Array.from(e.childNodes).map(nD).join("")}var nV=e=>{let t=[],r=[];for(let r of e.querySelectorAll("thead th"))t.push(nD(r).trim());for(let t of e.querySelectorAll("tbody tr")){let e=[];
83for(let r of t.querySelectorAll("td"))e.push(nD(r).trim());r.push(e)}return{headers:t,rows:r}},nq=e=>{var t;if("object"!=typeof e)return",";let r=e.table;return"object"!=typeof r?",":null!=(t=r.csvSeparator)?t:","},nB=(e,t=",")=>{let r;r="auto"===t?Intl.NumberFormat().format(1.1).includes(",")?";":",":t;let{headers:n,rows:l}=e,o=e=>{let t=!1;for(let n of e)if(n===r||'"'===n||n===`
84`||"\r"===n){t=!0;break}return t?`"${e.replace(/"/g,'""')}"`:e},s=Array(n.length>0?l.length+1:l.length),a=0;for(let e of(n.length>0&&(s[a]=n.map(o).join(r),a+=1),l))s[a]=e.map(o).join(r),a+=1;return s.join(`
85`)},nF=e=>{let t=!1;for(let r of e)if("\\"===r||"|"===r||r===`
86`){t=!0;break}if(!t)return e;let r=[];for(let t of e)"\\"===t?r.push("\\\\"):"|"===t?r.push("\\|"):t===`
87`?r.push("<br>"):r.push(t);return r.join("")},nZ=e=>{let{headers:t,rows:r}=e;if(0===t.length)return"";let n=Array(r.length+2),l=0,o=t.map(e=>nF(e));n[l]=`| ${o.join(" | ")} |`,l+=1;let s=Array(t.length);for(let e=0;e<t.length;e+=1)s[e]="---";for(let e of(n[l]=`| ${s.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?nF(e[n]):"";n[l]=`| ${r.join(" | ")} |`,l+=1}else{let t=e.map(e=>nF(e));n[l]=`| ${t.join(" | ")} |`,l+=1}return n.join(`
88`)},nW=({children:e,className:t,onCopy:r,onError:n,timeout:l=2e3})=>{let o=no(),[a,i]=(0,s.useState)(!1),[c,d]=(0,s.useState)(!1),u=(0,s.useRef)(null),p=(0,s.useRef)(0),{isAnimating:h,controls:m}=(0,s.useContext)(od),f=nj(),g=nq(m),b=async e=>{var t,o;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==(o=u.current)?void 0:o.closest('[data-streamdown="table-wrapper"]'),s=null==t?void 0:t.querySelector("table");if(!s){null==n||n(Error("Table not found"));return}let a=nV(s),c="";c="csv"===e?nB(a,g):"tsv"===e?(e=>{let{headers:t,rows:r}=e,n=e=>{let t=!1;for(let r of e)if("	"===r||r===`
89`||"\r"===r){t=!0;break}if(!t)return e;let r=[];for(let t of e)"	"===t?r.push("\\t"):t===`
90`?r.push("\\n"):"\r"===t?r.push("\\r"):r.push(t);return r.join("")},l=Array(t.length>0?r.length+1:r.length),o=0;for(let e of(t.length>0&&(l[o]=t.map(n).join("	"),o+=1),r))l[o]=e.map(n).join("	"),o+=1;return l.join(`
91`)})(a):nZ(a);let h=new ClipboardItem({"text/plain":new Blob([c],{type:"text/plain"}),"text/html":new Blob([s.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,s.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 x=ny(),k=c?x.CheckIcon:x.CopyIcon;return(0,tP.jsxs)("div",{className:o("relative"),ref:u,children:[(0,tP.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:h,onClick:()=>i(!a),title:f.copyTable,type:"button",children:null!=e?e:(0,tP.jsx)(k,{height:14,width:14})}),a?(0,tP.jsxs)("div",{className:o("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,tP.jsx)("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("md"),title:f.copyTableAsMarkdown,type:"button",children:f.tableFormatMarkdown}),(0,tP.jsx)("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("csv"),title:f.copyTableAsCsv,type:"button",children:f.tableFormatCsv}),(0,tP.jsx)("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("tsv"),title:f.copyTableAsTsv,type:"button",children:f.tableFormatTsv})]}):null]})},nK=({children:e,className:t,onDownload:r,onError:n})=>{let l=no(),[o,a]=(0,s.useState)(!1),i=(0,s.useRef)(null),{isAnimating:c,controls:d}=(0,s.useContext)(od),u=nj(),p=ny(),h=nq(d),m=e=>{var t;try{let l=null==(t=i.current)?void 0:t.closest('[data-streamdown="table-wrapper"]'),o=null==l?void 0:l.querySelector("table");if(!o){null==n||n(Error("Table not found"));return}let s=nV(o),c="csv"===e?nB(s,h):nZ(s),u=`${nN(d,"table","table")}.${"csv"===e?"csv":"md"}`;nn(u,c,"csv"===e?"text/csv":"text/markdown"),a(!1),null==r||r(e)}catch(e){null==n||n(e)}};return(0,s.useEffect)(()=>{let e=e=>{let t=e.composedPath();i.current&&!t.includes(i.current)&&a(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,tP.jsxs)("div",{className:l("relative"),ref:i,children:[(0,tP.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:()=>a(!o),title:u.downloadTable,type:"button",children:null!=e?e:(0,tP.jsx)(p.DownloadIcon,{size:14})}),o?(0,tP.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,tP.jsx)("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("csv"),title:u.downloadTableAsCsv,type:"button",children:u.tableFormatCsv}),(0,tP.jsx)("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>
91m("markdown"),title:u.downloadTableAsMarkdown,type:"button",children:u.tableFormatMarkdown})]}):null]})},nG=({children:e,className:t,showCopy:r=!0,showDownload:n=!0})=>{let{Maximize2Icon:l,XIcon:o}=ny(),a=no(),[i,c]=(0,s.useState)(!1),{isAnimating:d}=(0,s.useContext)(od),u=nj(),p=()=>{c(!1)};return(0,s.useEffect)(()=>{if(i){nA();let e=e=>{"Escape"===e.key&&c(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e),nT()}}},[i]),(0,tP.jsxs)(tP.Fragment,{children:[(0,tP.jsx)("button",{className:a("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,tP.jsx)(l,{size:14})}),i?(0,tE.createPortal)((0,tP.jsx)("div",{"aria-label":u.viewFullscreen,"aria-modal":"true",className:a("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,tP.jsxs)("div",{className:a("flex h-full flex-col"),"data-streamdown":"table-wrapper",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:"presentation",children:[(0,tP.jsxs)("div",{className:a("flex items-center justify-end gap-1 p-4"),children:[r?(0,tP.jsx)(nW,{}):null,n?(0,tP.jsx)(nK,{}):null,(0,tP.jsx)("button",{className:a("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:p,title:u.exitFullscreen,type:"button",children:(0,tP.jsx)(o,{size:20})})]}),(0,tP.jsx)("div",{className:a("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:(0,tP.jsx)("table",{className:a("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},nU=({children:e,className:t,maxHeight:r,showControls:n,showCopy:l=!0,showDownload:o=!0,showFullscreen:a=!0,...i})=>{let c=no(),{isAnimating:d}=(0,s.useContext)(od),u=ns(r),p=na(d,!!u,e),h=n&&l,m=n&&o,f=n&&a,g=h||m||f;return(0,tP.jsxs)("div",{className:c("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[g?(0,tP.jsxs)("div",{className:c("flex items-center justify-end gap-1"),children:[h?(0,tP.jsx)(nW,{}):null,m?(0,tP.jsx)(nK,{}):null,f?(0,tP.jsx)(nG,{showCopy:h,showDownload:m,children:e}):null]}):null,(0,tP.jsx)("div",{className:c("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),ref:p,style:u?{maxHeight:u}:void 0,children:(0,tP.jsx)("table",{className:c("w-full divide-y divide-border",t),"data-streamdown":"table",...i,children:e})})]})},nQ=/startLine=(\d+)/,nX=/\bnoLineNumbers\b/,nJ=(0,s.lazy)(()=>e.A(939355).then(e=>({default:e.Mermaid}))),nY=/language-([^\s]+)/;function n0(e,t){let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n of r)if("node"!==n&&!Object.is(e[n],t[n]))return!1;return!0}var n1=(e,t)=>"boolean"==typeof e?e:!1!==e[t],n5=(e,t)=>{if("boolean"==typeof e)return e;let r=e.table;return!1!==r&&(!0===r||void 0===r||!1!==r[t])},n2=(e,t)=>{if("boolean"==typeof e)return e;let r=e.code;return!1!==r&&(!0===r||void 0===r||!1!==r[t])},n3=(e,t)=>{if("boolean"==typeof e)return e;let r=e.mermaid;return!1!==r&&(!0===r||void 0===r||!1!==r[t])},n6=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("ol",{className:l("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e})},(e,t)=>n0(e,t));n6.displayName="MarkdownOl";var n9=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("li",{className:l("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:e})},(e,t)=>n0(e,t));n9.displayName="MarkdownLi";var n4=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("ul",{className:l("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e})},(e,t)=>n0(e,t));n4.displayName="MarkdownUl";var n7=(0,s.memo)(({className:e,node:t,...r})=>{let n=no();return(0,tP.jsx)("hr",{className:n("my-6 border-border",e),"data-streamdown":"horizontal-rule",...r})},(e,t)=>n0(e,t));n7.displayName="MarkdownHr";var n8=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("span",{className:l("font-semibold",t),"data-streamdown":"strong",...n,children:e})},(e,t)=>n0(e,t));n8.displayName="MarkdownStrong";var le=(0,s.memo)(({children:e,className:t,href:r,node:n,...l})=>{let o=no(),{linkSafety:a}
91=(0,s.useContext)(od),[i,c]=(0,s.useState)(!1),d="streamdown:incomplete-link"===r,u=(0,s.useCallback)(async e=>{if(!(!(null!=a&&a.enabled&&r)||d)){if(e.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(r))return void window.open(r,"_blank","noreferrer");c(!0)}},[a,r,d]),p=(0,s.useCallback)(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),h={url:null!=r?r:"",isOpen:i,onClose:(0,s.useCallback)(()=>{c(!1)},[]),onConfirm:p};return null!=a&&a.enabled&&r?(0,tP.jsxs)(tP.Fragment,{children:[(0,tP.jsx)("button",{className:o("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":d,"data-streamdown":"link",onClick:u,type:"button",children:e}),a.renderModal?a.renderModal(h):(0,tP.jsx)(nI,{...h})]}):(0,tP.jsx)("a",{className:o("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)=>n0(e,t));le.displayName="MarkdownA";var lt=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("h1",{className:l("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e})},(e,t)=>n0(e,t));lt.displayName="MarkdownH1";var lr=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("h2",{className:l("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e})},(e,t)=>n0(e,t));lr.displayName="MarkdownH2";var ln=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("h3",{className:l("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e})},(e,t)=>n0(e,t));ln.displayName="MarkdownH3";var ll=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("h4",{className:l("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e})},(e,t)=>n0(e,t));ll.displayName="MarkdownH4";var lo=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("h5",{className:l("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e})},(e,t)=>n0(e,t));lo.displayName="MarkdownH5";var ls=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("h6",{className:l("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e})},(e,t)=>n0(e,t));ls.displayName="MarkdownH6";var la=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let{controls:l,tableMaxHeight:o}=(0,s.useContext)(od),a=n1(l,"table"),i=n5(l,"copy"),c=n5(l,"download"),d=n5(l,"fullscreen");return(0,tP.jsx)(nU,{className:t,maxHeight:o,showControls:a,showCopy:i,showDownload:c,show
91Fullscreen:d,...n,children:e})},(e,t)=>n0(e,t));la.displayName="MarkdownTable";var li=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("thead",{className:l("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e})},(e,t)=>n0(e,t));li.displayName="MarkdownThead";var lc=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("tbody",{className:l("divide-y divide-border",t),"data-streamdown":"table-body",...n,children:e})},(e,t)=>n0(e,t));lc.displayName="MarkdownTbody";var ld=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("tr",{className:l("border-border",t),"data-streamdown":"table-row",...n,children:e})},(e,t)=>n0(e,t));ld.displayName="MarkdownTr";var lu=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.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)=>n0(e,t));lu.displayName="MarkdownTh";var lp=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("td",{className:l("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e})},(e,t)=>n0(e,t));lp.displayName="MarkdownTd";var lh=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.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)=>n0(e,t));lh.displayName="MarkdownBlockquote";var lm=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("sup",{className:l("text-sm",t),"data-streamdown":"superscript",...n,children:e})},(e,t)=>n0(e,t));lm.displayName="MarkdownSup";var lf=(0,s.memo)(({children:e,className:t,node:r,...n})=>{let l=no();return(0,tP.jsx)("sub",{className:l("text-sm",t),"data-streamdown":"subscript",...n,children:e})},(e,t)=>n0(e,t));lf.displayName="MarkdownSub";var lg=(0,s.memo)(({children:e,className:t,node:r,...n})=>{if("data-footnotes"in n){let r=Array.isArray(e)?e.map(e=>{if(!(0,s.isValidElement)(e))return e;if(e.type===n6){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!(e=>{var t,r;if(!(0,s.isValidElement)(e))return!1;let n=Array.isArray(e.props.children)?e.props.children:[e.props.children],l=!1,o=!1;for(let e of n)if(e){if("string"==typeof e)""!==e.trim()&&(l=!0);else if((0,s.isValidElement)(e)){if((null==(t=e.props)?void 0:t["data-footnote-backref"])!==void 0)o=!0;else for(let t of Array.isArray(e.props.children)?e.props.children:[e.props.children])if("string"==typeof t&&""!==t.trim()||(0,s.isValidElement)(t)&&(null==(r=t.props)?void 0:r["data-footnote-backref"])===void 0){l=!0;break}}}return o&&!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,tP.jsx)("section",{className:t,...n,children:r}):null}return(0,tP.jsx)("section",{className:t,...n,children:e})},(e,t)=>n0(e,t));lg.displayName="MarkdownSection";var lb=(0,s.memo)(({node:e,className:t,children:r,...n})=>{var l,o,a;let i,c=no(),d=!("data-block"in n),{mermaid:u,controls:p,lineNumbers:h}=(0,s.useContext)(od),m=nH(),f=(0,s.useContext)(nt),g=null==t?void 0:t.match(nY),b=null!=(l=null==g?void 0:g.at(1))?l:"",x=null!=(i=nE())&&i.renderers&&b&&null!=(a=i.renderers.find(e=>Array.isArray(e.language)?e.language.includes(b):e.language===b))?a:null;if(d)return(0,tP.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==(o=null==e?void 0:e.properties)?void 0:o.metastring,y=null==k?void 0:k.match(nQ),w=y?Number.parseInt(y[1],10):void 0,v=!(k&&nX.test(k))&&!1!==h,j="";if((0,s.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,tP.jsx)(s.Suspense,{fallback:(0,tP.jsx)(nL,{}),children:(0,tP.jsx)(e,{code:j,isIncomplete:f,language:b,meta:k})})}if("mermaid"===b&&m){let e=n1(p,"mermaid"),r=n3(p,"download"),n=n3(p,"copy"),l=n3(p,"fullscreen"),o=n3(p,"panZoom");return(0,tP.jsx)(s.Suspense,{fallback:(0,tP.jsx)(nL,{}),children:(0,tP.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,tP.jsx)("div",{className:c("flex h-8 items-center text-muted-foreground text-xs"),children:(0,tP.jsx)("span",{className:c("ml-1 font-mono lowercase"),children:"mermaid"})}),e&&(r||n||l)?(0,tP.jsx)("div",{className:c("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:(0,tP.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,tP.jsx)(nO,{chart:j,config:null==u?void 0:u.config}):null,n?(0,tP.jsx)(nC,{code:j}):null,l?(0,tP.jsx)(n_,{chart:j,config:null==u?void 0:u.config}):null]})}):null,(0,tP.jsx)("div",{className:c("rounded-md border border-border bg-background"),children:(0,tP.jsx)(nJ,{chart:j,config:null==u?void 0:u.config,showControls:o})})]})})}let C=n1(p,"code"),N=n2(p,"download"),$=n2(p,"copy"),{"data-block":S,...L}=n;return(0,tP.jsx)(ng,{className:t,code:j,isIncomplete:f,language:b,lineNumbers:v,startLine:void 0!==w&&w>=1?w:void 0,...L,children:C?(0,tP.jsxs)(tP.Fragment,{children:[N?(0,tP.jsx)(nS,{code:j,language:b}):null,$?(0,tP.jsx)(nC,{}):null]}):null})},(e,t)=>{var r,n,l,o;return n0(e,t)&&(r=e.node,n=t.node,(null==(l=null==r?void 0:r.properties)?void 0:l.metastring)===(null==(o=null==n?void 0:n.properties)?void 0:o.metastring))});
91lb.displayName="MarkdownCode";var lx=(0,s.memo)(({node:e,className:t,...r})=>{let{controls:n}=(0,s.useContext)(od),l=n1(n,"image"),o=l&&((e,t)=>{if("boolean"==typeof e)return e;let r=e.image;return!1!==r&&(!0===r||void 0===r||!1!==r[t])})(n,"download");return(0,tP.jsx)(nM,{className:t,node:e,showControls:l,showDownloadControl:o,...r})},(e,t)=>n0(e,t));lx.displayName="MarkdownImg";var lk=(0,s.memo)(({children:e,node:t,...r})=>{let n=(Array.isArray(e)?e:[e]).filter(e=>null!=e&&""!==e);if(1===n.length&&(0,s.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,tP.jsx)(tP.Fragment,{children:e})}return(0,tP.jsx)("p",{...r,children:e})},(e,t)=>n0(e,t));lk.displayName="MarkdownParagraph";var ly={ol:n6,li:n9,ul:n4,hr:n7,strong:n8,a:le,h1:lt,h2:lr,h3:ln,h4:ll,h5:lo,h6:ls,table:la,thead:li,tbody:lc,tr:ld,th:lu,td:lp,blockquote:lh,code:lb,img:lx,pre:({children:e})=>(0,s.isValidElement)(e)?(0,s.cloneElement)(e,{"data-block":"true"}):e,sup:lm,sub:lf,p:lk,section:lg},lw=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,lv=/\p{L}/u;function lj(e){let t=e.replace(/(```|~~~)[\s\S]*?\1/g,"").replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,""),r,n=0,l=0;for(let e of t){if(lw.test(e)){null!=r||(r="rtl"),l+=1;continue}lv.test(e)&&(null!=r||(r="ltr"),n+=1)}return l>n?"rtl":n>l?"ltr":null!=r?r:"ltr"}var lC=/^[ \t]{0,3}(`{3,}|~{3,})/,lN=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,l$=e=>{let t=e.split(`
92`),r=null,n=0;for(let e of t){let t=lC.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],o=e.length;l===r&&o>=n&&(r=null,n=0)}}return null!==r},lS=()=>e=>{(0,i.visit)(e,"html",(e,t,r)=>{r&&"number"==typeof t&&(r.children[t]={type:"text",value:e.value})})},lL=[],lz={allowDangerousHtml:!0},lM=new WeakMap,lR=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 o=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=lM.get(e);r||(r=e.name,lM.set(e,r)),t+=r}else t+=String(e);t+=":",t+=JSON.stringify(r)}else if("function"==typeof n){let e=lM.get(n);e||(e=n.name,lM.set(n,e)),t+=e}else t+=String(n)}return t},s=o(r),a=o(n),i=l?JSON.stringify(l):"",c=`${a}::${s}::${i}`;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()}},lA=e=>{let t=lT(e),r=e.children||"";return lE(t.runSync(t.parse(r),r),e)},lT=e=>{let t=lR.get(e);if(t)return t;let r=lI(e);return lR.set(e,r),r},lI=e=>{let t=e.rehypePlugins||lL,r=e.remarkPlugins||lL,n=t.some(e=>Array.isArray(e)?e[0]===b.default:e===b.default)?r:[...r,lS],l=e.remarkRehypeOptions?{...lz,...e.remarkRehypeOptions}:lz;return(0,tV.unified)().use(t_.default).use(n).use(tD.default,l).use(t)},lP=e=>e,lE=(e,t)=>{let{allowElement:r,allowedElements:n,disallowedElements:l,skipHtml:o,unwrapDisallowed:s,urlTransform:a}=t;if(r||n||l||o||a){let t=a||lP;(0,i.visit)(e,(e,a,i)=>{var c;let d;return"raw"===e.type&&i&&"number"==typeof a?(c=e.value,o?i.children.splice(a,1):i.children[a]={type:"text",value:c},a):"element"===e.type&&(((e,t)=>{var r;for(let n in tO.urlAttributes)if(Object.hasOwn(tO.urlAttributes,n)&&Object.hasOwn(e.properties,n)){let l=e.properties[n],o=tO.urlAttributes[n];(null===o||o.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 a&&(d=!r(e,a,i)),d&&i&&"number"==typeof a)?(s&&e.children?i.children.splice(a,1,...e.children):i.children.splice(a,1),a):void 0})}return(0,tH.toJsxRuntime)(e,{Fragment:tP.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:tP.jsx,jsxs:tP.jsxs,passKeys:!0,passNode:!0})},lH=/\[\^[\w-]{1,200}\](?!:)/,lO=/\[\^[\w-]{1,200}\]:/,l_=/<([A-Za-z][\w:-]*)[\s>/]/,lD=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),lV=new Map,lq=new Map,lB=(e,t)=>{if(lD.has(t.toLowerCase()))return 0;let r=e.match((e=>{let t=e.toLowerCase(),r=lV.get(t);if(r)return r;let n=RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return lV.set(t,n),n})(t));if(!r)return 0;let n=0;for(let e of r)e.trimEnd().endsWith("/>")||(n+=1);return n},lF=(e,t)=>{let r=e.match((e=>{let t=e.toLowerCase(),r=lq.get(t);if(r)return r;let n=RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return lq.set(t,n),n})(t));return r?r.length:0},lZ=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},lW=e=>{let t=lH.test(e),r=lO.test(e);
92if(t||r)return[e];let n=rV.lex(e,{gfm:!0}),l=[],o=[],s=!1;for(let e of n){let t=e.raw,r=l.length;if(o.length>0){l[r-1]+=t;let e=o.at(-1),n=lB(t,e),s=lF(t,e);for(let t=0;t<n;t+=1)o.push(e);for(let t=0;t<s;t+=1)o.length>0&&o.at(-1)===e&&o.pop();continue}if("html"===e.type&&e.block){let e=t.match(l_);if(e){let r=e[1];lB(t,r)>lF(t,r)&&o.push(r)}}if(r>0&&!s){let e=l[r-1];if(lZ(e)%2==1){l[r-1]=e+t;continue}}l.push(t),"space"!==e.type&&(s="code"===e.type)}return l},lK=/^\n*/,lG=/\n*$/,lU=/\n\n/g,lQ=(e,t,r)=>{if(!t.includes(`
93`))return e+t+r;let n=t.replace(lU,`
94<!---->
95`).replace(lK,`
96
97`).replace(lG,`
98
99`);return`${e}${n}${r}
100
101`},lX=(e,t)=>{let r=RegExp(`<(${t})(?=[\\s>/])([^>]*)>`,"gi"),n="",l=0,o=r.exec(e);for(;o;){let t=o[0],s=o[1],a=o.index+t.length,i=e.slice(a);if(RegExp(`</${s}\\s*>`,"i").test(i)){o=r.exec(e);continue}if(n+=e.slice(l,o.index),0===i.length){n+=t,l=a,o=r.exec(e);continue}if(i.startsWith(`
102
103`)){let r=i.slice(2).replace(lU,`
104<!---->
105`);n+=`${t}
106
107${r}`,l=e.length;break}if(!i.startsWith(`
108`)){n+=t,l=a,o=r.exec(e);continue}let c=i.slice(1);if(0===c.trim().length){n+=t,l=a,o=r.exec(e);continue}let d=c.replace(lU,`
109<!---->
110`);n+=`${t}
111
112${d}`,l=e.length;break}return 0===l?e:n+e.slice(l)},lJ=/([\\`*_~[\]|])/g,lY=e=>e.replace(lJ,"\\$1"),l0=new Set(["blockquote","dd","dt","figcaption","h1","h2","h3","h4","h5","h6","li","p","td","th"]),l1=new Set(["code","kbd","pre","samp","var"]);function l5(){return e=>{(0,i.visit)(e,"element",e=>{if(l1.has(e.tagName)){null!=e.properties||(e.properties={}),e.properties.dir="ltr";return}l0.has(e.tagName)&&(null!=e.properties||(e.properties={}),"string"!=typeof e.properties.dir&&(e.properties.dir=lj(function e(t){return t.children.map(t=>"text"===t.type?t.value:"element"!==t.type||l1.has(t.tagName)?"":e(t)).join("")}(e))))})}}var l2,l3,l6,l9,l4,l7=e=>"text"===e.type?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(l7).join(""):"",l8=e=>t=>{if(!e||0===e.length)return;let r=new Set(e.map(e=>e.toLowerCase()));(0,i.visit)(t,"element",e=>{if(r.has(e.tagName.toLowerCase())){let t=l7(e);e.children=t?[{type:"text",value:t}]:[]}})},oe=/^[ \t]*<[\w!/?-]/,ot=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,or={...w,clobberPrefix:"",protocols:{...w.protocols,href:[...null!=(l6=null==(l3=w.protocols)?void 0:l3.href)?l6:[],"tel","streamdown"]},attributes:{...w.attributes,code:[...null!=(l4=null==(l9=w.attributes)?void 0:l9.code)?l4:[],"metastring"]}},on={raw:b.default,sanitize:[z,or],harden:[function({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:r=[],allowDataImages:n=!1,allowedProtocols:l=[],blockedImageClass:o="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500",linkBlockPolicy:p=c,imageBlockPolicy:h=c}){let m=t.length&&!t.every(e=>"*"===e),b=r.length&&!r.every(e=>"*"===e);if(!e&&(m||b))throw Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{var m,b,x,k,y,w,v,j,C;let N,$=(m=e,b=t,x=r,k=n,y=l,w=o,v=s,j=p,C=h,N=(e,t,r)=>{if("element"!==e.type||e[g])return a.CONTINUE;if("a"===e.tagName){let n=f(e.properties.href,b,m,!1,!1,y);if(null!==n)return e.properties.href=n,e.properties.target="_blank",e.properties.rel="noopener noreferrer",a.CONTINUE;if(e[g]=!0,(0,i.visit)(e,N),r&&"number"==typeof t){let n=j===u?{type:"remove"}:j===d?{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:v},children:[...e.children,{type:"text",value:" [blocked]"}]}};if("remove"===n.type)return r.children.splice(t,1),[a.SKIP,t];r.children[t]=n.element}return a.SKIP}if("img"===e.tagName){let n=f(e.properties.src,x,m,k,!0,y);if(null===n){if(e[g]=!0,(0,i.visit)(e,N),r&&"number"==typeof t){let n=function(e,t,r){if(t===u)return{type:"remove"};if(t===d){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,C,w);if("remove"===n.type)return r.children.splice(t,1),[a.SKIP,t];r.children[t]=n.element}return a.SKIP}e.properties.src=n}return a.CONTINUE});(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)})(c),(0,i.visit)(c,$)}},{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},ol={gfm:[M.default,{}],codeMeta:()=>e=>{(0,i.visit)(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})})}},oo=Object.values(on),os=Object.values(ol),oa={block:" ▋",circle:" ●"},oi=["github-light","github-dark"],oc={enabled:!0},od=(0,s.createContext)({codeBlockMaxHeight:400,shikiTheme:oi,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:oc,tableMaxHeight:300}),ou=(0,s.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:r,index:n,isIncomplete:l,dir:o,animatePlugin:a,...i})=>{(0,s.useLayoutEffect)(()=>{null==a||a.commit()});let c="string"==typeof e&&r&&"string"==typeof e&&0!==e.length&&oe.test(e)?e.replace(ot,"$1"):e,d=(0,tP.jsx)(lA,{...i,children:c});return(0,tP.jsx)(nt.Provider,{value:l,children:o?(0,tP.jsx)("div",{dir:o,style:{display:"contents"},children:d}):d})},(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&&!!e.animatePlugin==!!t.animatePlugin});ou.displayName="Block";var op=(0,s.memo)(({children:e,mode:t="streaming",dir:r,parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:l=!1,components:o,rehypePlugins:a=oo,remarkPlugins:i=os,
112className:c,shikiTheme:d,mermaid:u,codeBlockMaxHeight:p=400,controls:h=!0,isAnimating:m=!1,tableMaxHeight:f=300,animated:g,BlockComponent:b=ou,parseMarkdownIntoBlocksFn:x=lW,caret:k,plugins:y,remend:w,linkSafety:v=oc,lineNumbers:j=!0,allowedTags:C,literalTagContent:N,translations:$,icons:S,prefix:L,onAnimationStart:M,onAnimationEnd:R,...I})=>{let P=(0,s.useId)(),E=(0,s.useMemo)(()=>L?(...e)=>((e,t)=>{if(!e||!t)return t;let r=`${e}:`;return t.split(/\s+/).filter(Boolean).map(t=>t.startsWith(r)?t:`${e}:${t}`).join(" ")})(L,tI((0,eT.clsx)(e))):nr,[L]),H=(0,s.useRef)(null),_=(0,s.useRef)(M),D=(0,s.useRef)(R);_.current=M,D.current=R,(0,s.useEffect)(()=>{var e,r,n;if("static"===t)return;let l=H.current;if(H.current=m,null===l){m&&(null==(e=_.current)||e.call(_));return}m&&!l?null==(r=_.current)||r.call(_):!m&&l&&(null==(n=D.current)||n.call(D))},[m,t]);let V=(0,s.useMemo)(()=>C?Object.keys(C):[],[C]),q=(0,s.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 o=e.endsWith(" ")&&!e.endsWith("  ")?e.slice(0,-1):e;for(let{handler:e,earlyReturn:s}of[...(l=null!=(n=null==t?void 0:t.linkMode)?n:"protocol",eA.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),T({handle:e=>e$(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),T({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(o=e.handle(o),null!=s&&s(o))break;return o})(e,w):e;return N&&N.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+lY(r).replace(/\n\n/g,"&#10;&#10;")+n)}return r})(r,N)),V.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=lX(r=r.replace(t,(e,t,r,n)=>lQ(t,r,n)),e)}return r})(r,V)),r},[e,t,n,w,V,N]),B=(0,s.useMemo)(()=>x(q),[q,x]),F=(0,s.useMemo)(()=>"auto"===r?B.map(lj):void 0,[B,r]),Z=(0,s.useMemo)(()=>B.map((e,t)=>`${P}-${t}`),[B.length,P]),W=(0,s.useMemo)(()=>!0===g?"true":g?JSON.stringify(g):"",[g]),K=(0,s.useRef)(null),G=(0,s.useRef)([]),U=(0,s.useRef)([]),Q=(0,s.useRef)(null),X=(0,s.useRef)("");W?(X.current!==W?(X.current=W,K.current=rU({maxBacklogMs:"true"!==W?g.maxBacklogMs:void 0}),G.current=[],U.current=[]):K.current||(K.current=rU()),m&&K.current&&K.current.beginPass(K.current.now())):(K.current=null,G.current=[],U.current=[],X.current=""),(0,s.useLayoutEffect)(()=>{var e;m&&(null==(e=K.current)||e.commitPass())});let J=(0,s.useMemo)(()=>{var e,r;return{codeBlockMaxHeight:p,shikiTheme:null!=(r=null!=d?d:null==(e=null==y?void 0:y.code)?void 0:e.getThemes())?r:oi,controls:h,isAnimating:m,lineNumbers:j,mode:t,mermaid:u,linkSafety:v,tableMaxHeight:f}},[p,d,h,m,j,t,u,v,null==y?void 0:y.code,f]),Y=(0,s.useMemo)(()=>$?JSON.stringify($):"",[$]),ee=(0,s.useMemo)(()=>({...nw,...$}),[Y]),et=(0,s.useMemo)(()=>{let{inlineCode:e,...t}=null!=o?o:{},r={...ly,...t};if(e){let t=r.code;r.code=r=>"data-block"in r?t?(0,s.createElement)(t,r):null:(0,s.createElement)(e,r)}return r},[o]),er=(0,s.useMemo)(()=>{let e=[];return null!=y&&y.cjk&&(e=[...e,...y.cjk.remarkPluginsBefore]),e=[...e,...i],null!=y&&y.cjk&&(e=[...e,...y.cjk.remarkPluginsAfter]),null!=y&&y.math&&(e=[...e,y.math.remarkPlugin]),e},[i,null==y?void 0:y.math,null==y?void 0:y.cjk]),en=(0,s.useMemo)(()=>{var e;let n=a;if(C&&Object.keys(C).length>0&&a===oo){let t={...or,tagNames:[...null!=(e=or.tagNames)?e:[],...Object.keys(C)],attributes:{...or.attributes,...C}};n=[on.raw,[z,t],on.harden]}return N&&N.length>0&&(n=[...n,[l8,N]]),null!=y&&y.math&&(n=[...n,y.math.rehypePlugin]),"auto"===r&&"static"===t&&(n=[...n,l5]),n},[a,null==y?void 0:y.math,C,N,r,t]),el=(0,s.useMemo)(()=>
112{if(!m||0===B.length)return!1;let e=B.at(-1);return l$(e)||(e=>{for(let t of e.split(`
113`)){let e=t.trim();if(e.length>0&&e.includes("|")&&lN.test(e))return!0}return!1})(e)},[m,B]),eo=(0,s.useMemo)(()=>k&&m&&!el?{"--streamdown-caret":`"${oa[k]}"`}:void 0,[k,m,el]);return"static"===t?(0,tP.jsx)(nv.Provider,{value:ee,children:(0,tP.jsx)(nP.Provider,{value:null!=y?y:null,children:(0,tP.jsx)(od.Provider,{value:J,children:(0,tP.jsx)(nk,{icons:S,children:(0,tP.jsx)(nl.Provider,{value:E,children:(0,tP.jsx)("div",{className:E("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",c),dir:"auto"===r?void 0:r,children:(0,tP.jsx)(lA,{components:et,rehypePlugins:en,remarkPlugins:er,...I,children:q})})})})})})}):(0,tP.jsx)(nv.Provider,{value:ee,children:(0,tP.jsx)(nP.Provider,{value:null!=y?y:null,children:(0,tP.jsx)(od.Provider,{value:J,children:(0,tP.jsx)(nk,{icons:S,children:(0,tP.jsx)(nl.Provider,{value:E,children:(0,tP.jsxs)("div",{className:E("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",k&&!el?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,c),style:eo,children:[0===B.length&&k&&m&&(0,tP.jsx)("span",{}),B.map((e,t)=>{var o;let s=t===B.length-1,a=m&&s&&l$(e),{blockAnimatePlugin:i,blockRehypePlugins:c}=(e=>{let t=null;if(K.current&&m){if(!G.current[e]){let{maxBacklogMs:t,...r}=W&&"true"!==W?g:{};G.current[e]=ne({...r,timeline:K.current})}t=G.current[e]}Q.current!==en&&(U.current=[],Q.current=en),t&&!U.current[e]&&(U.current[e]=[...en,t.rehypePlugin]);let r=t&&U.current[e]?U.current[e]:en;return{blockAnimatePlugin:t,blockRehypePlugins:r}})(t);return(0,tP.jsx)(b,{animatePlugin:i,components:et,content:e,dir:null!=(o=null==F?void 0:F[t])?o:"auto"!==r?r:void 0,index:t,isIncomplete:a,rehypePlugins:c,remarkPlugins:er,shouldNormalizeHtmlIndentation:l,shouldParseIncompleteMarkdown:n,...I},Z[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.codeBlockMaxHeight===t.codeBlockMaxHeight&&e.tableMaxHeight===t.tableMaxHeight&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);op.displayName="Streamdown";var oh=({children:e,className:t,minZoom:r=.5,maxZoom:n=3,zoomStep:l=.1,showControls:o=!0,initialZoom:a=1,fullscreen:i=!1})=>{let{RotateCcwIcon:c,ZoomInIcon:d,ZoomOutIcon:u}=ny(),p=no(),h=nj(),m=(0,s.useRef)(null),f=(0,s.useRef)(null),[g,b]=(0,s.useState)(a),[x,k]=(0,s.useState)({x:0,y:0}),[y,w]=(0,s.useState)(!1),[v,j]=(0,s.useState)({x:0,y:0}),[C,N]=(0,s.useState)({x:0,y:0}),$=(0,s.useCallback)(e=>{b(t=>Math.max(r,Math.min(n,t+e)))},[r,n]),S=(0,s.useCallback)(()=>{$(l)},[$,l]),L=(0,s.useCallback)(()=>{$(-l)},[$,l]),z=(0,s.useCallback)(()=>{b(a),k({x:0,y:0})},[a]),M=(0,s.useCallback)(e=>{e.preventDefault(),$(e.deltaY>0?-l:l)},[$,l]),R=(0,s.useCallback)(e=>{if(0!==e.button||!1===e.isPrimary)return;w(!0),j({x:e.clientX,y:e.clientY}),N(x);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[x]),A=(0,s.useCallback)(e=>{if(!y)return;e.preventDefault();let t=e.clientX-v.x,r=e.clientY-v.y;k({x:C.x+t,y:C.y+r})},[y,v,C]),T=(0,s.useCallback)(e=>{w(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,s.useEffect)(()=>{let e=m.current;if(e)return e.addEventListener("wheel",M,{passive:!1}),()=>{e.removeEventListener("wheel",M)}},[M]),(0,s.useEffect)(()=>{let e=f.current;if(e&&y)return document.body.style.userSelect="none",e.addEventListener("pointermove",A,{passive:!1}),e.addEventListener("pointerup",T),e.addEventListener("pointercancel",T),()=>{document.body.style.userSelect="",e.removeEventListener("pointermove",A),e.removeEventListener("pointerup",T),e.removeEventListener("pointercancel",T)}},[y,A,T]),(0,tP.jsxs)("div",{className:p("relative flex flex-col",i?"h-full w-full":"min-h-28 w-full",t),ref:m,style:{cursor:y?"grabbing":"grab"},children:[o?(0,tP.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 supp
113orts-[backdrop-filter]:backdrop-blur-sm",i?"bottom-4 left-4":"bottom-2 left-2"),children:[(0,tP.jsx)("button",{"aria-label":h.zoomIn,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:g>=n,onClick:S,title:h.zoomIn,type:"button",children:(0,tP.jsx)(d,{"aria-hidden":"true",size:16})}),(0,tP.jsx)("button",{"aria-label":h.zoomOut,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:g<=r,onClick:L,title:h.zoomOut,type:"button",children:(0,tP.jsx)(u,{"aria-hidden":"true",size:16})}),(0,tP.jsx)("button",{"aria-label":h.resetView,className:p("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:z,title:h.resetView,type:"button",children:(0,tP.jsx)(c,{"aria-hidden":"true",size:16})})]}):null,(0,tP.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:R,ref:f,role:"application",style:{transform:`translate(${x.x}px, ${x.y}px) scale(${g})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},om=({chart:e,className:t,config:r,fullscreen:n=!1,showControls:l=!0})=>{let o=no(),[a,i]=(0,s.useState)(null),[c,d]=(0,s.useState)(!1),[u,p]=(0,s.useState)(""),[h,m]=(0,s.useState)(""),[f,g]=(0,s.useState)(0),{mermaid:b}=(0,s.useContext)(od),x=nH(),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,[o,a]=(0,s.useState)(!1),i=(0,s.useRef)(null),c=(0,s.useRef)(null),d=(0,s.useRef)(null),u=(0,s.useMemo)(()=>e=>{let t=Date.now();return window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},[]),p=(0,s.useMemo)(()=>"u">typeof window&&window.requestIdleCallback?(e,t)=>window.requestIdleCallback(e,t):u,[u]),h=(0,s.useMemo)(()=>"u">typeof window&&window.cancelIdleCallback?e=>window.cancelIdleCallback(e):e=>{clearTimeout(e)},[]);return(0,s.useEffect)(()=>{if(t)return void a(!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 o=()=>{c.current&&(clearTimeout(c.current),c.current=null),d.current&&(h(d.current),d.current=null)},s=(e,t)=>{e.isIntersecting?(o(),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?(a(!0),t.disconnect()):d.current=p(()=>{a(!0),t.disconnect()},{timeout:l/2})},{timeout:l}))},r)):o()},u=new IntersectionObserver(e=>{for(let t of e)s(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:o,containerRef:i}}({immediate:n});return((0,s.useEffect)(()=>{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:o}=await t.render(l,e);p(o),m(o)}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?!a||u||h?(0,tP.jsx)("div",{className:o("size-full",t),"data-streamdown":"mermaid",ref:w,children:(0,tP.jsx)(oh,{className:o(n?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:n,maxZoom:3,minZoom:.5,showControls:l,zoomStep:.1,children:(0,tP.jsx)("div",{"aria-label":"Mermaid chart",className:o("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:u||h},role:"img"})})}):k?(0,tP.jsx)("div",{ref:w,children:(0,tP.jsx)(k,{chart:e,error:a,retry:()=>g(e=>e+1)})}):(0,tP.jsxs)("div",{className:o("rounded-md bg-red-50 p-4",t),ref:w,children:[(0,tP.jsxs)("p",{className:o("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",a]}),(0,tP.jsxs)("details",{className:o("mt-2"),children:[(0,tP.jsx)("summary",{className:o("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),(0,tP.jsx)("pre",{className:o("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]}):(0,tP.jsx)("div",{className:o("my-4 flex justify-center p-4",t),ref:w,children:(0,tP.jsxs)("div",{className:o("flex items-center space-x-2 text-muted-foreground"),children:[(0,tP.jsx)("div",{className:o("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),(0,tP.jsx)("span",{className:o("text-sm"),children:"Loading diagram..."})]})}):(0,tP.jsx)("div",{className:o("my-4 min-h-[200px]",t),ref:w})};e.s(["A",0,od,"C",0,op,"c",0,nd,"f",0,()=>{var e;let t=nE();return null!=(e=null==t?void 0:t.code)?e:null},"l",0,om],33478)}]);
114
115//# chunkId=9274d222-e31f-51fb-ae0e-b3afb2e163d4

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.