db-studio 2.0.1 → 2.2.0
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.
- package/dist/index.js +79 -79
- package/dist/index.js.map +1 -1
- package/dist/web-dist/assets/_pathlessLayout-DSqP7uLw.js +1 -0
- package/dist/web-dist/assets/_pathlessLayout-sBYxFR0u.js +2 -0
- package/dist/web-dist/assets/_queryId-D-e6Pm3D.js +1 -0
- package/dist/web-dist/assets/_table-CUkeoJ5r.js +1 -0
- package/dist/web-dist/assets/_table-CuzwG7mZ.js +1 -0
- package/dist/web-dist/assets/_table-ziU6yws2.js +1 -0
- package/dist/web-dist/assets/{abap-DQayJW6v.js → abap-CNHfI6UP.js} +1 -1
- package/dist/web-dist/assets/{apex-Djzlm7in.js → apex-DTJWTIPK.js} +1 -1
- package/dist/web-dist/assets/{azcli-Bbikkqe4.js → azcli-Degrf7_O.js} +1 -1
- package/dist/web-dist/assets/{badge-HtbO9hWg.js → badge-BfsYSaL9.js} +1 -1
- package/dist/web-dist/assets/{bat-BUFda2RT.js → bat-og3u3-iX.js} +1 -1
- package/dist/web-dist/assets/{bicep-CuUgDHWX.js → bicep-DWKWUTZk.js} +1 -1
- package/dist/web-dist/assets/{browser-B6gU7HWo.js → browser-ZSYFt_6v.js} +1 -1
- package/dist/web-dist/assets/bundle-mjs-DBtz6MiX.js +1 -0
- package/dist/web-dist/assets/{cameligo-DITobApP.js → cameligo-wkA_VlQe.js} +1 -1
- package/dist/web-dist/assets/chat-sidebar-BzjjNUcW.js +161 -0
- package/dist/web-dist/assets/{clojure-DTFcSI8F.js → clojure-DOzhadKJ.js} +1 -1
- package/dist/web-dist/assets/{code-editor-BpsclD2u.js → code-editor-BMXfdFhg.js} +4 -4
- package/dist/web-dist/assets/{codicon-Brq4_Ui5.ttf → codicon-DF1abBS2.ttf} +0 -0
- package/dist/web-dist/assets/{coffee-CmIRg0oP.js → coffee-CS5CzV5M.js} +1 -1
- package/dist/web-dist/assets/connect-DGQjyh4c.js +1 -0
- package/dist/web-dist/assets/constants-iNJwkB3Z.js +20 -0
- package/dist/web-dist/assets/{cpp-BwBWpZT1.js → cpp-BMgiE7AJ.js} +1 -1
- package/dist/web-dist/assets/{csharp-BnWK75m3.js → csharp-Bsvbb6s9.js} +1 -1
- package/dist/web-dist/assets/{csp-Dohj3XYI.js → csp-BrZ2q231.js} +1 -1
- package/dist/web-dist/assets/{css-DN4GbnxY.js → css-Uqgocp1T.js} +1 -1
- package/dist/web-dist/assets/{css.worker-B-fFSVTK.js → css.worker-bHD0dlJO.js} +1507 -1453
- package/dist/web-dist/assets/cssMode-BoXwzMyE.js +1 -0
- package/dist/web-dist/assets/{cypher-CKAK8eD4.js → cypher-BtFHfHba.js} +1 -1
- package/dist/web-dist/assets/{dart-imWXBTLy.js → dart-C5lyYd0g.js} +1 -1
- package/dist/web-dist/assets/database.store-BbWvMDJ7.js +57 -0
- package/dist/web-dist/assets/dist-BbZuOizk.js +1 -0
- package/dist/web-dist/assets/dist-CISR_13N.js +2 -0
- package/dist/web-dist/assets/{dockerfile-CXOK4zpC.js → dockerfile-BvQ8yybz.js} +1 -1
- package/dist/web-dist/assets/{ecl-lOrW9o9k.js → ecl-DkR5NtXz.js} +1 -1
- package/dist/web-dist/assets/editor-g1MJRkXV.css +1 -0
- package/dist/web-dist/assets/editor.api-BQRmhEY6.js +926 -0
- package/dist/web-dist/assets/{editor.worker-BYfbSb3U.js → editor.worker-ByY_fgkM.js} +1328 -1274
- package/dist/web-dist/assets/{elixir-DgvzEwPU.js → elixir-DwgH4lv4.js} +1 -1
- package/dist/web-dist/assets/esm-DHn0u-mG.js +1 -0
- package/dist/web-dist/assets/{esm-DC8GK2En.js → esm-HKPuItQJ.js} +1 -1
- package/dist/web-dist/assets/{flow9-l3BJy5NQ.js → flow9-DdhMBw5Q.js} +1 -1
- package/dist/web-dist/assets/format-cell-value-CUgsp8Xn.js +1 -0
- package/dist/web-dist/assets/{freemarker2-73G2DeCz.js → freemarker2-g_nJsTeC.js} +2 -2
- package/dist/web-dist/assets/{fsharp-sfou20I_.js → fsharp-D3Xp09Vk.js} +1 -1
- package/dist/web-dist/assets/{go-DnjkNg4Q.js → go-DiDKwy3n.js} +1 -1
- package/dist/web-dist/assets/{graphql-BJFXvNDL.js → graphql-BgFph-jF.js} +1 -1
- package/dist/web-dist/assets/{handlebars-DXg2L0KG.js → handlebars-RA6uoaMW.js} +1 -1
- package/dist/web-dist/assets/{hcl-B4FYtDde.js → hcl-D4fzt9AB.js} +1 -1
- package/dist/web-dist/assets/highlighted-body-JLMTFACH-D8jkzP7m.js +1 -0
- package/dist/web-dist/assets/{html-BvAUQUXw.js → html-DchTZAEc.js} +1 -1
- package/dist/web-dist/assets/{html.worker-CdalOg9p.js → html.worker-CHVREBCJ.js} +1527 -1473
- package/dist/web-dist/assets/{htmlMode-hZ3EloXT.js → htmlMode-BcLYF6v1.js} +1 -1
- package/dist/web-dist/assets/icons-DKLzom80.js +1 -0
- package/dist/web-dist/assets/index-DTVRtzpz.css +2 -0
- package/dist/web-dist/assets/index-L3nylpEA.js +34 -0
- package/dist/web-dist/assets/indexes-B3M1QTrn.js +1 -0
- package/dist/web-dist/assets/{ini-H3EW14Oa.js → ini-CjG9jGLJ.js} +1 -1
- package/dist/web-dist/assets/{java-Cu5qHMXc.js → java-DitR3Nwd.js} +1 -1
- package/dist/web-dist/assets/{javascript-bJHYh6Or.js → javascript-l9pEcFVL.js} +1 -1
- package/dist/web-dist/assets/json-editor-CeBQ9FBf.js +1 -0
- package/dist/web-dist/assets/{json.worker-DI02pyM8.js → json.worker-BKCy_srb.js} +2747 -2693
- package/dist/web-dist/assets/{jsonMode-CDMOUPss.js → jsonMode-D4edoDNQ.js} +4 -4
- package/dist/web-dist/assets/{julia-CZ0npMib.js → julia-_g8mQYsr.js} +1 -1
- package/dist/web-dist/assets/{keys-By5o7bPm.js → keys-DhNPoWOm.js} +1 -1
- package/dist/web-dist/assets/{kotlin-BpW0qHIt.js → kotlin-3o4lP58u.js} +1 -1
- package/dist/web-dist/assets/{label-C93T1BbF.js → label-CavJMZd3.js} +1 -1
- package/dist/web-dist/assets/{less-DTBM-Kxp.js → less-CdRSAxY_.js} +1 -1
- package/dist/web-dist/assets/{lexon-CLOvNp8v.js → lexon-B1v3Gspe.js} +1 -1
- package/dist/web-dist/assets/{liquid-IpfBCIUY.js → liquid-3wMbC9OJ.js} +1 -1
- package/dist/web-dist/assets/{logs-CnLvqVtL.js → logs-C22dj_JT.js} +1 -1
- package/dist/web-dist/assets/{lspLanguageFeatures-CnYZSn_O.js → lspLanguageFeatures-TaH7V4jh.js} +1 -1
- package/dist/web-dist/assets/{lua-BERpVknn.js → lua-D3D-_pEE.js} +1 -1
- package/dist/web-dist/assets/{m3-B_gILjHh.js → m3-fsgnMtjU.js} +1 -1
- package/dist/web-dist/assets/{markdown-DamaZSqy.js → markdown-DTtmtPZi.js} +1 -1
- package/dist/web-dist/assets/{mdx-BTw_ghf-.js → mdx-B7jfJVLI.js} +1 -1
- package/dist/web-dist/assets/mermaid-WFAXDIZX-qzZppTtW.js +1 -0
- package/dist/web-dist/assets/middleware-DLeL20gb.js +1 -0
- package/dist/web-dist/assets/{mips-BkjI-_01.js → mips-BA6kSOEZ.js} +1 -1
- package/dist/web-dist/assets/module-B7dXHbVt.js +3 -0
- package/dist/web-dist/assets/monaco-theme-BwGcwpJl.js +68 -0
- package/dist/web-dist/assets/monaco-theme-DtsiNm_H.css +1 -0
- package/dist/web-dist/assets/{msdax-5OSOIuww.js → msdax-B96QDI_e.js} +1 -1
- package/dist/web-dist/assets/{mysql-CMtxQW5J.js → mysql-ZJG-Zmb7.js} +1 -1
- package/dist/web-dist/assets/{objective-c-CoW52So-.js → objective-c-D1BqZdFg.js} +1 -1
- package/dist/web-dist/assets/{overlay.store-BL-3zX6X.js → overlay.store-DoGHwFxO.js} +1 -1
- package/dist/web-dist/assets/{pascal-BxyU4sPJ.js → pascal-CXwopv-V.js} +1 -1
- package/dist/web-dist/assets/{pascaligo-C63_040U.js → pascaligo-DbxCO0kO.js} +1 -1
- package/dist/web-dist/assets/{perl-ayfptt23.js → perl-DL95F-1i.js} +1 -1
- package/dist/web-dist/assets/{personal-preferences.store-BIr71Re8.js → personal-preferences.store-BgUar1W1.js} +1 -1
- package/dist/web-dist/assets/{pgsql-CPGqMVI3.js → pgsql-D6V7y-We.js} +1 -1
- package/dist/web-dist/assets/{php-DA-YJ6wI.js → php-Cl4Rc77T.js} +1 -1
- package/dist/web-dist/assets/{pla-DesDCKWW.js → pla-C2-KEJLZ.js} +1 -1
- package/dist/web-dist/assets/{postiats-B8yhii_n.js → postiats-CnwS6VBM.js} +1 -1
- package/dist/web-dist/assets/{powerquery-CG8tCOct.js → powerquery-IxSHxxBc.js} +1 -1
- package/dist/web-dist/assets/{powershell-C68aZHza.js → powershell-DAkyXnxj.js} +1 -1
- package/dist/web-dist/assets/preload-helper-BmptvQqE.js +1 -0
- package/dist/web-dist/assets/{protobuf-OaVxpJrs.js → protobuf-FnPVBP5H.js} +1 -1
- package/dist/web-dist/assets/{pug-0lOSC2rA.js → pug-C_d8B8nZ.js} +1 -1
- package/dist/web-dist/assets/{python-C8ab8TeJ.js → python-DK9sRx0Y.js} +1 -1
- package/dist/web-dist/assets/{qsharp-BmHeDwNl.js → qsharp-DHzbHTnS.js} +1 -1
- package/dist/web-dist/assets/{queries.store-Dwdw-Gej.js → queries.store-CXQwDZiV.js} +1 -1
- package/dist/web-dist/assets/query-runner-D0LqVvy4.js +17 -0
- package/dist/web-dist/assets/{r-DoHxhOJg.js → r-BreUQjgc.js} +1 -1
- package/dist/web-dist/assets/radix-ui-CJhaEsHV.js +41 -0
- package/dist/web-dist/assets/{razor-DynaHCXX.js → razor-CI-yLdex.js} +1 -1
- package/dist/web-dist/assets/react-CGNcTA1t.js +1 -0
- package/dist/web-dist/assets/react-dom-Czf_u9MH.js +9 -0
- package/dist/web-dist/assets/{redis-CSL-jfR-.js → redis-BdhjrevD.js} +1 -1
- package/dist/web-dist/assets/redis-value-Cq8YBvSS.js +1 -0
- package/dist/web-dist/assets/{redshift-Cb-LWZ8f.js → redshift-CwVMUyQc.js} +1 -1
- package/dist/web-dist/assets/{restructuredtext-DTqnvYsu.js → restructuredtext-D6U9PIiF.js} +1 -1
- package/dist/web-dist/assets/rolldown-runtime-D_n5YsVB.js +1 -0
- package/dist/web-dist/assets/{ruby-DbgDuslH.js → ruby-D0QS81Wd.js} +1 -1
- package/dist/web-dist/assets/runner-BE2YTdi9.js +1 -0
- package/dist/web-dist/assets/{rust-CWzrsIL_.js → rust-Bsq9cLDY.js} +1 -1
- package/dist/web-dist/assets/{sb-BghszYt-.js → sb-DAQADLLd.js} +1 -1
- package/dist/web-dist/assets/{scala-Cw9RU1Qz.js → scala-oEMLo0pl.js} +1 -1
- package/dist/web-dist/assets/schema-B-jmgfHC.js +1 -0
- package/dist/web-dist/assets/schema-JCqbh3DE.js +1 -0
- package/dist/web-dist/assets/{scheme-DeYmvmAH.js → scheme-DDI6muad.js} +1 -1
- package/dist/web-dist/assets/{scss-D_S6B2H1.js → scss-BU9Ttlwm.js} +1 -1
- package/dist/web-dist/assets/{select-DU0HoKZ4.js → select-3l4LDMzT.js} +1 -1
- package/dist/web-dist/assets/{separator-CZgXYjVQ.js → separator-BD46sVx9.js} +1 -1
- package/dist/web-dist/assets/{sheet-sidebar-KvxY47ZZ.js → sheet-sidebar-CjbtFAKn.js} +1 -1
- package/dist/web-dist/assets/{shell-B59ItoUV.js → shell-BI6rOefn.js} +1 -1
- package/dist/web-dist/assets/{solidity-De0h6YhL.js → solidity-B17zzzu-.js} +1 -1
- package/dist/web-dist/assets/{sophia-DWmKHYE0.js → sophia-DQi6mooo.js} +1 -1
- package/dist/web-dist/assets/{sparql-0sKQlAae.js → sparql-DGFBDMPi.js} +1 -1
- package/dist/web-dist/assets/spinner-D7Cvt3BD.js +1 -0
- package/dist/web-dist/assets/{sql-Cafrv7gm.js → sql-DGzRlxQo.js} +1 -1
- package/dist/web-dist/assets/{st-qkFqcB41.js → st-Ceq2dhS_.js} +1 -1
- package/dist/web-dist/assets/{swift-CDPKFfVs.js → swift-8-FeeRSy.js} +1 -1
- package/dist/web-dist/assets/{systemverilog-rjtBmhAJ.js → systemverilog-mmioB6wo.js} +1 -1
- package/dist/web-dist/assets/table-sVAmZLcg.js +1 -0
- package/dist/web-dist/assets/tables-TW8L7_FW.js +16 -0
- package/dist/web-dist/assets/tanstack-D9GckDbx.js +5 -0
- package/dist/web-dist/assets/{tcl-C0NrUCCP.js → tcl-BTUJQo2X.js} +1 -1
- package/dist/web-dist/assets/{ts.worker-r_qbh1JO.js → ts.worker-BLC4EdqU.js} +18311 -18257
- package/dist/web-dist/assets/{tsMode-C2yuf0pi.js → tsMode-BRJ2WiSx.js} +4 -4
- package/dist/web-dist/assets/{twig-RBrBABOf.js → twig-C6ea54bM.js} +1 -1
- package/dist/web-dist/assets/{typescript-DWkZjHjp.js → typescript-U3aTTn2d.js} +1 -1
- package/dist/web-dist/assets/{typespec-DfQiGud4.js → typespec-B4z8l2XF.js} +1 -1
- package/dist/web-dist/assets/use-database-engine-CG7rZQXQ.js +1 -0
- package/dist/web-dist/assets/{use-theme-BLw5dtZV.js → use-theme-CKjVHAZg.js} +1 -1
- package/dist/web-dist/assets/utils-CZdosIsH.js +1 -0
- package/dist/web-dist/assets/{vb-BslxQW9i.js → vb-BbQNgbjG.js} +1 -1
- package/dist/web-dist/assets/visualizer-c23lRr6o.js +1 -0
- package/dist/web-dist/assets/{wgsl-Bq67ZIFU.js → wgsl-SWAFFAY4.js} +1 -1
- package/dist/web-dist/assets/{workers-rMl5Xrk2.js → workers-DeOJBffb.js} +1 -1
- package/dist/web-dist/assets/{xml-PfDqoe6w.js → xml-DM-qLhlQ.js} +1 -1
- package/dist/web-dist/assets/{yaml-CIuY3cB5.js → yaml-BB3LUpV7.js} +1 -1
- package/dist/web-dist/index.html +31 -31
- package/package.json +22 -22
- package/dist/web-dist/assets/_pathlessLayout-aKKQKRJX.js +0 -1
- package/dist/web-dist/assets/_pathlessLayout-s6cwJxH6.js +0 -2
- package/dist/web-dist/assets/_queryId-DnPgn-AJ.js +0 -1
- package/dist/web-dist/assets/_table-Bgt0zJ9m.js +0 -1
- package/dist/web-dist/assets/_table-CU8PHZQE.js +0 -1
- package/dist/web-dist/assets/_table-DIbpzW3q.js +0 -1
- package/dist/web-dist/assets/bundle-mjs-DEMZsBkP.js +0 -1
- package/dist/web-dist/assets/chat-sidebar-Cr2fVFDF.js +0 -132
- package/dist/web-dist/assets/connect-BM4hZPnz.js +0 -1
- package/dist/web-dist/assets/constants-BBxXyYPa.js +0 -12
- package/dist/web-dist/assets/cssMode-CiAtMuTk.js +0 -1
- package/dist/web-dist/assets/database.store-73Wsz2L5.js +0 -57
- package/dist/web-dist/assets/dist-D4HUXaJv.js +0 -1
- package/dist/web-dist/assets/dist-DwRWhVwY.js +0 -2
- package/dist/web-dist/assets/editor-1FQrmyyI.css +0 -1
- package/dist/web-dist/assets/editor.api-DSevzNN8.js +0 -865
- package/dist/web-dist/assets/format-cell-value-CuhjnBNV.js +0 -1
- package/dist/web-dist/assets/highlighted-body-OFNGDK62-Bi4CQl8I.js +0 -1
- package/dist/web-dist/assets/icons-CheF8KGp.js +0 -1
- package/dist/web-dist/assets/index-YCx2RIFq.js +0 -34
- package/dist/web-dist/assets/index-mbFBVmHb.css +0 -2
- package/dist/web-dist/assets/indexes-BYqaS45O.js +0 -1
- package/dist/web-dist/assets/json-editor-ZcSS1MRc.js +0 -1
- package/dist/web-dist/assets/mermaid-GHXKKRXX-B7fOqMvZ.js +0 -1
- package/dist/web-dist/assets/middleware-DKaxoFZs.js +0 -1
- package/dist/web-dist/assets/module-BbdCXsK0.js +0 -2
- package/dist/web-dist/assets/monaco-theme-BnSsSzUH.css +0 -1
- package/dist/web-dist/assets/monaco-theme-DkPj5STI.js +0 -64
- package/dist/web-dist/assets/preload-helper-DZhPwQp1.js +0 -1
- package/dist/web-dist/assets/query-runner-C430BH5I.js +0 -17
- package/dist/web-dist/assets/radix-ui-ByvuE8TW.js +0 -51
- package/dist/web-dist/assets/react-CKF1H7h0.js +0 -1
- package/dist/web-dist/assets/react-dom-DQQG0g0D.js +0 -9
- package/dist/web-dist/assets/redis-value-Bf0tOet0.js +0 -1
- package/dist/web-dist/assets/rolldown-runtime-0wqQW3ea.js +0 -1
- package/dist/web-dist/assets/runner-DFzqBXp0.js +0 -1
- package/dist/web-dist/assets/schema-B_EtHxTf.js +0 -1
- package/dist/web-dist/assets/schema-iTfBKwXl.js +0 -1
- package/dist/web-dist/assets/spinner-FJ-tXoFX.js +0 -1
- package/dist/web-dist/assets/table-DmoKTp5U.js +0 -1
- package/dist/web-dist/assets/tables-By-PTDwU.js +0 -13
- package/dist/web-dist/assets/tanstack-Cb7WFPRi.js +0 -8
- package/dist/web-dist/assets/use-database-engine-Mwmv8X7V.js +0 -1
- package/dist/web-dist/assets/utils-awMbhLwX.js +0 -1
- package/dist/web-dist/assets/visualizer-LoD_yU5U.js +0 -1
- package/dist/web-dist/assets/vscode-Ba8jYSS7.js +0 -1
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-JLMTFACH-D8jkzP7m.js","assets/rolldown-runtime-D_n5YsVB.js","assets/icons-DKLzom80.js","assets/radix-ui-CJhaEsHV.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as Fi,r as En,t as Lr}from"./rolldown-runtime-D_n5YsVB.js";import{H as ih,U as ah,q as sh}from"./constants-iNJwkB3Z.js";import{a as lh,c as oh,n as Tn,o as ch,t as vl}from"./overlay.store-DoGHwFxO.js";import{C as uh,a as Il,d as hh,f as dh,l as wl,p as oi,u as Ll}from"./index-L3nylpEA.js";import{At as fh,D as ph,Lt as mh,Tt as gh,g as Eh,lt as Th,n as bh,z as kh,zt as xh}from"./icons-DKLzom80.js";import{t as Te}from"./utils-CZdosIsH.js";import{At as Ah,Ot as Ca,jt as _h,kt as yh,n as Ch,r as Sh,t as Nh}from"./radix-ui-CJhaEsHV.js";import{n as Rl,t as Ol}from"./bundle-mjs-DBtz6MiX.js";import{t as Dl}from"./preload-helper-BmptvQqE.js";import{c as vh,d as Ih,l as wh,t as Lh,u as Rh}from"./sheet-sidebar-CjbtFAKn.js";import{i as Oh,r as Dh}from"./separator-BD46sVx9.js";import{n as Pl}from"./_pathlessLayout-sBYxFR0u.js";import{t as Ph}from"./database.store-BbWvMDJ7.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:"db-studio@2.2.0"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6021eafd-a843-4b49-b575-989fc6a0eb3c",e._sentryDebugIdIdentifier="sentry-dbid-6021eafd-a843-4b49-b575-989fc6a0eb3c")}catch{}})();var Mh=["Show me all tables in my database","What columns are in the users table?","Write a query to find all active users","How many orders were placed last month?","Find top 5 customers by total spend","Write a JOIN between users and orders","Users who haven't made any purchase yet","Generate monthly revenue summary query","Suggest useful indexes for better performance","Show schema of the products / inventory table","Latest 20 orders with customer names","Help me write a safe UPDATE query"],bn=(function(e){if(e==null)return Uh;if(typeof e=="function")return kn(e);if(typeof e=="object")return Array.isArray(e)?Bh(e):Fh(e);if(typeof e=="string")return Hh(e);throw new Error("Expected function, string, or object as test")});function Bh(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=bn(e[r]);return kn(n);function n(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Fh(e){const t=e;return kn(r);function r(n){const i=n;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Hh(e){return kn(t);function t(r){return r&&r.type===e}}function kn(e){return t;function t(r,n,i){return!!(jh(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function Uh(){return!0}function jh(e){return e!==null&&typeof e=="object"&&"type"in e}var Ml=[];var $t="skip";function xn(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;const a=bn(i),s=n?-1:1;l(e,void 0,[])();function l(o,u,d){const h=o&&typeof o=="object"?o:{};if(typeof h.type=="string"){const f=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(o.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=Ml,g,N,y;if((!t||a(o,u,d[d.length-1]||void 0))&&(f=zh(r(o,d)),f[0]===!1))return f;if("children"in o&&o.children){const A=o;if(A.children&&f[0]!=="skip")for(N=(n?A.children.length:-1)+s,y=d.concat(A);N>-1&&N<A.children.length;){const C=A.children[N];if(g=l(C,N,y)(),g[0]===!1)return g;N=typeof g[1]=="number"?g[1]:N+s}}return f}}}function zh(e){return Array.isArray(e)?e:typeof e=="number"?[!0,e]:e==null?Ml:[e]}function Ge(e,t,r,n){let i,a,s;typeof t=="function"&&typeof r!="function"?(a=void 0,s=t,i=r):(a=t,s=r,i=n),xn(e,a,l,i);function l(o,u){const d=u[u.length-1],h=d?d.children.indexOf(o):void 0;return s(o,h,d)}}var T=En(xh(),1),m=_h(),Gt={indicator:"indicator",textOnly:"text-only",remove:"remove"};function $h({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:r=[],allowDataImages:n=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500",linkBlockPolicy:l=Gt.indicator,imageBlockPolicy:o=Gt.indicator}){const u=t.length&&!t.every(h=>h==="*"),d=r.length&&!r.every(h=>h==="*");if(!e&&(u||d))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return h=>{const p=Qh(e,t,r,n,i,a,s,l,o);Bl(h),Ge(h,p)}}function Sa(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function Yh(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}var qh=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Vh=new Set(["javascript:","data:","file:","vbscript:"]);function Na(e,t,r,n=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&n&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const o=e.substring(5);if(o&&o.length>0&&o!=="invalid")return e}}catch{return null}return null}const s=Sa(e,r);if(!s||Vh.has(s.protocol)||!(qh.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const l=Yh(e);return s&&t.some(o=>{const u=Sa(o,r);return!u||u.origin!==s.origin?!1:s.href.startsWith(u.href)})?l?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:l?s.pathname+s.search+s.hash:s.href:null}function Bl(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Bl(t)}}var Bn=Symbol("node-seen");function Wh(e,t,r){return t===Gt.remove?{type:"remove"}:t===Gt.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:r},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function Gh(e,t,r){if(t===Gt.remove)return{type:"remove"};if(t===Gt.textOnly){const n=String(e.properties.alt||"");return n?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:n}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:r},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}var Qh=(e,t,r,n,i,a,s,l,o)=>{const u=(d,h,p)=>{if(d.type!=="element"||d[Bn])return!0;if(d.tagName==="a"){const f=Na(d.properties.href,t,e,!1,!1,i);if(f===null){if(d[Bn]=!0,Ge(d,u),p&&typeof h=="number"){const g=Wh(d,l,s);if(g.type==="remove")return p.children.splice(h,1),[$t,h];p.children[h]=g.element}return $t}else return d.properties.href=f,d.properties.target="_blank",d.properties.rel="noopener noreferrer",!0}if(d.tagName==="img"){const f=Na(d.properties.src,r,e,n,!0,i);if(f===null){if(d[Bn]=!0,Ge(d,u),p&&typeof h=="number"){const g=Gh(d,o,a);if(g.type==="remove")return p.children.splice(h,1),[$t,h];p.children[h]=g.element}return $t}else return d.properties.src=f,!0}return!0};return u},va=typeof self=="object"?self:globalThis,Kh=(e,t)=>{const r=(i,a)=>(e.set(a,i),i),n=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case 0:case-1:return r(s,i);case 1:{const l=r([],i);for(const o of s)l.push(n(o));return l}case 2:{const l=r({},i);for(const[o,u]of s)l[n(o)]=n(u);return l}case 3:return r(new Date(s),i);case 4:{const{source:l,flags:o}=s;return r(new RegExp(l,o),i)}case 5:{const l=r(new Map,i);for(const[o,u]of s)l.set(n(o),n(u));return l}case 6:{const l=r(new Set,i);for(const o of s)l.add(n(o));return l}case 7:{const{name:l,message:o}=s;return r(new va[l](o),i)}case 8:return r(BigInt(s),i);case"BigInt":return r(Object(BigInt(s)),i);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return r(new DataView(l),s)}}return r(new va[a](s),i)};return n},Ia=e=>Kh(new Map,e)(0),Ut="",{toString:Xh}={},{keys:Zh}=Object,ur=e=>{const t=typeof e;if(t!=="object"||!e)return[0,t];const r=Xh.call(e).slice(8,-1);switch(r){case"Array":return[1,Ut];case"Object":return[2,Ut];case"Date":return[3,Ut];case"RegExp":return[4,Ut];case"Map":return[5,Ut];case"Set":return[6,Ut];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},qr=([e,t])=>e===0&&(t==="function"||t==="symbol"),Jh=(e,t,r,n)=>{const i=(s,l)=>{const o=n.push(s)-1;return r.set(l,o),o},a=s=>{if(r.has(s))return r.get(s);let[l,o]=ur(s);switch(l){case 0:{let d=s;switch(o){case"bigint":l=8,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);d=null;break;case"undefined":return i([-1],s)}return i([l,d],s)}case 1:{if(o){let p=s;return o==="DataView"?p=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(p=new Uint8Array(s)),i([o,[...p]],s)}const d=[],h=i([l,d],s);for(const p of s)d.push(a(p));return h}case 2:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const d=[],h=i([l,d],s);for(const p of Zh(s))(e||!qr(ur(s[p])))&&d.push([a(p),a(s[p])]);return h}case 3:return i([l,s.toISOString()],s);case 4:{const{source:d,flags:h}=s;return i([l,{source:d,flags:h}],s)}case 5:{const d=[],h=i([l,d],s);for(const[p,f]of s)(e||!(qr(ur(p))||qr(ur(f))))&&d.push([a(p),a(f)]);return h}case 6:{const d=[],h=i([l,d],s);for(const p of s)(e||!qr(ur(p)))&&d.push(a(p));return h}}const{message:u}=s;return i([l,{name:o,message:u}],s)};return a},wa=(e,{json:t,lossy:r}={})=>{const n=[];return Jh(!(t||r),!!t,new Map,n)(e),n},wt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ia(wa(e,t)):structuredClone(e):(e,t)=>Ia(wa(e,t));var Rr=class{constructor(e,t,r){this.normal=t,this.property=e,r&&(this.space=r)}};Rr.prototype.normal={};Rr.prototype.property={};Rr.prototype.space=void 0;function Fl(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new Rr(r,n,t)}function Nr(e){return e.toLowerCase()}var Be=class{constructor(e,t){this.attribute=t,this.property=e}};Be.prototype.attribute="";Be.prototype.booleanish=!1;Be.prototype.boolean=!1;Be.prototype.commaOrSpaceSeparated=!1;Be.prototype.commaSeparated=!1;Be.prototype.defined=!1;Be.prototype.mustUseProperty=!1;Be.prototype.number=!1;Be.prototype.overloadedBoolean=!1;Be.prototype.property="";Be.prototype.spaceSeparated=!1;Be.prototype.space=void 0;var ci=Fi({boolean:()=>ne,booleanish:()=>ke,commaOrSpaceSeparated:()=>ze,commaSeparated:()=>qt,number:()=>j,overloadedBoolean:()=>ui,spaceSeparated:()=>me}),ed=0,ne=Ot(),ke=Ot(),ui=Ot(),j=Ot(),me=Ot(),qt=Ot(),ze=Ot();function Ot(){return 2**++ed}var Fn=Object.keys(ci),Hi=class extends Be{constructor(e,t,r,n){let i=-1;if(super(e,t),La(this,"space",n),typeof r=="number")for(;++i<Fn.length;){const a=Fn[i];La(this,Fn[i],(r&ci[a])===ci[a])}}};Hi.prototype.defined=!0;function La(e,t,r){r&&(e[t]=r)}function Xt(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const a=new Hi(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[Nr(n)]=n,r[Nr(a.attribute)]=n}return new Rr(t,r,e.space)}var Hl=Xt({properties:{ariaActiveDescendant:null,ariaAtomic:ke,ariaAutoComplete:null,ariaBusy:ke,ariaChecked:ke,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:me,ariaCurrent:null,ariaDescribedBy:me,ariaDetails:null,ariaDisabled:ke,ariaDropEffect:me,ariaErrorMessage:null,ariaExpanded:ke,ariaFlowTo:me,ariaGrabbed:ke,ariaHasPopup:null,ariaHidden:ke,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:me,ariaLevel:j,ariaLive:null,ariaModal:ke,ariaMultiLine:ke,ariaMultiSelectable:ke,ariaOrientation:null,ariaOwns:me,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:ke,ariaReadOnly:ke,ariaRelevant:null,ariaRequired:ke,ariaRoleDescription:me,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:ke,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ul(e,t){return t in e?e[t]:t}function jl(e,t){return Ul(e,t.toLowerCase())}var td=Xt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qt,acceptCharset:me,accessKey:me,action:null,allow:null,allowFullScreen:ne,allowPaymentRequest:ne,allowUserMedia:ne,alt:null,as:null,async:ne,autoCapitalize:null,autoComplete:me,autoFocus:ne,autoPlay:ne,blocking:me,capture:null,charSet:null,checked:ne,cite:null,className:me,cols:j,colSpan:null,content:null,contentEditable:ke,controls:ne,controlsList:me,coords:j|qt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ne,defer:ne,dir:null,dirName:null,disabled:ne,download:ui,draggable:ke,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ne,formTarget:null,headers:me,height:j,hidden:ui,high:j,href:null,hrefLang:null,htmlFor:me,httpEquiv:me,id:null,imageSizes:null,imageSrcSet:null,inert:ne,inputMode:null,integrity:null,is:null,isMap:ne,itemId:null,itemProp:me,itemRef:me,itemScope:ne,itemType:me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ne,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:ne,muted:ne,name:null,nonce:null,noModule:ne,noValidate:ne,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ne,optimum:j,pattern:null,ping:me,placeholder:null,playsInline:ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ne,referrerPolicy:null,rel:me,required:ne,reversed:ne,rows:j,rowSpan:j,sandbox:me,scope:null,scoped:ne,seamless:ne,selected:ne,shadowRootClonable:ne,shadowRootDelegatesFocus:ne,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:ke,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:ne,useMap:null,value:ke,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:me,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ne,declare:ne,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:ne,noHref:ne,noShade:ne,noWrap:ne,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:ke,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ne,disableRemotePlayback:ne,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:jl}),rd=Xt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ze,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:me,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:qt,g2:qt,glyphName:qt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:ze,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:j,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ze,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ze,rev:ze,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ze,requiredFeatures:ze,requiredFonts:ze,requiredFormats:ze,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:ze,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ze,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ze,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ul}),zl=Xt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),$l=Xt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jl}),Yl=Xt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),nd={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},id=/[A-Z]/g,Ra=/-[a-z]/g,ad=/^data[-\w.:]+$/i;function An(e,t){const r=Nr(t);let n=t,i=Be;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&ad.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ra,ld);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ra.test(a)){let s=a.replace(id,sd);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Hi}return new i(n,t)}function sd(e){return"-"+e.toLowerCase()}function ld(e){return e.charAt(1).toUpperCase()}var Or=Fl([Hl,td,zl,$l,Yl],"html"),xt=Fl([Hl,rd,zl,$l,Yl],"svg");function Oa(e){const t=[],r=String(e||"");let n=r.indexOf(","),i=0,a=!1;for(;!a;){n===-1&&(n=r.length,a=!0);const s=r.slice(i,n).trim();(s||!a)&&t.push(s),i=n+1,n=r.indexOf(",",i)}return t}function ql(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}var Da=/[#.]/g;function od(e,t){const r=e||"",n={};let i=0,a,s;for(;i<r.length;){Da.lastIndex=i;const l=Da.exec(r),o=r.slice(i,l?l.index:r.length);o&&(a?a==="#"?n.id=o:Array.isArray(n.className)?n.className.push(o):n.className=[o]:s=o,i+=o.length),l&&(a=l[0],i++)}return{type:"element",tagName:s||t||"div",properties:n,children:[]}}function Pa(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Vl(e){return e.join(" ").trim()}function Wl(e,t,r){const n=r?dd(r):void 0;function i(a,s,...l){let o;if(a==null){o={type:"root",children:[]};const u=s;l.unshift(u)}else{o=od(a,t);const u=o.tagName.toLowerCase(),d=n?n.get(u):void 0;if(o.tagName=d||u,cd(s))l.unshift(s);else for(const[h,p]of Object.entries(s))ud(e,o.properties,h,p)}for(const u of l)hi(o.children,u);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function cd(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,r=Object.keys(e);for(const n of r){const i=t[n];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function ud(e,t,r,n){const i=An(e,r);let a;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;a=n}else typeof n=="boolean"?a=n:typeof n=="string"?i.spaceSeparated?a=Pa(n):i.commaSeparated?a=Oa(n):i.commaOrSpaceSeparated?a=Pa(Oa(n).join(" ")):a=Ma(i,i.property,n):Array.isArray(n)?a=[...n]:a=i.property==="style"?hd(n):String(n);if(Array.isArray(a)){const s=[];for(const l of a)s.push(Ma(i,i.property,l));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function hi(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const r of t)hi(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?hi(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Ma(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||Nr(r)===Nr(t)))return!0}return r}function hd(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function dd(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}var fd=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],pd=Wl(Or,"div"),md=Wl(xt,"g",fd);function gd(e){const t=String(e),r=[];return{toOffset:i,toPoint:n};function n(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let l=r[s];if(l===void 0){const o=Ba(t,r[s-1]);l=o===-1?t.length+1:o+1,r[s]=l}if(l>a)return{line:s+1,column:a-(s>0?r[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;r.length<a.line;){const l=r[r.length-1],o=Ba(t,l),u=o===-1?t.length+1:o+1;if(l===u)break;r.push(u)}const s=(a.line>1?r[a.line-2]:0)+a.column-1;if(s<r[a.line-1])return s}}}function Ba(e,t){const r=e.indexOf("\r",t),n=e.indexOf(`
|
|
3
|
+
`,t);return n===-1?r:r===-1||r+1===n?n:r<n?r:n}var vt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Gl={}.hasOwnProperty,Ed=Object.prototype;function Td(e,t){const r=t||{};return Ui({file:r.file||void 0,location:!1,schema:r.space==="svg"?xt:Or,verbose:r.verbose||!1},e)}function Ui(e,t){let r;switch(t.nodeName){case"#comment":{const n=t;return r={type:"comment",value:n.data},en(e,n,r),r}case"#document":case"#document-fragment":{const n=t,i="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(r={type:"root",children:Ql(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=gd(a),l=s.toPoint(0),o=s.toPoint(a.length);r.position={start:l,end:o}}return r}case"#documentType":{const n=t;return r={type:"doctype"},en(e,n,r),r}case"#text":{const n=t;return r={type:"text",value:n.value},en(e,n,r),r}default:return r=bd(e,t),r}}function Ql(e,t){let r=-1;const n=[];for(;++r<t.length;){const i=Ui(e,t[r]);n.push(i)}return n}function bd(e,t){const r=e.schema;e.schema=t.namespaceURI===vt.svg?xt:Or;let n=-1;const i={};for(;++n<t.attrs.length;){const s=t.attrs[n],l=(s.prefix?s.prefix+":":"")+s.name;Gl.call(Ed,l)||(i[l]=s.value)}const a=(e.schema.space==="svg"?md:pd)(t.tagName,i,Ql(e,t.childNodes));if(en(e,t,a),a.tagName==="template"){const s=t,l=s.sourceCodeLocation,o=l&&l.startTag&&Yt(l.startTag),u=l&&l.endTag&&Yt(l.endTag),d=Ui(e,s.content);o&&u&&e.file&&(d.position={start:o.end,end:u.start}),a.content=d}return e.schema=r,a}function en(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const n=kd(e,r,t.sourceCodeLocation);n&&(e.location=!0,r.position=n)}}function kd(e,t,r){const n=Yt(r);if(t.type==="element"){const i=t.children[t.children.length-1];if(n&&!r.endTag&&i&&i.position&&i.position.end&&(n.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(r.attrs)for(s in r.attrs)Gl.call(r.attrs,s)&&(a[An(e.schema,s).property]=Yt(r.attrs[s]));r.startTag;const l=Yt(r.startTag),o=r.endTag?Yt(r.endTag):void 0,u={opening:l};o&&(u.closing=o),u.properties=a,t.data={position:u}}}return n}function Yt(e){const t=Fa({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=Fa({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function Fa(e){return e.line&&e.column?e:void 0}var Ha={}.hasOwnProperty;function Kl(e,t){const r=t||{};function n(i,...a){let s=n.invalid;const l=n.handlers;if(i&&Ha.call(i,e)){const o=String(i[e]);s=Ha.call(l,o)?l[o]:n.unknown}if(s)return s.call(this,i,...a)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}var xd={},Ad={}.hasOwnProperty,Xl=Kl("type",{handlers:{root:yd,element:Id,text:Nd,comment:vd,doctype:Sd}});function _d(e,t){const r=(t||xd).space;return Xl(e,r==="svg"?xt:Or)}function yd(e,t){const r={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return r.childNodes=ji(e.children,r,t),Zt(e,r),r}function Cd(e,t){const r={nodeName:"#document-fragment",childNodes:[]};return r.childNodes=ji(e.children,r,t),Zt(e,r),r}function Sd(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Zt(e,t),t}function Nd(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Zt(e,t),t}function vd(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Zt(e,t),t}function Id(e,t){const r=t;let n=r;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(n=xt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&Ad.call(e.properties,a)){const o=wd(n,a,e.properties[a]);o&&i.push(o)}}const s=n.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:vt[s],childNodes:[],parentNode:null};return l.childNodes=ji(e.children,l,n),Zt(e,l),e.tagName==="template"&&e.content&&(l.content=Cd(e.content,n)),l}function wd(e,t,r){const n=An(e,t);if(r===!1||r===null||r===void 0||typeof r=="number"&&Number.isNaN(r)||!r&&n.boolean)return;Array.isArray(r)&&(r=n.commaSeparated?ql(r):Vl(r));const i={name:n.attribute,value:r===!0?"":String(r)};if(n.space&&n.space!=="html"&&n.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=n.attribute.slice(0,a)),i.namespace=vt[n.space]}return i}function ji(e,t,r){let n=-1;const i=[];if(e)for(;++n<e.length;){const a=Xl(e[n],r);a.parentNode=t,i.push(a)}return i}function Zt(e,t){const r=e.position;r&&r.start&&r.end&&(r.start.offset,r.end.offset,t.sourceCodeLocation={startLine:r.start.line,startCol:r.start.column,startOffset:r.start.offset,endLine:r.end.line,endCol:r.end.column,endOffset:r.end.offset})}var Ld=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Rd=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]);var E;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(E||(E={}));var Pe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Zl(e){return e>=55296&&e<=57343}function Od(e){return e>=56320&&e<=57343}function Dd(e,t){return(e-55296)*1024+9216+t}function Jl(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function eo(e){return e>=64976&&e<=65007||Rd.has(e)}var O;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(O||(O={}));var Pd=65536,Md=class{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Pd,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){const{line:r,col:n,offset:i}=this,a=n+t,s=i+t;return{code:e,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:s,endOffset:s}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(Od(t))return this.pos++,this._addGap(),Dd(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,E.EOF;return this._err(O.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let r=0;r<e.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==e.charCodeAt(r))return!1;return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;const r=this.html.charCodeAt(t);return r===E.CARRIAGE_RETURN?E.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;let e=this.html.charCodeAt(this.pos);return e===E.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,E.LINE_FEED):e===E.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Zl(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===E.LINE_FEED||e===E.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Jl(e)?this._err(O.controlCharacterInInputStream):eo(e)&&this._err(O.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},ie;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(ie||(ie={}));function to(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}var Bd=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Hn,Fd=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),y1=(Hn=String.fromCodePoint)!==null&&Hn!==void 0?Hn:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Hd(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Fd.get(e))!==null&&t!==void 0?t:e}var _e;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(_e||(_e={}));var Ud=32,Tt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Tt||(Tt={}));function di(e){return e>=_e.ZERO&&e<=_e.NINE}function jd(e){return e>=_e.UPPER_A&&e<=_e.UPPER_F||e>=_e.LOWER_A&&e<=_e.LOWER_F}function zd(e){return e>=_e.UPPER_A&&e<=_e.UPPER_Z||e>=_e.LOWER_A&&e<=_e.LOWER_Z||di(e)}function $d(e){return e===_e.EQUALS||zd(e)}var Ae;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ae||(Ae={}));var ct;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ct||(ct={}));var Yd=class{constructor(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=Ae.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ct.Strict}startEntity(e){this.decodeMode=e,this.state=Ae.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Ae.EntityStart:return e.charCodeAt(t)===_e.NUM?(this.state=Ae.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Ae.NamedEntity,this.stateNamedEntity(e,t));case Ae.NumericStart:return this.stateNumericStart(e,t);case Ae.NumericDecimal:return this.stateNumericDecimal(e,t);case Ae.NumericHex:return this.stateNumericHex(e,t);case Ae.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Ud)===_e.LOWER_X?(this.state=Ae.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Ae.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,r,n){if(t!==r){const i=r-t;this.result=this.result*Math.pow(n,i)+Number.parseInt(e.substr(t,i),n),this.consumed+=i}}stateNumericHex(e,t){const r=t;for(;t<e.length;){const n=e.charCodeAt(t);if(di(n)||jd(n))t+=1;else return this.addToNumericResult(e,r,t,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(e,r,t,16),-1}stateNumericDecimal(e,t){const r=t;for(;t<e.length;){const n=e.charCodeAt(t);if(di(n))t+=1;else return this.addToNumericResult(e,r,t,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(e,r,t,10),-1}emitNumericEntity(e,t){var r;if(this.consumed<=t)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===_e.SEMI)this.consumed+=1;else if(this.decodeMode===ct.Strict)return 0;return this.emitCodePoint(Hd(this.result),this.consumed),this.errors&&(e!==_e.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:r}=this;let n=r[this.treeIndex],i=(n&Tt.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const a=e.charCodeAt(t);if(this.treeIndex=qd(r,n,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===ct.Attribute&&(i===0||$d(a))?0:this.emitNotTerminatedNamedEntity();if(n=r[this.treeIndex],i=(n&Tt.VALUE_LENGTH)>>14,i!==0){if(a===_e.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==ct.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:r}=this,n=(r[t]&Tt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,n,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,r){const{decodeTree:n}=this;return this.emitCodePoint(t===1?n[e]&~Tt.VALUE_LENGTH:n[e+1],r),t===3&&this.emitCodePoint(n[e+2],r),r}end(){var e;switch(this.state){case Ae.NamedEntity:return this.result!==0&&(this.decodeMode!==ct.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ae.NumericDecimal:return this.emitNumericEntity(0,2);case Ae.NumericHex:return this.emitNumericEntity(0,3);case Ae.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ae.EntityStart:return 0}}};function qd(e,t,r,n){const i=(t&Tt.BRANCH_LENGTH)>>7,a=t&Tt.JUMP_TABLE;if(i===0)return a!==0&&n===a?r:-1;if(a){const o=n-a;return o<0||o>=i?-1:e[r+o]-1}let s=r,l=s+i-1;for(;s<=l;){const o=s+l>>>1,u=e[o];if(u<n)s=o+1;else if(u>n)l=o-1;else return e[o+i]}return-1}var M;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(M||(M={}));var It;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(It||(It={}));var qe;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(qe||(qe={}));var w;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(w||(w={}));var c;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(c||(c={}));var Vd=new Map([[w.A,c.A],[w.ADDRESS,c.ADDRESS],[w.ANNOTATION_XML,c.ANNOTATION_XML],[w.APPLET,c.APPLET],[w.AREA,c.AREA],[w.ARTICLE,c.ARTICLE],[w.ASIDE,c.ASIDE],[w.B,c.B],[w.BASE,c.BASE],[w.BASEFONT,c.BASEFONT],[w.BGSOUND,c.BGSOUND],[w.BIG,c.BIG],[w.BLOCKQUOTE,c.BLOCKQUOTE],[w.BODY,c.BODY],[w.BR,c.BR],[w.BUTTON,c.BUTTON],[w.CAPTION,c.CAPTION],[w.CENTER,c.CENTER],[w.CODE,c.CODE],[w.COL,c.COL],[w.COLGROUP,c.COLGROUP],[w.DD,c.DD],[w.DESC,c.DESC],[w.DETAILS,c.DETAILS],[w.DIALOG,c.DIALOG],[w.DIR,c.DIR],[w.DIV,c.DIV],[w.DL,c.DL],[w.DT,c.DT],[w.EM,c.EM],[w.EMBED,c.EMBED],[w.FIELDSET,c.FIELDSET],[w.FIGCAPTION,c.FIGCAPTION],[w.FIGURE,c.FIGURE],[w.FONT,c.FONT],[w.FOOTER,c.FOOTER],[w.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[w.FORM,c.FORM],[w.FRAME,c.FRAME],[w.FRAMESET,c.FRAMESET],[w.H1,c.H1],[w.H2,c.H2],[w.H3,c.H3],[w.H4,c.H4],[w.H5,c.H5],[w.H6,c.H6],[w.HEAD,c.HEAD],[w.HEADER,c.HEADER],[w.HGROUP,c.HGROUP],[w.HR,c.HR],[w.HTML,c.HTML],[w.I,c.I],[w.IMG,c.IMG],[w.IMAGE,c.IMAGE],[w.INPUT,c.INPUT],[w.IFRAME,c.IFRAME],[w.KEYGEN,c.KEYGEN],[w.LABEL,c.LABEL],[w.LI,c.LI],[w.LINK,c.LINK],[w.LISTING,c.LISTING],[w.MAIN,c.MAIN],[w.MALIGNMARK,c.MALIGNMARK],[w.MARQUEE,c.MARQUEE],[w.MATH,c.MATH],[w.MENU,c.MENU],[w.META,c.META],[w.MGLYPH,c.MGLYPH],[w.MI,c.MI],[w.MO,c.MO],[w.MN,c.MN],[w.MS,c.MS],[w.MTEXT,c.MTEXT],[w.NAV,c.NAV],[w.NOBR,c.NOBR],[w.NOFRAMES,c.NOFRAMES],[w.NOEMBED,c.NOEMBED],[w.NOSCRIPT,c.NOSCRIPT],[w.OBJECT,c.OBJECT],[w.OL,c.OL],[w.OPTGROUP,c.OPTGROUP],[w.OPTION,c.OPTION],[w.P,c.P],[w.PARAM,c.PARAM],[w.PLAINTEXT,c.PLAINTEXT],[w.PRE,c.PRE],[w.RB,c.RB],[w.RP,c.RP],[w.RT,c.RT],[w.RTC,c.RTC],[w.RUBY,c.RUBY],[w.S,c.S],[w.SCRIPT,c.SCRIPT],[w.SEARCH,c.SEARCH],[w.SECTION,c.SECTION],[w.SELECT,c.SELECT],[w.SOURCE,c.SOURCE],[w.SMALL,c.SMALL],[w.SPAN,c.SPAN],[w.STRIKE,c.STRIKE],[w.STRONG,c.STRONG],[w.STYLE,c.STYLE],[w.SUB,c.SUB],[w.SUMMARY,c.SUMMARY],[w.SUP,c.SUP],[w.TABLE,c.TABLE],[w.TBODY,c.TBODY],[w.TEMPLATE,c.TEMPLATE],[w.TEXTAREA,c.TEXTAREA],[w.TFOOT,c.TFOOT],[w.TD,c.TD],[w.TH,c.TH],[w.THEAD,c.THEAD],[w.TITLE,c.TITLE],[w.TR,c.TR],[w.TRACK,c.TRACK],[w.TT,c.TT],[w.U,c.U],[w.UL,c.UL],[w.SVG,c.SVG],[w.VAR,c.VAR],[w.WBR,c.WBR],[w.XMP,c.XMP]]);function Jt(e){var t;return(t=Vd.get(e))!==null&&t!==void 0?t:c.UNKNOWN}var H=c,Wd={[M.HTML]:new Set([H.ADDRESS,H.APPLET,H.AREA,H.ARTICLE,H.ASIDE,H.BASE,H.BASEFONT,H.BGSOUND,H.BLOCKQUOTE,H.BODY,H.BR,H.BUTTON,H.CAPTION,H.CENTER,H.COL,H.COLGROUP,H.DD,H.DETAILS,H.DIR,H.DIV,H.DL,H.DT,H.EMBED,H.FIELDSET,H.FIGCAPTION,H.FIGURE,H.FOOTER,H.FORM,H.FRAME,H.FRAMESET,H.H1,H.H2,H.H3,H.H4,H.H5,H.H6,H.HEAD,H.HEADER,H.HGROUP,H.HR,H.HTML,H.IFRAME,H.IMG,H.INPUT,H.LI,H.LINK,H.LISTING,H.MAIN,H.MARQUEE,H.MENU,H.META,H.NAV,H.NOEMBED,H.NOFRAMES,H.NOSCRIPT,H.OBJECT,H.OL,H.P,H.PARAM,H.PLAINTEXT,H.PRE,H.SCRIPT,H.SECTION,H.SELECT,H.SOURCE,H.STYLE,H.SUMMARY,H.TABLE,H.TBODY,H.TD,H.TEMPLATE,H.TEXTAREA,H.TFOOT,H.TH,H.THEAD,H.TITLE,H.TR,H.TRACK,H.UL,H.WBR,H.XMP]),[M.MATHML]:new Set([H.MI,H.MO,H.MN,H.MS,H.MTEXT,H.ANNOTATION_XML]),[M.SVG]:new Set([H.TITLE,H.FOREIGN_OBJECT,H.DESC]),[M.XLINK]:new Set,[M.XML]:new Set,[M.XMLNS]:new Set},fi=new Set([H.H1,H.H2,H.H3,H.H4,H.H5,H.H6]),C1=new Set([w.STYLE,w.SCRIPT,w.XMP,w.IFRAME,w.NOEMBED,w.NOFRAMES,w.PLAINTEXT]),b;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(b||(b={}));var be={DATA:b.DATA,RCDATA:b.RCDATA,RAWTEXT:b.RAWTEXT,SCRIPT_DATA:b.SCRIPT_DATA,PLAINTEXT:b.PLAINTEXT,CDATA_SECTION:b.CDATA_SECTION};function Gd(e){return e>=E.DIGIT_0&&e<=E.DIGIT_9}function gr(e){return e>=E.LATIN_CAPITAL_A&&e<=E.LATIN_CAPITAL_Z}function Qd(e){return e>=E.LATIN_SMALL_A&&e<=E.LATIN_SMALL_Z}function pt(e){return Qd(e)||gr(e)}function Ua(e){return pt(e)||Gd(e)}function Vr(e){return e+32}function ro(e){return e===E.SPACE||e===E.LINE_FEED||e===E.TABULATION||e===E.FORM_FEED}function ja(e){return ro(e)||e===E.SOLIDUS||e===E.GREATER_THAN_SIGN}function Kd(e){return e===E.NULL?O.nullCharacterReference:e>1114111?O.characterReferenceOutsideUnicodeRange:Zl(e)?O.surrogateCharacterReference:eo(e)?O.noncharacterCharacterReference:Jl(e)||e===E.CARRIAGE_RETURN?O.controlCharacterReference:null}var Xd=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=b.DATA,this.returnState=b.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Md(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Yd(Bd,(r,n)=>{this.preprocessor.pos=this.entityStartPos+n-1,this._flushCodePointConsumedAsCharacterReference(r)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(O.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(O.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const n=Kd(r);n&&this._err(n,1)}}:void 0)}_err(e,t=0){var r,n;(n=(r=this.handler).onParseError)===null||n===void 0||n.call(r,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,r){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ie.START_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ie.END_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:ie.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:ie.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const r=this.currentToken;if(to(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const n=(e=(t=r.location).attrs)!==null&&e!==void 0?e:t.attrs=Object.create(null);n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(O.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=Jt(e.tagName),e.type===ie.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(O.endTagWithAttributes),e.selfClosing&&this._err(O.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case ie.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case ie.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case ie.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:ie.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){const t=ro(e)?ie.WHITESPACE_CHARACTER:e===E.NULL?ie.NULL_CHARACTER:ie.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(ie.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=b.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ct.Attribute:ct.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===b.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case b.DATA:this._stateData(e);break;case b.RCDATA:this._stateRcdata(e);break;case b.RAWTEXT:this._stateRawtext(e);break;case b.SCRIPT_DATA:this._stateScriptData(e);break;case b.PLAINTEXT:this._statePlaintext(e);break;case b.TAG_OPEN:this._stateTagOpen(e);break;case b.END_TAG_OPEN:this._stateEndTagOpen(e);break;case b.TAG_NAME:this._stateTagName(e);break;case b.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case b.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case b.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case b.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case b.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case b.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case b.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case b.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case b.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case b.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case b.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case b.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case b.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case b.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case b.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case b.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case b.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case b.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case b.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case b.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case b.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case b.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case b.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case b.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case b.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case b.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case b.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case b.BOGUS_COMMENT:this._stateBogusComment(e);break;case b.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case b.COMMENT_START:this._stateCommentStart(e);break;case b.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case b.COMMENT:this._stateComment(e);break;case b.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case b.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case b.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case b.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case b.COMMENT_END:this._stateCommentEnd(e);break;case b.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case b.DOCTYPE:this._stateDoctype(e);break;case b.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case b.DOCTYPE_NAME:this._stateDoctypeName(e);break;case b.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case b.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case b.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case b.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case b.CDATA_SECTION:this._stateCdataSection(e);break;case b.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case b.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case b.CHARACTER_REFERENCE:this._stateCharacterReference();break;case b.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case E.LESS_THAN_SIGN:this.state=b.TAG_OPEN;break;case E.AMPERSAND:this._startCharacterReference();break;case E.NULL:this._err(O.unexpectedNullCharacter),this._emitCodePoint(e);break;case E.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case E.AMPERSAND:this._startCharacterReference();break;case E.LESS_THAN_SIGN:this.state=b.RCDATA_LESS_THAN_SIGN;break;case E.NULL:this._err(O.unexpectedNullCharacter),this._emitChars("�");break;case E.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case E.LESS_THAN_SIGN:this.state=b.RAWTEXT_LESS_THAN_SIGN;break;case E.NULL:this._err(O.unexpectedNullCharacter),this._emitChars("�");break;case E.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case E.LESS_THAN_SIGN:this.state=b.SCRIPT_DATA_LESS_THAN_SIGN;break;case E.NULL:this._err(O.unexpectedNullCharacter),this._emitChars("�");break;case E.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case E.NULL:this._err(O.unexpectedNullCharacter),this._emitChars("�");break;case E.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(pt(e))this._createStartTagToken(),this.state=b.TAG_NAME,this._stateTagName(e);else switch(e){case E.EXCLAMATION_MARK:this.state=b.MARKUP_DECLARATION_OPEN;break;case E.SOLIDUS:this.state=b.END_TAG_OPEN;break;case E.QUESTION_MARK:this._err(O.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=b.BOGUS_COMMENT,this._stateBogusComment(e);break;case E.EOF:this._err(O.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(O.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=b.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(pt(e))this._createEndTagToken(),this.state=b.TAG_NAME,this._stateTagName(e);else switch(e){case E.GREATER_THAN_SIGN:this._err(O.missingEndTagName),this.state=b.DATA;break;case E.EOF:this._err(O.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(O.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:this.state=b.BEFORE_ATTRIBUTE_NAME;break;case E.SOLIDUS:this.state=b.SELF_CLOSING_START_TAG;break;case E.GREATER_THAN_SIGN:this.state=b.DATA,this.emitCurrentTagToken();break;case E.NULL:this._err(O.unexpectedNullCharacter),t.tagName+="�";break;case E.EOF:this._err(O.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(gr(e)?Vr(e):e)}}_stateRcdataLessThanSign(e){e===E.SOLIDUS?this.state=b.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){pt(e)?(this.state=b.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=b.BEFORE_ATTRIBUTE_NAME,!1;case E.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=b.SELF_CLOSING_START_TAG,!1;case E.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=b.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===E.SOLIDUS?this.state=b.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){pt(e)?(this.state=b.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case E.SOLIDUS:this.state=b.SCRIPT_DATA_END_TAG_OPEN;break;case E.EXCLAMATION_MARK:this.state=b.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=b.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){pt(e)?(this.state=b.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===E.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===E.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case E.HYPHEN_MINUS:this.state=b.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case E.LESS_THAN_SIGN:this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case E.NULL:this._err(O.unexpectedNullCharacter),this._emitChars("�");break;case E.EOF:this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case E.HYPHEN_MINUS:this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case E.LESS_THAN_SIGN:this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case E.NULL:this._err(O.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case E.EOF:this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case E.HYPHEN_MINUS:this._emitChars("-");break;case E.LESS_THAN_SIGN:this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case E.GREATER_THAN_SIGN:this.state=b.SCRIPT_DATA,this._emitChars(">");break;case E.NULL:this._err(O.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case E.EOF:this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===E.SOLIDUS?this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:pt(e)?(this._emitChars("<"),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){pt(e)?(this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Pe.SCRIPT,!1)&&ja(this.preprocessor.peek(Pe.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Pe.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case E.HYPHEN_MINUS:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case E.LESS_THAN_SIGN:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case E.NULL:this._err(O.unexpectedNullCharacter),this._emitChars("�");break;case E.EOF:this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case E.HYPHEN_MINUS:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case E.LESS_THAN_SIGN:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case E.NULL:this._err(O.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case E.EOF:this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case E.HYPHEN_MINUS:this._emitChars("-");break;case E.LESS_THAN_SIGN:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case E.GREATER_THAN_SIGN:this.state=b.SCRIPT_DATA,this._emitChars(">");break;case E.NULL:this._err(O.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case E.EOF:this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===E.SOLIDUS?(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Pe.SCRIPT,!1)&&ja(this.preprocessor.peek(Pe.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t<Pe.SCRIPT.length;t++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case E.EQUALS_SIGN:this._err(O.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=b.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:this._leaveAttrName(),this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case E.EQUALS_SIGN:this._leaveAttrName(),this.state=b.BEFORE_ATTRIBUTE_VALUE;break;case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:this._err(O.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case E.NULL:this._err(O.unexpectedNullCharacter),this.currentAttr.name+="�";break;default:this.currentAttr.name+=String.fromCodePoint(gr(e)?Vr(e):e)}}_stateAfterAttributeName(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:this.state=b.SELF_CLOSING_START_TAG;break;case E.EQUALS_SIGN:this.state=b.BEFORE_ATTRIBUTE_VALUE;break;case E.GREATER_THAN_SIGN:this.state=b.DATA,this.emitCurrentTagToken();break;case E.EOF:this._err(O.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:this.state=b.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case E.APOSTROPHE:this.state=b.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case E.GREATER_THAN_SIGN:this._err(O.missingAttributeValue),this.state=b.DATA,this.emitCurrentTagToken();break;default:this.state=b.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case E.QUOTATION_MARK:this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case E.AMPERSAND:this._startCharacterReference();break;case E.NULL:this._err(O.unexpectedNullCharacter),this.currentAttr.value+="�";break;case E.EOF:this._err(O.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case E.APOSTROPHE:this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case E.AMPERSAND:this._startCharacterReference();break;case E.NULL:this._err(O.unexpectedNullCharacter),this.currentAttr.value+="�";break;case E.EOF:this._err(O.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break;case E.AMPERSAND:this._startCharacterReference();break;case E.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break;case E.NULL:this._err(O.unexpectedNullCharacter),this.currentAttr.value+="�";break;case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:case E.EQUALS_SIGN:case E.GRAVE_ACCENT:this._err(O.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case E.EOF:this._err(O.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break;case E.SOLIDUS:this._leaveAttrValue(),this.state=b.SELF_CLOSING_START_TAG;break;case E.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break;case E.EOF:this._err(O.eofInTag),this._emitEOFToken();break;default:this._err(O.missingWhitespaceBetweenAttributes),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case E.GREATER_THAN_SIGN:{const t=this.currentToken;t.selfClosing=!0,this.state=b.DATA,this.emitCurrentTagToken();break}case E.EOF:this._err(O.eofInTag),this._emitEOFToken();break;default:this._err(O.unexpectedSolidusInTag),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case E.GREATER_THAN_SIGN:this.state=b.DATA,this.emitCurrentComment(t);break;case E.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case E.NULL:this._err(O.unexpectedNullCharacter),t.data+="�";break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Pe.DASH_DASH,!0)?(this._createCommentToken(Pe.DASH_DASH.length+1),this.state=b.COMMENT_START):this._consumeSequenceIfMatch(Pe.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Pe.DOCTYPE.length+1),this.state=b.DOCTYPE):this._consumeSequenceIfMatch(Pe.CDATA_START,!0)?this.inForeignNode?this.state=b.CDATA_SECTION:(this._err(O.cdataInHtmlContent),this._createCommentToken(Pe.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=b.BOGUS_COMMENT):this._ensureHibernation()||(this._err(O.incorrectlyOpenedComment),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case E.HYPHEN_MINUS:this.state=b.COMMENT_START_DASH;break;case E.GREATER_THAN_SIGN:{this._err(O.abruptClosingOfEmptyComment),this.state=b.DATA;const t=this.currentToken;this.emitCurrentComment(t);break}default:this.state=b.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case E.HYPHEN_MINUS:this.state=b.COMMENT_END;break;case E.GREATER_THAN_SIGN:this._err(O.abruptClosingOfEmptyComment),this.state=b.DATA,this.emitCurrentComment(t);break;case E.EOF:this._err(O.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=b.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case E.HYPHEN_MINUS:this.state=b.COMMENT_END_DASH;break;case E.LESS_THAN_SIGN:t.data+="<",this.state=b.COMMENT_LESS_THAN_SIGN;break;case E.NULL:this._err(O.unexpectedNullCharacter),t.data+="�";break;case E.EOF:this._err(O.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case E.EXCLAMATION_MARK:t.data+="!",this.state=b.COMMENT_LESS_THAN_SIGN_BANG;break;case E.LESS_THAN_SIGN:t.data+="<";break;default:this.state=b.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===E.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=b.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===E.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=b.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==E.GREATER_THAN_SIGN&&e!==E.EOF&&this._err(O.nestedComment),this.state=b.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case E.HYPHEN_MINUS:this.state=b.COMMENT_END;break;case E.EOF:this._err(O.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=b.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case E.GREATER_THAN_SIGN:this.state=b.DATA,this.emitCurrentComment(t);break;case E.EXCLAMATION_MARK:this.state=b.COMMENT_END_BANG;break;case E.HYPHEN_MINUS:t.data+="-";break;case E.EOF:this._err(O.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=b.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case E.HYPHEN_MINUS:t.data+="--!",this.state=b.COMMENT_END_DASH;break;case E.GREATER_THAN_SIGN:this._err(O.incorrectlyClosedComment),this.state=b.DATA,this.emitCurrentComment(t);break;case E.EOF:this._err(O.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=b.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:this.state=b.BEFORE_DOCTYPE_NAME;break;case E.GREATER_THAN_SIGN:this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case E.EOF:{this._err(O.eofInDoctype),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._err(O.missingWhitespaceBeforeDoctypeName),this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(gr(e))this._createDoctypeToken(String.fromCharCode(Vr(e))),this.state=b.DOCTYPE_NAME;else switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.NULL:this._err(O.unexpectedNullCharacter),this._createDoctypeToken("�"),this.state=b.DOCTYPE_NAME;break;case E.GREATER_THAN_SIGN:{this._err(O.missingDoctypeName),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=b.DATA;break}case E.EOF:{this._err(O.eofInDoctype),this._createDoctypeToken(null);const t=this.currentToken;t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=b.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:this.state=b.AFTER_DOCTYPE_NAME;break;case E.GREATER_THAN_SIGN:this.state=b.DATA,this.emitCurrentDoctype(t);break;case E.NULL:this._err(O.unexpectedNullCharacter),t.name+="�";break;case E.EOF:this._err(O.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(gr(e)?Vr(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:this.state=b.DATA,this.emitCurrentDoctype(t);break;case E.EOF:this._err(O.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Pe.PUBLIC,!1)?this.state=b.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Pe.SYSTEM,!1)?this.state=b.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(O.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:this.state=b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case E.QUOTATION_MARK:this._err(O.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case E.APOSTROPHE:this._err(O.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case E.GREATER_THAN_SIGN:this._err(O.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(t);break;case E.EOF:this._err(O.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(O.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:t.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case E.APOSTROPHE:t.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case E.GREATER_THAN_SIGN:this._err(O.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(t);break;case E.EOF:this._err(O.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(O.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case E.QUOTATION_MARK:this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case E.NULL:this._err(O.unexpectedNullCharacter),t.publicId+="�";break;case E.GREATER_THAN_SIGN:this._err(O.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=b.DATA;break;case E.EOF:this._err(O.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case E.APOSTROPHE:this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case E.NULL:this._err(O.unexpectedNullCharacter),t.publicId+="�";break;case E.GREATER_THAN_SIGN:this._err(O.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=b.DATA;break;case E.EOF:this._err(O.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:this.state=b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case E.GREATER_THAN_SIGN:this.state=b.DATA,this.emitCurrentDoctype(t);break;case E.QUOTATION_MARK:this._err(O.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case E.APOSTROPHE:this._err(O.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case E.EOF:this._err(O.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=b.DATA;break;case E.QUOTATION_MARK:t.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case E.APOSTROPHE:t.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case E.EOF:this._err(O.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:this.state=b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case E.QUOTATION_MARK:this._err(O.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case E.APOSTROPHE:this._err(O.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case E.GREATER_THAN_SIGN:this._err(O.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(t);break;case E.EOF:this._err(O.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:t.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case E.APOSTROPHE:t.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case E.GREATER_THAN_SIGN:this._err(O.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(t);break;case E.EOF:this._err(O.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case E.QUOTATION_MARK:this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case E.NULL:this._err(O.unexpectedNullCharacter),t.systemId+="�";break;case E.GREATER_THAN_SIGN:this._err(O.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=b.DATA;break;case E.EOF:this._err(O.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case E.APOSTROPHE:this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case E.NULL:this._err(O.unexpectedNullCharacter),t.systemId+="�";break;case E.GREATER_THAN_SIGN:this._err(O.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=b.DATA;break;case E.EOF:this._err(O.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=b.DATA;break;case E.EOF:this._err(O.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(O.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case E.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=b.DATA;break;case E.NULL:this._err(O.unexpectedNullCharacter);break;case E.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case E.RIGHT_SQUARE_BRACKET:this.state=b.CDATA_SECTION_BRACKET;break;case E.EOF:this._err(O.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===E.RIGHT_SQUARE_BRACKET?this.state=b.CDATA_SECTION_END:(this._emitChars("]"),this.state=b.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case E.GREATER_THAN_SIGN:this.state=b.DATA;break;case E.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=b.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(E.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ua(this.preprocessor.peek(1))?b.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Ua(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===E.SEMICOLON&&this._err(O.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},no=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),za=new Set([...no,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),sn=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),Zd=new Set([...sn,c.OL,c.UL]),Jd=new Set([...sn,c.BUTTON]),$a=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),Ya=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),ef=new Set([c.TR,c.TEMPLATE,c.HTML]),tf=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),rf=new Set([c.TABLE,c.TEMPLATE,c.HTML]),nf=new Set([c.TD,c.TH]),af=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,r){this.treeAdapter=t,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=c.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===c.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===M.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const r=this._indexOf(e);this.items[r]=t,r===this.stackTop&&(this.current=t)}insertAfter(e,t,r){const n=this._indexOf(e)+1;this.items.splice(n,0,t),this.tagIDs.splice(n,0,r),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==M.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){const r=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(fi,M.HTML)}popUntilTableCellPopped(){this.popUntilPopped(nf,M.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let r=this.stackTop;r>=0;r--)if(e.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===t)return r;return-1}clearBackTo(e,t){const r=this._indexOfTagNames(e,t);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(rf,M.HTML)}clearBackToTableBodyContext(){this.clearBackTo(tf,M.HTML)}clearBackToTableRowContext(){this.clearBackTo(ef,M.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===c.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===c.HTML}hasInDynamicScope(e,t){for(let r=this.stackTop;r>=0;r--){const n=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case M.HTML:if(n===e)return!0;if(t.has(n))return!1;break;case M.SVG:if(Ya.has(n))return!1;break;case M.MATHML:if($a.has(n))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,sn)}hasInListItemScope(e){return this.hasInDynamicScope(e,Zd)}hasInButtonScope(e){return this.hasInDynamicScope(e,Jd)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case M.HTML:if(fi.has(t))return!0;if(sn.has(t))return!1;break;case M.SVG:if(Ya.has(t))return!1;break;case M.MATHML:if($a.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case e:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===M.HTML)switch(this.tagIDs[e]){case c.TBODY:case c.THEAD:case c.TFOOT:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case e:return!0;case c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&no.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&za.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&za.has(this.currentTagId);)this.pop()}},Un=3,nt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(nt||(nt={}));var qa={type:nt.Marker},sf=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const r=[],n=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let s=0;s<this.entries.length;s++){const l=this.entries[s];if(l.type===nt.Marker)break;const{element:o}=l;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){const u=this.treeAdapter.getAttrList(o);u.length===n&&r.push({idx:s,attrs:u})}}return r}_ensureNoahArkCondition(e){if(this.entries.length<Un)return;const t=this.treeAdapter.getAttrList(e),r=this._getNoahArkConditionCandidates(e,t);if(r.length<Un)return;const n=new Map(t.map(a=>[a.name,a.value]));let i=0;for(let a=0;a<r.length;a++){const s=r[a];s.attrs.every(l=>n.get(l.name)===l.value)&&(i+=1,i>=Un&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(qa)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:nt.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:nt.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(qa);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find(r=>r.type===nt.Marker||this.treeAdapter.getTagName(r.element)===e);return t&&t.type===nt.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===nt.Element&&t.element===e)}},mt={createDocument(){return{nodeName:"#document",mode:qe.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){const n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,n){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=r,i.systemId=n;else{const a={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};mt.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const r=e.childNodes[e.childNodes.length-1];if(mt.isTextNode(r)){r.value+=t;return}}mt.appendChild(e,mt.createTextNode(t))},insertTextBefore(e,t,r){const n=e.childNodes[e.childNodes.indexOf(r)-1];n&&mt.isTextNode(n)?n.value+=t:mt.insertBefore(e,mt.createTextNode(t),r)},adoptAttributes(e,t){const r=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)r.has(t[n].name)||e.attrs.push(t[n])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},io="html",lf="about:legacy-compat",of="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ao=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],cf=[...ao,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],uf=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),so=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],hf=[...so,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Va(e,t){return t.some(r=>e.startsWith(r))}function df(e){return e.name===io&&e.publicId===null&&(e.systemId===null||e.systemId===lf)}function ff(e){if(e.name!==io)return qe.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===of)return qe.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),uf.has(r))return qe.QUIRKS;let n=t===null?cf:ao;if(Va(r,n))return qe.QUIRKS;if(n=t===null?so:hf,Va(r,n))return qe.LIMITED_QUIRKS}return qe.NO_QUIRKS}var Wa={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},pf="definitionurl",mf="definitionURL",gf=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Ef=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:M.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:M.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:M.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:M.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:M.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:M.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:M.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:M.XML}],["xml:space",{prefix:"xml",name:"space",namespace:M.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:M.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:M.XMLNS}]]),Tf=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),bf=new Set([c.B,c.BIG,c.BLOCKQUOTE,c.BODY,c.BR,c.CENTER,c.CODE,c.DD,c.DIV,c.DL,c.DT,c.EM,c.EMBED,c.H1,c.H2,c.H3,c.H4,c.H5,c.H6,c.HEAD,c.HR,c.I,c.IMG,c.LI,c.LISTING,c.MENU,c.META,c.NOBR,c.OL,c.P,c.PRE,c.RUBY,c.S,c.SMALL,c.SPAN,c.STRONG,c.STRIKE,c.SUB,c.SUP,c.TABLE,c.TT,c.U,c.UL,c.VAR]);function kf(e){const t=e.tagID;return t===c.FONT&&e.attrs.some(({name:r})=>r===It.COLOR||r===It.SIZE||r===It.FACE)||bf.has(t)}function lo(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===pf){e.attrs[t].name=mf;break}}function oo(e){for(let t=0;t<e.attrs.length;t++){const r=gf.get(e.attrs[t].name);r!=null&&(e.attrs[t].name=r)}}function zi(e){for(let t=0;t<e.attrs.length;t++){const r=Ef.get(e.attrs[t].name);r&&(e.attrs[t].prefix=r.prefix,e.attrs[t].name=r.name,e.attrs[t].namespace=r.namespace)}}function xf(e){const t=Tf.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Jt(e.tagName))}function Af(e,t){return t===M.MATHML&&(e===c.MI||e===c.MO||e===c.MN||e===c.MS||e===c.MTEXT)}function _f(e,t,r){if(t===M.MATHML&&e===c.ANNOTATION_XML){for(let n=0;n<r.length;n++)if(r[n].name===It.ENCODING){const i=r[n].value.toLowerCase();return i===Wa.TEXT_HTML||i===Wa.APPLICATION_XML}}return t===M.SVG&&(e===c.FOREIGN_OBJECT||e===c.DESC||e===c.TITLE)}function yf(e,t,r,n){return(!n||n===M.HTML)&&_f(e,t,r)||(!n||n===M.MATHML)&&Af(e,t)}var Cf="hidden",Sf=8,Nf=3,_;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(_||(_={}));var vf={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},co=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),Ga={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:mt,onParseError:null},Qa=class{constructor(e,t,r=null,n=null){this.fragmentContext=r,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=_.INITIAL,this.originalInsertionMode=_.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Ga,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new Xd(this.options,this),this.activeFormattingElements=new sf(this.treeAdapter),this.fragmentContextID=r?Jt(this.treeAdapter.getTagName(r)):c.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new af(this.document,this.treeAdapter,this)}static parse(e,t){const r=new this(t);return r.tokenizer.write(e,!0),r.document}static getFragmentParser(e,t){const r={...Ga,...t};e!=null||(e=r.treeAdapter.createElement(w.TEMPLATE,M.HTML,[]));const n=r.treeAdapter.createElement("documentmock",M.HTML,[]),i=new this(r,n,e);return i.fragmentContextID===c.TEMPLATE&&i.tmplInsertionModeStack.unshift(_.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,r){var n;if(!this.onParseError)return;const i=(n=e.location)!==null&&n!==void 0?n:vf,a={code:t,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(a)}onItemPush(e,t,r){var n,i;(i=(n=this.treeAdapter).onItemPush)===null||i===void 0||i.call(n,e),r&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var r,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(n=(r=this.treeAdapter).onItemPop)===null||n===void 0||n.call(r,e,this.openElements.current),t){let i,a;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,a=this.fragmentContextID):{current:i,currentTagId:a}=this.openElements,this._setContextModes(i,a)}}_setContextModes(e,t){const r=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===M.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,M.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=_.TEXT}switchToPlaintextParsing(){this.insertionMode=_.TEXT,this.originalInsertionMode=_.IN_BODY,this.tokenizer.state=be.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===w.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==M.HTML))switch(this.fragmentContextID){case c.TITLE:case c.TEXTAREA:this.tokenizer.state=be.RCDATA;break;case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:this.tokenizer.state=be.RAWTEXT;break;case c.SCRIPT:this.tokenizer.state=be.SCRIPT_DATA;break;case c.PLAINTEXT:this.tokenizer.state=be.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",r=e.publicId||"",n=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,r,n),e.location){const i=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));i&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const r=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,e)}}_appendElement(e,t){const r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location)}_insertElement(e,t){const r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID)}_insertFakeElement(e,t){const r=this.treeAdapter.createElement(e,M.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,M.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,r),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(w.HTML,M.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,c.HTML)}_appendCommentNode(e,t){const r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,e.location)}_insertCharacters(e){let t,r;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(t,e.chars,r):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const n=this.treeAdapter.getChildNodes(t),i=n[(r?n.lastIndexOf(r):n.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:a,endCol:s,endOffset:l}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:a,endCol:s,endOffset:l})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(t,r)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const r=t.location,n=this.treeAdapter.getTagName(e),i=t.type===ie.END_TAG&&n===t.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,r;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,r=this.fragmentContextID):{current:t,currentTagId:r}=this.openElements,e.tagID===c.SVG&&this.treeAdapter.getTagName(t)===w.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===M.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===c.MGLYPH||e.tagID===c.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,t,M.HTML)}_processToken(e){switch(e.type){case ie.CHARACTER:this.onCharacter(e);break;case ie.NULL_CHARACTER:this.onNullCharacter(e);break;case ie.COMMENT:this.onComment(e);break;case ie.DOCTYPE:this.onDoctype(e);break;case ie.START_TAG:this._processStartTag(e);break;case ie.END_TAG:this.onEndTag(e);break;case ie.EOF:this.onEof(e);break;case ie.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,r){const n=this.treeAdapter.getNamespaceURI(t),i=this.treeAdapter.getAttrList(t);return yf(e,n,i,r)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex(n=>n.type===nt.Marker||this.openElements.contains(n.element)),r=t===-1?e-1:t-1;for(let n=r;n>=0;n--){const i=this.activeFormattingElements.entries[n];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=_.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(c.P),this.openElements.popUntilTagNamePopped(c.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case c.TR:this.insertionMode=_.IN_ROW;return;case c.TBODY:case c.THEAD:case c.TFOOT:this.insertionMode=_.IN_TABLE_BODY;return;case c.CAPTION:this.insertionMode=_.IN_CAPTION;return;case c.COLGROUP:this.insertionMode=_.IN_COLUMN_GROUP;return;case c.TABLE:this.insertionMode=_.IN_TABLE;return;case c.BODY:this.insertionMode=_.IN_BODY;return;case c.FRAMESET:this.insertionMode=_.IN_FRAMESET;return;case c.SELECT:this._resetInsertionModeForSelect(e);return;case c.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case c.HTML:this.insertionMode=this.headElement?_.AFTER_HEAD:_.BEFORE_HEAD;return;case c.TD:case c.TH:if(e>0){this.insertionMode=_.IN_CELL;return}break;case c.HEAD:if(e>0){this.insertionMode=_.IN_HEAD;return}}this.insertionMode=_.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const r=this.openElements.tagIDs[t];if(r===c.TEMPLATE)break;if(r===c.TABLE){this.insertionMode=_.IN_SELECT_IN_TABLE;return}}this.insertionMode=_.IN_SELECT}_isElementCausesFosterParenting(e){return co.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case c.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===M.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case c.TABLE:{const r=this.treeAdapter.getParentNode(t);return r?{parent:r,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const r=this.treeAdapter.getNamespaceURI(e);return Wd[r].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){im(this,e);return}switch(this.insertionMode){case _.INITIAL:hr(this,e);break;case _.BEFORE_HTML:br(this,e);break;case _.BEFORE_HEAD:kr(this,e);break;case _.IN_HEAD:xr(this,e);break;case _.IN_HEAD_NO_SCRIPT:Ar(this,e);break;case _.AFTER_HEAD:_r(this,e);break;case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:ho(this,e);break;case _.TEXT:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:jn(this,e);break;case _.IN_TABLE_TEXT:To(this,e);break;case _.IN_COLUMN_GROUP:ln(this,e);break;case _.AFTER_BODY:on(this,e);break;case _.AFTER_AFTER_BODY:tn(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){nm(this,e);return}switch(this.insertionMode){case _.INITIAL:hr(this,e);break;case _.BEFORE_HTML:br(this,e);break;case _.BEFORE_HEAD:kr(this,e);break;case _.IN_HEAD:xr(this,e);break;case _.IN_HEAD_NO_SCRIPT:Ar(this,e);break;case _.AFTER_HEAD:_r(this,e);break;case _.TEXT:this._insertCharacters(e);break;case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:jn(this,e);break;case _.IN_COLUMN_GROUP:ln(this,e);break;case _.AFTER_BODY:on(this,e);break;case _.AFTER_AFTER_BODY:tn(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){pi(this,e);return}switch(this.insertionMode){case _.INITIAL:case _.BEFORE_HTML:case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_TEMPLATE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:pi(this,e);break;case _.IN_TABLE_TEXT:dr(this,e);break;case _.AFTER_BODY:Pf(this,e);break;case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:Mf(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case _.INITIAL:Bf(this,e);break;case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:this._err(e,O.misplacedDoctype);break;case _.IN_TABLE_TEXT:dr(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,O.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?am(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case _.INITIAL:hr(this,e);break;case _.BEFORE_HTML:Ff(this,e);break;case _.BEFORE_HEAD:Uf(this,e);break;case _.IN_HEAD:Je(this,e);break;case _.IN_HEAD_NO_SCRIPT:$f(this,e);break;case _.AFTER_HEAD:qf(this,e);break;case _.IN_BODY:ve(this,e);break;case _.IN_TABLE:Qt(this,e);break;case _.IN_TABLE_TEXT:dr(this,e);break;case _.IN_CAPTION:jp(this,e);break;case _.IN_COLUMN_GROUP:qi(this,e);break;case _.IN_TABLE_BODY:Cn(this,e);break;case _.IN_ROW:Sn(this,e);break;case _.IN_CELL:Yp(this,e);break;case _.IN_SELECT:xo(this,e);break;case _.IN_SELECT_IN_TABLE:Vp(this,e);break;case _.IN_TEMPLATE:Gp(this,e);break;case _.AFTER_BODY:Kp(this,e);break;case _.IN_FRAMESET:Xp(this,e);break;case _.AFTER_FRAMESET:Jp(this,e);break;case _.AFTER_AFTER_BODY:tm(this,e);break;case _.AFTER_AFTER_FRAMESET:rm(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?sm(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case _.INITIAL:hr(this,e);break;case _.BEFORE_HTML:Hf(this,e);break;case _.BEFORE_HEAD:jf(this,e);break;case _.IN_HEAD:zf(this,e);break;case _.IN_HEAD_NO_SCRIPT:Yf(this,e);break;case _.AFTER_HEAD:Vf(this,e);break;case _.IN_BODY:yn(this,e);break;case _.TEXT:Lp(this,e);break;case _.IN_TABLE:vr(this,e);break;case _.IN_TABLE_TEXT:dr(this,e);break;case _.IN_CAPTION:zp(this,e);break;case _.IN_COLUMN_GROUP:$p(this,e);break;case _.IN_TABLE_BODY:mi(this,e);break;case _.IN_ROW:ko(this,e);break;case _.IN_CELL:qp(this,e);break;case _.IN_SELECT:Ao(this,e);break;case _.IN_SELECT_IN_TABLE:Wp(this,e);break;case _.IN_TEMPLATE:Qp(this,e);break;case _.AFTER_BODY:yo(this,e);break;case _.IN_FRAMESET:Zp(this,e);break;case _.AFTER_FRAMESET:em(this,e);break;case _.AFTER_AFTER_BODY:tn(this,e)}}onEof(e){switch(this.insertionMode){case _.INITIAL:hr(this,e);break;case _.BEFORE_HTML:br(this,e);break;case _.BEFORE_HEAD:kr(this,e);break;case _.IN_HEAD:xr(this,e);break;case _.IN_HEAD_NO_SCRIPT:Ar(this,e);break;case _.AFTER_HEAD:_r(this,e);break;case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:go(this,e);break;case _.TEXT:Rp(this,e);break;case _.IN_TABLE_TEXT:dr(this,e);break;case _.IN_TEMPLATE:_o(this,e);break;case _.AFTER_BODY:case _.IN_FRAMESET:case _.AFTER_FRAMESET:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:Yi(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===E.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.TEXT:case _.IN_COLUMN_GROUP:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:this._insertCharacters(e);break;case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:case _.AFTER_BODY:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:uo(this,e);break;case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:jn(this,e);break;case _.IN_TABLE_TEXT:Eo(this,e)}}};function If(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):mo(e,t),r}function wf(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){const i=e.openElements.items[n];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[n])&&(r=i)}return r||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),r}function Lf(e,t,r){let n=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==r;a++,s=i){i=e.openElements.getCommonAncestor(s);const l=e.activeFormattingElements.getElementEntry(s),o=l&&a>=Nf;!l||o?(o&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(s)):(s=Rf(e,l),n===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(s,n),n=s)}return n}function Rf(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function Of(e,t,r){const n=e.treeAdapter.getTagName(t),i=Jt(n);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(r);else{const a=e.treeAdapter.getNamespaceURI(t);i===c.TEMPLATE&&a===M.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function Df(e,t,r){const n=e.treeAdapter.getNamespaceURI(r.element),{token:i}=r,a=e.treeAdapter.createElement(i.tagName,n,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,a,i.tagID)}function $i(e,t){for(let r=0;r<Sf;r++){const n=If(e,t);if(!n)break;const i=wf(e,n);if(!i)break;e.activeFormattingElements.bookmark=n;const a=Lf(e,i,n.element),s=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),s&&Of(e,s,a),Df(e,i,n)}}function pi(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Pf(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Mf(e,t){e._appendCommentNode(t,e.document)}function Yi(e,t){if(e.stopped=!0,t.location){const r=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(n);if(i&&!i.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function Bf(e,t){e._setDocumentType(t);const r=t.forceQuirks?qe.QUIRKS:ff(t);df(t)||e._err(t,O.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=_.BEFORE_HTML}function hr(e,t){e._err(t,O.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,qe.QUIRKS),e.insertionMode=_.BEFORE_HTML,e._processToken(t)}function Ff(e,t){t.tagID===c.HTML?(e._insertElement(t,M.HTML),e.insertionMode=_.BEFORE_HEAD):br(e,t)}function Hf(e,t){const r=t.tagID;(r===c.HTML||r===c.HEAD||r===c.BODY||r===c.BR)&&br(e,t)}function br(e,t){e._insertFakeRootElement(),e.insertionMode=_.BEFORE_HEAD,e._processToken(t)}function Uf(e,t){switch(t.tagID){case c.HTML:ve(e,t);break;case c.HEAD:e._insertElement(t,M.HTML),e.headElement=e.openElements.current,e.insertionMode=_.IN_HEAD;break;default:kr(e,t)}}function jf(e,t){const r=t.tagID;r===c.HEAD||r===c.BODY||r===c.HTML||r===c.BR?kr(e,t):e._err(t,O.endTagWithoutMatchingOpenElement)}function kr(e,t){e._insertFakeElement(w.HEAD,c.HEAD),e.headElement=e.openElements.current,e.insertionMode=_.IN_HEAD,e._processToken(t)}function Je(e,t){switch(t.tagID){case c.HTML:ve(e,t);break;case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.TITLE:e._switchToTextParsing(t,be.RCDATA);break;case c.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,be.RAWTEXT):(e._insertElement(t,M.HTML),e.insertionMode=_.IN_HEAD_NO_SCRIPT);break;case c.NOFRAMES:case c.STYLE:e._switchToTextParsing(t,be.RAWTEXT);break;case c.SCRIPT:e._switchToTextParsing(t,be.SCRIPT_DATA);break;case c.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=_.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(_.IN_TEMPLATE);break;case c.HEAD:e._err(t,O.misplacedStartTagForHeadElement);break;default:xr(e,t)}}function zf(e,t){switch(t.tagID){case c.HEAD:e.openElements.pop(),e.insertionMode=_.AFTER_HEAD;break;case c.BODY:case c.BR:case c.HTML:xr(e,t);break;case c.TEMPLATE:Dt(e,t);break;default:e._err(t,O.endTagWithoutMatchingOpenElement)}}function Dt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==c.TEMPLATE&&e._err(t,O.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,O.endTagWithoutMatchingOpenElement)}function xr(e,t){e.openElements.pop(),e.insertionMode=_.AFTER_HEAD,e._processToken(t)}function $f(e,t){switch(t.tagID){case c.HTML:ve(e,t);break;case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:Je(e,t);break;case c.NOSCRIPT:e._err(t,O.nestedNoscriptInHead);break;default:Ar(e,t)}}function Yf(e,t){switch(t.tagID){case c.NOSCRIPT:e.openElements.pop(),e.insertionMode=_.IN_HEAD;break;case c.BR:Ar(e,t);break;default:e._err(t,O.endTagWithoutMatchingOpenElement)}}function Ar(e,t){const r=t.type===ie.EOF?O.openElementsLeftAfterEof:O.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=_.IN_HEAD,e._processToken(t)}function qf(e,t){switch(t.tagID){case c.HTML:ve(e,t);break;case c.BODY:e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=_.IN_BODY;break;case c.FRAMESET:e._insertElement(t,M.HTML),e.insertionMode=_.IN_FRAMESET;break;case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:e._err(t,O.abandonedHeadElementChild),e.openElements.push(e.headElement,c.HEAD),Je(e,t),e.openElements.remove(e.headElement);break;case c.HEAD:e._err(t,O.misplacedStartTagForHeadElement);break;default:_r(e,t)}}function Vf(e,t){switch(t.tagID){case c.BODY:case c.HTML:case c.BR:_r(e,t);break;case c.TEMPLATE:Dt(e,t);break;default:e._err(t,O.endTagWithoutMatchingOpenElement)}}function _r(e,t){e._insertFakeElement(w.BODY,c.BODY),e.insertionMode=_.IN_BODY,_n(e,t)}function _n(e,t){switch(t.type){case ie.CHARACTER:ho(e,t);break;case ie.WHITESPACE_CHARACTER:uo(e,t);break;case ie.COMMENT:pi(e,t);break;case ie.START_TAG:ve(e,t);break;case ie.END_TAG:yn(e,t);break;case ie.EOF:go(e,t)}}function uo(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ho(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Wf(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Gf(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function Qf(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_FRAMESET)}function Kf(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function Xf(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&fi.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,M.HTML)}function Zf(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Jf(e,t){const r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),r||(e.formElement=e.openElements.current))}function ep(e,t){e.framesetOk=!1;const r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){const i=e.openElements.tagIDs[n];if(r===c.LI&&i===c.LI||(r===c.DD||r===c.DT)&&(i===c.DD||i===c.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==c.ADDRESS&&i!==c.DIV&&i!==c.P&&e._isSpecialElement(e.openElements.items[n],i))break}e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function tp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.tokenizer.state=be.PLAINTEXT}function rp(e,t){e.openElements.hasInScope(c.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1}function np(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(w.A);r&&($i(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ip(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ap(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(c.NOBR)&&($i(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function sp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function lp(e,t){e.treeAdapter.getDocumentMode(e.document)!==qe.QUIRKS&&e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=_.IN_TABLE}function fo(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function po(e){const t=to(e,It.TYPE);return t!=null&&t.toLowerCase()===Cf}function op(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),po(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function cp(e,t){e._appendElement(t,M.HTML),t.ackSelfClosing=!0}function up(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function hp(e,t){t.tagName=w.IMG,t.tagID=c.IMG,fo(e,t)}function dp(e,t){e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.tokenizer.state=be.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=_.TEXT}function fp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function pp(e,t){e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function Ka(e,t){e._switchToTextParsing(t,be.RAWTEXT)}function mp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===_.IN_TABLE||e.insertionMode===_.IN_CAPTION||e.insertionMode===_.IN_TABLE_BODY||e.insertionMode===_.IN_ROW||e.insertionMode===_.IN_CELL?_.IN_SELECT_IN_TABLE:_.IN_SELECT}function gp(e,t){e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function Ep(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,M.HTML)}function Tp(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(c.RTC),e._insertElement(t,M.HTML)}function bp(e,t){e._reconstructActiveFormattingElements(),lo(t),zi(t),t.selfClosing?e._appendElement(t,M.MATHML):e._insertElement(t,M.MATHML),t.ackSelfClosing=!0}function kp(e,t){e._reconstructActiveFormattingElements(),oo(t),zi(t),t.selfClosing?e._appendElement(t,M.SVG):e._insertElement(t,M.SVG),t.ackSelfClosing=!0}function Xa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function ve(e,t){switch(t.tagID){case c.I:case c.S:case c.B:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.SMALL:case c.STRIKE:case c.STRONG:ip(e,t);break;case c.A:np(e,t);break;case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:Xf(e,t);break;case c.P:case c.DL:case c.OL:case c.UL:case c.DIV:case c.DIR:case c.NAV:case c.MAIN:case c.MENU:case c.ASIDE:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.DETAILS:case c.ADDRESS:case c.ARTICLE:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:Kf(e,t);break;case c.LI:case c.DD:case c.DT:ep(e,t);break;case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:fo(e,t);break;case c.HR:up(e,t);break;case c.RB:case c.RTC:Ep(e,t);break;case c.RT:case c.RP:Tp(e,t);break;case c.PRE:case c.LISTING:Zf(e,t);break;case c.XMP:fp(e,t);break;case c.SVG:kp(e,t);break;case c.HTML:Wf(e,t);break;case c.BASE:case c.LINK:case c.META:case c.STYLE:case c.TITLE:case c.SCRIPT:case c.BGSOUND:case c.BASEFONT:case c.TEMPLATE:Je(e,t);break;case c.BODY:Gf(e,t);break;case c.FORM:Jf(e,t);break;case c.NOBR:ap(e,t);break;case c.MATH:bp(e,t);break;case c.TABLE:lp(e,t);break;case c.INPUT:op(e,t);break;case c.PARAM:case c.TRACK:case c.SOURCE:cp(e,t);break;case c.IMAGE:hp(e,t);break;case c.BUTTON:rp(e,t);break;case c.APPLET:case c.OBJECT:case c.MARQUEE:sp(e,t);break;case c.IFRAME:pp(e,t);break;case c.SELECT:mp(e,t);break;case c.OPTION:case c.OPTGROUP:gp(e,t);break;case c.NOEMBED:case c.NOFRAMES:Ka(e,t);break;case c.FRAMESET:Qf(e,t);break;case c.TEXTAREA:dp(e,t);break;case c.NOSCRIPT:e.options.scriptingEnabled?Ka(e,t):Xa(e,t);break;case c.PLAINTEXT:tp(e,t);break;case c.COL:case c.TH:case c.TD:case c.TR:case c.HEAD:case c.FRAME:case c.TBODY:case c.TFOOT:case c.THEAD:case c.CAPTION:case c.COLGROUP:break;default:Xa(e,t)}}function xp(e,t){if(e.openElements.hasInScope(c.BODY)&&(e.insertionMode=_.AFTER_BODY,e.options.sourceCodeLocationInfo)){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function Ap(e,t){e.openElements.hasInScope(c.BODY)&&(e.insertionMode=_.AFTER_BODY,yo(e,t))}function _p(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function yp(e){const t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(c.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(c.FORM):r&&e.openElements.remove(r))}function Cp(e){e.openElements.hasInButtonScope(c.P)||e._insertFakeElement(w.P,c.P),e._closePElement()}function Sp(e){e.openElements.hasInListItemScope(c.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(c.LI),e.openElements.popUntilTagNamePopped(c.LI))}function Np(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function vp(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Ip(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function wp(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(w.BR,c.BR),e.openElements.pop(),e.framesetOk=!1}function mo(e,t){const r=t.tagName,n=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(n===s&&(n!==c.UNKNOWN||e.treeAdapter.getTagName(a)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function yn(e,t){switch(t.tagID){case c.A:case c.B:case c.I:case c.S:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.NOBR:case c.SMALL:case c.STRIKE:case c.STRONG:$i(e,t);break;case c.P:Cp(e);break;case c.DL:case c.UL:case c.OL:case c.DIR:case c.DIV:case c.NAV:case c.PRE:case c.MAIN:case c.MENU:case c.ASIDE:case c.BUTTON:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.ADDRESS:case c.ARTICLE:case c.DETAILS:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.LISTING:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:_p(e,t);break;case c.LI:Sp(e);break;case c.DD:case c.DT:Np(e,t);break;case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:vp(e);break;case c.BR:wp(e);break;case c.BODY:xp(e,t);break;case c.HTML:Ap(e,t);break;case c.FORM:yp(e);break;case c.APPLET:case c.OBJECT:case c.MARQUEE:Ip(e,t);break;case c.TEMPLATE:Dt(e,t);break;default:mo(e,t)}}function go(e,t){e.tmplInsertionModeStack.length>0?_o(e,t):Yi(e,t)}function Lp(e,t){var r;t.tagID===c.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Rp(e,t){e._err(t,O.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function jn(e,t){if(e.openElements.currentTagId!==void 0&&co.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=_.IN_TABLE_TEXT,t.type){case ie.CHARACTER:To(e,t);break;case ie.WHITESPACE_CHARACTER:Eo(e,t)}else Dr(e,t)}function Op(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_CAPTION}function Dp(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_COLUMN_GROUP}function Pp(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(w.COLGROUP,c.COLGROUP),e.insertionMode=_.IN_COLUMN_GROUP,qi(e,t)}function Mp(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_TABLE_BODY}function Bp(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(w.TBODY,c.TBODY),e.insertionMode=_.IN_TABLE_BODY,Cn(e,t)}function Fp(e,t){e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Hp(e,t){po(t)?e._appendElement(t,M.HTML):Dr(e,t),t.ackSelfClosing=!0}function Up(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,M.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Qt(e,t){switch(t.tagID){case c.TD:case c.TH:case c.TR:Bp(e,t);break;case c.STYLE:case c.SCRIPT:case c.TEMPLATE:Je(e,t);break;case c.COL:Pp(e,t);break;case c.FORM:Up(e,t);break;case c.TABLE:Fp(e,t);break;case c.TBODY:case c.TFOOT:case c.THEAD:Mp(e,t);break;case c.INPUT:Hp(e,t);break;case c.CAPTION:Op(e,t);break;case c.COLGROUP:Dp(e,t);break;default:Dr(e,t)}}function vr(e,t){switch(t.tagID){case c.TABLE:e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode());break;case c.TEMPLATE:Dt(e,t);break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:Dr(e,t)}}function Dr(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,_n(e,t),e.fosterParentingEnabled=r}function Eo(e,t){e.pendingCharacterTokens.push(t)}function To(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function dr(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r<e.pendingCharacterTokens.length;r++)Dr(e,e.pendingCharacterTokens[r]);else for(;r<e.pendingCharacterTokens.length;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var bo=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]);function jp(e,t){const r=t.tagID;bo.has(r)?e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_TABLE,Qt(e,t)):ve(e,t)}function zp(e,t){const r=t.tagID;switch(r){case c.CAPTION:case c.TABLE:e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_TABLE,r===c.TABLE&&vr(e,t));break;case c.BODY:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:yn(e,t)}}function qi(e,t){switch(t.tagID){case c.HTML:ve(e,t);break;case c.COL:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.TEMPLATE:Je(e,t);break;default:ln(e,t)}}function $p(e,t){switch(t.tagID){case c.COLGROUP:e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=_.IN_TABLE);break;case c.TEMPLATE:Dt(e,t);break;case c.COL:break;default:ln(e,t)}}function ln(e,t){e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=_.IN_TABLE,e._processToken(t))}function Cn(e,t){switch(t.tagID){case c.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_ROW;break;case c.TH:case c.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(w.TR,c.TR),e.insertionMode=_.IN_ROW,Sn(e,t);break;case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE,Qt(e,t));break;default:Qt(e,t)}}function mi(e,t){const r=t.tagID;switch(t.tagID){case c.TBODY:case c.TFOOT:case c.THEAD:e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE);break;case c.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE,vr(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:case c.TR:break;default:vr(e,t)}}function Sn(e,t){switch(t.tagID){case c.TH:case c.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_CELL,e.activeFormattingElements.insertMarker();break;case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,Cn(e,t));break;default:Qt(e,t)}}function ko(e,t){switch(t.tagID){case c.TR:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY);break;case c.TABLE:e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,mi(e,t));break;case c.TBODY:case c.TFOOT:case c.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(c.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,mi(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:break;default:vr(e,t)}}function Yp(e,t){const r=t.tagID;bo.has(r)?(e.openElements.hasInTableScope(c.TD)||e.openElements.hasInTableScope(c.TH))&&(e._closeTableCell(),Sn(e,t)):ve(e,t)}function qp(e,t){const r=t.tagID;switch(r){case c.TD:case c.TH:e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_ROW);break;case c.TABLE:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:e.openElements.hasInTableScope(r)&&(e._closeTableCell(),ko(e,t));break;case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:break;default:yn(e,t)}}function xo(e,t){switch(t.tagID){case c.HTML:ve(e,t);break;case c.OPTION:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._insertElement(t,M.HTML);break;case c.OPTGROUP:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._insertElement(t,M.HTML);break;case c.HR:e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.INPUT:case c.KEYGEN:case c.TEXTAREA:case c.SELECT:e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),t.tagID!==c.SELECT&&e._processStartTag(t));break;case c.SCRIPT:case c.TEMPLATE:Je(e,t)}}function Ao(e,t){switch(t.tagID){case c.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===c.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===c.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop();break;case c.OPTION:e.openElements.currentTagId===c.OPTION&&e.openElements.pop();break;case c.SELECT:e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode());break;case c.TEMPLATE:Dt(e,t)}}function Vp(e,t){const r=t.tagID;r===c.CAPTION||r===c.TABLE||r===c.TBODY||r===c.TFOOT||r===c.THEAD||r===c.TR||r===c.TD||r===c.TH?(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e._processStartTag(t)):xo(e,t)}function Wp(e,t){const r=t.tagID;r===c.CAPTION||r===c.TABLE||r===c.TBODY||r===c.TFOOT||r===c.THEAD||r===c.TR||r===c.TD||r===c.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Ao(e,t)}function Gp(e,t){switch(t.tagID){case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:Je(e,t);break;case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:e.tmplInsertionModeStack[0]=_.IN_TABLE,e.insertionMode=_.IN_TABLE,Qt(e,t);break;case c.COL:e.tmplInsertionModeStack[0]=_.IN_COLUMN_GROUP,e.insertionMode=_.IN_COLUMN_GROUP,qi(e,t);break;case c.TR:e.tmplInsertionModeStack[0]=_.IN_TABLE_BODY,e.insertionMode=_.IN_TABLE_BODY,Cn(e,t);break;case c.TD:case c.TH:e.tmplInsertionModeStack[0]=_.IN_ROW,e.insertionMode=_.IN_ROW,Sn(e,t);break;default:e.tmplInsertionModeStack[0]=_.IN_BODY,e.insertionMode=_.IN_BODY,ve(e,t)}}function Qp(e,t){t.tagID===c.TEMPLATE&&Dt(e,t)}function _o(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Yi(e,t)}function Kp(e,t){t.tagID===c.HTML?ve(e,t):on(e,t)}function yo(e,t){var r;if(t.tagID===c.HTML){if(e.fragmentContext||(e.insertionMode=_.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===c.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&e._setEndLocation(n,t)}}else on(e,t)}function on(e,t){e.insertionMode=_.IN_BODY,_n(e,t)}function Xp(e,t){switch(t.tagID){case c.HTML:ve(e,t);break;case c.FRAMESET:e._insertElement(t,M.HTML);break;case c.FRAME:e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break;case c.NOFRAMES:Je(e,t)}}function Zp(e,t){t.tagID===c.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==c.FRAMESET&&(e.insertionMode=_.AFTER_FRAMESET))}function Jp(e,t){switch(t.tagID){case c.HTML:ve(e,t);break;case c.NOFRAMES:Je(e,t)}}function em(e,t){t.tagID===c.HTML&&(e.insertionMode=_.AFTER_AFTER_FRAMESET)}function tm(e,t){t.tagID===c.HTML?ve(e,t):tn(e,t)}function tn(e,t){e.insertionMode=_.IN_BODY,_n(e,t)}function rm(e,t){switch(t.tagID){case c.HTML:ve(e,t);break;case c.NOFRAMES:Je(e,t)}}function nm(e,t){t.chars="�",e._insertCharacters(t)}function im(e,t){e._insertCharacters(t),e.framesetOk=!1}function Co(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==M.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function am(e,t){if(kf(t))Co(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===M.MATHML?lo(t):n===M.SVG&&(xf(t),oo(t)),zi(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function sm(e,t){if(t.tagID===c.P||t.tagID===c.BR){Co(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){const n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===M.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(n);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(r);break}}}var S1=new Set([w.AREA,w.BASE,w.BASEFONT,w.BGSOUND,w.BR,w.COL,w.EMBED,w.FRAME,w.HR,w.IMG,w.INPUT,w.KEYGEN,w.LINK,w.META,w.PARAM,w.SOURCE,w.TRACK,w.WBR]),Nn=So("end"),it=So("start");function So(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function No(e){const t=it(e),r=Nn(e);if(t&&r)return{start:t,end:r}}var lm=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,om=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Za={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function vo(e,t){const r=Tm(e),n=Kl("type",{handlers:{root:cm,element:um,text:hm,comment:wo,doctype:dm,raw:pm},unknown:mm}),i={parser:r?new Qa(Za):Qa.getFragmentParser(void 0,Za),handle(l){n(l,i)},stitches:!1,options:t||{}};n(e,i),er(i,it());const a=r?i.parser.document:i.parser.getFragment(),s=Td(a,{file:i.options.file});return i.stitches&&Ge(s,"comment",function(l,o,u){const d=l;if(d.value.stitch&&u&&o!==void 0){const h=u.children;return h[o]=d.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Io(e,t){let r=-1;if(e)for(;++r<e.length;)t.handle(e[r])}function cm(e,t){Io(e.children,t)}function um(e,t){gm(e,t),Io(e.children,t),Em(e,t)}function hm(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const r={type:ie.CHARACTER,chars:e.value,location:Pr(e)};er(t,it(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function dm(e,t){const r={type:ie.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Pr(e)};er(t,it(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function fm(e,t){t.stitches=!0;const r=bm(e);"children"in e&&"children"in r&&(r.children=vo({type:"root",children:e.children},t.options).children),wo({type:"comment",value:{stitch:r}},t)}function wo(e,t){const r=e.value,n={type:ie.COMMENT,data:r,location:Pr(e)};er(t,it(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function pm(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Lo(t,it(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(lm,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const r=t.parser.tokenizer._consume();t.parser.tokenizer._callState(r)}}function mm(e,t){const r=e;if(t.options.passThrough&&t.options.passThrough.includes(r.type))fm(r,t);else{let n="";throw om.has(r.type)&&(n=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+r.type+"` node"+n)}}function er(e,t){Lo(e,t);const r=e.parser.tokenizer.currentCharacterToken;r&&r.location&&(r.location.endLine=e.parser.tokenizer.preprocessor.line,r.location.endCol=e.parser.tokenizer.preprocessor.col+1,r.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=be.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Lo(e,t){if(t&&t.offset!==void 0){const r={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=r}}function gm(e,t){const r=e.tagName.toLowerCase();if(t.parser.tokenizer.state===be.PLAINTEXT)return;er(t,it(e));const n=t.parser.openElements.current;let i="namespaceURI"in n?n.namespaceURI:vt.html;i===vt.html&&r==="svg"&&(i=vt.svg);const a=_d({...e,children:[]},{space:i===vt.svg?"svg":"html"}),s={type:ie.START_TAG,tagName:r,tagID:Jt(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Pr(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=r}function Em(e,t){const r=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Ld.includes(r)||t.parser.tokenizer.state===be.PLAINTEXT)return;er(t,Nn(e));const n={type:ie.END_TAG,tagName:r,tagID:Jt(r),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Pr(e)};t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken),r===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===be.RCDATA||t.parser.tokenizer.state===be.RAWTEXT||t.parser.tokenizer.state===be.SCRIPT_DATA)&&(t.parser.tokenizer.state=be.DATA)}function Tm(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Pr(e){const t=it(e)||{line:void 0,column:void 0,offset:void 0},r=Nn(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:r.line,endCol:r.column,endOffset:r.offset}}function bm(e){return"children"in e?wt({...e,children:[]}):wt(e)}function gi(e){return function(t,r){return vo(t,{...e,file:r})}}var _t=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],gt={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[..._t,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[..._t],h2:[["className","sr-only"]],img:[..._t,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[..._t,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[..._t],table:[..._t],ul:[..._t,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Et={}.hasOwnProperty;function km(e,t){let r={type:"root",children:[]};const n=Ro({schema:t?{...gt,...t}:gt,stack:[]},e);return n&&(Array.isArray(n)?n.length===1?r=n[0]:r.children=n:r=n),r}function Ro(e,t){if(t&&typeof t=="object"){const r=t;switch(typeof r.type=="string"?r.type:""){case"comment":return xm(e,r);case"doctype":return Am(e,r);case"element":return _m(e,r);case"root":return ym(e,r);case"text":return Cm(e,r)}}}function xm(e,t){if(e.schema.allowComments){const r=typeof t.value=="string"?t.value:"",n=r.indexOf("-->"),i={type:"comment",value:n<0?r:r.slice(0,n)};return Mr(i,t),i}}function Am(e,t){if(e.schema.allowDoctypes){const r={type:"doctype"};return Mr(r,t),r}}function _m(e,t){const r=typeof t.tagName=="string"?t.tagName:"";e.stack.push(r);const n=Oo(e,t.children),i=Sm(e,t.properties);e.stack.pop();let a=!1;if(r&&r!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(a=!0,e.schema.ancestors&&Et.call(e.schema.ancestors,r))){const l=e.schema.ancestors[r];let o=-1;for(a=!1;++o<l.length;)e.stack.includes(l[o])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(r)?n:void 0;const s={type:"element",tagName:r,properties:i,children:n};return Mr(s,t),s}function ym(e,t){const r={type:"root",children:Oo(e,t.children)};return Mr(r,t),r}function Cm(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Mr(r,t),r}function Oo(e,t){const r=[];if(Array.isArray(t)){const n=t;let i=-1;for(;++i<n.length;){const a=Ro(e,n[i]);a&&(Array.isArray(a)?r.push(...a):r.push(a))}}return r}function Sm(e,t){const r=e.stack[e.stack.length-1],n=e.schema.attributes,i=e.schema.required,a=n&&Et.call(n,r)?n[r]:void 0,s=n&&Et.call(n,"*")?n["*"]:void 0,l=t&&typeof t=="object"?t:{},o={};let u;for(u in l)if(Et.call(l,u)){const d=l[u];let h=Ja(e,es(a,u),u,d);h==null&&(h=Ja(e,es(s,u),u,d)),h!=null&&(o[u]=h)}if(i&&Et.call(i,r)){const d=i[r];for(u in d)Et.call(d,u)&&!Et.call(o,u)&&(o[u]=d[u])}return o}function Ja(e,t,r,n){return t?Array.isArray(n)?Nm(e,t,r,n):Do(e,t,r,n):void 0}function Nm(e,t,r,n){let i=-1;const a=[];for(;++i<n.length;){const s=Do(e,t,r,n[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function Do(e,t,r,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&vm(e,r,n)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(n))){i=!0;break}}else if(s===n){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(r)?e.schema.clobberPrefix+n:n}}function vm(e,t,r){const n=e.schema.protocols&&Et.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!n||n.length===0)return!0;const i=String(r),a=i.indexOf(":"),s=i.indexOf("?"),l=i.indexOf("#"),o=i.indexOf("/");if(a<0||o>-1&&a>o||s>-1&&a>s||l>-1&&a>l)return!0;let u=-1;for(;++u<n.length;){const d=n[u];if(a===d.length&&i.slice(0,d.length)===d)return!0}return!1}function Mr(e,t){const r=No(t);t.data&&(e.data=wt(t.data)),r&&(e.position=r)}function es(e,t){let r,n=-1;if(e)for(;++n<e.length;){const i=e[n],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(r=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return r}function Po(e){return function(t){return km(t,e)}}function ts(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}var Re=At(/[A-Za-z]/),Ne=At(/[\dA-Za-z]/),Im=At(/[#-'*+\--9=?A-Z^-~]/);function cn(e){return e!==null&&(e<32||e===127)}var Ei=At(/\d/),wm=At(/[\dA-Fa-f]/),Lm=At(/[!-/:-@[-`{-~]/);function K(e){return e!==null&&e<-2}function fe(e){return e!==null&&(e<0||e===32)}function se(e){return e===-2||e===-1||e===32}var vn=At(/\p{P}|\p{S}/u),Lt=At(/\s/);function At(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Rm(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Om(e,t,r){const n=bn((r||{}).ignore||[]),i=Dm(t);let a=-1;for(;++a<i.length;)xn(e,"text",s);function s(o,u){let d=-1,h;for(;++d<u.length;){const p=u[d],f=h?h.children:void 0;if(n(p,f?f.indexOf(p):void 0,h))return;h=p}if(h)return l(o,u)}function l(o,u){const d=u[u.length-1],h=i[a][0],p=i[a][1];let f=0;const g=d.children.indexOf(o);let N=!1,y=[];h.lastIndex=0;let A=h.exec(o.value);for(;A;){const C=A.index,k={index:A.index,input:A.input,stack:[...u,o]};let R=p(...A,k);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?h.lastIndex=C+1:(f!==C&&y.push({type:"text",value:o.value.slice(f,C)}),Array.isArray(R)?y.push(...R):R&&y.push(R),f=C+A[0].length,N=!0),!h.global)break;A=h.exec(o.value)}return N?(f<o.value.length&&y.push({type:"text",value:o.value.slice(f)}),d.children.splice(g,1,...y)):y=[o],g+y.length}}function Dm(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const i=r[n];t.push([Pm(i[0]),Mm(i[1])])}return t}function Pm(e){return typeof e=="string"?new RegExp(Rm(e),"g"):e}function Mm(e){return typeof e=="function"?e:function(){return e}}var zn="phrasing",$n=["autolink","link","image","label"];function Bm(){return{transforms:[Ym],enter:{literalAutolink:Hm,literalAutolinkEmail:Yn,literalAutolinkHttp:Yn,literalAutolinkWww:Yn},exit:{literalAutolink:$m,literalAutolinkEmail:zm,literalAutolinkHttp:Um,literalAutolinkWww:jm}}}function Fm(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zn,notInConstruct:$n},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zn,notInConstruct:$n},{character:":",before:"[ps]",after:"\\/",inConstruct:zn,notInConstruct:$n}]}}function Hm(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Yn(e){this.config.enter.autolinkProtocol.call(this,e)}function Um(e){this.config.exit.autolinkProtocol.call(this,e)}function jm(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function zm(e){this.config.exit.autolinkEmail.call(this,e)}function $m(e){this.exit(e)}function Ym(e){Om(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,qm],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Vm]],{ignore:["link","linkReference"]})}function qm(e,t,r,n,i){let a="";if(!Mo(i)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!Wm(r)))return!1;const s=Gm(r+n);if(!s[0])return!1;const l={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function Vm(e,t,r,n){return!Mo(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function Wm(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Gm(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=ts(e,"(");let a=ts(e,")");for(;n!==-1&&i>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}function Mo(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Lt(r)||vn(r))&&(!t||r!==47)}function Xe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Bo.peek=ng;function Qm(){this.buffer()}function Km(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Xm(){this.buffer()}function Zm(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Jm(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Xe(this.sliceSerialize(e)).toLowerCase(),r.label=t}function eg(e){this.exit(e)}function tg(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Xe(this.sliceSerialize(e)).toLowerCase(),r.label=t}function rg(e){this.exit(e)}function ng(){return"["}function Bo(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const s=r.enter("footnoteReference"),l=r.enter("reference");return a+=i.move(r.safe(r.associationId(e),{after:"]",before:a})),l(),s(),a+=i.move("]"),a}function ig(){return{enter:{gfmFootnoteCallString:Qm,gfmFootnoteCall:Km,gfmFootnoteDefinitionLabelString:Xm,gfmFootnoteDefinition:Zm},exit:{gfmFootnoteCallString:Jm,gfmFootnoteCall:eg,gfmFootnoteDefinitionLabelString:tg,gfmFootnoteDefinition:rg}}}function ag(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:Bo},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,a,s){const l=a.createTracker(s);let o=l.move("[^");const u=a.enter("footnoteDefinition"),d=a.enter("label");return o+=l.move(a.safe(a.associationId(n),{before:o,after:"]"})),d(),o+=l.move("]:"),n.children&&n.children.length>0&&(l.shift(4),o+=l.move((t?`
|
|
4
|
+
`:" ")+a.indentLines(a.containerFlow(n,l.current()),t?Fo:sg))),u(),o}}function sg(e,t,r){return t===0?e:Fo(e,t,r)}function Fo(e,t,r){return(r?"":" ")+e}var lg=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ho.peek=dg;function og(){return{canContainEols:["delete"],enter:{strikethrough:ug},exit:{strikethrough:hg}}}function cg(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lg}],handlers:{delete:Ho}}}function ug(e){this.enter({type:"delete",children:[]},e)}function hg(e){this.exit(e)}function Ho(e,t,r,n){const i=r.createTracker(n),a=r.enter("strikethrough");let s=i.move("~~");return s+=r.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function dg(){return"~"}function fg(e){return e.length}function pg(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||fg,a=[],s=[],l=[],o=[];let u=0,d=-1;for(;++d<e.length;){const N=[],y=[];let A=-1;for(e[d].length>u&&(u=e[d].length);++A<e[d].length;){const C=mg(e[d][A]);if(r.alignDelimiters!==!1){const k=i(C);y[A]=k,(o[A]===void 0||k>o[A])&&(o[A]=k)}N.push(C)}s[d]=N,l[d]=y}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<u;)a[h]=rs(n[h]);else{const N=rs(n);for(;++h<u;)a[h]=N}h=-1;const p=[],f=[];for(;++h<u;){const N=a[h];let y="",A="";N===99?(y=":",A=":"):N===108?y=":":N===114&&(A=":");let C=r.alignDelimiters===!1?1:Math.max(1,o[h]-y.length-A.length);const k=y+"-".repeat(C)+A;r.alignDelimiters!==!1&&(C=y.length+C+A.length,C>o[h]&&(o[h]=C),f[h]=C),p[h]=k}s.splice(1,0,p),l.splice(1,0,f),d=-1;const g=[];for(;++d<s.length;){const N=s[d],y=l[d];h=-1;const A=[];for(;++h<u;){const C=N[h]||"";let k="",R="";if(r.alignDelimiters!==!1){const D=o[h]-(y[h]||0),I=a[h];I===114?k=" ".repeat(D):I===99?D%2?(k=" ".repeat(D/2+.5),R=" ".repeat(D/2-.5)):(k=" ".repeat(D/2),R=k):R=" ".repeat(D)}r.delimiterStart!==!1&&!h&&A.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&C==="")&&(r.delimiterStart!==!1||h)&&A.push(" "),r.alignDelimiters!==!1&&A.push(k),A.push(C),r.alignDelimiters!==!1&&A.push(R),r.padding!==!1&&A.push(" "),(r.delimiterEnd!==!1||h!==u-1)&&A.push("|")}g.push(r.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return g.join(`
|
|
5
|
+
`)}function mg(e){return e==null?"":String(e)}function rs(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function gg(e,t,r,n){const i=r.enter("blockquote"),a=r.createTracker(n);a.move("> "),a.shift(2);const s=r.indentLines(r.containerFlow(e,a.current()),Eg);return i(),s}function Eg(e,t,r){return">"+(r?"":" ")+e}function Tg(e,t){return ns(e,t.inConstruct,!0)&&!ns(e,t.notInConstruct,!1)}function ns(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function is(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
|
|
6
|
+
`&&Tg(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
|
|
7
|
+
`}function bg(e,t){const r=String(e);let n=r.indexOf(t),i=n,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++a>s&&(s=a):a=1,i=n+t.length,n=r.indexOf(t,i);return s}function kg(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function xg(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Ag(e,t,r,n){const i=xg(r),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(kg(e,r)){const h=r.enter("codeIndented"),p=r.indentLines(a,_g);return h(),p}const l=r.createTracker(n),o=i.repeat(Math.max(bg(a,i)+1,3)),u=r.enter("codeFenced");let d=l.move(o);if(e.lang){const h=r.enter(`codeFencedLang${s}`);d+=l.move(r.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),h()}if(e.lang&&e.meta){const h=r.enter(`codeFencedMeta${s}`);d+=l.move(" "),d+=l.move(r.safe(e.meta,{before:d,after:`
|
|
8
|
+
`,encode:["`"],...l.current()})),h()}return d+=l.move(`
|
|
9
|
+
`),a&&(d+=l.move(a+`
|
|
10
|
+
`)),d+=l.move(o),u(),d}function _g(e,t,r){return(r?"":" ")+e}function Vi(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function yg(e,t,r,n){const i=Vi(r),a=i==='"'?"Quote":"Apostrophe",s=r.enter("definition");let l=r.enter("label");const o=r.createTracker(n);let u=o.move("[");return u+=o.move(r.safe(r.associationId(e),{before:u,after:"]",...o.current()})),u+=o.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(r.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=r.enter("destinationRaw"),u+=o.move(r.safe(e.url,{before:u,after:e.title?" ":`
|
|
11
|
+
`,...o.current()}))),l(),e.title&&(l=r.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(r.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),l()),s(),u}function Cg(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ir(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Kt(e){if(e===null||fe(e)||Lt(e))return 1;if(vn(e))return 2}function un(e,t,r){const n=Kt(e),i=Kt(t);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Uo.peek=Sg;function Uo(e,t,r,n){const i=Cg(r),a=r.enter("emphasis"),s=r.createTracker(n),l=s.move(i);let o=s.move(r.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=o.charCodeAt(0),d=un(n.before.charCodeAt(n.before.length-1),u,i);d.inside&&(o=Ir(u)+o.slice(1));const h=o.charCodeAt(o.length-1),p=un(n.after.charCodeAt(0),h,i);p.inside&&(o=o.slice(0,-1)+Ir(h));const f=s.move(i);return a(),r.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},l+o+f}function Sg(e,t,r){return r.options.emphasis||"*"}var Ng={};function Wi(e,t){const r=t||Ng;return jo(e,typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,typeof r.includeHtml=="boolean"?r.includeHtml:!0)}function jo(e,t,r){if(vg(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return as(e.children,t,r)}return Array.isArray(e)?as(e,t,r):""}function as(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=jo(e[i],t,r);return n.join("")}function vg(e){return!!(e&&typeof e=="object")}function Ig(e,t){let r=!1;return Ge(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,!1}),!!((!e.depth||e.depth<3)&&Wi(e)&&(t.options.setext||r))}function wg(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(Ig(e,r)){const d=r.enter("headingSetext"),h=r.enter("phrasing"),p=r.containerPhrasing(e,{...a.current(),before:`
|
|
12
|
+
`,after:`
|
|
13
|
+
`});return h(),d(),p+`
|
|
14
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
15
|
+
`))+1))}const s="#".repeat(i),l=r.enter("headingAtx"),o=r.enter("phrasing");a.move(s+" ");let u=r.containerPhrasing(e,{before:"# ",after:`
|
|
16
|
+
`,...a.current()});return/^[\t ]/.test(u)&&(u=Ir(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,r.options.closeAtx&&(u+=" "+s),o(),l(),u}zo.peek=Lg;function zo(e){return e.value||""}function Lg(){return"<"}$o.peek=Rg;function $o(e,t,r,n){const i=Vi(r),a=i==='"'?"Quote":"Apostrophe",s=r.enter("image");let l=r.enter("label");const o=r.createTracker(n);let u=o.move("![");return u+=o.move(r.safe(e.alt,{before:u,after:"]",...o.current()})),u+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(r.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=r.enter("destinationRaw"),u+=o.move(r.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=r.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(r.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),l()),u+=o.move(")"),s(),u}function Rg(){return"!"}Yo.peek=Og;function Yo(e,t,r,n){const i=e.referenceType,a=r.enter("imageReference");let s=r.enter("label");const l=r.createTracker(n);let o=l.move("![");const u=r.safe(e.alt,{before:o,after:"]",...l.current()});o+=l.move(u+"]["),s();const d=r.stack;r.stack=[],s=r.enter("reference");const h=r.safe(r.associationId(e),{before:o,after:"]",...l.current()});return s(),r.stack=d,a(),i==="full"||!u||u!==h?o+=l.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=l.move("]"),o}function Og(){return"!"}qo.peek=Dg;function qo(e,t,r){let n=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){const s=r.unsafe[a],l=r.compilePattern(s);let o;if(s.atBreak)for(;o=l.exec(n);){let u=o.index;n.charCodeAt(u)===10&&n.charCodeAt(u-1)===13&&u--,n=n.slice(0,u)+" "+n.slice(o.index+1)}}return i+n+i}function Dg(){return"`"}function Vo(e,t){const r=Wi(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Wo.peek=Pg;function Wo(e,t,r,n){const i=Vi(r),a=i==='"'?"Quote":"Apostrophe",s=r.createTracker(n);let l,o;if(Vo(e,r)){const d=r.stack;r.stack=[],l=r.enter("autolink");let h=s.move("<");return h+=s.move(r.containerPhrasing(e,{before:h,after:">",...s.current()})),h+=s.move(">"),l(),r.stack=d,h}l=r.enter("link"),o=r.enter("label");let u=s.move("[");return u+=s.move(r.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(r.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(o=r.enter("destinationRaw"),u+=s.move(r.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=r.enter(`title${a}`),u+=s.move(" "+i),u+=s.move(r.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),o()),u+=s.move(")"),l(),u}function Pg(e,t,r){return Vo(e,r)?"<":"["}Go.peek=Mg;function Go(e,t,r,n){const i=e.referenceType,a=r.enter("linkReference");let s=r.enter("label");const l=r.createTracker(n);let o=l.move("[");const u=r.containerPhrasing(e,{before:o,after:"]",...l.current()});o+=l.move(u+"]["),s();const d=r.stack;r.stack=[],s=r.enter("reference");const h=r.safe(r.associationId(e),{before:o,after:"]",...l.current()});return s(),r.stack=d,a(),i==="full"||!u||u!==h?o+=l.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=l.move("]"),o}function Mg(){return"["}function Gi(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Bg(e){const t=Gi(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function Fg(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Qo(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Hg(e,t,r,n){const i=r.enter("list"),a=r.bulletCurrent;let s=e.ordered?Fg(r):Gi(r);const l=e.ordered?s==="."?")":".":Bg(r);let o=t&&r.bulletLastUsed?s===r.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(o=!0),Qo(r)===s&&d){let h=-1;for(;++h<e.children.length;){const p=e.children[h];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(s=l),r.bulletCurrent=s;const u=r.containerFlow(e,n);return r.bulletLastUsed=s,r.bulletCurrent=a,i(),u}function Ug(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function jg(e,t,r,n){const i=Ug(r);let a=r.bulletCurrent||Gi(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=r.createTracker(n);l.move(a+" ".repeat(s-a.length)),l.shift(s);const o=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,l.current()),d);return o(),u;function d(h,p,f){return p?(f?"":" ".repeat(s))+h:(f?a:a+" ".repeat(s-a.length))+h}}function zg(e,t,r,n){const i=r.enter("paragraph"),a=r.enter("phrasing"),s=r.containerPhrasing(e,n);return a(),i(),s}var $g=bn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Yg(e,t,r,n){return(e.children.some(function(i){return $g(i)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function qg(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ko.peek=Vg;function Ko(e,t,r,n){const i=qg(r),a=r.enter("strong"),s=r.createTracker(n),l=s.move(i+i);let o=s.move(r.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=o.charCodeAt(0),d=un(n.before.charCodeAt(n.before.length-1),u,i);d.inside&&(o=Ir(u)+o.slice(1));const h=o.charCodeAt(o.length-1),p=un(n.after.charCodeAt(0),h,i);p.inside&&(o=o.slice(0,-1)+Ir(h));const f=s.move(i+i);return a(),r.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},l+o+f}function Vg(e,t,r){return r.options.strong||"*"}function Wg(e,t,r,n){return r.safe(e.value,n)}function Gg(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Qg(e,t,r){const n=(Qo(r)+(r.options.ruleSpaces?" ":"")).repeat(Gg(r));return r.options.ruleSpaces?n.slice(0,-1):n}var Xo={blockquote:gg,break:is,code:Ag,definition:yg,emphasis:Uo,hardBreak:is,heading:wg,html:zo,image:$o,imageReference:Yo,inlineCode:qo,link:Wo,linkReference:Go,list:Hg,listItem:jg,paragraph:zg,root:Yg,strong:Ko,text:Wg,thematicBreak:Qg},ss=document.createElement("i");function Qi(e){const t="&"+e+";";ss.innerHTML=t;const r=ss.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Zo(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}var Kg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Xg(e){return e.replace(Kg,Zg)}function Zg(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const n=r.charCodeAt(1),i=n===120||n===88;return Zo(r.slice(i?2:1),i?16:10)}return Qi(r)||e}function Jg(){return{enter:{table:eE,tableData:ls,tableHeader:ls,tableRow:rE},exit:{codeText:nE,table:tE,tableData:qn,tableHeader:qn,tableRow:qn}}}function eE(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function tE(e){this.exit(e),this.data.inTable=void 0}function rE(e){this.enter({type:"tableRow",children:[]},e)}function qn(e){this.exit(e)}function ls(e){this.enter({type:"tableCell",children:[]},e)}function nE(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,iE));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function iE(e,t){return t==="|"?t:e}function aE(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
17
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:o,tableRow:l}};function s(f,g,N,y){return u(d(f,N,y),f.align)}function l(f,g,N,y){const A=u([h(f,N,y)]);return A.slice(0,A.indexOf(`
|
|
18
|
+
`))}function o(f,g,N,y){const A=N.enter("tableCell"),C=N.enter("phrasing"),k=N.containerPhrasing(f,{...y,before:a,after:a});return C(),A(),k}function u(f,g){return pg(f,{align:g,alignDelimiters:n,padding:r,stringLength:i})}function d(f,g,N){const y=f.children;let A=-1;const C=[],k=g.enter("table");for(;++A<y.length;)C[A]=h(y[A],g,N);return k(),C}function h(f,g,N){const y=f.children;let A=-1;const C=[],k=g.enter("tableRow");for(;++A<y.length;)C[A]=o(y[A],f,g,N);return k(),C}function p(f,g,N){let y=Xo.inlineCode(f,g,N);return N.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function sE(){return{exit:{taskListCheckValueChecked:os,taskListCheckValueUnchecked:os,paragraph:oE}}}function lE(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cE}}}function os(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function oE(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){s=l;break}}s===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function cE(e,t,r,n){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=r.createTracker(n);a&&l.move(s);let o=Xo.listItem(e,t,r,{...n,...l.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),o;function u(d){return d+s}}function uE(){return[Bm(),ig(),og(),Jg(),sE()]}function hE(e){return{extensions:[Fm(),ag(e),cg(),aE(e),lE()]}}function Ye(e,t,r,n){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(t,r),e.splice(...s);else for(r&&e.splice(t,r);a<n.length;)s=n.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function Ve(e,t){return e.length>0?(Ye(e,e.length,0,t),e):t}var cs={}.hasOwnProperty;function Jo(e){const t={};let r=-1;for(;++r<e.length;)dE(t,e[r]);return t}function dE(e,t){let r;for(r in t){const n=(cs.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let a;if(i)for(a in i){cs.call(n,a)||(n[a]=[]);const s=i[a];fE(n[a],Array.isArray(s)?s:s?[s]:[])}}}function fE(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);Ye(e,0,0,n)}var pE={tokenize:kE,partial:!0},ec={tokenize:xE,partial:!0},tc={tokenize:AE,partial:!0},rc={tokenize:_E,partial:!0},mE={tokenize:yE,partial:!0},nc={name:"wwwAutolink",tokenize:TE,previous:ac},ic={name:"protocolAutolink",tokenize:bE,previous:sc},ut={name:"emailAutolink",tokenize:EE,previous:lc},at={};function gE(){return{text:at}}var yt=48;for(;yt<123;)at[yt]=ut,yt++,yt===58?yt=65:yt===91&&(yt=97);at[43]=ut;at[45]=ut;at[46]=ut;at[95]=ut;at[72]=[ut,ic];at[104]=[ut,ic];at[87]=[ut,nc];at[119]=[ut,nc];function EE(e,t,r){const n=this;let i,a;return s;function s(h){return!Ti(h)||!lc.call(n,n.previous)||Ki(n.events)?r(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(h))}function l(h){return Ti(h)?(e.consume(h),l):h===64?(e.consume(h),o):r(h)}function o(h){return h===46?e.check(mE,d,u)(h):h===45||h===95||Ne(h)?(a=!0,e.consume(h),o):d(h)}function u(h){return e.consume(h),i=!0,o}function d(h){return a&&i&&Re(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):r(h)}}function TE(e,t,r){const n=this;return i;function i(s){return s!==87&&s!==119||!ac.call(n,n.previous)||Ki(n.events)?r(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(pE,e.attempt(ec,e.attempt(tc,a),r),r)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function bE(e,t,r){const n=this;let i="",a=!1;return s;function s(h){return(h===72||h===104)&&sc.call(n,n.previous)&&!Ki(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),l):r(h)}function l(h){if(Re(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),l;if(h===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(h),o}return r(h)}function o(h){return h===47?(e.consume(h),a?u:(a=!0,o)):r(h)}function u(h){return h===null||cn(h)||fe(h)||Lt(h)||vn(h)?r(h):e.attempt(ec,e.attempt(tc,d),r)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function kE(e,t,r){let n=0;return i;function i(s){return(s===87||s===119)&&n<3?(n++,e.consume(s),i):s===46&&n===3?(e.consume(s),a):r(s)}function a(s){return s===null?r(s):t(s)}}function xE(e,t,r){let n,i,a;return s;function s(u){return u===46||u===95?e.check(rc,o,l)(u):u===null||fe(u)||Lt(u)||u!==45&&vn(u)?o(u):(a=!0,e.consume(u),s)}function l(u){return u===95?n=!0:(i=n,n=void 0),e.consume(u),s}function o(u){return i||n||!a?r(u):t(u)}}function AE(e,t){let r=0,n=0;return i;function i(s){return s===40?(r++,e.consume(s),i):s===41&&n<r?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(rc,t,a)(s):s===null||fe(s)||Lt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&n++,e.consume(s),i}}function _E(e,t,r){return n;function n(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),n):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||fe(l)||Lt(l)?t(l):r(l)}function i(l){return l===null||l===40||l===91||fe(l)||Lt(l)?t(l):n(l)}function a(l){return Re(l)?s(l):r(l)}function s(l){return l===59?(e.consume(l),n):Re(l)?(e.consume(l),s):r(l)}}function yE(e,t,r){return n;function n(a){return e.consume(a),i}function i(a){return Ne(a)?r(a):t(a)}}function ac(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||fe(e)}function sc(e){return!Re(e)}function lc(e){return!(e===47||Ti(e))}function Ti(e){return e===43||e===45||e===46||e===95||Ne(e)}function Ki(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}function tr(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const a=e.charCodeAt(r);let s="";if(a===37&&Ne(e.charCodeAt(r+1))&&Ne(e.charCodeAt(r+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(r+1);a<56320&&l>56319&&l<57344?(s=String.fromCharCode(a,l),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(n,r),encodeURIComponent(s)),n=r+i+1,s=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function In(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}var bi={name:"attention",resolveAll:CE,tokenize:SE};function CE(e,t){let r=-1,n,i,a,s,l,o,u,d;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;o=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const h={...e[n][1].end},p={...e[r][1].start};us(h,-o),us(p,o),s={type:o>1?"strongSequence":"emphasisSequence",start:h,end:{...e[n][1].end}},l={type:o>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:p},a={type:o>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[n][1].end={...s.start},e[r][1].start={...l.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=Ve(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=Ve(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),u=Ve(u,In(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),u=Ve(u,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(d=2,u=Ve(u,[["enter",e[r][1],t],["exit",e[r][1],t]])):d=0,Ye(e,n-1,r-n+3,u),r=n+u.length-d-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function SE(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Kt(n);let a;return s;function s(o){return a=o,e.enter("attentionSequence"),l(o)}function l(o){if(o===a)return e.consume(o),l;const u=e.exit("attentionSequence"),d=Kt(o),h=!d||d===2&&i||r.includes(o),p=!i||i===2&&d||r.includes(n);return u._open=!!(a===42?h:h&&(i||!p)),u._close=!!(a===42?p:p&&(d||!h)),t(o)}}function us(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var NE={name:"autolink",tokenize:vE};function vE(e,t,r){let n=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(f){return Re(f)?(e.consume(f),s):f===64?r(f):u(f)}function s(f){return f===43||f===45||f===46||Ne(f)?(n=1,l(f)):u(f)}function l(f){return f===58?(e.consume(f),n=0,o):(f===43||f===45||f===46||Ne(f))&&n++<32?(e.consume(f),l):(n=0,u(f))}function o(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||cn(f)?r(f):(e.consume(f),o)}function u(f){return f===64?(e.consume(f),d):Im(f)?(e.consume(f),u):r(f)}function d(f){return Ne(f)?h(f):r(f)}function h(f){return f===46?(e.consume(f),n=0,d):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||Ne(f))&&n++<63){const g=f===45?p:h;return e.consume(f),g}return r(f)}}function ue(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(o){return se(o)?(e.enter(r),l(o)):t(o)}function l(o){return se(o)&&a++<i?(e.consume(o),l):(e.exit(r),t(o))}}var Br={partial:!0,tokenize:IE};function IE(e,t,r){return n;function n(a){return se(a)?ue(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||K(a)?t(a):r(a)}}var oc={continuation:{tokenize:LE},exit:RE,name:"blockQuote",tokenize:wE};function wE(e,t,r){const n=this;return i;function i(s){if(s===62){const l=n.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return r(s)}function a(s){return se(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function LE(e,t,r){const n=this;return i;function i(s){return se(s)?ue(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(oc,t,r)(s)}}function RE(e){e.exit("blockQuote")}var cc={name:"characterEscape",tokenize:OE};function OE(e,t,r){return n;function n(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return Lm(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}var uc={name:"characterReference",tokenize:DE};function DE(e,t,r){const n=this;let i=0,a,s;return l;function l(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),o}function o(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),a=31,s=Ne,d(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=wm,d):(e.enter("characterReferenceValue"),a=7,s=Ei,d(h))}function d(h){if(h===59&&i){const p=e.exit("characterReferenceValue");return s===Ne&&!Qi(n.sliceSerialize(p))?r(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(h)&&i++<a?(e.consume(h),d):r(h)}}var hs={partial:!0,tokenize:ME},ds={concrete:!0,name:"codeFenced",tokenize:PE};function PE(e,t,r){const n=this,i={partial:!0,tokenize:D};let a=0,s=0,l;return o;function o(I){return u(I)}function u(I){const U=n.events[n.events.length-1];return a=U&&U[1].type==="linePrefix"?U[2].sliceSerialize(U[1],!0).length:0,l=I,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(I)}function d(I){return I===l?(s++,e.consume(I),d):s<3?r(I):(e.exit("codeFencedFenceSequence"),se(I)?ue(e,h,"whitespace")(I):h(I))}function h(I){return I===null||K(I)?(e.exit("codeFencedFence"),n.interrupt?t(I):e.check(hs,N,R)(I)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(I))}function p(I){return I===null||K(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(I)):se(I)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ue(e,f,"whitespace")(I)):I===96&&I===l?r(I):(e.consume(I),p)}function f(I){return I===null||K(I)?h(I):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(I))}function g(I){return I===null||K(I)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(I)):I===96&&I===l?r(I):(e.consume(I),g)}function N(I){return e.attempt(i,R,y)(I)}function y(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),A}function A(I){return a>0&&se(I)?ue(e,C,"linePrefix",a+1)(I):C(I)}function C(I){return I===null||K(I)?e.check(hs,N,R)(I):(e.enter("codeFlowValue"),k(I))}function k(I){return I===null||K(I)?(e.exit("codeFlowValue"),C(I)):(e.consume(I),k)}function R(I){return e.exit("codeFenced"),t(I)}function D(I,U,$){let V=0;return v;function v(Q){return I.enter("lineEnding"),I.consume(Q),I.exit("lineEnding"),F}function F(Q){return I.enter("codeFencedFence"),se(Q)?ue(I,z,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):z(Q)}function z(Q){return Q===l?(I.enter("codeFencedFenceSequence"),Y(Q)):$(Q)}function Y(Q){return Q===l?(V++,I.consume(Q),Y):V>=s?(I.exit("codeFencedFenceSequence"),se(Q)?ue(I,te,"whitespace")(Q):te(Q)):$(Q)}function te(Q){return Q===null||K(Q)?(I.exit("codeFencedFence"),U(Q)):$(Q)}}}function ME(e,t,r){const n=this;return i;function i(s){return s===null?r(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}var Vn={name:"codeIndented",tokenize:FE},BE={partial:!0,tokenize:HE};function FE(e,t,r){const n=this;return i;function i(u){return e.enter("codeIndented"),ue(e,a,"linePrefix",5)(u)}function a(u){const d=n.events[n.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(u):r(u)}function s(u){return u===null?o(u):K(u)?e.attempt(BE,s,o)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||K(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function o(u){return e.exit("codeIndented"),t(u)}}function HE(e,t,r){const n=this;return i;function i(s){return n.parser.lazy[n.now().line]?r(s):K(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ue(e,a,"linePrefix",5)(s)}function a(s){const l=n.events[n.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):K(s)?i(s):r(s)}}var UE={name:"codeText",previous:zE,resolve:jE,tokenize:$E};function jE(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function zE(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function $E(e,t,r){let n=0,i,a;return s;function s(h){return e.enter("codeText"),e.enter("codeTextSequence"),l(h)}function l(h){return h===96?(e.consume(h),n++,l):(e.exit("codeTextSequence"),o(h))}function o(h){return h===null?r(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),o):h===96?(a=e.enter("codeTextSequence"),i=0,d(h)):K(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),o):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||K(h)?(e.exit("codeTextData"),o(h)):(e.consume(h),u)}function d(h){return h===96?(e.consume(h),i++,d):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(a.type="codeTextData",u(h))}}var YE=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,t,r){const n=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return r&&fr(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),fr(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),fr(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);fr(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);fr(this.left,t.reverse())}}};function fr(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function hc(e){const t={};let r=-1,n,i,a,s,l,o,u;const d=new YE(e);for(;++r<d.length;){for(;r in t;)r=t[r];if(n=d.get(r),r&&n[1].type==="chunkFlow"&&d.get(r-1)[1].type==="listItemPrefix"&&(o=n[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,qE(d,r)),r=t[r],u=!0);else if(n[1]._container){for(a=r,i=void 0;a--;)if(s=d.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(n[1].end={...d.get(i)[1].start},l=d.slice(i,r),l.unshift(n),d.splice(i,r-i+1,l))}}return Ye(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function qE(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const a=[];let s=r._tokenizer;s||(s=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,o=[],u={};let d,h,p=-1,f=r,g=0,N=0;const y=[N];for(;f;){for(;e.get(++i)[1]!==f;);a.push(i),f._tokenizer||(d=n.sliceStream(f),f.next||d.push(null),h&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=r;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(N=p+1,y.push(N),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):y.pop(),p=y.length;p--;){const A=l.slice(y[p],y[p+1]),C=a.pop();o.push([C,C+A.length-1]),e.splice(C,2,A)}for(o.reverse(),p=-1;++p<o.length;)u[g+o[p][0]]=g+o[p][1],g+=o[p][1]-o[p][0]-1;return u}var VE={resolve:GE,tokenize:QE},WE={partial:!0,tokenize:KE};function GE(e){return hc(e),e}function QE(e,t){let r;return n;function n(l){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):K(l)?e.check(WE,s,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function KE(e,t,r){const n=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ue(e,a,"linePrefix")}function a(s){if(s===null||K(s))return r(s);const l=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(n.parser.constructs.flow,r,t)(s)}}function dc(e,t,r,n,i,a,s,l,o){const u=o||Number.POSITIVE_INFINITY;let d=0;return h;function h(A){return A===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(A),e.exit(a),p):A===null||A===32||A===41||cn(A)?r(A):(e.enter(n),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),N(A))}function p(A){return A===62?(e.enter(a),e.consume(A),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(A))}function f(A){return A===62?(e.exit("chunkString"),e.exit(l),p(A)):A===null||A===60||K(A)?r(A):(e.consume(A),A===92?g:f)}function g(A){return A===60||A===62||A===92?(e.consume(A),f):f(A)}function N(A){return!d&&(A===null||A===41||fe(A))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(n),t(A)):d<u&&A===40?(e.consume(A),d++,N):A===41?(e.consume(A),d--,N):A===null||A===32||A===40||cn(A)?r(A):(e.consume(A),A===92?y:N)}function y(A){return A===40||A===41||A===92?(e.consume(A),N):N(A)}}function fc(e,t,r,n,i,a){const s=this;let l=0,o;return u;function u(f){return e.enter(n),e.enter(i),e.consume(f),e.exit(i),e.enter(a),d}function d(f){return l>999||f===null||f===91||f===93&&!o||f===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?r(f):f===93?(e.exit(a),e.enter(i),e.consume(f),e.exit(i),e.exit(n),t):K(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||K(f)||l++>999?(e.exit("chunkString"),d(f)):(e.consume(f),o||(o=!se(f)),f===92?p:h)}function p(f){return f===91||f===92||f===93?(e.consume(f),l++,h):h(f)}}function pc(e,t,r,n,i,a){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(n),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,o):r(p)}function o(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(n),t):(e.enter(a),u(p))}function u(p){return p===s?(e.exit(a),o(s)):p===null?r(p):K(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ue(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===s||p===null||K(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?h:d)}function h(p){return p===s||p===92?(e.consume(p),d):d(p)}}function yr(e,t){let r;return n;function n(i){return K(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):se(i)?ue(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}var XE={name:"definition",tokenize:JE},ZE={partial:!0,tokenize:eT};function JE(e,t,r){const n=this;let i;return a;function a(f){return e.enter("definition"),s(f)}function s(f){return fc.call(n,e,l,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function l(f){return i=Xe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),o):r(f)}function o(f){return fe(f)?yr(e,u)(f):u(f)}function u(f){return dc(e,d,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(ZE,h,h)(f)}function h(f){return se(f)?ue(e,p,"whitespace")(f):p(f)}function p(f){return f===null||K(f)?(e.exit("definition"),n.parser.defined.push(i),t(f)):r(f)}}function eT(e,t,r){return n;function n(l){return fe(l)?yr(e,i)(l):r(l)}function i(l){return pc(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return se(l)?ue(e,s,"whitespace")(l):s(l)}function s(l){return l===null||K(l)?t(l):r(l)}}var tT={name:"hardBreakEscape",tokenize:rT};function rT(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return K(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}var nT={name:"headingAtx",resolve:iT,tokenize:aT};function iT(e,t){let r=e.length-2,n=3,i,a;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},a={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},Ye(e,n,r-n+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function aT(e,t,r){let n=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&n++<6?(e.consume(d),s):d===null||fe(d)?(e.exit("atxHeadingSequence"),l(d)):r(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),o(d)):d===null||K(d)?(e.exit("atxHeading"),t(d)):se(d)?ue(e,l,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function o(d){return d===35?(e.consume(d),o):(e.exit("atxHeadingSequence"),l(d))}function u(d){return d===null||d===35||fe(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),u)}}var sT=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],fs=["pre","script","style","textarea"],lT={concrete:!0,name:"htmlFlow",resolveTo:uT,tokenize:hT},oT={partial:!0,tokenize:fT},cT={partial:!0,tokenize:dT};function uT(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function hT(e,t,r){const n=this;let i,a,s,l,o;return u;function u(S){return d(S)}function d(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),h}function h(S){return S===33?(e.consume(S),p):S===47?(e.consume(S),a=!0,N):S===63?(e.consume(S),i=3,n.interrupt?t:x):Re(S)?(e.consume(S),s=String.fromCharCode(S),y):r(S)}function p(S){return S===45?(e.consume(S),i=2,f):S===91?(e.consume(S),i=5,l=0,g):Re(S)?(e.consume(S),i=4,n.interrupt?t:x):r(S)}function f(S){return S===45?(e.consume(S),n.interrupt?t:x):r(S)}function g(S){return S==="CDATA[".charCodeAt(l++)?(e.consume(S),l===6?n.interrupt?t:z:g):r(S)}function N(S){return Re(S)?(e.consume(S),s=String.fromCharCode(S),y):r(S)}function y(S){if(S===null||S===47||S===62||fe(S)){const xe=S===47,Se=s.toLowerCase();return!xe&&!a&&fs.includes(Se)?(i=1,n.interrupt?t(S):z(S)):sT.includes(s.toLowerCase())?(i=6,xe?(e.consume(S),A):n.interrupt?t(S):z(S)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(S):a?C(S):k(S))}return S===45||Ne(S)?(e.consume(S),s+=String.fromCharCode(S),y):r(S)}function A(S){return S===62?(e.consume(S),n.interrupt?t:z):r(S)}function C(S){return se(S)?(e.consume(S),C):v(S)}function k(S){return S===47?(e.consume(S),v):S===58||S===95||Re(S)?(e.consume(S),R):se(S)?(e.consume(S),k):v(S)}function R(S){return S===45||S===46||S===58||S===95||Ne(S)?(e.consume(S),R):D(S)}function D(S){return S===61?(e.consume(S),I):se(S)?(e.consume(S),D):k(S)}function I(S){return S===null||S===60||S===61||S===62||S===96?r(S):S===34||S===39?(e.consume(S),o=S,U):se(S)?(e.consume(S),I):$(S)}function U(S){return S===o?(e.consume(S),o=null,V):S===null||K(S)?r(S):(e.consume(S),U)}function $(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||fe(S)?D(S):(e.consume(S),$)}function V(S){return S===47||S===62||se(S)?k(S):r(S)}function v(S){return S===62?(e.consume(S),F):r(S)}function F(S){return S===null||K(S)?z(S):se(S)?(e.consume(S),F):r(S)}function z(S){return S===45&&i===2?(e.consume(S),q):S===60&&i===1?(e.consume(S),P):S===62&&i===4?(e.consume(S),he):S===63&&i===3?(e.consume(S),x):S===93&&i===5?(e.consume(S),J):K(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(oT,pe,Y)(S)):S===null||K(S)?(e.exit("htmlFlowData"),Y(S)):(e.consume(S),z)}function Y(S){return e.check(cT,te,pe)(S)}function te(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),Q}function Q(S){return S===null||K(S)?Y(S):(e.enter("htmlFlowData"),z(S))}function q(S){return S===45?(e.consume(S),x):z(S)}function P(S){return S===47?(e.consume(S),s="",W):z(S)}function W(S){if(S===62){const xe=s.toLowerCase();return fs.includes(xe)?(e.consume(S),he):z(S)}return Re(S)&&s.length<8?(e.consume(S),s+=String.fromCharCode(S),W):z(S)}function J(S){return S===93?(e.consume(S),x):z(S)}function x(S){return S===62?(e.consume(S),he):S===45&&i===2?(e.consume(S),x):z(S)}function he(S){return S===null||K(S)?(e.exit("htmlFlowData"),pe(S)):(e.consume(S),he)}function pe(S){return e.exit("htmlFlow"),t(S)}}function dT(e,t,r){const n=this;return i;function i(s){return K(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):r(s)}function a(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}function fT(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Br,t,r)}}var pT={name:"htmlText",tokenize:mT};function mT(e,t,r){const n=this;let i,a,s;return l;function l(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),o}function o(x){return x===33?(e.consume(x),u):x===47?(e.consume(x),D):x===63?(e.consume(x),k):Re(x)?(e.consume(x),$):r(x)}function u(x){return x===45?(e.consume(x),d):x===91?(e.consume(x),a=0,g):Re(x)?(e.consume(x),C):r(x)}function d(x){return x===45?(e.consume(x),f):r(x)}function h(x){return x===null?r(x):x===45?(e.consume(x),p):K(x)?(s=h,P(x)):(e.consume(x),h)}function p(x){return x===45?(e.consume(x),f):h(x)}function f(x){return x===62?q(x):x===45?p(x):h(x)}function g(x){return x==="CDATA[".charCodeAt(a++)?(e.consume(x),a===6?N:g):r(x)}function N(x){return x===null?r(x):x===93?(e.consume(x),y):K(x)?(s=N,P(x)):(e.consume(x),N)}function y(x){return x===93?(e.consume(x),A):N(x)}function A(x){return x===62?q(x):x===93?(e.consume(x),A):N(x)}function C(x){return x===null||x===62?q(x):K(x)?(s=C,P(x)):(e.consume(x),C)}function k(x){return x===null?r(x):x===63?(e.consume(x),R):K(x)?(s=k,P(x)):(e.consume(x),k)}function R(x){return x===62?q(x):k(x)}function D(x){return Re(x)?(e.consume(x),I):r(x)}function I(x){return x===45||Ne(x)?(e.consume(x),I):U(x)}function U(x){return K(x)?(s=U,P(x)):se(x)?(e.consume(x),U):q(x)}function $(x){return x===45||Ne(x)?(e.consume(x),$):x===47||x===62||fe(x)?V(x):r(x)}function V(x){return x===47?(e.consume(x),q):x===58||x===95||Re(x)?(e.consume(x),v):K(x)?(s=V,P(x)):se(x)?(e.consume(x),V):q(x)}function v(x){return x===45||x===46||x===58||x===95||Ne(x)?(e.consume(x),v):F(x)}function F(x){return x===61?(e.consume(x),z):K(x)?(s=F,P(x)):se(x)?(e.consume(x),F):V(x)}function z(x){return x===null||x===60||x===61||x===62||x===96?r(x):x===34||x===39?(e.consume(x),i=x,Y):K(x)?(s=z,P(x)):se(x)?(e.consume(x),z):(e.consume(x),te)}function Y(x){return x===i?(e.consume(x),i=void 0,Q):x===null?r(x):K(x)?(s=Y,P(x)):(e.consume(x),Y)}function te(x){return x===null||x===34||x===39||x===60||x===61||x===96?r(x):x===47||x===62||fe(x)?V(x):(e.consume(x),te)}function Q(x){return x===47||x===62||fe(x)?V(x):r(x)}function q(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):r(x)}function P(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),W}function W(x){return se(x)?ue(e,J,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):J(x)}function J(x){return e.enter("htmlTextData"),s(x)}}var Xi={name:"labelEnd",resolveAll:bT,resolveTo:kT,tokenize:xT},gT={tokenize:AT},ET={tokenize:_T},TT={tokenize:yT};function bT(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&Ye(e,0,e.length,r),e}function kT(e,t){let r=e.length,n=0,i,a,s,l;for(;r--;)if(i=e[r][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(s=r);const o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},d={type:"labelText",start:{...e[a+n+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",o,t],["enter",u,t]],l=Ve(l,e.slice(a+1,a+n+3)),l=Ve(l,[["enter",d,t]]),l=Ve(l,In(t.parser.constructs.insideSpan.null,e.slice(a+n+4,s-3),t)),l=Ve(l,[["exit",d,t],e[s-2],e[s-1],["exit",u,t]]),l=Ve(l,e.slice(s+1)),l=Ve(l,[["exit",o,t]]),Ye(e,a,e.length,l),e}function xT(e,t,r){const n=this;let i=n.events.length,a,s;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){a=n.events[i][1];break}return l;function l(p){return a?a._inactive?h(p):(s=n.parser.defined.includes(Xe(n.sliceSerialize({start:a.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),o):r(p)}function o(p){return p===40?e.attempt(gT,d,s?d:h)(p):p===91?e.attempt(ET,d,s?u:h)(p):s?d(p):h(p)}function u(p){return e.attempt(TT,d,h)(p)}function d(p){return t(p)}function h(p){return a._balanced=!0,r(p)}}function AT(e,t,r){return n;function n(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return fe(h)?yr(e,a)(h):a(h)}function a(h){return h===41?d(h):dc(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function s(h){return fe(h)?yr(e,o)(h):d(h)}function l(h){return r(h)}function o(h){return h===34||h===39||h===40?pc(e,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function u(h){return fe(h)?yr(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):r(h)}}function _T(e,t,r){const n=this;return i;function i(l){return fc.call(n,e,a,s,"reference","referenceMarker","referenceString")(l)}function a(l){return n.parser.defined.includes(Xe(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(l):r(l)}function s(l){return r(l)}}function yT(e,t,r){return n;function n(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}var CT={name:"labelStartImage",resolveAll:Xi.resolveAll,tokenize:ST};function ST(e,t,r){const n=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):r(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(l):t(l)}}var NT={name:"labelStartLink",resolveAll:Xi.resolveAll,tokenize:vT};function vT(e,t,r){const n=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}var Wn={name:"lineEnding",tokenize:IT};function IT(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),ue(e,t,"linePrefix")}}var rn={name:"thematicBreak",tokenize:wT};function wT(e,t,r){let n=0,i;return a;function a(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),o(u)):n>=3&&(u===null||K(u))?(e.exit("thematicBreak"),t(u)):r(u)}function o(u){return u===i?(e.consume(u),n++,o):(e.exit("thematicBreakSequence"),se(u)?ue(e,l,"whitespace")(u):l(u))}}var Me={continuation:{tokenize:DT},exit:MT,name:"list",tokenize:OT},LT={partial:!0,tokenize:BT},RT={partial:!0,tokenize:PT};function OT(e,t,r){const n=this,i=n.events[n.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(f){const g=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:Ei(f)){if(n.containerState.type||(n.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(rn,r,u)(f):u(f);if(!n.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(f)}return r(f)}function o(f){return Ei(f)&&++s<10?(e.consume(f),o):(!n.interrupt||s<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):r(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,e.check(Br,n.interrupt?r:d,e.attempt(LT,p,h))}function d(f){return n.containerState.initialBlankLine=!0,a++,p(f)}function h(f){return se(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):r(f)}function p(f){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function DT(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Br,i,a);function i(l){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,ue(e,t,"listItemIndent",n.containerState.size+1)(l)}function a(l){return n.containerState.furtherBlankLines||!se(l)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(l)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(RT,t,s)(l))}function s(l){return n.containerState._closeFlow=!0,n.interrupt=void 0,ue(e,e.attempt(Me,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function PT(e,t,r){const n=this;return ue(e,i,"listItemIndent",n.containerState.size+1);function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?t(a):r(a)}}function MT(e){e.exit(this.containerState.type)}function BT(e,t,r){const n=this;return ue(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=n.events[n.events.length-1];return!se(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}var ps={name:"setextUnderline",resolveTo:FT,tokenize:HT};function FT(e,t){let r=e.length,n,i,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const s={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=s,e.push(["exit",s,t]),e}function HT(e,t,r){const n=this;let i;return a;function a(u){let d=n.events.length,h;for(;d--;)if(n.events[d][1].type!=="lineEnding"&&n.events[d][1].type!=="linePrefix"&&n.events[d][1].type!=="content"){h=n.events[d][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(e.enter("setextHeadingLine"),i=u,s(u)):r(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),se(u)?ue(e,o,"lineSuffix")(u):o(u))}function o(u){return u===null||K(u)?(e.exit("setextHeadingLine"),t(u)):r(u)}}var UT={tokenize:GT,partial:!0};function jT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:qT,continuation:{tokenize:VT},exit:WT}},text:{91:{name:"gfmFootnoteCall",tokenize:YT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:zT,resolveTo:$T}}}}function zT(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s;for(;i--;){const o=n.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return l;function l(o){if(!s||!s._balanced)return r(o);const u=Xe(n.sliceSerialize({start:s.end,end:n.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?r(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function $T(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...l),e}function YT(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,s;return l;function l(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),o}function o(h){return h!==94?r(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(a>999||h===93&&!s||h===null||h===91||fe(h))return r(h);if(h===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Xe(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(h)}return fe(h)||(s=!0),a++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}}function qT(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,s=0,l;return o;function o(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):r(g)}function d(g){if(s>999||g===93&&!l||g===null||g===91||fe(g))return r(g);if(g===93){e.exit("chunkString");const N=e.exit("gfmFootnoteDefinitionLabelString");return a=Xe(n.sliceSerialize(N)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return fe(g)||(l=!0),s++,e.consume(g),g===92?h:d}function h(g){return g===91||g===92||g===93?(e.consume(g),s++,d):d(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(a)||i.push(a),ue(e,f,"gfmFootnoteDefinitionWhitespace")):r(g)}function f(g){return t(g)}}function VT(e,t,r){return e.check(Br,t,e.attempt(UT,t,r))}function WT(e){e.exit("gfmFootnoteDefinition")}function GT(e,t,r){const n=this;return ue(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):r(a)}}function QT(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:n};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function n(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let o=l;for(;o--;)if(a[o][0]==="exit"&&a[o][1].type==="strikethroughSequenceTemporary"&&a[o][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[o][1].end.offset-a[o][1].start.offset){a[l][1].type="strikethroughSequence",a[o][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[o][1].start),end:Object.assign({},a[l][1].end)},d={type:"strikethroughText",start:Object.assign({},a[o][1].end),end:Object.assign({},a[l][1].start)},h=[["enter",u,s],["enter",a[o][1],s],["exit",a[o][1],s],["enter",d,s]],p=s.parser.constructs.insideSpan.null;p&&Ye(h,h.length,0,In(p,a.slice(o+1,l),s)),Ye(h,h.length,0,[["exit",d,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),Ye(a,o-1,l-o+3,h),l=o+h.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const o=this.previous,u=this.events;let d=0;return h;function h(f){return o===126&&u[u.length-1][1].type!=="characterEscape"?l(f):(a.enter("strikethroughSequenceTemporary"),p(f))}function p(f){const g=Kt(o);if(f===126)return d>1?l(f):(a.consume(f),d++,p);if(d<2&&!t)return l(f);const N=a.exit("strikethroughSequenceTemporary"),y=Kt(f);return N._open=!y||y===2&&!!g,N._close=!g||g===2&&!!y,s(f)}}}var KT=class{constructor(){this.map=[]}add(e,t,r){XT(this,e,t,r)}consume(e){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];r.push(e.slice()),e.length=0;let n=r.pop();for(;n;){for(const i of n)e.push(i);n=r.pop()}this.map.length=0}};function XT(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function ZT(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=n.length-1;n[a]=n[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function JT(){return{flow:{null:{name:"table",tokenize:eb,resolveAll:tb}}}}function eb(e,t,r){const n=this;let i=0,a=0,s;return l;function l(v){let F=n.events.length-1;for(;F>-1;){const te=n.events[F][1].type;if(te==="lineEnding"||te==="linePrefix")F--;else break}const z=F>-1?n.events[F][1].type:null,Y=z==="tableHead"||z==="tableRow"?I:o;return Y===I&&n.parser.lazy[n.now().line]?r(v):Y(v)}function o(v){return e.enter("tableHead"),e.enter("tableRow"),u(v)}function u(v){return v===124||(s=!0,a+=1),d(v)}function d(v){return v===null?r(v):K(v)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),f):r(v):se(v)?ue(e,d,"whitespace")(v):(a+=1,s&&(s=!1,i+=1),v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),h(v)))}function h(v){return v===null||v===124||fe(v)?(e.exit("data"),d(v)):(e.consume(v),v===92?p:h)}function p(v){return v===92||v===124?(e.consume(v),h):h(v)}function f(v){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(v):(e.enter("tableDelimiterRow"),s=!1,se(v)?ue(e,g,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):g(v))}function g(v){return v===45||v===58?y(v):v===124?(s=!0,e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),N):D(v)}function N(v){return se(v)?ue(e,y,"whitespace")(v):y(v)}function y(v){return v===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),A):v===45?(a+=1,A(v)):v===null||K(v)?R(v):D(v)}function A(v){return v===45?(e.enter("tableDelimiterFiller"),C(v)):D(v)}function C(v){return v===45?(e.consume(v),C):v===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(v))}function k(v){return se(v)?ue(e,R,"whitespace")(v):R(v)}function R(v){return v===124?g(v):v===null||K(v)?!s||i!==a?D(v):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(v)):D(v)}function D(v){return r(v)}function I(v){return e.enter("tableRow"),U(v)}function U(v){return v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),U):v===null||K(v)?(e.exit("tableRow"),t(v)):se(v)?ue(e,U,"whitespace")(v):(e.enter("data"),$(v))}function $(v){return v===null||v===124||fe(v)?(e.exit("data"),U(v)):(e.consume(v),v===92?V:$)}function V(v){return v===92||v===124?(e.consume(v),$):$(v)}}function tb(e,t){let r=-1,n=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],l=!1,o=0,u,d,h;const p=new KT;for(;++r<e.length;){const f=e[r],g=f[1];f[0]==="enter"?g.type==="tableHead"?(l=!1,o!==0&&(ms(p,t,o,u,d),d=void 0,o=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(r,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(n=!0,h=void 0,a=[0,0,0,0],s=[0,r+1,0,0],l&&(l=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(r,0,[["enter",d,t]])),i=g.type==="tableDelimiterRow"?2:d?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(n=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],h=Wr(p,t,a,i,void 0,h),a=[0,0,0,0]),s[2]=r)):g.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(s[0]=s[1],h=Wr(p,t,a,i,void 0,h)),a=s,s=[a[1],r,0,0])):g.type==="tableHead"?(l=!0,o=r):g.type==="tableRow"||g.type==="tableDelimiterRow"?(o=r,a[1]!==0?(s[0]=s[1],h=Wr(p,t,a,i,r,h)):s[1]!==0&&(h=Wr(p,t,s,i,r,h)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(s[3]=r)}for(o!==0&&ms(p,t,o,u,d),p.consume(t.events),r=-1;++r<t.events.length;){const f=t.events[r];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=ZT(t.events,r))}return e}function Wr(e,t,r,n,i,a){const s=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",l="tableContent";r[0]!==0&&(a.end=Object.assign({},zt(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const o=zt(t.events,r[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const u=zt(t.events,r[2]),d=zt(t.events,r[3]),h={type:l,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(r[2],0,[["enter",h,t]]),n!==2){const p=t.events[r[2]],f=t.events[r[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){const g=r[2]+1,N=r[3]-r[2]-1;e.add(g,N,[])}}e.add(r[3]+1,0,[["exit",h,t]])}return i!==void 0&&(a.end=Object.assign({},zt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function ms(e,t,r,n,i){const a=[],s=zt(t.events,r);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),n.end=Object.assign({},s),a.push(["exit",n,t]),e.add(r+1,0,a)}function zt(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}var rb={name:"tasklistCheck",tokenize:ib};function nb(){return{text:{91:rb}}}function ib(e,t,r){const n=this;return i;function i(o){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return fe(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):r(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):r(o)}function l(o){return K(o)?t(o):se(o)?e.check({tokenize:ab},t,r)(o):r(o)}}function ab(e,t,r){return ue(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function sb(e){return Jo([gE(),jT(),QT(e),JT(),nb()])}var lb={};function ob(e){const t=this,r=e||lb,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(sb(r)),a.push(uE()),s.push(hE(r))}var cb=Object.defineProperty,ub=Object.defineProperties,hb=Object.getOwnPropertyDescriptors,gs=Object.getOwnPropertySymbols,db=Object.prototype.hasOwnProperty,fb=Object.prototype.propertyIsEnumerable,Es=(e,t,r)=>t in e?cb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mc=(e,t)=>{for(var r in t||(t={}))db.call(t,r)&&Es(e,r,t[r]);if(gs)for(var r of gs(t))fb.call(t,r)&&Es(e,r,t[r]);return e},gc=(e,t)=>ub(e,hb(t)),ge={PROSE:0,FENCE_MARKER:1,FENCE_INFO:2,FENCE_BODY:3,CODE_SPAN:4,CODE_SPAN_OPEN:5},pb=/^(`{3,}|~{3,})(.*)$/,mb=e=>e!==void 0&&e>="0"&&e<="9",gb=(e,t)=>{let r=t;if(e[r]==="-"||e[r]==="*"||e[r]==="+")r+=1;else{for(;mb(e[r])&&r-t<9;)r+=1;if(r===t||e[r]!=="."&&e[r]!==")")return-1;r+=1}return e[r]===" "?r+1:-1},Eb=(e,t,r)=>{let n=0,i=t,a=!1,s=t;for(;;){for(;s<r&&e[s]===" ";)s+=1;if(e[s]===">"){n+=1,s+=e[s+1]===" "?2:1,i=s,a=!1;continue}let l=s<r?gb(e,s):-1;if(l===-1)return{contentStart:s,listIndent:a?s-i:0,quoteDepth:n};s=l,a=!0}},Tb=(e,t,r,n)=>{let i=t;for(let a=0;a<n;a+=1){for(;i<r&&e[i]===" ";)i+=1;if(e[i]!==">")return-1;i+=1,e[i]===" "&&(i+=1)}return i},bb=(e,t,r,n,i)=>{let a=t+n;e.fill(ge.FENCE_MARKER,a,a+i),e.fill(ge.FENCE_INFO,a+i,Math.min(r+1,e.length))},kb=(e,t,r,n)=>{let i=t;for(;i<r&&e[i]===" ";)i+=1;let a=0;for(;i<r&&e[i]===n.char;)i+=1,a+=1;if(a<n.length)return!1;for(;i<r;){if(e[i]!==" "&&e[i]!==" "&&e[i]!=="\r")return!1;i+=1}return!0},xb=(e,t,r,n)=>{let i=n>r&&e[n-1]==="\r"?n-1:n,a=Eb(e,r,i),s=e.slice(a.contentStart,i).match(pb);if(!s)return null;let[,l,o]=s,u=l[0];return u==="`"&&o.includes("`")?null:(bb(t,r,n,a.contentStart-r,l.length),{char:u,length:l.length,listIndent:a.listIndent,quoteDepth:a.quoteDepth})},Ab=(e,t,r,n)=>{let i=Tb(e,t,r,n.quoteDepth);if(i===-1||n.listIndent===0)return i;let a=i;for(;a<r&&e[a]===" ";)a+=1;return a===r||e[a]==="\r"&&a+1===r||a-i>=n.listIndent?i:-1},_b=(e,t)=>{let r=e.length,n=null,i=0;for(;i<r;){let a=e.indexOf(`
|
|
19
|
+
`,i);a===-1&&(a=r);let s=n?Ab(e,i,a,n):-1;n&&s===-1&&(n=null),n?kb(e,s,a,n)?(t.fill(ge.FENCE_MARKER,i,a),n=null):t.fill(ge.FENCE_BODY,i,Math.min(a+1,r)):n=xb(e,t,i,a),i=a+1}return n},Ts=(e,t)=>{let r=t+1;for(;r<e.length&&e[r]==="`";)r+=1;return r},yb=(e,t)=>{let r=t+1;for(;r<e.length&&(e[r]===" "||e[r]===" "||e[r]==="\r");)r+=1;return r<e.length&&e[r]===`
|
|
20
|
+
`},Cb=(e,t,r)=>{let n=r;for(;;){let i=e.indexOf("`",n);if(i===-1)return-1;let a=i>n&&e[i-1]==="\\"&&t[i-1]===ge.PROSE;if(t[i]===ge.PROSE&&!a)return i;n=i+1}},Sb=(e,t)=>{let r=e.length,n=-1,i=0,a=0;for(;a<r;){if(n<0){if(a=Cb(e,t,a),a===-1)break;let l=Ts(e,a);n=a,i=l-a,a=l;continue}if(t[a]!==ge.PROSE){t.fill(ge.CODE_SPAN_OPEN,n,a),n=-1,a+=1;continue}if(e[a]===`
|
|
21
|
+
`&&yb(e,a)){n=-1,a+=1;continue}if(e[a]!=="`"){a+=1;continue}let s=Ts(e,a);s-a===i&&(t.fill(ge.CODE_SPAN,n,s),n=-1),a=s}return n>=0?(t.fill(ge.CODE_SPAN_OPEN,n,r),{start:n,runLength:i}):null},Nb=e=>{let t=new Uint8Array(e.length);return{text:e,regions:t,openFence:_b(e,t),openSpan:Sb(e,t),mathMask:null,linkUrlMask:null,htmlTagMask:null}},ki=null,nn=null,Qe=e=>{if(nn!==null&&e===ki)return nn;let t=Nb(e);return ki=e,nn=t,t},vb=()=>{ki=null,nn=null},Ib=(e,t)=>t>=e.regions.length?e.openFence!==null||e.openSpan!==null:t<0?!1:e.regions[t]!==ge.PROSE,wb=(e,t)=>e.regions[t]===ge.CODE_SPAN,Zi=(e,t)=>{let r=Qe(e),n=t+t,i=0;for(let a=e.indexOf(n);a!==-1;a=e.indexOf(n,a))r.regions[a]===ge.PROSE?(i+=1,a+=2):a+=1;return i},Ji=new Uint8Array(0),Lb=e=>e==="inlineLatex"||e==="blockLatex",Rb=(e,t)=>t==="["&&e==="none"?"blockLatex":t==="]"&&e==="blockLatex"?"none":t==="("&&e==="none"?"inlineLatex":t===")"&&e==="inlineLatex"?"none":null,Ob=(e,t)=>t?e==="blockDollar"?"none":"blockDollar":e==="blockDollar"?e:e==="inlineDollar"?"none":"inlineDollar",Db=e=>e.includes("$")||e.includes("\\(")||e.includes("\\["),Pb=(e,t,r)=>{let n=e[t+1];if(e[t]==="\\"){if(n==="$")return{context:r,length:2};let i=Rb(r,n);return i===null?null:{context:i,length:2}}if(e[t]==="$"&&!Lb(r)){let i=n==="$";return{context:Ob(r,i),length:i?2:1}}return null},Mb=e=>{let{text:t,regions:r}=e,n=t.length,i=new Uint8Array(n),a="none",s=0;for(;s<n;){i[s]=a==="none"?0:1;let l=r[s]===ge.PROSE?Pb(t,s,a):null;if(l===null){s+=1;continue}a=l.context,l.length===2&&(i[s+1]=a==="none"?0:1),s+=l.length}return i},rr=(e,t)=>t<0||t>=e.text.length?!1:(e.mathMask===null&&(e.mathMask=Db(e.text)?Mb(e):Ji),e.mathMask[t]===1),Bb=(e,t,r,n)=>{let{text:i,regions:a}=e,s=new Uint8Array(r-t),l=0;for(let u=r-1;u>=t;u-=1)i[u]===")"&&a[u]===ge.PROSE&&(l=1),s[u-t]=l;let o=!1;for(let u=t;u<r;u+=1)o&&s[u-t]===1&&(n[u]=1),a[u]===ge.PROSE&&(i[u]===")"?o=!1:i[u]==="("&&(o=u>0&&i[u-1]==="]"))},Fb=e=>{let{text:t}=e,r=t.length,n=new Uint8Array(r),i=0;for(;i<r;){let a=t.indexOf(`
|
|
22
|
+
`,i);a===-1&&(a=r),Bb(e,i,a,n),i=a+1}return n},ea=(e,t)=>t<0||t>=e.text.length?!1:(e.linkUrlMask===null&&(e.linkUrlMask=e.text.includes("](")?Fb(e):Ji),e.linkUrlMask[t]===1),Hb=e=>{let{text:t,regions:r}=e,n=t.length,i=new Uint8Array(n),a=!1;for(let s=0;s<n;s+=1){if(t[s]===`
|
|
23
|
+
`){a=!1;continue}if(i[s]=a?1:0,r[s]===ge.PROSE){if(t[s]===">")a=!1;else if(t[s]==="<"){let l=t[s+1];a=l!==void 0&&(l>="a"&&l<="z"||l>="A"&&l<="Z"||l==="/")}}}return i},Ec=(e,t)=>t<0||t>=e.text.length?!1:(e.htmlTagMask===null&&(e.htmlTagMask=e.text.includes("<")?Hb(e):Ji),e.htmlTagMask[t]===1),Oe=(e,t)=>Ib(Qe(e),t),bt=(e,t)=>wb(Qe(e),t),Ub=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,jb=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(Ub,(t,r,n,i)=>Oe(e,i)?t:`${r}\\>${n}`),kt=(e,{delimiter:t,markerLength:r,regex:n})=>{let i=e.lastIndexOf(t,e.length-2),a=i===-1?e.length-1:i;return e.slice(Math.max(0,a-r+1)).match(n)},zb={delimiter:"*",markerLength:2,regex:/(\*\*)([^*]*\*?)$/},$b={delimiter:"_",markerLength:2,regex:/(__)([^_]*?)$/},Yb={delimiter:"*",markerLength:3,regex:/(\*\*\*)([^*]*?)$/},qb={delimiter:"*",markerLength:1,regex:/(\*)([^*]*?)$/},Vb={delimiter:"_",markerLength:1,regex:/(_)([^_]*?)$/},Wb={delimiter:"~",markerLength:2,regex:/(~~)([^~]*?)$/},Gb={delimiter:"_",markerLength:2,regex:/(__)([^_]+)_$/},Qb={delimiter:"~",markerLength:2,regex:/(~~)([^~]+)~$/},Pt=/^[\s_~*`]*$/,Tc=/^[\s]*[-*+][\s]+$/,Kb=/[\p{L}\p{N}_]/u,Xb=/^\*{4,}$/,Ze=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:Kb.test(e)},Zb=(e,t)=>{let r=1;for(let n=t-1;n>=0;n-=1)if(e[n]==="]")r+=1;else if(e[n]==="["&&(r-=1,r===0))return n;return-1},bc=(e,t)=>{let r=1;for(let n=t+1;n<e.length;n+=1)if(e[n]==="[")r+=1;else if(e[n]==="]"&&(r-=1,r===0))return n;return-1},Jb=(e,t)=>rr(Qe(e),t),wn=(e,t,r)=>{let n=0;for(let o=t-1;o>=0;o-=1)if(e[o]===`
|
|
24
|
+
`){n=o+1;break}let i=e.length;for(let o=t;o<e.length;o+=1)if(e[o]===`
|
|
25
|
+
`){i=o;break}let a=e.substring(n,i),s=0,l=!1;for(let o of a)if(o===r)s+=1;else if(o!==" "&&o!==" "){l=!0;break}return s>=3&&!l},ek=(e,t,r,n)=>r==="\\"||rr(e,t)?!0:r!=="*"&&n==="*"?(t<e.text.length-2?e.text[t+2]:"")!=="*":r==="*"||(!r||r===" "||r===" "||r===`
|
|
26
|
+
`)&&(!n||n===" "||n===" "||n===`
|
|
27
|
+
`),hn=e=>e===" "||e===" "||e===`
|
|
28
|
+
`,tk=(e,t)=>!!(e&&t&&Ze(e)&&Ze(t)),rk=(e,t,r,n)=>{let i=tk(e,t),a=!!t&&!hn(t),s=!!e&&!hn(e);return i&&r%2===0&&!n?{count:!1}:s&&r%2===1||a?{count:!0,inWordAsteriskChain:i}:{count:!1}},kc=e=>{let t=Qe(e),r=0,n=!1,i=e.length;for(let a=0;a<i;a+=1){if(e[a]!=="*"||t.regions[a]!==ge.PROSE){Ze(e[a])||(n=!1);continue}let s=a>0?e[a-1]:"",l=a<i-1?e[a+1]:"";if(ek(t,a,s,l))continue;let o=rk(s,l,r,n);o.count&&(r+=1,n=o.inWordAsteriskChain)}return r},nk=(e,t,r,n)=>!!(r==="\\"||rr(e,t)||ea(e,t)||Ec(e,t)||r==="_"||n==="_"||r&&n&&Ze(r)&&Ze(n)),ik=e=>{let t=Qe(e),r=0,n=e.length;for(let i=0;i<n;i+=1){if(e[i]!=="_"||t.regions[i]!==ge.PROSE)continue;let a=i>0?e[i-1]:"",s=i<n-1?e[i+1]:"";nk(t,i,a,s)||(r+=1)}return r},ak=e=>{let t=Qe(e),r=0,n=0;for(let i=0;i<e.length;i+=1)e[i]==="*"&&t.regions[i]===ge.PROSE?n+=1:(n>=3&&(r+=Math.floor(n/3)),n=0);return n>=3&&(r+=Math.floor(n/3)),r},ta=e=>Zi(e,"*"),bs=e=>e===""||e===" "||e===" "||e===`
|
|
29
|
+
`,sk=(e,t,r,n,i)=>{if(!(bs(r)&&bs(n)))return!1;if(t>i.lineEnd){let a=e.indexOf(`
|
|
30
|
+
`,t);i.lineEnd=a===-1?e.length:a,i.result=wn(e,t,"_")}return i.result},lk=(e,t,r,n)=>{let i=e.text,a=t,s=!1;a>0&&i[a-1]==="\\"&&(a+=1,s=!0);let l=r-a;if(l<2)return!1;let o=a>0?i[a-1]:"",u=s?"\\":o,d=r<i.length?i[r]:"";return Ze(u)&&Ze(d)||sk(i,a,u,d,n)||rr(e,a)||ea(e,a)||Ec(e,a)?!1:Math.floor(l/2)%2===1},ks=e=>{let t=Qe(e),r=e.length,n={lineEnd:-1,result:!1},i=!1,a=0;for(;a<r;){if(e[a]!=="_"||t.regions[a]!==ge.PROSE){a+=1;continue}let s=a,l=a+1;for(;l<r&&e[l]==="_"&&t.regions[l]===ge.PROSE;)l+=1;a=l,lk(t,s,l,n)&&(i=!i)}return i},ok=(e,t,r)=>{if(!t||Pt.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
|
|
31
|
+
`),i=n===-1?0:n+1,a=e.substring(i,r);return Tc.test(a)&&t.includes(`
|
|
32
|
+
`)?!0:wn(e,r,"*")},ck=e=>{let t=kt(e,zb);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return Oe(e,n)||bt(e,n)||ok(e,r,n)?e:ta(e)%2===1?r.endsWith("*")?`${e}*`:`${e}**`:e},uk=(e,t,r)=>{if(!t||Pt.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
|
|
33
|
+
`),i=n===-1?0:n+1,a=e.substring(i,r);return Tc.test(a)&&t.includes(`
|
|
34
|
+
`)?!0:wn(e,r,"_")},hk=e=>{let t=kt(e,$b);if(!t){let i=kt(e,Gb);if(i){let a=e.lastIndexOf(i[1]);if(!(Oe(e,a)||bt(e,a))&&ks(e))return`${e}_`}return e}let r=t[2],n=e.lastIndexOf(t[1]);return Oe(e,n)||bt(e,n)||uk(e,r,n)?e:ks(e)?`${e}__`:e},dk=(e,t)=>{let{text:r}=e;return r[t]==="*"&&e.regions[t]===ge.PROSE&&r[t-1]!=="*"&&r[t+1]!=="*"&&r[t-1]!=="\\"&&!rr(e,t)},fk=e=>{let t=Qe(e);for(let r=e.indexOf("*");r!==-1;r=e.indexOf("*",r+1)){if(!dk(t,r))continue;let n=r>0?e[r-1]:"",i=r<e.length-1?e[r+1]:"",a=!n||hn(n),s=!i||hn(i);if(!(a&&s)&&!(n&&i&&Ze(n)&&Ze(i))&&!s)return r}return-1},pk=e=>{if(!kt(e,qb))return e;let t=fk(e);if(t===-1||Oe(e,t)||bt(e,t))return e;let r=e.substring(t+1);return!r||Pt.test(r)?e:kc(e)%2===1?`${e}*`:e},xc=e=>{let t=Qe(e);for(let r=e.indexOf("_");r!==-1;r=e.indexOf("_",r+1))if(t.regions[r]===ge.PROSE&&e[r-1]!=="_"&&e[r+1]!=="_"&&e[r-1]!=="\\"&&!rr(t,r)&&!ea(t,r)){let n=r>0?e[r-1]:"",i=r<e.length-1?e[r+1]:"";if(n&&i&&Ze(n)&&Ze(i))continue;return r}return-1},mk=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
35
|
+
`;)t-=1;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},gk=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(ta(t)%2!==1)return null;let r=t.indexOf("**"),n=xc(t);return r!==-1&&n!==-1&&r<n?`${t}_**`:null},Ek=e=>{if(!kt(e,Vb))return e;let t=xc(e);if(t===-1)return e;let r=e.substring(t+1);if(!r||Pt.test(r)||Oe(e,t)||bt(e,t))return e;if(ik(e)%2===1){let n=gk(e);return n!==null?n:mk(e)}return e},Tk=e=>{let t=ta(e),r=kc(e);return t%2===0&&r%2===0},bk=(e,t,r)=>!t||Pt.test(t)||Oe(e,r)||bt(e,r)?!0:wn(e,r,"*"),kk=e=>{if(Xb.test(e))return e;let t=kt(e,Yb);if(!t)return e;let r=t[2];return bk(e,r,e.lastIndexOf(t[1]))?e:ak(e)%2===1?Tk(e)?e:`${e}***`:e},xk=/<[a-zA-Z/][^>]*$/,Ak=/[a-zA-Z/]/,_k=e=>e.includes("$")||e.includes("\\(")||e.includes("\\["),yk=(e,t)=>{let r=e[t+1];return r!==void 0&&Ak.test(r)},Ck=e=>{let t=e.match(xk);if(!t||t.index===void 0)return e;let r=_k(e);for(let n=t.index;n<e.length;n+=1)if(!(e[n]!=="<"||!yk(e,n))&&!Oe(e,n)&&!(r&&Jb(e,n)))return e.substring(0,n).trimEnd();return e},Sk=e=>{let t=Qe(e);if(t.openFence)return e;let r=t.openSpan;if(!r)return e;let n=e.slice(r.start+r.runLength);if(!n||Pt.test(n))return e;let i=0,a=e.length-1;for(;a>=0&&e[a]==="`";)i+=1,a-=1;return i>=r.runLength?e:e+"`".repeat(r.runLength-i)},Nk=e=>Zi(e,"$"),vk=e=>{let t=Qe(e),r=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"){n+=1;continue}t.regions[n]===ge.PROSE&&e[n]==="$"&&(n+1<e.length&&e[n+1]==="$"?n+=1:r+=1)}return r},Ik=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
36
|
+
`,t)!==-1&&!e.endsWith(`
|
|
37
|
+
`)?`${e}
|
|
38
|
+
$$`:`${e}$$`},wk=e=>Nk(e)%2===0?e:Ik(e),Lk=e=>vk(e)%2===1?`${e}$`:e,xi="streamdown:incomplete-image",Rk=(e,t,r)=>{if(e.substring(t+2).includes(")"))return null;let n=Zb(e,t);if(n===-1||Oe(e,n))return null;let i=n>0&&e[n-1]==="!",a=i?n-1:n,s=e.substring(0,a),l=e.substring(n+1,t);return i?`${s}`:r==="text-only"?`${s}${l}`:`${s}[${l}](streamdown:incomplete-link)`},xs=(e,t)=>{for(let r=0;r<t;r++)if(e[r]==="["&&!Oe(e,r)){if(r>0&&e[r-1]==="!")continue;let n=bc(e,r);if(n===-1)return r;if(n+1<e.length&&e[n+1]==="("){let i=e.indexOf(")",n+2);i!==-1&&(r=i)}}return t},Ok=(e,t,r)=>{let n=t>0&&e[t-1]==="!",i=n?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,i);if(n)return`${a}`;if(r==="text-only"){let s=xs(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}if(bc(e,t)===-1){let a=e.substring(0,i);if(n)return`${a}`;if(r==="text-only"){let s=xs(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}return null},Dk=(e,t)=>{let r=e.lastIndexOf("](");if(r!==-1&&!Oe(e,r)){let n=Rk(e,r,t);if(n!==null)return n}for(let n=e.lastIndexOf("[");n!==-1;n=n===0?-1:e.lastIndexOf("[",n-1))if(!Oe(e,n)){let i=Ok(e,n,t);if(i!==null)return i}return e},Pk=32,Ac=(e,t="protocol")=>{let r=e;for(let n=0;n<Pk;n+=1){let i=Dk(r,t);if(i.length>=r.length)return i;r=i}return r},Mk=/^-{1,2}$/,Bk=/^[\s]*-{1,2}[\s]+$/,Fk=/^={1,2}$/,Hk=/^[\s]*={1,2}[\s]+$/,Uk=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
39
|
+
`);if(t===-1)return e;let r=e.substring(t+1),n=e.substring(0,t),i=r.trim();if(Mk.test(i)&&!r.match(Bk)){let a=n.split(`
|
|
40
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}if(Fk.test(i)&&!r.match(Hk)){let a=n.split(`
|
|
41
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}return e},jk=/([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu,zk=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(jk,(t,r,n)=>Oe(e,n+r.length)?t:`${r}\\~`),As=e=>Zi(e,"~"),$k=e=>{let t=kt(e,Wb);if(t){let r=t[2];if(!r||Pt.test(r))return e;let n=e.lastIndexOf(t[1]);if(Oe(e,n)||bt(e,n))return e;if(As(e)%2===1)return`${e}~~`}else{let r=kt(e,Qb);if(r){let n=e.lastIndexOf(r[0].slice(0,2));if(Oe(e,n)||bt(e,n))return e;if(As(e)%2===1)return`${e}~`}}return e},Gn=e=>e!==!1,Yk=e=>e===!0,Le={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},qk=[{handler:{name:"singleTilde",handle:zk,priority:Le.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:jb,priority:Le.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:Ck,priority:Le.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:Uk,priority:Le.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Ac,priority:Le.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")||e.endsWith("](streamdown:incomplete-image)")},{handler:{name:"boldItalic",handle:kk,priority:Le.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:ck,priority:Le.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:hk,priority:Le.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:pk,priority:Le.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:Ek,priority:Le.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:Sk,priority:Le.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:$k,priority:Le.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:wk,priority:Le.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:Lk,priority:Le.INLINE_KATEX},optionKey:"inlineKatex"}],Vk=e=>{var t;let r=(t=e?.linkMode)!=null?t:"protocol";return qk.filter(({handler:n,optionKey:i})=>n.name==="links"?Gn(e?.links)||Gn(e?.images):n.name==="inlineKatex"?Yk(e?.inlineKatex):Gn(e?.[i])).map(({handler:n,earlyReturn:i})=>n.name==="links"?{handler:gc(mc({},n),{handle:a=>Ac(a,r)}),earlyReturn:r==="protocol"?i:void 0}:{handler:n,earlyReturn:i})},Wk=(e,t)=>{var r;if(!e||typeof e!="string")return e;let n=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=Vk(t),a=((r=t?.handlers)!=null?r:[]).map(l=>{var o;return{handler:gc(mc({},l),{priority:(o=l.priority)!=null?o:Le.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((l,o)=>{var u,d;return((u=l.handler.priority)!=null?u:0)-((d=o.handler.priority)!=null?d:0)});try{for(let{handler:l,earlyReturn:o}of s)if(n=l.handle(n),o!=null&&o(n))return n;return n.endsWith(" ")&&!n.endsWith(" ")?n.slice(0,-1):n}finally{vb()}},Gk=Wk,Qk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Kk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xk={};function _s(e,t){return((t||Xk).jsx?Kk:Qk).test(e)}var Zk=/[ \t\n\f\r]/g;function Jk(e){return typeof e=="object"?e.type==="text"?ys(e.value):!1:ys(e)}function ys(e){return e.replace(Zk,"")===""}var e0=Lr(((e,t)=>{var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
|
|
42
|
+
`,h="/",p="*",f="",g="comment",N="declaration";function y(C,k){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];k=k||{};var R=1,D=1;function I(q){var P=q.match(n);P&&(R+=P.length);var W=q.lastIndexOf(d);D=~W?q.length-W:D+q.length}function U(){var q={line:R,column:D};return function(P){return P.position=new $(q),F(),P}}function $(q){this.start=q,this.end={line:R,column:D},this.source=k.source}$.prototype.content=C;function V(q){var P=new Error(k.source+":"+R+":"+D+": "+q);if(P.reason=q,P.filename=k.source,P.line=R,P.column=D,P.source=C,!k.silent)throw P}function v(q){var P=q.exec(C);if(P){var W=P[0];return I(W),C=C.slice(W.length),P}}function F(){v(i)}function z(q){var P;for(q=q||[];P=Y();)P!==!1&&q.push(P);return q}function Y(){var q=U();if(!(h!=C.charAt(0)||p!=C.charAt(1))){for(var P=2;f!=C.charAt(P)&&(p!=C.charAt(P)||h!=C.charAt(P+1));)++P;if(P+=2,f===C.charAt(P-1))return V("End of comment missing");var W=C.slice(2,P-2);return D+=2,I(W),C=C.slice(P),D+=2,q({type:g,comment:W})}}function te(){var q=U(),P=v(a);if(P){if(Y(),!v(s))return V("property missing ':'");var W=v(l),J=q({type:N,property:A(P[0].replace(r,f)),value:W?A(W[0].replace(r,f)):f});return v(o),J}}function Q(){var q=[];z(q);for(var P;P=te();)P!==!1&&(q.push(P),z(q));return q}return F(),Q()}function A(C){return C?C.replace(u,f):f}t.exports=y})),t0=Lr(((e,t,r)=>{var n=r&&r.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=n(e0());function a(s,l){let o=null;if(!s||typeof s!="string")return o;const u=(0,i.default)(s),d=typeof l=="function";return u.forEach(h=>{if(h.type!=="declaration")return;const{property:p,value:f}=h;d?l(p,f,h):f&&(o=o||{},o[p]=f)}),o}})),r0=Lr((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(d){return!d||n.test(d)||t.test(d)},l=function(d,h){return h.toUpperCase()},o=function(d,h){return"".concat(h,"-")},u=function(d,h){return h===void 0&&(h={}),s(d)?d:(d=d.toLowerCase(),h.reactCompat?d=d.replace(a,o):d=d.replace(i,o),d.replace(r,l))};e.camelCase=u})),n0=Lr(((e,t,r)=>{var n=(r&&r.__importDefault||function(s){return s&&s.__esModule?s:{default:s}})(t0()),i=r0();function a(s,l){var o={};return!s||typeof s!="string"||(0,n.default)(s,function(u,d){u&&d&&(o[(0,i.camelCase)(u,l)]=d)}),o}a.default=a,t.exports=a}));function Cr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Cs(e.position):"start"in e||"end"in e?Cs(e):"line"in e||"column"in e?Ai(e):""}function Ai(e){return Ss(e&&e.line)+":"+Ss(e&&e.column)}function Cs(e){return Ai(e&&e.start)+"-"+Ai(e&&e.end)}function Ss(e){return e&&typeof e=="number"?e:1}var Ie=class extends Error{constructor(e,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let n="",i={},a=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof e=="string"?n=e:!i.cause&&e&&(a=!0,n=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=n,this.line=s?s.line:void 0,this.name=Cr(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ie.prototype.file="";Ie.prototype.name="";Ie.prototype.reason="";Ie.prototype.message="";Ie.prototype.stack="";Ie.prototype.column=void 0;Ie.prototype.line=void 0;Ie.prototype.ancestors=void 0;Ie.prototype.cause=void 0;Ie.prototype.fatal=void 0;Ie.prototype.place=void 0;Ie.prototype.ruleId=void 0;Ie.prototype.source=void 0;var i0=En(n0(),1),ra={}.hasOwnProperty,a0=new Map,s0=/[A-Z]/g,l0=new Set(["table","tbody","thead","tfoot","tr"]),o0=new Set(["td","th"]),_c="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function c0(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=E0(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=g0(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?xt:Or,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=yc(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function yc(e,t,r){if(t.type==="element")return u0(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return h0(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return f0(e,t,r);if(t.type==="mdxjsEsm")return d0(e,t);if(t.type==="root")return p0(e,t,r);if(t.type==="text")return m0(e,t)}function u0(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=xt,e.schema=i),e.ancestors.push(t);const a=Sc(e,t.tagName,!1),s=T0(e,t);let l=ia(e,t);return l0.has(t.tagName)&&(l=l.filter(function(o){return typeof o=="string"?!Jk(o):!0})),Cc(e,s,a,t),na(s,l),e.ancestors.pop(),e.schema=n,e.create(t,a,s,r)}function h0(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}wr(e,t.position)}function d0(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wr(e,t.position)}function f0(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=xt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Sc(e,t.name,!0),s=b0(e,t),l=ia(e,t);return Cc(e,s,a,t),na(s,l),e.ancestors.pop(),e.schema=n,e.create(t,a,s,r)}function p0(e,t,r){const n={};return na(n,ia(e,t)),e.create(t,e.Fragment,n,r)}function m0(e,t){return t.value}function Cc(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function na(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function g0(e,t,r){return n;function n(i,a,s,l){const o=Array.isArray(s.children)?r:t;return l?o(a,s,l):o(a,s)}}function E0(e,t){return r;function r(n,i,a,s){const l=Array.isArray(a.children),o=it(n);return t(i,a,s,l,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function T0(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&ra.call(t.properties,i)){const a=k0(e,i,t.properties[i]);if(a){const[s,l]=a;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&o0.has(t.tagName)?n=l:r[s]=l}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function b0(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else wr(e,t.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const s=n.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else wr(e,t.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function ia(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:a0;for(;++n<t.children.length;){const a=t.children[n];let s;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const u=i.get(o)||0;s=o+"-"+u,i.set(o,u+1)}}const l=yc(e,a,s);l!==void 0&&r.push(l)}return r}function k0(e,t,r){const n=An(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?ql(r):Vl(r)),n.property==="style"){let i=typeof r=="object"?r:x0(e,String(r));return e.stylePropertyNameCase==="css"&&(i=A0(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&n.space?nd[n.property]||n.property:n.attribute,r]}}function x0(e,t){try{return(0,i0.default)(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,i=new Ie("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=_c+"#cannot-parse-style-attribute",i}}function Sc(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const l=_s(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}n=s}else n=_s(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return ra.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);wr(e)}function wr(e,t){const r=new Ie("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=_c+"#cannot-handle-mdx-estrees-without-createevaluater",r}function A0(e){const t={};let r;for(r in e)ra.call(e,r)&&(t[_0(r)]=e[r]);return t}function _0(e){let t=e.replace(s0,y0);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function y0(e){return"-"+e.toLowerCase()}var Qn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},C0={tokenize:S0};function S0(e){const t=e.attempt(this.parser.constructs.contentInitial,n,i);let r;return t;function n(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ue(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const o=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=o),r=o,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return K(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),s)}}var N0={tokenize:v0},Ns={tokenize:I0};function v0(e){const t=this,r=[];let n=0,i,a,s;return l;function l(k){if(n<r.length){const R=r[n];return t.containerState=R[1],e.attempt(R[0].continuation,o,u)(k)}return u(k)}function o(k){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&C();const R=t.events.length;let D=R,I;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){I=t.events[D][1].end;break}A(n);let U=R;for(;U<t.events.length;)t.events[U][1].end={...I},U++;return Ye(t.events,D+1,0,t.events.slice(R)),t.events.length=U,u(k)}return l(k)}function u(k){if(n===r.length){if(!i)return p(k);if(i.currentConstruct&&i.currentConstruct.concrete)return g(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ns,d,h)(k)}function d(k){return i&&C(),A(n),p(k)}function h(k){return t.parser.lazy[t.now().line]=n!==r.length,s=t.now().offset,g(k)}function p(k){return t.containerState={},e.attempt(Ns,f,g)(k)}function f(k){return n++,r.push([t.currentConstruct,t.containerState]),p(k)}function g(k){if(k===null){i&&C(),A(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),N(k)}function N(k){if(k===null){y(e.exit("chunkFlow"),!0),A(0),e.consume(k);return}return K(k)?(e.consume(k),y(e.exit("chunkFlow")),n=0,t.interrupt=void 0,l):(e.consume(k),N)}function y(k,R){const D=t.sliceStream(k);if(R&&D.push(null),k.previous=a,a&&(a.next=k),a=k,i.defineSkip(k.start),i.write(D),t.parser.lazy[k.start.line]){let I=i.events.length;for(;I--;)if(i.events[I][1].start.offset<s&&(!i.events[I][1].end||i.events[I][1].end.offset>s))return;const U=t.events.length;let $=U,V,v;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(V){v=t.events[$][1].end;break}V=!0}for(A(n),I=U;I<t.events.length;)t.events[I][1].end={...v},I++;Ye(t.events,$+1,0,t.events.slice(U)),t.events.length=I}}function A(k){let R=r.length;for(;R-- >k;){const D=r[R];t.containerState=D[1],D[0].exit.call(t,e)}r.length=k}function C(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function I0(e,t,r){return ue(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var w0={tokenize:L0};function L0(e){const t=this,r=e.attempt(Br,n,e.attempt(this.parser.constructs.flowInitial,i,ue(e,e.attempt(this.parser.constructs.flow,i,e.attempt(VE,i)),"linePrefix")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var R0={resolveAll:vc()},O0=Nc("string"),D0=Nc("text");function Nc(e){return{resolveAll:vc(e==="text"?P0:void 0),tokenize:t};function t(r){const n=this,i=this.parser.constructs[e],a=r.attempt(i,s,l);return s;function s(d){return u(d)?a(d):l(d)}function l(d){if(d===null){r.consume(d);return}return r.enter("data"),r.consume(d),o}function o(d){return u(d)?(r.exit("data"),a(d)):(r.consume(d),o)}function u(d){if(d===null)return!0;const h=i[d];let p=-1;if(h)for(;++p<h.length;){const f=h[p];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function vc(e){return t;function t(r,n){let i=-1,a;for(;++i<=r.length;)a===void 0?r[i]&&r[i][1].type==="data"&&(a=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==a+2&&(r[a][1].end=r[i-1][1].end,r.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(r,n):r}}function P0(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],i=t.sliceStream(n);let a=i.length,s=-1,l=0,o;for(;a--;){const u=i[a];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(u===-2)o=!0,l++;else if(u!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(l=0),l){const u={type:r===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:n.start._bufferIndex+s,_index:n.start._index+a,line:n.end.line,column:n.end.column-l,offset:n.end.offset-l},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):(e.splice(r,0,["enter",u,t],["exit",u,t]),r+=2)}r++}return e}var M0=Fi({attentionMarkers:()=>Y0,contentInitial:()=>F0,disable:()=>q0,document:()=>B0,flow:()=>U0,flowInitial:()=>H0,insideSpan:()=>$0,string:()=>j0,text:()=>z0}),B0={42:Me,43:Me,45:Me,48:Me,49:Me,50:Me,51:Me,52:Me,53:Me,54:Me,55:Me,56:Me,57:Me,62:oc},F0={91:XE},H0={[-2]:Vn,[-1]:Vn,32:Vn},U0={35:nT,42:rn,45:[ps,rn],60:lT,61:ps,95:rn,96:ds,126:ds},j0={38:uc,92:cc},z0={[-5]:Wn,[-4]:Wn,[-3]:Wn,33:CT,38:uc,42:bi,60:[NE,pT],91:NT,92:[tT,cc],93:Xi,95:bi,96:UE},$0={null:[bi,R0]},Y0={null:[42,95]},q0={null:[]};function V0(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const i={},a=[];let s=[],l=[];const o={attempt:U(D),check:U(I),consume:C,enter:k,exit:R,interrupt:U(I,{interrupt:!0})},u={code:null,containerState:{},defineSkip:N,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:h};let d=t.tokenize.call(u,o);return t.resolveAll&&a.push(t),u;function h(F){return s=Ve(s,F),y(),s[s.length-1]!==null?[]:($(t,0),u.events=In(a,u.events,u),u.events)}function p(F,z){return G0(f(F),z)}function f(F){return W0(s,F)}function g(){const{_bufferIndex:F,_index:z,line:Y,column:te,offset:Q}=n;return{_bufferIndex:F,_index:z,line:Y,column:te,offset:Q}}function N(F){i[F.line]=F.column,v()}function y(){let F;for(;n._index<s.length;){const z=s[n._index];if(typeof z=="string")for(F=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===F&&n._bufferIndex<z.length;)A(z.charCodeAt(n._bufferIndex));else A(z)}}function A(F){d=d(F)}function C(F){K(F)?(n.line++,n.column=1,n.offset+=F===-3?2:1,v()):F!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++)),u.previous=F}function k(F,z){const Y=z||{};return Y.type=F,Y.start=g(),u.events.push(["enter",Y,u]),l.push(Y),Y}function R(F){const z=l.pop();return z.end=g(),u.events.push(["exit",z,u]),z}function D(F,z){$(F,z.from)}function I(F,z){z.restore()}function U(F,z){return Y;function Y(te,Q,q){let P,W,J,x;return Array.isArray(te)?pe(te):"tokenize"in te?pe([te]):he(te);function he(le){return De;function De(Fe){const X=Fe!==null&&le[Fe],ce=Fe!==null&&le.null;return pe([...Array.isArray(X)?X:X?[X]:[],...Array.isArray(ce)?ce:ce?[ce]:[]])(Fe)}}function pe(le){return P=le,W=0,le.length===0?q:S(le[W])}function S(le){return De;function De(Fe){return x=V(),J=le,le.partial||(u.currentConstruct=le),le.name&&u.parser.constructs.disable.null.includes(le.name)?Se(Fe):le.tokenize.call(z?Object.assign(Object.create(u),z):u,o,xe,Se)(Fe)}}function xe(le){return F(J,x),Q}function Se(le){return x.restore(),++W<P.length?S(P[W]):q}}}function $(F,z){F.resolveAll&&!a.includes(F)&&a.push(F),F.resolve&&Ye(u.events,z,u.events.length-z,F.resolve(u.events.slice(z),u)),F.resolveTo&&(u.events=F.resolveTo(u.events,u))}function V(){const F=g(),z=u.previous,Y=u.currentConstruct,te=u.events.length,Q=Array.from(l);return{from:te,restore:q};function q(){n=F,u.previous=z,u.currentConstruct=Y,u.events.length=te,l=Q,v()}}function v(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function W0(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(r===i)s=[e[r].slice(n,a)];else{if(s=e.slice(r,i),n>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(n):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function G0(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let s;if(typeof a=="string")s=a;else switch(a){case-5:s="\r";break;case-4:s=`
|
|
43
|
+
`;break;case-3:s=`\r
|
|
44
|
+
`;break;case-2:s=t?" ":" ";break;case-1:if(!t&&i)continue;s=" ";break;default:s=String.fromCharCode(a)}i=a===-2,n.push(s)}return n.join("")}function Q0(e){const t={constructs:Jo([M0,...(e||{}).extensions||[]]),content:r(C0),defined:[],document:r(N0),flow:r(w0),lazy:{},string:r(O0),text:r(D0)};return t;function r(n){return i;function i(a){return V0(t,n,a)}}}function K0(e){for(;!hc(e););return e}var vs=/[\0\t\n\r]/g;function X0(){let e=1,t="",r=!0,n;return i;function i(a,s,l){const o=[];let u,d,h,p,f;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),h=0,t="",r&&(a.charCodeAt(0)===65279&&h++,r=void 0);h<a.length;){if(vs.lastIndex=h,u=vs.exec(a),p=u&&u.index!==void 0?u.index:a.length,f=a.charCodeAt(p),!u){t=a.slice(h);break}if(f===10&&h===p&&n)o.push(-3),n=void 0;else switch(n&&(o.push(-5),n=void 0),h<p&&(o.push(a.slice(h,p)),e+=p-h),f){case 0:o.push(65533),e++;break;case 9:for(d=Math.ceil(e/4)*4,o.push(-2);e++<d;)o.push(-1);break;case 10:o.push(-4),e=1;break;default:n=!0,e=1}h=p+1}return l&&(n&&o.push(-5),t&&o.push(t),o.push(null)),o}}var Ic={}.hasOwnProperty;function Z0(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),J0(r)(K0(Q0(r).document().write(X0()(e,t,!0))))}function J0(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(lr),autolinkProtocol:V,autolinkEmail:V,atxHeading:a(ar),blockQuote:a(ce),characterEscape:V,characterReference:V,codeFenced:a(He),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(He,s),codeText:a(Ue,s),codeTextData:V,data:V,codeFlowValue:V,definition:a(Bt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(ir),hardBreakEscape:a($r),hardBreakTrailing:a($r),htmlFlow:a(sr,s),htmlFlowData:V,htmlText:a(sr,s),htmlTextData:V,image:a(Yr),label:s,link:a(lr),listItem:a(On),listItemValue:p,listOrdered:a(ht,h),listUnordered:a(ht),paragraph:a(Dn),reference:S,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(ar),strong:a(Pn),thematicBreak:a(Z)},exit:{atxHeading:o(),atxHeadingSequence:D,autolink:o(),autolinkEmail:X,autolinkProtocol:Fe,blockQuote:o(),characterEscapeValue:v,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:le,characterReference:De,codeFenced:o(y),codeFencedFence:N,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:v,codeIndented:o(A),codeText:o(Q),codeTextData:v,data:v,definition:o(),definitionDestinationString:R,definitionLabelString:C,definitionTitleString:k,emphasis:o(),hardBreakEscape:o(z),hardBreakTrailing:o(z),htmlFlow:o(Y),htmlFlowData:v,htmlText:o(te),htmlTextData:v,image:o(P),label:J,labelText:W,lineEnding:F,link:o(q),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:xe,resourceDestinationString:x,resourceTitleString:he,resource:pe,setextHeading:o($),setextHeadingLineSequence:U,setextHeadingText:I,strong:o(),thematicBreak:o()}};wc(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(L){let B={type:"root",children:[]};const G={stack:[B],tokenStack:[],config:t,enter:l,exit:u,buffer:s,resume:d,data:r},re=[];let oe=-1;for(;++oe<L.length;)(L[oe][1].type==="listOrdered"||L[oe][1].type==="listUnordered")&&(L[oe][0]==="enter"?re.push(oe):oe=i(L,re.pop(),oe));for(oe=-1;++oe<L.length;){const we=t[L[oe][0]];Ic.call(we,L[oe][1].type)&&we[L[oe][1].type].call(Object.assign({sliceSerialize:L[oe][2].sliceSerialize},G),L[oe][1])}if(G.tokenStack.length>0){const we=G.tokenStack[G.tokenStack.length-1];(we[1]||Is).call(G,void 0,we[0])}for(B.position={start:dt(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:dt(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},oe=-1;++oe<t.transforms.length;)B=t.transforms[oe](B)||B;return B}function i(L,B,G){let re=B-1,oe=-1,we=!1,Ft,lt,or,cr;for(;++re<=G;){const je=L[re];switch(je[1].type){case"listUnordered":case"listOrdered":case"blockQuote":je[0]==="enter"?oe++:oe--,cr=void 0;break;case"lineEndingBlank":je[0]==="enter"&&(Ft&&!cr&&!oe&&!or&&(or=re),cr=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:cr=void 0}if(!oe&&je[0]==="enter"&&je[1].type==="listItemPrefix"||oe===-1&&je[0]==="exit"&&(je[1].type==="listUnordered"||je[1].type==="listOrdered")){if(Ft){let Ht=re;for(lt=void 0;Ht--;){const ot=L[Ht];if(ot[1].type==="lineEnding"||ot[1].type==="lineEndingBlank"){if(ot[0]==="exit")continue;lt&&(L[lt][1].type="lineEndingBlank",we=!0),ot[1].type="lineEnding",lt=Ht}else if(!(ot[1].type==="linePrefix"||ot[1].type==="blockQuotePrefix"||ot[1].type==="blockQuotePrefixWhitespace"||ot[1].type==="blockQuoteMarker"||ot[1].type==="listItemIndent"))break}or&&(!lt||or<lt)&&(Ft._spread=!0),Ft.end=Object.assign({},lt?L[lt][1].start:je[1].end),L.splice(lt||re,0,["exit",Ft,je[2]]),re++,G++}if(je[1].type==="listItemPrefix"){const Ht={type:"listItem",_spread:!1,start:Object.assign({},je[1].start),end:void 0};Ft=Ht,L.splice(re,0,["enter",Ht,je[2]]),re++,G++,or=void 0,cr=!0}}}return L[B][1]._spread=we,G}function a(L,B){return G;function G(re){l.call(this,L(re),re),B&&B.call(this,re)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(L,B,G){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([B,G||void 0]),L.position={start:dt(B.start),end:void 0}}function o(L){return B;function B(G){L&&L.call(this,G),u.call(this,G)}}function u(L,B){const G=this.stack.pop(),re=this.tokenStack.pop();if(re)re[0].type!==L.type&&(B?B.call(this,L,re[0]):(re[1]||Is).call(this,L,re[0]));else throw new Error("Cannot close `"+L.type+"` ("+Cr({start:L.start,end:L.end})+"): it’s not open");G.position.end=dt(L.end)}function d(){return Wi(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(L){if(this.data.expectingFirstListItemValue){const B=this.stack[this.stack.length-2];B.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function f(){const L=this.resume(),B=this.stack[this.stack.length-1];B.lang=L}function g(){const L=this.resume(),B=this.stack[this.stack.length-1];B.meta=L}function N(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const L=this.resume(),B=this.stack[this.stack.length-1];B.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const L=this.resume(),B=this.stack[this.stack.length-1];B.value=L.replace(/(\r?\n|\r)$/g,"")}function C(L){const B=this.resume(),G=this.stack[this.stack.length-1];G.label=B,G.identifier=Xe(this.sliceSerialize(L)).toLowerCase()}function k(){const L=this.resume(),B=this.stack[this.stack.length-1];B.title=L}function R(){const L=this.resume(),B=this.stack[this.stack.length-1];B.url=L}function D(L){const B=this.stack[this.stack.length-1];B.depth||(B.depth=this.sliceSerialize(L).length)}function I(){this.data.setextHeadingSlurpLineEnding=!0}function U(L){const B=this.stack[this.stack.length-1];B.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function V(L){const B=this.stack[this.stack.length-1].children;let G=B[B.length-1];(!G||G.type!=="text")&&(G=Mn(),G.position={start:dt(L.start),end:void 0},B.push(G)),this.stack.push(G)}function v(L){const B=this.stack.pop();B.value+=this.sliceSerialize(L),B.position.end=dt(L.end)}function F(L){const B=this.stack[this.stack.length-1];if(this.data.atHardBreak){const G=B.children[B.children.length-1];G.position.end=dt(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(B.type)&&(V.call(this,L),v.call(this,L))}function z(){this.data.atHardBreak=!0}function Y(){const L=this.resume(),B=this.stack[this.stack.length-1];B.value=L}function te(){const L=this.resume(),B=this.stack[this.stack.length-1];B.value=L}function Q(){const L=this.resume(),B=this.stack[this.stack.length-1];B.value=L}function q(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=B,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function P(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const B=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=B,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function W(L){const B=this.sliceSerialize(L),G=this.stack[this.stack.length-2];G.label=Xg(B),G.identifier=Xe(B).toLowerCase()}function J(){const L=this.stack[this.stack.length-1],B=this.resume(),G=this.stack[this.stack.length-1];this.data.inReference=!0,G.type==="link"?G.children=L.children:G.alt=B}function x(){const L=this.resume(),B=this.stack[this.stack.length-1];B.url=L}function he(){const L=this.resume(),B=this.stack[this.stack.length-1];B.title=L}function pe(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function xe(L){const B=this.resume(),G=this.stack[this.stack.length-1];G.label=B,G.identifier=Xe(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function Se(L){this.data.characterReferenceType=L.type}function le(L){const B=this.sliceSerialize(L),G=this.data.characterReferenceType;let re;G?(re=Zo(B,G==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):re=Qi(B);const oe=this.stack[this.stack.length-1];oe.value+=re}function De(L){const B=this.stack.pop();B.position.end=dt(L.end)}function Fe(L){v.call(this,L);const B=this.stack[this.stack.length-1];B.url=this.sliceSerialize(L)}function X(L){v.call(this,L);const B=this.stack[this.stack.length-1];B.url="mailto:"+this.sliceSerialize(L)}function ce(){return{type:"blockquote",children:[]}}function He(){return{type:"code",lang:null,meta:null,value:""}}function Ue(){return{type:"inlineCode",value:""}}function Bt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ir(){return{type:"emphasis",children:[]}}function ar(){return{type:"heading",depth:0,children:[]}}function $r(){return{type:"break"}}function sr(){return{type:"html",value:""}}function Yr(){return{type:"image",title:null,url:"",alt:null}}function lr(){return{type:"link",title:null,url:"",children:[]}}function ht(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function On(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function Dn(){return{type:"paragraph",children:[]}}function Pn(){return{type:"strong",children:[]}}function Mn(){return{type:"text",value:""}}function Z(){return{type:"thematicBreak"}}}function dt(e){return{line:e.line,column:e.column,offset:e.offset}}function wc(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?wc(e,n):ex(e,n)}}function ex(e,t){let r;for(r in t)if(Ic.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function Is(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Cr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Cr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Cr({start:t.start,end:t.end})+") is still open")}function tx(e){const t=this;t.parser=r;function r(n){return Z0(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function rx(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function nx(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
45
|
+
`}]}function ix(e,t){const r=t.value?t.value+`
|
|
46
|
+
`:"",n={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function ax(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function sx(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lx(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=tr(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let s,l=e.footnoteCounts.get(n);l===void 0?(l=0,e.footnoteOrder.push(n),s=e.footnoteOrder.length):s=a+1,l+=1,e.footnoteCounts.set(n,l);const o={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const u={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,u),e.applyData(t,u)}function ox(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cx(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function Lc(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=n:i.push({type:"text",value:n}),i}function ux(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return Lc(e,t);const i={src:tr(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function hx(e,t){const r={src:tr(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function dx(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function fx(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return Lc(e,t);const i={href:tr(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function px(e,t){const r={href:tr(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mx(e,t,r){const n=e.all(t),i=r?gx(r):Rc(t),a={},s=[];if(typeof t.checked=="boolean"){const d=n[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},n.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<n.length;){const d=n[l];(i||l!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
|
|
47
|
+
`}),d.type==="element"&&d.tagName==="p"&&!i?s.push(...d.children):s.push(d)}const o=n[n.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&s.push({type:"text",value:`
|
|
48
|
+
`});const u={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,u),e.applyData(t,u)}function gx(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=Rc(r[n])}return t}function Rc(e){const t=e.spread;return t??e.children.length>1}function Ex(e,t){const r={},n=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i<n.length;){const s=n[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,a),e.applyData(t,a)}function Tx(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bx(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function kx(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function xx(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],s),i.push(s)}if(r.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},l=it(t.children[1]),o=Nn(t.children[t.children.length-1]);l&&o&&(s.position={start:l,end:o}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Ax(e,t,r){const n=r?r.children:void 0,i=(n?n.indexOf(t):1)===0?"th":"td",a=r&&r.type==="table"?r.align:void 0,s=a?a.length:t.children.length;let l=-1;const o=[];for(;++l<s;){const d=t.children[l],h={},p=a?a[l]:void 0;p&&(h.align=p);let f={type:"element",tagName:i,properties:h,children:[]};d&&(f.children=e.all(d),e.patch(d,f),f=e.applyData(d,f)),o.push(f)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(o,!0)};return e.patch(t,u),e.applyData(t,u)}function _x(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}var ws=9,Ls=32;function yx(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const a=[];for(;n;)a.push(Rs(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return a.push(Rs(t.slice(i),i>0,!1)),a.join("")}function Rs(e,t,r){let n=0,i=e.length;if(t){let a=e.codePointAt(n);for(;a===ws||a===Ls;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(i-1);for(;a===ws||a===Ls;)i--,a=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function Cx(e,t){const r={type:"text",value:yx(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function Sx(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}var Nx={blockquote:rx,break:nx,code:ix,delete:ax,emphasis:sx,footnoteReference:lx,heading:ox,html:cx,imageReference:ux,image:hx,inlineCode:dx,linkReference:fx,link:px,listItem:mx,list:Ex,paragraph:Tx,root:bx,strong:kx,table:xx,tableCell:_x,tableRow:Ax,text:Cx,thematicBreak:Sx,toml:Gr,yaml:Gr,definition:Gr,footnoteDefinition:Gr};function Gr(){}function vx(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function Ix(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function wx(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||vx,n=e.options.footnoteBackLabel||Ix,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let o=-1;for(;++o<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[o]);if(!u)continue;const d=e.all(u),h=String(u.identifier).toUpperCase(),p=tr(h.toLowerCase());let f=0;const g=[],N=e.footnoteCounts.get(h);for(;N!==void 0&&++f<=N;){g.length>0&&g.push({type:"text",value:" "});let C=typeof r=="string"?r:r(o,f);typeof C=="string"&&(C={type:"text",value:C}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(o,f),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const y=d[d.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const C=y.children[y.children.length-1];C&&C.type==="text"?C.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...g)}else d.push(...g);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,A),l.push(A)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...wt(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
49
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
50
|
+
`}]}}var _i={}.hasOwnProperty,Lx={};function Rx(e,t){const r=t||Lx,n=new Map,i=new Map,a={all:l,applyData:Dx,definitionById:n,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Nx,...r.handlers},one:s,options:r,patch:Ox,wrap:Mx};return Ge(e,function(o){if(o.type==="definition"||o.type==="footnoteDefinition"){const u=o.type==="definition"?n:i,d=String(o.identifier).toUpperCase();u.has(d)||u.set(d,o)}}),a;function s(o,u){const d=o.type,h=a.handlers[d];if(_i.call(a.handlers,d)&&h)return h(a,o,u);if(a.options.passThrough&&a.options.passThrough.includes(d)){if("children"in o){const{children:p,...f}=o,g=wt(f);return g.children=a.all(o),g}return wt(o)}return(a.options.unknownHandler||Px)(a,o,u)}function l(o){const u=[];if("children"in o){const d=o.children;let h=-1;for(;++h<d.length;){const p=a.one(d[h],o);if(p){if(h&&d[h-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=Os(p.value)),!Array.isArray(p)&&p.type==="element")){const f=p.children[0];f&&f.type==="text"&&(f.value=Os(f.value))}Array.isArray(p)?u.push(...p):u.push(p)}}}return u}}function Ox(e,t){e.position&&(t.position=No(e))}function Dx(e,t){let r=t;if(e&&e.data){const n=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;typeof n=="string"&&(r.type==="element"?r.tagName=n:r={type:"element",tagName:n,properties:{},children:"children"in r?r.children:[r]}),r.type==="element"&&a&&Object.assign(r.properties,wt(a)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function Px(e,t){const r=t.data||{},n="value"in t&&!(_i.call(r,"hProperties")||_i.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mx(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:`
|
|
51
|
+
`});++n<e.length;)n&&r.push({type:"text",value:`
|
|
52
|
+
`}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
53
|
+
`}),r}function Os(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Ds(e,t){const r=Rx(e,t),n=r.one(e,void 0),i=wx(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&("children"in a,a.children.push({type:"text",value:`
|
|
54
|
+
`},i)),a}function Bx(e,t){return e&&"run"in e?async function(r,n){const i=Ds(r,{file:n,...t});await e.run(i,n)}:function(r,n){return Ds(r,{file:n,...e||t})}}function Ps(e){if(e)throw e}var Fx=Lr(((e,t)=>{var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},l=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var p=r.call(h,"constructor"),f=h.constructor&&h.constructor.prototype&&r.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!f)return!1;var g;for(g in h);return typeof g>"u"||r.call(h,g)},o=function(h,p){i&&p.name==="__proto__"?i(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},u=function(h,p){if(p==="__proto__")if(r.call(h,p)){if(a)return a(h,p).value}else return;return h[p]};t.exports=function d(){var h,p,f,g,N,y,A=arguments[0],C=1,k=arguments.length,R=!1;for(typeof A=="boolean"&&(R=A,A=arguments[1]||{},C=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});C<k;++C)if(h=arguments[C],h!=null)for(p in h)f=u(A,p),g=u(h,p),A!==g&&(R&&g&&(l(g)||(N=s(g)))?(N?(N=!1,y=f&&s(f)?f:[]):y=f&&l(f)?f:{},o(A,{name:p,newValue:d(R,y,g)})):typeof g<"u"&&o(A,{name:p,newValue:g}));return A}}));function yi(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 Hx(){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 d=e[++a];let h=-1;if(o){s(o);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,d?Ux(d,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 Ux(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 d=u;if(l&&r)throw d;return i(d)}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 rt={basename:jx,dirname:zx,extname:$x,join:Yx,sep:"/"};function jx(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Fr(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 zx(e){if(Fr(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 $x(e){Fr(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 Yx(...e){let t=-1,r;for(;++t<e.length;)Fr(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":qx(r)}function qx(e){Fr(e);const t=e.codePointAt(0)===47;let r=Vx(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function Vx(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 Fr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var Wx={cwd:Gx};function Gx(){return"/"}function Ci(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Qx(e){if(typeof e=="string")e=new URL(e);else if(!Ci(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 Kx(e)}function Kx(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 Kn=["history","path","basename","stem","extname","dirname"],Xx=class{constructor(e){let t;e?Ci(e)?t={path:e}:typeof e=="string"||Zx(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":Wx.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Kn.length;){const i=Kn[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)Kn.includes(n)||(this[n]=t[n])}get basename(){return typeof this.path=="string"?rt.basename(this.path):void 0}set basename(e){Zn(e,"basename"),Xn(e,"basename"),this.path=rt.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?rt.dirname(this.path):void 0}set dirname(e){Ms(this.basename,"dirname"),this.path=rt.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?rt.extname(this.path):void 0}set extname(e){if(Xn(e,"extname"),Ms(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=rt.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Ci(e)&&(e=Qx(e)),Zn(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?rt.basename(this.path,this.extname):void 0}set stem(e){Zn(e,"stem"),Xn(e,"stem"),this.path=rt.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 Ie(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 Xn(e,t){if(e&&e.includes(rt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+rt.sep+"`")}function Zn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ms(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Zx(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Jx=(function(e){const t=this.constructor.prototype,r=t[e],n=function(){return r.apply(n,arguments)};return Object.setPrototypeOf(n,t),n}),Jn=En(Fx(),1),eA={}.hasOwnProperty,tA=class Oc extends Jx{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=Hx()}copy(){const t=new Oc;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data((0,Jn.default)(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(ri("data",this.frozen),this.namespace[t]=r,this):eA.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ri("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 ei("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),ei("process",this.parser||this.Parser),ti("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(d,h,p){if(d||!h||!p)return u(d);const f=h,g=n.stringify(f,p);iA(g)?p.value=g:p.result=g,u(d,p)});function u(d,h){d||!h?s(d):a?a(h):r(void 0,h)}}}processSync(t){let r=!1,n;return this.freeze(),ei("processSync",this.parser||this.Parser),ti("processSync",this.compiler||this.Compiler),this.process(t,i),Fs("processSync","process",r),n;function i(a,s){r=!0,Ps(a),n=s}}run(t,r,n){Bs(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(d,h,p){const f=h||t;d?l(d):s?s(f):n(void 0,f,p)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),Fs("runSync","run",n),i;function a(s,l){Ps(s),i=l,n=!0}}stringify(t,r){this.freeze();const n=Qr(r),i=this.compiler||this.Compiler;return ti("stringify",i),Bs(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(ri("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[d,...h]=u;o(d,h)}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,Jn.default)(!0,i.settings,u.settings))}function l(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const h=u[d];a(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function o(u,d){let h=-1,p=-1;for(;++h<n.length;)if(n[h][0]===u){p=h;break}if(p===-1)n.push([u,...d]);else if(d.length>0){let[f,...g]=d;const N=n[p][1];yi(N)&&yi(f)&&(f=(0,Jn.default)(!0,N,f)),n[p]=[u,f,...g]}}}},rA=new tA().freeze();function ei(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ti(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ri(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 Bs(e){if(!yi(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Fs(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Qr(e){return nA(e)?e:new Xx(e)}function nA(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function iA(e){return typeof e=="string"||aA(e)}function aA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var aa=En(Ah(),1);function sa(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mt=sa();function Dc(e){Mt=e}var Nt={exec:()=>null};function Ct(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 ee(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(ye.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,t)};return n}var sA=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),ye={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,blockquoteMarkerWhitespace:/^( {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}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/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:Ct(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ct(e=>new RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Ct(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ct(e=>new RegExp(`^ {0,${e}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:Ct(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Ct(e=>new RegExp(`^ {0,${e}}(?:</?(?:${Ur})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:Ct(e=>new RegExp(`^ {0,${e}}>`))},lA=/^(?:[ \t]*(?:\n|$))+/,oA=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cA=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Hr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,uA=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,la=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Pc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Mc=ee(Pc).replace(/bull/g,la).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(),hA=ee(Pc).replace(/bull/g,la).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(),oa=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,dA=/^[^\n]+/,ca=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,fA=ee(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ca).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),pA=ee(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,la).getRegex(),Ur="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",ua=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,mA=ee("^ {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)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ua).replace("tag",Ur).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Bc=e=>ee(oa).replace("hr",Hr).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"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Ur).getRegex(),gA=Bc(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),EA=Bc(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),ha={blockquote:ee(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph",EA).getRegex(),code:oA,def:fA,fences:cA,heading:uA,hr:Hr,html:mA,lheading:Mc,list:pA,newline:lA,paragraph:gA,table:Nt,text:dA},Hs=ee("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Hr).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"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Ur).getRegex(),TA={...ha,lheading:hA,table:Hs,paragraph:ee(oa).replace("hr",Hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Hs).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Ur).getRegex()},bA={...ha,html:ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ua).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:ee(oa).replace("hr",Hr).replace("heading",` *#{1,6} *[^
|
|
55
|
+
]`).replace("lheading",Mc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},kA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xA=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Fc=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,AA=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,st=/[\p{P}\p{S}]/u,nr=/[\s\p{P}\p{S}]/u,jr=/[^\s\p{P}\p{S}]/u,_A=ee(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,nr).getRegex(),yA=/[\p{Pi}\p{Ps}"']/u,Hc=/(?!~)[\p{P}\p{S}]/u,CA=/(?!~)[\s\p{P}\p{S}]/u,SA=/(?:[^\s\p{P}\p{S}]|~)/u,NA=ee(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",sA?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Uc=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,vA=ee(Uc,"u").replace(/punct/g,st).getRegex(),IA=ee(Uc,"u").replace(/punct/g,Hc).getRegex(),wA=ee(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,"u").replace(/openQuote/g,yA).replace(/punct/g,st).getRegex(),jc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",LA=ee(jc,"gu").replace(/notPunctSpace/g,jr).replace(/punctSpace/g,nr).replace(/punct/g,st).getRegex(),RA=ee(jc,"gu").replace(/notPunctSpace/g,SA).replace(/punctSpace/g,CA).replace(/punct/g,Hc).getRegex(),OA=ee("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,jr).replace(/punctSpace/g,nr).replace(/punct/g,st).getRegex(),DA=ee("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,jr).replace(/punctSpace/g,nr).replace(/punct/g,st).getRegex(),PA=ee("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,jr).replace(/punctSpace/g,nr).replace(/punct/g,st).getRegex(),MA=ee(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,st).getRegex(),BA=ee("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,jr).replace(/punctSpace/g,nr).replace(/punct/g,st).getRegex(),FA=ee(/\\(punct)/,"gu").replace(/punct/g,st).getRegex(),HA=ee(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,st).getRegex(),UA=ee(/^<(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(),jA=ee(ua).replace("(?:-->|$)","-->").getRegex(),zA=ee("^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",jA).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),zc=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,dn=ee(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",zc).getRegex(),$A=ee(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",dn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),YA=ee(/^!?\[(label)\]\[(ref)\]/).replace("label",dn).replace("ref",ca).getRegex(),qA=ee(/^!?\[(ref)\](?:\[\])?/).replace("ref",ca).getRegex(),Us=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,VA=ee(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",zc).getRegex(),WA=ee("reflink|nolink(?!\\()","g").replace("reflink",ee(/^!?\[(label)\]\[(ref)\]/).replace("label",VA).replace("ref",Us).getRegex()).replace("nolink",ee(/^!?\[(ref)\](?:\[\])?/).replace("ref",Us).getRegex()).getRegex(),js=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,GA=ee(/(?: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(),da={_backpedal:Nt,anyPunctuation:FA,anyPunctuationOutsideCode:HA,autolink:UA,blockSkip:NA,br:Fc,code:xA,del:Nt,delLDelim:Nt,delRDelim:Nt,emStrongLDelim:vA,emStrongRDelimAst:LA,emStrongRDelimUnd:DA,escape:kA,link:$A,nolink:qA,punctuation:_A,reflink:YA,reflinkSearch:WA,tag:zA,text:AA,url:Nt},QA={...da,emStrongLDelim:wA,emStrongRDelimAst:OA,emStrongRDelimUnd:PA,link:ee(/^!?\[(label)\]\((.*?)\)/).replace("label",dn).getRegex(),reflink:ee(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",dn).getRegex()},Si={...da,emStrongRDelimAst:RA,emStrongLDelim:IA,delLDelim:MA,delRDelim:BA,url:ee(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",GA).replace("protocol",js).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:ee(/^(?:[^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",js).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},KA={...Si,br:ee(Fc).replace("{2,}","*").getRegex(),text:ee(Si.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Kr={normal:ha,gfm:TA,pedantic:bA},pr={normal:da,gfm:Si,breaks:KA,pedantic:QA},XA={"&":"&","<":"<",">":">",'"':""","'":"'"},zs=e=>XA[e];function $e(e,t){if(t){if(ye.escapeTest.test(e))return e.replace(ye.escapeReplace,zs)}else if(ye.escapeTestNoEncode.test(e))return e.replace(ye.escapeReplaceNoEncode,zs);return e}function ZA(e){return ye.numericCharacterReference.test(e)?e.replace(ye.numericCharacterReferenceOrAmpersand,(t,r,n)=>{if(r===void 0&&n===void 0)return"&";let i=r===void 0?Number.parseInt(n,16):Number.parseInt(r,10);return i===0||i>1114111||i>=55296&&i<=57343?"�":i===38?"&":String.fromCodePoint(i)}):e}function $s(e){try{e=encodeURI(e).replace(ye.percentDecode,"%")}catch{return null}return e}function Ys(e,t){let r=e.replace(ye.findPipe,(i,a,s)=>{let l=!1,o=a;for(;--o>=0&&s[o]==="\\";)l=!l;return l?"|":" |"}).split(ye.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(ye.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 qs(e){let t=e.split(`
|
|
56
|
+
`),r=t.length-1;for(;r>=0&&ye.blankLine.test(t[r]);)r--;return t.length-r<=2?e:t.slice(0,r+1).join(`
|
|
57
|
+
`)}function fn(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function Vs(e,t){if(e.indexOf(t[0])===-1&&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 Xr(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 Ws(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)==="!",u=n.state.inLink,d=n.state.linkEmitted,h=n.state.inRawBlock;n.state.inLink=!0,n.state.linkEmitted=!1;let p=n.inlineTokens(l),f=n.state.linkEmitted;if(n.state.linkEmitted=d,n.state.inLink=u,!o){if(f){n.state.inRawBlock=h;return}n.state.linkEmitted=!0}return{type:o?"image":"link",raw:r,href:a,title:s,text:l,tokens:p}}function JA(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(`
|
|
58
|
+
`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[l]=s;return a.slice(Math.min(l.length,i.length))}).join(`
|
|
59
|
+
`)}function Gs(e,t,r,n){if(!t.includes("<"))return!1;for(let i=0;i<t.length;i++){if(t[i]==="\\"){i++;continue}if(t[i]==="`"){let l=n.inline.code.exec(t.slice(i));if(l){i+=l[0].length-1;continue}}if(t[i]!=="<")continue;let a=e.slice(r+i),s=n.inline.tag.exec(a)||n.inline.autolink.exec(a);if(s){if(s[0].length>t.length-i)return!0;i+=s[0].length-1}}return!1}var Vt=class{options;rules;lexer;constructor(e){this.options=e||Mt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=this.options.pedantic?t[0]:qs(t[0]);return{type:"code",raw:r,codeBlockStyle:"indented",text:r.replace(this.rules.other.codeRemoveIndent,"")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],n=JA(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let n=ft(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceTabChar.test(n))&&(r=n.trim())}return{type:"heading",raw:ft(t[0],`
|
|
60
|
+
`),depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:ft(t[0],`
|
|
61
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=ft(t[0],`
|
|
62
|
+
`).split(`
|
|
63
|
+
`),n="",i="",a=[];for(;r.length>0;){let s=!1,l=[],o=0;for(;o<r.length;o++)if(this.rules.other.blockquoteStart.test(r[o]))l.push(r[o]),s=!0;else if(!s)l.push(r[o]);else break;r=r.slice(o);let u=l.join(`
|
|
64
|
+
`),d=u.replace(this.rules.other.blockquoteMarkerWhitespace,(f,g,N)=>g+Xr(N,g.length)).replace(this.rules.other.blockquoteSetextReplace,`
|
|
65
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
66
|
+
${u}`:u,i=i?`${i}
|
|
67
|
+
${d}`:d;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=h,r.length===0)break;let p=a.at(-1);if(p?.type==="code"||p?.type==="heading"||p?.type==="hr"||p?.type==="html")break;if(p?.type==="blockquote"){let f=p,g=r.join(`
|
|
68
|
+
`),N=f.raw+`
|
|
69
|
+
`+g.replace(this.rules.other.blockquoteSetextReplace2,""),y=this.blockquote(N);a[a.length-1]=y;let A=N.substring(y.raw.length).replace(/^\n/,""),C=A?A.split(`
|
|
70
|
+
`).length:0,k=C?r.slice(0,-C):r;k.length>0&&(n=`${n}
|
|
71
|
+
${k.join(`
|
|
72
|
+
`)}`),i=i.substring(0,i.length-f.text.length)+y.text;break}else if(p?.type==="list"){let f=p,g=f.raw+`
|
|
73
|
+
`+r.join(`
|
|
74
|
+
`),N=this.list(g);a[a.length-1]=N;let y=N.raw.length>f.raw.length?g.slice(f.raw.length+1,N.raw.length).split(`
|
|
75
|
+
`).length:0;if(y>0){let A=r.slice(0,y).join(`
|
|
76
|
+
`);n=`${n}
|
|
77
|
+
${A}`,i=`${i}
|
|
78
|
+
${A}`}r=r.slice(y);continue}}return{type:"blockquote",raw:n,tokens:a,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=e,n=()=>r.length-e.length,i=t[1].trim(),a=i.length>1,s={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let l=this.rules.other.listItemRegex(i),o=!1;for(;e;){let d=!1,h="";if(!(t=l.exec(e))||this.rules.block.hr.test(e))break;let p=n();e=e.substring(t[0].length);let f=t[2].split(`
|
|
79
|
+
`,1)[0],g=t[1].length,N=this.options.pedantic?Xr(f,g):f.replace(this.rules.other.leadingSpaceTab,R=>Xr(R,g)),y=e.split(`
|
|
80
|
+
`,1)[0],A=!N.trim(),C=0;if(this.options.pedantic?(C=2,h=N.trimStart()):A?C=g+1:(C=N.search(this.rules.other.nonSpaceChar),C=C>4?1:C,h=N.slice(C),C+=g),A&&this.rules.other.blankLine.test(y)&&(e=e.substring(y.length+1),d=!0),!d){let R=this.rules.other.nextBulletRegex(C),D=this.rules.other.hrRegex(C),I=this.rules.other.fencesBeginRegex(C),U=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(C):this.rules.other.headingBeginRegex(C),$=this.rules.other.htmlBeginRegex(C),V=this.rules.other.blockquoteBeginRegex(C);for(;e;){let v=e.split(`
|
|
81
|
+
`,1)[0],F;if(y=v,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),F=y):F=y.replace(this.rules.other.leadingSpaceTab,z=>Xr(z)),I.test(y)||U.test(y)||$.test(y)||V.test(y)||R.test(y)||D.test(y))break;if(F.search(this.rules.other.nonSpaceChar)>=C||!y.trim())h+=`
|
|
82
|
+
`+F.slice(C);else{if(A||N.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||I.test(N)||U.test(N)||D.test(N))break;let z=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(y)&&this.rules.block.lheading.test(`${N}
|
|
83
|
+
${y}`)?` ${F.replace(/^ {0,3}/,"")}`:y;h+=`
|
|
84
|
+
`+z}A=!y.trim(),e=e.substring(v.length+1),N=F.slice(C)}}let k=r.slice(p,n());s.loose||(o?s.loose=!0:this.rules.other.doubleBlankLine.test(k)&&(o=!0)),s.items.push({type:"list_item",raw:k,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]})}let u=s.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;s.raw=r.slice(0,n()).trimEnd();for(let d of s.items)if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),!s.loose){let h=d.tokens.filter(p=>p.type==="space");s.loose=h.length>0&&h.some(p=>this.rules.other.anyLine.test(p.raw))}for(let d of s.items){let h=d.tokens[0];if(d.task&&(h?.type==="text"||h?.type==="paragraph")){d.text=d.text.replace(this.rules.other.listReplaceTask,""),h.raw=h.raw.replace(this.rules.other.listReplaceTask,""),h.text=h.text.replace(this.rules.other.listReplaceTask,"");for(let f=this.lexer.inlineQueue.length-1;f>=0;f--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[f].src)){this.lexer.inlineQueue[f].src=this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(d.raw);if(p){let f={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};d.checked=f.checked,s.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=f.raw+d.tokens[0].raw,d.tokens[0].text=f.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(f)):d.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):d.tokens.unshift(f)}}else d.task&&(d.task=!1)}if(s.loose)for(let d of s.items){d.loose=!0;for(let h of d.tokens)h.type==="text"&&(h.type="paragraph")}return s}}html(e){let t=this.rules.block.html.exec(e);if(t){let r=qs(t[0]);return{type:"html",block:!0,raw:r,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:r}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&Vs(t[2],"()")!==-1)return;let r=fn(t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:ft(t[0],`
|
|
85
|
+
`),href:n,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=Ys(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
86
|
+
`):[],a={type:"table",raw:ft(t[0],`
|
|
87
|
+
`),header:[],align:[],rows:[]};if(r.length===n.length){for(let s of n)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<r.length;s++)a.header.push({text:r[s],tokens:this.lexer.inline(r[s]),header:!0,align:a.align[s]});for(let s of i)a.rows.push(Ys(s,a.header.length).map((l,o)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[o]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let r=t[1].trim();return{type:"heading",raw:ft(t[0],`
|
|
88
|
+
`),depth:t[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===`
|
|
89
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let r=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Gs(e,t[1],r,this.rules))return;let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=ft(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=Vs(t[2],"()");if(s===-2)return;if(s>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let i=t[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],a=s[3])}else a=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),Ws(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=r[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Gs(e,r[1],n,this.rules))return;let i=t[fn((r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "))];if(!i){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return Ws(r,i,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!n||!n[1]&&!n[2]&&!n[3]&&!n[4])return;let i=n[0][0],a=r===i,s=t.length-e.length,l=s;for(;!this.options.pedantic&&l>0&&t[l-1]===i;)l--;let o=[...t.slice(Math.max(0,l-2),l)].at(-1)??"",u=o==="*"||o==="_"||!!this.rules.inline.punctuation.exec(o);l<s&&(r=o);let d=l<s?u:!!this.rules.inline.punctuation.exec(r);if(n[4]&&r.match(this.rules.other.unicodeAlphaNumeric))return;let h=n[1]||n[3]||"";if(!h||!r||d){let p=[...n[0]].length-1,f,g,N=p,y=0,A=s-l+p,C=!this.options.pedantic&&!!o.trim()&&(!!h||i==="*"&&!u),k=i==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(k.lastIndex=0,t=t.slice(-1*e.length+p);(n=k.exec(t))!==null;){if(f=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!f)continue;if(g=[...f].length,n[3]||n[4]){N+=g;continue}else if(n[5]||n[6]||C){if(a&&(n[5]||n[6]))break;if(A%3&&!((A+g)%3)){y+=g;continue}}if(N-=g,N>0)continue;g=Math.min(g,g+N+y);let R=[...n[0]][0].length,D=e.slice(0,p+n.index+R+g);if(Math.min(p,g)%2){let U=D.slice(1,-1);return{type:"em",raw:D,text:U,tokens:this.lexer.inlineTokens(U)}}let I=D.slice(2,-2);return{type:"strong",raw:D,text:I,tokens:this.lexer.inlineTokens(I)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let n=this.rules.inline.delLDelim.exec(e);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,a,s,l=i,o=this.rules.inline.delRDelim;for(o.lastIndex=0,t=t.slice(-1*e.length+i);(n=o.exec(t))!==null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a||(s=[...a].length,s!==i))continue;if(n[3]||n[4]){l+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l);let u=[...n[0]][0].length,d=e.slice(0,i+n.index+u+s),h=d.slice(i,-i);return{type:"del",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,autolink:!0,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,n;if(t[2]==="@")r=t[0],n="mailto:"+r;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);r=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:r,href:n,autolink:!0,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:r?t[0]:ZA(t[0]),escaped:r}}}},We=class Ni{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Mt,this.options.tokenizer=this.options.tokenizer||new Vt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let r={other:ye,block:Kr.normal,inline:pr.normal};this.options.pedantic?(r.block=Kr.pedantic,r.inline=pr.pedantic):this.options.gfm&&(r.block=Kr.gfm,this.options.breaks?r.inline=pr.breaks:r.inline=pr.gfm),this.tokenizer.rules=r}static get rules(){return{block:Kr,inline:pr}}static lex(t,r){return new Ni(r).lex(t)}static lexInline(t,r){return new Ni(r).inlineTokens(t)}lex(t){t=t.replace(ye.carriageReturn,`
|
|
90
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.state.inRawBlock=!1,this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(ye.tabCharGlobal," ").replace(ye.spaceLine,""));let i=1/0;for(;t;){if(t.length<i)i=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let a;if(this.options.extensions?.block?.some(l=>(a=l.call({lexer:this},t,r))?(t=t.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let l=r.at(-1);a.raw.length===1&&l!==void 0?l.raw+=`
|
|
91
|
+
`:r.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let l=r.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
92
|
+
`)?"":`
|
|
93
|
+
`)+a.raw,l.text+=`
|
|
94
|
+
`+a.text,this.inlineQueue.at(-1).src=l.text):r.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);let l=r.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
95
|
+
`)?"":`
|
|
96
|
+
`)+a.raw,l.text+=`
|
|
97
|
+
`+a.raw,this.inlineQueue.at(-1).src=l.text):(this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title}),r.push(a));continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),r.push(a);continue}let s=t;if(this.options.extensions?.startBlock){let l=1/0,o=t.slice(1),u;this.options.extensions.startBlock.forEach(d=>{u=d.call({lexer:this},o),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(s=t.substring(0,l+1))}if(this.state.top&&(a=this.tokenizer.paragraph(s))){let l=r.at(-1);n&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
98
|
+
`)?"":`
|
|
99
|
+
`)+a.raw,l.text+=`
|
|
100
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(a),n=s.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let l=r.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
101
|
+
`)?"":`
|
|
102
|
+
`)+a.raw,l.text+=`
|
|
103
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(a);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}linkInText(t){if(!t.includes("["))return!1;let r=this.tokenizer.rules.inline.link;for(let n of t.matchAll(this.tokenizer.rules.inline.blockSkip))if(r.test(n[0])&&t.charAt(n.index-1)!=="!")return!0;for(let n of t.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let i=n[0],a=i.lastIndexOf("[");if(!(i.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,fn(i.slice(a+1,-1))))&&!(a>1&&this.linkInText(i.slice(1,a-1))))return!0}return!1}inlineTokens(t,r=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&t.includes(")");try{return this.#e(t,r)}finally{this.state.linkParenPossible=n}}#e(t,r){let n=t.includes("*")||t.includes("_")||t.includes("~")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==Vt.prototype.emStrong||this.tokenizer.del!==Vt.prototype.del?this.#t(t):t,i=!1,a="",s=1/0;for(;t;){if(t.length<s)s=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}i||(a=""),i=!1;let l;if(this.options.extensions?.inline?.some(u=>(l=u.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let u=r.at(-1);l.type==="text"&&u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,n,a)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t,n,a)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let o=t;if(this.options.extensions?.startInline){let u=1/0,d=t.slice(1),h;this.options.extensions.startInline.forEach(p=>{h=p.call({lexer:this},d),typeof h=="number"&&h>=0&&(u=Math.min(u,h))}),u<1/0&&u>=0&&(o=t.substring(0,u+1))}if(l=this.tokenizer.inlineText(o)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(a=l.raw.slice(-1)),i=!0;let u=r.at(-1);u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):r.push(l);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return r}#t(t){let r=t;if(this.tokens.links&&t.includes("[")){let n=this.tokenizer.rules.inline.reflinkSearch,i=a=>{let s=a.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,fn(a.slice(s+1,-1))))return a;if(s>1&&a.charAt(0)!=="!"){let l=a.slice(1,s-1);if(this.linkInText(l))return"["+l.replace(n,i)+"]["+"a".repeat(a.length-s-2)+"]"}return"["+"a".repeat(a.length-2)+"]"};r=r.replace(n,i)}return r=r.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(n,i,a)=>a?"+".repeat(n.length):i?i+n.slice(i.length,-i.length).replace(/`/g,"+")+i:n),r=r.replace(this.tokenizer.rules.inline.blockSkip,(n,i,a)=>{let s=a?a.length:0;return n.slice(0,s)+"["+"a".repeat(n.length-s-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r,r}infiniteLoopError(t){let r="Infinite loop on byte: "+t;if(this.options.silent)console.error(r);else throw new Error(r)}},pn=class{options;parser;constructor(e){this.options=e||Mt}space(e){return""}code({text:e,lang:t,escaped:r}){let n=(t||"").match(ye.notSpaceStart)?.[0],i=e?e.replace(ye.endingNewline,"")+`
|
|
104
|
+
`:"";return n?'<pre><code class="language-'+$e(n)+'">'+(r?i:$e(i,!0))+`</code></pre>
|
|
105
|
+
`:"<pre><code>"+(r?i:$e(i,!0))+`</code></pre>
|
|
106
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
107
|
+
${this.parser.parse(e)}</blockquote>
|
|
108
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
109
|
+
`}hr(e){return`<hr>
|
|
110
|
+
`}list(e){let t=e.ordered,r=e.start,n="";for(let s=0;s<e.items.length;s++){let l=e.items[s];n+=this.listitem(l)}let i=t?"ol":"ul",a=t&&r!==1?' start="'+r+'"':"";return"<"+i+a+`>
|
|
111
|
+
`+n+"</"+i+`>
|
|
112
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
113
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
114
|
+
`}table(e){let t="",r="";for(let i=0;i<e.header.length;i++)r+=this.tablecell(e.header[i]);t+=this.tablerow({text:r});let n="";for(let i=0;i<e.rows.length;i++){let a=e.rows[i];r="";for(let s=0;s<a.length;s++)r+=this.tablecell(a[s]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
115
|
+
<thead>
|
|
116
|
+
`+t+`</thead>
|
|
117
|
+
`+n+`</table>
|
|
118
|
+
`}tablerow({text:e}){return`<tr>
|
|
119
|
+
${e}</tr>
|
|
120
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
121
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${$e(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:r,tokens:n,autolink:i}){let a=i?$e(r,!0):this.parser.parseInline(n),s=$s(e);if(s===null)return a;e=$e(s,i);let l='<a href="'+e+'"';return t&&(l+=' title="'+$e(t)+'"'),l+=">"+a+"</a>",l}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=$s(e);if(i===null)return $e(r);e=i;let a=`<img src="${$e(e)}" alt="${$e(r)}"`;return t&&(a+=` title="${$e(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:$e(e.text)}},fa=class{parser;strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return""}checkbox({raw:e}){return e}},Ke=class vi{options;renderer;textRenderer;constructor(t){this.options=t||Mt,this.options.renderer=this.options.renderer||new pn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new fa,this.textRenderer.parser=this}static parse(t,r){return new vi(r).parse(t)}static parseInline(t,r){return new vi(r).parseInline(t)}parse(t){this.renderer.parser=this;let r="";for(let n=0;n<t.length;n++){let i=t[n];if(this.options.extensions?.renderers?.[i.type]){let s=i,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(s.type)){r+=l||"";continue}}let a=i;switch(a.type){case"space":r+=this.renderer.space(a);break;case"hr":r+=this.renderer.hr(a);break;case"heading":r+=this.renderer.heading(a);break;case"code":r+=this.renderer.code(a);break;case"table":r+=this.renderer.table(a);break;case"blockquote":r+=this.renderer.blockquote(a);break;case"list":r+=this.renderer.list(a);break;case"checkbox":r+=this.renderer.checkbox(a);break;case"html":r+=this.renderer.html(a);break;case"def":r+=this.renderer.def(a);break;case"paragraph":r+=this.renderer.paragraph(a);break;case"text":r+=this.renderer.text(a);break;default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return r}parseInline(t,r=this.renderer){this.renderer.parser=this;let n="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(a.type)){n+=l||"";continue}}let s=a;switch(s.type){case"escape":n+=r.text(s);break;case"html":n+=r.html(s);break;case"link":n+=r.link(s);break;case"image":n+=r.image(s);break;case"checkbox":n+=r.checkbox(s);break;case"strong":n+=r.strong(s);break;case"em":n+=r.em(s);break;case"codespan":n+=r.codespan(s);break;case"br":n+=r.br(s);break;case"del":n+=r.del(s);break;case"text":n+=r.text(s);break;default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}},Er=class{options;block;constructor(e){this.options=e||Mt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?We.lex:We.lexInline}provideParser(e=this.block){return e?Ke.parse:Ke.parseInline}};function St(e,t){if(Array.isArray(t))for(let r=0;r<t.length;r++)e.push(t[r]);else e.push(t)}var e_=class{defaults=sa();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ke;Renderer=pn;TextRenderer=fa;Lexer=We;Tokenizer=Vt;Hooks=Er;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let n of e)switch(St(r,t.call(this,n)),n.type){case"table":{let i=n;for(let a of i.header)St(r,this.walkTokens(a.tokens,t));for(let a of i.rows)for(let s of a)St(r,this.walkTokens(s.tokens,t));break}case"list":{let i=n;St(r,this.walkTokens(i.items,t));break}default:{let i=n;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(a=>{let s=i[a].flat(1/0);St(r,this.walkTokens(s,t))}):i.tokens&&St(r,this.walkTokens(i.tokens,t))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=t.renderers[i.name];a?t.renderers[i.name]=function(...s){let l=i.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[i.level];a?a.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),n.extensions=t),r.renderer){let i=this.defaults.renderer||new pn(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=r.renderer[s],o=i[s];i[s]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=o.apply(i,u)),d||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new Vt(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=r.tokenizer[s],o=i[s];i[s]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=o.apply(i,u)),d}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new Er;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=r.hooks[s],o=i[s];Er.passThroughHooks.has(a)?i[s]=u=>{if(i.options.async&&Er.passThroughHooksRespectAsync.has(a))return(async()=>{let h=await l.call(i,u);return o.call(i,h)})();let d=l.call(i,u);return o.call(i,d)}:i[s]=(...u)=>{if(i.options.async)return(async()=>{let h=await l.apply(i,u);return h===!1&&(h=await o.apply(i,u)),h})();let d=l.apply(i,u);return d===!1&&(d=o.apply(i,u)),d}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),i&&St(l,i.call(this,s)),l}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return We.lex(e,t??this.defaults)}parser(e,t){return Ke.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let s=i.hooks?await i.hooks.preprocess(t):t,l=await(i.hooks?await i.hooks.provideLexer(e):e?We.lex:We.lexInline)(s,i),o=i.hooks?await i.hooks.processAllTokens(l):l;i.walkTokens&&await Promise.all(this.walkTokens(o,i.walkTokens));let u=await(i.hooks?await i.hooks.provideParser(e):e?Ke.parse:Ke.parseInline)(o,i);return i.hooks?await i.hooks.postprocess(u):u})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let s=(i.hooks?i.hooks.provideLexer(e):e?We.lex:We.lexInline)(t,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let l=(i.hooks?i.hooks.provideParser(e):e?Ke.parse:Ke.parseInline)(s,i);return i.hooks&&(l=i.hooks.postprocess(l)),l}catch(s){return a(s)}}}onError(e,t){return r=>{if(r.message+=`
|
|
122
|
+
Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+$e(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Rt=new e_;function de(e,t){return Rt.parse(e,t)}de.options=de.setOptions=function(e){return Rt.setOptions(e),de.defaults=Rt.defaults,Dc(de.defaults),de};de.getDefaults=sa;de.defaults=Mt;function t_(...e){return Rt.use(...e),de.defaults=Rt.defaults,Dc(de.defaults),de}de.use=t_;de.walkTokens=function(e,t){return Rt.walkTokens(e,t)};de.parseInline=Rt.parseInline;de.Parser=Ke;de.parser=Ke.parse;de.Renderer=pn;de.TextRenderer=fa;de.Lexer=We;de.lexer=We.lex;de.Tokenizer=Vt;de.Hooks=Er;de.parse=de;var N1=de.options,v1=de.setOptions,I1=de.walkTokens,w1=de.parseInline,L1=Ke.parse,R1=We.lex,r_=300,n_="300px",i_=500;function a_(e={}){let{immediate:t=!1,debounceDelay:r=r_,rootMargin:n=n_,idleTimeout:i=i_}=e,[a,s]=(0,T.useState)(!1),l=(0,T.useRef)(null),o=(0,T.useRef)(null),u=(0,T.useRef)(null),d=(0,T.useMemo)(()=>f=>{let g=Date.now();return window.setTimeout(()=>{f({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-g))})},1)},[]),h=(0,T.useMemo)(()=>typeof window<"u"&&window.requestIdleCallback?(f,g)=>window.requestIdleCallback(f,g):d,[d]),p=(0,T.useMemo)(()=>typeof window<"u"&&window.cancelIdleCallback?f=>window.cancelIdleCallback(f):f=>{clearTimeout(f)},[]);return(0,T.useEffect)(()=>{if(t){s(!0);return}let f=l.current;if(!f)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=k=>{u.current=h(R=>{R.timeRemaining()>0||R.didTimeout?(s(!0),k.disconnect()):u.current=h(()=>{s(!0),k.disconnect()},{timeout:i/2})},{timeout:i})},y=k=>{g(),o.current=window.setTimeout(()=>{var R,D;let I=k.takeRecords();(I.length===0||(D=(R=I.at(-1))==null?void 0:R.isIntersecting)!=null&&D)&&N(k)},r)},A=(k,R)=>{k.isIntersecting?y(R):g()},C=new IntersectionObserver(k=>{for(let R of k)A(R,C)},{rootMargin:n,threshold:0});return C.observe(f),()=>{o.current&&clearTimeout(o.current),u.current&&p(u.current),C.disconnect()}},[t,r,n,i,p,h]),{shouldRender:a,containerRef:l}}var s_=320,l_=4,$c=()=>typeof performance>"u"?Date.now():performance.now();function Qs(e){var t,r;let n=(t=e?.now)!=null?t:$c,i=(r=e?.maxBacklogMs)!=null?r:s_,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 d=Math.max(0,o),h=d===0?0:Math.min(d,l_),p=Math.max(s,u),f=u+i,g=p+Math.max(0,l-1)*d,N=d;if(g>f&&l>1)if(p<f){let A=f-p;N=Math.max(h,A/(l-1))}else N=h;let y=Math.max(0,Math.round(p-u));return s=p+l*N,{baseDelay:y,step:N}},commitPass(){a=s}}}var Yc=/\s/,o_=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\u3000-\u303F\uFF00-\uFFEF]/u,pa=/^\s+$/,c_=new Set(["pre","svg","math","annotation"]),u_=new Set(["img","hr"]),zr=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",ma=e=>e.some(t=>zr(t)&&c_.has(t.tagName)),h_=e=>{for(let t=e.length-1;t>=0;t--){let r=e[t];if(zr(r)&&r.tagName==="li")return r}},d_=(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}`},f_=new Set(["ul","ol","li"]),qc=e=>{for(let t of e.children)if(zr(t)){if(t.tagName==="input")return t;if(f_.has(t.tagName))continue;let r=qc(t);if(r)return r}},Vc=(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`},p_=(e,t,r,n)=>{let i=qc(e);i&&Vc(i,t,r,n)},m_=(e,t,r,n,i,a)=>{if(ma(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;Vc(e,r,o?0:r.duration,u)},g_=e=>{var t;for(let r=e.length-1;r>=0;r-=1){let n=e[r];if(zr(n)){if((t=n.properties)!=null&&t["data-sd-animated"])break;n.properties={...n.properties,"data-sd-animated":!0}}}},Wc=e=>{let t=[],r="",n=!1,i=!1;for(let a of e){let s=Yc.test(a),l=!s&&o_.test(a);if(!s&&r!==""&&(l||i))t.push(r),r="",n=!1;else if(s!==n&&r){if(s){r+=a,n=!0;continue}t.push(r),r=""}r+=a,n=s,i=l}return r&&t.push(r),t},Gc=e=>{let t=[],r="";for(let n of e)Yc.test(n)?t.length>0&&!pa.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},Ks=/^[^\s;:'"\\/](?:[^;:'"\\/\r\n]*[^\s;:'"\\/])?$/,E_=(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}]}},Xs=(e,t)=>!(e>0&&t<e),Ii=e=>zr(e)&&u_.has(e.tagName),T_=(e,t,r)=>{let n=0,i=0;return xn(e,a=>a.type==="text"||Ii(a),(a,s)=>{if(ma(s))return $t;if(Ii(a)){Xs(r,i)&&(n+=1),i+=1;return}let l=a.value;if(!l.trim()){i+=l.length;return}let o=t.sep==="char"?Gc(l):Wc(l);for(let u of o){let d=i;i+=u.length,!pa.test(u)&&Xs(r,d)&&(n+=1)}}),n},b_=(e,t,r,n,i,a)=>{var s;let l=t.at(-1);if(!(l&&"children"in l))return;if(ma(t))return $t;let o=l,u=o.children.indexOf(e);if(u===-1)return;let d=e.value;if(!d.trim()){i.count+=d.length;return}let h=r.sep==="char"?Gc(d):Wc(d),p=n.prevContentLength,f=!1,g=h_(t),N=!!(g&&!((s=g.properties)!=null&&s["data-sd-animate-marker"])),y=!1,A=h.map(C=>{let k=i.count;if(i.count+=C.length,pa.test(C))return{type:"text",value:C};let R=p>0&&k<p,D=R?0:a.baseDelay+i.newIndex++*a.step;if(f=!0,g&&N&&!y){let I=R?0:r.duration;d_(g,I,D,r.easing),p_(g,r,I,D),y=!0}return E_(C,r,R,D)});return f&&g_(t),o.children.splice(u,1,...A),u+A.length},k_=0;function x_(e){return Qc(e,!1)}var A_=e=>Qc(e,!0);function Qc(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&&Ks.test(l)&&Ks.test(o),timeline:e?.timeline},d={committedCharCount:0,prevContentLength:0,lastRenderCharCount:0,pendingMark:null},h=k_++,p=()=>f=>{var g;let N={count:0,newIndex:0};d.prevContentLength=d.committedCharCount;let y=u.timeline,A=(g=y?.now())!=null?g:$c();y&&(d.pendingMark===null?d.pendingMark=y.mark():y.rewind(d.pendingMark));let C=y?y.take(T_(f,u,d.prevContentLength),u.stagger,A):{baseDelay:0,step:u.stagger};xn(f,k=>k.type==="text"||Ii(k),(k,R)=>{if(k.type==="text")return b_(k,R,u,d,N,C);m_(k,R,u,d,N,C)}),d.lastRenderCharCount=N.count,d.prevContentLength=0};return Object.defineProperty(p,"name",{value:`rehypeAnimate$${h}`}),{name:"animate",type:"animate",rehypePlugin:p,setPrevContentLength(f){d.committedCharCount=f,d.prevContentLength=f},getLastRenderCharCount(){return d.lastRenderCharCount},commit(){d.committedCharCount=d.lastRenderCharCount,d.pendingMark=null}}}x_();var Kc=(0,T.createContext)(!1),Xc=()=>(0,T.useContext)(Kc),Ln=(...e)=>Ol(Rl(e)),__=(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(" ")},y_=e=>e?(...t)=>__(e,Ol(Rl(t))):Ln,Wt=(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)},wi=(0,T.createContext)(Ln),ae=()=>(0,T.useContext)(wi),C_=8,Zc=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}},Jc=(e,t,r)=>{let n=(0,T.useRef)(null),i=(0,T.useRef)(!0),a=(0,T.useRef)(!1),s=(0,T.useRef)(null);return(0,T.useEffect)(()=>{let l=n.current;if(!(l&&t))return;let o=()=>{let u=l.scrollHeight-l.scrollTop-l.clientHeight<C_;i.current=u};return l.addEventListener("scroll",o,{passive:!0}),()=>l.removeEventListener("scroll",o)},[t]),(0,T.useEffect)(()=>{e&&!a.current&&(i.current=!0),e||(i.current=!0),a.current=e},[e]),(0,T.useEffect)(()=>()=>{s.current!==null&&cancelAnimationFrame(s.current)},[]),(0,T.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},S_=Ln("block"),N_=Ln("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"),v_=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},I_=(0,T.memo)(({children:e,result:t,language:r,className:n,maxHeight:i,startLine:a,lineNumbers:s=!0,...l})=>{let o=ae(),{isAnimating:u}=(0,T.useContext)(Ce),d=Zc(i),h=Jc(u,!!d,t),p=(0,T.useMemo)(()=>o(N_),[o]),f=(0,T.useMemo)(()=>o(S_),[o]),g=(0,T.useMemo)(()=>{let N={};return t.bg&&(N["--sdm-bg"]=t.bg),t.fg&&(N["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(N,v_(t.rootStyle)),N},[t.bg,t.fg,t.rootStyle]);return(0,m.jsx)("div",{className:o(n,d?"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:h,style:d?{maxHeight:d}:void 0,...l,children:(0,m.jsx)("pre",{className:o(n,"bg-[var(--sdm-bg,inherit)]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit))]"),style:g,children:(0,m.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,y)=>(0,m.jsx)("span",{className:s?p:f,children:N.length===0||N.length===1&&N[0].content===""?`
|
|
123
|
+
`:N.map((A,C)=>{let k={},R=!!A.bgColor;if(A.color&&(k["--sdm-c"]=A.color),A.bgColor&&(k["--sdm-tbg"]=A.bgColor),A.htmlStyle)for(let[D,I]of Object.entries(A.htmlStyle))D==="color"?k["--sdm-c"]=I:D==="background-color"?(k["--sdm-tbg"]=I,R=!0):k[D]=I;return(0,m.jsx)("span",{className:o("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",R&&"bg-[var(--sdm-tbg)]",R&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:k,...A.htmlAttrs,children:A.content},C)})},y))})})})}),w_=({className:e,language:t,style:r,isIncomplete:n,...i})=>{let a=ae();return(0,m.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})},eu=(0,T.createContext)({code:""}),tu=()=>(0,T.useContext)(eu),L_=({language:e})=>{let t=ae();return(0,m.jsx)("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:(0,m.jsx)("span",{className:t("ml-1 font-mono lowercase"),children:e})})},R_=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
124
|
+
`;)t--;return e.slice(0,t)},O_=(0,T.lazy)(()=>Dl(()=>import("./highlighted-body-JLMTFACH-D8jkzP7m.js").then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([0,1,2,3]))),D_=({code:e,language:t,className:r,children:n,isIncomplete:i=!1,startLine:a,lineNumbers:s,...l})=>{let o=ae(),{codeBlockMaxHeight:u}=(0,T.useContext)(Ce),d=(0,T.useMemo)(()=>R_(e),[e]),h=(0,T.useMemo)(()=>({bg:"transparent",fg:"inherit",tokens:d.split(`
|
|
125
|
+
`).map(p=>[{content:p,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[d]);return(0,m.jsx)(eu.Provider,{value:{code:e},children:(0,m.jsxs)(w_,{dir:"ltr",isIncomplete:i,language:t,children:[(0,m.jsx)(L_,{language:t}),n?(0,m.jsx)("div",{className:o("pointer-events-none absolute top-2 right-2 z-10 flex items-center"),children:(0,m.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,m.jsx)(T.Suspense,{fallback:(0,m.jsx)(I_,{className:r,language:t,lineNumbers:s,maxHeight:u,result:h,startLine:a,...l}),children:(0,m.jsx)(O_,{className:r,code:d,isIncomplete:i,language:t,lineNumbers:s,maxHeight:u,raw:h,startLine:a,...l})})]})})},P_=e=>(0,m.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),M_=e=>(0,m.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),B_=e=>(0,m.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),F_=e=>(0,m.jsxs)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[(0,m.jsx)("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),(0,m.jsx)("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),H_=e=>(0,m.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),U_=e=>(0,m.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),j_=e=>(0,m.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),z_=e=>(0,m.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),$_=e=>(0,m.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),Y_=e=>(0,m.jsx)("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:(0,m.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"})}),Tr={CheckIcon:P_,CopyIcon:M_,DownloadIcon:B_,ExternalLinkIcon:z_,Loader2Icon:F_,Maximize2Icon:H_,RotateCcwIcon:U_,XIcon:j_,ZoomInIcon:$_,ZoomOutIcon:Y_},ru=(0,T.createContext)(Tr),q_=(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])},Zs=({icons:e,children:t})=>{let r=(0,T.useRef)(e),n=(0,T.useRef)(e?{...Tr,...e}:Tr);q_(r.current,e)||(r.current=e,n.current=e?{...Tr,...e}:Tr);let i=n.current;return(0,m.jsx)(ru.Provider,{value:i,children:t})},et=()=>(0,T.useContext)(ru),nu={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",mermaidAriaLabel:"Mermaid chart",errorMermaid:"Failed to render Mermaid chart",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"},Li=(0,T.createContext)(nu),tt=()=>(0,T.useContext)(Li),Ri=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:i,code:a,...s})=>{let l=ae(),[o,u]=(0,T.useState)(!1),d=(0,T.useRef)(0),{code:h}=tu(),{isAnimating:p}=(0,T.useContext)(Ce),f=tt(),g=a??h,N=async()=>{var C;if(typeof window>"u"||!((C=navigator?.clipboard)!=null&&C.writeText)){t?.(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(g),u(!0),e?.(),d.current=window.setTimeout(()=>u(!1),r))}catch(k){t?.(k)}};(0,T.useEffect)(()=>()=>{window.clearTimeout(d.current)},[]);let y=et(),A=o?y.CheckIcon:y.CopyIcon;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("button",{"aria-label":f.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:f.copyCode,type:"button",...s,children:n??(0,m.jsx)(A,{"aria-hidden":"true",size:14})}),o&&(0,m.jsx)("output",{"aria-live":"polite",className:"sr-only",children:f.copied})]})},ga=(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},Js=(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}},el={"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"},V_=({onDownload:e,onError:t,language:r,children:n,className:i,code:a,...s})=>{let l=ae(),{code:o}=tu(),{isAnimating:u,controls:d}=(0,T.useContext)(Ce),h=tt(),p=et(),f=a??o,g=r&&r in el?el[r]:"txt",N=`${ga(d,"code","file")}.${g}`,y="text/plain",A=()=>{try{Wt(N,f,y),e?.()}catch(C){t?.(C)}};return(0,m.jsx)("button",{"aria-label":h.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:A,title:h.downloadFile,type:"button",...s,children:n??(0,m.jsx)(p.DownloadIcon,{size:14})})},tl=()=>{let{Loader2Icon:e}=et(),t=ae();return(0,m.jsxs)("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[(0,m.jsx)("div",{className:t("h-[46px] w-full bg-muted/80")}),(0,m.jsx)("div",{className:t("flex w-full items-center justify-center p-4"),children:(0,m.jsx)(e,{className:t("size-4 animate-spin")})})]})},W_=/\.[^/.]+$/,G_=({node:e,className:t,src:r,alt:n,onLoad:i,onError:a,showControls:s=!0,showDownloadControl:l=!0,...o})=>{let{DownloadIcon:u}=et(),d=ae(),h=(0,T.useRef)(null),[p,f]=(0,T.useState)(!1),[g,N]=(0,T.useState)(!1),y=tt(),A=o.width!=null||o.height!=null,C=(p||A)&&!g&&s&&l,k=g&&!A;(0,T.useEffect)(()=>{let U=h.current;if(U!=null&&U.complete){let $=U.naturalWidth>0;f($),N(!$)}},[]);let R=(0,T.useCallback)(U=>{f(!0),N(!1),i?.(U)},[i]),D=(0,T.useCallback)(U=>{f(!1),N(!0),a?.(U)},[a]),I=async()=>{if(r)try{let U=await(await fetch(r)).blob(),$=new URL(r,window.location.origin).pathname.split("/").pop()||"",V=$.split(".").pop(),v=$.includes(".")&&V!==void 0&&V.length<=4,F="";if(v)F=$;else{let z=U.type,Y="png";z.includes("jpeg")||z.includes("jpg")?Y="jpg":z.includes("png")?Y="png":z.includes("svg")?Y="svg":z.includes("gif")?Y="gif":z.includes("webp")&&(Y="webp"),F=`${(n||$||"image").replace(W_,"")}.${Y}`}Wt(F,U,U.type)}catch{window.open(r,"_blank")}};return r?r==="streamdown:incomplete-image"?(0,m.jsx)("div",{className:d("group relative my-4 inline-block"),"data-incomplete":"true","data-streamdown":"image-wrapper",children:(0,m.jsx)("div",{className:d("h-24 w-48 animate-pulse rounded-lg bg-muted"),"data-streamdown":"image-placeholder"})}):(0,m.jsxs)("div",{className:d("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[(0,m.jsx)("img",{alt:n,className:d("max-w-full rounded-lg",k&&"hidden",t),"data-streamdown":"image",onError:D,onLoad:R,ref:h,src:r,...o}),k&&(0,m.jsx)("span",{className:d("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:y.imageNotAvailable}),s&&(0,m.jsx)("div",{className:d("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"),"data-streamdown":"image-overlay"}),C&&(0,m.jsx)("button",{className:d("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:I,title:y.downloadImage,type:"button",children:(0,m.jsx)(u,{size:14})})]}):null},Ea=e=>{let t=typeof e=="function"?e():e;return t??document.body},Sr=0,Ta=()=>{Sr+=1,Sr===1&&(document.body.style.overflow="hidden")},ba=()=>{Sr=Math.max(0,Sr-1),Sr===0&&(document.body.style.overflow="")},Q_=({url:e,isOpen:t,onClose:r,onConfirm:n})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:s,XIcon:l}=et(),o=ae(),[u,d]=(0,T.useState)(!1),h=tt(),{portal:p}=(0,T.useContext)(Ce),f=(0,T.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3)}catch{}},[e]),g=(0,T.useCallback)(()=>{n(),r()},[n,r]);if((0,T.useEffect)(()=>{if(t){Ta();let y=A=>{A.key==="Escape"&&r()};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),ba()}}},[t,r]),!t||typeof document>"u")return null;let N=(0,m.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:y=>{y.key==="Escape"&&r()},role:"button",tabIndex:0,children:(0,m.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:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:[(0,m.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:h.close,type:"button",children:(0,m.jsx)(l,{size:16})}),(0,m.jsxs)("div",{className:o("flex flex-col gap-2"),children:[(0,m.jsxs)("div",{className:o("flex items-center gap-2 font-semibold text-lg"),children:[(0,m.jsx)(s,{size:20}),(0,m.jsx)("span",{children:h.openExternalLink})]}),(0,m.jsx)("p",{className:o("text-muted-foreground text-sm"),children:h.externalLinkWarning})]}),(0,m.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,m.jsxs)("div",{className:o("flex gap-2"),children:[(0,m.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:f,type:"button",children:u?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(i,{size:14}),(0,m.jsx)("span",{children:h.copied})]}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(a,{size:14}),(0,m.jsx)("span",{children:h.copyLink})]})}),(0,m.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,m.jsx)(s,{size:14}),(0,m.jsx)("span",{children:h.openLink})]})]})]})});return(0,aa.createPortal)(N,Ea(p))},Oi=(0,T.createContext)(null),ka=()=>(0,T.useContext)(Oi),O1=()=>{var e;let t=ka();return(e=t?.code)!=null?e:null},xa=()=>{var e;let t=ka();return(e=t?.mermaid)!=null?e:null},K_=e=>{var t;let r=ka();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},iu=/<svg\b[^>]*>/i,X_=/\bviewBox=(['"])(.*?)\1/i,Z_=/[\s,]+/,J_=/\swidth=(['"]).*?\1/gi,ey=/\sheight=(['"]).*?\1/gi,rl=/\sstyle=(['"])(.*?)\1/i,ty=/^width\s*:/i,ry=/^height\s*:/i,ny=/^max-width\s*:/i,nl=/^<svg/i,au=e=>{let t=e.match(iu);if(!t)return null;let r=t[0].match(X_),n=r?.[2];if(!n)return null;let i=n.trim().split(Z_).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},iy=e=>{let t=e.match(iu);if(!t)return e;try{let r=t[0],n=au(e);if(!n)return e;let{width:i,height:a}=n,s=r.replace(J_,"").replace(ey,""),l=s.match(rl),o=`width:${i}px;height:${a}px;max-width:none;`;if(l){let u=l[1],d=l[2].split(";").map(p=>p.trim()).filter(Boolean).filter(p=>!(ty.test(p)||ry.test(p)||ny.test(p))).join(";"),h=`${o}${d?`${d};`:""}`;s=s.replace(rl,` style=${u}${h}${u}`)}else s=s.replace(nl,`<svg style="${o}"`);return s=s.replace(nl,`<svg width="${i}" height="${a}"`),e.replace(r,s)}catch{return e}},ay=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},sy=(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,d=l.height*n;o.width=u,o.height=d;let h=o.getContext("2d");if(!h){a(new Error("Failed to create 2D canvas context for PNG export"));return}h.drawImage(l,0,0,u,d),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})},su=({chart:e,children:t,className:r,onDownload:n,config:i,onError:a})=>{let s=ae(),[l,o]=(0,T.useState)(!1),u=(0,T.useRef)(null),{isAnimating:d,controls:h}=(0,T.useContext)(Ce),p=et(),f=xa(),g=tt(),N=ga(h,"mermaid","diagram"),y=async A=>{try{if(A==="mmd"){Wt(`${N}.mmd`,e,"text/plain"),o(!1),n?.(A);return}if(!f){a?.(new Error("Mermaid plugin not available"));return}let C=f.getMermaid(i),k=e.split("").reduce((U,$)=>(U<<5)-U+$.charCodeAt(0)|0,0),R=`mermaid-${Math.abs(k)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:D}=await C.render(R,e);if(!D){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}let I=ay(D);if(A==="svg"){Wt(`${N}.svg`,I,"image/svg+xml"),o(!1),n?.(A);return}if(A==="png"){let U=await sy(I);Wt(`${N}.png`,U,"image/png"),n?.(A),o(!1);return}}catch(C){a?.(C)}};return(0,T.useEffect)(()=>{let A=C=>{let k=C.composedPath();u.current&&!k.includes(u.current)&&o(!1)};return document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A)}},[]),(0,m.jsxs)("div",{className:s("relative"),ref:u,children:[(0,m.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:d,onClick:()=>o(!l),title:g.downloadDiagram,type:"button",children:t??(0,m.jsx)(p.DownloadIcon,{"aria-hidden":"true",size:14})}),l?(0,m.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,m.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:()=>y("svg"),title:g.downloadDiagramAsSvg,type:"button",children:g.mermaidFormatSvg}),(0,m.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:()=>y("png"),title:g.downloadDiagramAsPng,type:"button",children:g.mermaidFormatPng}),(0,m.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:()=>y("mmd"),title:g.downloadDiagramAsMmd,type:"button",children:g.mermaidFormatMmd})]}):null]})},ly=({chart:e,config:t,onFullscreen:r,onExit:n,className:i,...a})=>{let{Maximize2Icon:s,XIcon:l}=et(),o=ae(),[u,d]=(0,T.useState)(!1),{isAnimating:h,controls:p,portal:f}=(0,T.useContext)(Ce),g=tt(),N=(()=>{if(typeof p=="boolean")return p;let k=p.mermaid;return k===!1?!1:k===!0||k===void 0?!0:k.panZoom!==!1})(),y=(()=>{if(typeof p=="boolean")return p;let k=p.mermaid;return k===!1?!1:k===!0||k===void 0?!0:k.download!==!1})(),A=(()=>{if(typeof p=="boolean")return p;let k=p.mermaid;return k===!1?!1:k===!0||k===void 0?!0:k.copy!==!1})(),C=()=>{d(!u)};return(0,T.useEffect)(()=>{if(u){Ta();let k=R=>{R.key==="Escape"&&d(!1)};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k),ba()}}},[u]),(0,T.useEffect)(()=>{u?r?.():n&&n()},[u,r,n]),(0,m.jsxs)(m.Fragment,{children:[(0,m.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:h,onClick:C,title:g.viewFullscreen,type:"button",...a,"aria-label":g.viewFullscreen,children:(0,m.jsx)(s,{"aria-hidden":"true",size:14})}),u?(0,aa.createPortal)((0,m.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:C,onKeyDown:k=>{k.key==="Escape"&&C()},role:"dialog",children:[(0,m.jsxs)("div",{className:o("absolute top-4 right-4 z-10 flex items-center gap-1"),onClick:k=>k.stopPropagation(),onKeyDown:k=>k.stopPropagation(),role:"presentation",children:[y?(0,m.jsx)(su,{chart:e,config:t}):null,A?(0,m.jsx)(Ri,{code:e}):null,(0,m.jsx)("button",{"aria-label":g.exitFullscreen,className:o("rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:C,title:g.exitFullscreen,type:"button",children:(0,m.jsx)(l,{"aria-hidden":"true",size:20})})]}),(0,m.jsx)("div",{className:o("flex size-full items-center justify-center p-4"),onClick:k=>k.stopPropagation(),onKeyDown:k=>k.stopPropagation(),role:"presentation",children:(0,m.jsx)(IC,{chart:e,className:o("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:N})})]}),Ea(f)):null]})};function Di(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"?`
|
|
126
|
+
`:Array.from(r.childNodes).map(Di).join("")}var lu=e=>{let t=[],r=[],n=e.querySelectorAll("thead th");for(let a of n)t.push(Di(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(Di(o).trim());r.push(s)}return{headers:t,rows:r}},ou=e=>{var t;if(typeof e!="object")return",";let r=e.table;return typeof r!="object"?",":(t=r.csvSeparator)!=null?t:","},cu=(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 d=!1;for(let h of u)if(h===r||h==='"'||h===`
|
|
127
|
+
`||h==="\r"){d=!0;break}return d?`"${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(`
|
|
128
|
+
`)},oy=e=>{let{headers:t,rows:r}=e,n=l=>{let o=!1;for(let d of l)if(d===" "||d===`
|
|
129
|
+
`||d==="\r"){o=!0;break}if(!o)return l;let u=[];for(let d of l)d===" "?u.push("\\t"):d===`
|
|
130
|
+
`?u.push("\\n"):d==="\r"?u.push("\\r"):u.push(d);return u.join("")},i=t.length>0?r.length+1:r.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(n).join(" "),s+=1);for(let l of r)a[s]=l.map(n).join(" "),s+=1;return a.join(`
|
|
131
|
+
`)},ni=e=>{let t=!1;for(let n of e)if(n==="\\"||n==="|"||n===`
|
|
132
|
+
`||n==="&"||n==="<"||n===">"){t=!0;break}if(!t)return e;let r=[];for(let n of e)n==="\\"?r.push("\\\\"):n==="|"?r.push("\\|"):n===`
|
|
133
|
+
`?r.push("<br>"):n==="&"?r.push("&"):n==="<"?r.push("<"):n===">"?r.push(">"):r.push(n);return r.join("")},uu=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=>ni(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?ni(l[u]):"";n[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=l.map(u=>ni(u));n[i]=`| ${o.join(" | ")} |`,i+=1}return n.join(`
|
|
134
|
+
`)},hu=({children:e,className:t,onCopy:r,onError:n,timeout:i=2e3})=>{let a=ae(),[s,l]=(0,T.useState)(!1),[o,u]=(0,T.useState)(!1),d=(0,T.useRef)(null),h=(0,T.useRef)(0),{isAnimating:p,controls:f}=(0,T.useContext)(Ce),g=tt(),N=ou(f),y=async k=>{var R,D;if(typeof window>"u"||!((R=navigator?.clipboard)!=null&&R.write)){n?.(new Error("Clipboard API not available"));return}try{let I=(D=d.current)==null?void 0:D.closest('[data-streamdown="table-wrapper"]'),U=I?.querySelector("table");if(!U){n?.(new Error("Table not found"));return}let $=lu(U),V="";k==="csv"?V=cu($,N):k==="tsv"?V=oy($):V=uu($);let v=new ClipboardItem({"text/plain":new Blob([V],{type:"text/plain"}),"text/html":new Blob([U.outerHTML],{type:"text/html"})});await navigator.clipboard.write([v]),u(!0),l(!1),r?.(k),h.current=window.setTimeout(()=>u(!1),i)}catch(I){n?.(I)}};(0,T.useEffect)(()=>{let k=R=>{let D=R.composedPath();d.current&&!D.includes(d.current)&&l(!1)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k),window.clearTimeout(h.current)}},[]);let A=et(),C=o?A.CheckIcon:A.CopyIcon;return(0,m.jsxs)("div",{className:a("relative"),ref:d,children:[(0,m.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,m.jsx)(C,{height:14,width:14})}),s?(0,m.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,m.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("md"),title:g.copyTableAsMarkdown,type:"button",children:g.tableFormatMarkdown}),(0,m.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("csv"),title:g.copyTableAsCsv,type:"button",children:g.tableFormatCsv}),(0,m.jsx)("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("tsv"),title:g.copyTableAsTsv,type:"button",children:g.tableFormatTsv})]}):null]})},du=({children:e,className:t,onDownload:r,onError:n})=>{let i=ae(),[a,s]=(0,T.useState)(!1),l=(0,T.useRef)(null),{isAnimating:o,controls:u}=(0,T.useContext)(Ce),d=tt(),h=et(),p=ou(u),f=g=>{var N;try{let y=(N=l.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),A=y?.querySelector("table");if(!A){n?.(new Error("Table not found"));return}let C=lu(A),k=g==="csv"?cu(C,p):uu(C),R=g==="csv"?"csv":"md";Wt(`${ga(u,"table","table")}.${R}`,k,g==="csv"?"text/csv":"text/markdown"),s(!1),r?.(g)}catch(y){n?.(y)}};return(0,T.useEffect)(()=>{let g=N=>{let y=N.composedPath();l.current&&!y.includes(l.current)&&s(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[]),(0,m.jsxs)("div",{className:i("relative"),ref:l,children:[(0,m.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:d.downloadTable,type:"button",children:e??(0,m.jsx)(h.DownloadIcon,{size:14})}),a?(0,m.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,m.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("csv"),title:d.downloadTableAsCsv,type:"button",children:d.tableFormatCsv}),(0,m.jsx)("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("markdown"),title:d.downloadTableAsMarkdown,type:"button",children:d.tableFormatMarkdown})]}):null]})},cy=({children:e,className:t,showCopy:r=!0,showDownload:n=!0})=>{let{Maximize2Icon:i,XIcon:a}=et(),s=ae(),[l,o]=(0,T.useState)(!1),{isAnimating:u,portal:d}=(0,T.useContext)(Ce),h=tt(),p=()=>{o(!0)},f=()=>{o(!1)};return(0,T.useEffect)(()=>{if(l){Ta();let g=N=>{N.key==="Escape"&&o(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),ba()}}},[l]),(0,m.jsxs)(m.Fragment,{children:[(0,m.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:h.viewFullscreen,type:"button",children:(0,m.jsx)(i,{size:14})}),l?(0,aa.createPortal)((0,m.jsx)("div",{"aria-label":h.viewFullscreen,"aria-modal":"true",className:s("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:f,onKeyDown:g=>{g.key==="Escape"&&f()},role:"dialog",children:(0,m.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,m.jsxs)("div",{className:s("flex items-center justify-end gap-1 p-4"),children:[r?(0,m.jsx)(hu,{}):null,n?(0,m.jsx)(du,{}):null,(0,m.jsx)("button",{className:s("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:f,title:h.exitFullscreen,type:"button",children:(0,m.jsx)(a,{size:20})})]}),(0,m.jsx)("div",{className:s("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:(0,m.jsx)("table",{className:s("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),Ea(d)):null]})},uy=({children:e,className:t,maxHeight:r,showControls:n,showCopy:i=!0,showDownload:a=!0,showFullscreen:s=!0,...l})=>{let o=ae(),{isAnimating:u}=(0,T.useContext)(Ce),d=Zc(r),h=Jc(u,!!d,e),p=n&&i,f=n&&a,g=n&&s,N=p||f||g;return(0,m.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,m.jsxs)("div",{className:o("flex items-center justify-end gap-1"),children:[p?(0,m.jsx)(hu,{}):null,f?(0,m.jsx)(du,{}):null,g?(0,m.jsx)(cy,{showCopy:p,showDownload:f,children:e}):null]}):null,(0,m.jsx)("div",{className:o("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),ref:h,style:d?{maxHeight:d}:void 0,children:(0,m.jsx)("table",{className:o("w-full divide-y divide-border",t),"data-streamdown":"table",...l,children:e})})]})},hy=/startLine=(\d+)/,dy=/\bnoLineNumbers\b/,fy=(0,T.lazy)(()=>Dl(()=>import("./mermaid-WFAXDIZX-qzZppTtW.js").then(e=>({default:e.Mermaid})),[])),py=/language-([^\s]+)/,my="node";function Ee(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!==my&&!Object.is(n[a],i[a]))return!1;return!0}function gy(e,t){var r,n;return((r=e?.properties)==null?void 0:r.metastring)===((n=t?.properties)==null?void 0:n.metastring)}var mn=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,ii=(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},il=(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},Zr=(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},Ey=(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},Aa=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e})},(e,t)=>Ee(e,t));Aa.displayName="MarkdownOl";var fu=(0,T.memo)(({children:e,className:t,node:r,...n})=>{var i;let a=ae(),s=Array.isArray(e)?e.filter(o=>o!==`
|
|
135
|
+
`&&o!==""):[e],l=s.length===1&&(0,T.isValidElement)(s[0])&&(s[0].type===_a||((i=s[0].props.node)==null?void 0:i.tagname)==="p")?s[0].props.children:e;return(0,m.jsx)("li",{className:a("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:l})},(e,t)=>Ee(e,t));fu.displayName="MarkdownLi";var pu=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e})},(e,t)=>Ee(e,t));pu.displayName="MarkdownUl";var mu=(0,T.memo)(({className:e,node:t,...r})=>{let n=ae();return(0,m.jsx)("hr",{className:n("my-6 border-border",e),"data-streamdown":"horizontal-rule",...r})},(e,t)=>Ee(e,t));mu.displayName="MarkdownHr";var gu=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("span",{className:i("font-semibold",t),"data-streamdown":"strong",...n,children:e})},(e,t)=>Ee(e,t));gu.displayName="MarkdownStrong";var Ty=({children:e,className:t,href:r,node:n,...i})=>{let a=ae(),{linkSafety:s}=(0,T.useContext)(Ce),[l,o]=(0,T.useState)(!1),u=r==="streamdown:incomplete-link",d=(0,T.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]),h=(0,T.useCallback)(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),p=(0,T.useCallback)(()=>{o(!1)},[]),f={url:r??"",isOpen:l,onClose:p,onConfirm:h};return s!=null&&s.enabled&&r?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("button",{className:a("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:d,type:"button",children:e}),s.renderModal?s.renderModal(f):(0,m.jsx)(Q_,{...f})]}):(0,m.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})},Eu=(0,T.memo)(Ty,(e,t)=>Ee(e,t));Eu.displayName="MarkdownA";var Tu=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e})},(e,t)=>Ee(e,t));Tu.displayName="MarkdownH1";var bu=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e})},(e,t)=>Ee(e,t));bu.displayName="MarkdownH2";var ku=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e})},(e,t)=>Ee(e,t));ku.displayName="MarkdownH3";var xu=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e})},(e,t)=>Ee(e,t));xu.displayName="MarkdownH4";var Au=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e})},(e,t)=>Ee(e,t));Au.displayName="MarkdownH5";var _u=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e})},(e,t)=>Ee(e,t));_u.displayName="MarkdownH6";var yu=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let{controls:i,tableMaxHeight:a}=(0,T.useContext)(Ce),s=mn(i,"table"),l=ii(i,"copy"),o=ii(i,"download"),u=ii(i,"fullscreen");return(0,m.jsx)(uy,{className:t,maxHeight:a,showControls:s,showCopy:l,showDownload:o,showFullscreen:u,...n,children:e})},(e,t)=>Ee(e,t));yu.displayName="MarkdownTable";var Cu=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e})},(e,t)=>Ee(e,t));Cu.displayName="MarkdownThead";var Su=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...n,children:e})},(e,t)=>Ee(e,t));Su.displayName="MarkdownTbody";var Nu=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("tr",{className:i("border-border",t),"data-streamdown":"table-row",...n,children:e})},(e,t)=>Ee(e,t));Nu.displayName="MarkdownTr";var vu=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.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)=>Ee(e,t));vu.displayName="MarkdownTh";var Iu=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e})},(e,t)=>Ee(e,t));Iu.displayName="MarkdownTd";var wu=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.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)=>Ee(e,t));wu.displayName="MarkdownBlockquote";var Lu=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...n,children:e})},(e,t)=>Ee(e,t));Lu.displayName="MarkdownSup";var Ru=(0,T.memo)(({children:e,className:t,node:r,...n})=>{let i=ae();return(0,m.jsx)("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...n,children:e})},(e,t)=>Ee(e,t));Ru.displayName="MarkdownSub";var Ou=(0,T.memo)(({children:e,className:t,node:r,...n})=>{if("data-footnotes"in n){let i=s=>{var l,o;if(!(0,T.isValidElement)(s))return!1;let u=Array.isArray(s.props.children)?s.props.children:[s.props.children],d=!1,h=!1;for(let p of u)if(p){if(typeof p=="string")p.trim()!==""&&(d=!0);else if((0,T.isValidElement)(p))if(((l=p.props)==null?void 0:l["data-footnote-backref"])!==void 0)h=!0;else{let f=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let g of f){if(typeof g=="string"&&g.trim()!==""){d=!0;break}if((0,T.isValidElement)(g)&&((o=g.props)==null?void 0:o["data-footnote-backref"])===void 0){d=!0;break}}}}return h&&!d},a=Array.isArray(e)?e.map(s=>{if(!(0,T.isValidElement)(s))return s;if(s.type===Aa){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,m.jsx)("section",{className:t,...n,children:a}):null}return(0,m.jsx)("section",{className:t,...n,children:e})},(e,t)=>Ee(e,t));Ou.displayName="MarkdownSection";var by=({node:e,className:t,children:r,...n})=>{var i,a;let s=ae(),l=!("data-block"in n),{mermaid:o,controls:u,lineNumbers:d}=(0,T.useContext)(Ce),h=xa(),p=Xc(),f=t?.match(py),g=(i=f?.at(1))!=null?i:"",N=K_(g);if(l)return(0,m.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 y=(a=e?.properties)==null?void 0:a.metastring,A=y?.match(hy),C=A?Number.parseInt(A[1],10):void 0,k=C!==void 0&&C>=1?C:void 0,R=!(y&&dy.test(y))&&d!==!1,D="";if((0,T.isValidElement)(r)&&r.props&&typeof r.props=="object"&&"children"in r.props&&typeof r.props.children=="string"?D=r.props.children:typeof r=="string"&&(D=r),N){let F=N.component;return(0,m.jsx)(T.Suspense,{fallback:(0,m.jsx)(tl,{}),children:(0,m.jsx)(F,{code:D,isIncomplete:p,language:g,meta:y})})}if(g==="mermaid"&&h){let F=mn(u,"mermaid"),z=Zr(u,"download"),Y=Zr(u,"copy"),te=Zr(u,"fullscreen"),Q=Zr(u,"panZoom"),q=F&&(z||Y||te);return(0,m.jsx)(T.Suspense,{fallback:(0,m.jsx)(tl,{}),children:(0,m.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,m.jsx)("div",{className:s("flex h-8 items-center text-muted-foreground text-xs"),children:(0,m.jsx)("span",{className:s("ml-1 font-mono lowercase"),children:"mermaid"})}),q?(0,m.jsx)("div",{className:s("pointer-events-none absolute top-2 right-2 z-10 flex items-center"),children:(0,m.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:[z?(0,m.jsx)(su,{chart:D,config:o?.config}):null,Y?(0,m.jsx)(Ri,{code:D,...Js(u,"mermaid")}):null,te?(0,m.jsx)(ly,{chart:D,config:o?.config}):null]})}):null,(0,m.jsx)("div",{className:s("overflow-hidden rounded-md border border-border bg-background"),children:(0,m.jsx)(fy,{chart:D,config:o?.config,showControls:Q})})]})})}let I=mn(u,"code"),U=il(u,"download"),$=il(u,"copy"),{"data-block":V,...v}=n;return(0,m.jsx)(D_,{className:t,code:D,isIncomplete:p,language:g,lineNumbers:R,startLine:k,...v,children:I?(0,m.jsxs)(m.Fragment,{children:[U?(0,m.jsx)(V_,{code:D,language:g}):null,$?(0,m.jsx)(Ri,{...Js(u,"code")}):null]}):null})},Du=(0,T.memo)(by,(e,t)=>Ee(e,t)&&gy(e.node,t.node));Du.displayName="MarkdownCode";var ky=({node:e,className:t,...r})=>{let{controls:n}=(0,T.useContext)(Ce),i=mn(n,"image"),a=i&&Ey(n,"download");return(0,m.jsx)(G_,{className:t,node:e,showControls:i,showDownloadControl:a,...r})},Pu=(0,T.memo)(ky,(e,t)=>Ee(e,t));Pu.displayName="MarkdownImg";var _a=(0,T.memo)(({children:e,node:t,...r})=>{let n=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(n.length===1&&(0,T.isValidElement)(n[0])){let i=n[0].props.node,a=i?.tagName;if(a==="img")return(0,m.jsx)(m.Fragment,{children:e});if(a==="code"&&"data-block"in n[0].props)return(0,m.jsx)(m.Fragment,{children:e})}return(0,m.jsx)("p",{...r,children:e})},(e,t)=>Ee(e,t));_a.displayName="MarkdownParagraph";var xy={ol:Aa,li:fu,ul:pu,hr:mu,strong:gu,a:Eu,h1:Tu,h2:bu,h3:ku,h4:xu,h5:Au,h6:_u,table:yu,thead:Cu,tbody:Su,tr:Nu,th:vu,td:Iu,blockquote:wu,code:Du,img:Pu,pre:({children:e})=>(0,T.isValidElement)(e)?(0,T.cloneElement)(e,{"data-block":"true"}):e,sup:Lu,sub:Ru,p:_a,section:Ou},Ay=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,_y=/\p{L}/u;function Mu(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(Ay.test(a)){r??="rtl",i+=1;continue}_y.test(a)&&(r??="ltr",n+=1)}return i>n?"rtl":n>i?"ltr":r??"ltr"}var yy=/^[ \t]{0,3}(`{3,}|~{3,})/,Cy=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,al=e=>{let t=e.split(`
|
|
136
|
+
`),r=null,n=0;for(let i of t){let a=yy.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},Sy=e=>{let t=e.split(`
|
|
137
|
+
`);for(let r of t){let n=r.trim();if(n.length>0&&n.includes("|")&&Cy.test(n))return!0}return!1},Ny=()=>e=>{Ge(e,"html",(t,r,n)=>{!n||typeof r!="number"||(n.children[r]={type:"text",value:t.value})})},sl=[],ll={allowDangerousHtml:!0},Jr=new WeakMap,vy=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 d=0;d<o.length;d+=1){let h=o[d];if(d>0&&(u+=","),Array.isArray(h)){let[p,f]=h;if(typeof p=="function"){let g=Jr.get(p);g||(g=p.name,Jr.set(p,g)),u+=g}else u+=String(p);u+=":",u+=JSON.stringify(f)}else if(typeof h=="function"){let p=Jr.get(h);p||(p=h.name,Jr.set(h,p)),u+=p}else u+=String(h)}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()}},ol=new vy,Bu=e=>{let t=Iy(e),r=e.children||"";return My(t.runSync(t.parse(r),r),e)},Iy=e=>{let t=ol.get(e);if(t)return t;let r=Ly(e);return ol.set(e,r),r},wy=e=>e.some(t=>Array.isArray(t)?t[0]===gi:t===gi),Ly=e=>{let t=e.rehypePlugins||sl,r=e.remarkPlugins||sl,n=wy(t)?r:[...r,Ny],i=e.remarkRehypeOptions?{...ll,...e.remarkRehypeOptions}:ll;return rA().use(tx).use(n).use(Bx,i).use(t)},Ry=e=>e,Oy=(e,t,r,n)=>{r?e.children.splice(t,1):e.children[t]={type:"text",value:n}},Dy=(e,t)=>{var r;for(let n in Qn)if(Object.hasOwn(Qn,n)&&Object.hasOwn(e.properties,n)){let i=e.properties[n],a=Qn[n];(a===null||a.includes(e.tagName))&&(e.properties[n]=(r=t(String(i||""),n,e))!=null?r:void 0)}},Py=(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},My=(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||Ry;Ge(e,(u,d,h)=>{if(u.type==="raw"&&h&&typeof d=="number")return Oy(h,d,a,u.value),d;if(u.type==="element"&&(Dy(u,o),Py(u,d,h,n,i,r)&&h&&typeof d=="number"))return s&&u.children?h.children.splice(d,1,...u.children):h.children.splice(d,1),d})}return c0(e,{Fragment:m.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0})},By=/\[\^[\w-]{1,200}\](?!:)/,Fy=/\[\^[\w-]{1,200}\]:/,Hy=/<([A-Za-z][\w:-]*)[\s>/]/,Uy=/^ {0,3}\[[^\]]+\]:/m,jy=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),cl=new Map,ul=new Map,zy=e=>{let t=e.toLowerCase(),r=cl.get(t);if(r)return r;let n=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return cl.set(t,n),n},$y=e=>{let t=e.toLowerCase(),r=ul.get(t);if(r)return r;let n=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return ul.set(t,n),n},hl=(e,t)=>{if(jy.has(t.toLowerCase()))return 0;let r=e.match(zy(t));if(!r)return 0;let n=0;for(let i of r)i.trimEnd().endsWith("/>")||(n+=1);return n},dl=(e,t)=>{let r=e.match($y(t));return r?r.length:0},Yy=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},qy=/\r\n|\r/g,Fu=e=>{let t=new We({gfm:!0});return{tokens:t.blockTokens(e),hasLinkDefinitions:Object.keys(t.tokens.links).length>0}},jt=null,Vy=`
|
|
138
|
+
|
|
139
|
+
`,Wy=e=>{for(let t=e.length-3;t>=0;t-=1)if(e[t].endsWith(Vy))return t+1;return 0},Hu=e=>` ${e}`.slice(1),Uu=e=>e.map(Hu),ju=e=>{let t=[],r=[],n=!1;for(let i of e){let a=i.raw,s=t.length;if(r.length>0){t[s-1]+=a;let l=r.at(-1),o=hl(a,l),u=dl(a,l);for(let d=0;d<o;d+=1)r.push(l);for(let d=0;d<u;d+=1)r.length>0&&r.at(-1)===l&&r.pop();continue}if(i.type==="html"&&i.block){let l=a.match(Hy);if(l){let o=l[1];hl(a,o)>dl(a,o)&&r.push(o)}}if(i.type==="space"&&s>0){t[s-1]+=a;continue}if(s>0&&!n){let l=t[s-1];if(Yy(l)%2===1){t[s-1]=l+a;continue}}t.push(a),i.type!=="space"&&(n=i.type==="code")}return t},Gy=(e,t)=>{if(t.length<=e.input.length||t.slice(0,e.input.length)!==e.input||Uy.test(t))return null;let r=Wy(e.blocks);if(r===0)return null;let n=e.verifiedCount,i=e.verifiedLength;if(n>r){n=r,i=0;for(let l=0;l<n;l+=1)i+=e.blocks[l].length}for(;n<r&&t.startsWith(e.blocks[n],i);)i+=e.blocks[n].length,n+=1;if(n!==r)return null;let a=Fu(t.slice(i));if(a.hasLinkDefinitions)return null;let s=Uu(ju(a.tokens));return{input:t,blocks:e.blocks.slice(0,r).concat(s),verifiedCount:n,verifiedLength:i}},Qy=e=>{let t=By.test(e),r=Fy.test(e);if(t||r)return[e];let n=e.includes("\r")?e.replace(qy,`
|
|
140
|
+
`):e;if(jt?.input===n)return jt.blocks;let i=jt?Gy(jt,n):null;if(!i){let{tokens:a,hasLinkDefinitions:s}=Fu(n);i={input:n,blocks:s?[Hu(n)]:Uu(ju(a)),verifiedCount:0,verifiedLength:0}}return jt=i,i.blocks},Ky=/^\n*/,Xy=/\n*$/,Pi=/\n\n/g,Zy=(e,t,r)=>t.includes(`
|
|
141
|
+
`)?`${e}${t.replace(Pi,`
|
|
142
|
+
<!---->
|
|
143
|
+
`).replace(Ky,`
|
|
144
|
+
|
|
145
|
+
`).replace(Xy,`
|
|
146
|
+
|
|
147
|
+
`)}${r}
|
|
148
|
+
|
|
149
|
+
`:e+t+r,Jy=(e,t)=>{let r=new RegExp(`<(${t})(?=[\\s>/])([^>]*)>`,"gi"),n="",i=0,a=r.exec(e);for(;a;){let s=a[0],l=a[1],o=a.index+s.length,u=e.slice(o);if(new RegExp(`</${l}\\s*>`,"i").test(u)){a=r.exec(e);continue}if(n+=e.slice(i,a.index),u.length===0){n+=s,i=o,a=r.exec(e);continue}if(u.startsWith(`
|
|
150
|
+
|
|
151
|
+
`)){let p=u.slice(2).replace(Pi,`
|
|
152
|
+
<!---->
|
|
153
|
+
`);n+=`${s}
|
|
154
|
+
|
|
155
|
+
${p}`,i=e.length;break}if(!u.startsWith(`
|
|
156
|
+
`)){n+=s,i=o,a=r.exec(e);continue}let d=u.slice(1);if(d.trim().length===0){n+=s,i=o,a=r.exec(e);continue}let h=d.replace(Pi,`
|
|
157
|
+
<!---->
|
|
158
|
+
`);n+=`${s}
|
|
159
|
+
|
|
160
|
+
${h}`,i=e.length;break}return i===0?e:n+e.slice(i)},eC=(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)=>Zy(s,l,o)),r=Jy(r,n)}return r},tC=/([\\`*_~[\]|])/g,rC=e=>e.replace(tC,"\\$1"),nC=(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+rC(l).replace(/\n\n/g," ")+o)}return r},iC=new Set(["blockquote","dd","dt","figcaption","h1","h2","h3","h4","h5","h6","li","p","td","th"]),zu=new Set(["code","kbd","pre","samp","var"]);function $u(e){return e.children.map(t=>t.type==="text"?t.value:t.type==="element"&&!zu.has(t.tagName)?$u(t):"").join("")}function aC(){return e=>{Ge(e,"element",t=>{if(zu.has(t.tagName)){t.properties??={},t.properties.dir="ltr";return}iC.has(t.tagName)&&(t.properties??={},typeof t.properties.dir!="string"&&(t.properties.dir=Mu($u(t))))})}}var Yu=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(Yu).join(""):"",sC=e=>t=>{if(!e||e.length===0)return;let r=new Set(e.map(n=>n.toLowerCase()));Ge(t,"element",n=>{if(r.has(n.tagName.toLowerCase())){let i=Yu(n);n.children=i?[{type:"text",value:i}]:[]}})},lC=()=>e=>{Ge(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})})},oC=/^([a-zA-Z][a-zA-Z\d+\-.]*:)/,cC=e=>new Set(e.map(t=>t.trim().toLowerCase()).filter(t=>t.length>0).map(t=>t.endsWith(":")?t:`${t}:`));function uC(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=oC.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 hC=(e=[])=>{let t=cC(e);return(r,n)=>{var i;if(t.size===0)return;let a=String((i=n.value)!=null?i:"");Ge(r,"link",(s,l,o)=>{if(!(!o||l===void 0)&&uC(s,t,a))return o.children.splice(l,1,...s.children),l})}},fl="data-sd-caret-hidden",dC=()=>{},fC=()=>dC,pC=e=>{let t=(0,T.useRef)(null),r=(0,T.useRef)(null),n=(0,T.useSyncExternalStore)(fC,()=>!0,()=>!1);return(0,T.useLayoutEffect)(()=>{var i,a;let s=e&&(a=(i=t.current)==null?void 0:i.lastElementChild)!=null?a:null,l=r.current;l!==s&&(l?.removeAttribute(fl),s?.setAttribute(fl,""),r.current=s)}),{containerRef:t,showCaret:n||!e}},pl=/^[a-z]/,mC=/^[ \t]*<[\w!/?-]/,gC=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,EC=e=>typeof e!="string"||e.length===0||!mC.test(e)?e:e.replace(gC,"$1"),ml,gl,El,Tl,bl,kl,an={...gt,clobberPrefix:"",protocols:{...gt.protocols,href:[...(gl=(ml=gt.protocols)==null?void 0:ml.href)!=null?gl:[],"tel","streamdown"],src:[...(Tl=(El=gt.protocols)==null?void 0:El.src)!=null?Tl:[],"streamdown"]},attributes:{...gt.attributes,code:[...(kl=(bl=gt.attributes)==null?void 0:bl.code)!=null?kl:[],"metastring"]}},Mi={raw:gi,sanitize:[Po,an],harden:[$h,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},TC={gfm:[ob,{}],codeMeta:lC},xl=Object.values(Mi),bC=Object.values(TC),kC={block:" ▋",circle:" ●"},qu=["github-light","github-dark"],Vu={enabled:!0},Ce=(0,T.createContext)({codeBlockMaxHeight:400,shikiTheme:qu,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:Vu,portal:void 0,tableMaxHeight:300}),Wu=(0,T.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:r,index:n,isIncomplete:i,dir:a,animatePlugin:s,...l})=>{(0,T.useLayoutEffect)(()=>{s?.commit()});let o=typeof e=="string"&&r?EC(e):e,u=(0,m.jsx)(Bu,{...l,children:o});return(0,m.jsx)(Kc.Provider,{value:i,children:a?(0,m.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)});Wu.displayName="Block";var Bi=e=>{let t={};for(let[r,n]of Object.entries(e))(r.startsWith("data-")||r.startsWith("aria-"))&&(t[r]=n);return t},xC=(e,t)=>{let r=Bi(e),n=Bi(t),i=Object.keys(r);return i.length===Object.keys(n).length&&i.every(a=>Object.hasOwn(n,a)&&r[a]===n[a])},ya=(0,T.memo)(({children:e,mode:t="streaming",dir:r,parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:s=xl,remarkPlugins:l=bC,className:o,shikiTheme:u,mermaid:d,codeBlockMaxHeight:h=400,controls:p=!0,isAnimating:f=!1,tableMaxHeight:g=300,animated:N,BlockComponent:y=Wu,parseMarkdownIntoBlocksFn:A=Qy,caret:C,plugins:k,remend:R,linkSafety:D=Vu,portal:I,lineNumbers:U=!0,allowedTags:$,fallbackComponent:V,literalTagContent:v,disableAutolinkProtocols:F,translations:z,icons:Y,prefix:te,onAnimationStart:Q,onAnimationEnd:q,...P})=>{let W=(0,T.useId)(),J=Bi(P),x=(0,T.useMemo)(()=>y_(te),[te]),he=(0,T.useRef)(null),pe=(0,T.useRef)(Q),S=(0,T.useRef)(q);pe.current=Q,S.current=q,(0,T.useEffect)(()=>{var Z,L,B;if(t==="static")return;let G=he.current;if(he.current=f,G===null){f&&((Z=pe.current)==null||Z.call(pe));return}f&&!G?(L=pe.current)==null||L.call(pe):!f&&G&&((B=S.current)==null||B.call(S))},[f,t]);let xe=(0,T.useMemo)(()=>$?Object.keys($):[],[$]),Se=(0,T.useMemo)(()=>{if(typeof e!="string")return"";let Z=t==="streaming"&&n?Gk(e,R):e;return v&&v.length>0&&(Z=nC(Z,v)),xe.length>0&&(Z=eC(Z,xe)),Z},[e,t,n,R,xe,v]),le=(0,T.useMemo)(()=>A(Se),[Se,A]),De=(0,T.useMemo)(()=>r==="auto"?le.map(Mu):void 0,[le,r]),Fe=(0,T.useMemo)(()=>le.map((Z,L)=>`${W}-${L}`),[le.length,W]),X=(0,T.useMemo)(()=>N===!0?"true":N?JSON.stringify(N):"",[N]),ce=(0,T.useRef)(null),He=(0,T.useRef)([]),Ue=(0,T.useRef)([]),Bt=(0,T.useRef)(null),ir=(0,T.useRef)("");X?(ir.current!==X?(ir.current=X,ce.current=Qs({maxBacklogMs:X!=="true"?N.maxBacklogMs:void 0}),He.current=[],Ue.current=[]):ce.current||(ce.current=Qs()),f&&ce.current&&ce.current.beginPass(ce.current.now())):(ce.current=null,He.current=[],Ue.current=[],ir.current=""),(0,T.useLayoutEffect)(()=>{var Z;f&&((Z=ce.current)==null||Z.commitPass())});let ar=(0,T.useMemo)(()=>{var Z,L;return{codeBlockMaxHeight:h,shikiTheme:(L=u??((Z=k?.code)==null?void 0:Z.getThemes()))!=null?L:qu,controls:p,isAnimating:f,lineNumbers:U,mode:t,mermaid:d,linkSafety:D,portal:I,tableMaxHeight:g}},[h,u,p,f,U,t,d,D,I,k?.code,g]),$r=(0,T.useMemo)(()=>z?JSON.stringify(z):"",[z]),sr=(0,T.useMemo)(()=>({...nu,...z}),[$r]),Yr=(0,T.useMemo)(()=>{let{inlineCode:Z,...L}=a??{},B={...xy,...L};if(Z){let G=B.code;B.code=re=>"data-block"in re?G?(0,T.createElement)(G,re):null:(0,T.createElement)(Z,re)}if(V){if($)for(let re of Object.keys($))Object.hasOwn(B,re)||(B[re]=V);let G={configurable:!0,enumerable:!1,value:V,writable:!1};return new Proxy(B,{getOwnPropertyDescriptor(re,oe){let we=Object.getOwnPropertyDescriptor(re,oe);if(we)return we;if(typeof oe=="string"&&pl.test(oe))return G},get(re,oe,we){return typeof oe=="string"&&pl.test(oe)&&!Object.hasOwn(re,oe)?V:Reflect.get(re,oe,we)}})}return B},[a,V,$]),lr=(0,T.useMemo)(()=>{let Z=[];return k!=null&&k.cjk&&(Z=[...Z,...k.cjk.remarkPluginsBefore]),Z=[...Z,...l],F&&F.length>0&&(Z=[...Z,[hC,F]]),k!=null&&k.cjk&&(Z=[...Z,...k.cjk.remarkPluginsAfter]),k!=null&&k.math&&(Z=[...Z,k.math.remarkPlugin]),Z},[l,k?.math,k?.cjk,F]),ht=(0,T.useMemo)(()=>{var Z;let L=s;if($&&Object.keys($).length>0&&s===xl){let B={...an,tagNames:[...(Z=an.tagNames)!=null?Z:[],...Object.keys($)],attributes:{...an.attributes,...$}};L=[Mi.raw,[Po,B],Mi.harden]}return v&&v.length>0&&(L=[...L,[sC,v]]),k!=null&&k.math&&(L=[...L,k.math.rehypePlugin]),r==="auto"&&t==="static"&&(L=[...L,aC]),L},[s,k?.math,$,v,r,t]),On=(0,T.useMemo)(()=>C&&f?{"--streamdown-caret":`"${kC[C]}"`}:void 0,[C,f]),{containerRef:Dn,showCaret:Pn}=pC((0,T.useMemo)(()=>{if(!f||le.length===0)return!1;let Z=le.at(-1);return al(Z)||Sy(Z)},[f,le])),Mn=Z=>{let L=null;if(ce.current&&f){if(!He.current[Z]){let{maxBacklogMs:G,...re}=X&&X!=="true"?N:{};He.current[Z]=A_({...re,timeline:ce.current})}L=He.current[Z]}Bt.current!==ht&&(Ue.current=[],Bt.current=ht),L&&!Ue.current[Z]&&(Ue.current[Z]=[...ht,L.rehypePlugin]);let B=L&&Ue.current[Z]?Ue.current[Z]:ht;return{blockAnimatePlugin:L,blockRehypePlugins:B}};return t==="static"?(0,m.jsx)(Li.Provider,{value:sr,children:(0,m.jsx)(Oi.Provider,{value:k??null,children:(0,m.jsx)(Ce.Provider,{value:ar,children:(0,m.jsx)(Zs,{icons:Y,children:(0,m.jsx)(wi.Provider,{value:x,children:(0,m.jsx)("div",{...J,className:x("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",o),dir:r==="auto"?void 0:r,children:(0,m.jsx)(Bu,{components:Yr,rehypePlugins:ht,remarkPlugins:lr,...P,children:Se})})})})})})}):(0,m.jsx)(Li.Provider,{value:sr,children:(0,m.jsx)(Oi.Provider,{value:k??null,children:(0,m.jsx)(Ce.Provider,{value:ar,children:(0,m.jsx)(Zs,{icons:Y,children:(0,m.jsx)(wi.Provider,{value:x,children:(0,m.jsxs)("div",{...J,className:x("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",C&&Pn?"[&>*: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:Dn,style:On,children:[le.length===0&&C&&f&&(0,m.jsx)("span",{}),le.map((Z,L)=>{var B;let G=L===le.length-1,re=f&&G&&al(Z),{blockAnimatePlugin:oe,blockRehypePlugins:we}=Mn(L);return(0,m.jsx)(y,{animatePlugin:oe,components:Yr,content:Z,dir:(B=De?.[L])!=null?B:r!=="auto"?r:void 0,index:L,isIncomplete:re,rehypePlugins:we,remarkPlugins:lr,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:n,...P},Fe[L])})]})})})})})})},(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&&xC(e,t));ya.displayName="Streamdown";var mr=e=>e>0?e:null,AC=(e,t)=>{if(e.endsWith("px"))return mr(Number.parseFloat(e));if(e.endsWith("rem")){let r=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||"16");return mr(Number.parseFloat(e)*r)}if(e.endsWith("em")){let r=Number.parseFloat(getComputedStyle(t).fontSize||"16");return mr(Number.parseFloat(e)*r)}if(e.endsWith("vh"))return mr(Number.parseFloat(e)/100*window.innerHeight);if(e.endsWith("%")){let r=t.parentElement;return r&&r.clientHeight>0?mr(Number.parseFloat(e)/100*r.clientHeight):null}return null},ai=(e,t)=>{let r=t.trim().toLowerCase();return!r||r==="none"||r==="auto"?null:AC(r,e)},_C=/^min\(\s*([^,]+)\s*,\s*([^)]+)\s*\)$/i,yC=(e,t)=>{let r=ai(e,t);if(r!=null)return r;let n=t.trim().match(_C);if(!n)return null;let i=ai(e,n[1].trim()),a=ai(e,n[2].trim());return i==null||a==null?null:Math.min(i,a)},CC=(e,t,r)=>{let n=t.clientWidth;if(!(n>0))return null;if(r){let d=t.clientHeight;if(!(d>0))return null;let h=Math.min(n/e.width,d/e.height,1);return!(h>0)||Number.isNaN(h)?null:{fitZoom:h,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 d=getComputedStyle(l);s=yC(l,d.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}},SC=({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:d=!1})=>{let{RotateCcwIcon:h,ZoomInIcon:p,ZoomOutIcon:f}=et(),g=ae(),N=tt(),y=(0,T.useRef)(null),A=(0,T.useRef)(null),C=(0,T.useRef)(!1),[k,R]=(0,T.useState)(o),[D,I]=(0,T.useState)(i),[U,$]=(0,T.useState)(o),[V,v]=(0,T.useState)({x:0,y:0}),[F,z]=(0,T.useState)(!1),[Y,te]=(0,T.useState)({x:0,y:0}),[Q,q]=(0,T.useState)({x:0,y:0}),[P,W]=(0,T.useState)(null),J=(0,T.useCallback)(X=>{let ce=y.current;if(!ce)return;let He=CC(X,ce,d);if(!He)return;let{fitZoom:Ue,viewportHeight:Bt}=He;W(Bt),R(Ue),I(Math.min(i,Ue)),C.current||($(Ue),v({x:0,y:0}))},[d,i]),x=(0,T.useCallback)(X=>{$(ce=>Math.max(D,Math.min(a,ce+X))),C.current=!0},[D,a]),he=(0,T.useCallback)(()=>{x(s)},[x,s]),pe=(0,T.useCallback)(()=>{x(-s)},[x,s]),S=(0,T.useCallback)(()=>{$(k),v({x:0,y:0}),C.current=!1},[k]),xe=(0,T.useCallback)(X=>{X.preventDefault();let ce=X.deltaY>0?-s:s;x(ce)},[x,s]),Se=(0,T.useCallback)(X=>{if(X.button!==0||X.isPrimary===!1)return;z(!0),C.current=!0,te({x:X.clientX,y:X.clientY}),q(V);let ce=X.currentTarget;ce instanceof HTMLElement&&ce.setPointerCapture(X.pointerId)},[V]),le=(0,T.useCallback)(X=>{if(!F)return;X.preventDefault();let ce=X.clientX-Y.x,He=X.clientY-Y.y;v({x:Q.x+ce,y:Q.y+He})},[F,Y,Q]),De=(0,T.useCallback)(X=>{z(!1);let ce=X.currentTarget;ce instanceof HTMLElement&&ce.releasePointerCapture(X.pointerId)},[]);(0,T.useEffect)(()=>{I(i),u||(R(o),$(o),W(null))},[o,u,i]),(0,T.useLayoutEffect)(()=>{if(!(u&&r))return;J(r);let X=y.current;if(!X||typeof ResizeObserver>"u")return;let ce=new ResizeObserver(()=>{J(r)});return ce.observe(X),()=>{ce.disconnect()}},[J,r,u]),(0,T.useEffect)(()=>{u&&(C.current=!1)},[n,u]),(0,T.useEffect)(()=>{let X=y.current;if(X)return X.addEventListener("wheel",xe,{passive:!1}),()=>{X.removeEventListener("wheel",xe)}},[xe]),(0,T.useEffect)(()=>{let X=A.current;if(X&&F)return document.body.style.userSelect="none",X.addEventListener("pointermove",le,{passive:!1}),X.addEventListener("pointerup",De),X.addEventListener("pointercancel",De),()=>{document.body.style.userSelect="",X.removeEventListener("pointermove",le),X.removeEventListener("pointerup",De),X.removeEventListener("pointercancel",De)}},[F,le,De]);let Fe=!d&&u&&P!=null?{height:P}:void 0;return(0,m.jsxs)("div",{className:g("relative flex flex-col",d?"h-full w-full":"min-h-28 w-full",t),ref:y,style:{cursor:F?"grabbing":"grab",...Fe},children:[l?(0,m.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",d?"bottom-4 left-4":"bottom-2 left-2"),children:[(0,m.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:U>=a,onClick:he,title:N.zoomIn,type:"button",children:(0,m.jsx)(p,{"aria-hidden":"true",size:16})}),(0,m.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:U<=D,onClick:pe,title:N.zoomOut,type:"button",children:(0,m.jsx)(f,{"aria-hidden":"true",size:16})}),(0,m.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:S,title:N.resetView,type:"button",children:(0,m.jsx)(h,{"aria-hidden":"true",size:16})})]}):null,(0,m.jsx)("div",{className:g("flex h-full w-full flex-1 origin-center items-center justify-center transition-transform duration-150 ease-out"),onPointerDown:Se,ref:A,role:"application",style:{transform:`translate(${V.x}px, ${V.y}px) scale(${U})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},NC=(e,t)=>new Promise(r=>{let n=setTimeout(r,e);t(()=>{clearTimeout(n),r()})}),vC=async(e,{chart:t,config:r},n,i)=>{try{let a=e.getMermaid(r),s=t.split("").reduce((d,h)=>(d<<5)-d+h.charCodeAt(0)|0,0),l=`mermaid-${Math.abs(s)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:o}=await a.render(l,t),u=au(o);return{ok:!0,svg:n?o:iy(o),size:u}}catch(a){return{ok:!1,error:a instanceof Error?a.message:i}}},IC=({chart:e,className:t,config:r,fullscreen:n=!1,showControls:i=!0})=>{let a=ae(),[s,l]=(0,T.useState)(null),[o,u]=(0,T.useState)(!1),[d,h]=(0,T.useState)(""),[p,f]=(0,T.useState)(null),g=tt(),[N,y]=(0,T.useState)(""),[A,C]=(0,T.useState)(0),{mermaid:k}=(0,T.useContext)(Ce),R=xa(),D=k?.errorComponent,{shouldRender:I,containerRef:U}=a_({immediate:n}),$=(0,T.useRef)(null),V=(0,T.useRef)(!1),v=(0,T.useRef)(!1),F=Xc(),z=(0,T.useRef)(F),Y=(0,T.useRef)(null);(0,T.useEffect)(()=>(v.current=!0,()=>{var q;v.current=!1,(q=Y.current)==null||q.call(Y)}),[]),(0,T.useEffect)(()=>{var q;z.current=F,F||(q=Y.current)==null||q.call(Y)},[F]);let te=async q=>{z.current&&(await NC(q,P=>{Y.current=P}),Y.current=null)};if((0,T.useEffect)(()=>{if(!I)return;if(!R){l("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}if($.current={chart:e,config:r},V.current)return;let q=(P,W)=>{W.ok?(h(W.svg),f(W.size),y(W.svg)):P===$.current&&l(W.error)};(async()=>{V.current=!0,l(null),u(!0);try{let P=$.current;for(;P;){let W=performance.now(),J=await vC(R,P,n,g.errorMermaid);if(!v.current||(q(P,J),J.ok&&await te(performance.now()-W),!v.current||P===$.current))return;P=$.current}}finally{V.current=!1,v.current&&u(!1)}})()},[e,r,A,I,R]),!(I||d||N))return(0,m.jsx)("div",{className:a("my-4 min-h-[200px]",t),ref:U});if(o&&!d&&!N)return(0,m.jsx)("div",{className:a("my-4 flex justify-center p-4",t),ref:U,children:(0,m.jsxs)("div",{className:a("flex items-center space-x-2 text-muted-foreground"),children:[(0,m.jsx)("div",{className:a("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),(0,m.jsx)("span",{className:a("text-sm"),children:"Loading diagram..."})]})});if(s&&!d&&!N){let q=()=>C(P=>P+1);return D?(0,m.jsx)("div",{ref:U,children:(0,m.jsx)(D,{chart:e,error:s,retry:q})}):(0,m.jsxs)("div",{className:a("rounded-md bg-red-50 p-4",t),ref:U,children:[(0,m.jsxs)("p",{className:a("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",s]}),(0,m.jsxs)("details",{className:a("mt-2"),children:[(0,m.jsx)("summary",{className:a("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),(0,m.jsx)("pre",{className:a("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let Q=d||N;return(0,m.jsx)("div",{className:a(n?"size-full":"max-h-[min(70vh,40rem)] w-full",t),"data-streamdown":"mermaid",ref:U,children:(0,m.jsx)(SC,{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,m.jsx)("div",{"aria-label":g.mermaidAriaLabel,className:a("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:Q},role:"img"})})})},wC={damping:.7,stiffness:.05,mass:1.25},LC=70,RC=1e3/60,OC=350,Rn=!1;globalThis.document?.addEventListener("mousedown",()=>{Rn=!0});globalThis.document?.addEventListener("mouseup",()=>{Rn=!1});globalThis.document?.addEventListener("click",()=>{Rn=!1});var DC=(e={})=>{const[t,r]=(0,T.useState)(!1),[n,i]=(0,T.useState)(e.initial!==!1),[a,s]=(0,T.useState)(!1),l=(0,T.useRef)(null);l.current=e;const o=(0,T.useCallback)(()=>{if(!Rn)return!1;const C=window.getSelection();if(!C||!C.rangeCount)return!1;const k=C.getRangeAt(0);return k.commonAncestorContainer.contains(y.current)||y.current?.contains(k.commonAncestorContainer)},[]),u=(0,T.useCallback)(C=>{h.isAtBottom=C,i(C)},[]),d=(0,T.useCallback)(C=>{h.escapedFromLock=C,r(C)},[]),h=(0,T.useMemo)(()=>{let C;return{escapedFromLock:t,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return y.current?.scrollTop??0},set scrollTop(k){if(y.current){const{scrollBehavior:R}=getComputedStyle(y.current);R!=="auto"&&(y.current.style.scrollBehavior="auto"),y.current.scrollTop=k,h.ignoreScrollToTop=y.current.scrollTop,R!=="auto"&&(y.current.style.scrollBehavior=R)}},get targetScrollTop(){return!y.current||!A.current?0:y.current.scrollHeight-1-y.current.clientHeight},get calculatedTargetScrollTop(){if(!y.current||!A.current)return 0;const{targetScrollTop:k}=this;if(!e.targetScrollTop)return k;if(C?.targetScrollTop===k)return C.calculatedScrollTop;const R=Math.max(Math.min(e.targetScrollTop(k,{scrollElement:y.current,contentElement:A.current}),k),0);return C={targetScrollTop:k,calculatedScrollTop:R},requestAnimationFrame(()=>{C=void 0}),R},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=LC}}},[]),p=(0,T.useCallback)((C={})=>{typeof C=="string"&&(C={animation:C}),C.preserveScrollPosition||u(!0);const k=Date.now()+(Number(C.wait)||0),R=li(l.current,C.animation),{ignoreEscapes:D=!1}=C;let I,U=h.calculatedTargetScrollTop;C.duration instanceof Promise?C.duration.finally(()=>{I=Date.now()}):I=k+(C.duration??0);const $=async()=>{const V=new Promise(requestAnimationFrame).then(()=>{if(!h.isAtBottom)return h.animation=void 0,!1;const{scrollTop:v}=h,F=performance.now(),z=(F-(h.lastTick??F))/RC;if(h.animation||(h.animation={behavior:R,promise:V,ignoreEscapes:D}),h.animation.behavior===R&&(h.lastTick=F),o()||k>Date.now())return $();if(v<Math.min(U,h.calculatedTargetScrollTop)){if(h.animation?.behavior===R){if(R==="instant")return h.scrollTop=h.calculatedTargetScrollTop,$();h.velocity=(R.damping*h.velocity+R.stiffness*h.scrollDifference)/R.mass,h.accumulated+=h.velocity*z,h.scrollTop+=h.accumulated,h.scrollTop!==v&&(h.accumulated=0)}return $()}return I>Date.now()?(U=h.calculatedTargetScrollTop,$()):(h.animation=void 0,h.scrollTop<h.calculatedTargetScrollTop?p({animation:li(l.current,l.current.resize),ignoreEscapes:D,duration:Math.max(0,I-Date.now())||void 0}):h.isAtBottom)});return V.then(v=>(requestAnimationFrame(()=>{h.animation||(h.lastTick=void 0,h.velocity=0)}),v))};return C.wait!==!0&&(h.animation=void 0),h.animation?.behavior===R?h.animation.promise:$()},[u,o,h]),f=(0,T.useCallback)(()=>{d(!0),u(!1)},[d,u]),g=(0,T.useCallback)(({target:C})=>{if(C!==y.current)return;const{scrollTop:k,ignoreScrollToTop:R}=h;let{lastScrollTop:D=k}=h;h.lastScrollTop=k,h.ignoreScrollToTop=void 0,R&&R>k&&(D=R),s(h.isNearBottom),setTimeout(()=>{if(h.resizeDifference||k===R)return;if(o()){d(!0),u(!1);return}const I=k>D,U=k<D;if(h.animation?.ignoreEscapes){h.scrollTop=D;return}U&&(d(!0),u(!1)),I&&d(!1),!h.escapedFromLock&&h.isNearBottom&&u(!0)},1)},[d,u,o,h]),N=(0,T.useCallback)(({target:C,deltaY:k})=>{let R=C;for(;!["scroll","auto"].includes(getComputedStyle(R).overflow);){if(!R.parentElement)return;R=R.parentElement}R===y.current&&k<0&&y.current.scrollHeight>y.current.clientHeight&&!h.animation?.ignoreEscapes&&(d(!0),u(!1))},[d,u,h]),y=Al(C=>{y.current?.removeEventListener("scroll",g),y.current?.removeEventListener("wheel",N),C?.addEventListener("scroll",g,{passive:!0}),C?.addEventListener("wheel",N,{passive:!0})},[]),A=Al(C=>{if(h.resizeObserver?.disconnect(),h.resizeObserver=void 0,!C)return;let k;h.resizeObserver=new ResizeObserver(([R])=>{const{height:D}=R.contentRect,I=D-(k??D);if(h.resizeDifference=I,h.scrollTop>h.targetScrollTop&&(h.scrollTop=h.targetScrollTop),s(h.isNearBottom),I>=0){const U=li(l.current,k?l.current.resize:l.current.initial);p({animation:U,wait:!0,preserveScrollPosition:!0,duration:U==="instant"?void 0:OC})}else h.isNearBottom&&(d(!1),u(!0));k=D,requestAnimationFrame(()=>{setTimeout(()=>{h.resizeDifference===I&&(h.resizeDifference=0)},1)})}),h.resizeObserver?.observe(C)},[]);return{contentRef:A,scrollRef:y,scrollToBottom:p,stopScroll:f,isAtBottom:n||a,isNearBottom:a,escapedFromLock:t,state:h}};function Al(e,t){const r=(0,T.useCallback)(n=>(r.current=n,e(n)),t);return r}var si=new Map;function li(...e){const t={...wC};let r=!1;for(const i of e){if(i==="instant"){r=!0;continue}typeof i=="object"&&(r=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const n=JSON.stringify(t);return si.has(n)||si.set(n,Object.freeze(t)),r?"instant":si.get(n)}var Gu=(0,T.createContext)(null),PC=typeof window<"u"?T.useLayoutEffect:T.useEffect;function gn({instance:e,children:t,resize:r,initial:n,mass:i,damping:a,stiffness:s,targetScrollTop:l,contextRef:o,...u}){const d=(0,T.useRef)(null),h=T.useCallback((D,I)=>(R?.targetScrollTop??l)?.(D,I)??D,[l]),p=DC({mass:i,damping:a,stiffness:s,resize:r,initial:n,targetScrollTop:h}),{scrollRef:f,contentRef:g,scrollToBottom:N,stopScroll:y,isAtBottom:A,escapedFromLock:C,state:k}=e??p,R=(0,T.useMemo)(()=>({scrollToBottom:N,stopScroll:y,scrollRef:f,isAtBottom:A,escapedFromLock:C,contentRef:g,state:k,get targetScrollTop(){return d.current},set targetScrollTop(D){d.current=D}}),[N,A,g,f,y,C,k]);return(0,T.useImperativeHandle)(o,()=>R,[R]),PC(()=>{f.current&&getComputedStyle(f.current).overflow==="visible"&&(f.current.style.overflow="auto")},[]),T.createElement(Gu.Provider,{value:R},T.createElement("div",{...u},typeof t=="function"?t(R):t))}(function(e){function t({children:r,scrollClassName:n,...i}){const a=Qu();return T.createElement("div",{ref:a.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:n},T.createElement("div",{...i,ref:a.contentRef},typeof r=="function"?r(a):r))}e.Content=t})(gn||(gn={}));function Qu(){const e=(0,T.useContext)(Gu);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}var MC=({className:e,...t})=>(0,m.jsx)(gn,{className:Te("relative flex-1 overflow-y-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),BC=({className:e,...t})=>(0,m.jsx)(gn.Content,{className:Te("flex flex-col gap-8 p-4",e),...t}),FC=({className:e,...t})=>{const{isAtBottom:r,scrollToBottom:n}=Qu(),i=(0,T.useCallback)(()=>{n()},[n]);return!r&&(0,m.jsx)(Tn,{className:Te("absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full",e),onClick:i,size:"icon",type:"button",variant:"outline",...t,children:(0,m.jsx)(mh,{className:"size-4"})})},_l=[{variant:"shine",component:({children:e,className:t,...r})=>(0,m.jsx)("span",{...r,className:Te("bg-[linear-gradient(110deg,#bfbfbf,35%,#000,50%,#bfbfbf,75%,#bfbfbf)] dark:bg-[linear-gradient(110deg,#404040,35%,#fff,50%,#404040,75%,#404040)]","bg-size-[200%_100%] bg-clip-text text-transparent","animate-shine",t),children:e})}];function HC({variant:e="shine",className:t,...r}){const n=_l.find(i=>i.variant===e)?.component||_l[0].component;return(0,m.jsx)(yh,{className:Te("font-medium text-sm"),children:(0,m.jsx)(n,{...r,className:t})})}var yl=({className:e,from:t,...r})=>(0,m.jsx)("div",{className:Te("group flex w-full max-w-[95%] flex-col gap-2",t==="user"?"is-user ml-auto justify-end":"is-assistant",e),...r}),Cl=({children:e,className:t,...r})=>(0,m.jsx)("div",{className:Te("is-user:dark flex w-fit max-w-full min-w-0 flex-col gap-2 overflow-hidden text-sm","group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground",t),...r,children:e}),Ku=(0,T.createContext)(null),UC=()=>{const e=(0,T.use)(Ku);if(!e)throw new Error("MessageBranch components must be used within MessageBranch");return e},Sl=({defaultBranch:e=0,onBranchChange:t,className:r,...n})=>{const[i,a]=(0,T.useState)(e),[s,l]=(0,T.useState)([]),o=p=>{a(p),t?.(p)},u=()=>{const p=i>0?i-1:s.length-1;o(p)},d=()=>{const p=i<s.length-1?i+1:0;o(p)},h={currentBranch:i,totalBranches:s.length,goToPrevious:u,goToNext:d,branches:s,setBranches:l};return(0,m.jsx)(Ku.Provider,{value:h,children:(0,m.jsx)("div",{className:Te("grid w-full gap-2 [&>div]:pb-0",r),...n})})},Nl=({children:e,...t})=>{const{currentBranch:r,setBranches:n,branches:i}=UC(),a=Array.isArray(e)?e:[e];return(0,T.useEffect)(()=>{i.length!==a.length&&n(a)},[a,i,n]),a.map((s,l)=>(0,m.jsx)("div",{className:Te("grid gap-2 overflow-hidden [&>div]:pb-0",l===r?"block":"hidden"),...t,children:s},s.key))},Xu=(0,T.memo)(({className:e,...t})=>(0,m.jsx)(ya,{className:Te("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Xu.displayName="MessageResponse";var jC="57X6y3wQZNzYjJB2L_10pxbackgroundhimselfUTF-8DEMOGRAPHICSVqvt4KW9",zC=(e=21)=>{for(var t="",r=crypto.getRandomValues(new Uint8Array(e|=0));e--;)t+=jC[r[e]&63];return t},$C=(0,T.createContext)(null),YC=(0,T.createContext)(null),Zu=()=>(0,T.useContext)($C),qC=()=>(0,T.useContext)(YC),Ju=(0,T.createContext)(null),VC=()=>{const e=qC(),t=(0,T.use)(Ju),r=e??t;if(!r)throw new Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return r},WC=({className:e,accept:t,multiple:r,globalDrop:n,syncHiddenInput:i,maxFiles:a,maxFileSize:s,onError:l,onSubmit:o,children:u,...d})=>{const h=Zu(),p=!!h,f=(0,T.useRef)(null),g=(0,T.useRef)(null),[N,y]=(0,T.useState)([]),A=p?h.attachments.files:N,C=(0,T.useRef)(A);C.current=A;const k=(0,T.useCallback)(()=>{f.current?.click()},[]),R=(0,T.useCallback)(P=>!t||t.trim()===""?!0:t.split(",").map(W=>W.trim()).filter(Boolean).some(W=>{if(W.endsWith("/*")){const J=W.slice(0,-1);return P.type.startsWith(J)}return P.type===W}),[t]),D=(0,T.useCallback)(P=>{const W=Array.from(P),J=W.filter(pe=>R(pe));if(W.length&&J.length===0){l?.({code:"accept",message:"No files match the accepted types."});return}const x=pe=>s?pe.size<=s:!0,he=J.filter(x);if(J.length>0&&he.length===0){l?.({code:"max_file_size",message:"All files exceed the maximum size."});return}y(pe=>{const S=typeof a=="number"?Math.max(0,a-pe.length):void 0,xe=typeof S=="number"?he.slice(0,S):he;typeof S=="number"&&he.length>S&&l?.({code:"max_files",message:"Too many files. Some were not added."});const Se=[];for(const le of xe)Se.push({id:zC(),type:"file",url:URL.createObjectURL(le),mediaType:le.type,filename:le.name});return pe.concat(Se)})},[R,a,s,l]),I=(0,T.useCallback)(P=>y(W=>{const J=W.find(x=>x.id===P);return J?.url&&URL.revokeObjectURL(J.url),W.filter(x=>x.id!==P)}),[]),U=(0,T.useCallback)(()=>y(P=>{for(const W of P)W.url&&URL.revokeObjectURL(W.url);return[]}),[]),$=p?h.attachments.add:D,V=p?h.attachments.remove:I,v=p?h.attachments.clear:U,F=p?h.attachments.openFileDialog:k;(0,T.useEffect)(()=>{p&&h.__registerFileInput(f,()=>f.current?.click())},[p,h]),(0,T.useEffect)(()=>{i&&f.current&&A.length===0&&(f.current.value="")},[A,i]),(0,T.useEffect)(()=>{const P=g.current;if(!P||n)return;const W=x=>{x.dataTransfer?.types?.includes("Files")&&x.preventDefault()},J=x=>{x.dataTransfer?.types?.includes("Files")&&x.preventDefault(),x.dataTransfer?.files&&x.dataTransfer.files.length>0&&$(x.dataTransfer.files)};return P.addEventListener("dragover",W),P.addEventListener("drop",J),()=>{P.removeEventListener("dragover",W),P.removeEventListener("drop",J)}},[$,n]),(0,T.useEffect)(()=>{if(!n)return;const P=J=>{J.dataTransfer?.types?.includes("Files")&&J.preventDefault()},W=J=>{J.dataTransfer?.types?.includes("Files")&&J.preventDefault(),J.dataTransfer?.files&&J.dataTransfer.files.length>0&&$(J.dataTransfer.files)};return document.addEventListener("dragover",P),document.addEventListener("drop",W),()=>{document.removeEventListener("dragover",P),document.removeEventListener("drop",W)}},[$,n]),(0,T.useEffect)(()=>()=>{if(!p)for(const P of C.current)P.url&&URL.revokeObjectURL(P.url)},[p]);const z=P=>{P.currentTarget.files&&$(P.currentTarget.files),P.currentTarget.value=""},Y=async P=>{try{const W=await(await fetch(P)).blob();return new Promise(J=>{const x=new FileReader;x.onloadend=()=>J(x.result),x.onerror=()=>J(null),x.readAsDataURL(W)})}catch{return null}},te=(0,T.useMemo)(()=>({files:A.map(P=>({...P,id:P.id})),add:$,remove:V,clear:v,openFileDialog:F,fileInputRef:f}),[A,$,V,v,F]),Q=P=>{P.preventDefault();const W=P.currentTarget,J=p?h.textInput.value:new FormData(W).get("message")||"";p||W.reset(),Promise.all(A.map(async({id:x,...he})=>{if(he.url?.startsWith("blob:")){const pe=await Y(he.url);return{...he,url:pe??he.url}}return he})).then(x=>{try{const he=o({text:J,files:x},P);he instanceof Promise?he.then(()=>{v(),p&&h.textInput.clear()}).catch(()=>{}):(v(),p&&h.textInput.clear())}catch{}}).catch(()=>{})},q=(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("input",{accept:t,"aria-label":"Upload files",className:"hidden",multiple:r,onChange:z,ref:f,title:"Upload files",type:"file"}),(0,m.jsx)("form",{className:Te("w-full",e),onSubmit:Q,ref:g,...d,children:(0,m.jsx)(vh,{className:"overflow-hidden",children:u})})]});return p?q:(0,m.jsx)(Ju.Provider,{value:te,children:q})},GC=({className:e,...t})=>(0,m.jsx)("div",{className:Te("contents",e),...t}),QC=({onChange:e,className:t,placeholder:r="What would you like to know?",...n})=>{const i=Zu(),a=VC(),[s,l]=(0,T.useState)(!1),o=h=>{if(h.key==="Enter"){if(s||h.nativeEvent.isComposing||h.shiftKey)return;h.preventDefault();const p=h.currentTarget.form;if(p?.querySelector('button[type="submit"]')?.disabled)return;p?.requestSubmit()}if(h.key==="Backspace"&&h.currentTarget.value===""&&a.files.length>0){h.preventDefault();const p=a.files.at(-1);p&&a.remove(p.id)}},u=h=>{const p=h.clipboardData?.items;if(!p)return;const f=[];for(const g of p)if(g.kind==="file"){const N=g.getAsFile();N&&f.push(N)}f.length>0&&(h.preventDefault(),a.add(f))},d=i?{value:i.textInput.value,onChange:h=>{i.textInput.setInput(h.currentTarget.value),e?.(h)}}:{onChange:e};return(0,m.jsx)(Ih,{className:Te("field-sizing-content max-h-48 min-h-16",t),name:"message",onCompositionEnd:()=>l(!1),onCompositionStart:()=>l(!0),onKeyDown:o,onPaste:u,placeholder:r,...n,...d})},KC=({className:e,...t})=>(0,m.jsx)(wh,{align:"block-end",className:Te("justify-between justify-end gap-1",e),...t}),XC=({className:e,variant:t="default",size:r="icon-sm",status:n,children:i,...a})=>{let s=(0,m.jsx)(Th,{className:"size-4"});return n==="submitted"?s=(0,m.jsx)(kh,{className:"size-4 animate-spin"}):n==="streaming"?s=(0,m.jsx)(Eh,{className:"size-4"}):n==="error"&&(s=(0,m.jsx)(bh,{className:"size-4"})),(0,m.jsx)(Rh,{"aria-label":"Submit",className:Te(e),size:r,type:"submit",variant:t,...a,children:i??s})};function ZC({...e}){return(0,m.jsx)(Nh,{"data-slot":"collapsible",...e})}function JC({...e}){return(0,m.jsx)(Sh,{"data-slot":"collapsible-trigger",...e})}function e1({...e}){return(0,m.jsx)(Ch,{"data-slot":"collapsible-content",...e})}var t1=({children:e,as:t="p",className:r,duration:n=2,spread:i=2})=>{const a=(0,T.useMemo)(()=>(e?.length??0)*i,[e,i]);return(0,m.jsx)(t,{className:Te("relative inline-block bg-size-[250%_100%,auto] bg-clip-text text-transparent","[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]","animate-shimmer",r),style:{"--spread":`${a}px`,"--duration":`${n}s`,backgroundImage:"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))"},children:e})},r1=(0,T.memo)(t1),eh=(0,T.createContext)(null),n1=()=>{const e=(0,T.use)(eh);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},i1=1e3,a1=1e3,th=(0,T.memo)(({className:e,isStreaming:t=!1,open:r,defaultOpen:n=!0,onOpenChange:i,duration:a,children:s,...l})=>{const[o,u]=Ca({prop:r,defaultProp:n,onChange:i}),[d,h]=Ca({prop:a,defaultProp:void 0}),[p,f]=(0,T.useState)(!1),[g,N]=(0,T.useState)(null);(0,T.useEffect)(()=>{t?g===null&&N(Date.now()):g!==null&&(h(Math.ceil((Date.now()-g)/a1)),N(null))},[t,g,h]),(0,T.useEffect)(()=>{if(n&&!t&&o&&!p){const A=setTimeout(()=>{u(!1),f(!0)},i1);return()=>clearTimeout(A)}},[t,o,n,u,p]);const y=A=>{u(A)};return(0,m.jsx)(eh.Provider,{value:{isStreaming:t,isOpen:o,setIsOpen:u,duration:d},children:(0,m.jsx)(ZC,{className:Te("not-prose mb-4",e),onOpenChange:y,open:o,...l,children:s})})}),s1=(e,t)=>e||t===0?(0,m.jsx)(r1,{duration:1,children:"Thinking..."}):t===void 0?(0,m.jsx)("p",{children:"Thought for a few seconds"}):(0,m.jsxs)("p",{children:["Thought for ",t," seconds"]}),rh=(0,T.memo)(({className:e,children:t,getThinkingMessage:r=s1,...n})=>{const{isStreaming:i,isOpen:a,duration:s}=n1();return(0,m.jsx)(JC,{className:Te("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...n,children:t??(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(fh,{className:"size-4"}),r(i,s),(0,m.jsx)(gh,{className:Te("size-4 transition-transform",a?"rotate-180":"rotate-0")})]})})}),nh=(0,T.memo)(({className:e,children:t,...r})=>(0,m.jsx)(e1,{className:Te("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...r,children:(0,m.jsx)(ya,{children:t})}));th.displayName="Reasoning";rh.displayName="ReasoningTrigger";nh.displayName="ReasoningContent";var l1=({className:e,children:t,...r})=>(0,m.jsxs)(Dh,{className:"w-full overflow-x-auto whitespace-nowrap",...r,children:[(0,m.jsx)("div",{className:Te("flex w-max flex-nowrap items-center gap-2",e),children:t}),(0,m.jsx)(Oh,{className:"hidden",orientation:"horizontal"})]}),o1=({suggestion:e,onClick:t,className:r,variant:n="outline",size:i="sm",children:a,...s})=>{const l=()=>{t?.(e)};return(0,m.jsx)(Tn,{className:Te("cursor-pointer rounded-full px-4",r),onClick:l,size:i,type:"button",variant:n,...s,children:a||e})},D1=Fi({ChatSidebar:()=>u1}),c1=({db:e,onRateLimitRefetch:t,onControllerReady:r})=>{const[n,i]=(0,T.useState)(""),[a,s]=(0,T.useState)(null),{openOverlay:l}=vl(),{pendingPrompt:o,consumePrompt:u}=uh(),{includeSchemaInAiContext:d,provider:h,model:p}=wl(),f=Ll(oi),g=Il(),N=f.status[h],y=N?.state==="set"||N?.state==="locked",{rateLimit:A}=Pl({enabled:g&&h==="gemini"&&!y}),{remaining:C}=A??{remaining:0,limit:0},k=y||h==="gemini"&&C>0,{messages:R,sendMessage:D,isLoading:I,clear:U,stop:$}=hh({connection:dh(`${ah()}${sh.API_PREFIX}/chat`,()=>({headers:ih()})),body:{db:e,includeSchema:d},byok:oi,forwardedProps:{provider:h,model:p},onError:Y=>s(Y.message),onFinish:()=>{h==="gemini"&&!y&&t()}});(0,T.useEffect)(()=>{!o||I||!g||!k||(u(),D(o))},[k,u,g,I,o,D]),(0,T.useEffect)(()=>{r({clear:()=>{U(),i(""),s(null)},isLoading:I})},[U,I,r]);const V=Y=>{const te=!!Y.text,Q=!!Y.files?.length;!(te||Q)||I||(s(null),D(Y.text),i(""))},v=Y=>{s(null),D(Y),i("")},F=()=>{$(),i("")},z=I?"streaming":"ready";return(0,m.jsxs)("div",{className:"relative flex size-full flex-col divide-y overflow-hidden",children:[(0,m.jsxs)(MC,{children:[(0,m.jsx)(BC,{children:R.length===0?(0,m.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:(0,m.jsxs)("div",{className:"text-center space-y-2",children:[(0,m.jsx)("p",{className:"text-lg font-medium",children:"Start a new conversation"}),(0,m.jsx)("p",{className:"text-sm",children:"Ask me anything to get started"})]})}):(0,m.jsxs)(m.Fragment,{children:[R.map(Y=>{const te=Y.parts.filter(P=>P.type==="thinking"),Q=Y.parts.reduce((P,W)=>W.type==="text"?P+(W.content??""):P,""),q=te.length>0;return(0,m.jsx)(Sl,{defaultBranch:0,children:(0,m.jsx)(Nl,{children:(0,m.jsx)(yl,{from:Y.role==="user"?"user":"assistant",children:(0,m.jsxs)("div",{children:[q&&Y.role==="assistant"&&(0,m.jsxs)(th,{duration:0,children:[(0,m.jsx)(rh,{}),(0,m.jsx)(nh,{children:te.map(P=>P.content).join(`
|
|
161
|
+
`)})]}),(0,m.jsx)(Cl,{children:(0,m.jsx)(Xu,{children:Q})})]})})})},Y.id)}),I&&(0,m.jsx)(Sl,{defaultBranch:0,children:(0,m.jsx)(Nl,{children:(0,m.jsx)(yl,{from:"assistant",children:(0,m.jsx)(Cl,{children:(0,m.jsx)(HC,{children:"Thinking..."})})})})})]})}),(0,m.jsx)(FC,{})]}),(0,m.jsxs)("div",{className:"grid shrink-0 gap-4 pt-3",children:[a&&(0,m.jsx)("div",{className:"mx-4 rounded-lg border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:a}),!k&&(0,m.jsxs)("div",{className:"mx-4 rounded-lg border p-3 text-sm",children:[(0,m.jsx)("p",{className:"text-muted-foreground",children:h==="gemini"?"The hosted AI limit is exhausted. Add a personal Gemini key to continue.":`Add a ${h} API key to use this provider.`}),(0,m.jsx)(Tn,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>l("settings.app"),children:"Open settings"})]}),R.length===0&&k&&(0,m.jsx)(l1,{className:"px-4",children:Mh.map(Y=>(0,m.jsx)(o1,{onClick:()=>v(Y),suggestion:Y,size:"lg",children:Y},Y))}),(0,m.jsx)("div",{className:"w-full px-4 pb-4",children:(0,m.jsxs)(WC,{globalDrop:!0,multiple:!0,onSubmit:V,children:[(0,m.jsx)(GC,{children:(0,m.jsx)(QC,{onChange:Y=>i(Y.target.value),value:n,placeholder:"Type a message..."})}),(0,m.jsx)(KC,{children:(0,m.jsx)(XC,{className:"h-8!",status:z,onClick:I?F:void 0,disabled:!k})})]})})]})]})},u1=()=>{const{isOverlayOpen:e,closeOverlay:t}=vl(),{selectedDatabase:r}=Ph(),{includeSchemaInAiContext:n,provider:i,model:a}=wl(),s=Ll(oi),l=Il(),o=s.status[i],u=o?.state==="set"||o?.state==="locked",{rateLimit:d,refetchRateLimit:h}=Pl({enabled:l&&i==="gemini"&&!u}),[p,f]=(0,T.useState)(null),g=(0,T.useRef)(N=>f(N));return(0,m.jsx)(Lh,{title:"AI Assistant",cta:(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[d&&!u&&(0,m.jsxs)(lh,{children:[(0,m.jsx)(oh,{asChild:!0,children:(0,m.jsxs)("span",{className:"text-xs px-2 py-1 cursor-default text-muted-foreground",children:[d.remaining,"/",d.limit]})}),(0,m.jsx)(ch,{side:"bottom",children:(0,m.jsxs)("p",{children:[d.remaining," messages remaining"]})})]}),r&&p&&(0,m.jsxs)(Tn,{type:"button",variant:"outline",size:"lg",onClick:p.clear,disabled:p.isLoading,children:[(0,m.jsx)(ph,{className:"size-4 mr-1"}),"New Chat"]})]}),closeButton:!1,open:e("chat.assistant"),size:"max-w-2xl!",contentClassName:"p-0 flex flex-col h-[calc(100vh-4rem)] flex-1",onOpenChange:N=>{N||t("chat.assistant")},children:r?(0,m.jsx)(c1,{db:r,onRateLimitRefetch:h,onControllerReady:g.current},`${r}:${n}:${i}:${a}`):(0,m.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground p-8",children:(0,m.jsxs)("div",{className:"text-center space-y-2",children:[(0,m.jsx)("p",{className:"text-lg font-medium",children:"No database selected"}),(0,m.jsx)("p",{className:"text-sm",children:"Select a database from the sidebar to start chatting."})]})})})};export{u1 as ChatSidebar,IC as a,O1 as i,I_ as n,Ce as r,D1 as t};
|