@mcpjam/inspector 3.27.1 → 3.27.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/client/assets/{CaniuseCapabilityPage-CrC-cTZL.js → CaniuseCapabilityPage-BGCx_CV1.js} +4 -4
  2. package/dist/client/assets/{CaniuseLoadingScreen-DFga82Px.js → CaniuseLoadingScreen-CnLJTk-6.js} +2 -2
  3. package/dist/client/assets/{PosthogUtils-C6QzDx66.js → PosthogUtils-BnkWsJl1.js} +1 -1
  4. package/dist/client/assets/{PosthogUtils-BAwbC5iX.js → PosthogUtils-CreNC30F.js} +2 -2
  5. package/dist/client/assets/{access-link-BJMsYDmK.js → access-link-CiqZlBT_.js} +2 -2
  6. package/dist/client/assets/{app-bootstrap-DzzSTL6f.js → app-bootstrap-Dihy9pBm.js} +259 -259
  7. package/dist/client/assets/{app-navigation-CTBnrg26.js → app-navigation-BzZWduTQ.js} +2 -2
  8. package/dist/client/assets/{bundle-mjs-BGe1waGK.js → bundle-mjs-C4gHyVze.js} +2 -2
  9. package/dist/client/assets/{caniuse-bootstrap-C-sKeXoq.js → caniuse-bootstrap-DClGA--s.js} +3 -3
  10. package/dist/client/assets/{chunk-D32TOXHM-C-gMffNp.js → chunk-D32TOXHM-BM6p8aoA.js} +5 -5
  11. package/dist/client/assets/{dead-clicks-autocapture-Bf2yz9Zr.js → dead-clicks-autocapture-DMIvXYDI.js} +2 -2
  12. package/dist/client/assets/{error-reporting-DmYc69Ih.js → error-reporting-BufzMdax.js} +1 -1
  13. package/dist/client/assets/{error-reporting-C7685g3J.js → error-reporting-C3V1rL02.js} +2 -2
  14. package/dist/client/assets/{exception-autocapture-C6yGegF5.js → exception-autocapture-D42Ql1CZ.js} +2 -2
  15. package/dist/client/assets/{feature-flags-Cbn8gAeC.js → feature-flags-9Kzm95Iy.js} +2 -2
  16. package/dist/client/assets/{first-run-oauth-return-CFW2tqzu.js → first-run-oauth-return-DBF8M446.js} +2 -2
  17. package/dist/client/assets/{highlighted-body-KQOG7T2V-BufAIVu0.js → highlighted-body-KQOG7T2V-BDDk3j-o.js} +2 -2
  18. package/dist/client/assets/{index-CCQWRMU8.js → index-CB2B0gyI.js} +3 -3
  19. package/dist/client/assets/{jszip.min-C6ASC0Lj.js → jszip.min-D0H-wysy.js} +2 -2
  20. package/dist/client/assets/{mcp-init-BWmQoGiF.js → mcp-init-D384t3us.js} +3 -3
  21. package/dist/client/assets/{mermaid-MCJ5UELQ-84PBltPS.js → mermaid-MCJ5UELQ-DXZIWzsB.js} +1 -1
  22. package/dist/client/assets/{module-BA6blRdw.js → module-BHBrpZ4U.js} +2 -2
  23. package/dist/client/assets/{module-DovF9UUB.js → module-CmXaunIz.js} +1 -1
  24. package/dist/client/assets/posthog-bundled-extensions-CrY82kI1.js +3 -0
  25. package/dist/client/assets/{posthog-bundled-extensions-_dhL7VQK.js → posthog-bundled-extensions-DUscOFM-.js} +1 -1
  26. package/dist/client/assets/{posthog-recorder-BIqCIRJB.js → posthog-recorder-PnXQoK1P.js} +2 -2
  27. package/dist/client/assets/{preload-helper-CQSqs-Ur.js → preload-helper-Dk-R02bM.js} +1 -1
  28. package/dist/client/assets/{project-route-B8ycjI6Q.js → project-route-CwOywjoT.js} +2 -2
  29. package/dist/client/assets/{react-dom-DXowvrFG.js → react-dom-s4nupq_N.js} +2 -2
  30. package/dist/client/assets/{rolldown-runtime-BlpueFg6.js → rolldown-runtime-Df2-koJ7.js} +1 -1
  31. package/dist/client/assets/{server-feature-flags-CFqtsG2I.js → server-feature-flags-ByZjY7fi.js} +2 -2
  32. package/dist/client/assets/{server-feature-flags-yy8cq8x7.js → server-feature-flags-CqB4sk67.js} +1 -1
  33. package/dist/client/assets/{session-revoked-BJat-_na.js → session-revoked-B_iZLaTD.js} +2 -2
  34. package/dist/client/assets/{surveys-DSRAF-TV.js → surveys-B4xlE-Cz.js} +2 -2
  35. package/dist/client/assets/telemetry-files-620cc3a6060f3829.js +1 -0
  36. package/dist/client/assets/{trace-timeline-BdQMiVa6.js → trace-timeline-BEzP_FzL.js} +1 -1
  37. package/dist/client/assets/{trace-timeline-CLTmhMpA.js → trace-timeline-BWWuYM0j.js} +2 -2
  38. package/dist/client/assets/{web-vitals-BGMXZEXu.js → web-vitals-jdhe8VpD.js} +2 -2
  39. package/dist/client/index.html +12 -12
  40. package/dist/server/index.js +2 -2
  41. package/package.json +2 -2
  42. package/dist/client/assets/posthog-bundled-extensions-Cs4q3GVP.js +0 -3
  43. package/dist/client/assets/telemetry-files-58cade72c6da8102.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-KQOG7T2V-BufAIVu0.js","assets/rolldown-runtime-BlpueFg6.js","assets/react-dom-DXowvrFG.js","assets/bundle-mjs-BGe1waGK.js"])))=>i.map(i=>d[i]);
2
- import{o as pn,r as cl,t as Sr}from"./rolldown-runtime-BlpueFg6.js";import{n as Cu,t as Nu}from"./react-dom-DXowvrFG.js";import{n as ul,r as Su,t as hl}from"./bundle-mjs-BGe1waGK.js";import{t as fl}from"./preload-helper-CQSqs-Ur.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"3.27.1"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1d1da15c-2988-4d99-98c7-506969a27f33",e._sentryDebugIdIdentifier="sentry-dbid-1d1da15c-2988-4d99-98c7-506969a27f33")}catch{}})();var x=pn(Cu(),1),Ii=pn(Nu(),1),T=Su();function vi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Rt=vi();function dl(e){Rt=e}var Nt={exec:()=>null};function Ft(e){let t=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),i=t[n];return i||(i=e(n),t[n]=i),i}}function Z(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(xe.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,t)};return n}var Iu=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),xe={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,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,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,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=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ft(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ft(e=>new RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Ft(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ft(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Ft(e=>new RegExp(`^ {0,${e}}(?:</?(?:${vr})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:Ft(e=>new RegExp(`^ {0,${e}}>`))},vu=/^(?:[ \t]*(?:\n|$))+/,wu=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Lu=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ir=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ru=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,wi=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,pl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ml=Z(pl).replace(/bull/g,wi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ou=Z(pl).replace(/bull/g,wi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Li=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Du=/^[^\n]+/,Ri=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Pu=Z(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ri).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Mu=Z(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,wi).getRegex(),vr="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",Oi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Bu=Z("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Oi).replace("tag",vr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gl=e=>Z(Li).replace("hr",Ir).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vr).getRegex(),Fu=gl(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Hu=gl(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Di={blockquote:Z(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Hu).getRegex(),code:wu,def:Pu,fences:Lu,heading:Ru,hr:Ir,html:Bu,lheading:ml,list:Mu,newline:vu,paragraph:Fu,table:Nt,text:Du},da=Z("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ir).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vr).getRegex(),Uu={...Di,lheading:Ou,table:da,paragraph:Z(Li).replace("hr",Ir).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",da).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vr).getRegex()},$u={...Di,html:Z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Oi).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:Nt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Z(Li).replace("hr",Ir).replace("heading",` *#{1,6} *[^
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-KQOG7T2V-BDDk3j-o.js","assets/rolldown-runtime-Df2-koJ7.js","assets/react-dom-s4nupq_N.js","assets/bundle-mjs-C4gHyVze.js"])))=>i.map(i=>d[i]);
2
+ import{o as pn,r as cl,t as Sr}from"./rolldown-runtime-Df2-koJ7.js";import{n as Cu,t as Nu}from"./react-dom-s4nupq_N.js";import{n as ul,r as Su,t as hl}from"./bundle-mjs-C4gHyVze.js";import{t as fl}from"./preload-helper-Dk-R02bM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"3.27.2"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1d1da15c-2988-4d99-98c7-506969a27f33",e._sentryDebugIdIdentifier="sentry-dbid-1d1da15c-2988-4d99-98c7-506969a27f33")}catch{}})();var x=pn(Cu(),1),Ii=pn(Nu(),1),T=Su();function vi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Rt=vi();function dl(e){Rt=e}var Nt={exec:()=>null};function Ft(e){let t=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),i=t[n];return i||(i=e(n),t[n]=i),i}}function Z(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(xe.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,t)};return n}var Iu=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),xe={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,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,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,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=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ft(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ft(e=>new RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Ft(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ft(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Ft(e=>new RegExp(`^ {0,${e}}(?:</?(?:${vr})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:Ft(e=>new RegExp(`^ {0,${e}}>`))},vu=/^(?:[ \t]*(?:\n|$))+/,wu=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Lu=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ir=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ru=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,wi=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,pl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ml=Z(pl).replace(/bull/g,wi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ou=Z(pl).replace(/bull/g,wi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Li=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Du=/^[^\n]+/,Ri=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Pu=Z(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ri).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Mu=Z(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,wi).getRegex(),vr="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",Oi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Bu=Z("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Oi).replace("tag",vr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gl=e=>Z(Li).replace("hr",Ir).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vr).getRegex(),Fu=gl(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Hu=gl(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Di={blockquote:Z(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Hu).getRegex(),code:wu,def:Pu,fences:Lu,heading:Ru,hr:Ir,html:Bu,lheading:ml,list:Mu,newline:vu,paragraph:Fu,table:Nt,text:Du},da=Z("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ir).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vr).getRegex(),Uu={...Di,lheading:Ou,table:da,paragraph:Z(Li).replace("hr",Ir).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",da).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vr).getRegex()},$u={...Di,html:Z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Oi).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:Nt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Z(Li).replace("hr",Ir).replace("heading",` *#{1,6} *[^
3
3
  ]`).replace("lheading",ml).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ju=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,zu=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,El=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Yu=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,lt=/[\p{P}\p{S}]/u,Gt=/[\s\p{P}\p{S}]/u,wr=/[^\s\p{P}\p{S}]/u,qu=Z(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Gt).getRegex(),Vu=/[\p{Pi}\p{Ps}"']/u,Tl=/(?!~)[\p{P}\p{S}]/u,Wu=/(?!~)[\s\p{P}\p{S}]/u,Qu=/(?:[^\s\p{P}\p{S}]|~)/u,Gu=Z(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Iu?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),bl=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Ku=Z(bl,"u").replace(/punct/g,lt).getRegex(),Xu=Z(bl,"u").replace(/punct/g,Tl).getRegex(),Zu=Z(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,"u").replace(/openQuote/g,Vu).replace(/punct/g,lt).getRegex(),kl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ju=Z(kl,"gu").replace(/notPunctSpace/g,wr).replace(/punctSpace/g,Gt).replace(/punct/g,lt).getRegex(),eh=Z(kl,"gu").replace(/notPunctSpace/g,Qu).replace(/punctSpace/g,Wu).replace(/punct/g,Tl).getRegex(),th=Z("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,wr).replace(/punctSpace/g,Gt).replace(/punct/g,lt).getRegex(),rh=Z("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,wr).replace(/punctSpace/g,Gt).replace(/punct/g,lt).getRegex(),nh=Z("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,wr).replace(/punctSpace/g,Gt).replace(/punct/g,lt).getRegex(),ih=Z(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,lt).getRegex(),ah=Z("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,wr).replace(/punctSpace/g,Gt).replace(/punct/g,lt).getRegex(),sh=Z(/\\(punct)/,"gu").replace(/punct/g,lt).getRegex(),lh=Z(/^<(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(),oh=Z(Oi).replace("(?:-->|$)","-->").getRegex(),ch=Z("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",oh).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_l=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,rn=Z(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",_l).getRegex(),uh=Z(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",rn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),hh=Z(/^!?\[(label)\]\[(ref)\]/).replace("label",rn).replace("ref",Ri).getRegex(),fh=Z(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ri).getRegex(),pa=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,dh=Z(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",_l).getRegex(),ph=Z("reflink|nolink(?!\\()","g").replace("reflink",Z(/^!?\[(label)\]\[(ref)\]/).replace("label",dh).replace("ref",pa).getRegex()).replace("nolink",Z(/^!?\[(ref)\](?:\[\])?/).replace("ref",pa).getRegex()).getRegex(),ma=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,mh=Z(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),Pi={_backpedal:Nt,anyPunctuation:sh,autolink:lh,blockSkip:Gu,br:El,code:zu,del:Nt,delLDelim:Nt,delRDelim:Nt,emStrongLDelim:Ku,emStrongRDelimAst:Ju,emStrongRDelimUnd:rh,escape:ju,link:uh,nolink:fh,punctuation:qu,reflink:hh,reflinkSearch:ph,tag:ch,text:Yu,url:Nt},gh={...Pi,emStrongLDelim:Zu,emStrongRDelimAst:th,emStrongRDelimUnd:nh,link:Z(/^!?\[(label)\]\((.*?)\)/).replace("label",rn).getRegex(),reflink:Z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rn).getRegex()},ei={...Pi,emStrongRDelimAst:eh,emStrongLDelim:Xu,delLDelim:ih,delRDelim:ah,url:Z(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",mh).replace("protocol",ma).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Z(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",ma).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},Eh={...ei,br:Z(El).replace("{2,}","*").getRegex(),text:Z(ei.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},zr={normal:Di,gfm:Uu,pedantic:$u},sr={normal:Pi,gfm:ei,breaks:Eh,pedantic:gh},Th={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ga=e=>Th[e];function Ue(e,t){if(t){if(xe.escapeTest.test(e))return e.replace(xe.escapeReplace,ga)}else if(xe.escapeTestNoEncode.test(e))return e.replace(xe.escapeReplaceNoEncode,ga);return e}function bh(e){return e.replace(xe.numericCharacterReference,(t,r,n)=>{let i=r===void 0?Number.parseInt(n,16):Number.parseInt(r,10);return i===0||i>1114111||i>=55296&&i<=57343?"�":String.fromCodePoint(i)})}function Ea(e){try{e=encodeURI(e).replace(xe.percentDecode,"%")}catch{return null}return e}function Ta(e,t){let r=e.replace(xe.findPipe,(i,a,s)=>{let l=!1,o=a;for(;--o>=0&&s[o]==="\\";)l=!l;return l?"|":" |"}).split(xe.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(xe.slashPipe,"|");return r}function ft(e,t,r){let n=e.length;if(n===0)return"";let i=0;for(;i<n;){let a=e.charAt(n-i-1);if(a===t&&!r)i++;else if(a!==t&&r)i++;else break}return e.slice(0,n-i)}function ba(e){let t=e.split(`
4
4
  `),r=t.length-1;for(;r>=0&&xe.blankLine.test(t[r]);)r--;return t.length-r<=2?e:t.slice(0,r+1).join(`
5
5
  `)}function nn(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function kh(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function ka(e,t=0){let r=t,n="";for(let i of e)if(i===" "){let a=4-r%4;n+=" ".repeat(a),r+=a}else n+=i,r++;return n}function _a(e,t,r,n,i){let a=t.href,s=t.title||null,l=e[1].replace(i.other.outputLinkReplace,"$1"),o=e[0].charAt(0)==="!";n.state.inLink=!0;let u=n.state.linkEmitted,h=n.state.inRawBlock;n.state.linkEmitted=!1;let f=n.inlineTokens(l),p=n.state.linkEmitted;if(n.state.linkEmitted=u,n.state.inLink=!1,!o){if(p){n.state.inRawBlock=h;return}n.state.linkEmitted=!0}return{type:o?"image":"link",raw:r,href:a,title:s,text:l,tokens:f}}function _h(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(`
@@ -119,7 +119,7 @@ $$`:`${e}$$`},Ek=e=>pk(e)%2===0?e:gk(e),Tk=e=>mk(e)%2===1?`${e}$`:e,mi="streamdo
119
119
  `}),r}function ws(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Ls(e,t){const r=bA(e,t),n=r.one(e,void 0),i=EA(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&("children"in a,a.children.push({type:"text",value:`
120
120
  `},i)),a}function xA(e,t){return e&&"run"in e?async function(r,n){const i=Ls(r,{file:n,...t});await e.run(i,n)}:function(r,n){return Ls(r,{file:n,...e||t})}}function Rs(e){if(e)throw e}var CA=Sr(((e,t)=>{var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):n.call(f)==="[object Array]"},l=function(f){if(!f||n.call(f)!=="[object Object]")return!1;var p=r.call(f,"constructor"),d=f.constructor&&f.constructor.prototype&&r.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!d)return!1;var g;for(g in f);return typeof g>"u"||r.call(f,g)},o=function(f,p){i&&p.name==="__proto__"?i(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},u=function(f,p){if(p==="__proto__")if(r.call(f,p)){if(a)return a(f,p).value}else return;return f[p]};t.exports=function h(){var f,p,d,g,N,C,_=arguments[0],v=1,y=arguments.length,D=!1;for(typeof _=="boolean"&&(D=_,_=arguments[1]||{},v=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});v<y;++v)if(f=arguments[v],f!=null)for(p in f)d=u(_,p),g=u(f,p),_!==g&&(D&&g&&(l(g)||(N=s(g)))?(N?(N=!1,C=d&&s(d)?d:[]):C=d&&l(d)?d:{},o(_,{name:p,newValue:h(D,C,g)})):typeof g<"u"&&o(_,{name:p,newValue:g}));return _}})),Yn=pn(CA(),1);function Ti(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function NA(){const e=[],t={run:r,use:n};return t;function r(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(o,...u){const h=e[++a];let f=-1;if(o){s(o);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,h?SA(h,l)(...u):s(null,...u)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function SA(e,t){let r;return n;function n(...s){const l=e.length>s.length;let o;l&&s.push(i);try{o=e.apply(this,s)}catch(u){const h=u;if(l&&r)throw h;return i(h)}l||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(s,...l){r||(r=!0,t(s,...l))}function a(s){i(null,s)}}var Je={basename:IA,dirname:vA,extname:wA,join:LA,sep:"/"};function IA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Br(e);let r=0,n=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else s<0&&(a=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(n=i):(l=-1,n=s));return r===n?n=s:n<0&&(n=e.length),e.slice(r,n)}function vA(e){if(Br(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function wA(e){Br(e);let t=e.length,r=-1,n=0,i=-1,a=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){n=t+1;break}continue}r<0&&(s=!0,r=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function LA(...e){let t=-1,r;for(;++t<e.length;)Br(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":RA(r)}function RA(e){Br(e);const t=e.codePointAt(0)===47;let r=OA(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function OA(e,t){let r="",n=0,i=-1,a=0,s=-1,l,o;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(o=r.lastIndexOf("/"),o!==r.length-1){o<0?(r="",n=0):(r=r.slice(0,o),n=r.length-1-r.lastIndexOf("/")),i=s,a=0;continue}}else if(r.length>0){r="",n=0,i=s,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,s):r=e.slice(i+1,s),n=s-i-1;i=s,a=0}else l===46&&a>-1?a++:a=-1}return r}function Br(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var DA={cwd:PA};function PA(){return"/"}function bi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function MA(e){if(typeof e=="string")e=new URL(e);else if(!bi(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return BA(e)}function BA(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}var qn=["history","path","basename","stem","extname","dirname"],FA=class{constructor(e){let t;e?bi(e)?t={path:e}:typeof e=="string"||HA(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":DA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<qn.length;){const i=qn[r];i in t&&t[i]!==void 0&&t[i]!==null&&(this[i]=i==="history"?[...t[i]]:t[i])}let n;for(n in t)qn.includes(n)||(this[n]=t[n])}get basename(){return typeof this.path=="string"?Je.basename(this.path):void 0}set basename(e){Wn(e,"basename"),Vn(e,"basename"),this.path=Je.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Je.dirname(this.path):void 0}set dirname(e){Os(this.basename,"dirname"),this.path=Je.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Je.extname(this.path):void 0}set extname(e){if(Vn(e,"extname"),Os(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Je.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){bi(e)&&(e=MA(e)),Wn(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Je.basename(this.path,this.extname):void 0}set stem(e){Wn(e,"stem"),Vn(e,"stem"),this.path=Je.join(this.dirname||"",e+(this.extname||""))}fail(e,t,r){const n=this.message(e,t,r);throw n.fatal=!0,n}info(e,t,r){const n=this.message(e,t,r);return n.fatal=void 0,n}message(e,t,r){const n=new ve(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Vn(e,t){if(e&&e.includes(Je.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Je.sep+"`")}function Wn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Os(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function HA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var UA=(function(e){const t=this.constructor.prototype,r=t[e],n=function(){return r.apply(n,arguments)};return Object.setPrototypeOf(n,t),n}),$A={}.hasOwnProperty,jA=class bc extends UA{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=NA()}copy(){const t=new bc;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data((0,Yn.default)(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Kn("data",this.frozen),this.namespace[t]=r,this):$A.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Kn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Qr(t),n=this.parser||this.Parser;return Qn("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),Qn("process",this.parser||this.Parser),Gn("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,s){const l=Qr(t),o=n.parse(l);n.run(o,l,function(h,f,p){if(h||!f||!p)return u(h);const d=f,g=n.stringify(d,p);qA(g)?p.value=g:p.result=g,u(h,p)});function u(h,f){h||!f?s(h):a?a(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),Qn("processSync",this.parser||this.Parser),Gn("processSync",this.compiler||this.Compiler),this.process(t,i),Ps("processSync","process",r),n;function i(a,s){r=!0,Rs(a),n=s}}run(t,r,n){Ds(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(s,l){const o=Qr(r);i.run(t,o,u);function u(h,f,p){const d=f||t;h?l(h):s?s(d):n(void 0,d,p)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),Ps("runSync","run",n),i;function a(s,l){Rs(s),i=l,n=!0}}stringify(t,r){this.freeze();const n=Qr(r),i=this.compiler||this.Compiler;return Gn("stringify",i),Ds(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(Kn("use",this.frozen),t!=null)if(typeof t=="function")o(t,r);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")o(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[h,...f]=u;o(h,f)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(i.settings=(0,Yn.default)(!0,i.settings,u.settings))}function l(u){let h=-1;if(u!=null)if(Array.isArray(u))for(;++h<u.length;){const f=u[h];a(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function o(u,h){let f=-1,p=-1;for(;++f<n.length;)if(n[f][0]===u){p=f;break}if(p===-1)n.push([u,...h]);else if(h.length>0){let[d,...g]=h;const N=n[p][1];Ti(N)&&Ti(d)&&(d=(0,Yn.default)(!0,N,d)),n[p]=[u,d,...g]}}}},zA=new jA().freeze();function Qn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Gn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Kn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ds(e){if(!Ti(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ps(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Qr(e){return YA(e)?e:new FA(e)}function YA(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function qA(e){return typeof e=="string"||VA(e)}function VA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var WA=300,QA="300px",GA=500;function KA(e={}){let{immediate:t=!1,debounceDelay:r=WA,rootMargin:n=QA,idleTimeout:i=GA}=e,[a,s]=(0,x.useState)(!1),l=(0,x.useRef)(null),o=(0,x.useRef)(null),u=(0,x.useRef)(null),h=(0,x.useMemo)(()=>d=>{let g=Date.now();return window.setTimeout(()=>{d({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-g))})},1)},[]),f=(0,x.useMemo)(()=>typeof window<"u"&&window.requestIdleCallback?(d,g)=>window.requestIdleCallback(d,g):h,[h]),p=(0,x.useMemo)(()=>typeof window<"u"&&window.cancelIdleCallback?d=>window.cancelIdleCallback(d):d=>{clearTimeout(d)},[]);return(0,x.useEffect)(()=>{if(t){s(!0);return}let d=l.current;if(!d)return;o.current&&(clearTimeout(o.current),o.current=null),u.current&&(p(u.current),u.current=null);let g=()=>{o.current&&(clearTimeout(o.current),o.current=null),u.current&&(p(u.current),u.current=null)},N=y=>{u.current=f(D=>{D.timeRemaining()>0||D.didTimeout?(s(!0),y.disconnect()):u.current=f(()=>{s(!0),y.disconnect()},{timeout:i/2})},{timeout:i})},C=y=>{g(),o.current=window.setTimeout(()=>{var D,F;let w=y.takeRecords();(w.length===0||(F=(D=w.at(-1))==null?void 0:D.isIntersecting)!=null&&F)&&N(y)},r)},_=(y,D)=>{y.isIntersecting?C(D):g()},v=new IntersectionObserver(y=>{for(let D of y)_(D,v)},{rootMargin:n,threshold:0});return v.observe(d),()=>{o.current&&clearTimeout(o.current),u.current&&p(u.current),v.disconnect()}},[t,r,n,i,p,f]),{shouldRender:a,containerRef:l}}var XA=320,ZA=4,kc=()=>typeof performance>"u"?Date.now():performance.now();function Ms(e){var t,r;let n=(t=e?.now)!=null?t:kc,i=(r=e?.maxBacklogMs)!=null?r:XA,a=0,s=0;return{now:n,beginPass(l){s=Math.min(Math.max(a,l),l+i)},mark(){return s},rewind(l){s=l},take(l,o,u){if(l<=0)return{baseDelay:0,step:Math.max(0,o)};let h=Math.max(0,o),f=h===0?0:Math.min(h,ZA),p=Math.max(s,u),d=u+i,g=p+Math.max(0,l-1)*h,N=h;if(g>d&&l>1)if(p<d){let _=d-p;N=Math.max(f,_/(l-1))}else N=f;let C=Math.max(0,Math.round(p-u));return s=p+l*N,{baseDelay:C,step:N}},commitPass(){a=s}}}var _c=/\s/,na=/^\s+$/,JA=new Set(["pre","svg","math","annotation"]),e0=new Set(["img","hr"]),Fr=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",ia=e=>e.some(t=>Fr(t)&&JA.has(t.tagName)),t0=e=>{for(let t=e.length-1;t>=0;t--){let r=e[t];if(Fr(r)&&r.tagName==="li")return r}},r0=(e,t,r,n)=>{e.properties??={},e.properties["data-sd-animate-marker"]=!0;let i=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${i}--sd-marker-duration:${t}ms;--sd-marker-delay:${Math.round(r)}ms;--sd-marker-easing:${n}`},n0=new Set(["ul","ol","li"]),Ac=e=>{for(let t of e.children)if(Fr(t)){if(t.tagName==="input")return t;if(n0.has(t.tagName))continue;let r=Ac(t);if(r)return r}},yc=(e,t,r,n)=>{e.properties??={},e.properties["data-sd-animate"]=!0;let i=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${i}--sd-animation:sd-${t.animation};--sd-duration:${r}ms;--sd-easing:${t.easing};--sd-delay:${Math.round(n)}ms`},i0=(e,t,r,n)=>{let i=Ac(e);i&&yc(i,t,r,n)},a0=(e,t,r,n,i,a)=>{if(ia(t))return;let s=n.prevContentLength,l=i.count;i.count+=1;let o=s>0&&l<s,u=o?0:a.baseDelay+i.newIndex++*a.step;yc(e,r,o?0:r.duration,u)},s0=e=>{var t;for(let r=e.length-1;r>=0;r-=1){let n=e[r];if(Fr(n)){if((t=n.properties)!=null&&t["data-sd-animated"])break;n.properties={...n.properties,"data-sd-animated":!0}}}},xc=e=>{let t=[],r="",n=!1;for(let i of e){let a=_c.test(i);if(a!==n&&r){if(a){r+=i,n=!0;continue}t.push(r),r=""}r+=i,n=a}return r&&t.push(r),t},Cc=e=>{let t=[],r="";for(let n of e)_c.test(n)?t.length>0&&!na.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},Bs=/^[^\s;:'"\\/](?:[^;:'"\\/\r\n]*[^\s;:'"\\/])?$/,l0=(e,t,r,n)=>{let i=`sd-${t.animation}`,a=`${r?0:t.duration}ms`,s;return t.styleObjects?(s={"--sd-animation":i,"--sd-duration":a,"--sd-easing":t.easing},n&&(s["--sd-delay"]=`${Math.round(n)}ms`)):(s=`--sd-animation:${i};--sd-duration:${a};--sd-easing:${t.easing}`,n&&(s+=`;--sd-delay:${Math.round(n)}ms`)),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:s},children:[{type:"text",value:e}]}},Fs=(e,t)=>!(e>0&&t<e),ki=e=>Fr(e)&&e0.has(e.tagName),o0=(e,t,r)=>{let n=0,i=0;return En(e,a=>a.type==="text"||ki(a),(a,s)=>{if(ia(s))return jt;if(ki(a)){Fs(r,i)&&(n+=1),i+=1;return}let l=a.value;if(!l.trim()){i+=l.length;return}let o=t.sep==="char"?Cc(l):xc(l);for(let u of o){let h=i;i+=u.length,!na.test(u)&&Fs(r,h)&&(n+=1)}}),n},c0=(e,t,r,n,i,a)=>{var s;let l=t.at(-1);if(!(l&&"children"in l))return;if(ia(t))return jt;let o=l,u=o.children.indexOf(e);if(u===-1)return;let h=e.value;if(!h.trim()){i.count+=h.length;return}let f=r.sep==="char"?Cc(h):xc(h),p=n.prevContentLength,d=!1,g=t0(t),N=!!(g&&!((s=g.properties)!=null&&s["data-sd-animate-marker"])),C=!1,_=f.map(v=>{let y=i.count;if(i.count+=v.length,na.test(v))return{type:"text",value:v};let D=p>0&&y<p,F=D?0:a.baseDelay+i.newIndex++*a.step;if(d=!0,g&&N&&!C){let w=D?0:r.duration;r0(g,w,F,r.easing),i0(g,r,w,F),C=!0}return l0(v,r,D,F)});return d&&s0(t),o.children.splice(u,1,..._),u+_.length},u0=0;function h0(e){return Nc(e,!1)}var f0=e=>Nc(e,!0);function Nc(e,t){var r,n,i,a,s;let l=(r=e?.animation)!=null?r:"fadeIn",o=(n=e?.easing)!=null?n:"ease",u={animation:l,duration:(i=e?.duration)!=null?i:150,easing:o,sep:(a=e?.sep)!=null?a:"word",stagger:(s=e?.stagger)!=null?s:40,styleObjects:t&&Bs.test(l)&&Bs.test(o),timeline:e?.timeline},h={committedCharCount:0,prevContentLength:0,lastRenderCharCount:0,pendingMark:null},f=u0++,p=()=>d=>{var g;let N={count:0,newIndex:0};h.prevContentLength=h.committedCharCount;let C=u.timeline,_=(g=C?.now())!=null?g:kc();C&&(h.pendingMark===null?h.pendingMark=C.mark():C.rewind(h.pendingMark));let v=C?C.take(o0(d,u,h.prevContentLength),u.stagger,_):{baseDelay:0,step:u.stagger};En(d,y=>y.type==="text"||ki(y),(y,D)=>{if(y.type==="text")return c0(y,D,u,h,N,v);a0(y,D,u,h,N,v)}),h.lastRenderCharCount=N.count,h.prevContentLength=0};return Object.defineProperty(p,"name",{value:`rehypeAnimate$${f}`}),{name:"animate",type:"animate",rehypePlugin:p,setPrevContentLength(d){h.committedCharCount=d,h.prevContentLength=d},getLastRenderCharCount(){return h.lastRenderCharCount},commit(){h.committedCharCount=h.lastRenderCharCount,h.pendingMark=null}}}h0();var Sc=(0,x.createContext)(!1),Ic=()=>(0,x.useContext)(Sc),Sn=(...e)=>hl(ul(e)),d0=(e,t)=>{if(!e||!t)return t;let r=`${e}:`;return t.split(/\s+/).filter(Boolean).map(n=>n.startsWith(r)?n:`${e}:${n}`).join(" ")},p0=e=>e?(...t)=>d0(e,hl(ul(t))):Sn,qt=(e,t,r)=>{let n=typeof t=="string"&&r.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([n+t],{type:r}):t,a=URL.createObjectURL(i),s=document.createElement("a");s.href=a,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a)},_i=(0,x.createContext)(Sn),te=()=>(0,x.useContext)(_i),m0=8,vc=e=>{if(!(e===void 0||e===0||e===Number.POSITIVE_INFINITY)){if(typeof e=="number")return Number.isFinite(e)&&e>0?`${e}px`:void 0;if(!(e==="0"||e==="none"||e==="Infinity"))return e}},wc=(e,t,r)=>{let n=(0,x.useRef)(null),i=(0,x.useRef)(!0),a=(0,x.useRef)(!1),s=(0,x.useRef)(null);return(0,x.useEffect)(()=>{let l=n.current;if(!(l&&t))return;let o=()=>{let u=l.scrollHeight-l.scrollTop-l.clientHeight<m0;i.current=u};return l.addEventListener("scroll",o,{passive:!0}),()=>l.removeEventListener("scroll",o)},[t]),(0,x.useEffect)(()=>{e&&!a.current&&(i.current=!0),e||(i.current=!0),a.current=e},[e]),(0,x.useEffect)(()=>()=>{s.current!==null&&cancelAnimationFrame(s.current)},[]),(0,x.useEffect)(()=>{let l=n.current;!(l&&t&&e&&i.current)||s.current!==null||(s.current=requestAnimationFrame(()=>{s.current=null,i.current&&l.scrollTo({top:l.scrollHeight,behavior:"instant"})}))},[e,t,r]),n},g0=Sn("block"),E0=Sn("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"),T0=e=>{let t={};for(let r of e.split(";")){let n=r.indexOf(":");if(n>0){let i=r.slice(0,n).trim(),a=r.slice(n+1).trim();i&&a&&(t[i]=a)}}return t},b0=(0,x.memo)(({children:e,result:t,language:r,className:n,maxHeight:i,startLine:a,lineNumbers:s=!0,...l})=>{let o=te(),{isAnimating:u}=(0,x.useContext)(ye),h=vc(i),f=wc(u,!!h,t),p=(0,x.useMemo)(()=>o(E0),[o]),d=(0,x.useMemo)(()=>o(g0),[o]),g=(0,x.useMemo)(()=>{let N={};return t.bg&&(N["--sdm-bg"]=t.bg),t.fg&&(N["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(N,T0(t.rootStyle)),N},[t.bg,t.fg,t.rootStyle]);return(0,T.jsx)("div",{className:o(n,h?"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:f,style:h?{maxHeight:h}:void 0,...l,children:(0,T.jsx)("pre",{className:o(n,"bg-[var(--sdm-bg,inherit)]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit))]"),style:g,children:(0,T.jsx)("code",{className:s?o("[counter-increment:line_0] [counter-reset:line]"):void 0,style:s&&a&&a>1?{counterReset:`line ${a-1}`}:void 0,children:t.tokens.map((N,C)=>(0,T.jsx)("span",{className:s?p:d,children:N.length===0||N.length===1&&N[0].content===""?`
121
121
  `:N.map((_,v)=>{let y={},D=!!_.bgColor;if(_.color&&(y["--sdm-c"]=_.color),_.bgColor&&(y["--sdm-tbg"]=_.bgColor),_.htmlStyle)for(let[F,w]of Object.entries(_.htmlStyle))F==="color"?y["--sdm-c"]=w:F==="background-color"?(y["--sdm-tbg"]=w,D=!0):y[F]=w;return(0,T.jsx)("span",{className:o("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",D&&"bg-[var(--sdm-tbg)]",D&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:y,..._.htmlAttrs,children:_.content},v)})},C))})})})}),k0=({className:e,language:t,style:r,isIncomplete:n,...i})=>{let a=te();return(0,T.jsx)("div",{className:a("relative 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},...i})},Lc=(0,x.createContext)({code:""}),Rc=()=>(0,x.useContext)(Lc),_0=({language:e})=>{let t=te();return(0,T.jsx)("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:(0,T.jsx)("span",{className:t("ml-1 font-mono lowercase"),children:e})})},A0=e=>{let t=e.length;for(;t>0&&e[t-1]===`
122
- `;)t--;return e.slice(0,t)},y0=(0,x.lazy)(()=>fl(()=>import("./highlighted-body-KQOG7T2V-BufAIVu0.js").then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([0,1,2,3]))),x0=({code:e,language:t,className:r,children:n,isIncomplete:i=!1,startLine:a,lineNumbers:s,...l})=>{let o=te(),{codeBlockMaxHeight:u}=(0,x.useContext)(ye),h=(0,x.useMemo)(()=>A0(e),[e]),f=(0,x.useMemo)(()=>({bg:"transparent",fg:"inherit",tokens:h.split(`
122
+ `;)t--;return e.slice(0,t)},y0=(0,x.lazy)(()=>fl(()=>import("./highlighted-body-KQOG7T2V-BDDk3j-o.js").then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([0,1,2,3]))),x0=({code:e,language:t,className:r,children:n,isIncomplete:i=!1,startLine:a,lineNumbers:s,...l})=>{let o=te(),{codeBlockMaxHeight:u}=(0,x.useContext)(ye),h=(0,x.useMemo)(()=>A0(e),[e]),f=(0,x.useMemo)(()=>({bg:"transparent",fg:"inherit",tokens:h.split(`
123
123
  `).map(p=>[{content:p,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[h]);return(0,T.jsx)(Lc.Provider,{value:{code:e},children:(0,T.jsxs)(k0,{dir:"ltr",isIncomplete:i,language:t,children:[(0,T.jsx)(_0,{language:t}),n?(0,T.jsx)("div",{className:o("pointer-events-none absolute top-2 right-2 z-10 flex items-center"),children:(0,T.jsx)("div",{className:o("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,T.jsx)(x.Suspense,{fallback:(0,T.jsx)(b0,{className:r,language:t,lineNumbers:s,maxHeight:u,result:f,startLine:a,...l}),children:(0,T.jsx)(y0,{className:r,code:h,isIncomplete:i,language:t,lineNumbers:s,maxHeight:u,raw:f,startLine:a,...l})})]})})},C0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.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"})}),N0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.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"})}),S0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.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.68342 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"})}),I0=e=>(0,T.jsxs)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[(0,T.jsx)("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),(0,T.jsx)("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),v0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.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"})}),w0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.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"})}),L0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.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"})}),R0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.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"})}),O0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.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"})}),D0=e=>(0,T.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,T.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"})}),pr={CheckIcon:C0,CopyIcon:N0,DownloadIcon:S0,ExternalLinkIcon:R0,Loader2Icon:I0,Maximize2Icon:v0,RotateCcwIcon:w0,XIcon:L0,ZoomInIcon:O0,ZoomOutIcon:D0},Oc=(0,x.createContext)(pr),P0=(e,t)=>{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?!1:r.every(i=>e[i]===t[i])},Hs=({icons:e,children:t})=>{let r=(0,x.useRef)(e),n=(0,x.useRef)(e?{...pr,...e}:pr);P0(r.current,e)||(r.current=e,n.current=e?{...pr,...e}:pr);let i=n.current;return(0,T.jsx)(Oc.Provider,{value:i,children:t})},Ze=()=>(0,x.useContext)(Oc),Dc={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"},Ai=(0,x.createContext)(Dc),nt=()=>(0,x.useContext)(Ai),yi=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:i,code:a,...s})=>{let l=te(),[o,u]=(0,x.useState)(!1),h=(0,x.useRef)(0),{code:f}=Rc(),{isAnimating:p}=(0,x.useContext)(ye),d=nt(),g=a??f,N=async()=>{var v;if(typeof window>"u"||!((v=navigator?.clipboard)!=null&&v.writeText)){t?.(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(g),u(!0),e?.(),h.current=window.setTimeout(()=>u(!1),r))}catch(y){t?.(y)}};(0,x.useEffect)(()=>()=>{window.clearTimeout(h.current)},[]);let C=Ze(),_=o?C.CheckIcon:C.CopyIcon;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{"aria-label":d.copyCode,className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:p,onClick:N,title:d.copyCode,type:"button",...s,children:n??(0,T.jsx)(_,{"aria-hidden":"true",size:14})}),o&&(0,T.jsx)("output",{"aria-live":"polite",className:"sr-only",children:d.copied})]})},aa=(e,t,r)=>{if(typeof e=="boolean")return r;let n=e[t];if(typeof n!="object")return r;let i=n.download;return typeof i!="object"?r:i.filename||r},Us=(e,t)=>{if(typeof e=="boolean")return{};let r=e[t];if(typeof r!="object")return{};let n=r.copy;return typeof n!="object"||n===null?{}:{onCopy:n.onCopy,onError:n.onError}},$s={"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"},M0=({onDownload:e,onError:t,language:r,children:n,className:i,code:a,...s})=>{let l=te(),{code:o}=Rc(),{isAnimating:u,controls:h}=(0,x.useContext)(ye),f=nt(),p=Ze(),d=a??o,g=r&&r in $s?$s[r]:"txt",N=`${aa(h,"code","file")}.${g}`,C="text/plain",_=()=>{try{qt(N,d,C),e?.()}catch(v){t?.(v)}};return(0,T.jsx)("button",{"aria-label":f.downloadFile,className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:u,onClick:_,title:f.downloadFile,type:"button",...s,children:n??(0,T.jsx)(p.DownloadIcon,{size:14})})},js=()=>{let{Loader2Icon:e}=Ze(),t=te();return(0,T.jsxs)("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[(0,T.jsx)("div",{className:t("h-[46px] w-full bg-muted/80")}),(0,T.jsx)("div",{className:t("flex w-full items-center justify-center p-4"),children:(0,T.jsx)(e,{className:t("size-4 animate-spin")})})]})},B0=/\.[^/.]+$/,F0=({node:e,className:t,src:r,alt:n,onLoad:i,onError:a,showControls:s=!0,showDownloadControl:l=!0,...o})=>{let{DownloadIcon:u}=Ze(),h=te(),f=(0,x.useRef)(null),[p,d]=(0,x.useState)(!1),[g,N]=(0,x.useState)(!1),C=nt(),_=o.width!=null||o.height!=null,v=(p||_)&&!g&&s&&l,y=g&&!_;(0,x.useEffect)(()=>{let $=f.current;if($!=null&&$.complete){let j=$.naturalWidth>0;d(j),N(!j)}},[]);let D=(0,x.useCallback)($=>{d(!0),N(!1),i?.($)},[i]),F=(0,x.useCallback)($=>{d(!1),N(!0),a?.($)},[a]),w=async()=>{if(r)try{let $=await(await fetch(r)).blob(),j=new URL(r,window.location.origin).pathname.split("/").pop()||"",q=j.split(".").pop(),I=j.includes(".")&&q!==void 0&&q.length<=4,U="";if(I)U=j;else{let H=$.type,K="png";H.includes("jpeg")||H.includes("jpg")?K="jpg":H.includes("png")?K="png":H.includes("svg")?K="svg":H.includes("gif")?K="gif":H.includes("webp")&&(K="webp"),U=`${(n||j||"image").replace(B0,"")}.${K}`}qt(U,$,$.type)}catch{window.open(r,"_blank")}};return r?r==="streamdown:incomplete-image"?(0,T.jsx)("div",{className:h("group relative my-4 inline-block"),"data-incomplete":"true","data-streamdown":"image-wrapper",children:(0,T.jsx)("div",{className:h("h-24 w-48 animate-pulse rounded-lg bg-muted"),"data-streamdown":"image-placeholder"})}):(0,T.jsxs)("div",{className:h("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[(0,T.jsx)("img",{alt:n,className:h("max-w-full rounded-lg",y&&"hidden",t),"data-streamdown":"image",onError:F,onLoad:D,ref:f,src:r,...o}),y&&(0,T.jsx)("span",{className:h("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:C.imageNotAvailable}),s&&(0,T.jsx)("div",{className:h("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"),"data-streamdown":"image-overlay"}),v&&(0,T.jsx)("button",{className:h("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:w,title:C.downloadImage,type:"button",children:(0,T.jsx)(u,{size:14})})]}):null},sa=e=>{let t=typeof e=="function"?e():e;return t??document.body},Ar=0,la=()=>{Ar+=1,Ar===1&&(document.body.style.overflow="hidden")},oa=()=>{Ar=Math.max(0,Ar-1),Ar===0&&(document.body.style.overflow="")},H0=({url:e,isOpen:t,onClose:r,onConfirm:n})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:s,XIcon:l}=Ze(),o=te(),[u,h]=(0,x.useState)(!1),f=nt(),{portal:p}=(0,x.useContext)(ye),d=(0,x.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),h(!0),setTimeout(()=>h(!1),2e3)}catch{}},[e]),g=(0,x.useCallback)(()=>{n(),r()},[n,r]);if((0,x.useEffect)(()=>{if(t){la();let C=_=>{_.key==="Escape"&&r()};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C),oa()}}},[t,r]),!t||typeof document>"u")return null;let N=(0,T.jsx)("div",{className:o("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:r,onKeyDown:C=>{C.key==="Escape"&&r()},role:"button",tabIndex:0,children:(0,T.jsxs)("div",{className:o("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:C=>C.stopPropagation(),onKeyDown:C=>C.stopPropagation(),role:"presentation",children:[(0,T.jsx)("button",{className:o("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:r,title:f.close,type:"button",children:(0,T.jsx)(l,{size:16})}),(0,T.jsxs)("div",{className:o("flex flex-col gap-2"),children:[(0,T.jsxs)("div",{className:o("flex items-center gap-2 font-semibold text-lg"),children:[(0,T.jsx)(s,{size:20}),(0,T.jsx)("span",{children:f.openExternalLink})]}),(0,T.jsx)("p",{className:o("text-muted-foreground text-sm"),children:f.externalLinkWarning})]}),(0,T.jsx)("div",{className:o("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),(0,T.jsxs)("div",{className:o("flex gap-2"),children:[(0,T.jsx)("button",{className:o("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:d,type:"button",children:u?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(i,{size:14}),(0,T.jsx)("span",{children:f.copied})]}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(a,{size:14}),(0,T.jsx)("span",{children:f.copyLink})]})}),(0,T.jsxs)("button",{className:o("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:g,type:"button",children:[(0,T.jsx)(s,{size:14}),(0,T.jsx)("span",{children:f.openLink})]})]})]})});return(0,Ii.createPortal)(N,sa(p))},xi=(0,x.createContext)(null),ca=()=>(0,x.useContext)(xi),Ly=()=>{var e;let t=ca();return(e=t?.code)!=null?e:null},ua=()=>{var e;let t=ca();return(e=t?.mermaid)!=null?e:null},U0=e=>{var t;let r=ca();return r!=null&&r.renderers&&e&&(t=r.renderers.find(n=>Array.isArray(n.language)?n.language.includes(e):n.language===e))!=null?t:null},Pc=/<svg\b[^>]*>/i,$0=/\bviewBox=(['"])(.*?)\1/i,j0=/[\s,]+/,z0=/\swidth=(['"]).*?\1/gi,Y0=/\sheight=(['"]).*?\1/gi,zs=/\sstyle=(['"])(.*?)\1/i,q0=/^width\s*:/i,V0=/^height\s*:/i,W0=/^max-width\s*:/i,Ys=/^<svg/i,Mc=e=>{let t=e.match(Pc);if(!t)return null;let r=t[0].match($0),n=r?.[2];if(!n)return null;let i=n.trim().split(j0).map(l=>Number.parseFloat(l));if(i.length<4||i.slice(0,4).some(Number.isNaN))return null;let a=i[2],s=i[3];return a>0&&s>0?{height:s,width:a}:null},Q0=e=>{let t=e.match(Pc);if(!t)return e;try{let r=t[0],n=Mc(e);if(!n)return e;let{width:i,height:a}=n,s=r.replace(z0,"").replace(Y0,""),l=s.match(zs),o=`width:${i}px;height:${a}px;max-width:none;`;if(l){let u=l[1],h=l[2].split(";").map(p=>p.trim()).filter(Boolean).filter(p=>!(q0.test(p)||V0.test(p)||W0.test(p))).join(";"),f=`${o}${h?`${h};`:""}`;s=s.replace(zs,` style=${u}${f}${u}`)}else s=s.replace(Ys,`<svg style="${o}"`);return s=s.replace(Ys,`<svg width="${i}" height="${a}"`),e.replace(r,s)}catch{return e}},G0=e=>{if(typeof DOMParser>"u"||typeof XMLSerializer>"u")return e;let t=new DOMParser().parseFromString(e,"text/html").querySelector("svg");return t?new XMLSerializer().serializeToString(t):e},K0=(e,t)=>{var r;let n=(r=void 0)!=null?r:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),l=new Image;l.crossOrigin="anonymous",l.onload=()=>{let o=document.createElement("canvas"),u=l.width*n,h=l.height*n;o.width=u,o.height=h;let f=o.getContext("2d");if(!f){a(new Error("Failed to create 2D canvas context for PNG export"));return}f.drawImage(l,0,0,u,h),o.toBlob(p=>{if(!p){a(new Error("Failed to create PNG blob"));return}i(p)},"image/png")},l.onerror=()=>a(new Error("Failed to load SVG image")),l.src=s})},Bc=({chart:e,children:t,className:r,onDownload:n,config:i,onError:a})=>{let s=te(),[l,o]=(0,x.useState)(!1),u=(0,x.useRef)(null),{isAnimating:h,controls:f}=(0,x.useContext)(ye),p=Ze(),d=ua(),g=nt(),N=aa(f,"mermaid","diagram"),C=async _=>{try{if(_==="mmd"){qt(`${N}.mmd`,e,"text/plain"),o(!1),n?.(_);return}if(!d){a?.(new Error("Mermaid plugin not available"));return}let v=d.getMermaid(i),y=e.split("").reduce(($,j)=>($<<5)-$+j.charCodeAt(0)|0,0),D=`mermaid-${Math.abs(y)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:F}=await v.render(D,e);if(!F){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}let w=G0(F);if(_==="svg"){qt(`${N}.svg`,w,"image/svg+xml"),o(!1),n?.(_);return}if(_==="png"){let $=await K0(w);qt(`${N}.png`,$,"image/png"),n?.(_),o(!1);return}}catch(v){a?.(v)}};return(0,x.useEffect)(()=>{let _=v=>{let y=v.composedPath();u.current&&!y.includes(u.current)&&o(!1)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[]),(0,T.jsxs)("div",{className:s("relative"),ref:u,children:[(0,T.jsx)("button",{"aria-label":g.downloadDiagram,className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:h,onClick:()=>o(!l),title:g.downloadDiagram,type:"button",children:t??(0,T.jsx)(p.DownloadIcon,{"aria-hidden":"true",size:14})}),l?(0,T.jsxs)("div",{className:s("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,T.jsx)("button",{"aria-label":g.downloadDiagramAsSvg,className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("svg"),title:g.downloadDiagramAsSvg,type:"button",children:g.mermaidFormatSvg}),(0,T.jsx)("button",{"aria-label":g.downloadDiagramAsPng,className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("png"),title:g.downloadDiagramAsPng,type:"button",children:g.mermaidFormatPng}),(0,T.jsx)("button",{"aria-label":g.downloadDiagramAsMmd,className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("mmd"),title:g.downloadDiagramAsMmd,type:"button",children:g.mermaidFormatMmd})]}):null]})},X0=({chart:e,config:t,onFullscreen:r,onExit:n,className:i,...a})=>{let{Maximize2Icon:s,XIcon:l}=Ze(),o=te(),[u,h]=(0,x.useState)(!1),{isAnimating:f,controls:p,portal:d}=(0,x.useContext)(ye),g=nt(),N=(()=>{if(typeof p=="boolean")return p;let y=p.mermaid;return y===!1?!1:y===!0||y===void 0?!0:y.panZoom!==!1})(),C=(()=>{if(typeof p=="boolean")return p;let y=p.mermaid;return y===!1?!1:y===!0||y===void 0?!0:y.download!==!1})(),_=(()=>{if(typeof p=="boolean")return p;let y=p.mermaid;return y===!1?!1:y===!0||y===void 0?!0:y.copy!==!1})(),v=()=>{h(!u)};return(0,x.useEffect)(()=>{if(u){la();let y=D=>{D.key==="Escape"&&h(!1)};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),oa()}}},[u]),(0,x.useEffect)(()=>{u?r?.():n&&n()},[u,r,n]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:f,onClick:v,title:g.viewFullscreen,type:"button",...a,"aria-label":g.viewFullscreen,children:(0,T.jsx)(s,{"aria-hidden":"true",size:14})}),u?(0,Ii.createPortal)((0,T.jsxs)("div",{"aria-label":g.viewFullscreen,"aria-modal":"true",className:o("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),"data-streamdown":"mermaid-fullscreen",onClick:v,onKeyDown:y=>{y.key==="Escape"&&v()},role:"dialog",children:[(0,T.jsxs)("div",{className:o("absolute top-4 right-4 z-10 flex items-center gap-1"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:[C?(0,T.jsx)(Bc,{chart:e,config:t}):null,_?(0,T.jsx)(yi,{code:e}):null,(0,T.jsx)("button",{"aria-label":g.exitFullscreen,className:o("rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:v,title:g.exitFullscreen,type:"button",children:(0,T.jsx)(l,{"aria-hidden":"true",size:20})})]}),(0,T.jsx)("div",{className:o("flex size-full items-center justify-center p-4"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:(0,T.jsx)(Ey,{chart:e,className:o("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:N})})]}),sa(d)):null]})};function Ci(e){var t;if(e.nodeType===Node.TEXT_NODE)return(t=e.textContent)!=null?t:"";if(e.nodeType!==Node.ELEMENT_NODE)return"";let r=e;return r.tagName==="BR"?`
124
124
  `:Array.from(r.childNodes).map(Ci).join("")}var Fc=e=>{let t=[],r=[],n=e.querySelectorAll("thead th");for(let a of n)t.push(Ci(a).trim());let i=e.querySelectorAll("tbody tr");for(let a of i){let s=[],l=a.querySelectorAll("td");for(let o of l)s.push(Ci(o).trim());r.push(s)}return{headers:t,rows:r}},Hc=e=>{var t;if(typeof e!="object")return",";let r=e.table;return typeof r!="object"?",":(t=r.csvSeparator)!=null?t:","},Uc=(e,t=",")=>{let r;t==="auto"?Intl.NumberFormat().format(1.1).includes(",")?r=";":r=",":r=t;let{headers:n,rows:i}=e,a=u=>{let h=!1;for(let f of u)if(f===r||f==='"'||f===`
125
125
  `||f==="\r"){h=!0;break}return h?`"${u.replace(/"/g,'""')}"`:u},s=n.length>0?i.length+1:i.length,l=new Array(s),o=0;n.length>0&&(l[o]=n.map(a).join(r),o+=1);for(let u of i)l[o]=u.map(a).join(r),o+=1;return l.join(`
@@ -129,7 +129,7 @@ $$`:`${e}$$`},Ek=e=>pk(e)%2===0?e:gk(e),Tk=e=>mk(e)%2===1?`${e}$`:e,mi="streamdo
129
129
  `)},Xn=e=>{let t=!1;for(let n of e)if(n==="\\"||n==="|"||n===`
130
130
  `||n==="&"||n==="<"||n===">"){t=!0;break}if(!t)return e;let r=[];for(let n of e)n==="\\"?r.push("\\\\"):n==="|"?r.push("\\|"):n===`
131
131
  `?r.push("<br>"):n==="&"?r.push("&amp;"):n==="<"?r.push("&lt;"):n===">"?r.push("&gt;"):r.push(n);return r.join("")},$c=e=>{let{headers:t,rows:r}=e;if(t.length===0)return"";let n=new Array(r.length+2),i=0,a=t.map(l=>Xn(l));n[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let l=0;l<t.length;l+=1)s[l]="---";n[i]=`| ${s.join(" | ")} |`,i+=1;for(let l of r)if(l.length<t.length){let o=new Array(t.length);for(let u=0;u<t.length;u+=1)o[u]=u<l.length?Xn(l[u]):"";n[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=l.map(u=>Xn(u));n[i]=`| ${o.join(" | ")} |`,i+=1}return n.join(`
132
- `)},jc=({children:e,className:t,onCopy:r,onError:n,timeout:i=2e3})=>{let a=te(),[s,l]=(0,x.useState)(!1),[o,u]=(0,x.useState)(!1),h=(0,x.useRef)(null),f=(0,x.useRef)(0),{isAnimating:p,controls:d}=(0,x.useContext)(ye),g=nt(),N=Hc(d),C=async y=>{var D,F;if(typeof window>"u"||!((D=navigator?.clipboard)!=null&&D.write)){n?.(new Error("Clipboard API not available"));return}try{let w=(F=h.current)==null?void 0:F.closest('[data-streamdown="table-wrapper"]'),$=w?.querySelector("table");if(!$){n?.(new Error("Table not found"));return}let j=Fc($),q="";y==="csv"?q=Uc(j,N):y==="tsv"?q=Z0(j):q=$c(j);let I=new ClipboardItem({"text/plain":new Blob([q],{type:"text/plain"}),"text/html":new Blob([$.outerHTML],{type:"text/html"})});await navigator.clipboard.write([I]),u(!0),l(!1),r?.(y),f.current=window.setTimeout(()=>u(!1),i)}catch(w){n?.(w)}};(0,x.useEffect)(()=>{let y=D=>{let F=D.composedPath();h.current&&!F.includes(h.current)&&l(!1)};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y),window.clearTimeout(f.current)}},[]);let _=Ze(),v=o?_.CheckIcon:_.CopyIcon;return(0,T.jsxs)("div",{className:a("relative"),ref:h,children:[(0,T.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:p,onClick:()=>l(!s),title:g.copyTable,type:"button",children:e??(0,T.jsx)(v,{height:14,width:14})}),s?(0,T.jsxs)("div",{className:a("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,T.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("md"),title:g.copyTableAsMarkdown,type:"button",children:g.tableFormatMarkdown}),(0,T.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("csv"),title:g.copyTableAsCsv,type:"button",children:g.tableFormatCsv}),(0,T.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("tsv"),title:g.copyTableAsTsv,type:"button",children:g.tableFormatTsv})]}):null]})},zc=({children:e,className:t,onDownload:r,onError:n})=>{let i=te(),[a,s]=(0,x.useState)(!1),l=(0,x.useRef)(null),{isAnimating:o,controls:u}=(0,x.useContext)(ye),h=nt(),f=Ze(),p=Hc(u),d=g=>{var N;try{let C=(N=l.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),_=C?.querySelector("table");if(!_){n?.(new Error("Table not found"));return}let v=Fc(_),y=g==="csv"?Uc(v,p):$c(v),D=g==="csv"?"csv":"md";qt(`${aa(u,"table","table")}.${D}`,y,g==="csv"?"text/csv":"text/markdown"),s(!1),r?.(g)}catch(C){n?.(C)}};return(0,x.useEffect)(()=>{let g=N=>{let C=N.composedPath();l.current&&!C.includes(l.current)&&s(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[]),(0,T.jsxs)("div",{className:i("relative"),ref:l,children:[(0,T.jsx)("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:()=>s(!a),title:h.downloadTable,type:"button",children:e??(0,T.jsx)(f.DownloadIcon,{size:14})}),a?(0,T.jsxs)("div",{className:i("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,T.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("csv"),title:h.downloadTableAsCsv,type:"button",children:h.tableFormatCsv}),(0,T.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("markdown"),title:h.downloadTableAsMarkdown,type:"button",children:h.tableFormatMarkdown})]}):null]})},J0=({children:e,className:t,showCopy:r=!0,showDownload:n=!0})=>{let{Maximize2Icon:i,XIcon:a}=Ze(),s=te(),[l,o]=(0,x.useState)(!1),{isAnimating:u,portal:h}=(0,x.useContext)(ye),f=nt(),p=()=>{o(!0)},d=()=>{o(!1)};return(0,x.useEffect)(()=>{if(l){la();let g=N=>{N.key==="Escape"&&o(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),oa()}}},[l]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:p,title:f.viewFullscreen,type:"button",children:(0,T.jsx)(i,{size:14})}),l?(0,Ii.createPortal)((0,T.jsx)("div",{"aria-label":f.viewFullscreen,"aria-modal":"true",className:s("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:d,onKeyDown:g=>{g.key==="Escape"&&d()},role:"dialog",children:(0,T.jsxs)("div",{className:s("flex h-full flex-col"),"data-streamdown":"table-wrapper",onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:[(0,T.jsxs)("div",{className:s("flex items-center justify-end gap-1 p-4"),children:[r?(0,T.jsx)(jc,{}):null,n?(0,T.jsx)(zc,{}):null,(0,T.jsx)("button",{className:s("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:d,title:f.exitFullscreen,type:"button",children:(0,T.jsx)(a,{size:20})})]}),(0,T.jsx)("div",{className:s("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:(0,T.jsx)("table",{className:s("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),sa(h)):null]})},e1=({children:e,className:t,maxHeight:r,showControls:n,showCopy:i=!0,showDownload:a=!0,showFullscreen:s=!0,...l})=>{let o=te(),{isAnimating:u}=(0,x.useContext)(ye),h=vc(r),f=wc(u,!!h,e),p=n&&i,d=n&&a,g=n&&s,N=p||d||g;return(0,T.jsxs)("div",{className:o("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[N?(0,T.jsxs)("div",{className:o("flex items-center justify-end gap-1"),children:[p?(0,T.jsx)(jc,{}):null,d?(0,T.jsx)(zc,{}):null,g?(0,T.jsx)(J0,{showCopy:p,showDownload:d,children:e}):null]}):null,(0,T.jsx)("div",{className:o("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),ref:f,style:h?{maxHeight:h}:void 0,children:(0,T.jsx)("table",{className:o("w-full divide-y divide-border",t),"data-streamdown":"table",...l,children:e})})]})},t1=/startLine=(\d+)/,r1=/\bnoLineNumbers\b/,n1=(0,x.lazy)(()=>fl(()=>import("./mermaid-MCJ5UELQ-84PBltPS.js").then(e=>({default:e.Mermaid})),[])),i1=/language-([^\s]+)/,a1="node";function pe(e,t){let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;let n=e,i=t;for(let a of r)if(a!==a1&&!Object.is(n[a],i[a]))return!1;return!0}function s1(e,t){var r,n;return((r=e?.properties)==null?void 0:r.metastring)===((n=t?.properties)==null?void 0:n.metastring)}var dn=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Zn=(e,t)=>{if(typeof e=="boolean")return e;let r=e.table;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},qs=(e,t)=>{if(typeof e=="boolean")return e;let r=e.code;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},Gr=(e,t)=>{if(typeof e=="boolean")return e;let r=e.mermaid;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},l1=(e,t)=>{if(typeof e=="boolean")return e;let r=e.image;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},ha=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e})},(e,t)=>pe(e,t));ha.displayName="MarkdownOl";var Yc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{var i;let a=te(),s=Array.isArray(e)?e.filter(o=>o!==`
132
+ `)},jc=({children:e,className:t,onCopy:r,onError:n,timeout:i=2e3})=>{let a=te(),[s,l]=(0,x.useState)(!1),[o,u]=(0,x.useState)(!1),h=(0,x.useRef)(null),f=(0,x.useRef)(0),{isAnimating:p,controls:d}=(0,x.useContext)(ye),g=nt(),N=Hc(d),C=async y=>{var D,F;if(typeof window>"u"||!((D=navigator?.clipboard)!=null&&D.write)){n?.(new Error("Clipboard API not available"));return}try{let w=(F=h.current)==null?void 0:F.closest('[data-streamdown="table-wrapper"]'),$=w?.querySelector("table");if(!$){n?.(new Error("Table not found"));return}let j=Fc($),q="";y==="csv"?q=Uc(j,N):y==="tsv"?q=Z0(j):q=$c(j);let I=new ClipboardItem({"text/plain":new Blob([q],{type:"text/plain"}),"text/html":new Blob([$.outerHTML],{type:"text/html"})});await navigator.clipboard.write([I]),u(!0),l(!1),r?.(y),f.current=window.setTimeout(()=>u(!1),i)}catch(w){n?.(w)}};(0,x.useEffect)(()=>{let y=D=>{let F=D.composedPath();h.current&&!F.includes(h.current)&&l(!1)};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y),window.clearTimeout(f.current)}},[]);let _=Ze(),v=o?_.CheckIcon:_.CopyIcon;return(0,T.jsxs)("div",{className:a("relative"),ref:h,children:[(0,T.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:p,onClick:()=>l(!s),title:g.copyTable,type:"button",children:e??(0,T.jsx)(v,{height:14,width:14})}),s?(0,T.jsxs)("div",{className:a("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,T.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("md"),title:g.copyTableAsMarkdown,type:"button",children:g.tableFormatMarkdown}),(0,T.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("csv"),title:g.copyTableAsCsv,type:"button",children:g.tableFormatCsv}),(0,T.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>C("tsv"),title:g.copyTableAsTsv,type:"button",children:g.tableFormatTsv})]}):null]})},zc=({children:e,className:t,onDownload:r,onError:n})=>{let i=te(),[a,s]=(0,x.useState)(!1),l=(0,x.useRef)(null),{isAnimating:o,controls:u}=(0,x.useContext)(ye),h=nt(),f=Ze(),p=Hc(u),d=g=>{var N;try{let C=(N=l.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),_=C?.querySelector("table");if(!_){n?.(new Error("Table not found"));return}let v=Fc(_),y=g==="csv"?Uc(v,p):$c(v),D=g==="csv"?"csv":"md";qt(`${aa(u,"table","table")}.${D}`,y,g==="csv"?"text/csv":"text/markdown"),s(!1),r?.(g)}catch(C){n?.(C)}};return(0,x.useEffect)(()=>{let g=N=>{let C=N.composedPath();l.current&&!C.includes(l.current)&&s(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[]),(0,T.jsxs)("div",{className:i("relative"),ref:l,children:[(0,T.jsx)("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:()=>s(!a),title:h.downloadTable,type:"button",children:e??(0,T.jsx)(f.DownloadIcon,{size:14})}),a?(0,T.jsxs)("div",{className:i("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,T.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("csv"),title:h.downloadTableAsCsv,type:"button",children:h.tableFormatCsv}),(0,T.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("markdown"),title:h.downloadTableAsMarkdown,type:"button",children:h.tableFormatMarkdown})]}):null]})},J0=({children:e,className:t,showCopy:r=!0,showDownload:n=!0})=>{let{Maximize2Icon:i,XIcon:a}=Ze(),s=te(),[l,o]=(0,x.useState)(!1),{isAnimating:u,portal:h}=(0,x.useContext)(ye),f=nt(),p=()=>{o(!0)},d=()=>{o(!1)};return(0,x.useEffect)(()=>{if(l){la();let g=N=>{N.key==="Escape"&&o(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),oa()}}},[l]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:p,title:f.viewFullscreen,type:"button",children:(0,T.jsx)(i,{size:14})}),l?(0,Ii.createPortal)((0,T.jsx)("div",{"aria-label":f.viewFullscreen,"aria-modal":"true",className:s("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:d,onKeyDown:g=>{g.key==="Escape"&&d()},role:"dialog",children:(0,T.jsxs)("div",{className:s("flex h-full flex-col"),"data-streamdown":"table-wrapper",onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:[(0,T.jsxs)("div",{className:s("flex items-center justify-end gap-1 p-4"),children:[r?(0,T.jsx)(jc,{}):null,n?(0,T.jsx)(zc,{}):null,(0,T.jsx)("button",{className:s("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:d,title:f.exitFullscreen,type:"button",children:(0,T.jsx)(a,{size:20})})]}),(0,T.jsx)("div",{className:s("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:(0,T.jsx)("table",{className:s("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),sa(h)):null]})},e1=({children:e,className:t,maxHeight:r,showControls:n,showCopy:i=!0,showDownload:a=!0,showFullscreen:s=!0,...l})=>{let o=te(),{isAnimating:u}=(0,x.useContext)(ye),h=vc(r),f=wc(u,!!h,e),p=n&&i,d=n&&a,g=n&&s,N=p||d||g;return(0,T.jsxs)("div",{className:o("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[N?(0,T.jsxs)("div",{className:o("flex items-center justify-end gap-1"),children:[p?(0,T.jsx)(jc,{}):null,d?(0,T.jsx)(zc,{}):null,g?(0,T.jsx)(J0,{showCopy:p,showDownload:d,children:e}):null]}):null,(0,T.jsx)("div",{className:o("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),ref:f,style:h?{maxHeight:h}:void 0,children:(0,T.jsx)("table",{className:o("w-full divide-y divide-border",t),"data-streamdown":"table",...l,children:e})})]})},t1=/startLine=(\d+)/,r1=/\bnoLineNumbers\b/,n1=(0,x.lazy)(()=>fl(()=>import("./mermaid-MCJ5UELQ-DXZIWzsB.js").then(e=>({default:e.Mermaid})),[])),i1=/language-([^\s]+)/,a1="node";function pe(e,t){let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;let n=e,i=t;for(let a of r)if(a!==a1&&!Object.is(n[a],i[a]))return!1;return!0}function s1(e,t){var r,n;return((r=e?.properties)==null?void 0:r.metastring)===((n=t?.properties)==null?void 0:n.metastring)}var dn=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Zn=(e,t)=>{if(typeof e=="boolean")return e;let r=e.table;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},qs=(e,t)=>{if(typeof e=="boolean")return e;let r=e.code;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},Gr=(e,t)=>{if(typeof e=="boolean")return e;let r=e.mermaid;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},l1=(e,t)=>{if(typeof e=="boolean")return e;let r=e.image;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},ha=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e})},(e,t)=>pe(e,t));ha.displayName="MarkdownOl";var Yc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{var i;let a=te(),s=Array.isArray(e)?e.filter(o=>o!==`
133
133
  `&&o!==""):[e],l=s.length===1&&(0,x.isValidElement)(s[0])&&(s[0].type===fa||((i=s[0].props.node)==null?void 0:i.tagname)==="p")?s[0].props.children:e;return(0,T.jsx)("li",{className:a("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:l})},(e,t)=>pe(e,t));Yc.displayName="MarkdownLi";var qc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e})},(e,t)=>pe(e,t));qc.displayName="MarkdownUl";var Vc=(0,x.memo)(({className:e,node:t,...r})=>{let n=te();return(0,T.jsx)("hr",{className:n("my-6 border-border",e),"data-streamdown":"horizontal-rule",...r})},(e,t)=>pe(e,t));Vc.displayName="MarkdownHr";var Wc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("span",{className:i("font-semibold",t),"data-streamdown":"strong",...n,children:e})},(e,t)=>pe(e,t));Wc.displayName="MarkdownStrong";var o1=({children:e,className:t,href:r,node:n,...i})=>{let a=te(),{linkSafety:s}=(0,x.useContext)(ye),[l,o]=(0,x.useState)(!1),u=r==="streamdown:incomplete-link",h=(0,x.useCallback)(async g=>{if(!(!(s!=null&&s.enabled&&r)||u)){if(g.preventDefault(),s.onLinkCheck&&await s.onLinkCheck(r)){window.open(r,"_blank","noreferrer");return}o(!0)}},[s,r,u]),f=(0,x.useCallback)(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),p=(0,x.useCallback)(()=>{o(!1)},[]),d={url:r??"",isOpen:l,onClose:p,onConfirm:f};return s!=null&&s.enabled&&r?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{className:a("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:h,type:"button",children:e}),s.renderModal?s.renderModal(d):(0,T.jsx)(H0,{...d})]}):(0,T.jsx)("a",{className:a("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...i,children:e})},Qc=(0,x.memo)(o1,(e,t)=>pe(e,t));Qc.displayName="MarkdownA";var Gc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e})},(e,t)=>pe(e,t));Gc.displayName="MarkdownH1";var Kc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e})},(e,t)=>pe(e,t));Kc.displayName="MarkdownH2";var Xc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e})},(e,t)=>pe(e,t));Xc.displayName="MarkdownH3";var Zc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e})},(e,t)=>pe(e,t));Zc.displayName="MarkdownH4";var Jc=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e})},(e,t)=>pe(e,t));Jc.displayName="MarkdownH5";var eu=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e})},(e,t)=>pe(e,t));eu.displayName="MarkdownH6";var tu=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let{controls:i,tableMaxHeight:a}=(0,x.useContext)(ye),s=dn(i,"table"),l=Zn(i,"copy"),o=Zn(i,"download"),u=Zn(i,"fullscreen");return(0,T.jsx)(e1,{className:t,maxHeight:a,showControls:s,showCopy:l,showDownload:o,showFullscreen:u,...n,children:e})},(e,t)=>pe(e,t));tu.displayName="MarkdownTable";var ru=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e})},(e,t)=>pe(e,t));ru.displayName="MarkdownThead";var nu=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...n,children:e})},(e,t)=>pe(e,t));nu.displayName="MarkdownTbody";var iu=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("tr",{className:i("border-border",t),"data-streamdown":"table-row",...n,children:e})},(e,t)=>pe(e,t));iu.displayName="MarkdownTr";var au=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...n,children:e})},(e,t)=>pe(e,t));au.displayName="MarkdownTh";var su=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e})},(e,t)=>pe(e,t));su.displayName="MarkdownTd";var lu=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...n,children:e})},(e,t)=>pe(e,t));lu.displayName="MarkdownBlockquote";var ou=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...n,children:e})},(e,t)=>pe(e,t));ou.displayName="MarkdownSup";var cu=(0,x.memo)(({children:e,className:t,node:r,...n})=>{let i=te();return(0,T.jsx)("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...n,children:e})},(e,t)=>pe(e,t));cu.displayName="MarkdownSub";var uu=(0,x.memo)(({children:e,className:t,node:r,...n})=>{if("data-footnotes"in n){let i=s=>{var l,o;if(!(0,x.isValidElement)(s))return!1;let u=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,f=!1;for(let p of u)if(p){if(typeof p=="string")p.trim()!==""&&(h=!0);else if((0,x.isValidElement)(p))if(((l=p.props)==null?void 0:l["data-footnote-backref"])!==void 0)f=!0;else{let d=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let g of d){if(typeof g=="string"&&g.trim()!==""){h=!0;break}if((0,x.isValidElement)(g)&&((o=g.props)==null?void 0:o["data-footnote-backref"])===void 0){h=!0;break}}}}return f&&!h},a=Array.isArray(e)?e.map(s=>{if(!(0,x.isValidElement)(s))return s;if(s.type===ha){let l=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(o=>!i(o));return l.length===0?null:{...s,props:{...s.props,children:l}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?(0,T.jsx)("section",{className:t,...n,children:a}):null}return(0,T.jsx)("section",{className:t,...n,children:e})},(e,t)=>pe(e,t));uu.displayName="MarkdownSection";var c1=({node:e,className:t,children:r,...n})=>{var i,a;let s=te(),l=!("data-block"in n),{mermaid:o,controls:u,lineNumbers:h}=(0,x.useContext)(ye),f=ua(),p=Ic(),d=t?.match(i1),g=(i=d?.at(1))!=null?i:"",N=U0(g);if(l)return(0,T.jsx)("code",{className:s("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...n,children:r});let C=(a=e?.properties)==null?void 0:a.metastring,_=C?.match(t1),v=_?Number.parseInt(_[1],10):void 0,y=v!==void 0&&v>=1?v:void 0,D=!(C&&r1.test(C))&&h!==!1,F="";if((0,x.isValidElement)(r)&&r.props&&typeof r.props=="object"&&"children"in r.props&&typeof r.props.children=="string"?F=r.props.children:typeof r=="string"&&(F=r),N){let U=N.component;return(0,T.jsx)(x.Suspense,{fallback:(0,T.jsx)(js,{}),children:(0,T.jsx)(U,{code:F,isIncomplete:p,language:g,meta:C})})}if(g==="mermaid"&&f){let U=dn(u,"mermaid"),H=Gr(u,"download"),K=Gr(u,"copy"),ie=Gr(u,"fullscreen"),W=Gr(u,"panZoom"),Y=U&&(H||K||ie);return(0,T.jsx)(x.Suspense,{fallback:(0,T.jsx)(js,{}),children:(0,T.jsxs)("div",{className:s("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,T.jsx)("div",{className:s("flex h-8 items-center text-muted-foreground text-xs"),children:(0,T.jsx)("span",{className:s("ml-1 font-mono lowercase"),children:"mermaid"})}),Y?(0,T.jsx)("div",{className:s("pointer-events-none absolute top-2 right-2 z-10 flex items-center"),children:(0,T.jsxs)("div",{className:s("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:[H?(0,T.jsx)(Bc,{chart:F,config:o?.config}):null,K?(0,T.jsx)(yi,{code:F,...Us(u,"mermaid")}):null,ie?(0,T.jsx)(X0,{chart:F,config:o?.config}):null]})}):null,(0,T.jsx)("div",{className:s("overflow-hidden rounded-md border border-border bg-background"),children:(0,T.jsx)(n1,{chart:F,config:o?.config,showControls:W})})]})})}let w=dn(u,"code"),$=qs(u,"download"),j=qs(u,"copy"),{"data-block":q,...I}=n;return(0,T.jsx)(x0,{className:t,code:F,isIncomplete:p,language:g,lineNumbers:D,startLine:y,...I,children:w?(0,T.jsxs)(T.Fragment,{children:[$?(0,T.jsx)(M0,{code:F,language:g}):null,j?(0,T.jsx)(yi,{...Us(u,"code")}):null]}):null})},hu=(0,x.memo)(c1,(e,t)=>pe(e,t)&&s1(e.node,t.node));hu.displayName="MarkdownCode";var u1=({node:e,className:t,...r})=>{let{controls:n}=(0,x.useContext)(ye),i=dn(n,"image"),a=i&&l1(n,"download");return(0,T.jsx)(F0,{className:t,node:e,showControls:i,showDownloadControl:a,...r})},fu=(0,x.memo)(u1,(e,t)=>pe(e,t));fu.displayName="MarkdownImg";var fa=(0,x.memo)(({children:e,node:t,...r})=>{let n=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(n.length===1&&(0,x.isValidElement)(n[0])){let i=n[0].props.node,a=i?.tagName;if(a==="img")return(0,T.jsx)(T.Fragment,{children:e});if(a==="code"&&"data-block"in n[0].props)return(0,T.jsx)(T.Fragment,{children:e})}return(0,T.jsx)("p",{...r,children:e})},(e,t)=>pe(e,t));fa.displayName="MarkdownParagraph";var du={ol:ha,li:Yc,ul:qc,hr:Vc,strong:Wc,a:Qc,h1:Gc,h2:Kc,h3:Xc,h4:Zc,h5:Jc,h6:eu,table:tu,thead:ru,tbody:nu,tr:iu,th:au,td:su,blockquote:lu,code:hu,img:fu,pre:({children:e})=>(0,x.isValidElement)(e)?(0,x.cloneElement)(e,{"data-block":"true"}):e,sup:ou,sub:cu,p:fa,section:uu},h1=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,f1=new RegExp("\\p{L}","u");function pu(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,i=0;for(let a of t){if(h1.test(a)){r??="rtl",i+=1;continue}f1.test(a)&&(r??="ltr",n+=1)}return i>n?"rtl":n>i?"ltr":r??"ltr"}var d1=/^[ \t]{0,3}(`{3,}|~{3,})/,p1=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Vs=e=>{let t=e.split(`
134
134
  `),r=null,n=0;for(let i of t){let a=d1.exec(i);if(r===null){if(a){let s=a[1];r=s[0],n=s.length}}else if(a){let s=a[1],l=s[0],o=s.length;l===r&&o>=n&&(r=null,n=0)}}return r!==null},m1=e=>{let t=e.split(`
135
135
  `);for(let r of t){let n=r.trim();if(n.length>0&&n.includes("|")&&p1.test(n))return!0}return!1},g1=()=>e=>{Ve(e,"html",(t,r,n)=>{!n||typeof r!="number"||(n.children[r]={type:"text",value:t.value})})},Ws=[],Qs={allowDangerousHtml:!0},Kr=new WeakMap,E1=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,i=e.remarkRehypeOptions;if(!(r||n||i)){let o="default";return this.keyCache.set(e,o),o}let a=o=>{if(!o||o.length===0)return"";let u="";for(let h=0;h<o.length;h+=1){let f=o[h];if(h>0&&(u+=","),Array.isArray(f)){let[p,d]=f;if(typeof p=="function"){let g=Kr.get(p);g||(g=p.name,Kr.set(p,g)),u+=g}else u+=String(p);u+=":",u+=JSON.stringify(d)}else if(typeof f=="function"){let p=Kr.get(f);p||(p=f.name,Kr.set(f,p)),u+=p}else u+=String(f)}return u},s=a(r),l=`${a(n)}::${s}::${i?JSON.stringify(i):""}`;return this.keyCache.set(e,l),l}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 n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(r,t)}clear(){this.cache.clear()}},Gs=new E1,mu=e=>{let t=T1(e),r=e.children||"";return C1(t.runSync(t.parse(r),r),e)},T1=e=>{let t=Gs.get(e);if(t)return t;let r=k1(e);return Gs.set(e,r),r},b1=e=>e.some(t=>Array.isArray(t)?t[0]===ui:t===ui),k1=e=>{let t=e.rehypePlugins||Ws,r=e.remarkPlugins||Ws,n=b1(t)?r:[...r,g1],i=e.remarkRehypeOptions?{...Qs,...e.remarkRehypeOptions}:Qs;return zA().use(j_).use(n).use(xA,i).use(t)},_1=e=>e,A1=(e,t,r,n)=>{r?e.children.splice(t,1):e.children[t]={type:"text",value:n}},y1=(e,t)=>{var r;for(let n in zn)if(Object.hasOwn(zn,n)&&Object.hasOwn(e.properties,n)){let i=e.properties[n],a=zn[n];(a===null||a.includes(e.tagName))&&(e.properties[n]=(r=t(String(i||""),n,e))!=null?r:void 0)}},x1=(e,t,r,n,i,a)=>{let s=!1;return n?s=!n.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,r)),s},C1=(e,t)=>{let{allowElement:r,allowedElements:n,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:l}=t;if(r||n||i||a||l){let o=l||_1;Ve(e,(u,h,f)=>{if(u.type==="raw"&&f&&typeof h=="number")return A1(f,h,a,u.value),h;if(u.type==="element"&&(y1(u,o),x1(u,h,f,n,i,r)&&f&&typeof h=="number"))return s&&u.children?f.children.splice(h,1,...u.children):f.children.splice(h,1),h})}return Kk(e,{Fragment:T.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0})},N1=/\[\^[\w-]{1,200}\](?!:)/,S1=/\[\^[\w-]{1,200}\]:/,I1=/<([A-Za-z][\w:-]*)[\s>/]/,v1=/^ {0,3}\[[^\]]+\]:/m,w1=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ks=new Map,Xs=new Map,L1=e=>{let t=e.toLowerCase(),r=Ks.get(t);if(r)return r;let n=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Ks.set(t,n),n},R1=e=>{let t=e.toLowerCase(),r=Xs.get(t);if(r)return r;let n=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return Xs.set(t,n),n},Zs=(e,t)=>{if(w1.has(t.toLowerCase()))return 0;let r=e.match(L1(t));if(!r)return 0;let n=0;for(let i of r)i.trimEnd().endsWith("/>")||(n+=1);return n},Js=(e,t)=>{let r=e.match(R1(t));return r?r.length:0},O1=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},D1=/\r\n|\r/g,gu=e=>new ze({gfm:!0}).blockTokens(e),Ut=null,P1=`
@@ -157,4 +157,4 @@ ${p}`,i=e.length;break}if(!u.startsWith(`
157
157
 
158
158
  ${f}`,i=e.length;break}return i===0?e:n+e.slice(i)},Y1=(e,t)=>{if(!t.length)return e;let r=e;for(let n of t){let i=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${n}\\s*>)`,"gi");r=r.replace(i,(a,s,l,o)=>j1(s,l,o)),r=z1(r,n)}return r},q1=/([\\`*_~[\]|])/g,V1=e=>e.replace(q1,"\\$1"),W1=(e,t)=>{if(!t.length)return e;let r=e;for(let n of t){let i=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${n}\\s*>)`,"gi");r=r.replace(i,(a,s,l,o)=>s+V1(l).replace(/\n\n/g,"&#10;&#10;")+o)}return r},Q1=new Set(["blockquote","dd","dt","figcaption","h1","h2","h3","h4","h5","h6","li","p","td","th"]),bu=new Set(["code","kbd","pre","samp","var"]);function ku(e){return e.children.map(t=>t.type==="text"?t.value:t.type==="element"&&!bu.has(t.tagName)?ku(t):"").join("")}function G1(){return e=>{Ve(e,"element",t=>{if(bu.has(t.tagName)){t.properties??={},t.properties.dir="ltr";return}Q1.has(t.tagName)&&(t.properties??={},typeof t.properties.dir!="string"&&(t.properties.dir=pu(ku(t))))})}}var _u=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(_u).join(""):"",K1=e=>t=>{if(!e||e.length===0)return;let r=new Set(e.map(n=>n.toLowerCase()));Ve(t,"element",n=>{if(r.has(n.tagName.toLowerCase())){let i=_u(n);n.children=i?[{type:"text",value:i}]:[]}})},X1=()=>e=>{Ve(e,"code",t=>{var r,n;t.meta&&(t.data=(r=t.data)!=null?r:{},t.data.hProperties={...(n=t.data.hProperties)!=null?n:{},metastring:t.meta})})},Z1=/^([a-zA-Z][a-zA-Z\d+\-.]*:)/,J1=e=>new Set(e.map(t=>t.trim().toLowerCase()).filter(t=>t.length>0).map(t=>t.endsWith(":")?t:`${t}:`));function ey(e,t,r){var n,i;let a=(i=(n=e.position)==null?void 0:n.start)==null?void 0:i.offset;if(typeof a=="number"&&r.charCodeAt(a)===91||e.children.length!==1)return!1;let[s]=e.children;if(s.type!=="text")return!1;let l=Z1.exec(e.url);if(!l)return!1;let o=l[1].toLowerCase();return t.has(o)?o==="mailto:"?e.url===`mailto:${s.value}`:e.url===s.value||e.url===`${o}//${s.value}`:!1}var ty=(e=[])=>{let t=J1(e);return(r,n)=>{var i;if(t.size===0)return;let a=String((i=n.value)!=null?i:"");Ve(r,"link",(s,l,o)=>{if(!(!o||l===void 0)&&ey(s,t,a))return o.children.splice(l,1,...s.children),l})}},el="data-sd-caret-hidden",ry=e=>{let t=(0,x.useRef)(null),r=(0,x.useRef)(null),[n,i]=(0,x.useState)(!1);return(0,x.useEffect)(()=>i(!0),[]),(0,x.useLayoutEffect)(()=>{var a,s;let l=e&&(s=(a=t.current)==null?void 0:a.lastElementChild)!=null?s:null,o=r.current;o!==l&&(o?.removeAttribute(el),l?.setAttribute(el,""),r.current=l)}),{containerRef:t,showCaret:n||!e}},Ry=du,tl=/^[a-z]/,ny=/^[ \t]*<[\w!/?-]/,iy=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,ay=e=>typeof e!="string"||e.length===0||!ny.test(e)?e:e.replace(iy,"$1"),rl,nl,il,al,sl,ll,tn={...gt,clobberPrefix:"",protocols:{...gt.protocols,href:[...(nl=(rl=gt.protocols)==null?void 0:rl.href)!=null?nl:[],"tel","streamdown"],src:[...(al=(il=gt.protocols)==null?void 0:il.src)!=null?al:[],"streamdown"]},attributes:{...gt.attributes,code:[...(ll=(sl=gt.attributes)==null?void 0:sl.code)!=null?ll:[],"metastring"]}},Si={raw:ui,sanitize:[_o,tn],harden:[wh,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},sy={gfm:[GT,{}],codeMeta:X1},ol=Object.values(Si),ly=Object.values(sy),oy={block:" ▋",circle:" ●"},Au=["github-light","github-dark"],yu={enabled:!0},ye=(0,x.createContext)({codeBlockMaxHeight:400,shikiTheme:Au,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:yu,portal:void 0,tableMaxHeight:300}),xu=(0,x.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:r,index:n,isIncomplete:i,dir:a,animatePlugin:s,...l})=>{(0,x.useLayoutEffect)(()=>{s?.commit()});let o=typeof e=="string"&&r?ay(e):e,u=(0,T.jsx)(mu,{...l,children:o});return(0,T.jsx)(Sc.Provider,{value:i,children:a?(0,T.jsx)("div",{dir:a,style:{display:"contents"},children:u}):u})},(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(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins||!!e.animatePlugin!=!!t.animatePlugin)});xu.displayName="Block";var cy=(0,x.memo)(({children:e,mode:t="streaming",dir:r,parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:s=ol,remarkPlugins:l=ly,className:o,shikiTheme:u,mermaid:h,codeBlockMaxHeight:f=400,controls:p=!0,isAnimating:d=!1,tableMaxHeight:g=300,animated:N,BlockComponent:C=xu,parseMarkdownIntoBlocksFn:_=H1,caret:v,plugins:y,remend:D,linkSafety:F=yu,portal:w,lineNumbers:$=!0,allowedTags:j,fallbackComponent:q,literalTagContent:I,disableAutolinkProtocols:U,translations:H,icons:K,prefix:ie,onAnimationStart:W,onAnimationEnd:Y,...z})=>{let se=(0,x.useId)(),Ee=(0,x.useMemo)(()=>p0(ie),[ie]),k=(0,x.useRef)(null),Ce=(0,x.useRef)(W),we=(0,x.useRef)(Y);Ce.current=W,we.current=Y,(0,x.useEffect)(()=>{var X,le,L;if(t==="static")return;let M=k.current;if(k.current=d,M===null){d&&((X=Ce.current)==null||X.call(Ce));return}d&&!M?(le=Ce.current)==null||le.call(Ce):!d&&M&&((L=we.current)==null||L.call(we))},[d,t]);let A=(0,x.useMemo)(()=>j?Object.keys(j):[],[j]),Ne=(0,x.useMemo)(()=>{if(typeof e!="string")return"";let X=t==="streaming"&&n?Pk(e,D):e;return I&&I.length>0&&(X=W1(X,I)),A.length>0&&(X=Y1(X,A)),X},[e,t,n,D,A,I]),Te=(0,x.useMemo)(()=>_(Ne),[Ne,_]),me=(0,x.useMemo)(()=>r==="auto"?Te.map(pu):void 0,[Te,r]),Fe=(0,x.useMemo)(()=>Te.map((X,le)=>`${se}-${le}`),[Te.length,se]),ke=(0,x.useMemo)(()=>N===!0?"true":N?JSON.stringify(N):"",[N]),Q=(0,x.useRef)(null),ce=(0,x.useRef)([]),Le=(0,x.useRef)([]),ct=(0,x.useRef)(null),yt=(0,x.useRef)("");ke?(yt.current!==ke?(yt.current=ke,Q.current=Ms({maxBacklogMs:ke!=="true"?N.maxBacklogMs:void 0}),ce.current=[],Le.current=[]):Q.current||(Q.current=Ms()),d&&Q.current&&Q.current.beginPass(Q.current.now())):(Q.current=null,ce.current=[],Le.current=[],yt.current=""),(0,x.useLayoutEffect)(()=>{var X;d&&((X=Q.current)==null||X.commitPass())});let Hr=(0,x.useMemo)(()=>{var X,le;return{codeBlockMaxHeight:f,shikiTheme:(le=u??((X=y?.code)==null?void 0:X.getThemes()))!=null?le:Au,controls:p,isAnimating:d,lineNumbers:$,mode:t,mermaid:h,linkSafety:F,portal:w,tableMaxHeight:g}},[f,u,p,d,$,t,h,F,w,y?.code,g]),Ur=(0,x.useMemo)(()=>H?JSON.stringify(H):"",[H]),rr=(0,x.useMemo)(()=>({...Dc,...H}),[Ur]),nr=(0,x.useMemo)(()=>{let{inlineCode:X,...le}=a??{},L={...du,...le};if(X){let M=L.code;L.code=V=>"data-block"in V?M?(0,x.createElement)(M,V):null:(0,x.createElement)(X,V)}if(q){if(j)for(let V of Object.keys(j))Object.hasOwn(L,V)||(L[V]=q);let M={configurable:!0,enumerable:!1,value:q,writable:!1};return new Proxy(L,{getOwnPropertyDescriptor(V,ne){let oe=Object.getOwnPropertyDescriptor(V,ne);if(oe)return oe;if(typeof ne=="string"&&tl.test(ne))return M},get(V,ne,oe){return typeof ne=="string"&&tl.test(ne)&&!Object.hasOwn(V,ne)?q:Reflect.get(V,ne,oe)}})}return L},[a,q,j]),$r=(0,x.useMemo)(()=>{let X=[];return y!=null&&y.cjk&&(X=[...X,...y.cjk.remarkPluginsBefore]),X=[...X,...l],U&&U.length>0&&(X=[...X,[ty,U]]),y!=null&&y.cjk&&(X=[...X,...y.cjk.remarkPluginsAfter]),y!=null&&y.math&&(X=[...X,y.math.remarkPlugin]),X},[l,y?.math,y?.cjk,U]),ut=(0,x.useMemo)(()=>{var X;let le=s;if(j&&Object.keys(j).length>0&&s===ol){let L={...tn,tagNames:[...(X=tn.tagNames)!=null?X:[],...Object.keys(j)],attributes:{...tn.attributes,...j}};le=[Si.raw,[_o,L],Si.harden]}return I&&I.length>0&&(le=[...le,[K1,I]]),y!=null&&y.math&&(le=[...le,y.math.rehypePlugin]),r==="auto"&&t==="static"&&(le=[...le,G1]),le},[s,y?.math,j,I,r,t]),jr=(0,x.useMemo)(()=>v&&d?{"--streamdown-caret":`"${oy[v]}"`}:void 0,[v,d]),{containerRef:In,showCaret:vn}=ry((0,x.useMemo)(()=>{if(!d||Te.length===0)return!1;let X=Te.at(-1);return Vs(X)||m1(X)},[d,Te])),wn=X=>{let le=null;if(Q.current&&d){if(!ce.current[X]){let{maxBacklogMs:M,...V}=ke&&ke!=="true"?N:{};ce.current[X]=f0({...V,timeline:Q.current})}le=ce.current[X]}ct.current!==ut&&(Le.current=[],ct.current=ut),le&&!Le.current[X]&&(Le.current[X]=[...ut,le.rehypePlugin]);let L=le&&Le.current[X]?Le.current[X]:ut;return{blockAnimatePlugin:le,blockRehypePlugins:L}};return t==="static"?(0,T.jsx)(Ai.Provider,{value:rr,children:(0,T.jsx)(xi.Provider,{value:y??null,children:(0,T.jsx)(ye.Provider,{value:Hr,children:(0,T.jsx)(Hs,{icons:K,children:(0,T.jsx)(_i.Provider,{value:Ee,children:(0,T.jsx)("div",{className:Ee("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",o),dir:r==="auto"?void 0:r,children:(0,T.jsx)(mu,{components:nr,rehypePlugins:ut,remarkPlugins:$r,...z,children:Ne})})})})})})}):(0,T.jsx)(Ai.Provider,{value:rr,children:(0,T.jsx)(xi.Provider,{value:y??null,children:(0,T.jsx)(ye.Provider,{value:Hr,children:(0,T.jsx)(Hs,{icons:K,children:(0,T.jsx)(_i.Provider,{value:Ee,children:(0,T.jsxs)("div",{className:Ee("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",v&&vn?"[&>*:last-child:not([data-sd-caret-hidden])]:after:inline [&>*:last-child:not([data-sd-caret-hidden])]:after:align-baseline [&>*:last-child:not([data-sd-caret-hidden])]:after:content-[var(--streamdown-caret)]":null,o),ref:In,style:jr,children:[Te.length===0&&v&&d&&(0,T.jsx)("span",{}),Te.map((X,le)=>{var L;let M=le===Te.length-1,V=d&&M&&Vs(X),{blockAnimatePlugin:ne,blockRehypePlugins:oe}=wn(le);return(0,T.jsx)(C,{animatePlugin:ne,components:nr,content:X,dir:(L=me?.[le])!=null?L:r!=="auto"?r:void 0,index:le,isIncomplete:V,rehypePlugins:oe,remarkPlugins:$r,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:n,...z},Fe[le])})]})})})})})})},(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&&e.disableAutolinkProtocols===t.disableAutolinkProtocols&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir&&e.fallbackComponent===t.fallbackComponent);cy.displayName="Streamdown";var hr=e=>e>0?e:null,uy=(e,t)=>{if(e.endsWith("px"))return hr(Number.parseFloat(e));if(e.endsWith("rem")){let r=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||"16");return hr(Number.parseFloat(e)*r)}if(e.endsWith("em")){let r=Number.parseFloat(getComputedStyle(t).fontSize||"16");return hr(Number.parseFloat(e)*r)}if(e.endsWith("vh"))return hr(Number.parseFloat(e)/100*window.innerHeight);if(e.endsWith("%")){let r=t.parentElement;return r&&r.clientHeight>0?hr(Number.parseFloat(e)/100*r.clientHeight):null}return null},Jn=(e,t)=>{let r=t.trim().toLowerCase();return!r||r==="none"||r==="auto"?null:uy(r,e)},hy=/^min\(\s*([^,]+)\s*,\s*([^)]+)\s*\)$/i,fy=(e,t)=>{let r=Jn(e,t);if(r!=null)return r;let n=t.trim().match(hy);if(!n)return null;let i=Jn(e,n[1].trim()),a=Jn(e,n[2].trim());return i==null||a==null?null:Math.min(i,a)},dy=(e,t,r)=>{let n=t.clientWidth;if(!(n>0))return null;if(r){let h=t.clientHeight;if(!(h>0))return null;let f=Math.min(n/e.width,h/e.height,1);return!(f>0)||Number.isNaN(f)?null:{fitZoom:f,viewportHeight:null}}let i=Math.min(n/e.width,1);if(!(i>0)||Number.isNaN(i))return null;let a=e.height*i,s=null,l=t;for(;l&&s==null;){let h=getComputedStyle(l);s=fy(l,h.maxHeight),l=l.parentElement}let o=s!=null?Math.min(a,s):a,u=Math.min(i,o/e.height,1);return!(u>0)||Number.isNaN(u)?null:{fitZoom:u,viewportHeight:o}},py=({children:e,className:t,contentSize:r,fitKey:n,minZoom:i=.5,maxZoom:a=3,zoomStep:s=.1,showControls:l=!0,initialZoom:o=1,isAutoFit:u=!1,fullscreen:h=!1})=>{let{RotateCcwIcon:f,ZoomInIcon:p,ZoomOutIcon:d}=Ze(),g=te(),N=nt(),C=(0,x.useRef)(null),_=(0,x.useRef)(null),v=(0,x.useRef)(!1),[y,D]=(0,x.useState)(o),[F,w]=(0,x.useState)(i),[$,j]=(0,x.useState)(o),[q,I]=(0,x.useState)({x:0,y:0}),[U,H]=(0,x.useState)(!1),[K,ie]=(0,x.useState)({x:0,y:0}),[W,Y]=(0,x.useState)({x:0,y:0}),[z,se]=(0,x.useState)(null),Ee=(0,x.useCallback)(Q=>{let ce=C.current;if(!ce)return;let Le=dy(Q,ce,h);if(!Le)return;let{fitZoom:ct,viewportHeight:yt}=Le;se(yt),D(ct),w(Math.min(i,ct)),v.current||(j(ct),I({x:0,y:0}))},[h,i]),k=(0,x.useCallback)(Q=>{j(ce=>Math.max(F,Math.min(a,ce+Q))),v.current=!0},[F,a]),Ce=(0,x.useCallback)(()=>{k(s)},[k,s]),we=(0,x.useCallback)(()=>{k(-s)},[k,s]),A=(0,x.useCallback)(()=>{j(y),I({x:0,y:0}),v.current=!1},[y]),Ne=(0,x.useCallback)(Q=>{Q.preventDefault();let ce=Q.deltaY>0?-s:s;k(ce)},[k,s]),Te=(0,x.useCallback)(Q=>{if(Q.button!==0||Q.isPrimary===!1)return;H(!0),v.current=!0,ie({x:Q.clientX,y:Q.clientY}),Y(q);let ce=Q.currentTarget;ce instanceof HTMLElement&&ce.setPointerCapture(Q.pointerId)},[q]),me=(0,x.useCallback)(Q=>{if(!U)return;Q.preventDefault();let ce=Q.clientX-K.x,Le=Q.clientY-K.y;I({x:W.x+ce,y:W.y+Le})},[U,K,W]),Fe=(0,x.useCallback)(Q=>{H(!1);let ce=Q.currentTarget;ce instanceof HTMLElement&&ce.releasePointerCapture(Q.pointerId)},[]);(0,x.useEffect)(()=>{w(i),u||(D(o),j(o),se(null))},[o,u,i]),(0,x.useLayoutEffect)(()=>{if(!(u&&r))return;Ee(r);let Q=C.current;if(!Q||typeof ResizeObserver>"u")return;let ce=new ResizeObserver(()=>{Ee(r)});return ce.observe(Q),()=>{ce.disconnect()}},[Ee,r,u]),(0,x.useEffect)(()=>{u&&(v.current=!1)},[n,u]),(0,x.useEffect)(()=>{let Q=C.current;if(Q)return Q.addEventListener("wheel",Ne,{passive:!1}),()=>{Q.removeEventListener("wheel",Ne)}},[Ne]),(0,x.useEffect)(()=>{let Q=_.current;if(Q&&U)return document.body.style.userSelect="none",Q.addEventListener("pointermove",me,{passive:!1}),Q.addEventListener("pointerup",Fe),Q.addEventListener("pointercancel",Fe),()=>{document.body.style.userSelect="",Q.removeEventListener("pointermove",me),Q.removeEventListener("pointerup",Fe),Q.removeEventListener("pointercancel",Fe)}},[U,me,Fe]);let ke=!h&&u&&z!=null?{height:z}:void 0;return(0,T.jsxs)("div",{className:g("relative flex flex-col",h?"h-full w-full":"min-h-28 w-full",t),ref:C,style:{cursor:U?"grabbing":"grab",...ke},children:[l?(0,T.jsxs)("div",{className:g("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",h?"bottom-4 left-4":"bottom-2 left-2"),children:[(0,T.jsx)("button",{"aria-label":N.zoomIn,className:g("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:$>=a,onClick:Ce,title:N.zoomIn,type:"button",children:(0,T.jsx)(p,{"aria-hidden":"true",size:16})}),(0,T.jsx)("button",{"aria-label":N.zoomOut,className:g("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:$<=F,onClick:we,title:N.zoomOut,type:"button",children:(0,T.jsx)(d,{"aria-hidden":"true",size:16})}),(0,T.jsx)("button",{"aria-label":N.resetView,className:g("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:A,title:N.resetView,type:"button",children:(0,T.jsx)(f,{"aria-hidden":"true",size:16})})]}):null,(0,T.jsx)("div",{className:g("flex h-full w-full flex-1 origin-center items-center justify-center transition-transform duration-150 ease-out"),onPointerDown:Te,ref:_,role:"application",style:{transform:`translate(${q.x}px, ${q.y}px) scale(${$})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},my=(e,t)=>new Promise(r=>{let n=setTimeout(r,e);t(()=>{clearTimeout(n),r()})}),gy=async(e,{chart:t,config:r},n)=>{try{let i=e.getMermaid(r),a=t.split("").reduce((u,h)=>(u<<5)-u+h.charCodeAt(0)|0,0),s=`mermaid-${Math.abs(a)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await i.render(s,t),o=Mc(l);return{ok:!0,svg:n?l:Q0(l),size:o}}catch(i){return{ok:!1,error:i instanceof Error?i.message:"Failed to render Mermaid chart"}}},Ey=({chart:e,className:t,config:r,fullscreen:n=!1,showControls:i=!0})=>{let a=te(),[s,l]=(0,x.useState)(null),[o,u]=(0,x.useState)(!1),[h,f]=(0,x.useState)(""),[p,d]=(0,x.useState)(null),[g,N]=(0,x.useState)(""),[C,_]=(0,x.useState)(0),{mermaid:v}=(0,x.useContext)(ye),y=ua(),D=v?.errorComponent,{shouldRender:F,containerRef:w}=KA({immediate:n}),$=(0,x.useRef)(null),j=(0,x.useRef)(!1),q=(0,x.useRef)(!1),I=Ic(),U=(0,x.useRef)(I),H=(0,x.useRef)(null);(0,x.useEffect)(()=>(q.current=!0,()=>{var W;q.current=!1,(W=H.current)==null||W.call(H)}),[]),(0,x.useEffect)(()=>{var W;U.current=I,I||(W=H.current)==null||W.call(H)},[I]);let K=async W=>{U.current&&(await my(W,Y=>{H.current=Y}),H.current=null)};if((0,x.useEffect)(()=>{if(!F)return;if(!y){l("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}if($.current={chart:e,config:r},j.current)return;let W=(Y,z)=>{z.ok?(f(z.svg),d(z.size),N(z.svg)):Y===$.current&&l(z.error)};(async()=>{j.current=!0,l(null),u(!0);try{let Y=$.current;for(;Y;){let z=performance.now(),se=await gy(y,Y,n);if(!q.current||(W(Y,se),se.ok&&await K(performance.now()-z),!q.current||Y===$.current))return;Y=$.current}}finally{j.current=!1,q.current&&u(!1)}})()},[e,r,C,F,y]),!(F||h||g))return(0,T.jsx)("div",{className:a("my-4 min-h-[200px]",t),ref:w});if(o&&!h&&!g)return(0,T.jsx)("div",{className:a("my-4 flex justify-center p-4",t),ref:w,children:(0,T.jsxs)("div",{className:a("flex items-center space-x-2 text-muted-foreground"),children:[(0,T.jsx)("div",{className:a("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),(0,T.jsx)("span",{className:a("text-sm"),children:"Loading diagram..."})]})});if(s&&!h&&!g){let W=()=>_(Y=>Y+1);return D?(0,T.jsx)("div",{ref:w,children:(0,T.jsx)(D,{chart:e,error:s,retry:W})}):(0,T.jsxs)("div",{className:a("rounded-md bg-red-50 p-4",t),ref:w,children:[(0,T.jsxs)("p",{className:a("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",s]}),(0,T.jsxs)("details",{className:a("mt-2"),children:[(0,T.jsx)("summary",{className:a("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),(0,T.jsx)("pre",{className:a("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let ie=h||g;return(0,T.jsx)("div",{className:a(n?"size-full":"max-h-[min(70vh,40rem)] w-full",t),"data-streamdown":"mermaid",ref:w,children:(0,T.jsx)(py,{className:a(n?"size-full overflow-hidden":"max-h-[min(70vh,40rem)] overflow-hidden",t),contentSize:p,fitKey:e,fullscreen:n,isAutoFit:!0,maxZoom:3,minZoom:.1,showControls:i,zoomStep:.1,children:(0,T.jsx)("div",{"aria-label":"Mermaid chart",className:a("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:ie},role:"img"})})})};export{cy as a,ue as c,b0 as i,_1 as n,Ry as o,ye as r,Ey as s,Ly as t};
159
159
 
160
- //# sourceMappingURL=chunk-D32TOXHM-C-gMffNp.js.map
160
+ //# sourceMappingURL=chunk-D32TOXHM-BM6p8aoA.js.map
@@ -1,3 +1,3 @@
1
- (function(){try{var _=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};_.SENTRY_RELEASE={id:"3.27.1"};var j=new _.Error().stack;j&&(_._sentryDebugIds=_._sentryDebugIds||{},_._sentryDebugIds[j]="53c02e09-2951-4e22-97a8-02346a6cf2e3",_._sentryDebugIdIdentifier="sentry-dbid-53c02e09-2951-4e22-97a8-02346a6cf2e3")}catch{}})();(function(){const _="u">typeof window?window:void 0,j="u">typeof globalThis?globalThis:_,g=j?.document;j!=null&&j.XMLHttpRequest&&new j.XMLHttpRequest;const H=typeof globalThis<"u"?globalThis:_;H&&typeof self>"u"&&(H.self=H),H&&typeof File>"u"&&(H.File=function(){});const a=_??{};function T(e,n){return e.indexOf(n)!==-1}const G=function(e){return e.trim()},be=Object.prototype,Ye=be.hasOwnProperty,K=be.toString,ne=Array.isArray||function(e){return K.call(e)==="[object Array]"},re=e=>typeof e=="function",$=e=>e===void 0,Z=e=>K.call(e)=="[object String]",X=e=>e===null,ie=e=>$(e)||X(e),A=e=>K.call(e)=="[object Number]"&&e==e;function ye(e){return e&&e.split("#")[0]}function we(e){try{return e()}catch{return}}function Y(e){return Y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Y(e)}function ze(e,n,t){return(n=(function(r){var i=(function(s){if(Y(s)!="object"||!s)return s;var o=s[Symbol.toPrimitive];if(o!==void 0){var c=o.call(s,"string");if(Y(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(s)})(r);return Y(i)=="symbol"?i:i+""})(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ce(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,r)}return t}function R(e){for(var n=1;arguments.length>n;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Ce(Object(t),!0).forEach(function(r){ze(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}const Ee=(e,{debugEnabled:n}={})=>{const t={N(r,...i){_&&(_.POSTHOG_DEBUG||n)&&!$(_.console)&&_.console&&("__rrweb_original__"in _.console[r]?_.console[r].__rrweb_original__:_.console[r])(e,...i)},debug(...r){t.N("debug",...r)},info(...r){t.N("log",...r)},warn(...r){t.N("warn",...r)},error(...r){t.N("error",...r)},critical(...r){console.error(e,...r)},uninitializedWarning(r){t.error(`You must initialize PostHog before calling ${r}`)},createLogger:(r,i)=>Ee(`${e} ${r}`,i)};return t},se=Ee("[PostHog.js]"),Be=se.createLogger;function U(e,n){if(!ie(e))if(ne(e))e.forEach(n);else if(e instanceof FormData)e.forEach((t,r)=>n(t,r));else for(const t in e)Ye.call(e,t)&&n(e[t],t)}const We=function(e,...n){for(const t of n)for(const r in t)t[r]!==void 0&&(e[r]=t[r]);return e};function oe(e){const n=Object.keys(e);let t=n.length;const r=new Array(t);for(;t--;)r[t]=[n[t],e[n[t]]];return r}function E(e,n,t,r){const{capture:i=!1,passive:s=!0}=r??{};e?.addEventListener(n,t,{capture:i,passive:s})}function D(e){return!!e&&e.nodeType===1}function C(e,n){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===n.toLowerCase()}function xe(e){return!!e&&e.nodeType===11&&D(e.host)}function le(e){return e?G(e).split(/\s+/):[]}function V(e){let n="";switch(typeof e.className){case"string":n=e.className;break;case"object":n=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:n=""}return le(n)}function J(e){let n="";return Q(e)&&!ue(e)&&e.childNodes&&e.childNodes.length&&U(e.childNodes,function(t){var r,i;(function(s){return!!s&&s.nodeType===3})(t)&&t.textContent&&(n+=(r=ie(i=t.textContent)?null:G(i).split(/(\s+)/).filter(s=>B(s)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))!==null&&r!==void 0?r:"")}),G(n)}function ae(e){var n;return $(e.target)?e.srcElement||null:!((n=e.target)===null||n===void 0)&&n.shadowRoot?e.composedPath()[0]||null:e.target||null}const De=["a","button","form","input","select","textarea","label"];function qe(e,n){const t=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;try{return!!t&&t.call(e,n)}catch{return!1}}function Fe(e){const n=e.parentNode;return!(!n||!D(n))&&n}const Ne=[".ph-no-deadclick",".ph-no-capture"],Ge=["","text","search","email","password","url","tel","number"];function z(e){return!(!e||!D(e))&&(!!C(e,"textarea")||(C(e,"input")?T(Ge,(e.getAttribute("type")||"").toLowerCase()):(function(n){var t;if(n.isContentEditable)return!0;const r=(t=n.getAttribute)===null||t===void 0?void 0:t.call(n,"contenteditable");return r==="true"||r===""})(e)))}const ce=e=>!e||C(e,"html")||!D(e),ke=(e,n)=>{if(!_||ce(e))return{parentIsUsefulElement:!1,targetElementList:[]};let t=!1;const r=[e];let i=e;for(;i.parentNode&&!C(i,"body");){if(xe(i.parentNode)){r.push(i.parentNode.host),i=i.parentNode.host;continue}const s=Fe(i);if(!s)break;if(n||De.indexOf(s.tagName.toLowerCase())>-1)t=!0;else try{const o=_.getComputedStyle(s);o&&o.getPropertyValue("cursor")==="pointer"&&(t=!0)}catch{}r.push(s),i=s}return{parentIsUsefulElement:t,targetElementList:r}};function Q(e){const n=new Set;let t=0;for(let s=e;s.parentNode&&!C(s,"body");s=s.parentNode){if(t++>=1e3||n.has(s))return!1;n.add(s);const o=V(s);if(T(o,"ph-sensitive")||T(o,"ph-no-capture"))return!1}if(T(V(e),"ph-include"))return!0;const r=e.type||"";if(Z(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}const i=e.name||e.id||"";return!Z(i)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function ue(e){return!!(C(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||C(e,"select")||C(e,"textarea")||e.getAttribute("contenteditable")==="true")}const Me=new RegExp("^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$"),$e=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,Ke=[16,15,14,13],Ze=new RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$"),Oe=new RegExp("(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))","g"),Se=/[0-9A-Za-z_]/;function Xe(e){let n=0,t=!1;for(let r=e.length-1;r>=0;r--){let i=e.charCodeAt(r)-48;t&&(i*=2,i>9&&(i-=9)),n+=i,t=!t}return n%10==0}function B(e,n=!0){return!(ie(e)||Z(e)&&(e=G(e),(n?Me.test((e||"").replace(/[- ]/g,"")):(function(t){let r;for($e.lastIndex=0;r=$e.exec(t);){const i=r[2];if(!i)continue;const s=i.replace(/[- ]/g,"");for(let o=0;s.length>o;o++)for(const c of Ke){const p=o+c;if(s.length>=p){const l=s.slice(o,p);if(Me.test(l)&&Xe(l))return!0}}}return!1})(e))||(n?Ze.test(e):(function(t){let r;for(Oe.lastIndex=0;r=Oe.exec(t);){const i=r[1],s=r[3];if(!(i&&s&&Se.test(i)&&Se.test(s)))return!0}return!1})(e))))}function Le(e){let n=J(e);return n=`${n} ${Ae(e)}`.trim(),B(n)?n:""}function Ae(e){let n="";return e&&e.childNodes&&e.childNodes.length&&U(e.childNodes,function(t){var r;if(t&&((r=t.tagName)===null||r===void 0?void 0:r.toLowerCase())==="span")try{const i=J(t);n=`${n} ${i}`.trim(),t.childNodes&&t.childNodes.length&&(n=`${n} ${Ae(t)}`.trim())}catch(i){se.error("[AutoCapture]",i)}}),n}function Ie(e){return e.replace(/"|\\"/g,'\\"')}function Ve(e){const n=e.attr__class;if(n)return ne(n)?n:le(n)}function he(e,n){return n.length>e?n.slice(0,e)+"...":n}function Je(e){if(e.previousElementSibling)return e.previousElementSibling;let n=e;do n=n.previousSibling;while(n&&!D(n));return n}function Qe(e,{e:n,maskAllElementAttributes:t,maskAllText:r,elementAttributeIgnoreList:i,elementsChainAsString:s,disableCaptureUrlHashes:o}){var c,p;if(!D(e))return{props:{}};const l=[e],m=new Set([e]);let f=e;for(;f.parentNode&&!C(f,"body")&&1e3>l.length;){if(xe(f.parentNode)){const v=f.parentNode.host;if(m.has(v))break;m.add(v),l.push(v),f=v;continue}if(!D(f.parentNode)||m.has(f.parentNode))break;m.add(f.parentNode),l.push(f.parentNode),f=f.parentNode}const u=n.type==="click"&&e.namespaceURI==="http://www.w3.org/2000/svg"?l.findIndex(v=>C(v,"button")||C(v,"a")):-1;u>0&&(r=r||l.slice(0,u+1).some(v=>!Q(v)||ue(v)));const w=[],b={};let L,N=!1,k=!1;if(U(l,v=>{const h=Q(v);if(C(v,"a")&&!t&&!i?.includes("href")){const d=v.getAttribute("href");N=!!(h&&d&&B(d))&&(o?ye(d):d)}T(V(v),"ph-no-capture")&&(k=!0),w.push((function(d,y,x,M,I=!1){const O=d.tagName.toLowerCase(),S={tag_name:O};De.indexOf(O)>-1&&!x&&(S.$el_text=O.toLowerCase()==="a"||O.toLowerCase()==="button"?he(1024,Le(d)):he(1024,J(d)));const q=V(d);y||M!=null&&M.includes("class")||0>=q.length||(S.classes=q.filter(function(P){return P!==""})),U(d.attributes,function(P){var ge;if((!ue(d)||["name","id","class","aria-label"].indexOf(P.name)!==-1)&&!M?.includes(P.name)&&!y&&B(P.value)&&(!Z(ge=P.name)||ge.substring(0,10)!=="_ngcontent"&&ge.substring(0,7)!=="_nghost")){let te=P.value;P.name==="class"&&(te=le(te).join(" ")),S["attr__"+P.name]=he(1024,P.name==="href"&&I?ye(te):te)}});let F=1,He=1,ve=d;for(;ve=Je(ve);)F++,ve.tagName===d.tagName&&He++;return S.nth_child=F,S.nth_of_type=He,S})(v,t,r,i,o)),U((function(d){if(!Q(d))return{};const y={};return U(d.attributes,function(x){if(x.name&&x.name.indexOf("data-ph-capture-attribute")===0){const M=x.name.replace("data-ph-capture-attribute-",""),I=x.value;M&&I&&B(I)&&(y[M]=I)}}),y})(v),(d,y)=>{({}).hasOwnProperty.call(b,y)||(b[y]=d)})}),k)return{props:{},explicitNoCapture:k};if(u>0&&(e=l[u],w.splice(0,u)),r||(w[0].$el_text=C(e,"a")||C(e,"button")?Le(e):J(e)),N){var W,fe;w[0].attr__href=N;const v=(W=(d=>{const y=g?.createElement("a");return $(y)?null:(y.href=d,y)})(N))===null||W===void 0?void 0:W.host,h=_==null||(fe=_.location)===null||fe===void 0?void 0:fe.host;v&&h&&v!==h&&(L=N)}return{props:We((Ue=n.type,{$event_type:Ue,$ce_version:1}),s?{}:{$elements:w},{$elements_chain:(me=w,ne(me)?(function(v){return v.map(h=>{var d,y;let x="";if(h.tag_name&&(x+=h.tag_name),h.attr_class){h.attr_class.sort();for(const O of h.attr_class)x+=`.${O.replace(/"/g,"")}`}const M=R(R(R(R({},h.text?{text:h.text}:{}),{},{"nth-child":(d=h.nth_child)!==null&&d!==void 0?d:0,"nth-of-type":(y=h.nth_of_type)!==null&&y!==void 0?y:0},h.href?{href:h.href}:{}),h.attr_id?{attr_id:h.attr_id}:{}),h.attributes),I={};return oe(M).sort(([O],[S])=>(function(q,F){return F>q?-1:q>F?1:0})(O,S)).forEach(([O,S])=>I[Ie(O.toString())]=Ie(S.toString())),x+=":",x+=oe(I).map(([O,S])=>`${O}="${S}"`).join(""),x}).join(";")})((function(v){return v.map(h=>{var d,y;const x={text:(d=h.$el_text)===null||d===void 0?void 0:d.slice(0,400),tag_name:h.tag_name,href:(y=h.attr__href)===null||y===void 0?void 0:y.slice(0,2048),attr_class:Ve(h),attr_id:h.attr__id,nth_child:h.nth_child,nth_of_type:h.nth_of_type,attributes:{}};return oe(h).filter(([M])=>M.indexOf("attr__")===0).forEach(([M,I])=>x.attributes[M]=I),x})})(me)):"")},!((c=w[0])===null||c===void 0)&&c.$el_text?{$el_text:(p=w[0])===null||p===void 0?void 0:p.$el_text}:{},L&&n.type==="click"?{$external_click_url:L}:{},b),target:e};var me,Ue}Be("[AutoCapture]");const de={};function Pe(e,n){const t=ae(e);return t?R({node:t,originalEvent:e,timestamp:Date.now()},n):null}function pe(e){return!!we(()=>D(e))}function et(e,n){return Math.abs(e)<Math.abs(n)?0>n?"up":"down":0>e?"left":"right"}function je(e){return e.type==="swipe"?"$dead_swipe":"$dead_click"}const Re="canvas,video,audio,embed,object";function ee(e,n){return A(e)&&e>=n}function Te(e,n=1e3){return e>=0&&n>e?e:void 0}function _e(e,n,t=1e3){return A(n)?Te(e-n,t):void 0}var tt=class{ur(e){var n,t,r,i,s,o,c,p;const l=this.cr(e?.__onCapture||this.dr.bind(this));return{element_attribute_ignorelist:(n=e?.element_attribute_ignorelist)!==null&&n!==void 0?n:l.element_attribute_ignorelist,scroll_threshold_ms:(t=e?.scroll_threshold_ms)!==null&&t!==void 0?t:l.scroll_threshold_ms,selection_change_threshold_ms:(r=e?.selection_change_threshold_ms)!==null&&r!==void 0?r:l.selection_change_threshold_ms,mutation_threshold_ms:(i=e?.mutation_threshold_ms)!==null&&i!==void 0?i:l.mutation_threshold_ms,capture_clicks_with_modifier_keys:(s=e?.capture_clicks_with_modifier_keys)!==null&&s!==void 0?s:l.capture_clicks_with_modifier_keys,capture_dead_swipes:(o=e?.capture_dead_swipes)!==null&&o!==void 0?o:l.capture_dead_swipes,swipe_threshold_px:(c=e?.swipe_threshold_px)!==null&&c!==void 0?c:l.swipe_threshold_px,max_dead_swipes_per_page_load:(p=e?.max_dead_swipes_per_page_load)!==null&&p!==void 0?p:l.max_dead_swipes_per_page_load,css_selector_ignorelist:e?.css_selector_ignorelist,__onCapture:l.__onCapture}}constructor(e,n){this.instance=e,this.hr=new WeakSet,this.vr=!1,this.pr=[],this.mr=0,this.cr=t=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,capture_clicks_with_modifier_keys:!1,capture_dead_swipes:!0,swipe_threshold_px:30,max_dead_swipes_per_page_load:10,__onCapture:t}),this.gr=()=>{clearTimeout(this.yr),this.yr=void 0,this.br=void 0},this.wr=t=>{if(this.kr(t),this.gr(),t.button===0){const r={path:t.composedPath(),trusted:t.isTrusted,selectionChanged:!1,selectionInitiallyRelated:!1},i=g?.getSelection();r.selectionInitiallyRelated=i?.type==="Range"&&this._r(i,r),this.br=r}},this.Sr=t=>{X(t.relatedTarget)&&this.gr()},this.Cr=t=>{const r=this.br,i=t;if(!r||i.button!==0||t.isTrusted!==r.trusted)return;const s=t.composedPath();for(const o of r.path)if(pe(o)&&s.indexOf(o)!==-1){r.clickTarget=o;break}r.clickDetail=i.detail,this.yr=a.setTimeout(this.gr,0)},this.Mr=t=>{this.kr(t);const r=t,i=Pe(r,{type:"click"}),s=this.br;i&&s&&r.button===0&&r.detail>0&&r.detail===s.clickDetail&&t.isTrusted===s.trusted&&i.node===s.clickTarget&&(i.selectionChangedDuringGesture=s.selectionChanged&&this.Ir.selection_change_threshold_ms>0,this.gr()),X(i)||this.Tr(i)||this.Rr(i),this.Ar()},this.Er=()=>{const t=Date.now();this.$r=t,t%50==0&&this.pr.forEach(r=>{$(r.scrollDelayMs)&&(r.scrollDelayMs=t-r.timestamp)})},this.Or=t=>{var r,i;const s=g?.getSelection(),o=this.vr;this.vr=s?.type==="Range";const c=s?.focusNode,p=c&&(D(c)?c:c.parentElement),l=g?.activeElement;let m=l;for(;!(m==null||(r=m.shadowRoot)===null||r===void 0)&&r.activeElement;)m=m.shadowRoot.activeElement;const f=z(ae(t))||z(p??null)||z((i=m)!==null&&i!==void 0?i:null),u=s?.type==="Caret"&&m&&!m.shadowRoot&&c&&c!==l&&c.contains(l??null);if(!(o||this.vr||f||u))return;const w=Date.now();this.Lr=w;const b=this.br;if(b&&(o||this.vr||f)){const N=ae(t);let k;if(z(N))k=N;else if(s?.type==="Caret"){var L;z((L=m)!==null&&L!==void 0?L:null)||u?k=m:f&&(k=p)}const W=k?this.Pr(k,b):s&&(c||s.anchorNode)?this._r(s,b):o&&!this.vr&&b.selectionInitiallyRelated;b.selectionChanged=b.selectionChanged||W}this.pr.forEach(N=>{const k=w-N.timestamp;0>k||!$(N.selectionChangedDelayMs)&&k>=N.selectionChangedDelayMs||(N.selectionChangedDelayMs=k)})},this.sn=()=>{g?.visibilityState==="hidden"&&this.gr();const t=Date.now();this.Dr=t,this.Fr("visibilityChangedDelayMs",t)},this.Nr=()=>{const t=Date.now();this.qr=t,this.Fr("focusChangedDelayMs",t)},this.jr=t=>{this.kr(t);const r=t.touches,i=r?.length===1?r[0]:void 0;this.Br=i?{x:i.clientX,y:i.clientY,timestamp:Date.now()}:void 0},this.Hr=()=>{this.Br=void 0},this.zr=t=>{var r;const i=this.Br;if(this.Br=void 0,$(i)||this.mr>=this.Ir.max_dead_swipes_per_page_load)return;const s=t,o=(r=s.changedTouches)===null||r===void 0?void 0:r[0];if(!o)return;const c=o.clientX-i.x,p=o.clientY-i.y,l=c*c+p*p,m=this.Ir.swipe_threshold_px;if(m*m>l||[this.$r,this.Ur,this.Lr].some(b=>A(b)&&b>=i.timestamp))return;var f,u;if(this.Wr()&&((f=g==null||(u=g.elementsFromPoint)===null||u===void 0?void 0:u.call(g,i.x,i.y))!==null&&f!==void 0?f:[]).some(b=>{var L;return(L=b.matches)===null||L===void 0?void 0:L.call(b,Re)}))return;const w=Pe(s,{type:"swipe",swipeDirection:et(c,p),swipeDistancePx:Math.round(Math.sqrt(l))});X(w)||this.Tr(w)||this.Rr(w),this.Ar()},this.Ir=this.ur(n),this._onCapture=this.Ir.__onCapture}start(e){this.Vr(),this.Zr(),this.Gr(),this.Qr(),this.Jr(),this.Kr(e),this.Ir.capture_dead_swipes&&this.Xr()}Kr(e){if(!this.Yr){const n=(function(t){return(function(r,i){const s=de[r];if(s)return s;let o=i[r];if(re(c=o)&&c.toString().indexOf("[native code]")!==-1&&!_?.Zone)return de[r]=o.bind(i);var c;const p=i.document;if(p&&re(p.createElement)){let u,w=!1;try{u=p.createElement("iframe"),u.hidden=!0,p.head.appendChild(u);const b=u.contentWindow;var l,m;b&&b[r]&&(o=b[r],r==="MutationObserver"&&T(f=(l=(m=i.navigator)===null||m===void 0?void 0:m.userAgent)!==null&&l!==void 0?l:"","AppleWebKit")&&!T(f,"Chrome")&&(u.classList.add("rr-block","ph-no-capture"),w=!0))}catch(b){se.warn(`Could not create sandbox iframe for ${r} check, bailing to assignableWindow.${r}: `,b)}finally{!w&&u!=null&&u.parentNode&&u.parentNode.removeChild(u)}}var f;return o&&re(o)?de[r]=o.bind(i):o})("MutationObserver",t)})(a);this.Yr=new n(t=>{this.eo(t)}),this.no(e)}}no(e){e&&this.Yr&&(this.hr.has(e)||(this.Yr.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),this.hr.add(e),this.io(e)))}io(e,n){var t,r;D(e)&&e.shadowRoot&&this.no(e.shadowRoot);const i=(t=(r=e.querySelectorAll)===null||r===void 0?void 0:r.call(e,"*"))!==null&&t!==void 0?t:[];for(let s=0;i.length>s;s++)n?.add(i[s]),this.no(i[s].shadowRoot)}kr(e){var n,t;const r=(n=(t=e.composedPath)===null||t===void 0?void 0:t.call(e))!==null&&n!==void 0?n:[];for(let i=0;r.length>i;i++){const s=r[i];pe(s)&&this.no(s.shadowRoot)}}stop(){var e;(e=this.Yr)===null||e===void 0||e.disconnect(),this.Yr=void 0,this.hr=new WeakSet,a.removeEventListener("click",this.Mr,{capture:!0}),a.removeEventListener("mousedown",this.wr,{capture:!0}),a.removeEventListener("mouseup",this.Cr,{capture:!0}),a.removeEventListener("mouseout",this.Sr,{capture:!0}),a.removeEventListener("dragstart",this.gr,{capture:!0}),a.removeEventListener("pointercancel",this.gr,{capture:!0}),a.removeEventListener("blur",this.gr),this.gr(),a.removeEventListener("scroll",this.Er,{capture:!0}),g?.removeEventListener("selectionchange",this.Or),a.removeEventListener("touchstart",this.jr,{capture:!0}),a.removeEventListener("touchend",this.zr,{capture:!0}),a.removeEventListener("touchcancel",this.Hr,{capture:!0}),g?.removeEventListener("visibilitychange",this.sn),a.removeEventListener("blur",this.Nr),a.removeEventListener("focus",this.Nr),this.Br=void 0}eo(e){const n=new Set;for(const r of e)try{var t;if(((t=r.target)===null||t===void 0?void 0:t.isConnected)===!1)continue;this.Ur=Date.now();const i=r.addedNodes;for(let s=0;i.length>s;s++){const o=i[s];pe(o)&&!n.has(o)&&this.io(o,n)}}catch{}}Vr(){E(a,"click",this.Mr,{capture:!0}),E(a,"mousedown",this.wr,{capture:!0}),E(a,"mouseup",this.Cr,{capture:!0}),E(a,"mouseout",this.Sr,{capture:!0}),E(a,"dragstart",this.gr,{capture:!0}),E(a,"pointercancel",this.gr,{capture:!0}),E(a,"blur",this.gr)}Rr(e){e.selectionChangedDelayMs=_e(e.timestamp,this.Lr,this.Ir.selection_change_threshold_ms),e.visibilityChangedDelayMs=_e(e.timestamp,this.Dr),e.focusChangedDelayMs=_e(e.timestamp,this.qr),this.pr.push(e)}Ar(){this.pr.length&&$(this.ro)&&(this.ro=a.setTimeout(()=>{this.oo()},1e3))}Zr(){E(a,"scroll",this.Er,{capture:!0})}Gr(){var e;this.vr=(g==null||(e=g.getSelection())===null||e===void 0?void 0:e.type)==="Range",E(g,"selectionchange",this.Or)}Pr(e,n){const t=n.path[0];try{for(;e;){if(n.path.indexOf(e)!==-1||D(t)&&t.contains(e))return!0;e=e.getRootNode().host}}catch{}return!1}_r(e,n){const t=n.path[0],r=e.rangeCount>0?e.getRangeAt(0):void 0,i=!!r&&we(()=>r.startContainer.getRootNode()===t.getRootNode());if(r&&i&&D(t)){var s;if(!r.collapsed)return r.intersectsNode(t);const o=D(r.startContainer)&&(s=r.startContainer.childNodes[r.startOffset])!==null&&s!==void 0?s:r.startContainer;return this.Pr(o,n)}return this.Pr(e.focusNode,n)||this.Pr(e.anchorNode,n)}Qr(){E(g,"visibilitychange",this.sn)}Jr(){E(a,"blur",this.Nr),E(a,"focus",this.Nr)}Fr(e,n){this.pr.forEach(t=>{const r=Te(n-t.timestamp);A(r)&&($(t[e])||t[e]>r)&&(t[e]=r)})}Xr(){E(a,"touchstart",this.jr,{capture:!0,passive:!0}),E(a,"touchend",this.zr,{capture:!0,passive:!0}),E(a,"touchcancel",this.Hr,{capture:!0,passive:!0})}Wr(){const e=$(this.so)||A(this.Ur)&&this.Ur>this.so;return($(this.ao)||e)&&(this.so=Date.now(),this.ao=!!g?.querySelector(Re)),!!this.ao}Tr(e){return!e||(e.type==="swipe"?this.lo(e):this.uo(e))}lo(e){return!((!((n=e.node)instanceof Element)||n.id!=="__POSTHOG_TOOLBAR__"&&!(!((t=n.closest)===null||t===void 0)&&t.call(n,".toolbar-global-fade-container")))&&!this.pr.some(r=>r.type===e.type&&r.node===e.node&&1e3>Math.abs(r.timestamp-e.timestamp))&&!C(e.node,"html")&&D(e.node)&&(function(r,i){var s;if(!_||ce(r))return!1;const o=K.call(i)==="[object Boolean]"?Ne:(s=i?.css_selector_ignorelist)!==null&&s!==void 0?s:Ne,{targetElementList:c}=ke(r,!1);return!(function(p,l){if($(l))return!0;for(const m of p)if(l.some(f=>qe(m,f)))return!0;return!1})(c,o)})(e.node,{css_selector_ignorelist:this.Ir.css_selector_ignorelist}));var n,t}uo(e){return!(this.Ir.capture_clicks_with_modifier_keys||(n=e.originalEvent,!(n.ctrlKey||n.metaKey||n.altKey||n.shiftKey)))||!!this.lo(e)||(function(t){if(!_||ce(t))return!1;const{targetElementList:r}=ke(t,!1);return r.some(i=>C(i,"a"))})(e.node);var n}oo(){if(!this.pr.length)return;clearTimeout(this.ro),this.ro=void 0;const e=this.pr;this.pr=[];for(const t of e){var n;t.mutationDelayMs=(n=t.mutationDelayMs)!==null&&n!==void 0?n:this.Ur&&this.Ur>=t.timestamp?this.Ur-t.timestamp:void 0,t.absoluteDelayMs=Date.now()-t.timestamp;const r=ee(t.scrollDelayMs,this.Ir.scroll_threshold_ms),i=ee(t.selectionChangedDelayMs,this.Ir.selection_change_threshold_ms),s=ee(t.mutationDelayMs,this.Ir.mutation_threshold_ms),o=ee(t.absoluteDelayMs,1.1*this.Ir.mutation_threshold_ms),c=A(t.scrollDelayMs)&&this.Ir.scroll_threshold_ms>t.scrollDelayMs,p=A(t.mutationDelayMs)&&this.Ir.mutation_threshold_ms>t.mutationDelayMs,l=t.selectionChangedDuringGesture||A(t.selectionChangedDelayMs)&&this.Ir.selection_change_threshold_ms>t.selectionChangedDelayMs,m=A(t.visibilityChangedDelayMs),f=A(t.focusChangedDelayMs);if(!(c||p||l||m||f))if(r||s||o||i){const u=je(t);if(u==="$dead_swipe"){if(this.mr>=this.Ir.max_dead_swipes_per_page_load)continue;this.mr++}this._onCapture(t,{[`${u}_last_mutation_timestamp`]:this.Ur,[`${u}_event_timestamp`]:t.timestamp,[`${u}_scroll_timeout`]:r,[`${u}_mutation_timeout`]:s,[`${u}_absolute_timeout`]:o,[`${u}_selection_changed_timeout`]:i,[`${u}_visibility_changed_timeout`]:!1})}else this.Ir.mutation_threshold_ms>t.absoluteDelayMs&&this.pr.push(t)}this.Ar()}dr(e,n){const t=je(e);this.instance.capture(t,R(R(R({},n),Qe(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Ir.element_attribute_ignorelist,elementsChainAsString:!1,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes}).props),{},{[`${t}_scroll_delay_ms`]:e.scrollDelayMs,[`${t}_mutation_delay_ms`]:e.mutationDelayMs,[`${t}_absolute_delay_ms`]:e.absoluteDelayMs,[`${t}_selection_changed_delay_ms`]:e.selectionChangedDelayMs,[`${t}_visibility_changed_delay_ms`]:e.visibilityChangedDelayMs,[`${t}_focus_changed_delay_ms`]:e.focusChangedDelayMs,$dead_swipe_direction:e.swipeDirection,$dead_swipe_distance_px:e.swipeDistancePx}),{timestamp:new Date(e.timestamp)})}};a.__PosthogExtensions__=a.__PosthogExtensions__||{},a.__PosthogExtensions__.initDeadClicksAutocapture=(e,n)=>new tt(e,n)})();
1
+ (function(){try{var _=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};_.SENTRY_RELEASE={id:"3.27.2"};var j=new _.Error().stack;j&&(_._sentryDebugIds=_._sentryDebugIds||{},_._sentryDebugIds[j]="53c02e09-2951-4e22-97a8-02346a6cf2e3",_._sentryDebugIdIdentifier="sentry-dbid-53c02e09-2951-4e22-97a8-02346a6cf2e3")}catch{}})();(function(){const _="u">typeof window?window:void 0,j="u">typeof globalThis?globalThis:_,g=j?.document;j!=null&&j.XMLHttpRequest&&new j.XMLHttpRequest;const H=typeof globalThis<"u"?globalThis:_;H&&typeof self>"u"&&(H.self=H),H&&typeof File>"u"&&(H.File=function(){});const a=_??{};function T(e,n){return e.indexOf(n)!==-1}const G=function(e){return e.trim()},be=Object.prototype,Ye=be.hasOwnProperty,K=be.toString,ne=Array.isArray||function(e){return K.call(e)==="[object Array]"},re=e=>typeof e=="function",$=e=>e===void 0,Z=e=>K.call(e)=="[object String]",X=e=>e===null,ie=e=>$(e)||X(e),A=e=>K.call(e)=="[object Number]"&&e==e;function ye(e){return e&&e.split("#")[0]}function we(e){try{return e()}catch{return}}function Y(e){return Y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Y(e)}function ze(e,n,t){return(n=(function(r){var i=(function(s){if(Y(s)!="object"||!s)return s;var o=s[Symbol.toPrimitive];if(o!==void 0){var c=o.call(s,"string");if(Y(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(s)})(r);return Y(i)=="symbol"?i:i+""})(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ce(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),t.push.apply(t,r)}return t}function R(e){for(var n=1;arguments.length>n;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Ce(Object(t),!0).forEach(function(r){ze(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}const Ee=(e,{debugEnabled:n}={})=>{const t={N(r,...i){_&&(_.POSTHOG_DEBUG||n)&&!$(_.console)&&_.console&&("__rrweb_original__"in _.console[r]?_.console[r].__rrweb_original__:_.console[r])(e,...i)},debug(...r){t.N("debug",...r)},info(...r){t.N("log",...r)},warn(...r){t.N("warn",...r)},error(...r){t.N("error",...r)},critical(...r){console.error(e,...r)},uninitializedWarning(r){t.error(`You must initialize PostHog before calling ${r}`)},createLogger:(r,i)=>Ee(`${e} ${r}`,i)};return t},se=Ee("[PostHog.js]"),Be=se.createLogger;function U(e,n){if(!ie(e))if(ne(e))e.forEach(n);else if(e instanceof FormData)e.forEach((t,r)=>n(t,r));else for(const t in e)Ye.call(e,t)&&n(e[t],t)}const We=function(e,...n){for(const t of n)for(const r in t)t[r]!==void 0&&(e[r]=t[r]);return e};function oe(e){const n=Object.keys(e);let t=n.length;const r=new Array(t);for(;t--;)r[t]=[n[t],e[n[t]]];return r}function E(e,n,t,r){const{capture:i=!1,passive:s=!0}=r??{};e?.addEventListener(n,t,{capture:i,passive:s})}function D(e){return!!e&&e.nodeType===1}function C(e,n){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===n.toLowerCase()}function xe(e){return!!e&&e.nodeType===11&&D(e.host)}function le(e){return e?G(e).split(/\s+/):[]}function V(e){let n="";switch(typeof e.className){case"string":n=e.className;break;case"object":n=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:n=""}return le(n)}function J(e){let n="";return Q(e)&&!ue(e)&&e.childNodes&&e.childNodes.length&&U(e.childNodes,function(t){var r,i;(function(s){return!!s&&s.nodeType===3})(t)&&t.textContent&&(n+=(r=ie(i=t.textContent)?null:G(i).split(/(\s+)/).filter(s=>B(s)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))!==null&&r!==void 0?r:"")}),G(n)}function ae(e){var n;return $(e.target)?e.srcElement||null:!((n=e.target)===null||n===void 0)&&n.shadowRoot?e.composedPath()[0]||null:e.target||null}const De=["a","button","form","input","select","textarea","label"];function qe(e,n){const t=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;try{return!!t&&t.call(e,n)}catch{return!1}}function Fe(e){const n=e.parentNode;return!(!n||!D(n))&&n}const Ne=[".ph-no-deadclick",".ph-no-capture"],Ge=["","text","search","email","password","url","tel","number"];function z(e){return!(!e||!D(e))&&(!!C(e,"textarea")||(C(e,"input")?T(Ge,(e.getAttribute("type")||"").toLowerCase()):(function(n){var t;if(n.isContentEditable)return!0;const r=(t=n.getAttribute)===null||t===void 0?void 0:t.call(n,"contenteditable");return r==="true"||r===""})(e)))}const ce=e=>!e||C(e,"html")||!D(e),ke=(e,n)=>{if(!_||ce(e))return{parentIsUsefulElement:!1,targetElementList:[]};let t=!1;const r=[e];let i=e;for(;i.parentNode&&!C(i,"body");){if(xe(i.parentNode)){r.push(i.parentNode.host),i=i.parentNode.host;continue}const s=Fe(i);if(!s)break;if(n||De.indexOf(s.tagName.toLowerCase())>-1)t=!0;else try{const o=_.getComputedStyle(s);o&&o.getPropertyValue("cursor")==="pointer"&&(t=!0)}catch{}r.push(s),i=s}return{parentIsUsefulElement:t,targetElementList:r}};function Q(e){const n=new Set;let t=0;for(let s=e;s.parentNode&&!C(s,"body");s=s.parentNode){if(t++>=1e3||n.has(s))return!1;n.add(s);const o=V(s);if(T(o,"ph-sensitive")||T(o,"ph-no-capture"))return!1}if(T(V(e),"ph-include"))return!0;const r=e.type||"";if(Z(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}const i=e.name||e.id||"";return!Z(i)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function ue(e){return!!(C(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||C(e,"select")||C(e,"textarea")||e.getAttribute("contenteditable")==="true")}const Me=new RegExp("^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$"),$e=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,Ke=[16,15,14,13],Ze=new RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$"),Oe=new RegExp("(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))","g"),Se=/[0-9A-Za-z_]/;function Xe(e){let n=0,t=!1;for(let r=e.length-1;r>=0;r--){let i=e.charCodeAt(r)-48;t&&(i*=2,i>9&&(i-=9)),n+=i,t=!t}return n%10==0}function B(e,n=!0){return!(ie(e)||Z(e)&&(e=G(e),(n?Me.test((e||"").replace(/[- ]/g,"")):(function(t){let r;for($e.lastIndex=0;r=$e.exec(t);){const i=r[2];if(!i)continue;const s=i.replace(/[- ]/g,"");for(let o=0;s.length>o;o++)for(const c of Ke){const p=o+c;if(s.length>=p){const l=s.slice(o,p);if(Me.test(l)&&Xe(l))return!0}}}return!1})(e))||(n?Ze.test(e):(function(t){let r;for(Oe.lastIndex=0;r=Oe.exec(t);){const i=r[1],s=r[3];if(!(i&&s&&Se.test(i)&&Se.test(s)))return!0}return!1})(e))))}function Le(e){let n=J(e);return n=`${n} ${Ae(e)}`.trim(),B(n)?n:""}function Ae(e){let n="";return e&&e.childNodes&&e.childNodes.length&&U(e.childNodes,function(t){var r;if(t&&((r=t.tagName)===null||r===void 0?void 0:r.toLowerCase())==="span")try{const i=J(t);n=`${n} ${i}`.trim(),t.childNodes&&t.childNodes.length&&(n=`${n} ${Ae(t)}`.trim())}catch(i){se.error("[AutoCapture]",i)}}),n}function Ie(e){return e.replace(/"|\\"/g,'\\"')}function Ve(e){const n=e.attr__class;if(n)return ne(n)?n:le(n)}function he(e,n){return n.length>e?n.slice(0,e)+"...":n}function Je(e){if(e.previousElementSibling)return e.previousElementSibling;let n=e;do n=n.previousSibling;while(n&&!D(n));return n}function Qe(e,{e:n,maskAllElementAttributes:t,maskAllText:r,elementAttributeIgnoreList:i,elementsChainAsString:s,disableCaptureUrlHashes:o}){var c,p;if(!D(e))return{props:{}};const l=[e],m=new Set([e]);let f=e;for(;f.parentNode&&!C(f,"body")&&1e3>l.length;){if(xe(f.parentNode)){const v=f.parentNode.host;if(m.has(v))break;m.add(v),l.push(v),f=v;continue}if(!D(f.parentNode)||m.has(f.parentNode))break;m.add(f.parentNode),l.push(f.parentNode),f=f.parentNode}const u=n.type==="click"&&e.namespaceURI==="http://www.w3.org/2000/svg"?l.findIndex(v=>C(v,"button")||C(v,"a")):-1;u>0&&(r=r||l.slice(0,u+1).some(v=>!Q(v)||ue(v)));const w=[],b={};let L,N=!1,k=!1;if(U(l,v=>{const h=Q(v);if(C(v,"a")&&!t&&!i?.includes("href")){const d=v.getAttribute("href");N=!!(h&&d&&B(d))&&(o?ye(d):d)}T(V(v),"ph-no-capture")&&(k=!0),w.push((function(d,y,x,M,I=!1){const O=d.tagName.toLowerCase(),S={tag_name:O};De.indexOf(O)>-1&&!x&&(S.$el_text=O.toLowerCase()==="a"||O.toLowerCase()==="button"?he(1024,Le(d)):he(1024,J(d)));const q=V(d);y||M!=null&&M.includes("class")||0>=q.length||(S.classes=q.filter(function(P){return P!==""})),U(d.attributes,function(P){var ge;if((!ue(d)||["name","id","class","aria-label"].indexOf(P.name)!==-1)&&!M?.includes(P.name)&&!y&&B(P.value)&&(!Z(ge=P.name)||ge.substring(0,10)!=="_ngcontent"&&ge.substring(0,7)!=="_nghost")){let te=P.value;P.name==="class"&&(te=le(te).join(" ")),S["attr__"+P.name]=he(1024,P.name==="href"&&I?ye(te):te)}});let F=1,He=1,ve=d;for(;ve=Je(ve);)F++,ve.tagName===d.tagName&&He++;return S.nth_child=F,S.nth_of_type=He,S})(v,t,r,i,o)),U((function(d){if(!Q(d))return{};const y={};return U(d.attributes,function(x){if(x.name&&x.name.indexOf("data-ph-capture-attribute")===0){const M=x.name.replace("data-ph-capture-attribute-",""),I=x.value;M&&I&&B(I)&&(y[M]=I)}}),y})(v),(d,y)=>{({}).hasOwnProperty.call(b,y)||(b[y]=d)})}),k)return{props:{},explicitNoCapture:k};if(u>0&&(e=l[u],w.splice(0,u)),r||(w[0].$el_text=C(e,"a")||C(e,"button")?Le(e):J(e)),N){var W,fe;w[0].attr__href=N;const v=(W=(d=>{const y=g?.createElement("a");return $(y)?null:(y.href=d,y)})(N))===null||W===void 0?void 0:W.host,h=_==null||(fe=_.location)===null||fe===void 0?void 0:fe.host;v&&h&&v!==h&&(L=N)}return{props:We((Ue=n.type,{$event_type:Ue,$ce_version:1}),s?{}:{$elements:w},{$elements_chain:(me=w,ne(me)?(function(v){return v.map(h=>{var d,y;let x="";if(h.tag_name&&(x+=h.tag_name),h.attr_class){h.attr_class.sort();for(const O of h.attr_class)x+=`.${O.replace(/"/g,"")}`}const M=R(R(R(R({},h.text?{text:h.text}:{}),{},{"nth-child":(d=h.nth_child)!==null&&d!==void 0?d:0,"nth-of-type":(y=h.nth_of_type)!==null&&y!==void 0?y:0},h.href?{href:h.href}:{}),h.attr_id?{attr_id:h.attr_id}:{}),h.attributes),I={};return oe(M).sort(([O],[S])=>(function(q,F){return F>q?-1:q>F?1:0})(O,S)).forEach(([O,S])=>I[Ie(O.toString())]=Ie(S.toString())),x+=":",x+=oe(I).map(([O,S])=>`${O}="${S}"`).join(""),x}).join(";")})((function(v){return v.map(h=>{var d,y;const x={text:(d=h.$el_text)===null||d===void 0?void 0:d.slice(0,400),tag_name:h.tag_name,href:(y=h.attr__href)===null||y===void 0?void 0:y.slice(0,2048),attr_class:Ve(h),attr_id:h.attr__id,nth_child:h.nth_child,nth_of_type:h.nth_of_type,attributes:{}};return oe(h).filter(([M])=>M.indexOf("attr__")===0).forEach(([M,I])=>x.attributes[M]=I),x})})(me)):"")},!((c=w[0])===null||c===void 0)&&c.$el_text?{$el_text:(p=w[0])===null||p===void 0?void 0:p.$el_text}:{},L&&n.type==="click"?{$external_click_url:L}:{},b),target:e};var me,Ue}Be("[AutoCapture]");const de={};function Pe(e,n){const t=ae(e);return t?R({node:t,originalEvent:e,timestamp:Date.now()},n):null}function pe(e){return!!we(()=>D(e))}function et(e,n){return Math.abs(e)<Math.abs(n)?0>n?"up":"down":0>e?"left":"right"}function je(e){return e.type==="swipe"?"$dead_swipe":"$dead_click"}const Re="canvas,video,audio,embed,object";function ee(e,n){return A(e)&&e>=n}function Te(e,n=1e3){return e>=0&&n>e?e:void 0}function _e(e,n,t=1e3){return A(n)?Te(e-n,t):void 0}var tt=class{ur(e){var n,t,r,i,s,o,c,p;const l=this.cr(e?.__onCapture||this.dr.bind(this));return{element_attribute_ignorelist:(n=e?.element_attribute_ignorelist)!==null&&n!==void 0?n:l.element_attribute_ignorelist,scroll_threshold_ms:(t=e?.scroll_threshold_ms)!==null&&t!==void 0?t:l.scroll_threshold_ms,selection_change_threshold_ms:(r=e?.selection_change_threshold_ms)!==null&&r!==void 0?r:l.selection_change_threshold_ms,mutation_threshold_ms:(i=e?.mutation_threshold_ms)!==null&&i!==void 0?i:l.mutation_threshold_ms,capture_clicks_with_modifier_keys:(s=e?.capture_clicks_with_modifier_keys)!==null&&s!==void 0?s:l.capture_clicks_with_modifier_keys,capture_dead_swipes:(o=e?.capture_dead_swipes)!==null&&o!==void 0?o:l.capture_dead_swipes,swipe_threshold_px:(c=e?.swipe_threshold_px)!==null&&c!==void 0?c:l.swipe_threshold_px,max_dead_swipes_per_page_load:(p=e?.max_dead_swipes_per_page_load)!==null&&p!==void 0?p:l.max_dead_swipes_per_page_load,css_selector_ignorelist:e?.css_selector_ignorelist,__onCapture:l.__onCapture}}constructor(e,n){this.instance=e,this.hr=new WeakSet,this.vr=!1,this.pr=[],this.mr=0,this.cr=t=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,capture_clicks_with_modifier_keys:!1,capture_dead_swipes:!0,swipe_threshold_px:30,max_dead_swipes_per_page_load:10,__onCapture:t}),this.gr=()=>{clearTimeout(this.yr),this.yr=void 0,this.br=void 0},this.wr=t=>{if(this.kr(t),this.gr(),t.button===0){const r={path:t.composedPath(),trusted:t.isTrusted,selectionChanged:!1,selectionInitiallyRelated:!1},i=g?.getSelection();r.selectionInitiallyRelated=i?.type==="Range"&&this._r(i,r),this.br=r}},this.Sr=t=>{X(t.relatedTarget)&&this.gr()},this.Cr=t=>{const r=this.br,i=t;if(!r||i.button!==0||t.isTrusted!==r.trusted)return;const s=t.composedPath();for(const o of r.path)if(pe(o)&&s.indexOf(o)!==-1){r.clickTarget=o;break}r.clickDetail=i.detail,this.yr=a.setTimeout(this.gr,0)},this.Mr=t=>{this.kr(t);const r=t,i=Pe(r,{type:"click"}),s=this.br;i&&s&&r.button===0&&r.detail>0&&r.detail===s.clickDetail&&t.isTrusted===s.trusted&&i.node===s.clickTarget&&(i.selectionChangedDuringGesture=s.selectionChanged&&this.Ir.selection_change_threshold_ms>0,this.gr()),X(i)||this.Tr(i)||this.Rr(i),this.Ar()},this.Er=()=>{const t=Date.now();this.$r=t,t%50==0&&this.pr.forEach(r=>{$(r.scrollDelayMs)&&(r.scrollDelayMs=t-r.timestamp)})},this.Or=t=>{var r,i;const s=g?.getSelection(),o=this.vr;this.vr=s?.type==="Range";const c=s?.focusNode,p=c&&(D(c)?c:c.parentElement),l=g?.activeElement;let m=l;for(;!(m==null||(r=m.shadowRoot)===null||r===void 0)&&r.activeElement;)m=m.shadowRoot.activeElement;const f=z(ae(t))||z(p??null)||z((i=m)!==null&&i!==void 0?i:null),u=s?.type==="Caret"&&m&&!m.shadowRoot&&c&&c!==l&&c.contains(l??null);if(!(o||this.vr||f||u))return;const w=Date.now();this.Lr=w;const b=this.br;if(b&&(o||this.vr||f)){const N=ae(t);let k;if(z(N))k=N;else if(s?.type==="Caret"){var L;z((L=m)!==null&&L!==void 0?L:null)||u?k=m:f&&(k=p)}const W=k?this.Pr(k,b):s&&(c||s.anchorNode)?this._r(s,b):o&&!this.vr&&b.selectionInitiallyRelated;b.selectionChanged=b.selectionChanged||W}this.pr.forEach(N=>{const k=w-N.timestamp;0>k||!$(N.selectionChangedDelayMs)&&k>=N.selectionChangedDelayMs||(N.selectionChangedDelayMs=k)})},this.sn=()=>{g?.visibilityState==="hidden"&&this.gr();const t=Date.now();this.Dr=t,this.Fr("visibilityChangedDelayMs",t)},this.Nr=()=>{const t=Date.now();this.qr=t,this.Fr("focusChangedDelayMs",t)},this.jr=t=>{this.kr(t);const r=t.touches,i=r?.length===1?r[0]:void 0;this.Br=i?{x:i.clientX,y:i.clientY,timestamp:Date.now()}:void 0},this.Hr=()=>{this.Br=void 0},this.zr=t=>{var r;const i=this.Br;if(this.Br=void 0,$(i)||this.mr>=this.Ir.max_dead_swipes_per_page_load)return;const s=t,o=(r=s.changedTouches)===null||r===void 0?void 0:r[0];if(!o)return;const c=o.clientX-i.x,p=o.clientY-i.y,l=c*c+p*p,m=this.Ir.swipe_threshold_px;if(m*m>l||[this.$r,this.Ur,this.Lr].some(b=>A(b)&&b>=i.timestamp))return;var f,u;if(this.Wr()&&((f=g==null||(u=g.elementsFromPoint)===null||u===void 0?void 0:u.call(g,i.x,i.y))!==null&&f!==void 0?f:[]).some(b=>{var L;return(L=b.matches)===null||L===void 0?void 0:L.call(b,Re)}))return;const w=Pe(s,{type:"swipe",swipeDirection:et(c,p),swipeDistancePx:Math.round(Math.sqrt(l))});X(w)||this.Tr(w)||this.Rr(w),this.Ar()},this.Ir=this.ur(n),this._onCapture=this.Ir.__onCapture}start(e){this.Vr(),this.Zr(),this.Gr(),this.Qr(),this.Jr(),this.Kr(e),this.Ir.capture_dead_swipes&&this.Xr()}Kr(e){if(!this.Yr){const n=(function(t){return(function(r,i){const s=de[r];if(s)return s;let o=i[r];if(re(c=o)&&c.toString().indexOf("[native code]")!==-1&&!_?.Zone)return de[r]=o.bind(i);var c;const p=i.document;if(p&&re(p.createElement)){let u,w=!1;try{u=p.createElement("iframe"),u.hidden=!0,p.head.appendChild(u);const b=u.contentWindow;var l,m;b&&b[r]&&(o=b[r],r==="MutationObserver"&&T(f=(l=(m=i.navigator)===null||m===void 0?void 0:m.userAgent)!==null&&l!==void 0?l:"","AppleWebKit")&&!T(f,"Chrome")&&(u.classList.add("rr-block","ph-no-capture"),w=!0))}catch(b){se.warn(`Could not create sandbox iframe for ${r} check, bailing to assignableWindow.${r}: `,b)}finally{!w&&u!=null&&u.parentNode&&u.parentNode.removeChild(u)}}var f;return o&&re(o)?de[r]=o.bind(i):o})("MutationObserver",t)})(a);this.Yr=new n(t=>{this.eo(t)}),this.no(e)}}no(e){e&&this.Yr&&(this.hr.has(e)||(this.Yr.observe(e,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),this.hr.add(e),this.io(e)))}io(e,n){var t,r;D(e)&&e.shadowRoot&&this.no(e.shadowRoot);const i=(t=(r=e.querySelectorAll)===null||r===void 0?void 0:r.call(e,"*"))!==null&&t!==void 0?t:[];for(let s=0;i.length>s;s++)n?.add(i[s]),this.no(i[s].shadowRoot)}kr(e){var n,t;const r=(n=(t=e.composedPath)===null||t===void 0?void 0:t.call(e))!==null&&n!==void 0?n:[];for(let i=0;r.length>i;i++){const s=r[i];pe(s)&&this.no(s.shadowRoot)}}stop(){var e;(e=this.Yr)===null||e===void 0||e.disconnect(),this.Yr=void 0,this.hr=new WeakSet,a.removeEventListener("click",this.Mr,{capture:!0}),a.removeEventListener("mousedown",this.wr,{capture:!0}),a.removeEventListener("mouseup",this.Cr,{capture:!0}),a.removeEventListener("mouseout",this.Sr,{capture:!0}),a.removeEventListener("dragstart",this.gr,{capture:!0}),a.removeEventListener("pointercancel",this.gr,{capture:!0}),a.removeEventListener("blur",this.gr),this.gr(),a.removeEventListener("scroll",this.Er,{capture:!0}),g?.removeEventListener("selectionchange",this.Or),a.removeEventListener("touchstart",this.jr,{capture:!0}),a.removeEventListener("touchend",this.zr,{capture:!0}),a.removeEventListener("touchcancel",this.Hr,{capture:!0}),g?.removeEventListener("visibilitychange",this.sn),a.removeEventListener("blur",this.Nr),a.removeEventListener("focus",this.Nr),this.Br=void 0}eo(e){const n=new Set;for(const r of e)try{var t;if(((t=r.target)===null||t===void 0?void 0:t.isConnected)===!1)continue;this.Ur=Date.now();const i=r.addedNodes;for(let s=0;i.length>s;s++){const o=i[s];pe(o)&&!n.has(o)&&this.io(o,n)}}catch{}}Vr(){E(a,"click",this.Mr,{capture:!0}),E(a,"mousedown",this.wr,{capture:!0}),E(a,"mouseup",this.Cr,{capture:!0}),E(a,"mouseout",this.Sr,{capture:!0}),E(a,"dragstart",this.gr,{capture:!0}),E(a,"pointercancel",this.gr,{capture:!0}),E(a,"blur",this.gr)}Rr(e){e.selectionChangedDelayMs=_e(e.timestamp,this.Lr,this.Ir.selection_change_threshold_ms),e.visibilityChangedDelayMs=_e(e.timestamp,this.Dr),e.focusChangedDelayMs=_e(e.timestamp,this.qr),this.pr.push(e)}Ar(){this.pr.length&&$(this.ro)&&(this.ro=a.setTimeout(()=>{this.oo()},1e3))}Zr(){E(a,"scroll",this.Er,{capture:!0})}Gr(){var e;this.vr=(g==null||(e=g.getSelection())===null||e===void 0?void 0:e.type)==="Range",E(g,"selectionchange",this.Or)}Pr(e,n){const t=n.path[0];try{for(;e;){if(n.path.indexOf(e)!==-1||D(t)&&t.contains(e))return!0;e=e.getRootNode().host}}catch{}return!1}_r(e,n){const t=n.path[0],r=e.rangeCount>0?e.getRangeAt(0):void 0,i=!!r&&we(()=>r.startContainer.getRootNode()===t.getRootNode());if(r&&i&&D(t)){var s;if(!r.collapsed)return r.intersectsNode(t);const o=D(r.startContainer)&&(s=r.startContainer.childNodes[r.startOffset])!==null&&s!==void 0?s:r.startContainer;return this.Pr(o,n)}return this.Pr(e.focusNode,n)||this.Pr(e.anchorNode,n)}Qr(){E(g,"visibilitychange",this.sn)}Jr(){E(a,"blur",this.Nr),E(a,"focus",this.Nr)}Fr(e,n){this.pr.forEach(t=>{const r=Te(n-t.timestamp);A(r)&&($(t[e])||t[e]>r)&&(t[e]=r)})}Xr(){E(a,"touchstart",this.jr,{capture:!0,passive:!0}),E(a,"touchend",this.zr,{capture:!0,passive:!0}),E(a,"touchcancel",this.Hr,{capture:!0,passive:!0})}Wr(){const e=$(this.so)||A(this.Ur)&&this.Ur>this.so;return($(this.ao)||e)&&(this.so=Date.now(),this.ao=!!g?.querySelector(Re)),!!this.ao}Tr(e){return!e||(e.type==="swipe"?this.lo(e):this.uo(e))}lo(e){return!((!((n=e.node)instanceof Element)||n.id!=="__POSTHOG_TOOLBAR__"&&!(!((t=n.closest)===null||t===void 0)&&t.call(n,".toolbar-global-fade-container")))&&!this.pr.some(r=>r.type===e.type&&r.node===e.node&&1e3>Math.abs(r.timestamp-e.timestamp))&&!C(e.node,"html")&&D(e.node)&&(function(r,i){var s;if(!_||ce(r))return!1;const o=K.call(i)==="[object Boolean]"?Ne:(s=i?.css_selector_ignorelist)!==null&&s!==void 0?s:Ne,{targetElementList:c}=ke(r,!1);return!(function(p,l){if($(l))return!0;for(const m of p)if(l.some(f=>qe(m,f)))return!0;return!1})(c,o)})(e.node,{css_selector_ignorelist:this.Ir.css_selector_ignorelist}));var n,t}uo(e){return!(this.Ir.capture_clicks_with_modifier_keys||(n=e.originalEvent,!(n.ctrlKey||n.metaKey||n.altKey||n.shiftKey)))||!!this.lo(e)||(function(t){if(!_||ce(t))return!1;const{targetElementList:r}=ke(t,!1);return r.some(i=>C(i,"a"))})(e.node);var n}oo(){if(!this.pr.length)return;clearTimeout(this.ro),this.ro=void 0;const e=this.pr;this.pr=[];for(const t of e){var n;t.mutationDelayMs=(n=t.mutationDelayMs)!==null&&n!==void 0?n:this.Ur&&this.Ur>=t.timestamp?this.Ur-t.timestamp:void 0,t.absoluteDelayMs=Date.now()-t.timestamp;const r=ee(t.scrollDelayMs,this.Ir.scroll_threshold_ms),i=ee(t.selectionChangedDelayMs,this.Ir.selection_change_threshold_ms),s=ee(t.mutationDelayMs,this.Ir.mutation_threshold_ms),o=ee(t.absoluteDelayMs,1.1*this.Ir.mutation_threshold_ms),c=A(t.scrollDelayMs)&&this.Ir.scroll_threshold_ms>t.scrollDelayMs,p=A(t.mutationDelayMs)&&this.Ir.mutation_threshold_ms>t.mutationDelayMs,l=t.selectionChangedDuringGesture||A(t.selectionChangedDelayMs)&&this.Ir.selection_change_threshold_ms>t.selectionChangedDelayMs,m=A(t.visibilityChangedDelayMs),f=A(t.focusChangedDelayMs);if(!(c||p||l||m||f))if(r||s||o||i){const u=je(t);if(u==="$dead_swipe"){if(this.mr>=this.Ir.max_dead_swipes_per_page_load)continue;this.mr++}this._onCapture(t,{[`${u}_last_mutation_timestamp`]:this.Ur,[`${u}_event_timestamp`]:t.timestamp,[`${u}_scroll_timeout`]:r,[`${u}_mutation_timeout`]:s,[`${u}_absolute_timeout`]:o,[`${u}_selection_changed_timeout`]:i,[`${u}_visibility_changed_timeout`]:!1})}else this.Ir.mutation_threshold_ms>t.absoluteDelayMs&&this.pr.push(t)}this.Ar()}dr(e,n){const t=je(e);this.instance.capture(t,R(R(R({},n),Qe(e.node,{e:e.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Ir.element_attribute_ignorelist,elementsChainAsString:!1,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes}).props),{},{[`${t}_scroll_delay_ms`]:e.scrollDelayMs,[`${t}_mutation_delay_ms`]:e.mutationDelayMs,[`${t}_absolute_delay_ms`]:e.absoluteDelayMs,[`${t}_selection_changed_delay_ms`]:e.selectionChangedDelayMs,[`${t}_visibility_changed_delay_ms`]:e.visibilityChangedDelayMs,[`${t}_focus_changed_delay_ms`]:e.focusChangedDelayMs,$dead_swipe_direction:e.swipeDirection,$dead_swipe_distance_px:e.swipeDistancePx}),{timestamp:new Date(e.timestamp)})}};a.__PosthogExtensions__=a.__PosthogExtensions__||{},a.__PosthogExtensions__.initDeadClicksAutocapture=(e,n)=>new tt(e,n)})();
2
2
 
3
- //# sourceMappingURL=dead-clicks-autocapture-Bf2yz9Zr.js.map
3
+ //# sourceMappingURL=dead-clicks-autocapture-DMIvXYDI.js.map
@@ -1 +1 @@
1
- import{n as t}from"./error-reporting-C7685g3J.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"3.27.1"};var e=new r.Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="415c562b-d86b-4209-b818-70765ff172d9",r._sentryDebugIdIdentifier="sentry-dbid-415c562b-d86b-4209-b818-70765ff172d9")}catch{}})();export{t as reportCaught};
1
+ import{n as t}from"./error-reporting-C3V1rL02.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"3.27.2"};var e=new r.Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="415c562b-d86b-4209-b818-70765ff172d9",r._sentryDebugIdIdentifier="sentry-dbid-415c562b-d86b-4209-b818-70765ff172d9")}catch{}})();export{t as reportCaught};