remote-claude-code 0.1.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/README.md +193 -0
- package/README.zh-CN.md +193 -0
- package/cli/commands/logs.ts +68 -0
- package/cli/commands/setup.ts +43 -0
- package/cli/commands/start.ts +68 -0
- package/cli/commands/status.ts +41 -0
- package/cli/commands/stop.ts +14 -0
- package/cli/constants.ts +1 -0
- package/cli/index.ts +18 -0
- package/cli/utils/process-manager.ts +77 -0
- package/cli/utils/server.ts +45 -0
- package/dist/client/assets/abap-BdImnpbu.js +1 -0
- package/dist/client/assets/actionscript-3-CoDkCxhg.js +1 -0
- package/dist/client/assets/ada-bCR0ucgS.js +1 -0
- package/dist/client/assets/andromeeda-C4gqWexZ.js +1 -0
- package/dist/client/assets/angular-html-CU67Zn6k.js +1 -0
- package/dist/client/assets/angular-ts-BwZT4LLn.js +1 -0
- package/dist/client/assets/apache-Pmp26Uib.js +1 -0
- package/dist/client/assets/apex-D8_7TLub.js +1 -0
- package/dist/client/assets/apl-dKokRX4l.js +1 -0
- package/dist/client/assets/applescript-Co6uUVPk.js +1 -0
- package/dist/client/assets/ara-BRHolxvo.js +1 -0
- package/dist/client/assets/asciidoc-Ve4PFQV2.js +1 -0
- package/dist/client/assets/asm-D_Q5rh1f.js +1 -0
- package/dist/client/assets/astro-CbQHKStN.js +1 -0
- package/dist/client/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/dist/client/assets/awk-DMzUqQB5.js +1 -0
- package/dist/client/assets/ayu-dark-DYE7WIF3.js +1 -0
- package/dist/client/assets/ayu-light-BA47KaF1.js +1 -0
- package/dist/client/assets/ayu-mirage-32ctXXKs.js +1 -0
- package/dist/client/assets/ballerina-BFfxhgS-.js +1 -0
- package/dist/client/assets/bat-BkioyH1T.js +1 -0
- package/dist/client/assets/beancount-k_qm7-4y.js +1 -0
- package/dist/client/assets/berry-uYugtg8r.js +1 -0
- package/dist/client/assets/bibtex-CHM0blh-.js +1 -0
- package/dist/client/assets/bicep-Bmn6On1c.js +1 -0
- package/dist/client/assets/bird2-DPOp833l.js +1 -0
- package/dist/client/assets/blade-D4QpJJKB.js +1 -0
- package/dist/client/assets/bsl-BO_Y6i37.js +1 -0
- package/dist/client/assets/c-BIGW1oBm.js +1 -0
- package/dist/client/assets/c3-eo99z4R2.js +1 -0
- package/dist/client/assets/cadence-Bv_4Rxtq.js +1 -0
- package/dist/client/assets/cairo-KRGpt6FW.js +1 -0
- package/dist/client/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/dist/client/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/dist/client/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/dist/client/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/dist/client/assets/clarity-D53aC0YG.js +1 -0
- package/dist/client/assets/clojure-P80f7IUj.js +1 -0
- package/dist/client/assets/cmake-D1j8_8rp.js +1 -0
- package/dist/client/assets/cobol-nwyudZeR.js +1 -0
- package/dist/client/assets/code-highlighter-D_0rJlW2.js +153 -0
- package/dist/client/assets/codeowners-Bp6g37R7.js +1 -0
- package/dist/client/assets/codeql-DsOJ9woJ.js +1 -0
- package/dist/client/assets/coffee-Ch7k5sss.js +1 -0
- package/dist/client/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/dist/client/assets/coq-DkFqJrB1.js +1 -0
- package/dist/client/assets/cpp-CofmeUqb.js +1 -0
- package/dist/client/assets/crystal-tKQVLTB8.js +1 -0
- package/dist/client/assets/csharp-COcwbKMJ.js +1 -0
- package/dist/client/assets/css-DPfMkruS.js +1 -0
- package/dist/client/assets/csv-fuZLfV_i.js +1 -0
- package/dist/client/assets/cue-D82EKSYY.js +1 -0
- package/dist/client/assets/cypher-COkxafJQ.js +1 -0
- package/dist/client/assets/d-85-TOEBH.js +1 -0
- package/dist/client/assets/dark-plus-C3mMm8J8.js +1 -0
- package/dist/client/assets/dart-CF10PKvl.js +1 -0
- package/dist/client/assets/dax-CEL-wOlO.js +1 -0
- package/dist/client/assets/desktop-BmXAJ9_W.js +1 -0
- package/dist/client/assets/diff-D97Zzqfu.js +1 -0
- package/dist/client/assets/docker-BcOcwvcX.js +1 -0
- package/dist/client/assets/dotenv-Da5cRb03.js +1 -0
- package/dist/client/assets/dracula-BzJJZx-M.js +1 -0
- package/dist/client/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/dist/client/assets/dream-maker-BtqSS_iP.js +1 -0
- package/dist/client/assets/edge-BkV0erSs.js +1 -0
- package/dist/client/assets/elixir-CDX3lj18.js +1 -0
- package/dist/client/assets/elm-DbKCFpqz.js +1 -0
- package/dist/client/assets/emacs-lisp-C9XAeP06.js +1 -0
- package/dist/client/assets/erb-B12qg9BL.js +1 -0
- package/dist/client/assets/erlang-DsQrWhSR.js +1 -0
- package/dist/client/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/dist/client/assets/everforest-light-C8M2exoo.js +1 -0
- package/dist/client/assets/fennel-BYunw83y.js +1 -0
- package/dist/client/assets/fish-BvzEVeQv.js +1 -0
- package/dist/client/assets/fluent-C4IJs8-o.js +1 -0
- package/dist/client/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- package/dist/client/assets/fortran-free-form-BxgE0vQu.js +1 -0
- package/dist/client/assets/fsharp-CXgrBDvD.js +1 -0
- package/dist/client/assets/gdresource-BOOCDP_w.js +1 -0
- package/dist/client/assets/gdscript-C5YyOfLZ.js +1 -0
- package/dist/client/assets/gdshader-DkwncUOv.js +1 -0
- package/dist/client/assets/genie-D0YGMca9.js +1 -0
- package/dist/client/assets/gherkin-DyxjwDmM.js +1 -0
- package/dist/client/assets/git-commit-F4YmCXRG.js +1 -0
- package/dist/client/assets/git-rebase-r7XF79zn.js +1 -0
- package/dist/client/assets/github-dark-DHJKELXO.js +1 -0
- package/dist/client/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/dist/client/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/dist/client/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/dist/client/assets/github-light-DAi9KRSo.js +1 -0
- package/dist/client/assets/github-light-default-D7oLnXFd.js +1 -0
- package/dist/client/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/dist/client/assets/gleam-BspZqrRM.js +1 -0
- package/dist/client/assets/glimmer-js-Rg0-pVw9.js +1 -0
- package/dist/client/assets/glimmer-ts-U6CK756n.js +1 -0
- package/dist/client/assets/glsl-DplSGwfg.js +1 -0
- package/dist/client/assets/gn-n2N0HUVH.js +1 -0
- package/dist/client/assets/gnuplot-DdkO51Og.js +1 -0
- package/dist/client/assets/go-CxLEBnE3.js +1 -0
- package/dist/client/assets/graphql-ChdNCCLP.js +1 -0
- package/dist/client/assets/groovy-gcz8RCvz.js +1 -0
- package/dist/client/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/dist/client/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/dist/client/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/dist/client/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/dist/client/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/dist/client/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/dist/client/assets/hack-CaT9iCJl.js +1 -0
- package/dist/client/assets/haml-B8DHNrY2.js +1 -0
- package/dist/client/assets/handlebars-BL8al0AC.js +1 -0
- package/dist/client/assets/haskell-Df6bDoY_.js +1 -0
- package/dist/client/assets/haxe-CzTSHFRz.js +1 -0
- package/dist/client/assets/hcl-BWvSN4gD.js +1 -0
- package/dist/client/assets/highlighted-body-TPN3WLV5-Bbf4VBqH.js +1 -0
- package/dist/client/assets/hjson-D5-asLiD.js +1 -0
- package/dist/client/assets/hlsl-D3lLCCz7.js +1 -0
- package/dist/client/assets/horizon-BUw7H-hv.js +1 -0
- package/dist/client/assets/horizon-bright-Cn-bp-IR.js +1 -0
- package/dist/client/assets/houston-DnULxvSX.js +1 -0
- package/dist/client/assets/html-GMplVEZG.js +1 -0
- package/dist/client/assets/html-derivative-BFtXZ54Q.js +1 -0
- package/dist/client/assets/http-jrhK8wxY.js +1 -0
- package/dist/client/assets/hurl-irOxFIW8.js +1 -0
- package/dist/client/assets/hxml-Bvhsp5Yf.js +1 -0
- package/dist/client/assets/hy-DFXneXwc.js +1 -0
- package/dist/client/assets/imba-DGztddWO.js +1 -0
- package/dist/client/assets/index-D7x3ypuO.css +32 -0
- package/dist/client/assets/index-DLfciZbe.js +477 -0
- package/dist/client/assets/ini-BEwlwnbL.js +1 -0
- package/dist/client/assets/java-CylS5w8V.js +1 -0
- package/dist/client/assets/javascript-wDzz0qaB.js +1 -0
- package/dist/client/assets/jinja-4LBKfQ-Z.js +1 -0
- package/dist/client/assets/jison-wvAkD_A8.js +1 -0
- package/dist/client/assets/json-Cp-IABpG.js +1 -0
- package/dist/client/assets/json5-C9tS-k6U.js +1 -0
- package/dist/client/assets/jsonc-Des-eS-w.js +1 -0
- package/dist/client/assets/jsonl-DcaNXYhu.js +1 -0
- package/dist/client/assets/jsonnet-DFQXde-d.js +1 -0
- package/dist/client/assets/jssm-C2t-YnRu.js +1 -0
- package/dist/client/assets/jsx-g9-lgVsj.js +1 -0
- package/dist/client/assets/julia-CxzCAyBv.js +1 -0
- package/dist/client/assets/just-Cw27pwNe.js +1 -0
- package/dist/client/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/dist/client/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/dist/client/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/dist/client/assets/kdl-DV7GczEv.js +1 -0
- package/dist/client/assets/kotlin-BdnUsdx6.js +1 -0
- package/dist/client/assets/kusto-DZf3V79B.js +1 -0
- package/dist/client/assets/laserwave-DUszq2jm.js +1 -0
- package/dist/client/assets/latex-CWtU0Tv5.js +1 -0
- package/dist/client/assets/lean-BZvkOJ9d.js +1 -0
- package/dist/client/assets/less-B1dDrJ26.js +1 -0
- package/dist/client/assets/light-plus-B7mTdjB0.js +1 -0
- package/dist/client/assets/liquid-DYVedYrR.js +1 -0
- package/dist/client/assets/llvm-DjAJT7YJ.js +1 -0
- package/dist/client/assets/log-2UxHyX5q.js +1 -0
- package/dist/client/assets/logo-BtOb2qkB.js +1 -0
- package/dist/client/assets/lua-BaeVxFsk.js +1 -0
- package/dist/client/assets/luau-C-HG3fhB.js +1 -0
- package/dist/client/assets/make-CHLpvVh8.js +1 -0
- package/dist/client/assets/markdown-Cvjx9yec.js +1 -0
- package/dist/client/assets/markdown-ksT5_TvX.js +146 -0
- package/dist/client/assets/marko-CnJfTvn9.js +1 -0
- package/dist/client/assets/material-theme-D5KoaKCx.js +1 -0
- package/dist/client/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/dist/client/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/dist/client/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/dist/client/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/dist/client/assets/matlab-D7o27uSR.js +1 -0
- package/dist/client/assets/mdc-BMNejdWA.js +1 -0
- package/dist/client/assets/mdx-Cmh6b_Ma.js +1 -0
- package/dist/client/assets/mermaid-mWjccvbQ.js +1 -0
- package/dist/client/assets/min-dark-CafNBF8u.js +1 -0
- package/dist/client/assets/min-light-CTRr51gU.js +1 -0
- package/dist/client/assets/mipsasm-CKIfxQSi.js +1 -0
- package/dist/client/assets/mojo-rZm6bMo-.js +1 -0
- package/dist/client/assets/monokai-D4h5O-jR.js +1 -0
- package/dist/client/assets/moonbit-_H4v1dQx.js +1 -0
- package/dist/client/assets/move-IF9eRakj.js +1 -0
- package/dist/client/assets/narrat-DRg8JJMk.js +1 -0
- package/dist/client/assets/nextflow-Zz6hmt5N.js +1 -0
- package/dist/client/assets/nextflow-groovy-BeH2EWoN.js +1 -0
- package/dist/client/assets/nginx-BpAMiNFr.js +1 -0
- package/dist/client/assets/night-owl-C39BiMTA.js +1 -0
- package/dist/client/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/dist/client/assets/nim-CVrawwO9.js +1 -0
- package/dist/client/assets/nix-CwoSXNpI.js +1 -0
- package/dist/client/assets/nord-Ddv68eIx.js +1 -0
- package/dist/client/assets/nushell-Cz2AlsmD.js +1 -0
- package/dist/client/assets/objective-c-DXmwc3jG.js +1 -0
- package/dist/client/assets/objective-cpp-CLxacb5B.js +1 -0
- package/dist/client/assets/ocaml-C0hk2d4L.js +1 -0
- package/dist/client/assets/odin-BBf5iR-q.js +1 -0
- package/dist/client/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/dist/client/assets/one-light-C3Wv6jpd.js +1 -0
- package/dist/client/assets/openscad-C4EeE6gA.js +1 -0
- package/dist/client/assets/pascal-D93ZcfNL.js +1 -0
- package/dist/client/assets/perl-C0TMdlhV.js +1 -0
- package/dist/client/assets/php-Dhbhpdrm.js +1 -0
- package/dist/client/assets/pkl-u5AG7uiY.js +1 -0
- package/dist/client/assets/plastic-3e1v2bzS.js +1 -0
- package/dist/client/assets/plsql-ChMvpjG-.js +1 -0
- package/dist/client/assets/po-BTJTHyun.js +1 -0
- package/dist/client/assets/poimandres-CS3Unz2-.js +1 -0
- package/dist/client/assets/polar-C0HS_06l.js +1 -0
- package/dist/client/assets/postcss-CXtECtnM.js +1 -0
- package/dist/client/assets/powerquery-CEu0bR-o.js +1 -0
- package/dist/client/assets/powershell-Dpen1YoG.js +1 -0
- package/dist/client/assets/prisma-Dd19v3D-.js +1 -0
- package/dist/client/assets/prolog-CbFg5uaA.js +1 -0
- package/dist/client/assets/proto-C7zT0LnQ.js +1 -0
- package/dist/client/assets/pug-CGlum2m_.js +1 -0
- package/dist/client/assets/puppet-BMWR74SV.js +1 -0
- package/dist/client/assets/purescript-CklMAg4u.js +1 -0
- package/dist/client/assets/python-B6aJPvgy.js +1 -0
- package/dist/client/assets/qml-3beO22l8.js +1 -0
- package/dist/client/assets/qmldir-C8lEn-DE.js +1 -0
- package/dist/client/assets/qss-IeuSbFQv.js +1 -0
- package/dist/client/assets/r-Dspwwk_N.js +1 -0
- package/dist/client/assets/racket-BqYA7rlc.js +1 -0
- package/dist/client/assets/raku-DXvB9xmW.js +1 -0
- package/dist/client/assets/razor-Uh8Bk_45.js +1 -0
- package/dist/client/assets/red-bN70gL4F.js +1 -0
- package/dist/client/assets/reg-C-SQnVFl.js +1 -0
- package/dist/client/assets/regexp-CDVJQ6XC.js +1 -0
- package/dist/client/assets/rel-C3B-1QV4.js +1 -0
- package/dist/client/assets/riscv-BM1_JUlF.js +1 -0
- package/dist/client/assets/ron-D8l8udqQ.js +1 -0
- package/dist/client/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- package/dist/client/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- package/dist/client/assets/rose-pine-qdsjHGoJ.js +1 -0
- package/dist/client/assets/rosmsg-BJDFO7_C.js +1 -0
- package/dist/client/assets/rst-BrH8l1NY.js +1 -0
- package/dist/client/assets/ruby-Dw2BHqvy.js +1 -0
- package/dist/client/assets/rust-B1yitclQ.js +1 -0
- package/dist/client/assets/sas-cz2c8ADy.js +1 -0
- package/dist/client/assets/sass-Cj5Yp3dK.js +1 -0
- package/dist/client/assets/scala-C151Ov-r.js +1 -0
- package/dist/client/assets/scheme-C98Dy4si.js +1 -0
- package/dist/client/assets/scss-OYdSNvt2.js +1 -0
- package/dist/client/assets/sdbl-DVxCFoDh.js +1 -0
- package/dist/client/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/dist/client/assets/shellscript-Yzrsuije.js +1 -0
- package/dist/client/assets/shellsession-BADoaaVG.js +1 -0
- package/dist/client/assets/slack-dark-BthQWCQV.js +1 -0
- package/dist/client/assets/slack-ochin-DqwNpetd.js +1 -0
- package/dist/client/assets/smalltalk-BERRCDM3.js +1 -0
- package/dist/client/assets/snazzy-light-Bw305WKR.js +1 -0
- package/dist/client/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/dist/client/assets/solarized-light-L9t79GZl.js +1 -0
- package/dist/client/assets/solidity-rGO070M0.js +1 -0
- package/dist/client/assets/soy-Brmx7dQM.js +1 -0
- package/dist/client/assets/sparql-rVzFXLq3.js +1 -0
- package/dist/client/assets/splunk-BtCnVYZw.js +1 -0
- package/dist/client/assets/sql-BLtJtn59.js +1 -0
- package/dist/client/assets/ssh-config-_ykCGR6B.js +1 -0
- package/dist/client/assets/stata-BH5u7GGu.js +1 -0
- package/dist/client/assets/stylus-BEDo0Tqx.js +1 -0
- package/dist/client/assets/surrealql-Bq5Q-fJD.js +1 -0
- package/dist/client/assets/svelte-C_ipcX3V.js +1 -0
- package/dist/client/assets/swift-D82vCrfD.js +1 -0
- package/dist/client/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/dist/client/assets/system-verilog-CnnmHF94.js +1 -0
- package/dist/client/assets/systemd-4A_iFExJ.js +1 -0
- package/dist/client/assets/talonscript-CkByrt1z.js +1 -0
- package/dist/client/assets/tasl-QIJgUcNo.js +1 -0
- package/dist/client/assets/tcl-dwOrl1Do.js +1 -0
- package/dist/client/assets/templ-P3uqSqPl.js +1 -0
- package/dist/client/assets/terraform-BETggiCN.js +1 -0
- package/dist/client/assets/tex-idrVyKtj.js +1 -0
- package/dist/client/assets/tokyo-night-hegEt444.js +1 -0
- package/dist/client/assets/toml-vGWfd6FD.js +1 -0
- package/dist/client/assets/ts-tags-zn1MmPIZ.js +1 -0
- package/dist/client/assets/tsv-B_m7g4N7.js +1 -0
- package/dist/client/assets/tsx-COt5Ahok.js +1 -0
- package/dist/client/assets/turtle-BsS91CYL.js +1 -0
- package/dist/client/assets/twig-DNn4PbVi.js +1 -0
- package/dist/client/assets/typescript-BPQ3VLAy.js +1 -0
- package/dist/client/assets/typespec-BGHnOYBU.js +1 -0
- package/dist/client/assets/typst-DHCkPAjA.js +1 -0
- package/dist/client/assets/v-BcVCzyr7.js +1 -0
- package/dist/client/assets/vala-CsfeWuGM.js +1 -0
- package/dist/client/assets/vb-D17OF-Vu.js +1 -0
- package/dist/client/assets/verilog-BQ8w6xss.js +1 -0
- package/dist/client/assets/vesper-DU1UobuO.js +1 -0
- package/dist/client/assets/vhdl-CeAyd5Ju.js +1 -0
- package/dist/client/assets/viml-CJc9bBzg.js +1 -0
- package/dist/client/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/dist/client/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/dist/client/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/dist/client/assets/vue-DN_0RTcg.js +1 -0
- package/dist/client/assets/vue-html-AaS7Mt5G.js +1 -0
- package/dist/client/assets/vue-vine-CQOfvN7w.js +1 -0
- package/dist/client/assets/vyper-CDx5xZoG.js +1 -0
- package/dist/client/assets/wasm-CG6Dc4jp.js +1 -0
- package/dist/client/assets/wasm-MzD3tlZU.js +1 -0
- package/dist/client/assets/wenyan-BV7otONQ.js +1 -0
- package/dist/client/assets/wgsl-Dx-B1_4e.js +1 -0
- package/dist/client/assets/wikitext-BhOHFoWU.js +1 -0
- package/dist/client/assets/wit-5i3qLPDT.js +1 -0
- package/dist/client/assets/wolfram-lXgVvXCa.js +1 -0
- package/dist/client/assets/xml-sdJ4AIDG.js +1 -0
- package/dist/client/assets/xsl-CtQFsRM5.js +1 -0
- package/dist/client/assets/yaml-Buea-lGh.js +1 -0
- package/dist/client/assets/zenscript-DVFEvuxE.js +1 -0
- package/dist/client/assets/zig-VOosw3JB.js +1 -0
- package/dist/client/images/logo.png +0 -0
- package/dist/client/index.html +23 -0
- package/dist/client/manifest.webmanifest +1 -0
- package/dist/client/registerSW.js +1 -0
- package/dist/client/sw.js +1 -0
- package/dist/client/workbox-1ef09536.js +1 -0
- package/package.json +61 -0
- package/public/images/logo.png +0 -0
- package/server/auth-cookie.ts +25 -0
- package/server/auth.ts +92 -0
- package/server/claude.ts +759 -0
- package/server/db.ts +134 -0
- package/server/index.ts +177 -0
- package/server/preview.ts +93 -0
- package/server/projects.ts +401 -0
- package/server/tailscale.ts +87 -0
- package/server/terminal.ts +411 -0
- package/server/threads.ts +39 -0
- package/server/tunnel.ts +121 -0
- package/server/upload.ts +109 -0
- package/server/ws.ts +785 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DLfciZbe.js","assets/code-highlighter-D_0rJlW2.js","assets/index-D7x3ypuO.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Yc=Object.defineProperty;var qc=(e,t,n)=>t in e?Yc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var be=(e,t,n)=>qc(e,typeof t!="symbol"?t+"":t,n);function Vc(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function yr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fr={exports:{}},mn={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var Sa;function Wc(){if(Sa)return mn;Sa=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,a){var s=null;if(a!==void 0&&(s=""+a),i.key!==void 0&&(s=""+i.key),"key"in i){a={};for(var u in i)u!=="key"&&(a[u]=i[u])}else a=i;return i=a.ref,{$$typeof:e,type:r,key:s,ref:i!==void 0?i:null,props:a}}return mn.Fragment=t,mn.jsx=n,mn.jsxs=n,mn}var Ia;function Gc(){return Ia||(Ia=1,Fr.exports=Wc()),Fr.exports}var k=Gc(),Hr={exports:{}},ne={};/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react.production.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var Na;function Qc(){if(Na)return ne;Na=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),o=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator;function h(A){return A===null||typeof A!="object"?null:(A=p&&A[p]||A["@@iterator"],typeof A=="function"?A:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,C={};function y(A,v,T){this.props=A,this.context=v,this.refs=C,this.updater=T||g}y.prototype.isReactComponent={},y.prototype.setState=function(A,v){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,v,"setState")},y.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function O(){}O.prototype=y.prototype;function L(A,v,T){this.props=A,this.context=v,this.refs=C,this.updater=T||g}var B=L.prototype=new O;B.constructor=L,_(B,y.prototype),B.isPureReactComponent=!0;var z=Array.isArray;function N(){}var H={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function G(A,v,T){var W=T.ref;return{$$typeof:e,type:A,key:v,ref:W!==void 0?W:null,props:T}}function w(A,v){return G(A.type,v,A.props)}function $(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function V(A){var v={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(T){return v[T]})}var oe=/\/+/g;function Q(A,v){return typeof A=="object"&&A!==null&&A.key!=null?V(""+A.key):v.toString(36)}function j(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(N,N):(A.status="pending",A.then(function(v){A.status==="pending"&&(A.status="fulfilled",A.value=v)},function(v){A.status==="pending"&&(A.status="rejected",A.reason=v)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function Y(A,v,T,W,J){var X=typeof A;(X==="undefined"||X==="boolean")&&(A=null);var se=!1;if(A===null)se=!0;else switch(X){case"bigint":case"string":case"number":se=!0;break;case"object":switch(A.$$typeof){case e:case t:se=!0;break;case d:return se=A._init,Y(se(A._payload),v,T,W,J)}}if(se)return J=J(A),se=W===""?"."+Q(A,0):W,z(J)?(T="",se!=null&&(T=se.replace(oe,"$&/")+"/"),Y(J,v,T,"",function($e){return $e})):J!=null&&($(J)&&(J=w(J,T+(J.key==null||A&&A.key===J.key?"":(""+J.key).replace(oe,"$&/")+"/")+se)),v.push(J)),1;se=0;var ge=W===""?".":W+":";if(z(A))for(var re=0;re<A.length;re++)W=A[re],X=ge+Q(W,re),se+=Y(W,v,T,X,J);else if(re=h(A),typeof re=="function")for(A=re.call(A),re=0;!(W=A.next()).done;)W=W.value,X=ge+Q(W,re++),se+=Y(W,v,T,X,J);else if(X==="object"){if(typeof A.then=="function")return Y(j(A),v,T,W,J);throw v=String(A),Error("Objects are not valid as a React child (found: "+(v==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":v)+"). If you meant to render a collection of children, use an array instead.")}return se}function te(A,v,T){if(A==null)return A;var W=[],J=0;return Y(A,W,"","",function(X){return v.call(T,X,J++)}),W}function Ae(A){if(A._status===-1){var v=A._result;v=v(),v.then(function(T){(A._status===0||A._status===-1)&&(A._status=1,A._result=T)},function(T){(A._status===0||A._status===-1)&&(A._status=2,A._result=T)}),A._status===-1&&(A._status=0,A._result=v)}if(A._status===1)return A._result.default;throw A._result}var Ie=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var v=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(v))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},E={map:te,forEach:function(A,v,T){te(A,function(){v.apply(this,arguments)},T)},count:function(A){var v=0;return te(A,function(){v++}),v},toArray:function(A){return te(A,function(v){return v})||[]},only:function(A){if(!$(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return ne.Activity=f,ne.Children=E,ne.Component=y,ne.Fragment=n,ne.Profiler=i,ne.PureComponent=L,ne.StrictMode=r,ne.Suspense=o,ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,ne.__COMPILER_RUNTIME={__proto__:null,c:function(A){return H.H.useMemoCache(A)}},ne.cache=function(A){return function(){return A.apply(null,arguments)}},ne.cacheSignal=function(){return null},ne.cloneElement=function(A,v,T){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var W=_({},A.props),J=A.key;if(v!=null)for(X in v.key!==void 0&&(J=""+v.key),v)!P.call(v,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&v.ref===void 0||(W[X]=v[X]);var X=arguments.length-2;if(X===1)W.children=T;else if(1<X){for(var se=Array(X),ge=0;ge<X;ge++)se[ge]=arguments[ge+2];W.children=se}return G(A.type,J,W)},ne.createContext=function(A){return A={$$typeof:s,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:a,_context:A},A},ne.createElement=function(A,v,T){var W,J={},X=null;if(v!=null)for(W in v.key!==void 0&&(X=""+v.key),v)P.call(v,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(J[W]=v[W]);var se=arguments.length-2;if(se===1)J.children=T;else if(1<se){for(var ge=Array(se),re=0;re<se;re++)ge[re]=arguments[re+2];J.children=ge}if(A&&A.defaultProps)for(W in se=A.defaultProps,se)J[W]===void 0&&(J[W]=se[W]);return G(A,X,J)},ne.createRef=function(){return{current:null}},ne.forwardRef=function(A){return{$$typeof:u,render:A}},ne.isValidElement=$,ne.lazy=function(A){return{$$typeof:d,_payload:{_status:-1,_result:A},_init:Ae}},ne.memo=function(A,v){return{$$typeof:l,type:A,compare:v===void 0?null:v}},ne.startTransition=function(A){var v=H.T,T={};H.T=T;try{var W=A(),J=H.S;J!==null&&J(T,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(N,Ie)}catch(X){Ie(X)}finally{v!==null&&T.types!==null&&(v.types=T.types),H.T=v}},ne.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},ne.use=function(A){return H.H.use(A)},ne.useActionState=function(A,v,T){return H.H.useActionState(A,v,T)},ne.useCallback=function(A,v){return H.H.useCallback(A,v)},ne.useContext=function(A){return H.H.useContext(A)},ne.useDebugValue=function(){},ne.useDeferredValue=function(A,v){return H.H.useDeferredValue(A,v)},ne.useEffect=function(A,v){return H.H.useEffect(A,v)},ne.useEffectEvent=function(A){return H.H.useEffectEvent(A)},ne.useId=function(){return H.H.useId()},ne.useImperativeHandle=function(A,v,T){return H.H.useImperativeHandle(A,v,T)},ne.useInsertionEffect=function(A,v){return H.H.useInsertionEffect(A,v)},ne.useLayoutEffect=function(A,v){return H.H.useLayoutEffect(A,v)},ne.useMemo=function(A,v){return H.H.useMemo(A,v)},ne.useOptimistic=function(A,v){return H.H.useOptimistic(A,v)},ne.useReducer=function(A,v,T){return H.H.useReducer(A,v,T)},ne.useRef=function(A){return H.H.useRef(A)},ne.useState=function(A){return H.H.useState(A)},ne.useSyncExternalStore=function(A,v,T){return H.H.useSyncExternalStore(A,v,T)},ne.useTransition=function(){return H.H.useTransition()},ne.version="19.2.4",ne}var wa;function Su(){return wa||(wa=1,Hr.exports=Qc()),Hr.exports}var I=Su();const Xc=yr(I),o3=Vc({__proto__:null,default:Xc},[I]);var Ur={exports:{}},Oe={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* react-dom.production.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var La;function Kc(){if(La)return Oe;La=1;var e=Su();function t(o){var l="https://react.dev/errors/"+o;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function a(o,l,d){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:f==null?null:""+f,children:o,containerInfo:l,implementation:d}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(o,l){if(o==="font")return"";if(typeof l=="string")return l==="use-credentials"?l:""}return Oe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Oe.createPortal=function(o,l){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)throw Error(t(299));return a(o,l,null,d)},Oe.flushSync=function(o){var l=s.T,d=r.p;try{if(s.T=null,r.p=2,o)return o()}finally{s.T=l,r.p=d,r.d.f()}},Oe.preconnect=function(o,l){typeof o=="string"&&(l?(l=l.crossOrigin,l=typeof l=="string"?l==="use-credentials"?l:"":void 0):l=null,r.d.C(o,l))},Oe.prefetchDNS=function(o){typeof o=="string"&&r.d.D(o)},Oe.preinit=function(o,l){if(typeof o=="string"&&l&&typeof l.as=="string"){var d=l.as,f=u(d,l.crossOrigin),p=typeof l.integrity=="string"?l.integrity:void 0,h=typeof l.fetchPriority=="string"?l.fetchPriority:void 0;d==="style"?r.d.S(o,typeof l.precedence=="string"?l.precedence:void 0,{crossOrigin:f,integrity:p,fetchPriority:h}):d==="script"&&r.d.X(o,{crossOrigin:f,integrity:p,fetchPriority:h,nonce:typeof l.nonce=="string"?l.nonce:void 0})}},Oe.preinitModule=function(o,l){if(typeof o=="string")if(typeof l=="object"&&l!==null){if(l.as==null||l.as==="script"){var d=u(l.as,l.crossOrigin);r.d.M(o,{crossOrigin:d,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0})}}else l==null&&r.d.M(o)},Oe.preload=function(o,l){if(typeof o=="string"&&typeof l=="object"&&l!==null&&typeof l.as=="string"){var d=l.as,f=u(d,l.crossOrigin);r.d.L(o,d,{crossOrigin:f,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,type:typeof l.type=="string"?l.type:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0,referrerPolicy:typeof l.referrerPolicy=="string"?l.referrerPolicy:void 0,imageSrcSet:typeof l.imageSrcSet=="string"?l.imageSrcSet:void 0,imageSizes:typeof l.imageSizes=="string"?l.imageSizes:void 0,media:typeof l.media=="string"?l.media:void 0})}},Oe.preloadModule=function(o,l){if(typeof o=="string")if(l){var d=u(l.as,l.crossOrigin);r.d.m(o,{as:typeof l.as=="string"&&l.as!=="script"?l.as:void 0,crossOrigin:d,integrity:typeof l.integrity=="string"?l.integrity:void 0})}else r.d.m(o)},Oe.requestFormReset=function(o){r.d.r(o)},Oe.unstable_batchedUpdates=function(o,l){return o(l)},Oe.useFormState=function(o,l,d){return s.H.useFormState(o,l,d)},Oe.useFormStatus=function(){return s.H.useHostTransitionStatus()},Oe.version="19.2.4",Oe}var Ra;function Zc(){if(Ra)return Ur.exports;Ra=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ur.exports=Kc(),Ur.exports}function Iu(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Iu(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Nu(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Iu(e))&&(r&&(r+=" "),r+=t);return r}const Jc=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},ed=(e,t)=>({classGroupId:e,validator:t}),wu=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),fr="-",Oa=[],td="arbitrary..",nd=e=>{const t=id(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return rd(s);const u=s.split(fr),o=u[0]===""&&u.length>1?1:0;return Lu(u,o,t)},getConflictingClassGroupIds:(s,u)=>{if(u){const o=r[s],l=n[s];return o?l?Jc(l,o):o:l||Oa}return n[s]||Oa}}},Lu=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const l=Lu(e,t+1,a);if(l)return l}const s=n.validators;if(s===null)return;const u=t===0?e.join(fr):e.slice(t).join(fr),o=s.length;for(let l=0;l<o;l++){const d=s[l];if(d.validator(u))return d.classGroupId}},rd=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?td+r:void 0})(),id=e=>{const{theme:t,classGroups:n}=e;return ad(n,t)},ad=(e,t)=>{const n=wu();for(const r in e){const i=e[r];Fi(i,n,r,t)}return n},Fi=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const s=e[a];sd(s,t,n,r)}},sd=(e,t,n,r)=>{if(typeof e=="string"){ud(e,t,n);return}if(typeof e=="function"){od(e,t,n,r);return}ld(e,t,n,r)},ud=(e,t,n)=>{const r=e===""?t:Ru(t,e);r.classGroupId=n},od=(e,t,n,r)=>{if(cd(e)){Fi(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ed(n,e))},ld=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let s=0;s<a;s++){const[u,o]=i[s];Fi(o,Ru(t,u),n,r)}},Ru=(e,t)=>{let n=e;const r=t.split(fr),i=r.length;for(let a=0;a<i;a++){const s=r[a];let u=n.nextPart.get(s);u||(u=wu(),n.nextPart.set(s,u)),n=u}return n},cd=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,dd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(a,s)=>{n[a]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let s=n[a];if(s!==void 0)return s;if((s=r[a])!==void 0)return i(a,s),s},set(a,s){a in n?n[a]=s:i(a,s)}}},di="!",Da=":",fd=[],Pa=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),hd=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let s=0,u=0,o=0,l;const d=i.length;for(let _=0;_<d;_++){const C=i[_];if(s===0&&u===0){if(C===Da){a.push(i.slice(o,_)),o=_+1;continue}if(C==="/"){l=_;continue}}C==="["?s++:C==="]"?s--:C==="("?u++:C===")"&&u--}const f=a.length===0?i:i.slice(o);let p=f,h=!1;f.endsWith(di)?(p=f.slice(0,-1),h=!0):f.startsWith(di)&&(p=f.slice(1),h=!0);const g=l&&l>o?l-o:void 0;return Pa(a,h,p,g)};if(t){const i=t+Da,a=r;r=s=>s.startsWith(i)?a(s.slice(i.length)):Pa(fd,!1,s,void 0,!0)}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},pd=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let a=0;a<n.length;a++){const s=n[a],u=s[0]==="[",o=t.has(s);u||o?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(s)):i.push(s)}return i.length>0&&(i.sort(),r.push(...i)),r}},md=e=>({cache:dd(e.cacheSize),parseClassName:hd(e),sortModifiers:pd(e),...nd(e)}),gd=/\s+/,bd=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,s=[],u=e.trim().split(gd);let o="";for(let l=u.length-1;l>=0;l-=1){const d=u[l],{isExternal:f,modifiers:p,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:_}=n(d);if(f){o=d+(o.length>0?" "+o:o);continue}let C=!!_,y=r(C?g.substring(0,_):g);if(!y){if(!C){o=d+(o.length>0?" "+o:o);continue}if(y=r(g),!y){o=d+(o.length>0?" "+o:o);continue}C=!1}const O=p.length===0?"":p.length===1?p[0]:a(p).join(":"),L=h?O+di:O,B=L+y;if(s.indexOf(B)>-1)continue;s.push(B);const z=i(y,C);for(let N=0;N<z.length;++N){const H=z[N];s.push(L+H)}o=d+(o.length>0?" "+o:o)}return o},Ed=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=Ou(n))&&(i&&(i+=" "),i+=r);return i},Ou=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ou(e[r]))&&(n&&(n+=" "),n+=t);return n},Td=(e,...t)=>{let n,r,i,a;const s=o=>{const l=t.reduce((d,f)=>f(d),e());return n=md(l),r=n.cache.get,i=n.cache.set,a=u,u(o)},u=o=>{const l=r(o);if(l)return l;const d=bd(o,n);return i(o,d),d};return a=s,(...o)=>a(Ed(...o))},xd=[],we=e=>{const t=n=>n[e]||xd;return t.isThemeGetter=!0,t},Du=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,kd=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,yd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_d=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ad=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Cd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xt=e=>kd.test(e),ue=e=>!!e&&!Number.isNaN(Number(e)),kt=e=>!!e&&Number.isInteger(Number(e)),zr=e=>e.endsWith("%")&&ue(e.slice(0,-1)),mt=e=>yd.test(e),vu=()=>!0,Id=e=>_d.test(e)&&!Ad.test(e),Hi=()=>!1,Nd=e=>Cd.test(e),wd=e=>Sd.test(e),Ld=e=>!K(e)&&!Z(e),Rd=e=>wt(e,Fu,Hi),K=e=>Du.test(e),Pt=e=>wt(e,Hu,Id),va=e=>wt(e,Hd,ue),Od=e=>wt(e,zu,vu),Dd=e=>wt(e,Uu,Hi),Ma=e=>wt(e,Mu,Hi),Pd=e=>wt(e,Bu,wd),Kn=e=>wt(e,ju,Nd),Z=e=>Pu.test(e),gn=e=>Yt(e,Hu),vd=e=>Yt(e,Uu),Ba=e=>Yt(e,Mu),Md=e=>Yt(e,Fu),Bd=e=>Yt(e,Bu),Zn=e=>Yt(e,ju,!0),Fd=e=>Yt(e,zu,!0),wt=(e,t,n)=>{const r=Du.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Yt=(e,t,n=!1)=>{const r=Pu.exec(e);return r?r[1]?t(r[1]):n:!1},Mu=e=>e==="position"||e==="percentage",Bu=e=>e==="image"||e==="url",Fu=e=>e==="length"||e==="size"||e==="bg-size",Hu=e=>e==="length",Hd=e=>e==="number",Uu=e=>e==="family-name",zu=e=>e==="number"||e==="weight",ju=e=>e==="shadow",Ud=()=>{const e=we("color"),t=we("font"),n=we("text"),r=we("font-weight"),i=we("tracking"),a=we("leading"),s=we("breakpoint"),u=we("container"),o=we("spacing"),l=we("radius"),d=we("shadow"),f=we("inset-shadow"),p=we("text-shadow"),h=we("drop-shadow"),g=we("blur"),_=we("perspective"),C=we("aspect"),y=we("ease"),O=we("animate"),L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],z=()=>[...B(),Z,K],N=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],P=()=>[Z,K,o],G=()=>[xt,"full","auto",...P()],w=()=>[kt,"none","subgrid",Z,K],$=()=>["auto",{span:["full",kt,Z,K]},kt,Z,K],V=()=>[kt,"auto",Z,K],oe=()=>["auto","min","max","fr",Z,K],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],j=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...P()],te=()=>[xt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],Ae=()=>[xt,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Ie=()=>[xt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],E=()=>[e,Z,K],A=()=>[...B(),Ba,Ma,{position:[Z,K]}],v=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",Md,Rd,{size:[Z,K]}],W=()=>[zr,gn,Pt],J=()=>["","none","full",l,Z,K],X=()=>["",ue,gn,Pt],se=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[ue,zr,Ba,Ma],$e=()=>["","none",g,Z,K],Qe=()=>["none",ue,Z,K],dt=()=>["none",ue,Z,K],Tt=()=>[ue,Z,K],ft=()=>[xt,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[mt],breakpoint:[mt],color:[vu],container:[mt],"drop-shadow":[mt],ease:["in","out","in-out"],font:[Ld],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[mt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[mt],shadow:[mt],spacing:["px",ue],text:[mt],"text-shadow":[mt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xt,K,Z,C]}],container:["container"],columns:[{columns:[ue,K,Z,u]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:z()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:G()}],"inset-x":[{"inset-x":G()}],"inset-y":[{"inset-y":G()}],start:[{"inset-s":G(),start:G()}],end:[{"inset-e":G(),end:G()}],"inset-bs":[{"inset-bs":G()}],"inset-be":[{"inset-be":G()}],top:[{top:G()}],right:[{right:G()}],bottom:[{bottom:G()}],left:[{left:G()}],visibility:["visible","invisible","collapse"],z:[{z:[kt,"auto",Z,K]}],basis:[{basis:[xt,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ue,xt,"auto","initial","none",K]}],grow:[{grow:["",ue,Z,K]}],shrink:[{shrink:["",ue,Z,K]}],order:[{order:[kt,"first","last","none",Z,K]}],"grid-cols":[{"grid-cols":w()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":w()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":oe()}],"auto-rows":[{"auto-rows":oe()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...j(),"normal"]}],"justify-self":[{"justify-self":["auto",...j()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...j(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...j(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...j(),"baseline"]}],"place-self":[{"place-self":["auto",...j()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mbs:[{mbs:Y()}],mbe:[{mbe:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:te()}],"inline-size":[{inline:["auto",...Ae()]}],"min-inline-size":[{"min-inline":["auto",...Ae()]}],"max-inline-size":[{"max-inline":["none",...Ae()]}],"block-size":[{block:["auto",...Ie()]}],"min-block-size":[{"min-block":["auto",...Ie()]}],"max-block-size":[{"max-block":["none",...Ie()]}],w:[{w:[u,"screen",...te()]}],"min-w":[{"min-w":[u,"screen","none",...te()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[s]},...te()]}],h:[{h:["screen","lh",...te()]}],"min-h":[{"min-h":["screen","lh","none",...te()]}],"max-h":[{"max-h":["screen","lh",...te()]}],"font-size":[{text:["base",n,gn,Pt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Fd,Od]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",zr,K]}],"font-family":[{font:[vd,Dd,t]}],"font-features":[{"font-features":[K]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Z,K]}],"line-clamp":[{"line-clamp":[ue,"none",Z,va]}],leading:[{leading:[a,...P()]}],"list-image":[{"list-image":["none",Z,K]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Z,K]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[ue,"from-font","auto",Z,Pt]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[ue,"auto",Z,K]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z,K]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Z,K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:v()}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},kt,Z,K],radial:["",Z,K],conic:[kt,Z,K]},Bd,Pd]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:J()}],"rounded-s":[{"rounded-s":J()}],"rounded-e":[{"rounded-e":J()}],"rounded-t":[{"rounded-t":J()}],"rounded-r":[{"rounded-r":J()}],"rounded-b":[{"rounded-b":J()}],"rounded-l":[{"rounded-l":J()}],"rounded-ss":[{"rounded-ss":J()}],"rounded-se":[{"rounded-se":J()}],"rounded-ee":[{"rounded-ee":J()}],"rounded-es":[{"rounded-es":J()}],"rounded-tl":[{"rounded-tl":J()}],"rounded-tr":[{"rounded-tr":J()}],"rounded-br":[{"rounded-br":J()}],"rounded-bl":[{"rounded-bl":J()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-bs":[{"border-bs":E()}],"border-color-be":[{"border-be":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ue,Z,K]}],"outline-w":[{outline:["",ue,gn,Pt]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",d,Zn,Kn]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",f,Zn,Kn]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[ue,Pt]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",p,Zn,Kn]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[ue,Z,K]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ue]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[Z,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":B()}],"mask-image-conic-pos":[{"mask-conic":[ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:v()}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,K]}],filter:[{filter:["","none",Z,K]}],blur:[{blur:$e()}],brightness:[{brightness:[ue,Z,K]}],contrast:[{contrast:[ue,Z,K]}],"drop-shadow":[{"drop-shadow":["","none",h,Zn,Kn]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",ue,Z,K]}],"hue-rotate":[{"hue-rotate":[ue,Z,K]}],invert:[{invert:["",ue,Z,K]}],saturate:[{saturate:[ue,Z,K]}],sepia:[{sepia:["",ue,Z,K]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,K]}],"backdrop-blur":[{"backdrop-blur":$e()}],"backdrop-brightness":[{"backdrop-brightness":[ue,Z,K]}],"backdrop-contrast":[{"backdrop-contrast":[ue,Z,K]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ue,Z,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ue,Z,K]}],"backdrop-invert":[{"backdrop-invert":["",ue,Z,K]}],"backdrop-opacity":[{"backdrop-opacity":[ue,Z,K]}],"backdrop-saturate":[{"backdrop-saturate":[ue,Z,K]}],"backdrop-sepia":[{"backdrop-sepia":["",ue,Z,K]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Z,K]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ue,"initial",Z,K]}],ease:[{ease:["linear","initial",y,Z,K]}],delay:[{delay:[ue,Z,K]}],animate:[{animate:["none",O,Z,K]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,Z,K]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:Qe()}],"rotate-x":[{"rotate-x":Qe()}],"rotate-y":[{"rotate-y":Qe()}],"rotate-z":[{"rotate-z":Qe()}],scale:[{scale:dt()}],"scale-x":[{"scale-x":dt()}],"scale-y":[{"scale-y":dt()}],"scale-z":[{"scale-z":dt()}],"scale-3d":["scale-3d"],skew:[{skew:Tt()}],"skew-x":[{"skew-x":Tt()}],"skew-y":[{"skew-y":Tt()}],transform:[{transform:[Z,K,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ft()}],"translate-x":[{"translate-x":ft()}],"translate-y":[{"translate-y":ft()}],"translate-z":[{"translate-z":ft()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Z,K]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Z,K]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[ue,gn,Pt,va]}],stroke:[{stroke:["none",...E()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},$u=Td(Ud);var Ui=Zc();const l3=yr(Ui),zd="modulepreload",jd=function(e){return"/"+e},Fa={},Yu=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let s=function(l){return Promise.all(l.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),o=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=s(n.map(l=>{if(l=jd(l),l in Fa)return;Fa[l]=!0;const d=l.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${f}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":zd,d||(p.as="script"),p.crossOrigin="",p.href=l,o&&p.setAttribute("nonce",o),document.head.appendChild(p),d)return new Promise((h,g)=>{p.addEventListener("load",h),p.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(s){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=s,window.dispatchEvent(u),!u.defaultPrevented)throw s}return i.then(s=>{for(const u of s||[])u.status==="rejected"&&a(u.reason);return t().catch(a)})},_r=(function(e){if(e==null)return Vd;if(typeof e=="function")return Ar(e);if(typeof e=="object")return Array.isArray(e)?$d(e):Yd(e);if(typeof e=="string")return qd(e);throw new Error("Expected function, string, or object as test")});function $d(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=_r(e[n]);return Ar(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Yd(e){const t=e;return Ar(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function qd(e){return Ar(t);function t(n){return n&&n.type===e}}function Ar(e){return t;function t(n,r,i){return!!(Wd(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Vd(){return!0}function Wd(e){return e!==null&&typeof e=="object"&&"type"in e}const qu=[],Cn=!0,fi=!1,en="skip";function zi(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=_r(i),s=r?-1:1;u(e,void 0,[])();function u(o,l,d){const f=o&&typeof o=="object"?o:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(o.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=qu,g,_,C;if((!t||a(o,l,d[d.length-1]||void 0))&&(h=Gd(n(o,d)),h[0]===fi))return h;if("children"in o&&o.children){const y=o;if(y.children&&h[0]!==en)for(_=(r?y.children.length:-1)+s,C=d.concat(y);_>-1&&_<y.children.length;){const O=y.children[_];if(g=u(O,_,C)(),g[0]===fi)return g;_=typeof g[1]=="number"?g[1]:_+s}}return h}}}function Gd(e){return Array.isArray(e)?e:typeof e=="number"?[Cn,e]:e==null?qu:[e]}function ot(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),zi(e,a,u,i);function u(o,l){const d=l[l.length-1],f=d?d.children.indexOf(o):void 0;return s(o,f,d)}}const an={indicator:"indicator",textOnly:"text-only",remove:"remove"};function Qd({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!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:u=an.indicator,imageBlockPolicy:o=an.indicator}){const l=t.length&&!t.every(f=>f==="*"),d=n.length&&!n.every(f=>f==="*");if(!e&&(l||d))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return f=>{const p=tf(e,t,n,r,i,a,s,u,o);Vu(f),ot(f,p)}}function Ha(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 Xd(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Kd=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Zd=new Set(["javascript:","data:","file:","vbscript:"]);function Ua(e,t,n,r=!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&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const d=e.substring(5);if(d&&d.length>0&&d!=="invalid")return e}}catch{return null}return null}const s=Ha(e,n);if(!s||Zd.has(s.protocol)||!(Kd.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const o=Xd(e);return s&&t.some(l=>{const d=Ha(l,n);return!d||d.origin!==s.origin?!1:s.href.startsWith(d.href)})?o?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:o?s.pathname+s.search+s.hash:s.href:null}function Vu(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Vu(t)}}const jr=Symbol("node-seen");function Jd(e,t,n){return t===an.remove?{type:"remove"}:t===an.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:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function ef(e,t,n){if(t===an.remove)return{type:"remove"};if(t===an.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const tf=(e,t,n,r,i,a,s,u,o)=>{const l=(d,f,p)=>{if(d.type!=="element"||d[jr])return Cn;if(d.tagName==="a"){const h=Ua(d.properties.href,t,e,!1,!1,i);if(h===null){if(d[jr]=!0,ot(d,l),p&&typeof f=="number"){const g=Jd(d,u,s);if(g.type==="remove")return p.children.splice(f,1),[en,f];p.children[f]=g.element}return en}else return d.properties.href=h,d.properties.target="_blank",d.properties.rel="noopener noreferrer",Cn}if(d.tagName==="img"){const h=Ua(d.properties.src,n,e,r,!0,i);if(h===null){if(d[jr]=!0,ot(d,l),p&&typeof f=="number"){const g=ef(d,o,a);if(g.type==="remove")return p.children.splice(f,1),[en,f];p.children[f]=g.element}return en}else return d.properties.src=h,Cn}return Cn};return l},Wu=-1,Cr=0,wn=1,hr=2,ji=3,$i=4,Yi=5,qi=6,Gu=7,Qu=8,za=typeof self=="object"?self:globalThis,nf=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case Cr:case Wu:return n(s,i);case wn:{const u=n([],i);for(const o of s)u.push(r(o));return u}case hr:{const u=n({},i);for(const[o,l]of s)u[r(o)]=r(l);return u}case ji:return n(new Date(s),i);case $i:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case Yi:{const u=n(new Map,i);for(const[o,l]of s)u.set(r(o),r(l));return u}case qi:{const u=n(new Set,i);for(const o of s)u.add(r(o));return u}case Gu:{const{name:u,message:o}=s;return n(new za[u](o),i)}case Qu:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new za[a](s),i)};return r},ja=e=>nf(new Map,e)(0),Kt="",{toString:rf}={},{keys:af}=Object,bn=e=>{const t=typeof e;if(t!=="object"||!e)return[Cr,t];const n=rf.call(e).slice(8,-1);switch(n){case"Array":return[wn,Kt];case"Object":return[hr,Kt];case"Date":return[ji,Kt];case"RegExp":return[$i,Kt];case"Map":return[Yi,Kt];case"Set":return[qi,Kt];case"DataView":return[wn,n]}return n.includes("Array")?[wn,n]:n.includes("Error")?[Gu,n]:[hr,n]},Jn=([e,t])=>e===Cr&&(t==="function"||t==="symbol"),sf=(e,t,n,r)=>{const i=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},a=s=>{if(n.has(s))return n.get(s);let[u,o]=bn(s);switch(u){case Cr:{let d=s;switch(o){case"bigint":u=Qu,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);d=null;break;case"undefined":return i([Wu],s)}return i([u,d],s)}case wn:{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=[],f=i([u,d],s);for(const p of s)d.push(a(p));return f}case hr:{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=[],f=i([u,d],s);for(const p of af(s))(e||!Jn(bn(s[p])))&&d.push([a(p),a(s[p])]);return f}case ji:return i([u,s.toISOString()],s);case $i:{const{source:d,flags:f}=s;return i([u,{source:d,flags:f}],s)}case Yi:{const d=[],f=i([u,d],s);for(const[p,h]of s)(e||!(Jn(bn(p))||Jn(bn(h))))&&d.push([a(p),a(h)]);return f}case qi:{const d=[],f=i([u,d],s);for(const p of s)(e||!Jn(bn(p)))&&d.push(a(p));return f}}const{message:l}=s;return i([u,{name:o,message:l}],s)};return a},$a=(e,{json:t,lossy:n}={})=>{const r=[];return sf(!(t||n),!!t,new Map,r)(e),r},zt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ja($a(e,t)):structuredClone(e):(e,t)=>ja($a(e,t));class jn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}jn.prototype.normal={};jn.prototype.property={};jn.prototype.space=void 0;function Xu(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new jn(n,r,t)}function Fn(e){return e.toLowerCase()}class je{constructor(t,n){this.attribute=n,this.property=t}}je.prototype.attribute="";je.prototype.booleanish=!1;je.prototype.boolean=!1;je.prototype.commaOrSpaceSeparated=!1;je.prototype.commaSeparated=!1;je.prototype.defined=!1;je.prototype.mustUseProperty=!1;je.prototype.number=!1;je.prototype.overloadedBoolean=!1;je.prototype.property="";je.prototype.spaceSeparated=!1;je.prototype.space=void 0;let uf=0;const ae=qt(),Ne=qt(),hi=qt(),U=qt(),ke=qt(),nn=qt(),qe=qt();function qt(){return 2**++uf}const pi=Object.freeze(Object.defineProperty({__proto__:null,boolean:ae,booleanish:Ne,commaOrSpaceSeparated:qe,commaSeparated:nn,number:U,overloadedBoolean:hi,spaceSeparated:ke},Symbol.toStringTag,{value:"Module"})),$r=Object.keys(pi);class Vi extends je{constructor(t,n,r,i){let a=-1;if(super(t,n),Ya(this,"space",i),typeof r=="number")for(;++a<$r.length;){const s=$r[a];Ya(this,$r[a],(r&pi[s])===pi[s])}}}Vi.prototype.defined=!0;function Ya(e,t,n){n&&(e[t]=n)}function on(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Vi(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Fn(r)]=r,n[Fn(a.attribute)]=r}return new jn(t,n,e.space)}const Ku=on({properties:{ariaActiveDescendant:null,ariaAtomic:Ne,ariaAutoComplete:null,ariaBusy:Ne,ariaChecked:Ne,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:ke,ariaCurrent:null,ariaDescribedBy:ke,ariaDetails:null,ariaDisabled:Ne,ariaDropEffect:ke,ariaErrorMessage:null,ariaExpanded:Ne,ariaFlowTo:ke,ariaGrabbed:Ne,ariaHasPopup:null,ariaHidden:Ne,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ke,ariaLevel:U,ariaLive:null,ariaModal:Ne,ariaMultiLine:Ne,ariaMultiSelectable:Ne,ariaOrientation:null,ariaOwns:ke,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:Ne,ariaReadOnly:Ne,ariaRelevant:null,ariaRequired:Ne,ariaRoleDescription:ke,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:Ne,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Zu(e,t){return t in e?e[t]:t}function Ju(e,t){return Zu(e,t.toLowerCase())}const of=on({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:nn,acceptCharset:ke,accessKey:ke,action:null,allow:null,allowFullScreen:ae,allowPaymentRequest:ae,allowUserMedia:ae,alt:null,as:null,async:ae,autoCapitalize:null,autoComplete:ke,autoFocus:ae,autoPlay:ae,blocking:ke,capture:null,charSet:null,checked:ae,cite:null,className:ke,cols:U,colSpan:null,content:null,contentEditable:Ne,controls:ae,controlsList:ke,coords:U|nn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ae,defer:ae,dir:null,dirName:null,disabled:ae,download:hi,draggable:Ne,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ae,formTarget:null,headers:ke,height:U,hidden:hi,high:U,href:null,hrefLang:null,htmlFor:ke,httpEquiv:ke,id:null,imageSizes:null,imageSrcSet:null,inert:ae,inputMode:null,integrity:null,is:null,isMap:ae,itemId:null,itemProp:ke,itemRef:ke,itemScope:ae,itemType:ke,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ae,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:ae,muted:ae,name:null,nonce:null,noModule:ae,noValidate:ae,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:ae,optimum:U,pattern:null,ping:ke,placeholder:null,playsInline:ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ae,referrerPolicy:null,rel:ke,required:ae,reversed:ae,rows:U,rowSpan:U,sandbox:ke,scope:null,scoped:ae,seamless:ae,selected:ae,shadowRootClonable:ae,shadowRootDelegatesFocus:ae,shadowRootMode:null,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:Ne,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:ae,useMap:null,value:Ne,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ke,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ae,declare:ae,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:ae,noHref:ae,noShade:ae,noWrap:ae,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:Ne,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ae,disableRemotePlayback:ae,prefix:null,property:null,results:U,security:null,unselectable:null},space:"html",transform:Ju}),lf=on({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:qe,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:ke,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:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,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:nn,g2:nn,glyphName:nn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:qe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,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:U,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:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ke,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qe,rev:qe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qe,requiredFeatures:qe,requiredFonts:qe,requiredFormats:qe,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:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:qe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qe,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zu}),eo=on({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()}}),to=on({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ju}),no=on({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),cf={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"},df=/[A-Z]/g,qa=/-[a-z]/g,ff=/^data[-\w.:]+$/i;function Sr(e,t){const n=Fn(t);let r=t,i=je;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ff.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(qa,pf);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!qa.test(a)){let s=a.replace(df,hf);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Vi}return new i(r,t)}function hf(e){return"-"+e.toLowerCase()}function pf(e){return e.charAt(1).toUpperCase()}const $n=Xu([Ku,of,eo,to,no],"html"),Lt=Xu([Ku,lf,eo,to,no],"svg");function Va(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function ro(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Wa=/[#.]/g;function mf(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Wa.lastIndex=i;const u=Wa.exec(n),o=n.slice(i,u?u.index:n.length);o&&(a?a==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,i+=o.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Ga(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function io(e){return e.join(" ").trim()}function ao(e,t,n){const r=n?Tf(n):void 0;function i(a,s,...u){let o;if(a==null){o={type:"root",children:[]};const l=s;u.unshift(l)}else{o=mf(a,t);const l=o.tagName.toLowerCase(),d=r?r.get(l):void 0;if(o.tagName=d||l,gf(s))u.unshift(s);else for(const[f,p]of Object.entries(s))bf(e,o.properties,f,p)}for(const l of u)mi(o.children,l);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function gf(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];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 bf(e,t,n,r){const i=Sr(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=Ga(r):i.commaSeparated?a=Va(r):i.commaOrSpaceSeparated?a=Ga(Va(r).join(" ")):a=Qa(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?Ef(r):String(r);if(Array.isArray(a)){const s=[];for(const u of a)s.push(Qa(i,i.property,u));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function mi(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 n of t)mi(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?mi(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Qa(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Fn(n)===Fn(t)))return!0}return n}function Ef(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Tf(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const xf=["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"],kf=ao($n,"div"),yf=ao(Lt,"g",xf);function _f(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const o=Xa(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>a)return{line:s+1,column:a-(s>0?n[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(;n.length<a.line;){const u=n[n.length-1],o=Xa(t,u),l=o===-1?t.length+1:o+1;if(u===l)break;n.push(l)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Xa(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
27
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Ht={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/"},so={}.hasOwnProperty,Af=Object.prototype;function Cf(e,t){const n=t||{};return Wi({file:n.file||void 0,location:!1,schema:n.space==="svg"?Lt:$n,verbose:n.verbose||!1},e)}function Wi(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},or(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:uo(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=_f(a),u=s.toPoint(0),o=s.toPoint(a.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},or(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},or(e,r,n),n}default:return n=Sf(e,t),n}}function uo(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Wi(e,t[n]);r.push(i)}return r}function Sf(e,t){const n=e.schema;e.schema=t.namespaceURI===Ht.svg?Lt:$n;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;so.call(Af,o)||(i[o]=u.value)}const s=(e.schema.space==="svg"?yf:kf)(t.tagName,i,uo(e,t.childNodes));if(or(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,l=o&&o.startTag&&tn(o.startTag),d=o&&o.endTag&&tn(o.endTag),f=Wi(e,u.content);l&&d&&e.file&&(f.position={start:l.end,end:d.start}),s.content=f}return e.schema=n,s}function or(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=If(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function If(e,t,n){const r=tn(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)so.call(n.attrs,s)&&(a[Sr(e.schema,s).property]=tn(n.attrs[s]));n.startTag;const u=tn(n.startTag),o=n.endTag?tn(n.endTag):void 0,l={opening:u};o&&(l.closing=o),l.properties=a,t.data={position:l}}}return r}function tn(e){const t=Ka({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Ka({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Ka(e){return e.line&&e.column?e:void 0}const Za={}.hasOwnProperty;function oo(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&Za.call(i,e)){const o=String(i[e]);s=Za.call(u,o)?u[o]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Nf={},wf={}.hasOwnProperty,lo=oo("type",{handlers:{root:Rf,element:Mf,text:Pf,comment:vf,doctype:Df}});function Lf(e,t){const r=(t||Nf).space;return lo(e,r==="svg"?Lt:$n)}function Rf(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Gi(e.children,n,t),ln(e,n),n}function Of(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Gi(e.children,n,t),ln(e,n),n}function Df(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return ln(e,t),t}function Pf(e){const t={nodeName:"#text",value:e.value,parentNode:null};return ln(e,t),t}function vf(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return ln(e,t),t}function Mf(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Lt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&wf.call(e.properties,a)){const o=Bf(r,a,e.properties[a]);o&&i.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Ht[s],childNodes:[],parentNode:null};return u.childNodes=Gi(e.children,u,r),ln(e,u),e.tagName==="template"&&e.content&&(u.content=Of(e.content,r)),u}function Bf(e,t,n){const r=Sr(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?ro(n):io(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=Ht[r.space]}return i}function Gi(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=lo(e[r],n);a.parentNode=t,i.push(a)}return i}function ln(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const Ff=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Hf=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]),_e="�";var m;(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"})(m||(m={}));const He={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function co(e){return e>=55296&&e<=57343}function Uf(e){return e>=56320&&e<=57343}function zf(e,t){return(e-55296)*1024+9216+t}function fo(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ho(e){return e>=64976&&e<=65007||Hf.has(e)}var R;(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"})(R||(R={}));const jf=65536;class $f{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=jf,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(t,n){const{line:r,col:i,offset:a}=this,s=i+n,u=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Uf(n))return this.pos++,this._addGap(),zf(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,m.EOF;return this._err(R.surrogateInInputStream),t}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(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,m.EOF;const r=this.html.charCodeAt(n);return r===m.CARRIAGE_RETURN?m.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,m.EOF;let t=this.html.charCodeAt(this.pos);return t===m.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,m.LINE_FEED):t===m.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,co(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===m.LINE_FEED||t===m.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){fo(t)?this._err(R.controlCharacterInInputStream):ho(t)&&this._err(R.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var le;(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"})(le||(le={}));function po(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const Yf=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))),qf=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]]);function Vf(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=qf.get(e))!==null&&t!==void 0?t:e}var Re;(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"})(Re||(Re={}));const Wf=32;var St;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(St||(St={}));function gi(e){return e>=Re.ZERO&&e<=Re.NINE}function Gf(e){return e>=Re.UPPER_A&&e<=Re.UPPER_F||e>=Re.LOWER_A&&e<=Re.LOWER_F}function Qf(e){return e>=Re.UPPER_A&&e<=Re.UPPER_Z||e>=Re.LOWER_A&&e<=Re.LOWER_Z||gi(e)}function Xf(e){return e===Re.EQUALS||Qf(e)}var Le;(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"})(Le||(Le={}));var gt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(gt||(gt={}));class Kf{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Le.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=gt.Strict}startEntity(t){this.decodeMode=t,this.state=Le.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Le.EntityStart:return t.charCodeAt(n)===Re.NUM?(this.state=Le.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Le.NamedEntity,this.stateNamedEntity(t,n));case Le.NumericStart:return this.stateNumericStart(t,n);case Le.NumericDecimal:return this.stateNumericDecimal(t,n);case Le.NumericHex:return this.stateNumericHex(t,n);case Le.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Wf)===Re.LOWER_X?(this.state=Le.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Le.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(gi(i)||Gf(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(gi(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Re.SEMI)this.consumed+=1;else if(this.decodeMode===gt.Strict)return 0;return this.emitCodePoint(Vf(this.result),this.consumed),this.errors&&(t!==Re.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&St.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Zf(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===gt.Attribute&&(a===0||Xf(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&St.VALUE_LENGTH)>>14,a!==0){if(s===Re.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==gt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&St.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~St.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Le.NamedEntity:return this.result!==0&&(this.decodeMode!==gt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Le.NumericDecimal:return this.emitNumericEntity(0,2);case Le.NumericHex:return this.emitNumericEntity(0,3);case Le.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Le.EntityStart:return 0}}}function Zf(e,t,n,r){const i=(t&St.BRANCH_LENGTH)>>7,a=t&St.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const o=r-a;return o<0||o>=i?-1:e[n+o]-1}let s=n,u=s+i-1;for(;s<=u;){const o=s+u>>>1,l=e[o];if(l<r)s=o+1;else if(l>r)u=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 Ut;(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"})(Ut||(Ut={}));var Xe;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Xe||(Xe={}));var S;(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"})(S||(S={}));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={}));const Jf=new Map([[S.A,c.A],[S.ADDRESS,c.ADDRESS],[S.ANNOTATION_XML,c.ANNOTATION_XML],[S.APPLET,c.APPLET],[S.AREA,c.AREA],[S.ARTICLE,c.ARTICLE],[S.ASIDE,c.ASIDE],[S.B,c.B],[S.BASE,c.BASE],[S.BASEFONT,c.BASEFONT],[S.BGSOUND,c.BGSOUND],[S.BIG,c.BIG],[S.BLOCKQUOTE,c.BLOCKQUOTE],[S.BODY,c.BODY],[S.BR,c.BR],[S.BUTTON,c.BUTTON],[S.CAPTION,c.CAPTION],[S.CENTER,c.CENTER],[S.CODE,c.CODE],[S.COL,c.COL],[S.COLGROUP,c.COLGROUP],[S.DD,c.DD],[S.DESC,c.DESC],[S.DETAILS,c.DETAILS],[S.DIALOG,c.DIALOG],[S.DIR,c.DIR],[S.DIV,c.DIV],[S.DL,c.DL],[S.DT,c.DT],[S.EM,c.EM],[S.EMBED,c.EMBED],[S.FIELDSET,c.FIELDSET],[S.FIGCAPTION,c.FIGCAPTION],[S.FIGURE,c.FIGURE],[S.FONT,c.FONT],[S.FOOTER,c.FOOTER],[S.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[S.FORM,c.FORM],[S.FRAME,c.FRAME],[S.FRAMESET,c.FRAMESET],[S.H1,c.H1],[S.H2,c.H2],[S.H3,c.H3],[S.H4,c.H4],[S.H5,c.H5],[S.H6,c.H6],[S.HEAD,c.HEAD],[S.HEADER,c.HEADER],[S.HGROUP,c.HGROUP],[S.HR,c.HR],[S.HTML,c.HTML],[S.I,c.I],[S.IMG,c.IMG],[S.IMAGE,c.IMAGE],[S.INPUT,c.INPUT],[S.IFRAME,c.IFRAME],[S.KEYGEN,c.KEYGEN],[S.LABEL,c.LABEL],[S.LI,c.LI],[S.LINK,c.LINK],[S.LISTING,c.LISTING],[S.MAIN,c.MAIN],[S.MALIGNMARK,c.MALIGNMARK],[S.MARQUEE,c.MARQUEE],[S.MATH,c.MATH],[S.MENU,c.MENU],[S.META,c.META],[S.MGLYPH,c.MGLYPH],[S.MI,c.MI],[S.MO,c.MO],[S.MN,c.MN],[S.MS,c.MS],[S.MTEXT,c.MTEXT],[S.NAV,c.NAV],[S.NOBR,c.NOBR],[S.NOFRAMES,c.NOFRAMES],[S.NOEMBED,c.NOEMBED],[S.NOSCRIPT,c.NOSCRIPT],[S.OBJECT,c.OBJECT],[S.OL,c.OL],[S.OPTGROUP,c.OPTGROUP],[S.OPTION,c.OPTION],[S.P,c.P],[S.PARAM,c.PARAM],[S.PLAINTEXT,c.PLAINTEXT],[S.PRE,c.PRE],[S.RB,c.RB],[S.RP,c.RP],[S.RT,c.RT],[S.RTC,c.RTC],[S.RUBY,c.RUBY],[S.S,c.S],[S.SCRIPT,c.SCRIPT],[S.SEARCH,c.SEARCH],[S.SECTION,c.SECTION],[S.SELECT,c.SELECT],[S.SOURCE,c.SOURCE],[S.SMALL,c.SMALL],[S.SPAN,c.SPAN],[S.STRIKE,c.STRIKE],[S.STRONG,c.STRONG],[S.STYLE,c.STYLE],[S.SUB,c.SUB],[S.SUMMARY,c.SUMMARY],[S.SUP,c.SUP],[S.TABLE,c.TABLE],[S.TBODY,c.TBODY],[S.TEMPLATE,c.TEMPLATE],[S.TEXTAREA,c.TEXTAREA],[S.TFOOT,c.TFOOT],[S.TD,c.TD],[S.TH,c.TH],[S.THEAD,c.THEAD],[S.TITLE,c.TITLE],[S.TR,c.TR],[S.TRACK,c.TRACK],[S.TT,c.TT],[S.U,c.U],[S.UL,c.UL],[S.SVG,c.SVG],[S.VAR,c.VAR],[S.WBR,c.WBR],[S.XMP,c.XMP]]);function cn(e){var t;return(t=Jf.get(e))!==null&&t!==void 0?t:c.UNKNOWN}const F=c,eh={[M.HTML]:new Set([F.ADDRESS,F.APPLET,F.AREA,F.ARTICLE,F.ASIDE,F.BASE,F.BASEFONT,F.BGSOUND,F.BLOCKQUOTE,F.BODY,F.BR,F.BUTTON,F.CAPTION,F.CENTER,F.COL,F.COLGROUP,F.DD,F.DETAILS,F.DIR,F.DIV,F.DL,F.DT,F.EMBED,F.FIELDSET,F.FIGCAPTION,F.FIGURE,F.FOOTER,F.FORM,F.FRAME,F.FRAMESET,F.H1,F.H2,F.H3,F.H4,F.H5,F.H6,F.HEAD,F.HEADER,F.HGROUP,F.HR,F.HTML,F.IFRAME,F.IMG,F.INPUT,F.LI,F.LINK,F.LISTING,F.MAIN,F.MARQUEE,F.MENU,F.META,F.NAV,F.NOEMBED,F.NOFRAMES,F.NOSCRIPT,F.OBJECT,F.OL,F.P,F.PARAM,F.PLAINTEXT,F.PRE,F.SCRIPT,F.SECTION,F.SELECT,F.SOURCE,F.STYLE,F.SUMMARY,F.TABLE,F.TBODY,F.TD,F.TEMPLATE,F.TEXTAREA,F.TFOOT,F.TH,F.THEAD,F.TITLE,F.TR,F.TRACK,F.UL,F.WBR,F.XMP]),[M.MATHML]:new Set([F.MI,F.MO,F.MN,F.MS,F.MTEXT,F.ANNOTATION_XML]),[M.SVG]:new Set([F.TITLE,F.FOREIGN_OBJECT,F.DESC]),[M.XLINK]:new Set,[M.XML]:new Set,[M.XMLNS]:new Set},bi=new Set([F.H1,F.H2,F.H3,F.H4,F.H5,F.H6]);S.STYLE,S.SCRIPT,S.XMP,S.IFRAME,S.NOEMBED,S.NOFRAMES,S.PLAINTEXT;var 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={}));const Se={DATA:b.DATA,RCDATA:b.RCDATA,RAWTEXT:b.RAWTEXT,SCRIPT_DATA:b.SCRIPT_DATA,PLAINTEXT:b.PLAINTEXT,CDATA_SECTION:b.CDATA_SECTION};function th(e){return e>=m.DIGIT_0&&e<=m.DIGIT_9}function Sn(e){return e>=m.LATIN_CAPITAL_A&&e<=m.LATIN_CAPITAL_Z}function nh(e){return e>=m.LATIN_SMALL_A&&e<=m.LATIN_SMALL_Z}function _t(e){return nh(e)||Sn(e)}function Ja(e){return _t(e)||th(e)}function er(e){return e+32}function mo(e){return e===m.SPACE||e===m.LINE_FEED||e===m.TABULATION||e===m.FORM_FEED}function es(e){return mo(e)||e===m.SOLIDUS||e===m.GREATER_THAN_SIGN}function rh(e){return e===m.NULL?R.nullCharacterReference:e>1114111?R.characterReferenceOutsideUnicodeRange:co(e)?R.surrogateCharacterReference:ho(e)?R.noncharacterCharacterReference:fo(e)||e===m.CARRIAGE_RETURN?R.controlCharacterReference:null}class ih{constructor(t,n){this.options=t,this.handler=n,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 $f(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Kf(Yf,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(R.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(R.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=rh(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),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(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:le.START_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:le.END_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:le.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:le.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(po(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(R.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=cn(t.tagName),t.type===le.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(R.endTagWithAttributes),t.selfClosing&&this._err(R.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case le.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case le.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case le.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:le.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=mo(t)?le.WHITESPACE_CHARACTER:t===m.NULL?le.NULL_CHARACTER:le.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(le.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=b.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?gt.Attribute:gt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===b.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===b.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case b.DATA:{this._stateData(t);break}case b.RCDATA:{this._stateRcdata(t);break}case b.RAWTEXT:{this._stateRawtext(t);break}case b.SCRIPT_DATA:{this._stateScriptData(t);break}case b.PLAINTEXT:{this._statePlaintext(t);break}case b.TAG_OPEN:{this._stateTagOpen(t);break}case b.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case b.TAG_NAME:{this._stateTagName(t);break}case b.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case b.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case b.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case b.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case b.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case b.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case b.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case b.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case b.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case b.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case b.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case b.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case b.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case b.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case b.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case b.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case b.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case b.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case b.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case b.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case b.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case b.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case b.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case b.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case b.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case b.BOGUS_COMMENT:{this._stateBogusComment(t);break}case b.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case b.COMMENT_START:{this._stateCommentStart(t);break}case b.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case b.COMMENT:{this._stateComment(t);break}case b.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case b.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case b.COMMENT_END:{this._stateCommentEnd(t);break}case b.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case b.DOCTYPE:{this._stateDoctype(t);break}case b.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case b.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case b.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case b.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case b.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case b.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case b.CDATA_SECTION:{this._stateCdataSection(t);break}case b.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case b.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case b.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case b.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=b.TAG_OPEN;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(R.unexpectedNullCharacter),this._emitCodePoint(t);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case m.AMPERSAND:{this._startCharacterReference();break}case m.LESS_THAN_SIGN:{this.state=b.RCDATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case m.LESS_THAN_SIGN:{this.state=b.RAWTEXT_LESS_THAN_SIGN;break}case m.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case m.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(_t(t))this._createStartTagToken(),this.state=b.TAG_NAME,this._stateTagName(t);else switch(t){case m.EXCLAMATION_MARK:{this.state=b.MARKUP_DECLARATION_OPEN;break}case m.SOLIDUS:{this.state=b.END_TAG_OPEN;break}case m.QUESTION_MARK:{this._err(R.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t);break}case m.EOF:{this._err(R.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(R.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=b.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(_t(t))this._createEndTagToken(),this.state=b.TAG_NAME,this._stateTagName(t);else switch(t){case m.GREATER_THAN_SIGN:{this._err(R.missingEndTagName),this.state=b.DATA;break}case m.EOF:{this._err(R.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(R.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this.state=b.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(R.unexpectedNullCharacter),n.tagName+=_e;break}case m.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Sn(t)?er(t):t)}}_stateRcdataLessThanSign(t){t===m.SOLIDUS?this.state=b.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){_t(t)?(this.state=b.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=b.BEFORE_ATTRIBUTE_NAME,!1;case m.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=b.SELF_CLOSING_START_TAG,!1;case m.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=b.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===m.SOLIDUS?this.state=b.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){_t(t)?(this.state=b.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case m.SOLIDUS:{this.state=b.SCRIPT_DATA_END_TAG_OPEN;break}case m.EXCLAMATION_MARK:{this.state=b.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=b.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){_t(t)?(this.state=b.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===m.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===m.HYPHEN_MINUS?(this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=b.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case m.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(R.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars(_e);break}case m.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.GREATER_THAN_SIGN:{this.state=b.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(R.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_ESCAPED,this._emitChars(_e);break}case m.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===m.SOLIDUS?this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:_t(t)?(this._emitChars("<"),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){_t(t)?(this.state=b.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(He.SCRIPT,!1)&&es(this.preprocessor.peek(He.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<He.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(R.unexpectedNullCharacter),this._emitChars(_e);break}case m.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(R.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_e);break}case m.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.GREATER_THAN_SIGN:{this.state=b.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(R.unexpectedNullCharacter),this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_e);break}case m.EOF:{this._err(R.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===m.SOLIDUS?(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(He.SCRIPT,!1)&&es(this.preprocessor.peek(He.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<He.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=b.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=b.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._err(R.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=b.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this._leaveAttrName(),this.state=b.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._leaveAttrName(),this.state=b.BEFORE_ATTRIBUTE_VALUE;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:{this._err(R.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case m.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.name+=_e;break}default:this.currentAttr.name+=String.fromCodePoint(Sn(t)?er(t):t)}}_stateAfterAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:{this.state=b.SELF_CLOSING_START_TAG;break}case m.EQUALS_SIGN:{this.state=b.BEFORE_ATTRIBUTE_VALUE;break}case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=b.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{this.state=b.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this.state=b.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(R.missingAttributeValue),this.state=b.DATA,this.emitCurrentTagToken();break}default:this.state=b.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case m.QUOTATION_MARK:{this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.value+=_e;break}case m.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case m.APOSTROPHE:{this.state=b.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.value+=_e;break}case m.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(R.unexpectedNullCharacter),this.currentAttr.value+=_e;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:case m.EQUALS_SIGN:case m.GRAVE_ACCENT:{this._err(R.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case m.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=b.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this._leaveAttrValue(),this.state=b.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=b.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this._err(R.missingWhitespaceBetweenAttributes),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case m.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=b.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(R.eofInTag),this._emitEOFToken();break}default:this._err(R.unexpectedSolidusInTag),this.state=b.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentComment(n);break}case m.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case m.NULL:{this._err(R.unexpectedNullCharacter),n.data+=_e;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(He.DASH_DASH,!0)?(this._createCommentToken(He.DASH_DASH.length+1),this.state=b.COMMENT_START):this._consumeSequenceIfMatch(He.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(He.DOCTYPE.length+1),this.state=b.DOCTYPE):this._consumeSequenceIfMatch(He.CDATA_START,!0)?this.inForeignNode?this.state=b.CDATA_SECTION:(this._err(R.cdataInHtmlContent),this._createCommentToken(He.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=b.BOGUS_COMMENT):this._ensureHibernation()||(this._err(R.incorrectlyOpenedComment),this._createCommentToken(2),this.state=b.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case m.HYPHEN_MINUS:{this.state=b.COMMENT_START_DASH;break}case m.GREATER_THAN_SIGN:{this._err(R.abruptClosingOfEmptyComment),this.state=b.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=b.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=b.COMMENT_END;break}case m.GREATER_THAN_SIGN:{this._err(R.abruptClosingOfEmptyComment),this.state=b.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=b.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=b.COMMENT_END_DASH;break}case m.LESS_THAN_SIGN:{n.data+="<",this.state=b.COMMENT_LESS_THAN_SIGN;break}case m.NULL:{this._err(R.unexpectedNullCharacter),n.data+=_e;break}case m.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case m.EXCLAMATION_MARK:{n.data+="!",this.state=b.COMMENT_LESS_THAN_SIGN_BANG;break}case m.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=b.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===m.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=b.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===m.HYPHEN_MINUS?this.state=b.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=b.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==m.GREATER_THAN_SIGN&&t!==m.EOF&&this._err(R.nestedComment),this.state=b.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=b.COMMENT_END;break}case m.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=b.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentComment(n);break}case m.EXCLAMATION_MARK:{this.state=b.COMMENT_END_BANG;break}case m.HYPHEN_MINUS:{n.data+="-";break}case m.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=b.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{n.data+="--!",this.state=b.COMMENT_END_DASH;break}case m.GREATER_THAN_SIGN:{this._err(R.incorrectlyClosedComment),this.state=b.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(R.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=b.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case m.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingWhitespaceBeforeDoctypeName),this.state=b.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Sn(t))this._createDoctypeToken(String.fromCharCode(er(t))),this.state=b.DOCTYPE_NAME;else switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.NULL:{this._err(R.unexpectedNullCharacter),this._createDoctypeToken(_e),this.state=b.DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this._err(R.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(R.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=b.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.AFTER_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.NULL:{this._err(R.unexpectedNullCharacter),n.name+=_e;break}case m.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Sn(t)?er(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(He.PUBLIC,!1)?this.state=b.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(He.SYSTEM,!1)?this.state=b.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(R.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(R.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(R.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(R.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.publicId="",this.state=b.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(R.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(R.unexpectedNullCharacter),n.publicId+=_e;break}case m.GREATER_THAN_SIGN:{this._err(R.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case m.APOSTROPHE:{this.state=b.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(R.unexpectedNullCharacter),n.publicId+=_e;break}case m.GREATER_THAN_SIGN:{this._err(R.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case m.GREATER_THAN_SIGN:{this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.QUOTATION_MARK:{this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(R.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.QUOTATION_MARK:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=b.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(R.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(R.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=b.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(R.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(R.unexpectedNullCharacter),n.systemId+=_e;break}case m.GREATER_THAN_SIGN:{this._err(R.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case m.APOSTROPHE:{this.state=b.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(R.unexpectedNullCharacter),n.systemId+=_e;break}case m.GREATER_THAN_SIGN:{this._err(R.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.EOF:{this._err(R.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(R.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=b.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=b.DATA;break}case m.NULL:{this._err(R.unexpectedNullCharacter);break}case m.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case m.RIGHT_SQUARE_BRACKET:{this.state=b.CDATA_SECTION_BRACKET;break}case m.EOF:{this._err(R.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===m.RIGHT_SQUARE_BRACKET?this.state=b.CDATA_SECTION_END:(this._emitChars("]"),this.state=b.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case m.GREATER_THAN_SIGN:{this.state=b.DATA;break}case m.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=b.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(m.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ja(this.preprocessor.peek(1))?b.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ja(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===m.SEMICOLON&&this._err(R.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const go=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),ts=new Set([...go,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),pr=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),ah=new Set([...pr,c.OL,c.UL]),sh=new Set([...pr,c.BUTTON]),ns=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),rs=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),uh=new Set([c.TR,c.TEMPLATE,c.HTML]),oh=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),lh=new Set([c.TABLE,c.TEMPLATE,c.HTML]),ch=new Set([c.TD,c.TH]);class dh{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=c.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,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(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==M.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(bi,M.HTML)}popUntilTableCellPopped(){this.popUntilPopped(ch,M.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(lh,M.HTML)}clearBackToTableBodyContext(){this.clearBackTo(oh,M.HTML)}clearBackToTableRowContext(){this.clearBackTo(uh,M.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===c.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===c.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case M.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case M.SVG:{if(rs.has(i))return!1;break}case M.MATHML:{if(ns.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,pr)}hasInListItemScope(t){return this.hasInDynamicScope(t,ah)}hasInButtonScope(t){return this.hasInDynamicScope(t,sh)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case M.HTML:{if(bi.has(n))return!0;if(pr.has(n))return!1;break}case M.SVG:{if(rs.has(n))return!1;break}case M.MATHML:{if(ns.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===M.HTML)switch(this.tagIDs[n]){case t:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case c.TBODY:case c.THEAD:case c.TFOOT:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===M.HTML)switch(this.tagIDs[n]){case t:return!0;case c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&go.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ts.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&ts.has(this.currentTagId);)this.pop()}}const Yr=3;var ut;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ut||(ut={}));const is={type:ut.Marker};class fh{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===ut.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===s){const d=this.treeAdapter.getAttrList(l);d.length===i&&r.push({idx:u,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Yr)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Yr)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>i.get(o.name)===o.value)&&(a+=1,a>=Yr&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(is)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:ut.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:ut.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(is);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===ut.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===ut.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===ut.Element&&n.element===t)}}const At={createDocument(){return{nodeName:"#document",mode:Xe.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,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,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};At.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 n=e.childNodes[e.childNodes.length-1];if(At.isTextNode(n)){n.value+=t;return}}At.appendChild(e,At.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&At.isTextNode(r)?r.value+=t:At.insertBefore(e,At.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},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}}},bo="html",hh="about:legacy-compat",ph="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Eo=["+//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//"],mh=[...Eo,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],gh=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),To=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],bh=[...To,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function as(e,t){return t.some(n=>e.startsWith(n))}function Eh(e){return e.name===bo&&e.publicId===null&&(e.systemId===null||e.systemId===hh)}function Th(e){if(e.name!==bo)return Xe.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===ph)return Xe.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),gh.has(n))return Xe.QUIRKS;let r=t===null?mh:Eo;if(as(n,r))return Xe.QUIRKS;if(r=t===null?To:bh,as(n,r))return Xe.LIMITED_QUIRKS}return Xe.NO_QUIRKS}const ss={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},xh="definitionurl",kh="definitionURL",yh=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])),_h=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}]]),Ah=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])),Ch=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 Sh(e){const t=e.tagID;return t===c.FONT&&e.attrs.some(({name:r})=>r===Ut.COLOR||r===Ut.SIZE||r===Ut.FACE)||Ch.has(t)}function xo(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===xh){e.attrs[t].name=kh;break}}function ko(e){for(let t=0;t<e.attrs.length;t++){const n=yh.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Qi(e){for(let t=0;t<e.attrs.length;t++){const n=_h.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Ih(e){const t=Ah.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=cn(e.tagName))}function Nh(e,t){return t===M.MATHML&&(e===c.MI||e===c.MO||e===c.MN||e===c.MS||e===c.MTEXT)}function wh(e,t,n){if(t===M.MATHML&&e===c.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ut.ENCODING){const i=n[r].value.toLowerCase();return i===ss.TEXT_HTML||i===ss.APPLICATION_XML}}return t===M.SVG&&(e===c.FOREIGN_OBJECT||e===c.DESC||e===c.TITLE)}function Lh(e,t,n,r){return(!r||r===M.HTML)&&wh(e,t,n)||(!r||r===M.MATHML)&&Nh(e,t)}const Rh="hidden",Oh=8,Dh=3;var x;(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"})(x||(x={}));const Ph={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},yo=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),us={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:At,onParseError:null};class os{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=x.INITIAL,this.originalInsertionMode=x.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={...us,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new ih(this.options,this),this.activeFormattingElements=new fh(this.treeAdapter),this.fragmentContextID=r?cn(this.treeAdapter.getTagName(r)):c.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new dh(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...us,...n};t??(t=r.treeAdapter.createElement(S.TEMPLATE,M.HTML,[]));const i=r.treeAdapter.createElement("documentmock",M.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===c.TEMPLATE&&a.tmplInsertionModeStack.unshift(x.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:Ph,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===M.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,M.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=x.TEXT}switchToPlaintextParsing(){this.insertionMode=x.TEXT,this.originalInsertionMode=x.IN_BODY,this.tokenizer.state=Se.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===S.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==M.HTML))switch(this.fragmentContextID){case c.TITLE:case c.TEXTAREA:{this.tokenizer.state=Se.RCDATA;break}case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:{this.tokenizer.state=Se.RAWTEXT;break}case c.SCRIPT:{this.tokenizer.state=Se.SCRIPT_DATA;break}case c.PLAINTEXT:{this.tokenizer.state=Se.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,M.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,M.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(S.HTML,M.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,c.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:l,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:l,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===le.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===c.SVG&&this.treeAdapter.getTagName(n)===S.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===M.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===c.MGLYPH||t.tagID===c.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,M.HTML)}_processToken(t){switch(t.type){case le.CHARACTER:{this.onCharacter(t);break}case le.NULL_CHARACTER:{this.onNullCharacter(t);break}case le.COMMENT:{this.onComment(t);break}case le.DOCTYPE:{this.onDoctype(t);break}case le.START_TAG:{this._processStartTag(t);break}case le.END_TAG:{this.onEndTag(t);break}case le.EOF:{this.onEof(t);break}case le.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return Lh(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===ut.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=x.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(c.P),this.openElements.popUntilTagNamePopped(c.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case c.TR:{this.insertionMode=x.IN_ROW;return}case c.TBODY:case c.THEAD:case c.TFOOT:{this.insertionMode=x.IN_TABLE_BODY;return}case c.CAPTION:{this.insertionMode=x.IN_CAPTION;return}case c.COLGROUP:{this.insertionMode=x.IN_COLUMN_GROUP;return}case c.TABLE:{this.insertionMode=x.IN_TABLE;return}case c.BODY:{this.insertionMode=x.IN_BODY;return}case c.FRAMESET:{this.insertionMode=x.IN_FRAMESET;return}case c.SELECT:{this._resetInsertionModeForSelect(t);return}case c.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case c.HTML:{this.insertionMode=this.headElement?x.AFTER_HEAD:x.BEFORE_HEAD;return}case c.TD:case c.TH:{if(t>0){this.insertionMode=x.IN_CELL;return}break}case c.HEAD:{if(t>0){this.insertionMode=x.IN_HEAD;return}break}}this.insertionMode=x.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===c.TEMPLATE)break;if(r===c.TABLE){this.insertionMode=x.IN_SELECT_IN_TABLE;return}}this.insertionMode=x.IN_SELECT}_isElementCausesFosterParenting(t){return yo.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case c.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===M.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case c.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return eh[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){cp(this,t);return}switch(this.insertionMode){case x.INITIAL:{En(this,t);break}case x.BEFORE_HTML:{Ln(this,t);break}case x.BEFORE_HEAD:{Rn(this,t);break}case x.IN_HEAD:{On(this,t);break}case x.IN_HEAD_NO_SCRIPT:{Dn(this,t);break}case x.AFTER_HEAD:{Pn(this,t);break}case x.IN_BODY:case x.IN_CAPTION:case x.IN_CELL:case x.IN_TEMPLATE:{Ao(this,t);break}case x.TEXT:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{qr(this,t);break}case x.IN_TABLE_TEXT:{Lo(this,t);break}case x.IN_COLUMN_GROUP:{mr(this,t);break}case x.AFTER_BODY:{gr(this,t);break}case x.AFTER_AFTER_BODY:{lr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){lp(this,t);return}switch(this.insertionMode){case x.INITIAL:{En(this,t);break}case x.BEFORE_HTML:{Ln(this,t);break}case x.BEFORE_HEAD:{Rn(this,t);break}case x.IN_HEAD:{On(this,t);break}case x.IN_HEAD_NO_SCRIPT:{Dn(this,t);break}case x.AFTER_HEAD:{Pn(this,t);break}case x.TEXT:{this._insertCharacters(t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{qr(this,t);break}case x.IN_COLUMN_GROUP:{mr(this,t);break}case x.AFTER_BODY:{gr(this,t);break}case x.AFTER_AFTER_BODY:{lr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ei(this,t);return}switch(this.insertionMode){case x.INITIAL:case x.BEFORE_HTML:case x.BEFORE_HEAD:case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:case x.IN_BODY:case x.IN_TABLE:case x.IN_CAPTION:case x.IN_COLUMN_GROUP:case x.IN_TABLE_BODY:case x.IN_ROW:case x.IN_CELL:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:case x.IN_TEMPLATE:case x.IN_FRAMESET:case x.AFTER_FRAMESET:{Ei(this,t);break}case x.IN_TABLE_TEXT:{Tn(this,t);break}case x.AFTER_BODY:{zh(this,t);break}case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{jh(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case x.INITIAL:{$h(this,t);break}case x.BEFORE_HEAD:case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:{this._err(t,R.misplacedDoctype);break}case x.IN_TABLE_TEXT:{Tn(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,R.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?dp(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case x.INITIAL:{En(this,t);break}case x.BEFORE_HTML:{Yh(this,t);break}case x.BEFORE_HEAD:{Vh(this,t);break}case x.IN_HEAD:{rt(this,t);break}case x.IN_HEAD_NO_SCRIPT:{Qh(this,t);break}case x.AFTER_HEAD:{Kh(this,t);break}case x.IN_BODY:{Pe(this,t);break}case x.IN_TABLE:{sn(this,t);break}case x.IN_TABLE_TEXT:{Tn(this,t);break}case x.IN_CAPTION:{W0(this,t);break}case x.IN_COLUMN_GROUP:{Zi(this,t);break}case x.IN_TABLE_BODY:{wr(this,t);break}case x.IN_ROW:{Lr(this,t);break}case x.IN_CELL:{X0(this,t);break}case x.IN_SELECT:{Do(this,t);break}case x.IN_SELECT_IN_TABLE:{Z0(this,t);break}case x.IN_TEMPLATE:{ep(this,t);break}case x.AFTER_BODY:{np(this,t);break}case x.IN_FRAMESET:{rp(this,t);break}case x.AFTER_FRAMESET:{ap(this,t);break}case x.AFTER_AFTER_BODY:{up(this,t);break}case x.AFTER_AFTER_FRAMESET:{op(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?fp(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case x.INITIAL:{En(this,t);break}case x.BEFORE_HTML:{qh(this,t);break}case x.BEFORE_HEAD:{Wh(this,t);break}case x.IN_HEAD:{Gh(this,t);break}case x.IN_HEAD_NO_SCRIPT:{Xh(this,t);break}case x.AFTER_HEAD:{Zh(this,t);break}case x.IN_BODY:{Nr(this,t);break}case x.TEXT:{B0(this,t);break}case x.IN_TABLE:{Hn(this,t);break}case x.IN_TABLE_TEXT:{Tn(this,t);break}case x.IN_CAPTION:{G0(this,t);break}case x.IN_COLUMN_GROUP:{Q0(this,t);break}case x.IN_TABLE_BODY:{Ti(this,t);break}case x.IN_ROW:{Oo(this,t);break}case x.IN_CELL:{K0(this,t);break}case x.IN_SELECT:{Po(this,t);break}case x.IN_SELECT_IN_TABLE:{J0(this,t);break}case x.IN_TEMPLATE:{tp(this,t);break}case x.AFTER_BODY:{Mo(this,t);break}case x.IN_FRAMESET:{ip(this,t);break}case x.AFTER_FRAMESET:{sp(this,t);break}case x.AFTER_AFTER_BODY:{lr(this,t);break}}}onEof(t){switch(this.insertionMode){case x.INITIAL:{En(this,t);break}case x.BEFORE_HTML:{Ln(this,t);break}case x.BEFORE_HEAD:{Rn(this,t);break}case x.IN_HEAD:{On(this,t);break}case x.IN_HEAD_NO_SCRIPT:{Dn(this,t);break}case x.AFTER_HEAD:{Pn(this,t);break}case x.IN_BODY:case x.IN_TABLE:case x.IN_CAPTION:case x.IN_COLUMN_GROUP:case x.IN_TABLE_BODY:case x.IN_ROW:case x.IN_CELL:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:{No(this,t);break}case x.TEXT:{F0(this,t);break}case x.IN_TABLE_TEXT:{Tn(this,t);break}case x.IN_TEMPLATE:{vo(this,t);break}case x.AFTER_BODY:case x.IN_FRAMESET:case x.AFTER_FRAMESET:case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{Ki(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===m.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case x.IN_HEAD:case x.IN_HEAD_NO_SCRIPT:case x.AFTER_HEAD:case x.TEXT:case x.IN_COLUMN_GROUP:case x.IN_SELECT:case x.IN_SELECT_IN_TABLE:case x.IN_FRAMESET:case x.AFTER_FRAMESET:{this._insertCharacters(t);break}case x.IN_BODY:case x.IN_CAPTION:case x.IN_CELL:case x.IN_TEMPLATE:case x.AFTER_BODY:case x.AFTER_AFTER_BODY:case x.AFTER_AFTER_FRAMESET:{_o(this,t);break}case x.IN_TABLE:case x.IN_TABLE_BODY:case x.IN_ROW:{qr(this,t);break}case x.IN_TABLE_TEXT:{wo(this,t);break}}}}function vh(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Io(e,t),n}function Mh(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Bh(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const u=e.activeFormattingElements.getElementEntry(s),o=u&&a>=Dh;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=Fh(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function Fh(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Hh(e,t,n){const r=e.treeAdapter.getTagName(t),i=cn(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===c.TEMPLATE&&a===M.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Uh(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Xi(e,t){for(let n=0;n<Oh;n++){const r=vh(e,t);if(!r)break;const i=Mh(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=Bh(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&Hh(e,s,a),Uh(e,i,r)}}function Ei(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function zh(e,t){e._appendCommentNode(t,e.openElements.items[0])}function jh(e,t){e._appendCommentNode(t,e.document)}function Ki(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function $h(e,t){e._setDocumentType(t);const n=t.forceQuirks?Xe.QUIRKS:Th(t);Eh(t)||e._err(t,R.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=x.BEFORE_HTML}function En(e,t){e._err(t,R.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Xe.QUIRKS),e.insertionMode=x.BEFORE_HTML,e._processToken(t)}function Yh(e,t){t.tagID===c.HTML?(e._insertElement(t,M.HTML),e.insertionMode=x.BEFORE_HEAD):Ln(e,t)}function qh(e,t){const n=t.tagID;(n===c.HTML||n===c.HEAD||n===c.BODY||n===c.BR)&&Ln(e,t)}function Ln(e,t){e._insertFakeRootElement(),e.insertionMode=x.BEFORE_HEAD,e._processToken(t)}function Vh(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.HEAD:{e._insertElement(t,M.HTML),e.headElement=e.openElements.current,e.insertionMode=x.IN_HEAD;break}default:Rn(e,t)}}function Wh(e,t){const n=t.tagID;n===c.HEAD||n===c.BODY||n===c.HTML||n===c.BR?Rn(e,t):e._err(t,R.endTagWithoutMatchingOpenElement)}function Rn(e,t){e._insertFakeElement(S.HEAD,c.HEAD),e.headElement=e.openElements.current,e.insertionMode=x.IN_HEAD,e._processToken(t)}function rt(e,t){switch(t.tagID){case c.HTML:{Pe(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,Se.RCDATA);break}case c.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Se.RAWTEXT):(e._insertElement(t,M.HTML),e.insertionMode=x.IN_HEAD_NO_SCRIPT);break}case c.NOFRAMES:case c.STYLE:{e._switchToTextParsing(t,Se.RAWTEXT);break}case c.SCRIPT:{e._switchToTextParsing(t,Se.SCRIPT_DATA);break}case c.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=x.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(x.IN_TEMPLATE);break}case c.HEAD:{e._err(t,R.misplacedStartTagForHeadElement);break}default:On(e,t)}}function Gh(e,t){switch(t.tagID){case c.HEAD:{e.openElements.pop(),e.insertionMode=x.AFTER_HEAD;break}case c.BODY:case c.BR:case c.HTML:{On(e,t);break}case c.TEMPLATE:{Vt(e,t);break}default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function Vt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==c.TEMPLATE&&e._err(t,R.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,R.endTagWithoutMatchingOpenElement)}function On(e,t){e.openElements.pop(),e.insertionMode=x.AFTER_HEAD,e._processToken(t)}function Qh(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:{rt(e,t);break}case c.NOSCRIPT:{e._err(t,R.nestedNoscriptInHead);break}default:Dn(e,t)}}function Xh(e,t){switch(t.tagID){case c.NOSCRIPT:{e.openElements.pop(),e.insertionMode=x.IN_HEAD;break}case c.BR:{Dn(e,t);break}default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function Dn(e,t){const n=t.type===le.EOF?R.openElementsLeftAfterEof:R.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=x.IN_HEAD,e._processToken(t)}function Kh(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.BODY:{e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=x.IN_BODY;break}case c.FRAMESET:{e._insertElement(t,M.HTML),e.insertionMode=x.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,R.abandonedHeadElementChild),e.openElements.push(e.headElement,c.HEAD),rt(e,t),e.openElements.remove(e.headElement);break}case c.HEAD:{e._err(t,R.misplacedStartTagForHeadElement);break}default:Pn(e,t)}}function Zh(e,t){switch(t.tagID){case c.BODY:case c.HTML:case c.BR:{Pn(e,t);break}case c.TEMPLATE:{Vt(e,t);break}default:e._err(t,R.endTagWithoutMatchingOpenElement)}}function Pn(e,t){e._insertFakeElement(S.BODY,c.BODY),e.insertionMode=x.IN_BODY,Ir(e,t)}function Ir(e,t){switch(t.type){case le.CHARACTER:{Ao(e,t);break}case le.WHITESPACE_CHARACTER:{_o(e,t);break}case le.COMMENT:{Ei(e,t);break}case le.START_TAG:{Pe(e,t);break}case le.END_TAG:{Nr(e,t);break}case le.EOF:{No(e,t);break}}}function _o(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ao(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Jh(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function e0(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function t0(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,M.HTML),e.insertionMode=x.IN_FRAMESET)}function n0(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function r0(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&bi.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,M.HTML)}function i0(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function a0(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),n||(e.formElement=e.openElements.current))}function s0(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===c.LI&&i===c.LI||(n===c.DD||n===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[r],i))break}e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function u0(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.tokenizer.state=Se.PLAINTEXT}function o0(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 l0(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(S.A);n&&(Xi(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function c0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function d0(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(c.NOBR)&&(Xi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function f0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function h0(e,t){e.treeAdapter.getDocumentMode(e.document)!==Xe.QUIRKS&&e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=x.IN_TABLE}function Co(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function So(e){const t=po(e,Ut.TYPE);return t!=null&&t.toLowerCase()===Rh}function p0(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),So(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function m0(e,t){e._appendElement(t,M.HTML),t.ackSelfClosing=!0}function g0(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function b0(e,t){t.tagName=S.IMG,t.tagID=c.IMG,Co(e,t)}function E0(e,t){e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Se.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=x.TEXT}function T0(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Se.RAWTEXT)}function x0(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Se.RAWTEXT)}function ls(e,t){e._switchToTextParsing(t,Se.RAWTEXT)}function k0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===x.IN_TABLE||e.insertionMode===x.IN_CAPTION||e.insertionMode===x.IN_TABLE_BODY||e.insertionMode===x.IN_ROW||e.insertionMode===x.IN_CELL?x.IN_SELECT_IN_TABLE:x.IN_SELECT}function y0(e,t){e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function _0(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,M.HTML)}function A0(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(c.RTC),e._insertElement(t,M.HTML)}function C0(e,t){e._reconstructActiveFormattingElements(),xo(t),Qi(t),t.selfClosing?e._appendElement(t,M.MATHML):e._insertElement(t,M.MATHML),t.ackSelfClosing=!0}function S0(e,t){e._reconstructActiveFormattingElements(),ko(t),Qi(t),t.selfClosing?e._appendElement(t,M.SVG):e._insertElement(t,M.SVG),t.ackSelfClosing=!0}function cs(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function Pe(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:{c0(e,t);break}case c.A:{l0(e,t);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{r0(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:{n0(e,t);break}case c.LI:case c.DD:case c.DT:{s0(e,t);break}case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:{Co(e,t);break}case c.HR:{g0(e,t);break}case c.RB:case c.RTC:{_0(e,t);break}case c.RT:case c.RP:{A0(e,t);break}case c.PRE:case c.LISTING:{i0(e,t);break}case c.XMP:{T0(e,t);break}case c.SVG:{S0(e,t);break}case c.HTML:{Jh(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:{rt(e,t);break}case c.BODY:{e0(e,t);break}case c.FORM:{a0(e,t);break}case c.NOBR:{d0(e,t);break}case c.MATH:{C0(e,t);break}case c.TABLE:{h0(e,t);break}case c.INPUT:{p0(e,t);break}case c.PARAM:case c.TRACK:case c.SOURCE:{m0(e,t);break}case c.IMAGE:{b0(e,t);break}case c.BUTTON:{o0(e,t);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{f0(e,t);break}case c.IFRAME:{x0(e,t);break}case c.SELECT:{k0(e,t);break}case c.OPTION:case c.OPTGROUP:{y0(e,t);break}case c.NOEMBED:case c.NOFRAMES:{ls(e,t);break}case c.FRAMESET:{t0(e,t);break}case c.TEXTAREA:{E0(e,t);break}case c.NOSCRIPT:{e.options.scriptingEnabled?ls(e,t):cs(e,t);break}case c.PLAINTEXT:{u0(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:cs(e,t)}}function I0(e,t){if(e.openElements.hasInScope(c.BODY)&&(e.insertionMode=x.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function N0(e,t){e.openElements.hasInScope(c.BODY)&&(e.insertionMode=x.AFTER_BODY,Mo(e,t))}function w0(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function L0(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(c.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(c.FORM):n&&e.openElements.remove(n))}function R0(e){e.openElements.hasInButtonScope(c.P)||e._insertFakeElement(S.P,c.P),e._closePElement()}function O0(e){e.openElements.hasInListItemScope(c.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(c.LI),e.openElements.popUntilTagNamePopped(c.LI))}function D0(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function P0(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function v0(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function M0(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(S.BR,c.BR),e.openElements.pop(),e.framesetOk=!1}function Io(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==c.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function Nr(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:{Xi(e,t);break}case c.P:{R0(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:{w0(e,t);break}case c.LI:{O0(e);break}case c.DD:case c.DT:{D0(e,t);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{P0(e);break}case c.BR:{M0(e);break}case c.BODY:{I0(e,t);break}case c.HTML:{N0(e,t);break}case c.FORM:{L0(e);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{v0(e,t);break}case c.TEMPLATE:{Vt(e,t);break}default:Io(e,t)}}function No(e,t){e.tmplInsertionModeStack.length>0?vo(e,t):Ki(e,t)}function B0(e,t){var n;t.tagID===c.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function F0(e,t){e._err(t,R.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function qr(e,t){if(e.openElements.currentTagId!==void 0&&yo.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=x.IN_TABLE_TEXT,t.type){case le.CHARACTER:{Lo(e,t);break}case le.WHITESPACE_CHARACTER:{wo(e,t);break}}else Yn(e,t)}function H0(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,M.HTML),e.insertionMode=x.IN_CAPTION}function U0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=x.IN_COLUMN_GROUP}function z0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(S.COLGROUP,c.COLGROUP),e.insertionMode=x.IN_COLUMN_GROUP,Zi(e,t)}function j0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=x.IN_TABLE_BODY}function $0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(S.TBODY,c.TBODY),e.insertionMode=x.IN_TABLE_BODY,wr(e,t)}function Y0(e,t){e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function q0(e,t){So(t)?e._appendElement(t,M.HTML):Yn(e,t),t.ackSelfClosing=!0}function V0(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,M.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function sn(e,t){switch(t.tagID){case c.TD:case c.TH:case c.TR:{$0(e,t);break}case c.STYLE:case c.SCRIPT:case c.TEMPLATE:{rt(e,t);break}case c.COL:{z0(e,t);break}case c.FORM:{V0(e,t);break}case c.TABLE:{Y0(e,t);break}case c.TBODY:case c.TFOOT:case c.THEAD:{j0(e,t);break}case c.INPUT:{q0(e,t);break}case c.CAPTION:{H0(e,t);break}case c.COLGROUP:{U0(e,t);break}default:Yn(e,t)}}function Hn(e,t){switch(t.tagID){case c.TABLE:{e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode());break}case c.TEMPLATE:{Vt(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:Yn(e,t)}}function Yn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ir(e,t),e.fosterParentingEnabled=n}function wo(e,t){e.pendingCharacterTokens.push(t)}function Lo(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Tn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Yn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Ro=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]);function W0(e,t){const n=t.tagID;Ro.has(n)?e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_TABLE,sn(e,t)):Pe(e,t)}function G0(e,t){const n=t.tagID;switch(n){case c.CAPTION:case c.TABLE:{e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_TABLE,n===c.TABLE&&Hn(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:Nr(e,t)}}function Zi(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.COL:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case c.TEMPLATE:{rt(e,t);break}default:mr(e,t)}}function Q0(e,t){switch(t.tagID){case c.COLGROUP:{e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=x.IN_TABLE);break}case c.TEMPLATE:{Vt(e,t);break}case c.COL:break;default:mr(e,t)}}function mr(e,t){e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=x.IN_TABLE,e._processToken(t))}function wr(e,t){switch(t.tagID){case c.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,M.HTML),e.insertionMode=x.IN_ROW;break}case c.TH:case c.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(S.TR,c.TR),e.insertionMode=x.IN_ROW,Lr(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=x.IN_TABLE,sn(e,t));break}default:sn(e,t)}}function Ti(e,t){const n=t.tagID;switch(t.tagID){case c.TBODY:case c.TFOOT:case c.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE);break}case c.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE,Hn(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:Hn(e,t)}}function Lr(e,t){switch(t.tagID){case c.TH:case c.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,M.HTML),e.insertionMode=x.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=x.IN_TABLE_BODY,wr(e,t));break}default:sn(e,t)}}function Oo(e,t){switch(t.tagID){case c.TR:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY);break}case c.TABLE:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=x.IN_TABLE_BODY,Ti(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=x.IN_TABLE_BODY,Ti(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:Hn(e,t)}}function X0(e,t){const n=t.tagID;Ro.has(n)?(e.openElements.hasInTableScope(c.TD)||e.openElements.hasInTableScope(c.TH))&&(e._closeTableCell(),Lr(e,t)):Pe(e,t)}function K0(e,t){const n=t.tagID;switch(n){case c.TD:case c.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=x.IN_ROW);break}case c.TABLE:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Oo(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:break;default:Nr(e,t)}}function Do(e,t){switch(t.tagID){case c.HTML:{Pe(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:{rt(e,t);break}}}function Po(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:{Vt(e,t);break}}}function Z0(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Do(e,t)}function J0(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Po(e,t)}function ep(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:{rt(e,t);break}case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{e.tmplInsertionModeStack[0]=x.IN_TABLE,e.insertionMode=x.IN_TABLE,sn(e,t);break}case c.COL:{e.tmplInsertionModeStack[0]=x.IN_COLUMN_GROUP,e.insertionMode=x.IN_COLUMN_GROUP,Zi(e,t);break}case c.TR:{e.tmplInsertionModeStack[0]=x.IN_TABLE_BODY,e.insertionMode=x.IN_TABLE_BODY,wr(e,t);break}case c.TD:case c.TH:{e.tmplInsertionModeStack[0]=x.IN_ROW,e.insertionMode=x.IN_ROW,Lr(e,t);break}default:e.tmplInsertionModeStack[0]=x.IN_BODY,e.insertionMode=x.IN_BODY,Pe(e,t)}}function tp(e,t){t.tagID===c.TEMPLATE&&Vt(e,t)}function vo(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ki(e,t)}function np(e,t){t.tagID===c.HTML?Pe(e,t):gr(e,t)}function Mo(e,t){var n;if(t.tagID===c.HTML){if(e.fragmentContext||(e.insertionMode=x.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===c.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else gr(e,t)}function gr(e,t){e.insertionMode=x.IN_BODY,Ir(e,t)}function rp(e,t){switch(t.tagID){case c.HTML:{Pe(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:{rt(e,t);break}}}function ip(e,t){t.tagID===c.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==c.FRAMESET&&(e.insertionMode=x.AFTER_FRAMESET))}function ap(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.NOFRAMES:{rt(e,t);break}}}function sp(e,t){t.tagID===c.HTML&&(e.insertionMode=x.AFTER_AFTER_FRAMESET)}function up(e,t){t.tagID===c.HTML?Pe(e,t):lr(e,t)}function lr(e,t){e.insertionMode=x.IN_BODY,Ir(e,t)}function op(e,t){switch(t.tagID){case c.HTML:{Pe(e,t);break}case c.NOFRAMES:{rt(e,t);break}}}function lp(e,t){t.chars=_e,e._insertCharacters(t)}function cp(e,t){e._insertCharacters(t),e.framesetOk=!1}function Bo(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 dp(e,t){if(Sh(t))Bo(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===M.MATHML?xo(t):r===M.SVG&&(Ih(t),ko(t)),Qi(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function fp(e,t){if(t.tagID===c.P||t.tagID===c.BR){Bo(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===M.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}S.AREA,S.BASE,S.BASEFONT,S.BGSOUND,S.BR,S.COL,S.EMBED,S.FRAME,S.HR,S.IMG,S.INPUT,S.KEYGEN,S.LINK,S.META,S.PARAM,S.SOURCE,S.TRACK,S.WBR;const Rr=Fo("end"),lt=Fo("start");function Fo(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Ho(e){const t=lt(e),n=Rr(e);if(t&&n)return{start:t,end:n}}const hp=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,pp=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),ds={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Uo(e,t){const n=Ap(e),r=oo("type",{handlers:{root:mp,element:gp,text:bp,comment:jo,doctype:Ep,raw:xp},unknown:kp}),i={parser:n?new os(ds):os.getFragmentParser(void 0,ds),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),dn(i,lt());const a=n?i.parser.document:i.parser.getFragment(),s=Cf(a,{file:i.options.file});return i.stitches&&ot(s,"comment",function(u,o,l){const d=u;if(d.value.stitch&&l&&o!==void 0){const f=l.children;return f[o]=d.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function zo(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function mp(e,t){zo(e.children,t)}function gp(e,t){yp(e,t),zo(e.children,t),_p(e,t)}function bp(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:le.CHARACTER,chars:e.value,location:qn(e)};dn(t,lt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ep(e,t){const n={type:le.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:qn(e)};dn(t,lt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Tp(e,t){t.stitches=!0;const n=Cp(e);if("children"in e&&"children"in n){const r=Uo({type:"root",children:e.children},t.options);n.children=r.children}jo({type:"comment",value:{stitch:n}},t)}function jo(e,t){const n=e.value,r={type:le.COMMENT,data:n,location:qn(e)};dn(t,lt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function xp(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,$o(t,lt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(hp,"<$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 n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function kp(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Tp(n,t);else{let r="";throw pp.has(n.type)&&(r=". 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 `"+n.type+"` node"+r)}}function dn(e,t){$o(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,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=Se.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 $o(e,t){if(t&&t.offset!==void 0){const n={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=n}}function yp(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Se.PLAINTEXT)return;dn(t,lt(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Ht.html;i===Ht.html&&n==="svg"&&(i=Ht.svg);const a=Lf({...e,children:[]},{space:i===Ht.svg?"svg":"html"}),s={type:le.START_TAG,tagName:n,tagID:cn(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:qn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function _p(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Ff.includes(n)||t.parser.tokenizer.state===Se.PLAINTEXT)return;dn(t,Rr(e));const r={type:le.END_TAG,tagName:n,tagID:cn(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:qn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Se.RCDATA||t.parser.tokenizer.state===Se.RAWTEXT||t.parser.tokenizer.state===Se.SCRIPT_DATA)&&(t.parser.tokenizer.state=Se.DATA)}function Ap(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function qn(e){const t=lt(e)||{line:void 0,column:void 0,offset:void 0},n=Rr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Cp(e){return"children"in e?zt({...e,children:[]}):zt(e)}function xi(e){return function(t,n){return Uo(t,{...e,file:n})}}const vt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Bt={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...vt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...vt],h2:[["className","sr-only"]],img:[...vt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...vt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...vt],table:[...vt],ul:[...vt,["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"]},Ct={}.hasOwnProperty;function Sp(e,t){let n={type:"root",children:[]};const r={schema:t?{...Bt,...t}:Bt,stack:[]},i=Yo(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function Yo(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Ip(e,n);case"doctype":return Np(e,n);case"element":return wp(e,n);case"root":return Lp(e,n);case"text":return Rp(e,n)}}}function Ip(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Vn(a,t),a}}function Np(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Vn(n,t),n}}function wp(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=qo(e,t.children),i=Op(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Ct.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(a=!1;++o<u.length;)e.stack.includes(u[o])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return Vn(s,t),s}function Lp(e,t){const r={type:"root",children:qo(e,t.children)};return Vn(r,t),r}function Rp(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Vn(r,t),r}function qo(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=Yo(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function Op(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&Ct.call(r,n)?r[n]:void 0,s=r&&Ct.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},o={};let l;for(l in u)if(Ct.call(u,l)){const d=u[l];let f=fs(e,hs(a,l),l,d);f==null&&(f=fs(e,hs(s,l),l,d)),f!=null&&(o[l]=f)}if(i&&Ct.call(i,n)){const d=i[n];for(l in d)Ct.call(d,l)&&!Ct.call(o,l)&&(o[l]=d[l])}return o}function fs(e,t,n,r){return t?Array.isArray(r)?Dp(e,t,n,r):Vo(e,t,n,r):void 0}function Dp(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=Vo(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function Vo(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&Pp(e,n,r)){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(r))){i=!0;break}}else if(s===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Pp(e,t,n){const r=e.schema.protocols&&Ct.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),u=i.indexOf("#"),o=i.indexOf("/");if(a<0||o>-1&&a>o||s>-1&&a>s||u>-1&&a>u)return!0;let l=-1;for(;++l<r.length;){const d=r[l];if(a===d.length&&i.slice(0,d.length)===d)return!0}return!1}function Vn(e,t){const n=Ho(t);t.data&&(e.data=zt(t.data)),n&&(e.position=n)}function hs(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Wo(e){return function(t){return Sp(t,e)}}function ps(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Me=Rt(/[A-Za-z]/),De=Rt(/[\dA-Za-z]/),vp=Rt(/[#-'*+\--9=?A-Z^-~]/);function br(e){return e!==null&&(e<32||e===127)}const ki=Rt(/\d/),Mp=Rt(/[\dA-Fa-f]/),Bp=Rt(/[!-/:-@[-`{-~]/);function ee(e){return e!==null&&e<-2}function xe(e){return e!==null&&(e<0||e===32)}function fe(e){return e===-2||e===-1||e===32}const Or=Rt(new RegExp("\\p{P}|\\p{S}","u")),jt=Rt(/\s/);function Rt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Fp(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Hp(e,t,n){const i=_r((n||{}).ignore||[]),a=Up(t);let s=-1;for(;++s<a.length;)zi(e,"text",u);function u(l,d){let f=-1,p;for(;++f<d.length;){const h=d[f],g=p?p.children:void 0;if(i(h,g?g.indexOf(h):void 0,p))return;p=h}if(p)return o(l,d)}function o(l,d){const f=d[d.length-1],p=a[s][0],h=a[s][1];let g=0;const C=f.children.indexOf(l);let y=!1,O=[];p.lastIndex=0;let L=p.exec(l.value);for(;L;){const B=L.index,z={index:L.index,input:L.input,stack:[...d,l]};let N=h(...L,z);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?p.lastIndex=B+1:(g!==B&&O.push({type:"text",value:l.value.slice(g,B)}),Array.isArray(N)?O.push(...N):N&&O.push(N),g=B+L[0].length,y=!0),!p.global)break;L=p.exec(l.value)}return y?(g<l.value.length&&O.push({type:"text",value:l.value.slice(g)}),f.children.splice(C,1,...O)):O=[l],C+O.length}}function Up(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([zp(i[0]),jp(i[1])])}return t}function zp(e){return typeof e=="string"?new RegExp(Fp(e),"g"):e}function jp(e){return typeof e=="function"?e:function(){return e}}const Vr="phrasing",Wr=["autolink","link","image","label"];function $p(){return{transforms:[Xp],enter:{literalAutolink:qp,literalAutolinkEmail:Gr,literalAutolinkHttp:Gr,literalAutolinkWww:Gr},exit:{literalAutolink:Qp,literalAutolinkEmail:Gp,literalAutolinkHttp:Vp,literalAutolinkWww:Wp}}}function Yp(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Vr,notInConstruct:Wr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Vr,notInConstruct:Wr},{character:":",before:"[ps]",after:"\\/",inConstruct:Vr,notInConstruct:Wr}]}}function qp(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Gr(e){this.config.enter.autolinkProtocol.call(this,e)}function Vp(e){this.config.exit.autolinkProtocol.call(this,e)}function Wp(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 Gp(e){this.config.exit.autolinkEmail.call(this,e)}function Qp(e){this.exit(e)}function Xp(e){Hp(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Kp],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Zp]],{ignore:["link","linkReference"]})}function Kp(e,t,n,r,i){let a="";if(!Go(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Jp(n)))return!1;const s=em(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function Zp(e,t,n,r){return!Go(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Jp(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 em(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=ps(e,"(");let a=ps(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Go(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||jt(n)||Or(n))&&(!t||n!==47)}function nt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Qo.peek=lm;function tm(){this.buffer()}function nm(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function rm(){this.buffer()}function im(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function am(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=nt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sm(e){this.exit(e)}function um(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=nt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function om(e){this.exit(e)}function lm(){return"["}function Qo(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function cm(){return{enter:{gfmFootnoteCallString:tm,gfmFootnoteCall:nm,gfmFootnoteDefinitionLabelString:rm,gfmFootnoteDefinition:im},exit:{gfmFootnoteCallString:am,gfmFootnoteCall:sm,gfmFootnoteDefinitionLabelString:um,gfmFootnoteDefinition:om}}}function dm(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Qo},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let o=u.move("[^");const l=a.enter("footnoteDefinition"),d=a.enter("label");return o+=u.move(a.safe(a.associationId(r),{before:o,after:"]"})),d(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((t?`
|
|
28
|
+
`:" ")+a.indentLines(a.containerFlow(r,u.current()),t?Xo:fm))),l(),o}}function fm(e,t,n){return t===0?e:Xo(e,t,n)}function Xo(e,t,n){return(n?"":" ")+e}const hm=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ko.peek=Em;function pm(){return{canContainEols:["delete"],enter:{strikethrough:gm},exit:{strikethrough:bm}}}function mm(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:hm}],handlers:{delete:Ko}}}function gm(e){this.enter({type:"delete",children:[]},e)}function bm(e){this.exit(e)}function Ko(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function Em(){return"~"}function Tm(e){return e.length}function xm(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Tm,a=[],s=[],u=[],o=[];let l=0,d=-1;for(;++d<e.length;){const _=[],C=[];let y=-1;for(e[d].length>l&&(l=e[d].length);++y<e[d].length;){const O=km(e[d][y]);if(n.alignDelimiters!==!1){const L=i(O);C[y]=L,(o[y]===void 0||L>o[y])&&(o[y]=L)}_.push(O)}s[d]=_,u[d]=C}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<l;)a[f]=ms(r[f]);else{const _=ms(r);for(;++f<l;)a[f]=_}f=-1;const p=[],h=[];for(;++f<l;){const _=a[f];let C="",y="";_===99?(C=":",y=":"):_===108?C=":":_===114&&(y=":");let O=n.alignDelimiters===!1?1:Math.max(1,o[f]-C.length-y.length);const L=C+"-".repeat(O)+y;n.alignDelimiters!==!1&&(O=C.length+O+y.length,O>o[f]&&(o[f]=O),h[f]=O),p[f]=L}s.splice(1,0,p),u.splice(1,0,h),d=-1;const g=[];for(;++d<s.length;){const _=s[d],C=u[d];f=-1;const y=[];for(;++f<l;){const O=_[f]||"";let L="",B="";if(n.alignDelimiters!==!1){const z=o[f]-(C[f]||0),N=a[f];N===114?L=" ".repeat(z):N===99?z%2?(L=" ".repeat(z/2+.5),B=" ".repeat(z/2-.5)):(L=" ".repeat(z/2),B=L):B=" ".repeat(z)}n.delimiterStart!==!1&&!f&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&O==="")&&(n.delimiterStart!==!1||f)&&y.push(" "),n.alignDelimiters!==!1&&y.push(L),y.push(O),n.alignDelimiters!==!1&&y.push(B),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||f!==l-1)&&y.push("|")}g.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return g.join(`
|
|
29
|
+
`)}function km(e){return e==null?"":String(e)}function ms(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 ym(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),_m);return i(),s}function _m(e,t,n){return">"+(n?"":" ")+e}function Am(e,t){return gs(e,t.inConstruct,!0)&&!gs(e,t.notInConstruct,!1)}function gs(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function bs(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
30
|
+
`&&Am(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
31
|
+
`}function Cm(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function Sm(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 Im(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 Nm(e,t,n,r){const i=Im(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Sm(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(a,wm);return f(),p}const u=n.createTracker(r),o=i.repeat(Math.max(Cm(a,i)+1,3)),l=n.enter("codeFenced");let d=u.move(o);if(e.lang){const f=n.enter(`codeFencedLang${s}`);d+=u.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...u.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${s}`);d+=u.move(" "),d+=u.move(n.safe(e.meta,{before:d,after:`
|
|
32
|
+
`,encode:["`"],...u.current()})),f()}return d+=u.move(`
|
|
33
|
+
`),a&&(d+=u.move(a+`
|
|
34
|
+
`)),d+=u.move(o),l(),d}function wm(e,t,n){return(n?"":" ")+e}function Ji(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 Lm(e,t,n,r){const i=Ji(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let u=n.enter("label");const o=n.createTracker(r);let l=o.move("[");return l+=o.move(n.safe(n.associationId(e),{before:l,after:"]",...o.current()})),l+=o.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":`
|
|
35
|
+
`,...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),s(),l}function Rm(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 Un(e){return"&#x"+e.toString(16).toUpperCase()+";"}function un(e){if(e===null||xe(e)||jt(e))return 1;if(Or(e))return 2}function Er(e,t,n){const r=un(e),i=un(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===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}}Zo.peek=Om;function Zo(e,t,n,r){const i=Rm(n),a=n.enter("emphasis"),s=n.createTracker(r),u=s.move(i);let o=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const l=o.charCodeAt(0),d=Er(r.before.charCodeAt(r.before.length-1),l,i);d.inside&&(o=Un(l)+o.slice(1));const f=o.charCodeAt(o.length-1),p=Er(r.after.charCodeAt(0),f,i);p.inside&&(o=o.slice(0,-1)+Un(f));const h=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},u+o+h}function Om(e,t,n){return n.options.emphasis||"*"}const Dm={};function ea(e,t){const n=Dm,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Jo(e,r,i)}function Jo(e,t,n){if(Pm(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Es(e.children,t,n)}return Array.isArray(e)?Es(e,t,n):""}function Es(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Jo(e[i],t,n);return r.join("")}function Pm(e){return!!(e&&typeof e=="object")}function vm(e,t){let n=!1;return ot(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,fi}),!!((!e.depth||e.depth<3)&&ea(e)&&(t.options.setext||n))}function Mm(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(vm(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
|
|
36
|
+
`,after:`
|
|
37
|
+
`});return f(),d(),p+`
|
|
38
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
39
|
+
`))+1))}const s="#".repeat(i),u=n.enter("headingAtx"),o=n.enter("phrasing");a.move(s+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
|
|
40
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=Un(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),o(),u(),l}el.peek=Bm;function el(e){return e.value||""}function Bm(){return"<"}tl.peek=Fm;function tl(e,t,n,r){const i=Ji(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const o=n.createTracker(r);let l=o.move("![");return l+=o.move(n.safe(e.alt,{before:l,after:"]",...o.current()})),l+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),l+=o.move(")"),s(),l}function Fm(){return"!"}nl.peek=Hm;function nl(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("![");const l=n.safe(e.alt,{before:o,after:"]",...u.current()});o+=u.move(l+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=d,a(),i==="full"||!l||l!==f?o+=u.move(f+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function Hm(){return"!"}rl.peek=Um;function rl(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],u=n.compilePattern(s);let o;if(s.atBreak)for(;o=u.exec(r);){let l=o.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(o.index+1)}}return i+r+i}function Um(){return"`"}function il(e,t){const n=ea(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}al.peek=zm;function al(e,t,n,r){const i=Ji(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let u,o;if(il(e,n)){const d=n.stack;n.stack=[],u=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),u(),n.stack=d,f}u=n.enter("link"),o=n.enter("label");let l=s.move("[");return l+=s.move(n.containerPhrasing(e,{before:l,after:"](",...s.current()})),l+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(e.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(o=n.enter("destinationRaw"),l+=s.move(n.safe(e.url,{before:l,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=s.move(" "+i),l+=s.move(n.safe(e.title,{before:l,after:i,...s.current()})),l+=s.move(i),o()),l+=s.move(")"),u(),l}function zm(e,t,n){return il(e,n)?"<":"["}sl.peek=jm;function sl(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("[");const l=n.containerPhrasing(e,{before:o,after:"]",...u.current()});o+=u.move(l+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=d,a(),i==="full"||!l||l!==f?o+=u.move(f+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function jm(){return"["}function ta(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 $m(e){const t=ta(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Ym(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 ul(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 qm(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?Ym(n):ta(n);const u=e.ordered?s==="."?")":".":$m(n);let o=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(o=!0),ul(n)===s&&d){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(s=u),n.bulletCurrent=s;const l=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),l}function Vm(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 Wm(e,t,n,r){const i=Vm(n);let a=n.bulletCurrent||ta(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.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 u=n.createTracker(r);u.move(a+" ".repeat(s-a.length)),u.shift(s);const o=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,u.current()),d);return o(),l;function d(f,p,h){return p?(h?"":" ".repeat(s))+f:(h?a:a+" ".repeat(s-a.length))+f}}function Gm(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const Qm=_r(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Xm(e,t,n,r){return(e.children.some(function(s){return Qm(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Km(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ol.peek=Zm;function ol(e,t,n,r){const i=Km(n),a=n.enter("strong"),s=n.createTracker(r),u=s.move(i+i);let o=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const l=o.charCodeAt(0),d=Er(r.before.charCodeAt(r.before.length-1),l,i);d.inside&&(o=Un(l)+o.slice(1));const f=o.charCodeAt(o.length-1),p=Er(r.after.charCodeAt(0),f,i);p.inside&&(o=o.slice(0,-1)+Un(f));const h=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},u+o+h}function Zm(e,t,n){return n.options.strong||"*"}function Jm(e,t,n,r){return n.safe(e.value,r)}function e1(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 t1(e,t,n){const r=(ul(n)+(n.options.ruleSpaces?" ":"")).repeat(e1(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ll={blockquote:ym,break:bs,code:Nm,definition:Lm,emphasis:Zo,hardBreak:bs,heading:Mm,html:el,image:tl,imageReference:nl,inlineCode:rl,link:al,linkReference:sl,list:qm,listItem:Wm,paragraph:Gm,root:Xm,strong:ol,text:Jm,thematicBreak:t1},Ts=document.createElement("i");function na(e){const t="&"+e+";";Ts.innerHTML=t;const n=Ts.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function cl(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const n1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function r1(e){return e.replace(n1,i1)}function i1(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return cl(n.slice(a?2:1),a?16:10)}return na(n)||e}function a1(){return{enter:{table:s1,tableData:xs,tableHeader:xs,tableRow:o1},exit:{codeText:l1,table:u1,tableData:Qr,tableHeader:Qr,tableRow:Qr}}}function s1(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function u1(e){this.exit(e),this.data.inTable=void 0}function o1(e){this.enter({type:"tableRow",children:[]},e)}function Qr(e){this.exit(e)}function xs(e){this.enter({type:"tableCell",children:[]},e)}function l1(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,c1));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function c1(e,t){return t==="|"?t:e}function d1(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
41
|
+
`,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:u}};function s(h,g,_,C){return l(d(h,_,C),h.align)}function u(h,g,_,C){const y=f(h,_,C),O=l([y]);return O.slice(0,O.indexOf(`
|
|
42
|
+
`))}function o(h,g,_,C){const y=_.enter("tableCell"),O=_.enter("phrasing"),L=_.containerPhrasing(h,{...C,before:a,after:a});return O(),y(),L}function l(h,g){return xm(h,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function d(h,g,_){const C=h.children;let y=-1;const O=[],L=g.enter("table");for(;++y<C.length;)O[y]=f(C[y],g,_);return L(),O}function f(h,g,_){const C=h.children;let y=-1;const O=[],L=g.enter("tableRow");for(;++y<C.length;)O[y]=o(C[y],h,g,_);return L(),O}function p(h,g,_){let C=ll.inlineCode(h,g,_);return _.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function f1(){return{exit:{taskListCheckValueChecked:ks,taskListCheckValueUnchecked:ks,paragraph:p1}}}function h1(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:m1}}}function ks(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function p1(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const u=i[a];if(u.type==="paragraph"){s=u;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function m1(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let o=ll.listItem(e,t,n,{...r,...u.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),o;function l(d){return d+s}}function g1(){return[$p(),cm(),pm(),a1(),f1()]}function b1(e){return{extensions:[Yp(),dm(e),mm(),d1(e),h1()]}}function We(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function Ke(e,t){return e.length>0?(We(e,e.length,0,t),e):t}const ys={}.hasOwnProperty;function dl(e){const t={};let n=-1;for(;++n<e.length;)E1(t,e[n]);return t}function E1(e,t){let n;for(n in t){const i=(ys.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){ys.call(i,s)||(i[s]=[]);const u=a[s];T1(i[s],Array.isArray(u)?u:u?[u]:[])}}}function T1(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);We(e,0,0,r)}const x1={tokenize:S1,partial:!0},fl={tokenize:I1,partial:!0},hl={tokenize:N1,partial:!0},pl={tokenize:w1,partial:!0},k1={tokenize:L1,partial:!0},ml={name:"wwwAutolink",tokenize:A1,previous:bl},gl={name:"protocolAutolink",tokenize:C1,previous:El},bt={name:"emailAutolink",tokenize:_1,previous:Tl},ct={};function y1(){return{text:ct}}let Mt=48;for(;Mt<123;)ct[Mt]=bt,Mt++,Mt===58?Mt=65:Mt===91&&(Mt=97);ct[43]=bt;ct[45]=bt;ct[46]=bt;ct[95]=bt;ct[72]=[bt,gl];ct[104]=[bt,gl];ct[87]=[bt,ml];ct[119]=[bt,ml];function _1(e,t,n){const r=this;let i,a;return s;function s(f){return!yi(f)||!Tl.call(r,r.previous)||ra(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(f))}function u(f){return yi(f)?(e.consume(f),u):f===64?(e.consume(f),o):n(f)}function o(f){return f===46?e.check(k1,d,l)(f):f===45||f===95||De(f)?(a=!0,e.consume(f),o):d(f)}function l(f){return e.consume(f),i=!0,o}function d(f){return a&&i&&Me(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function A1(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!bl.call(r,r.previous)||ra(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(x1,e.attempt(fl,e.attempt(hl,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function C1(e,t,n){const r=this;let i="",a=!1;return s;function s(f){return(f===72||f===104)&&El.call(r,r.previous)&&!ra(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),u):n(f)}function u(f){if(Me(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),u;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),o}return n(f)}function o(f){return f===47?(e.consume(f),a?l:(a=!0,o)):n(f)}function l(f){return f===null||br(f)||xe(f)||jt(f)||Or(f)?n(f):e.attempt(fl,e.attempt(hl,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function S1(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function I1(e,t,n){let r,i,a;return s;function s(l){return l===46||l===95?e.check(pl,o,u)(l):l===null||xe(l)||jt(l)||l!==45&&Or(l)?o(l):(a=!0,e.consume(l),s)}function u(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),s}function o(l){return i||r||!a?n(l):t(l)}}function N1(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?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(pl,t,a)(s):s===null||xe(s)||jt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function w1(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||xe(u)||jt(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||xe(u)||jt(u)?t(u):r(u)}function a(u){return Me(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):Me(u)?(e.consume(u),s):n(u)}}function L1(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return De(a)?n(a):t(a)}}function bl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xe(e)}function El(e){return!Me(e)}function Tl(e){return!(e===47||yi(e))}function yi(e){return e===43||e===45||e===46||e===95||De(e)}function ra(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function fn(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&De(e.charCodeAt(n+1))&&De(e.charCodeAt(n+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 u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(s=String.fromCharCode(a,u),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Dr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const _i={name:"attention",resolveAll:R1,tokenize:O1};function R1(e,t){let n=-1,r,i,a,s,u,o,l,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},p={...e[n][1].start};_s(f,-o),_s(p,o),s={type:o>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Ke(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Ke(l,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),l=Ke(l,Dr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Ke(l,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,l=Ke(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,We(e,r-1,n-r+3,l),n=r+l.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function O1(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=un(r);let a;return s;function s(o){return a=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===a)return e.consume(o),u;const l=e.exit("attentionSequence"),d=un(o),f=!d||d===2&&i||n.includes(o),p=!i||i===2&&d||n.includes(r);return l._open=!!(a===42?f:f&&(i||!p)),l._close=!!(a===42?p:p&&(d||!f)),t(o)}}function _s(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const D1={name:"autolink",tokenize:P1};function P1(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return Me(h)?(e.consume(h),s):h===64?n(h):l(h)}function s(h){return h===43||h===45||h===46||De(h)?(r=1,u(h)):l(h)}function u(h){return h===58?(e.consume(h),r=0,o):(h===43||h===45||h===46||De(h))&&r++<32?(e.consume(h),u):(r=0,l(h))}function o(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||br(h)?n(h):(e.consume(h),o)}function l(h){return h===64?(e.consume(h),d):vp(h)?(e.consume(h),l):n(h)}function d(h){return De(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||De(h))&&r++<63){const g=h===45?p:f;return e.consume(h),g}return n(h)}}function pe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(o){return fe(o)?(e.enter(n),u(o)):t(o)}function u(o){return fe(o)&&a++<i?(e.consume(o),u):(e.exit(n),t(o))}}const Wn={partial:!0,tokenize:v1};function v1(e,t,n){return r;function r(a){return fe(a)?pe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||ee(a)?t(a):n(a)}}const xl={continuation:{tokenize:B1},exit:F1,name:"blockQuote",tokenize:M1};function M1(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return fe(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function B1(e,t,n){const r=this;return i;function i(s){return fe(s)?pe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(xl,t,n)(s)}}function F1(e){e.exit("blockQuote")}const kl={name:"characterEscape",tokenize:H1};function H1(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return Bp(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const yl={name:"characterReference",tokenize:U1};function U1(e,t,n){const r=this;let i=0,a,s;return u;function u(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),o}function o(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,s=De,d(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=Mp,d):(e.enter("characterReferenceValue"),a=7,s=ki,d(f))}function d(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return s===De&&!na(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<a?(e.consume(f),d):n(f)}}const As={partial:!0,tokenize:j1},Cs={concrete:!0,name:"codeFenced",tokenize:z1};function z1(e,t,n){const r=this,i={partial:!0,tokenize:z};let a=0,s=0,u;return o;function o(N){return l(N)}function l(N){const H=r.events[r.events.length-1];return a=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,u=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(N)}function d(N){return N===u?(s++,e.consume(N),d):s<3?n(N):(e.exit("codeFencedFenceSequence"),fe(N)?pe(e,f,"whitespace")(N):f(N))}function f(N){return N===null||ee(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(As,_,B)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||ee(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(N)):fe(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),pe(e,h,"whitespace")(N)):N===96&&N===u?n(N):(e.consume(N),p)}function h(N){return N===null||ee(N)?f(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(N))}function g(N){return N===null||ee(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(N)):N===96&&N===u?n(N):(e.consume(N),g)}function _(N){return e.attempt(i,B,C)(N)}function C(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),y}function y(N){return a>0&&fe(N)?pe(e,O,"linePrefix",a+1)(N):O(N)}function O(N){return N===null||ee(N)?e.check(As,_,B)(N):(e.enter("codeFlowValue"),L(N))}function L(N){return N===null||ee(N)?(e.exit("codeFlowValue"),O(N)):(e.consume(N),L)}function B(N){return e.exit("codeFenced"),t(N)}function z(N,H,P){let G=0;return w;function w(j){return N.enter("lineEnding"),N.consume(j),N.exit("lineEnding"),$}function $(j){return N.enter("codeFencedFence"),fe(j)?pe(N,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):V(j)}function V(j){return j===u?(N.enter("codeFencedFenceSequence"),oe(j)):P(j)}function oe(j){return j===u?(G++,N.consume(j),oe):G>=s?(N.exit("codeFencedFenceSequence"),fe(j)?pe(N,Q,"whitespace")(j):Q(j)):P(j)}function Q(j){return j===null||ee(j)?(N.exit("codeFencedFence"),H(j)):P(j)}}}function j1(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Xr={name:"codeIndented",tokenize:Y1},$1={partial:!0,tokenize:q1};function Y1(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),pe(e,a,"linePrefix",5)(l)}function a(l){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?o(l):ee(l)?e.attempt($1,s,o)(l):(e.enter("codeFlowValue"),u(l))}function u(l){return l===null||ee(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),u)}function o(l){return e.exit("codeIndented"),t(l)}}function q1(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):ee(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):pe(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):ee(s)?i(s):n(s)}}const V1={name:"codeText",previous:G1,resolve:W1,tokenize:Q1};function W1(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function G1(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Q1(e,t,n){let r=0,i,a;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),u(f)}function u(f){return f===96?(e.consume(f),r++,u):(e.exit("codeTextSequence"),o(f))}function o(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),o):f===96?(a=e.enter("codeTextSequence"),i=0,d(f)):ee(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),o):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||ee(f)?(e.exit("codeTextData"),o(f)):(e.consume(f),l)}function d(f){return f===96?(e.consume(f),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",l(f))}}class X1{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&xn(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),xn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),xn(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);xn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);xn(this.left,n.reverse())}}}function xn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function _l(e){const t={};let n=-1,r,i,a,s,u,o,l;const d=new X1(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(o=r[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(r[0]==="enter")r[1].contentType&&(Object.assign(t,K1(d,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,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&&(r[1].end={...d.get(i)[1].start},u=d.slice(i,n),u.unshift(r),d.splice(i,n-i+1,u))}}return We(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!l}function K1(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,o=[],l={};let d,f,p=-1,h=n,g=0,_=0;const C=[_];for(;h;){for(;e.get(++i)[1]!==h;);a.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),f&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++p<u.length;)u[p][0]==="exit"&&u[p-1][0]==="enter"&&u[p][1].type===u[p-1][1].type&&u[p][1].start.line!==u[p][1].end.line&&(_=p+1,C.push(_),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):C.pop(),p=C.length;p--;){const y=u.slice(C[p],C[p+1]),O=a.pop();o.push([O,O+y.length-1]),e.splice(O,2,y)}for(o.reverse(),p=-1;++p<o.length;)l[g+o[p][0]]=g+o[p][1],g+=o[p][1]-o[p][0]-1;return l}const Z1={resolve:eg,tokenize:tg},J1={partial:!0,tokenize:ng};function eg(e){return _l(e),e}function tg(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):ee(u)?e.check(J1,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function ng(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),pe(e,a,"linePrefix")}function a(s){if(s===null||ee(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Al(e,t,n,r,i,a,s,u,o){const l=o||Number.POSITIVE_INFINITY;let d=0;return f;function f(y){return y===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(y),e.exit(a),p):y===null||y===32||y===41||br(y)?n(y):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),_(y))}function p(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(u),p(y)):y===null||y===60||ee(y)?n(y):(e.consume(y),y===92?g:h)}function g(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function _(y){return!d&&(y===null||y===41||xe(y))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(y)):d<l&&y===40?(e.consume(y),d++,_):y===41?(e.consume(y),d--,_):y===null||y===32||y===40||br(y)?n(y):(e.consume(y),y===92?C:_)}function C(y){return y===40||y===41||y===92?(e.consume(y),_):_(y)}}function Cl(e,t,n,r,i,a){const s=this;let u=0,o;return l;function l(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),d}function d(h){return u>999||h===null||h===91||h===93&&!o||h===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):ee(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||ee(h)||u++>999?(e.exit("chunkString"),d(h)):(e.consume(h),o||(o=!fe(h)),h===92?p:f)}function p(h){return h===91||h===92||h===93?(e.consume(h),u++,f):f(h)}}function Sl(e,t,n,r,i,a){let s;return u;function u(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,o):n(p)}function o(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),l(p))}function l(p){return p===s?(e.exit(a),o(s)):p===null?n(p):ee(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),pe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===s||p===null||ee(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?f:d)}function f(p){return p===s||p===92?(e.consume(p),d):d(p)}}function vn(e,t){let n;return r;function r(i){return ee(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):fe(i)?pe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const rg={name:"definition",tokenize:ag},ig={partial:!0,tokenize:sg};function ag(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return Cl.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function u(h){return i=nt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o):n(h)}function o(h){return xe(h)?vn(e,l)(h):l(h)}function l(h){return Al(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(ig,f,f)(h)}function f(h){return fe(h)?pe(e,p,"whitespace")(h):p(h)}function p(h){return h===null||ee(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function sg(e,t,n){return r;function r(u){return xe(u)?vn(e,i)(u):n(u)}function i(u){return Sl(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return fe(u)?pe(e,s,"whitespace")(u):s(u)}function s(u){return u===null||ee(u)?t(u):n(u)}}const ug={name:"hardBreakEscape",tokenize:og};function og(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return ee(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const lg={name:"headingAtx",resolve:cg,tokenize:dg};function cg(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},We(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function dg(e,t,n){let r=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&&r++<6?(e.consume(d),s):d===null||xe(d)?(e.exit("atxHeadingSequence"),u(d)):n(d)}function u(d){return d===35?(e.enter("atxHeadingSequence"),o(d)):d===null||ee(d)?(e.exit("atxHeading"),t(d)):fe(d)?pe(e,u,"whitespace")(d):(e.enter("atxHeadingText"),l(d))}function o(d){return d===35?(e.consume(d),o):(e.exit("atxHeadingSequence"),u(d))}function l(d){return d===null||d===35||xe(d)?(e.exit("atxHeadingText"),u(d)):(e.consume(d),l)}}const fg=["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"],Ss=["pre","script","style","textarea"],hg={concrete:!0,name:"htmlFlow",resolveTo:gg,tokenize:bg},pg={partial:!0,tokenize:Tg},mg={partial:!0,tokenize:Eg};function gg(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 bg(e,t,n){const r=this;let i,a,s,u,o;return l;function l(T){return d(T)}function d(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),f}function f(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),a=!0,_):T===63?(e.consume(T),i=3,r.interrupt?t:E):Me(T)?(e.consume(T),s=String.fromCharCode(T),C):n(T)}function p(T){return T===45?(e.consume(T),i=2,h):T===91?(e.consume(T),i=5,u=0,g):Me(T)?(e.consume(T),i=4,r.interrupt?t:E):n(T)}function h(T){return T===45?(e.consume(T),r.interrupt?t:E):n(T)}function g(T){const W="CDATA[";return T===W.charCodeAt(u++)?(e.consume(T),u===W.length?r.interrupt?t:V:g):n(T)}function _(T){return Me(T)?(e.consume(T),s=String.fromCharCode(T),C):n(T)}function C(T){if(T===null||T===47||T===62||xe(T)){const W=T===47,J=s.toLowerCase();return!W&&!a&&Ss.includes(J)?(i=1,r.interrupt?t(T):V(T)):fg.includes(s.toLowerCase())?(i=6,W?(e.consume(T),y):r.interrupt?t(T):V(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):a?O(T):L(T))}return T===45||De(T)?(e.consume(T),s+=String.fromCharCode(T),C):n(T)}function y(T){return T===62?(e.consume(T),r.interrupt?t:V):n(T)}function O(T){return fe(T)?(e.consume(T),O):w(T)}function L(T){return T===47?(e.consume(T),w):T===58||T===95||Me(T)?(e.consume(T),B):fe(T)?(e.consume(T),L):w(T)}function B(T){return T===45||T===46||T===58||T===95||De(T)?(e.consume(T),B):z(T)}function z(T){return T===61?(e.consume(T),N):fe(T)?(e.consume(T),z):L(T)}function N(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),o=T,H):fe(T)?(e.consume(T),N):P(T)}function H(T){return T===o?(e.consume(T),o=null,G):T===null||ee(T)?n(T):(e.consume(T),H)}function P(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||xe(T)?z(T):(e.consume(T),P)}function G(T){return T===47||T===62||fe(T)?L(T):n(T)}function w(T){return T===62?(e.consume(T),$):n(T)}function $(T){return T===null||ee(T)?V(T):fe(T)?(e.consume(T),$):n(T)}function V(T){return T===45&&i===2?(e.consume(T),Y):T===60&&i===1?(e.consume(T),te):T===62&&i===4?(e.consume(T),A):T===63&&i===3?(e.consume(T),E):T===93&&i===5?(e.consume(T),Ie):ee(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(pg,v,oe)(T)):T===null||ee(T)?(e.exit("htmlFlowData"),oe(T)):(e.consume(T),V)}function oe(T){return e.check(mg,Q,v)(T)}function Q(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),j}function j(T){return T===null||ee(T)?oe(T):(e.enter("htmlFlowData"),V(T))}function Y(T){return T===45?(e.consume(T),E):V(T)}function te(T){return T===47?(e.consume(T),s="",Ae):V(T)}function Ae(T){if(T===62){const W=s.toLowerCase();return Ss.includes(W)?(e.consume(T),A):V(T)}return Me(T)&&s.length<8?(e.consume(T),s+=String.fromCharCode(T),Ae):V(T)}function Ie(T){return T===93?(e.consume(T),E):V(T)}function E(T){return T===62?(e.consume(T),A):T===45&&i===2?(e.consume(T),E):V(T)}function A(T){return T===null||ee(T)?(e.exit("htmlFlowData"),v(T)):(e.consume(T),A)}function v(T){return e.exit("htmlFlow"),t(T)}}function Eg(e,t,n){const r=this;return i;function i(s){return ee(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Tg(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Wn,t,n)}}const xg={name:"htmlText",tokenize:kg};function kg(e,t,n){const r=this;let i,a,s;return u;function u(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),o}function o(E){return E===33?(e.consume(E),l):E===47?(e.consume(E),z):E===63?(e.consume(E),L):Me(E)?(e.consume(E),P):n(E)}function l(E){return E===45?(e.consume(E),d):E===91?(e.consume(E),a=0,g):Me(E)?(e.consume(E),O):n(E)}function d(E){return E===45?(e.consume(E),h):n(E)}function f(E){return E===null?n(E):E===45?(e.consume(E),p):ee(E)?(s=f,te(E)):(e.consume(E),f)}function p(E){return E===45?(e.consume(E),h):f(E)}function h(E){return E===62?Y(E):E===45?p(E):f(E)}function g(E){const A="CDATA[";return E===A.charCodeAt(a++)?(e.consume(E),a===A.length?_:g):n(E)}function _(E){return E===null?n(E):E===93?(e.consume(E),C):ee(E)?(s=_,te(E)):(e.consume(E),_)}function C(E){return E===93?(e.consume(E),y):_(E)}function y(E){return E===62?Y(E):E===93?(e.consume(E),y):_(E)}function O(E){return E===null||E===62?Y(E):ee(E)?(s=O,te(E)):(e.consume(E),O)}function L(E){return E===null?n(E):E===63?(e.consume(E),B):ee(E)?(s=L,te(E)):(e.consume(E),L)}function B(E){return E===62?Y(E):L(E)}function z(E){return Me(E)?(e.consume(E),N):n(E)}function N(E){return E===45||De(E)?(e.consume(E),N):H(E)}function H(E){return ee(E)?(s=H,te(E)):fe(E)?(e.consume(E),H):Y(E)}function P(E){return E===45||De(E)?(e.consume(E),P):E===47||E===62||xe(E)?G(E):n(E)}function G(E){return E===47?(e.consume(E),Y):E===58||E===95||Me(E)?(e.consume(E),w):ee(E)?(s=G,te(E)):fe(E)?(e.consume(E),G):Y(E)}function w(E){return E===45||E===46||E===58||E===95||De(E)?(e.consume(E),w):$(E)}function $(E){return E===61?(e.consume(E),V):ee(E)?(s=$,te(E)):fe(E)?(e.consume(E),$):G(E)}function V(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),i=E,oe):ee(E)?(s=V,te(E)):fe(E)?(e.consume(E),V):(e.consume(E),Q)}function oe(E){return E===i?(e.consume(E),i=void 0,j):E===null?n(E):ee(E)?(s=oe,te(E)):(e.consume(E),oe)}function Q(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||xe(E)?G(E):(e.consume(E),Q)}function j(E){return E===47||E===62||xe(E)?G(E):n(E)}function Y(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function te(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),Ae}function Ae(E){return fe(E)?pe(e,Ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):Ie(E)}function Ie(E){return e.enter("htmlTextData"),s(E)}}const ia={name:"labelEnd",resolveAll:Cg,resolveTo:Sg,tokenize:Ig},yg={tokenize:Ng},_g={tokenize:wg},Ag={tokenize:Lg};function Cg(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&We(e,0,e.length,n),e}function Sg(e,t){let n=e.length,r=0,i,a,s,u;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},d={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",o,t],["enter",l,t]],u=Ke(u,e.slice(a+1,a+r+3)),u=Ke(u,[["enter",d,t]]),u=Ke(u,Dr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=Ke(u,[["exit",d,t],e[s-2],e[s-1],["exit",l,t]]),u=Ke(u,e.slice(s+1)),u=Ke(u,[["exit",o,t]]),We(e,a,e.length,u),e}function Ig(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return u;function u(p){return a?a._inactive?f(p):(s=r.parser.defined.includes(nt(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),o):n(p)}function o(p){return p===40?e.attempt(yg,d,s?d:f)(p):p===91?e.attempt(_g,d,s?l:f)(p):s?d(p):f(p)}function l(p){return e.attempt(Ag,d,f)(p)}function d(p){return t(p)}function f(p){return a._balanced=!0,n(p)}}function Ng(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return xe(f)?vn(e,a)(f):a(f)}function a(f){return f===41?d(f):Al(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return xe(f)?vn(e,o)(f):d(f)}function u(f){return n(f)}function o(f){return f===34||f===39||f===40?Sl(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function l(f){return xe(f)?vn(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function wg(e,t,n){const r=this;return i;function i(u){return Cl.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(nt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function Lg(e,t,n){return r;function r(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):n(a)}}const Rg={name:"labelStartImage",resolveAll:ia.resolveAll,tokenize:Og};function Og(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Dg={name:"labelStartLink",resolveAll:ia.resolveAll,tokenize:Pg};function Pg(e,t,n){const r=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 r.parser.constructs?n(s):t(s)}}const Kr={name:"lineEnding",tokenize:vg};function vg(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),pe(e,t,"linePrefix")}}const cr={name:"thematicBreak",tokenize:Mg};function Mg(e,t,n){let r=0,i;return a;function a(l){return e.enter("thematicBreak"),s(l)}function s(l){return i=l,u(l)}function u(l){return l===i?(e.enter("thematicBreakSequence"),o(l)):r>=3&&(l===null||ee(l))?(e.exit("thematicBreak"),t(l)):n(l)}function o(l){return l===i?(e.consume(l),r++,o):(e.exit("thematicBreakSequence"),fe(l)?pe(e,u,"whitespace")(l):u(l))}}const Ue={continuation:{tokenize:Ug},exit:jg,name:"list",tokenize:Hg},Bg={partial:!0,tokenize:$g},Fg={partial:!0,tokenize:zg};function Hg(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return u;function u(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:ki(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(cr,n,l)(h):l(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(h)}return n(h)}function o(h){return ki(h)&&++s<10?(e.consume(h),o):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),l(h)):n(h)}function l(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Wn,r.interrupt?n:d,e.attempt(Bg,p,f))}function d(h){return r.containerState.initialBlankLine=!0,a++,p(h)}function f(h){return fe(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Ug(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Wn,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,pe(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!fe(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Fg,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,pe(e,e.attempt(Ue,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function zg(e,t,n){const r=this;return pe(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function jg(e){e.exit(this.containerState.type)}function $g(e,t,n){const r=this;return pe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!fe(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Is={name:"setextUnderline",resolveTo:Yg,tokenize:qg};function Yg(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][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[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function qg(e,t,n){const r=this;let i;return a;function a(l){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=l,s(l)):n(l)}function s(l){return e.enter("setextHeadingLineSequence"),u(l)}function u(l){return l===i?(e.consume(l),u):(e.exit("setextHeadingLineSequence"),fe(l)?pe(e,o,"lineSuffix")(l):o(l))}function o(l){return l===null||ee(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const Vg={tokenize:eb,partial:!0};function Wg(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Kg,continuation:{tokenize:Zg},exit:Jg}},text:{91:{name:"gfmFootnoteCall",tokenize:Xg},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Gg,resolveTo:Qg}}}}function Gg(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.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 u;function u(o){if(!s||!s._balanced)return n(o);const l=nt(r.sliceSerialize({start:s.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function Qg(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+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)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+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",r,t]];return e.splice(n,e.length-n+1,...u),e}function Xg(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),o}function o(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(a>999||f===93&&!s||f===null||f===91||xe(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(nt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return xe(f)||(s=!0),a++,e.consume(f),f===92?d:l}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,l):l(f)}}function Kg(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return o;function o(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(g)}function d(g){if(s>999||g===93&&!u||g===null||g===91||xe(g))return n(g);if(g===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return a=nt(r.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return xe(g)||(u=!0),s++,e.consume(g),g===92?f:d}function f(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),pe(e,h,"gfmFootnoteDefinitionWhitespace")):n(g)}function h(g){return t(g)}}function Zg(e,t,n){return e.check(Wn,t,e.attempt(Vg,t,n))}function Jg(e){e.exit("gfmFootnoteDefinition")}function eb(e,t,n){const r=this;return pe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function tb(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,u){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let l=o;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[o][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[o][1].end)},f={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[o][1].start)},p=[["enter",d,u],["enter",s[l][1],u],["exit",s[l][1],u],["enter",f,u]],h=u.parser.constructs.insideSpan.null;h&&We(p,p.length,0,Dr(h,s.slice(l+1,o),u)),We(p,p.length,0,[["exit",f,u],["enter",s[o][1],u],["exit",s[o][1],u],["exit",d,u]]),We(s,l-1,o-l+3,p),o=l+p.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function a(s,u,o){const l=this.previous,d=this.events;let f=0;return p;function p(g){return l===126&&d[d.length-1][1].type!=="characterEscape"?o(g):(s.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const _=un(l);if(g===126)return f>1?o(g):(s.consume(g),f++,h);if(f<2&&!n)return o(g);const C=s.exit("strikethroughSequenceTemporary"),y=un(g);return C._open=!y||y===2&&!!_,C._close=!_||_===2&&!!y,u(g)}}}class nb{constructor(){this.map=[]}add(t,n,r){rb(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function rb(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function ib(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function ab(){return{flow:{null:{name:"table",tokenize:sb,resolveAll:ub}}}}function sb(e,t,n){const r=this;let i=0,a=0,s;return u;function u(w){let $=r.events.length-1;for(;$>-1;){const Q=r.events[$][1].type;if(Q==="lineEnding"||Q==="linePrefix")$--;else break}const V=$>-1?r.events[$][1].type:null,oe=V==="tableHead"||V==="tableRow"?N:o;return oe===N&&r.parser.lazy[r.now().line]?n(w):oe(w)}function o(w){return e.enter("tableHead"),e.enter("tableRow"),l(w)}function l(w){return w===124||(s=!0,a+=1),d(w)}function d(w){return w===null?n(w):ee(w)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),h):n(w):fe(w)?pe(e,d,"whitespace")(w):(a+=1,s&&(s=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),f(w)))}function f(w){return w===null||w===124||xe(w)?(e.exit("data"),d(w)):(e.consume(w),w===92?p:f)}function p(w){return w===92||w===124?(e.consume(w),f):f(w)}function h(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(w):(e.enter("tableDelimiterRow"),s=!1,fe(w)?pe(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):g(w))}function g(w){return w===45||w===58?C(w):w===124?(s=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),_):z(w)}function _(w){return fe(w)?pe(e,C,"whitespace")(w):C(w)}function C(w){return w===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),y):w===45?(a+=1,y(w)):w===null||ee(w)?B(w):z(w)}function y(w){return w===45?(e.enter("tableDelimiterFiller"),O(w)):z(w)}function O(w){return w===45?(e.consume(w),O):w===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(w))}function L(w){return fe(w)?pe(e,B,"whitespace")(w):B(w)}function B(w){return w===124?g(w):w===null||ee(w)?!s||i!==a?z(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(w)):z(w)}function z(w){return n(w)}function N(w){return e.enter("tableRow"),H(w)}function H(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),H):w===null||ee(w)?(e.exit("tableRow"),t(w)):fe(w)?pe(e,H,"whitespace")(w):(e.enter("data"),P(w))}function P(w){return w===null||w===124||xe(w)?(e.exit("data"),H(w)):(e.consume(w),w===92?G:P)}function G(w){return w===92||w===124?(e.consume(w),P):P(w)}}function ub(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,o=0,l,d,f;const p=new nb;for(;++n<e.length;){const h=e[n],g=h[1];h[0]==="enter"?g.type==="tableHead"?(u=!1,o!==0&&(Ns(p,t,o,l,d),d=void 0,o=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",l,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",d,t]])),i=g.type==="tableDelimiterRow"?2:d?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],f=tr(p,t,a,i,void 0,f),a=[0,0,0,0]),s[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],f=tr(p,t,a,i,void 0,f)),a=s,s=[a[1],n,0,0])):g.type==="tableHead"?(u=!0,o=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(o=n,a[1]!==0?(s[0]=s[1],f=tr(p,t,a,i,n,f)):s[1]!==0&&(f=tr(p,t,s,i,n,f)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&Ns(p,t,o,l,d),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=ib(t.events,n))}return e}function tr(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Jt(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const o=Jt(t.events,n[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=Jt(t.events,n[2]),d=Jt(t.events,n[3]),f={type:u,start:Object.assign({},l),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,_=n[3]-n[2]-1;e.add(g,_,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},Jt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Ns(e,t,n,r,i){const a=[],s=Jt(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function Jt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const ob={name:"tasklistCheck",tokenize:cb};function lb(){return{text:{91:ob}}}function cb(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return xe(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):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(o)}function u(o){return ee(o)?t(o):fe(o)?e.check({tokenize:db},t,n)(o):n(o)}}function db(e,t,n){return pe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function fb(e){return dl([y1(),Wg(),tb(e),ab(),lb()])}const hb={};function pb(e){const t=this,n=e||hb,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(fb(n)),a.push(g1()),s.push(b1(n))}var mb=Object.defineProperty,gb=Object.defineProperties,bb=Object.getOwnPropertyDescriptors,ws=Object.getOwnPropertySymbols,Eb=Object.prototype.hasOwnProperty,Tb=Object.prototype.propertyIsEnumerable,Ls=(e,t,n)=>t in e?mb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Il=(e,t)=>{for(var n in t||(t={}))Eb.call(t,n)&&Ls(e,n,t[n]);if(ws)for(var n of ws(t))Tb.call(t,n)&&Ls(e,n,t[n]);return e},Nl=(e,t)=>gb(e,bb(t)),ze=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},xb=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},kb=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!xb(e,n)&&(t+=1)}return t},It=(e,t)=>{let n=!1,r=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]==="\\"&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}if(!r&&e[a]==="`")if(n){if(i<t&&t<a)return!0;n=!1,i=-1}else n=!0,i=a}return!1},yb=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,_b=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(yb,(t,n,r,i)=>ze(e,i)?t:`${n}\\>${r}`),Ab=/(\*\*)([^*]*\*?)$/,Cb=/(__)([^_]*?)$/,Sb=/(\*\*\*)([^*]*?)$/,Ib=/(\*)([^*]*?)$/,Nb=/(_)([^_]*?)$/,wb=/(`)([^`]*?)$/,Lb=/(~~)([^~]*?)$/,Wt=/^[\s_~*`]*$/,wl=/^[\s]*[-*+][\s]+$/,Rb=/[\p{L}\p{N}_]/u,Ob=/^```[^`\n]*```?$/,Db=/^\*{4,}$/,Pb=/(__)([^_]+)_$/,vb=/(~~)([^~]+)~$/,Rs=/~~/g,Nt=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:Rb.test(e)},Mb=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},Ll=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},Pr=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},Bb=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
43
|
+
`)return!1}return!1},Rl=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?Bb(e,t):!1;if(e[n]===`
|
|
44
|
+
`)return!1}return!1},Fb=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
|
|
45
|
+
`)return!1}return!1},aa=(e,t,n)=>{let r=0;for(let o=t-1;o>=0;o-=1)if(e[o]===`
|
|
46
|
+
`){r=o+1;break}let i=e.length;for(let o=t;o<e.length;o+=1)if(e[o]===`
|
|
47
|
+
`){i=o;break}let a=e.substring(r,i),s=0,u=!1;for(let o of a)if(o===n)s+=1;else if(o!==" "&&o!==" "){u=!0;break}return s>=3&&!u},Hb=(e,t,n,r)=>n==="\\"||e.includes("$")&&Pr(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&Nt(n)&&Nt(r)||(!n||n===" "||n===" "||n===`
|
|
48
|
+
`)&&(!r||r===" "||r===" "||r===`
|
|
49
|
+
`)),Ol=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let a=i>0?e[i-1]:"",s=i<r-1?e[i+1]:"";Hb(e,i,a,s)||(t+=1)}return t},Ub=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Pr(e,t)||Rl(e,t)||Fb(e,t)||n==="_"||r==="_"||n&&r&&Nt(n)&&Nt(r)),zb=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let a=i>0?e[i-1]:"",s=i<r-1?e[i+1]:"";Ub(e,i,a,s)||(t+=1)}return t},jb=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},sa=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},Os=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},$b=(e,t,n)=>{if(!t||Wt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
50
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return wl.test(a)&&t.includes(`
|
|
51
|
+
`)?!0:aa(e,n,"*")},Yb=e=>{let t=e.match(Ab);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return ze(e,r)||It(e,r)||$b(e,n,r)?e:sa(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},qb=(e,t,n)=>{if(!t||Wt.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
52
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return wl.test(a)&&t.includes(`
|
|
53
|
+
`)?!0:aa(e,n,"_")},Vb=e=>{let t=e.match(Cb);if(!t){let i=e.match(Pb);if(i){let a=e.lastIndexOf(i[1]);if(!(ze(e,a)||It(e,a))&&Os(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return ze(e,r)||It(e,r)||qb(e,n,r)?e:Os(e)%2===1?`${e}__`:e},Wb=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!Pr(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
|
|
54
|
+
`)&&(!i||i===" "||i===" "||i===`
|
|
55
|
+
`)||r&&i&&Nt(r)&&Nt(i))continue;return n}}return-1},Gb=e=>{if(!e.match(Ib))return e;let t=Wb(e);if(t===-1||ze(e,t)||It(e,t))return e;let n=e.substring(t+1);return!n||Wt.test(n)?e:Ol(e)%2===1?`${e}*`:e},Dl=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!Pr(e,n)&&!Rl(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&Nt(r)&&Nt(i))continue;return n}}return-1},Qb=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
56
|
+
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},Xb=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(sa(t)%2!==1)return null;let n=t.indexOf("**"),r=Dl(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},Kb=e=>{if(!e.match(Nb))return e;let t=Dl(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||Wt.test(n)||ze(e,t)||It(e,t))return e;if(zb(e)%2===1){let r=Xb(e);return r!==null?r:Qb(e)}return e},Zb=e=>{let t=sa(e),n=Ol(e);return t%2===0&&n%2===0},Jb=(e,t,n)=>!t||Wt.test(t)||ze(e,n)||It(e,n)?!0:aa(e,n,"*"),eE=e=>{if(Db.test(e))return e;let t=e.match(Sb);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Jb(e,n,r)?e:jb(e)%2===1?Zb(e)?e:`${e}***`:e},tE=/<[a-zA-Z/][^>]*$/,nE=e=>{let t=e.match(tE);return!t||t.index===void 0||ze(e,t.index)?e:e.substring(0,t.index).trimEnd()},rE=e=>!e.match(Ob)||e.includes(`
|
|
57
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,iE=e=>(e.match(/```/g)||[]).length%2===1,aE=e=>{let t=rE(e);if(t!==null)return t;let n=e.match(wb);if(n&&!iE(e)){let r=n[2];if(!r||Wt.test(r))return e;if(kb(e)%2===1)return`${e}\``}return e},sE=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",uE=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!sE(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},oE=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
58
|
+
`,t)!==-1&&!e.endsWith(`
|
|
59
|
+
`)?`${e}
|
|
60
|
+
$$`:`${e}$$`},lE=e=>uE(e)%2===0?e:oE(e),cE=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=Mb(e,t);if(r===-1||ze(e,r))return null;let i=r>0&&e[r-1]==="!",a=i?r-1:r,s=e.substring(0,a);if(i)return s;let u=e.substring(r+1,t);return n==="text-only"?`${s}${u}`:`${s}[${u}](streamdown:incomplete-link)`},Ds=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!ze(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Ll(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},dE=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let s=Ds(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}if(Ll(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let s=Ds(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}return null},Pl=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!ze(e,n)){let r=cE(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!ze(e,r)){let i=dE(e,r,t);if(i!==null)return i}return e},fE=/^-{1,2}$/,hE=/^[\s]*-{1,2}[\s]+$/,pE=/^={1,2}$/,mE=/^[\s]*={1,2}[\s]+$/,gE=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
61
|
+
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(fE.test(i)&&!n.match(hE)){let a=r.split(`
|
|
62
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}if(pE.test(i)&&!n.match(mE)){let a=r.split(`
|
|
63
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}return e},bE=e=>{var t,n;let r=e.match(Lb);if(r){let i=r[2];if(!i||Wt.test(i))return e;let a=e.lastIndexOf(r[1]);if(ze(e,a)||It(e,a))return e;if(((t=e.match(Rs))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(vb);if(i){let a=e.lastIndexOf(i[0].slice(0,2));if(ze(e,a)||It(e,a))return e;if(((n=e.match(Rs))==null?void 0:n.length)%2===1)return`${e}~`}}return e},Zr=e=>e!==!1,Ve={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},EE=[{handler:{name:"comparisonOperators",handle:_b,priority:Ve.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:nE,priority:Ve.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:gE,priority:Ve.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Pl,priority:Ve.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:eE,priority:Ve.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:Yb,priority:Ve.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:Vb,priority:Ve.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:Gb,priority:Ve.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:Kb,priority:Ve.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:aE,priority:Ve.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:bE,priority:Ve.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:lE,priority:Ve.KATEX},optionKey:"katex"}],TE=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return EE.filter(({handler:r,optionKey:i})=>r.name==="links"?Zr(e==null?void 0:e.links)||Zr(e==null?void 0:e.images):Zr(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:Nl(Il({},r),{handle:a=>Pl(a,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},xE=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=TE(t),a=((n=t==null?void 0:t.handlers)!=null?n:[]).map(u=>{var o;return{handler:Nl(Il({},u),{priority:(o=u.priority)!=null?o:Ve.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((u,o)=>{var l,d;return((l=u.handler.priority)!=null?l:0)-((d=o.handler.priority)!=null?d:0)});for(let{handler:u,earlyReturn:o}of s)if(r=u.handle(r),o!=null&&o(r))return r;return r},kE=xE;const yE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_E=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,AE={};function Ps(e,t){return(AE.jsx?_E:yE).test(e)}const CE=/[ \t\n\f\r]/g;function SE(e){return typeof e=="object"?e.type==="text"?vs(e.value):!1:vs(e)}function vs(e){return e.replace(CE,"")===""}var Zt={},Jr,Ms;function IE(){if(Ms)return Jr;Ms=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
|
|
64
|
+
`,l="/",d="*",f="",p="comment",h="declaration";function g(C,y){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];y=y||{};var O=1,L=1;function B(Q){var j=Q.match(t);j&&(O+=j.length);var Y=Q.lastIndexOf(o);L=~Y?Q.length-Y:L+Q.length}function z(){var Q={line:O,column:L};return function(j){return j.position=new N(Q),G(),j}}function N(Q){this.start=Q,this.end={line:O,column:L},this.source=y.source}N.prototype.content=C;function H(Q){var j=new Error(y.source+":"+O+":"+L+": "+Q);if(j.reason=Q,j.filename=y.source,j.line=O,j.column=L,j.source=C,!y.silent)throw j}function P(Q){var j=Q.exec(C);if(j){var Y=j[0];return B(Y),C=C.slice(Y.length),j}}function G(){P(n)}function w(Q){var j;for(Q=Q||[];j=$();)j!==!1&&Q.push(j);return Q}function $(){var Q=z();if(!(l!=C.charAt(0)||d!=C.charAt(1))){for(var j=2;f!=C.charAt(j)&&(d!=C.charAt(j)||l!=C.charAt(j+1));)++j;if(j+=2,f===C.charAt(j-1))return H("End of comment missing");var Y=C.slice(2,j-2);return L+=2,B(Y),C=C.slice(j),L+=2,Q({type:p,comment:Y})}}function V(){var Q=z(),j=P(r);if(j){if($(),!P(i))return H("property missing ':'");var Y=P(a),te=Q({type:h,property:_(j[0].replace(e,f)),value:Y?_(Y[0].replace(e,f)):f});return P(s),te}}function oe(){var Q=[];w(Q);for(var j;j=V();)j!==!1&&(Q.push(j),w(Q));return Q}return G(),oe()}function _(C){return C?C.replace(u,f):f}return Jr=g,Jr}var Bs;function NE(){if(Bs)return Zt;Bs=1;var e=Zt&&Zt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.default=n;const t=e(IE());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const s=(0,t.default)(r),u=typeof i=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:d}=o;u?i(l,d,o):d&&(a=a||{},a[l]=d)}),a}return Zt}var kn={},Fs;function wE(){if(Fs)return kn;Fs=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(l){return!l||n.test(l)||e.test(l)},s=function(l,d){return d.toUpperCase()},u=function(l,d){return"".concat(d,"-")},o=function(l,d){return d===void 0&&(d={}),a(l)?l:(l=l.toLowerCase(),d.reactCompat?l=l.replace(i,u):l=l.replace(r,u),l.replace(t,s))};return kn.camelCase=o,kn}var yn,Hs;function LE(){if(Hs)return yn;Hs=1;var e=yn&&yn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(NE()),n=wE();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(u,o){u&&o&&(s[(0,n.camelCase)(u,a)]=o)}),s}return r.default=r,yn=r,yn}var RE=LE();const OE=yr(RE);function Mn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Us(e.position):"start"in e||"end"in e?Us(e):"line"in e||"column"in e?Ai(e):""}function Ai(e){return zs(e&&e.line)+":"+zs(e&&e.column)}function Us(e){return Ai(e&&e.start)+"-"+Ai(e&&e.end)}function zs(e){return e&&typeof e=="number"?e:1}class ve extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?a.ruleId=r:(a.source=r.slice(0,o),a.ruleId=r.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=Mn(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ve.prototype.file="";ve.prototype.name="";ve.prototype.reason="";ve.prototype.message="";ve.prototype.stack="";ve.prototype.column=void 0;ve.prototype.line=void 0;ve.prototype.ancestors=void 0;ve.prototype.cause=void 0;ve.prototype.fatal=void 0;ve.prototype.place=void 0;ve.prototype.ruleId=void 0;ve.prototype.source=void 0;const ua={}.hasOwnProperty,DE=new Map,PE=/[A-Z]/g,vE=new Set(["table","tbody","thead","tfoot","tr"]),ME=new Set(["td","th"]),vl="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function BE(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=qE(n,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");r=YE(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Lt:$n,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Ml(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Ml(e,t,n){if(t.type==="element")return FE(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return HE(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return zE(e,t,n);if(t.type==="mdxjsEsm")return UE(e,t);if(t.type==="root")return jE(e,t,n);if(t.type==="text")return $E(e,t)}function FE(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Lt,e.schema=i),e.ancestors.push(t);const a=Fl(e,t.tagName,!1),s=VE(e,t);let u=la(e,t);return vE.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!SE(o):!0})),Bl(e,s,a,t),oa(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function HE(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)}zn(e,t.position)}function UE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);zn(e,t.position)}function zE(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Lt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Fl(e,t.name,!0),s=WE(e,t),u=la(e,t);return Bl(e,s,a,t),oa(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function jE(e,t,n){const r={};return oa(r,la(e,t)),e.create(t,e.Fragment,r,n)}function $E(e,t){return t.value}function Bl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function oa(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function YE(e,t,n){return r;function r(i,a,s,u){const l=Array.isArray(s.children)?n:t;return u?l(a,s,u):l(a,s)}}function qE(e,t){return n;function n(r,i,a,s){const u=Array.isArray(a.children),o=lt(r);return t(i,a,s,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function VE(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ua.call(t.properties,i)){const a=GE(e,i,t.properties[i]);if(a){const[s,u]=a;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&ME.has(t.tagName)?r=u:n[s]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function WE(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else zn(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else zn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function la(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:DE;for(;++r<t.children.length;){const a=t.children[r];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 l=i.get(o)||0;s=o+"-"+l,i.set(o,l+1)}}const u=Ml(e,a,s);u!==void 0&&n.push(u)}return n}function GE(e,t,n){const r=Sr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ro(n):io(n)),r.property==="style"){let i=typeof n=="object"?n:QE(e,String(n));return e.stylePropertyNameCase==="css"&&(i=XE(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?cf[r.property]||r.property:r.attribute,n]}}function QE(e,t){try{return OE(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ve("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=vl+"#cannot-parse-style-attribute",i}}function Fl(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const u=Ps(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=s}else r=Ps(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return ua.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);zn(e)}function zn(e,t){const n=new ve("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=vl+"#cannot-handle-mdx-estrees-without-createevaluater",n}function XE(e){const t={};let n;for(n in e)ua.call(e,n)&&(t[KE(n)]=e[n]);return t}function KE(e){let t=e.replace(PE,ZE);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ZE(e){return"-"+e.toLowerCase()}const ei={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"]},JE={tokenize:eT};function eT(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),pe(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return ee(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const tT={tokenize:nT},js={tokenize:rT};function nT(e){const t=this,n=[];let r=0,i,a,s;return u;function u(L){if(r<n.length){const B=n[r];return t.containerState=B[1],e.attempt(B[0].continuation,o,l)(L)}return l(L)}function o(L){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&O();const B=t.events.length;let z=B,N;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){N=t.events[z][1].end;break}y(r);let H=B;for(;H<t.events.length;)t.events[H][1].end={...N},H++;return We(t.events,z+1,0,t.events.slice(B)),t.events.length=H,l(L)}return u(L)}function l(L){if(r===n.length){if(!i)return p(L);if(i.currentConstruct&&i.currentConstruct.concrete)return g(L);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(js,d,f)(L)}function d(L){return i&&O(),y(r),p(L)}function f(L){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(L)}function p(L){return t.containerState={},e.attempt(js,h,g)(L)}function h(L){return r++,n.push([t.currentConstruct,t.containerState]),p(L)}function g(L){if(L===null){i&&O(),y(0),e.consume(L);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),_(L)}function _(L){if(L===null){C(e.exit("chunkFlow"),!0),y(0),e.consume(L);return}return ee(L)?(e.consume(L),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(L),_)}function C(L,B){const z=t.sliceStream(L);if(B&&z.push(null),L.previous=a,a&&(a.next=L),a=L,i.defineSkip(L.start),i.write(z),t.parser.lazy[L.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<s&&(!i.events[N][1].end||i.events[N][1].end.offset>s))return;const H=t.events.length;let P=H,G,w;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(G){w=t.events[P][1].end;break}G=!0}for(y(r),N=H;N<t.events.length;)t.events[N][1].end={...w},N++;We(t.events,P+1,0,t.events.slice(H)),t.events.length=N}}function y(L){let B=n.length;for(;B-- >L;){const z=n[B];t.containerState=z[1],z[0].exit.call(t,e)}n.length=L}function O(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function rT(e,t,n){return pe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const iT={tokenize:aT};function aT(e){const t=this,n=e.attempt(Wn,r,e.attempt(this.parser.constructs.flowInitial,i,pe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Z1,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const sT={resolveAll:Ul()},uT=Hl("string"),oT=Hl("text");function Hl(e){return{resolveAll:Ul(e==="text"?lT:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(d){return l(d)?a(d):u(d)}function u(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),o}function o(d){return l(d)?(n.exit("data"),a(d)):(n.consume(d),o)}function l(d){if(d===null)return!0;const f=i[d];let p=-1;if(f)for(;++p<f.length;){const h=f[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Ul(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function lT(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,u=0,o;for(;a--;){const l=i[a];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(l===-2)o=!0,u++;else if(l!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const l={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const cT={42:Ue,43:Ue,45:Ue,48:Ue,49:Ue,50:Ue,51:Ue,52:Ue,53:Ue,54:Ue,55:Ue,56:Ue,57:Ue,62:xl},dT={91:rg},fT={[-2]:Xr,[-1]:Xr,32:Xr},hT={35:lg,42:cr,45:[Is,cr],60:hg,61:Is,95:cr,96:Cs,126:Cs},pT={38:yl,92:kl},mT={[-5]:Kr,[-4]:Kr,[-3]:Kr,33:Rg,38:yl,42:_i,60:[D1,xg],91:Dg,92:[ug,kl],93:ia,95:_i,96:V1},gT={null:[_i,sT]},bT={null:[42,95]},ET={null:[]},TT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:bT,contentInitial:dT,disable:ET,document:cT,flow:hT,flowInitial:fT,insideSpan:gT,string:pT,text:mT},Symbol.toStringTag,{value:"Module"}));function xT(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],u=[];const o={attempt:H(z),check:H(N),consume:O,enter:L,exit:B,interrupt:H(N,{interrupt:!0})},l={code:null,containerState:{},defineSkip:_,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:f};let d=t.tokenize.call(l,o);return t.resolveAll&&a.push(t),l;function f($){return s=Ke(s,$),C(),s[s.length-1]!==null?[]:(P(t,0),l.events=Dr(a,l.events,l),l.events)}function p($,V){return yT(h($),V)}function h($){return kT(s,$)}function g(){const{_bufferIndex:$,_index:V,line:oe,column:Q,offset:j}=r;return{_bufferIndex:$,_index:V,line:oe,column:Q,offset:j}}function _($){i[$.line]=$.column,w()}function C(){let $;for(;r._index<s.length;){const V=s[r._index];if(typeof V=="string")for($=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===$&&r._bufferIndex<V.length;)y(V.charCodeAt(r._bufferIndex));else y(V)}}function y($){d=d($)}function O($){ee($)?(r.line++,r.column=1,r.offset+=$===-3?2:1,w()):$!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=$}function L($,V){const oe=V||{};return oe.type=$,oe.start=g(),l.events.push(["enter",oe,l]),u.push(oe),oe}function B($){const V=u.pop();return V.end=g(),l.events.push(["exit",V,l]),V}function z($,V){P($,V.from)}function N($,V){V.restore()}function H($,V){return oe;function oe(Q,j,Y){let te,Ae,Ie,E;return Array.isArray(Q)?v(Q):"tokenize"in Q?v([Q]):A(Q);function A(X){return se;function se(ge){const re=ge!==null&&X[ge],$e=ge!==null&&X.null,Qe=[...Array.isArray(re)?re:re?[re]:[],...Array.isArray($e)?$e:$e?[$e]:[]];return v(Qe)(ge)}}function v(X){return te=X,Ae=0,X.length===0?Y:T(X[Ae])}function T(X){return se;function se(ge){return E=G(),Ie=X,X.partial||(l.currentConstruct=X),X.name&&l.parser.constructs.disable.null.includes(X.name)?J():X.tokenize.call(V?Object.assign(Object.create(l),V):l,o,W,J)(ge)}}function W(X){return $(Ie,E),j}function J(X){return E.restore(),++Ae<te.length?T(te[Ae]):Y}}}function P($,V){$.resolveAll&&!a.includes($)&&a.push($),$.resolve&&We(l.events,V,l.events.length-V,$.resolve(l.events.slice(V),l)),$.resolveTo&&(l.events=$.resolveTo(l.events,l))}function G(){const $=g(),V=l.previous,oe=l.currentConstruct,Q=l.events.length,j=Array.from(u);return{from:Q,restore:Y};function Y(){r=$,l.previous=V,l.currentConstruct=oe,l.events.length=Q,u=j,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function kT(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function yT(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
|
|
65
|
+
`;break}case-3:{s=`\r
|
|
66
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function _T(e){const r={constructs:dl([TT,...(e||{}).extensions||[]]),content:i(JE),defined:[],document:i(tT),flow:i(iT),lazy:{},string:i(uT),text:i(oT)};return r;function i(a){return s;function s(u){return xT(r,a,u)}}}function AT(e){for(;!_l(e););return e}const $s=/[\0\t\n\r]/g;function CT(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const o=[];let l,d,f,p,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if($s.lastIndex=f,l=$s.exec(a),p=l&&l.index!==void 0?l.index:a.length,h=a.charCodeAt(p),!l){t=a.slice(f);break}if(h===10&&f===p&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),f<p&&(o.push(a.slice(f,p)),e+=p-f),h){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:r=!0,e=1}f=p+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const zl={}.hasOwnProperty;function ST(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),IT(n)(AT(_T(n).document().write(CT()(e,t,!0))))}function IT(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Fe),autolinkProtocol:G,autolinkEmail:G,atxHeading:a(Qt),blockQuote:a($e),characterEscape:G,characterReference:G,codeFenced:a(Qe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Qe,s),codeText:a(dt,s),codeTextData:G,data:G,codeFlowValue:G,definition:a(Tt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(ft),hardBreakEscape:a(Xn),hardBreakTrailing:a(Xn),htmlFlow:a(de,s),htmlFlowData:G,htmlText:a(de,s),htmlTextData:G,image:a(ye),label:s,link:a(Fe),listItem:a(Ot),listItemValue:p,listOrdered:a(Je,f),listUnordered:a(Je),paragraph:a(Uc),reference:T,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(Qt),strong:a(zc),thematicBreak:a($c)},exit:{atxHeading:o(),atxHeadingSequence:z,autolink:o(),autolinkEmail:re,autolinkProtocol:ge,blockQuote:o(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:X,characterReference:se,codeFenced:o(C),codeFencedFence:_,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:w,codeIndented:o(y),codeText:o(j),codeTextData:w,data:w,definition:o(),definitionDestinationString:B,definitionLabelString:O,definitionTitleString:L,emphasis:o(),hardBreakEscape:o(V),hardBreakTrailing:o(V),htmlFlow:o(oe),htmlFlowData:w,htmlText:o(Q),htmlTextData:w,image:o(te),label:Ie,labelText:Ae,lineEnding:$,link:o(Y),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:W,resourceDestinationString:E,resourceTitleString:A,resource:v,setextHeading:o(P),setextHeadingLineSequence:H,setextHeadingText:N,strong:o(),thematicBreak:o()}};jl(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(D){let q={type:"root",children:[]};const ie={stack:[q],tokenStack:[],config:t,enter:u,exit:l,buffer:s,resume:d,data:n},he=[];let Te=-1;for(;++Te<D.length;)if(D[Te][1].type==="listOrdered"||D[Te][1].type==="listUnordered")if(D[Te][0]==="enter")he.push(Te);else{const et=he.pop();Te=i(D,et,Te)}for(Te=-1;++Te<D.length;){const et=t[D[Te][0]];zl.call(et,D[Te][1].type)&&et[D[Te][1].type].call(Object.assign({sliceSerialize:D[Te][2].sliceSerialize},ie),D[Te][1])}if(ie.tokenStack.length>0){const et=ie.tokenStack[ie.tokenStack.length-1];(et[1]||Ys).call(ie,void 0,et[0])}for(q.position={start:yt(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:yt(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},Te=-1;++Te<t.transforms.length;)q=t.transforms[Te](q)||q;return q}function i(D,q,ie){let he=q-1,Te=-1,et=!1,Dt,ht,hn,pn;for(;++he<=ie;){const Ye=D[he];switch(Ye[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ye[0]==="enter"?Te++:Te--,pn=void 0;break}case"lineEndingBlank":{Ye[0]==="enter"&&(Dt&&!pn&&!Te&&!hn&&(hn=he),pn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:pn=void 0}if(!Te&&Ye[0]==="enter"&&Ye[1].type==="listItemPrefix"||Te===-1&&Ye[0]==="exit"&&(Ye[1].type==="listUnordered"||Ye[1].type==="listOrdered")){if(Dt){let Xt=he;for(ht=void 0;Xt--;){const pt=D[Xt];if(pt[1].type==="lineEnding"||pt[1].type==="lineEndingBlank"){if(pt[0]==="exit")continue;ht&&(D[ht][1].type="lineEndingBlank",et=!0),pt[1].type="lineEnding",ht=Xt}else if(!(pt[1].type==="linePrefix"||pt[1].type==="blockQuotePrefix"||pt[1].type==="blockQuotePrefixWhitespace"||pt[1].type==="blockQuoteMarker"||pt[1].type==="listItemIndent"))break}hn&&(!ht||hn<ht)&&(Dt._spread=!0),Dt.end=Object.assign({},ht?D[ht][1].start:Ye[1].end),D.splice(ht||he,0,["exit",Dt,Ye[2]]),he++,ie++}if(Ye[1].type==="listItemPrefix"){const Xt={type:"listItem",_spread:!1,start:Object.assign({},Ye[1].start),end:void 0};Dt=Xt,D.splice(he,0,["enter",Xt,Ye[2]]),he++,ie++,hn=void 0,pn=!0}}}return D[q][1]._spread=et,ie}function a(D,q){return ie;function ie(he){u.call(this,D(he),he),q&&q.call(this,he)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(D,q,ie){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([q,ie||void 0]),D.position={start:yt(q.start),end:void 0}}function o(D){return q;function q(ie){D&&D.call(this,ie),l.call(this,ie)}}function l(D,q){const ie=this.stack.pop(),he=this.tokenStack.pop();if(he)he[0].type!==D.type&&(q?q.call(this,D,he[0]):(he[1]||Ys).call(this,D,he[0]));else throw new Error("Cannot close `"+D.type+"` ("+Mn({start:D.start,end:D.end})+"): it’s not open");ie.position.end=yt(D.end)}function d(){return ea(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(D){if(this.data.expectingFirstListItemValue){const q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function h(){const D=this.resume(),q=this.stack[this.stack.length-1];q.lang=D}function g(){const D=this.resume(),q=this.stack[this.stack.length-1];q.meta=D}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const D=this.resume(),q=this.stack[this.stack.length-1];q.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const D=this.resume(),q=this.stack[this.stack.length-1];q.value=D.replace(/(\r?\n|\r)$/g,"")}function O(D){const q=this.resume(),ie=this.stack[this.stack.length-1];ie.label=q,ie.identifier=nt(this.sliceSerialize(D)).toLowerCase()}function L(){const D=this.resume(),q=this.stack[this.stack.length-1];q.title=D}function B(){const D=this.resume(),q=this.stack[this.stack.length-1];q.url=D}function z(D){const q=this.stack[this.stack.length-1];if(!q.depth){const ie=this.sliceSerialize(D).length;q.depth=ie}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function H(D){const q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function G(D){const ie=this.stack[this.stack.length-1].children;let he=ie[ie.length-1];(!he||he.type!=="text")&&(he=jc(),he.position={start:yt(D.start),end:void 0},ie.push(he)),this.stack.push(he)}function w(D){const q=this.stack.pop();q.value+=this.sliceSerialize(D),q.position.end=yt(D.end)}function $(D){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ie=q.children[q.children.length-1];ie.position.end=yt(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(q.type)&&(G.call(this,D),w.call(this,D))}function V(){this.data.atHardBreak=!0}function oe(){const D=this.resume(),q=this.stack[this.stack.length-1];q.value=D}function Q(){const D=this.resume(),q=this.stack[this.stack.length-1];q.value=D}function j(){const D=this.resume(),q=this.stack[this.stack.length-1];q.value=D}function Y(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=q,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function te(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=q,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function Ae(D){const q=this.sliceSerialize(D),ie=this.stack[this.stack.length-2];ie.label=r1(q),ie.identifier=nt(q).toLowerCase()}function Ie(){const D=this.stack[this.stack.length-1],q=this.resume(),ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,ie.type==="link"){const he=D.children;ie.children=he}else ie.alt=q}function E(){const D=this.resume(),q=this.stack[this.stack.length-1];q.url=D}function A(){const D=this.resume(),q=this.stack[this.stack.length-1];q.title=D}function v(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function W(D){const q=this.resume(),ie=this.stack[this.stack.length-1];ie.label=q,ie.identifier=nt(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function J(D){this.data.characterReferenceType=D.type}function X(D){const q=this.sliceSerialize(D),ie=this.data.characterReferenceType;let he;ie?(he=cl(q,ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):he=na(q);const Te=this.stack[this.stack.length-1];Te.value+=he}function se(D){const q=this.stack.pop();q.position.end=yt(D.end)}function ge(D){w.call(this,D);const q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(D)}function re(D){w.call(this,D);const q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(D)}function $e(){return{type:"blockquote",children:[]}}function Qe(){return{type:"code",lang:null,meta:null,value:""}}function dt(){return{type:"inlineCode",value:""}}function Tt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ft(){return{type:"emphasis",children:[]}}function Qt(){return{type:"heading",depth:0,children:[]}}function Xn(){return{type:"break"}}function de(){return{type:"html",value:""}}function ye(){return{type:"image",title:null,url:"",alt:null}}function Fe(){return{type:"link",title:null,url:"",children:[]}}function Je(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function Ot(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function Uc(){return{type:"paragraph",children:[]}}function zc(){return{type:"strong",children:[]}}function jc(){return{type:"text",value:""}}function $c(){return{type:"thematicBreak"}}}function yt(e){return{line:e.line,column:e.column,offset:e.offset}}function jl(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?jl(e,r):NT(e,r)}}function NT(e,t){let n;for(n in t)if(zl.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ys(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Mn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Mn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Mn({start:t.start,end:t.end})+") is still open")}function wT(e){const t=this;t.parser=n;function n(r){return ST(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function LT(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function RT(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
67
|
+
`}]}function OT(e,t){const n=t.value?t.value+`
|
|
68
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};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 DT(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PT(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vT(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=fn(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,u+=1,e.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const l={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,l),e.applyData(t,l)}function MT(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BT(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function $l(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];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+=r:i.push({type:"text",value:r}),i}function FT(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return $l(e,t);const i={src:fn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function HT(e,t){const n={src:fn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function UT(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function zT(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return $l(e,t);const i={href:fn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function jT(e,t){const n={href:fn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function $T(e,t,n){const r=e.all(t),i=n?YT(n):Yl(t),a={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const d=r[u];(i||u!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
|
|
69
|
+
`}),d.type==="element"&&d.tagName==="p"&&!i?s.push(...d.children):s.push(d)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&s.push({type:"text",value:`
|
|
70
|
+
`});const l={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,l),e.applyData(t,l)}function YT(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Yl(n[r])}return t}function Yl(e){const t=e.spread;return t??e.children.length>1}function qT(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function VT(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function WT(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function GT(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QT(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=lt(t.children[1]),o=Rr(t.children[t.children.length-1]);u&&o&&(s.position={start:u,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 XT(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,u=s?s.length:t.children.length;let o=-1;const l=[];for(;++o<u;){const f=t.children[o],p={},h=s?s[o]:void 0;h&&(p.align=h);let g={type:"element",tagName:a,properties:p,children:[]};f&&(g.children=e.all(f),e.patch(f,g),g=e.applyData(f,g)),l.push(g)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,d),e.applyData(t,d)}function KT(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const qs=9,Vs=32;function ZT(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Ws(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Ws(t.slice(i),i>0,!1)),a.join("")}function Ws(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===qs||a===Vs;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===qs||a===Vs;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function JT(e,t){const n={type:"text",value:ZT(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function e2(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const t2={blockquote:LT,break:RT,code:OT,delete:DT,emphasis:PT,footnoteReference:vT,heading:MT,html:BT,imageReference:FT,image:HT,inlineCode:UT,linkReference:zT,link:jT,listItem:$T,list:qT,paragraph:VT,root:WT,strong:GT,table:QT,tableCell:KT,tableRow:XT,text:JT,thematicBreak:e2,toml:nr,yaml:nr,definition:nr,footnoteDefinition:nr};function nr(){}function n2(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function r2(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function i2(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||n2,r=e.options.footnoteBackLabel||r2,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let o=-1;for(;++o<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[o]);if(!l)continue;const d=e.all(l),f=String(l.identifier).toUpperCase(),p=fn(f.toLowerCase());let h=0;const g=[],_=e.footnoteCounts.get(f);for(;_!==void 0&&++h<=_;){g.length>0&&g.push({type:"text",value:" "});let O=typeof n=="string"?n:n(o,h);typeof O=="string"&&(O={type:"text",value:O}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,h),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const C=d[d.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const O=C.children[C.children.length-1];O&&O.type==="text"?O.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...g)}else d.push(...g);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(l,y),u.push(y)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...zt(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
71
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
72
|
+
`}]}}const Ci={}.hasOwnProperty,a2={};function s2(e,t){const n=t||a2,r=new Map,i=new Map,a=new Map,s={...t2,...n.handlers},u={all:l,applyData:o2,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:o,options:n,patch:u2,wrap:c2};return ot(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?r:i,p=String(d.identifier).toUpperCase();f.has(p)||f.set(p,d)}}),u;function o(d,f){const p=d.type,h=u.handlers[p];if(Ci.call(u.handlers,p)&&h)return h(u,d,f);if(u.options.passThrough&&u.options.passThrough.includes(p)){if("children"in d){const{children:_,...C}=d,y=zt(C);return y.children=u.all(d),y}return zt(d)}return(u.options.unknownHandler||l2)(u,d,f)}function l(d){const f=[];if("children"in d){const p=d.children;let h=-1;for(;++h<p.length;){const g=u.one(p[h],d);if(g){if(h&&p[h-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Gs(g.value)),!Array.isArray(g)&&g.type==="element")){const _=g.children[0];_&&_.type==="text"&&(_.value=Gs(_.value))}Array.isArray(g)?f.push(...g):f.push(g)}}}return f}}function u2(e,t){e.position&&(t.position=Ho(e))}function o2(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,zt(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function l2(e,t){const n=t.data||{},r="value"in t&&!(Ci.call(n,"hProperties")||Ci.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function c2(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
73
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
74
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
75
|
+
`}),n}function Gs(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Qs(e,t){const n=s2(e,t),r=n.one(e,void 0),i=i2(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
76
|
+
`},i),a}function d2(e,t){return e&&"run"in e?async function(n,r){const i=Qs(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Qs(n,{file:r,...e||t})}}function Xs(e){if(e)throw e}var ti,Ks;function f2(){if(Ks)return ti;Ks=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},a=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var d=e.call(l,"constructor"),f=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!d&&!f)return!1;var p;for(p in l);return typeof p>"u"||e.call(l,p)},s=function(l,d){n&&d.name==="__proto__"?n(l,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):l[d.name]=d.newValue},u=function(l,d){if(d==="__proto__")if(e.call(l,d)){if(r)return r(l,d).value}else return;return l[d]};return ti=function o(){var l,d,f,p,h,g,_=arguments[0],C=1,y=arguments.length,O=!1;for(typeof _=="boolean"&&(O=_,_=arguments[1]||{},C=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});C<y;++C)if(l=arguments[C],l!=null)for(d in l)f=u(_,d),p=u(l,d),_!==p&&(O&&p&&(a(p)||(h=i(p)))?(h?(h=!1,g=f&&i(f)?f:[]):g=f&&a(f)?f:{},s(_,{name:d,newValue:o(O,g,p)})):typeof p<"u"&&s(_,{name:d,newValue:p}));return _},ti}var h2=f2();const ni=yr(h2);function Si(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 p2(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...i);function u(o,...l){const d=e[++a];let f=-1;if(o){s(o);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,d?m2(d,u)(...l):s(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function m2(e,t){let n;return r;function r(...s){const u=e.length>s.length;let o;u&&s.push(i);try{o=e.apply(this,s)}catch(l){const d=l;if(u&&n)throw d;return i(d)}u||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(s,...u){n||(n=!0,t(s,...u))}function a(s){i(null,s)}}const st={basename:g2,dirname:b2,extname:E2,join:T2,sep:"/"};function g2(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Gn(e);let n=0,r=-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){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function b2(e){if(Gn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function E2(e){Gn(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function T2(...e){let t=-1,n;for(;++t<e.length;)Gn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":x2(n)}function x2(e){Gn(e);const t=e.codePointAt(0)===47;let n=k2(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function k2(e,t){let n="",r=0,i=-1,a=0,s=-1,u,o;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else u===46&&a>-1?a++:a=-1}return n}function Gn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const y2={cwd:_2};function _2(){return"/"}function Ii(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function A2(e){if(typeof e=="string")e=new URL(e);else if(!Ii(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 C2(e)}function C2(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===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)}const ri=["history","path","basename","stem","extname","dirname"];class S2{constructor(t){let n;t?Ii(t)?n={path:t}:typeof t=="string"||I2(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":y2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ri.length;){const a=ri[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)ri.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?st.basename(this.path):void 0}set basename(t){ai(t,"basename"),ii(t,"basename"),this.path=st.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?st.dirname(this.path):void 0}set dirname(t){Zs(this.basename,"dirname"),this.path=st.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?st.extname(this.path):void 0}set extname(t){if(ii(t,"extname"),Zs(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=st.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ii(t)&&(t=A2(t)),ai(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?st.basename(this.path,this.extname):void 0}set stem(t){ai(t,"stem"),ii(t,"stem"),this.path=st.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ve(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ii(e,t){if(e&&e.includes(st.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+st.sep+"`")}function ai(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Zs(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function I2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const N2=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),w2={}.hasOwnProperty;class ca extends N2{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=p2()}copy(){const t=new ca;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ni(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(oi("data",this.frozen),this.namespace[t]=n,this):w2.call(this.namespace,t)&&this.namespace[t]||void 0:t?(oi("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[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=rr(t),r=this.parser||this.Parser;return si("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),si("process",this.parser||this.Parser),ui("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const u=rr(t),o=r.parse(u);r.run(o,u,function(d,f,p){if(d||!f||!p)return l(d);const h=f,g=r.stringify(h,p);O2(g)?p.value=g:p.result=g,l(d,p)});function l(d,f){d||!f?s(d):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),si("processSync",this.parser||this.Parser),ui("processSync",this.compiler||this.Compiler),this.process(t,i),eu("processSync","process",n),r;function i(a,s){n=!0,Xs(a),r=s}}run(t,n,r){Js(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,u){const o=rr(n);i.run(t,o,l);function l(d,f,p){const h=f||t;d?u(d):s?s(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),eu("runSync","run",r),i;function a(s,u){Xs(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=rr(n),i=this.compiler||this.Compiler;return ui("stringify",i),Js(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(oi("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")o(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[d,...f]=l;o(d,f)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))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");u(l.plugins),l.settings&&(i.settings=ni(!0,i.settings,l.settings))}function u(l){let d=-1;if(l!=null)if(Array.isArray(l))for(;++d<l.length;){const f=l[d];a(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function o(l,d){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===l){p=f;break}if(p===-1)r.push([l,...d]);else if(d.length>0){let[h,...g]=d;const _=r[p][1];Si(_)&&Si(h)&&(h=ni(!0,_,h)),r[p]=[l,h,...g]}}}}const L2=new ca().freeze();function si(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ui(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function oi(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 Js(e){if(!Si(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function eu(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function rr(e){return R2(e)?e:new S2(e)}function R2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function O2(e){return typeof e=="string"||D2(e)}function D2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function da(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Gt=da();function ql(e){Gt=e}var Ft={exec:()=>null};function me(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Be.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var P2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Be={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},v2=/^(?:[ \t]*(?:\n|$))+/,M2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,B2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Qn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,F2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fa=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Vl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wl=me(Vl).replace(/bull/g,fa).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),H2=me(Vl).replace(/bull/g,fa).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ha=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,U2=/^[^\n]+/,pa=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,z2=me(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",pa).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),j2=me(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fa).getRegex(),vr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ma=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$2=me("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ma).replace("tag",vr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gl=me(ha).replace("hr",Qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vr).getRegex(),Y2=me(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Gl).getRegex(),ga={blockquote:Y2,code:M2,def:z2,fences:B2,heading:F2,hr:Qn,html:$2,lheading:Wl,list:j2,newline:v2,paragraph:Gl,table:Ft,text:U2},tu=me("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vr).getRegex(),q2={...ga,lheading:H2,table:tu,paragraph:me(ha).replace("hr",Qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",tu).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vr).getRegex()},V2={...ga,html:me(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ma).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:Ft,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:me(ha).replace("hr",Qn).replace("heading",` *#{1,6} *[^
|
|
77
|
+
]`).replace("lheading",Wl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},W2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,G2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ql=/^( {2,}|\\)\n(?!\s*$)/,Q2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Mr=/[\p{P}\p{S}]/u,ba=/[\s\p{P}\p{S}]/u,Xl=/[^\s\p{P}\p{S}]/u,X2=me(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ba).getRegex(),Kl=/(?!~)[\p{P}\p{S}]/u,K2=/(?!~)[\s\p{P}\p{S}]/u,Z2=/(?:[^\s\p{P}\p{S}]|~)/u,Zl=/(?![*_])[\p{P}\p{S}]/u,J2=/(?![*_])[\s\p{P}\p{S}]/u,ex=/(?:[^\s\p{P}\p{S}]|[*_])/u,tx=me(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",P2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Jl=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,nx=me(Jl,"u").replace(/punct/g,Mr).getRegex(),rx=me(Jl,"u").replace(/punct/g,Kl).getRegex(),ec="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ix=me(ec,"gu").replace(/notPunctSpace/g,Xl).replace(/punctSpace/g,ba).replace(/punct/g,Mr).getRegex(),ax=me(ec,"gu").replace(/notPunctSpace/g,Z2).replace(/punctSpace/g,K2).replace(/punct/g,Kl).getRegex(),sx=me("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Xl).replace(/punctSpace/g,ba).replace(/punct/g,Mr).getRegex(),ux=me(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Zl).getRegex(),ox="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",lx=me(ox,"gu").replace(/notPunctSpace/g,ex).replace(/punctSpace/g,J2).replace(/punct/g,Zl).getRegex(),cx=me(/\\(punct)/,"gu").replace(/punct/g,Mr).getRegex(),dx=me(/^<(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(),fx=me(ma).replace("(?:-->|$)","-->").getRegex(),hx=me("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",fx).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Tr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,px=me(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Tr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tc=me(/^!?\[(label)\]\[(ref)\]/).replace("label",Tr).replace("ref",pa).getRegex(),nc=me(/^!?\[(ref)\](?:\[\])?/).replace("ref",pa).getRegex(),mx=me("reflink|nolink(?!\\()","g").replace("reflink",tc).replace("nolink",nc).getRegex(),nu=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ea={_backpedal:Ft,anyPunctuation:cx,autolink:dx,blockSkip:tx,br:Ql,code:G2,del:Ft,delLDelim:Ft,delRDelim:Ft,emStrongLDelim:nx,emStrongRDelimAst:ix,emStrongRDelimUnd:sx,escape:W2,link:px,nolink:nc,punctuation:X2,reflink:tc,reflinkSearch:mx,tag:hx,text:Q2,url:Ft},gx={...Ea,link:me(/^!?\[(label)\]\((.*?)\)/).replace("label",Tr).getRegex(),reflink:me(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Tr).getRegex()},Ni={...Ea,emStrongRDelimAst:ax,emStrongLDelim:rx,delLDelim:ux,delRDelim:lx,url:me(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",nu).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:me(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",nu).getRegex()},bx={...Ni,br:me(Ql).replace("{2,}","*").getRegex(),text:me(Ni.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ir={normal:ga,gfm:q2,pedantic:V2},_n={normal:Ea,gfm:Ni,breaks:bx,pedantic:gx},Ex={"&":"&","<":"<",">":">",'"':""","'":"'"},ru=e=>Ex[e];function at(e,t){if(t){if(Be.escapeTest.test(e))return e.replace(Be.escapeReplace,ru)}else if(Be.escapeTestNoEncode.test(e))return e.replace(Be.escapeReplaceNoEncode,ru);return e}function iu(e){try{e=encodeURI(e).replace(Be.percentDecode,"%")}catch{return null}return e}function au(e,t){var a;let n=e.replace(Be.findPipe,(s,u,o)=>{let l=!1,d=u;for(;--d>=0&&o[d]==="\\";)l=!l;return l?"|":" |"}),r=n.split(Be.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((a=r.at(-1))!=null&&a.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(Be.slashPipe,"|");return r}function An(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function Tx(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function xx(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let a=4-n%4;r+=" ".repeat(a),n+=a}else r+=i,n++;return r}function su(e,t,n,r,i){let a=t.href,s=t.title||null,u=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:s,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,o}function kx(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
78
|
+
`).map(a=>{let s=a.match(n.other.beginningSpace);if(s===null)return a;let[u]=s;return u.length>=i.length?a.slice(i.length):a}).join(`
|
|
79
|
+
`)}var xr=class{constructor(e){be(this,"options");be(this,"rules");be(this,"lexer");this.options=e||Gt}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 n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:An(n,`
|
|
80
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=kx(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=An(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:An(t[0],`
|
|
81
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=An(t[0],`
|
|
82
|
+
`).split(`
|
|
83
|
+
`),r="",i="",a=[];for(;n.length>0;){let s=!1,u=[],o;for(o=0;o<n.length;o++)if(this.rules.other.blockquoteStart.test(n[o]))u.push(n[o]),s=!0;else if(!s)u.push(n[o]);else break;n=n.slice(o);let l=u.join(`
|
|
84
|
+
`),d=l.replace(this.rules.other.blockquoteSetextReplace,`
|
|
85
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
86
|
+
${l}`:l,i=i?`${i}
|
|
87
|
+
${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=f,n.length===0)break;let p=a.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let h=p,g=h.raw+`
|
|
88
|
+
`+n.join(`
|
|
89
|
+
`),_=this.blockquote(g);a[a.length-1]=_,r=r.substring(0,r.length-h.raw.length)+_.raw,i=i.substring(0,i.length-h.text.length)+_.text;break}else if((p==null?void 0:p.type)==="list"){let h=p,g=h.raw+`
|
|
90
|
+
`+n.join(`
|
|
91
|
+
`),_=this.list(g);a[a.length-1]=_,r=r.substring(0,r.length-p.raw.length)+_.raw,i=i.substring(0,i.length-h.raw.length)+_.raw,n=g.substring(a.at(-1).raw.length).split(`
|
|
92
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:a,text:i}}}list(e){var n,r;let t=this.rules.block.list.exec(e);if(t){let 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 u=this.rules.other.listItemRegex(i),o=!1;for(;e;){let d=!1,f="",p="";if(!(t=u.exec(e))||this.rules.block.hr.test(e))break;f=t[0],e=e.substring(f.length);let h=xx(t[2].split(`
|
|
93
|
+
`,1)[0],t[1].length),g=e.split(`
|
|
94
|
+
`,1)[0],_=!h.trim(),C=0;if(this.options.pedantic?(C=2,p=h.trimStart()):_?C=t[1].length+1:(C=h.search(this.rules.other.nonSpaceChar),C=C>4?1:C,p=h.slice(C),C+=t[1].length),_&&this.rules.other.blankLine.test(g)&&(f+=g+`
|
|
95
|
+
`,e=e.substring(g.length+1),d=!0),!d){let y=this.rules.other.nextBulletRegex(C),O=this.rules.other.hrRegex(C),L=this.rules.other.fencesBeginRegex(C),B=this.rules.other.headingBeginRegex(C),z=this.rules.other.htmlBeginRegex(C),N=this.rules.other.blockquoteBeginRegex(C);for(;e;){let H=e.split(`
|
|
96
|
+
`,1)[0],P;if(g=H,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),P=g):P=g.replace(this.rules.other.tabCharGlobal," "),L.test(g)||B.test(g)||z.test(g)||N.test(g)||y.test(g)||O.test(g))break;if(P.search(this.rules.other.nonSpaceChar)>=C||!g.trim())p+=`
|
|
97
|
+
`+P.slice(C);else{if(_||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||L.test(h)||B.test(h)||O.test(h))break;p+=`
|
|
98
|
+
`+g}_=!g.trim(),f+=H+`
|
|
99
|
+
`,e=e.substring(H.length+1),h=P.slice(C)}}s.loose||(o?s.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(o=!0)),s.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),s.raw+=f}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let d of s.items){if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),d.task){if(d.text=d.text.replace(this.rules.other.listReplaceTask,""),((n=d.tokens[0])==null?void 0:n.type)==="text"||((r=d.tokens[0])==null?void 0:r.type)==="paragraph"){d.tokens[0].raw=d.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),d.tokens[0].text=d.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}}let f=this.rules.other.listTaskCheckbox.exec(d.raw);if(f){let p={type:"checkbox",raw:f[0]+" ",checked:f[0]!=="[ ]"};d.checked=p.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=p.raw+d.tokens[0].raw,d.tokens[0].text=p.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(p)):d.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):d.tokens.unshift(p)}}if(!s.loose){let f=d.tokens.filter(h=>h.type==="space"),p=f.length>0&&f.some(h=>this.rules.other.anyLine.test(h.raw));s.loose=p}}if(s.loose)for(let d of s.items){d.loose=!0;for(let f of d.tokens)f.type==="text"&&(f.type="paragraph")}return s}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){var s;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=au(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(s=t[3])!=null&&s.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
100
|
+
`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let u of r)this.rules.other.tableAlignRight.test(u)?a.align.push("right"):this.rules.other.tableAlignCenter.test(u)?a.align.push("center"):this.rules.other.tableAlignLeft.test(u)?a.align.push("left"):a.align.push(null);for(let u=0;u<n.length;u++)a.header.push({text:n[u],tokens:this.lexer.inline(n[u]),header:!0,align:a.align[u]});for(let u of i)a.rows.push(au(u,a.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:a.align[l]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
101
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=An(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=Tx(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),su(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return su(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,u=i,o=0,l=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);(r=l.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(s=[...a].length,r[3]||r[4]){u+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){o+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u+o);let d=[...r[0]][0].length,f=e.slice(0,i+r.index+d+s);if(Math.min(i,s)%2){let h=f.slice(1,-1);return{type:"em",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,u=i,o=this.rules.inline.delRDelim;for(o.lastIndex=0,t=t.slice(-1*e.length+i);(r=o.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a||(s=[...a].length,s!==i))continue;if(r[3]||r[4]){u+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u);let l=[...r[0]][0].length,d=e.slice(0,i+r.index+l+s),f=d.slice(i,-i);return{type:"del",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let a;do a=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(a!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Ze=class wi{constructor(t){be(this,"tokens");be(this,"options");be(this,"state");be(this,"inlineQueue");be(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Gt,this.options.tokenizer=this.options.tokenizer||new xr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Be,block:ir.normal,inline:_n.normal};this.options.pedantic?(n.block=ir.pedantic,n.inline=_n.pedantic):this.options.gfm&&(n.block=ir.gfm,this.options.breaks?n.inline=_n.breaks:n.inline=_n.gfm),this.tokenizer.rules=n}static get rules(){return{block:ir,inline:_n}}static lex(t,n){return new wi(n).lex(t)}static lexInline(t,n){return new wi(n).inlineTokens(t)}lex(t){t=t.replace(Be.carriageReturn,`
|
|
102
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var i,a,s;for(this.options.pedantic&&(t=t.replace(Be.tabCharGlobal," ").replace(Be.spaceLine,""));t;){let u;if((a=(i=this.options.extensions)==null?void 0:i.block)!=null&&a.some(l=>(u=l.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.space(t)){t=t.substring(u.raw.length);let l=n.at(-1);u.raw.length===1&&l!==void 0?l.raw+=`
|
|
103
|
+
`:n.push(u);continue}if(u=this.tokenizer.code(t)){t=t.substring(u.raw.length);let l=n.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
|
|
104
|
+
`)?"":`
|
|
105
|
+
`)+u.raw,l.text+=`
|
|
106
|
+
`+u.text,this.inlineQueue.at(-1).src=l.text):n.push(u);continue}if(u=this.tokenizer.fences(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.heading(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.hr(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.blockquote(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.list(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.html(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.def(t)){t=t.substring(u.raw.length);let l=n.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
|
|
107
|
+
`)?"":`
|
|
108
|
+
`)+u.raw,l.text+=`
|
|
109
|
+
`+u.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[u.tag]||(this.tokens.links[u.tag]={href:u.href,title:u.title},n.push(u));continue}if(u=this.tokenizer.table(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.lheading(t)){t=t.substring(u.raw.length),n.push(u);continue}let o=t;if((s=this.options.extensions)!=null&&s.startBlock){let l=1/0,d=t.slice(1),f;this.options.extensions.startBlock.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(l=Math.min(l,f))}),l<1/0&&l>=0&&(o=t.substring(0,l+1))}if(this.state.top&&(u=this.tokenizer.paragraph(o))){let l=n.at(-1);r&&(l==null?void 0:l.type)==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
110
|
+
`)?"":`
|
|
111
|
+
`)+u.raw,l.text+=`
|
|
112
|
+
`+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(u),r=o.length!==t.length,t=t.substring(u.raw.length);continue}if(u=this.tokenizer.text(t)){t=t.substring(u.raw.length);let l=n.at(-1);(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
|
|
113
|
+
`)?"":`
|
|
114
|
+
`)+u.raw,l.text+=`
|
|
115
|
+
`+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(u);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var o,l,d,f,p;let r=t,i=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)h.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)a=i[2]?i[2].length:0,r=r.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((l=(o=this.options.hooks)==null?void 0:o.emStrongMask)==null?void 0:l.call({lexer:this},r))??r;let s=!1,u="";for(;t;){s||(u=""),s=!1;let h;if((f=(d=this.options.extensions)==null?void 0:d.inline)!=null&&f.some(_=>(h=_.call({lexer:this},t,n))?(t=t.substring(h.raw.length),n.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);let _=n.at(-1);h.type==="text"&&(_==null?void 0:_.type)==="text"?(_.raw+=h.raw,_.text+=h.text):n.push(h);continue}if(h=this.tokenizer.emStrong(t,r,u)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.del(t,r,u)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),n.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),n.push(h);continue}let g=t;if((p=this.options.extensions)!=null&&p.startInline){let _=1/0,C=t.slice(1),y;this.options.extensions.startInline.forEach(O=>{y=O.call({lexer:this},C),typeof y=="number"&&y>=0&&(_=Math.min(_,y))}),_<1/0&&_>=0&&(g=t.substring(0,_+1))}if(h=this.tokenizer.inlineText(g)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(u=h.raw.slice(-1)),s=!0;let _=n.at(-1);(_==null?void 0:_.type)==="text"?(_.raw+=h.raw,_.text+=h.text):n.push(h);continue}if(t){let _="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(_);break}else throw new Error(_)}}return n}},kr=class{constructor(t){be(this,"options");be(this,"parser");this.options=t||Gt}space(t){return""}code({text:t,lang:n,escaped:r}){var s;let i=(s=(n||"").match(Be.notSpaceStart))==null?void 0:s[0],a=t.replace(Be.endingNewline,"")+`
|
|
116
|
+
`;return i?'<pre><code class="language-'+at(i)+'">'+(r?a:at(a,!0))+`</code></pre>
|
|
117
|
+
`:"<pre><code>"+(r?a:at(a,!0))+`</code></pre>
|
|
118
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
119
|
+
${this.parser.parse(t)}</blockquote>
|
|
120
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
121
|
+
`}hr(t){return`<hr>
|
|
122
|
+
`}list(t){let n=t.ordered,r=t.start,i="";for(let u=0;u<t.items.length;u++){let o=t.items[u];i+=this.listitem(o)}let a=n?"ol":"ul",s=n&&r!==1?' start="'+r+'"':"";return"<"+a+s+`>
|
|
123
|
+
`+i+"</"+a+`>
|
|
124
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
125
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
126
|
+
`}table(t){let n="",r="";for(let a=0;a<t.header.length;a++)r+=this.tablecell(t.header[a]);n+=this.tablerow({text:r});let i="";for(let a=0;a<t.rows.length;a++){let s=t.rows[a];r="";for(let u=0;u<s.length;u++)r+=this.tablecell(s[u]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
127
|
+
<thead>
|
|
128
|
+
`+n+`</thead>
|
|
129
|
+
`+i+`</table>
|
|
130
|
+
`}tablerow({text:t}){return`<tr>
|
|
131
|
+
${t}</tr>
|
|
132
|
+
`}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`</${r}>
|
|
133
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${at(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let i=this.parser.parseInline(r),a=iu(t);if(a===null)return i;t=a;let s='<a href="'+t+'"';return n&&(s+=' title="'+at(n)+'"'),s+=">"+i+"</a>",s}image({href:t,title:n,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let a=iu(t);if(a===null)return at(r);t=a;let s=`<img src="${t}" alt="${at(r)}"`;return n&&(s+=` title="${at(n)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:at(t.text)}},Ta=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},tt=class Li{constructor(t){be(this,"options");be(this,"renderer");be(this,"textRenderer");this.options=t||Gt,this.options.renderer=this.options.renderer||new kr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ta}static parse(t,n){return new Li(n).parse(t)}static parseInline(t,n){return new Li(n).parseInline(t)}parse(t){var r,i;let n="";for(let a=0;a<t.length;a++){let s=t[a];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[s.type]){let o=s,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){n+=l||"";continue}}let u=s;switch(u.type){case"space":{n+=this.renderer.space(u);break}case"hr":{n+=this.renderer.hr(u);break}case"heading":{n+=this.renderer.heading(u);break}case"code":{n+=this.renderer.code(u);break}case"table":{n+=this.renderer.table(u);break}case"blockquote":{n+=this.renderer.blockquote(u);break}case"list":{n+=this.renderer.list(u);break}case"checkbox":{n+=this.renderer.checkbox(u);break}case"html":{n+=this.renderer.html(u);break}case"def":{n+=this.renderer.def(u);break}case"paragraph":{n+=this.renderer.paragraph(u);break}case"text":{n+=this.renderer.text(u);break}default:{let o='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}parseInline(t,n=this.renderer){var i,a;let r="";for(let s=0;s<t.length;s++){let u=t[s];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[u.type]){let l=this.options.extensions.renderers[u.type].call({parser:this},u);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(u.type)){r+=l||"";continue}}let o=u;switch(o.type){case"escape":{r+=n.text(o);break}case"html":{r+=n.html(o);break}case"link":{r+=n.link(o);break}case"image":{r+=n.image(o);break}case"checkbox":{r+=n.checkbox(o);break}case"strong":{r+=n.strong(o);break}case"em":{r+=n.em(o);break}case"codespan":{r+=n.codespan(o);break}case"br":{r+=n.br(o);break}case"del":{r+=n.del(o);break}case"text":{r+=n.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},ur,In=(ur=class{constructor(e){be(this,"options");be(this,"block");this.options=e||Gt}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Ze.lex:Ze.lexInline}provideParser(){return this.block?tt.parse:tt.parseInline}},be(ur,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),be(ur,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),ur),yx=class{constructor(...t){be(this,"defaults",da());be(this,"options",this.setOptions);be(this,"parse",this.parseMarkdown(!0));be(this,"parseInline",this.parseMarkdown(!1));be(this,"Parser",tt);be(this,"Renderer",kr);be(this,"TextRenderer",Ta);be(this,"Lexer",Ze);be(this,"Tokenizer",xr);be(this,"Hooks",In);this.use(...t)}walkTokens(t,n){var i,a;let r=[];for(let s of t)switch(r=r.concat(n.call(this,s)),s.type){case"table":{let u=s;for(let o of u.header)r=r.concat(this.walkTokens(o.tokens,n));for(let o of u.rows)for(let l of o)r=r.concat(this.walkTokens(l.tokens,n));break}case"list":{let u=s;r=r.concat(this.walkTokens(u.items,n));break}default:{let u=s;(a=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&a[u.type]?this.defaults.extensions.childTokens[u.type].forEach(o=>{let l=u[o].flat(1/0);r=r.concat(this.walkTokens(l,n))}):u.tokens&&(r=r.concat(this.walkTokens(u.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=n.renderers[a.name];s?n.renderers[a.name]=function(...u){let o=a.renderer.apply(this,u);return o===!1&&(o=s.apply(this,u)),o}:n.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=n[a.level];s?s.unshift(a.tokenizer):n[a.level]=[a.tokenizer],a.start&&(a.level==="block"?n.startBlock?n.startBlock.push(a.start):n.startBlock=[a.start]:a.level==="inline"&&(n.startInline?n.startInline.push(a.start):n.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(n.childTokens[a.name]=a.childTokens)}),i.extensions=n),r.renderer){let a=this.defaults.renderer||new kr(this.defaults);for(let s in r.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let u=s,o=r.renderer[u],l=a[u];a[u]=(...d)=>{let f=o.apply(a,d);return f===!1&&(f=l.apply(a,d)),f||""}}i.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new xr(this.defaults);for(let s in r.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let u=s,o=r.tokenizer[u],l=a[u];a[u]=(...d)=>{let f=o.apply(a,d);return f===!1&&(f=l.apply(a,d)),f}}i.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new In;for(let s in r.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let u=s,o=r.hooks[u],l=a[u];In.passThroughHooks.has(s)?a[u]=d=>{if(this.defaults.async&&In.passThroughHooksRespectAsync.has(s))return(async()=>{let p=await o.call(a,d);return l.call(a,p)})();let f=o.call(a,d);return l.call(a,f)}:a[u]=(...d)=>{if(this.defaults.async)return(async()=>{let p=await o.apply(a,d);return p===!1&&(p=await l.apply(a,d)),p})();let f=o.apply(a,d);return f===!1&&(f=l.apply(a,d)),f}}i.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,s=r.walkTokens;i.walkTokens=function(u){let o=[];return o.push(s.call(this,u)),a&&(o=o.concat(a.call(this,u))),o}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Ze.lex(t,n??this.defaults)}parser(t,n){return tt.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(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 n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let u=a.hooks?await a.hooks.preprocess(n):n,o=await(a.hooks?await a.hooks.provideLexer():t?Ze.lex:Ze.lexInline)(u,a),l=a.hooks?await a.hooks.processAllTokens(o):o;a.walkTokens&&await Promise.all(this.walkTokens(l,a.walkTokens));let d=await(a.hooks?await a.hooks.provideParser():t?tt.parse:tt.parseInline)(l,a);return a.hooks?await a.hooks.postprocess(d):d})().catch(s);try{a.hooks&&(n=a.hooks.preprocess(n));let u=(a.hooks?a.hooks.provideLexer():t?Ze.lex:Ze.lexInline)(n,a);a.hooks&&(u=a.hooks.processAllTokens(u)),a.walkTokens&&this.walkTokens(u,a.walkTokens);let o=(a.hooks?a.hooks.provideParser():t?tt.parse:tt.parseInline)(u,a);return a.hooks&&(o=a.hooks.postprocess(o)),o}catch(u){return s(u)}}}onError(t,n){return r=>{if(r.message+=`
|
|
134
|
+
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+at(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},$t=new yx;function Ee(e,t){return $t.parse(e,t)}Ee.options=Ee.setOptions=function(e){return $t.setOptions(e),Ee.defaults=$t.defaults,ql(Ee.defaults),Ee};Ee.getDefaults=da;Ee.defaults=Gt;Ee.use=function(...e){return $t.use(...e),Ee.defaults=$t.defaults,ql(Ee.defaults),Ee};Ee.walkTokens=function(e,t){return $t.walkTokens(e,t)};Ee.parseInline=$t.parseInline;Ee.Parser=tt;Ee.parser=tt.parse;Ee.Renderer=kr;Ee.TextRenderer=Ta;Ee.Lexer=Ze;Ee.lexer=Ze.lex;Ee.Tokenizer=xr;Ee.Hooks=In;Ee.parse=Ee;Ee.options;Ee.setOptions;Ee.use;Ee.walkTokens;Ee.parseInline;tt.parse;Ze.lex;var _x=300,Ax="300px",Cx=500;function Sx(e={}){let{immediate:t=!1,debounceDelay:n=_x,rootMargin:r=Ax,idleTimeout:i=Cx}=e,[a,s]=I.useState(!1),u=I.useRef(null),o=I.useRef(null),l=I.useRef(null),d=I.useMemo(()=>h=>{let g=Date.now();return window.setTimeout(()=>{h({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-g))})},1)},[]),f=I.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(h,g)=>window.requestIdleCallback(h,g):d,[d]),p=I.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?h=>window.cancelIdleCallback(h):h=>{clearTimeout(h)},[]);return I.useEffect(()=>{if(t){s(!0);return}let h=u.current;if(!h)return;o.current&&(clearTimeout(o.current),o.current=null),l.current&&(p(l.current),l.current=null);let g=()=>{o.current&&(clearTimeout(o.current),o.current=null),l.current&&(p(l.current),l.current=null)},_=L=>{l.current=f(B=>{B.timeRemaining()>0||B.didTimeout?(s(!0),L.disconnect()):l.current=f(()=>{s(!0),L.disconnect()},{timeout:i/2})},{timeout:i})},C=L=>{g(),o.current=window.setTimeout(()=>{var B,z;let N=L.takeRecords();(N.length===0||(z=(B=N.at(-1))==null?void 0:B.isIntersecting)!=null&&z)&&_(L)},n)},y=(L,B)=>{L.isIntersecting?C(B):g()},O=new IntersectionObserver(L=>{for(let B of L)y(B,O)},{rootMargin:r,threshold:0});return O.observe(h),()=>{o.current&&clearTimeout(o.current),l.current&&p(l.current),O.disconnect()}},[t,n,r,i,p,f]),{shouldRender:a,containerRef:u}}var rc=/\s/,Ix=/^\s+$/,Nx=new Set(["code","pre","svg","math","annotation"]),wx=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",Lx=e=>e.some(t=>wx(t)&&Nx.has(t.tagName)),Rx=e=>{let t=[],n="",r=!1;for(let i of e){let a=rc.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},Ox=e=>{let t=[],n="";for(let r of e)rc.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},Dx=(e,t,n,r,i)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:i?`--sd-animation:sd-${t};--sd-duration:0ms;--sd-easing:${r}`:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),Px=(e,t,n,r,i)=>{let a=t.at(-1);if(!(a&&"children"in a))return;if(Lx(t))return en;let s=a,u=s.children.indexOf(e);if(u===-1)return;let o=e.value;if(!o.trim()){i.count+=o.length;return}let l=n.sep==="char"?Ox(o):Rx(o),d=r.prevContentLength,f=l.map(p=>{let h=i.count;if(i.count+=p.length,Ix.test(p))return{type:"text",value:p};let g=d>0&&h<d;return Dx(p,n.animation,n.duration,n.easing,g)});return s.children.splice(u,1,...f),u+f.length},vx=0;function Ri(e){var t,n,r,i;let a={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(r=e==null?void 0:e.easing)!=null?r:"ease",sep:(i=e==null?void 0:e.sep)!=null?i:"word"},s={prevContentLength:0,lastRenderCharCount:0},u=vx++,o=()=>l=>{let d={count:0};zi(l,"text",(f,p)=>Px(f,p,a,s,d)),s.lastRenderCharCount=d.count,s.prevContentLength=0};return Object.defineProperty(o,"name",{value:`rehypeAnimate$${u}`}),{name:"animate",type:"animate",rehypePlugin:o,setPrevContentLength(l){s.prevContentLength=l},getLastRenderCharCount(){let l=s.lastRenderCharCount;return s.lastRenderCharCount=0,l}}}Ri();var ic=I.createContext(!1),Mx=()=>I.useContext(ic),xa=(...e)=>$u(Nu(e)),Bx=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},Fx=e=>e?(...t)=>Bx(e,$u(Nu(t))):xa,rn=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},Oi=I.createContext(xa),ce=()=>I.useContext(Oi),Hx=xa("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"),Ux=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();i&&a&&(t[i]=a)}}return t},zx=I.memo(({children:e,result:t,language:n,className:r,startLine:i,...a})=>{let s=ce(),u=I.useMemo(()=>s(Hx),[s]),o=I.useMemo(()=>{let l={};return t.bg&&(l["--sdm-bg"]=t.bg),t.fg&&(l["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(l,Ux(t.rootStyle)),l},[t.bg,t.fg,t.rootStyle]);return k.jsx("div",{className:s(r,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...a,children:k.jsx("pre",{className:s(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:o,children:k.jsx("code",{className:s("[counter-increment:line_0] [counter-reset:line]"),style:i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((l,d)=>k.jsx("span",{className:u,children:l.length===0||l.length===1&&l[0].content===""?`
|
|
135
|
+
`:l.map((f,p)=>{let h={},g=!!f.bgColor;if(f.color&&(h["--sdm-c"]=f.color),f.bgColor&&(h["--sdm-tbg"]=f.bgColor),f.htmlStyle)for(let[_,C]of Object.entries(f.htmlStyle))_==="color"?h["--sdm-c"]=C:_==="background-color"?(h["--sdm-tbg"]=C,g=!0):h[_]=C;return k.jsx("span",{className:s("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",g&&"bg-[var(--sdm-tbg)]",g&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:h,...f.htmlAttrs,children:f.content},p)})},d))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine),jx=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let a=ce();return k.jsx("div",{className:a("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i})},ac=I.createContext({code:""}),sc=()=>I.useContext(ac),$x=({language:e})=>{let t=ce();return k.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:k.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},Yx=/\n+$/,qx=I.lazy(()=>Yu(()=>import("./highlighted-body-TPN3WLV5-Bbf4VBqH.js"),[]).then(e=>({default:e.HighlightedCodeBlockBody}))),Vx=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,...s})=>{let u=ce(),o=I.useMemo(()=>e.replace(Yx,""),[e]),l=I.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:o.split(`
|
|
136
|
+
`).map(d=>[{content:d,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[o]);return k.jsx(ac.Provider,{value:{code:e},children:k.jsxs(jx,{isIncomplete:i,language:t,children:[k.jsx($x,{language:t}),r?k.jsx("div",{className:u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:k.jsx("div",{className:u("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:r})}):null,k.jsx(I.Suspense,{fallback:k.jsx(zx,{className:n,language:t,result:l,startLine:a,...s}),children:k.jsx(qx,{className:n,code:o,language:t,raw:l,startLine:a,...s})})]})})},Wx=e=>k.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:k.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"})}),Gx=e=>k.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:k.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"})}),Qx=e=>k.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:k.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"})}),Xx=e=>k.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[k.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),k.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),Kx=e=>k.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:k.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"})}),Zx=e=>k.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:k.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"})}),Jx=e=>k.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:k.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"})}),ek=e=>k.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:k.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"})}),tk=e=>k.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:k.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"})}),nk=e=>k.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:k.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"})}),Nn={CheckIcon:Wx,CopyIcon:Gx,DownloadIcon:Qx,ExternalLinkIcon:ek,Loader2Icon:Xx,Maximize2Icon:Kx,RotateCcwIcon:Zx,XIcon:Jx,ZoomInIcon:tk,ZoomOutIcon:nk},uc=I.createContext(Nn),rk=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])},uu=({icons:e,children:t})=>{let n=I.useRef(e),r=I.useRef(e?{...Nn,...e}:Nn);rk(n.current,e)||(n.current=e,r.current=e?{...Nn,...e}:Nn);let i=r.current;return k.jsx(uc.Provider,{value:i,children:t})},it=()=>I.useContext(uc),oc={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Di=I.createContext(oc),Et=()=>I.useContext(Di),ou=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let u=ce(),[o,l]=I.useState(!1),d=I.useRef(0),{code:f}=sc(),{isAnimating:p}=I.useContext(Ge),h=Et(),g=a??f,_=async()=>{var O;if(typeof window>"u"||!((O=navigator==null?void 0:navigator.clipboard)!=null&&O.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(g),l(!0),e==null||e(),d.current=window.setTimeout(()=>l(!1),n))}catch(L){t==null||t(L)}};I.useEffect(()=>()=>{window.clearTimeout(d.current)},[]);let C=it(),y=o?C.CheckIcon:C.CopyIcon;return k.jsx("button",{className:u("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:_,title:h.copyCode,type:"button",...s,children:r??k.jsx(y,{size:14})})},lu={"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"},ik=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let u=ce(),{code:o}=sc(),{isAnimating:l}=I.useContext(Ge),d=Et(),f=it(),p=a??o,h=`file.${n&&n in lu?lu[n]:"txt"}`,g="text/plain",_=()=>{try{rn(h,p,g),e==null||e()}catch(C){t==null||t(C)}};return k.jsx("button",{className:u("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:l,onClick:_,title:d.downloadFile,type:"button",...s,children:r??k.jsx(f.DownloadIcon,{size:14})})},cu=()=>{let{Loader2Icon:e}=it(),t=ce();return k.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[k.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),k.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:k.jsx(e,{className:t("size-4 animate-spin")})})]})},ak=/\.[^/.]+$/,sk=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...s})=>{let{DownloadIcon:u}=it(),o=ce(),l=I.useRef(null),[d,f]=I.useState(!1),[p,h]=I.useState(!1),g=Et(),_=s.width!=null||s.height!=null,C=(d||_)&&!p,y=p&&!_;I.useEffect(()=>{let z=l.current;if(z!=null&&z.complete){let N=z.naturalWidth>0;f(N),h(!N)}},[]);let O=I.useCallback(z=>{f(!0),h(!1),i==null||i(z)},[i]),L=I.useCallback(z=>{f(!1),h(!0),a==null||a(z)},[a]),B=async()=>{if(n)try{let z=await(await fetch(n)).blob(),N=new URL(n,window.location.origin).pathname.split("/").pop()||"",H=N.split(".").pop(),P=N.includes(".")&&H!==void 0&&H.length<=4,G="";if(P)G=N;else{let w=z.type,$="png";w.includes("jpeg")||w.includes("jpg")?$="jpg":w.includes("png")?$="png":w.includes("svg")?$="svg":w.includes("gif")?$="gif":w.includes("webp")&&($="webp"),G=`${(r||N||"image").replace(ak,"")}.${$}`}rn(G,z,z.type)}catch{window.open(n,"_blank")}};return n?k.jsxs("div",{className:o("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[k.jsx("img",{alt:r,className:o("max-w-full rounded-lg",y&&"hidden",t),"data-streamdown":"image",onError:L,onLoad:O,ref:l,src:n,...s}),y&&k.jsx("span",{className:o("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:g.imageNotAvailable}),k.jsx("div",{className:o("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),C&&k.jsx("button",{className:o("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:B,title:g.downloadImage,type:"button",children:k.jsx(u,{size:14})})]}):null},Bn=0,ka=()=>{Bn+=1,Bn===1&&(document.body.style.overflow="hidden")},ya=()=>{Bn=Math.max(0,Bn-1),Bn===0&&(document.body.style.overflow="")},uk=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:s,XIcon:u}=it(),o=ce(),[l,d]=I.useState(!1),f=Et(),p=I.useCallback(async()=>{try{await navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3)}catch{}},[e]),h=I.useCallback(()=>{r(),n()},[r,n]);return I.useEffect(()=>{if(t){ka();let g=_=>{_.key==="Escape"&&n()};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),ya()}}},[t,n]),t?k.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:n,onKeyDown:g=>{g.key==="Escape"&&n()},role:"button",tabIndex:0,children:k.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:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:[k.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:n,title:f.close,type:"button",children:k.jsx(u,{size:16})}),k.jsxs("div",{className:o("flex flex-col gap-2"),children:[k.jsxs("div",{className:o("flex items-center gap-2 font-semibold text-lg"),children:[k.jsx(s,{size:20}),k.jsx("span",{children:f.openExternalLink})]}),k.jsx("p",{className:o("text-muted-foreground text-sm"),children:f.externalLinkWarning})]}),k.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}),k.jsxs("div",{className:o("flex gap-2"),children:[k.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:p,type:"button",children:l?k.jsxs(k.Fragment,{children:[k.jsx(i,{size:14}),k.jsx("span",{children:f.copied})]}):k.jsxs(k.Fragment,{children:[k.jsx(a,{size:14}),k.jsx("span",{children:f.copyLink})]})}),k.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:h,type:"button",children:[k.jsx(s,{size:14}),k.jsx("span",{children:f.openLink})]})]})]})}):null},Pi=I.createContext(null),_a=()=>I.useContext(Pi),f3=()=>{var e;let t=_a();return(e=t==null?void 0:t.code)!=null?e:null},Aa=()=>{var e;let t=_a();return(e=t==null?void 0:t.mermaid)!=null?e:null},ok=e=>{var t;let n=_a();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},lk=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),u=new Image;u.crossOrigin="anonymous",u.onload=()=>{let o=document.createElement("canvas"),l=u.width*r,d=u.height*r;o.width=l,o.height=d;let f=o.getContext("2d");if(!f){a(new Error("Failed to create 2D canvas context for PNG export"));return}f.drawImage(u,0,0,l,d),o.toBlob(p=>{if(!p){a(new Error("Failed to create PNG blob"));return}i(p)},"image/png")},u.onerror=()=>a(new Error("Failed to load SVG image")),u.src=s})},ck=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let s=ce(),[u,o]=I.useState(!1),l=I.useRef(null),{isAnimating:d}=I.useContext(Ge),f=it(),p=Aa(),h=Et(),g=async _=>{try{if(_==="mmd"){rn("diagram.mmd",e,"text/plain"),o(!1),r==null||r(_);return}if(!p){a==null||a(new Error("Mermaid plugin not available"));return}let C=p.getMermaid(i),y=e.split("").reduce((B,z)=>(B<<5)-B+z.charCodeAt(0)|0,0),O=`mermaid-${Math.abs(y)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:L}=await C.render(O,e);if(!L){a==null||a(new Error("SVG not found. Please wait for the diagram to render."));return}if(_==="svg"){rn("diagram.svg",L,"image/svg+xml"),o(!1),r==null||r(_);return}if(_==="png"){let B=await lk(L);rn("diagram.png",B,"image/png"),r==null||r(_),o(!1);return}}catch(C){a==null||a(C)}};return I.useEffect(()=>{let _=C=>{let y=C.composedPath();l.current&&!y.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[]),k.jsxs("div",{className:s("relative"),ref:l,children:[k.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:d,onClick:()=>o(!u),title:h.downloadDiagram,type:"button",children:t??k.jsx(f.DownloadIcon,{size:14})}),u?k.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:[k.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("svg"),title:h.downloadDiagramAsSvg,type:"button",children:h.mermaidFormatSvg}),k.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("png"),title:h.downloadDiagramAsPng,type:"button",children:h.mermaidFormatPng}),k.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("mmd"),title:h.downloadDiagramAsMmd,type:"button",children:h.mermaidFormatMmd})]}):null]})},dk=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:s,XIcon:u}=it(),o=ce(),[l,d]=I.useState(!1),{isAnimating:f,controls:p}=I.useContext(Ge),h=Et(),g=(()=>{if(typeof p=="boolean")return p;let C=p.mermaid;return C===!1?!1:C===!0||C===void 0?!0:C.panZoom!==!1})(),_=()=>{d(!l)};return I.useEffect(()=>{if(l){ka();let C=y=>{y.key==="Escape"&&d(!1)};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C),ya()}}},[l]),I.useEffect(()=>{l?n==null||n():r&&r()},[l,n,r]),k.jsxs(k.Fragment,{children:[k.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:f,onClick:_,title:h.viewFullscreen,type:"button",...a,children:k.jsx(s,{size:14})}),l?Ui.createPortal(k.jsxs("div",{className:o("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:_,onKeyDown:C=>{C.key==="Escape"&&_()},role:"button",tabIndex:0,children:[k.jsx("button",{className:o("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:_,title:h.exitFullscreen,type:"button",children:k.jsx(u,{size:20})}),k.jsx("div",{className:o("flex size-full items-center justify-center p-4"),onClick:C=>C.stopPropagation(),onKeyDown:C=>C.stopPropagation(),role:"presentation",children:k.jsx(s3,{chart:e,className:o("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:g})})]}),document.body):null]})},lc=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let u of a)r.push(((t=u.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let u of s){let o=[],l=u.querySelectorAll("td");for(let d of l)o.push(((n=d.textContent)==null?void 0:n.trim())||"");i.push(o)}return{headers:r,rows:i}},cc=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1,l=!1;for(let d of u){if(d==='"'){o=!0,l=!0;break}(d===","||d===`
|
|
137
|
+
`)&&(o=!0)}return o?l?`"${u.replace(/"/g,'""')}"`:`"${u}"`:u},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(","),s+=1);for(let u of n)a[s]=u.map(r).join(","),s+=1;return a.join(`
|
|
138
|
+
`)},fk=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1;for(let d of u)if(d===" "||d===`
|
|
139
|
+
`||d==="\r"){o=!0;break}if(!o)return u;let l=[];for(let d of u)d===" "?l.push("\\t"):d===`
|
|
140
|
+
`?l.push("\\n"):d==="\r"?l.push("\\r"):l.push(d);return l.join("")},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(" "),s+=1);for(let u of n)a[s]=u.map(r).join(" "),s+=1;return a.join(`
|
|
141
|
+
`)},li=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},vi=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(u=>li(u));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let u=0;u<t.length;u+=1)s[u]="---";r[i]=`| ${s.join(" | ")} |`,i+=1;for(let u of n)if(u.length<t.length){let o=new Array(t.length);for(let l=0;l<t.length;l+=1)o[l]=l<u.length?li(u[l]):"";r[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=u.map(l=>li(l));r[i]=`| ${o.join(" | ")} |`,i+=1}return r.join(`
|
|
142
|
+
`)},dc=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=ce(),[s,u]=I.useState(!1),[o,l]=I.useState(!1),d=I.useRef(null),f=I.useRef(0),{isAnimating:p}=I.useContext(Ge),h=Et(),g=async y=>{var O,L;if(typeof window>"u"||!((O=navigator==null?void 0:navigator.clipboard)!=null&&O.write)){r==null||r(new Error("Clipboard API not available"));return}try{let B=(L=d.current)==null?void 0:L.closest('[data-streamdown="table-wrapper"]'),z=B==null?void 0:B.querySelector("table");if(!z){r==null||r(new Error("Table not found"));return}let N=lc(z),H=({csv:cc,tsv:fk,md:vi}[y]||vi)(N),P=new ClipboardItem({"text/plain":new Blob([H],{type:"text/plain"}),"text/html":new Blob([z.outerHTML],{type:"text/html"})});await navigator.clipboard.write([P]),l(!0),u(!1),n==null||n(y),f.current=window.setTimeout(()=>l(!1),i)}catch(B){r==null||r(B)}};I.useEffect(()=>{let y=O=>{let L=O.composedPath();d.current&&!L.includes(d.current)&&u(!1)};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y),window.clearTimeout(f.current)}},[]);let _=it(),C=o?_.CheckIcon:_.CopyIcon;return k.jsxs("div",{className:a("relative"),ref:d,children:[k.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:()=>u(!s),title:h.copyTable,type:"button",children:e??k.jsx(C,{height:14,width:14})}),s?k.jsxs("div",{className:a("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[k.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("md"),title:h.copyTableAsMarkdown,type:"button",children:h.tableFormatMarkdown}),k.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("csv"),title:h.copyTableAsCsv,type:"button",children:h.tableFormatCsv}),k.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("tsv"),title:h.copyTableAsTsv,type:"button",children:h.tableFormatTsv})]}):null]})},fc=({children:e,className:t,onDownload:n,onError:r})=>{let i=ce(),[a,s]=I.useState(!1),u=I.useRef(null),{isAnimating:o}=I.useContext(Ge),l=Et(),d=it(),f=p=>{var h;try{let g=(h=u.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),_=g==null?void 0:g.querySelector("table");if(!_){r==null||r(new Error("Table not found"));return}let C=lc(_),y=p==="csv"?cc(C):vi(C);rn(`table.${p==="csv"?"csv":"md"}`,y,p==="csv"?"text/csv":"text/markdown"),s(!1),n==null||n(p)}catch(g){r==null||r(g)}};return I.useEffect(()=>{let p=h=>{let g=h.composedPath();u.current&&!g.includes(u.current)&&s(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),k.jsxs("div",{className:i("relative"),ref:u,children:[k.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:l.downloadTable,type:"button",children:e??k.jsx(d.DownloadIcon,{size:14})}),a?k.jsxs("div",{className:i("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[k.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("csv"),title:l.downloadTableAsCsv,type:"button",children:l.tableFormatCsv}),k.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("markdown"),title:l.downloadTableAsMarkdown,type:"button",children:l.tableFormatMarkdown})]}):null]})},hk=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=it(),s=ce(),[u,o]=I.useState(!1),{isAnimating:l}=I.useContext(Ge),d=Et(),f=()=>{o(!0)},p=()=>{o(!1)};return I.useEffect(()=>{if(u){ka();let h=g=>{g.key==="Escape"&&o(!1)};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),ya()}}},[u]),k.jsxs(k.Fragment,{children:[k.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:l,onClick:f,title:d.viewFullscreen,type:"button",children:k.jsx(i,{size:14})}),u?Ui.createPortal(k.jsx("div",{"aria-label":d.viewFullscreen,"aria-modal":"true",className:s("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:p,onKeyDown:h=>{h.key==="Escape"&&p()},role:"dialog",children:k.jsxs("div",{className:s("flex h-full flex-col"),onClick:h=>h.stopPropagation(),onKeyDown:h=>h.stopPropagation(),role:"presentation",children:[k.jsxs("div",{className:s("flex items-center justify-end gap-1 p-4"),children:[n?k.jsx(dc,{}):null,r?k.jsx(fc,{}):null,k.jsx("button",{className:s("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:p,title:d.exitFullscreen,type:"button",children:k.jsx(a,{size:20})})]}),k.jsx("div",{className:s("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:k.jsx("table",{className:s("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},pk=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...s})=>{let u=ce(),o=n&&r,l=n&&i,d=n&&a,f=o||l||d;return k.jsxs("div",{className:u("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[f?k.jsxs("div",{className:u("flex items-center justify-end gap-1"),children:[o?k.jsx(dc,{}):null,l?k.jsx(fc,{}):null,d?k.jsx(hk,{showCopy:o,showDownload:l,children:e}):null]}):null,k.jsx("div",{className:u("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:k.jsx("table",{className:u("w-full divide-y divide-border",t),"data-streamdown":"table",...s,children:e})})]})},mk=/startLine=(\d+)/,gk=I.lazy(()=>Yu(()=>import("./index-DLfciZbe.js").then(e=>e.m),__vite__mapDeps([0,1,2])).then(e=>({default:e.Mermaid}))),bk=/language-([^\s]+)/;function Br(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return(n==null?void 0:n.line)===(r==null?void 0:r.line)&&(n==null?void 0:n.column)===(r==null?void 0:r.column)&&(i==null?void 0:i.line)===(a==null?void 0:a.line)&&(i==null?void 0:i.column)===(a==null?void 0:a.column)}function Ce(e,t){return e.className===t.className&&Br(e.node,t.node)}var Mi=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,ci=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},du=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},ar=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Ca=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>Ce(e,t));Ca.displayName="MarkdownOl";var hc=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&Br(e.node,t.node));hc.displayName="MarkdownLi";var pc=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>Ce(e,t));pc.displayName="MarkdownUl";var mc=I.memo(({className:e,node:t,...n})=>{let r=ce();return k.jsx("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>Ce(e,t));mc.displayName="MarkdownHr";var gc=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>Ce(e,t));gc.displayName="MarkdownStrong";var Ek=({children:e,className:t,href:n,node:r,...i})=>{let a=ce(),{linkSafety:s}=I.useContext(Ge),[u,o]=I.useState(!1),l=n==="streamdown:incomplete-link",d=I.useCallback(async g=>{if(!(!(s!=null&&s.enabled&&n)||l)){if(g.preventDefault(),s.onLinkCheck&&await s.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}o(!0)}},[s,n,l]),f=I.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),p=I.useCallback(()=>{o(!1)},[]),h={url:n??"",isOpen:u,onClose:p,onConfirm:f};return s!=null&&s.enabled&&n?k.jsxs(k.Fragment,{children:[k.jsx("button",{className:a("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",onClick:d,type:"button",children:e}),s.renderModal?s.renderModal(h):k.jsx(uk,{...h})]}):k.jsx("a",{className:a("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},bc=I.memo(Ek,(e,t)=>Ce(e,t)&&e.href===t.href);bc.displayName="MarkdownA";var Ec=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>Ce(e,t));Ec.displayName="MarkdownH1";var Tc=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>Ce(e,t));Tc.displayName="MarkdownH2";var xc=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>Ce(e,t));xc.displayName="MarkdownH3";var kc=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>Ce(e,t));kc.displayName="MarkdownH4";var yc=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>Ce(e,t));yc.displayName="MarkdownH5";var _c=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>Ce(e,t));_c.displayName="MarkdownH6";var Ac=I.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=I.useContext(Ge),a=Mi(i,"table"),s=ci(i,"copy"),u=ci(i,"download"),o=ci(i,"fullscreen");return k.jsx(pk,{className:t,showControls:a,showCopy:s,showDownload:u,showFullscreen:o,...r,children:e})},(e,t)=>Ce(e,t));Ac.displayName="MarkdownTable";var Cc=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>Ce(e,t));Cc.displayName="MarkdownThead";var Sc=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>Ce(e,t));Sc.displayName="MarkdownTbody";var Ic=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>Ce(e,t));Ic.displayName="MarkdownTr";var Nc=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>Ce(e,t));Nc.displayName="MarkdownTh";var wc=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>Ce(e,t));wc.displayName="MarkdownTd";var Lc=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>Ce(e,t));Lc.displayName="MarkdownBlockquote";var Rc=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>Ce(e,t));Rc.displayName="MarkdownSup";var Oc=I.memo(({children:e,className:t,node:n,...r})=>{let i=ce();return k.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>Ce(e,t));Oc.displayName="MarkdownSub";var Dc=I.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var u,o;if(!I.isValidElement(s))return!1;let l=Array.isArray(s.props.children)?s.props.children:[s.props.children],d=!1,f=!1;for(let p of l)if(p){if(typeof p=="string")p.trim()!==""&&(d=!0);else if(I.isValidElement(p))if(((u=p.props)==null?void 0:u["data-footnote-backref"])!==void 0)f=!0;else{let h=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let g of h){if(typeof g=="string"&&g.trim()!==""){d=!0;break}if(I.isValidElement(g)&&((o=g.props)==null?void 0:o["data-footnote-backref"])===void 0){d=!0;break}}}}return f&&!d},a=Array.isArray(e)?e.map(s=>{if(!I.isValidElement(s))return s;if(s.type===Ca){let u=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(o=>!i(o));return u.length===0?null:{...s,props:{...s.props,children:u}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?k.jsx("section",{className:t,...r,children:a}):null}return k.jsx("section",{className:t,...r,children:e})},(e,t)=>Ce(e,t));Dc.displayName="MarkdownSection";var Tk=({node:e,className:t,children:n,...r})=>{var i,a;let s=ce(),u=!("data-block"in r),{mermaid:o,controls:l}=I.useContext(Ge),d=Aa(),f=Mx(),p=t==null?void 0:t.match(bk),h=(i=p==null?void 0:p.at(1))!=null?i:"",g=ok(h);if(u)return k.jsx("code",{className:s("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let _=(a=e==null?void 0:e.properties)==null?void 0:a.metastring,C=_==null?void 0:_.match(mk),y=C?Number.parseInt(C[1],10):void 0,O=y!==void 0&&y>=1?y:void 0,L="";if(I.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?L=n.props.children:typeof n=="string"&&(L=n),g){let H=g.component;return k.jsx(I.Suspense,{fallback:k.jsx(cu,{}),children:k.jsx(H,{code:L,isIncomplete:f,language:h})})}if(h==="mermaid"&&d){let H=Mi(l,"mermaid"),P=ar(l,"download"),G=ar(l,"copy"),w=ar(l,"fullscreen"),$=ar(l,"panZoom"),V=H&&(P||G||w);return k.jsx(I.Suspense,{fallback:k.jsx(cu,{}),children:k.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:[k.jsx("div",{className:s("flex h-8 items-center text-muted-foreground text-xs"),children:k.jsx("span",{className:s("ml-1 font-mono lowercase"),children:"mermaid"})}),V?k.jsx("div",{className:s("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:k.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:[P?k.jsx(ck,{chart:L,config:o==null?void 0:o.config}):null,G?k.jsx(ou,{code:L}):null,w?k.jsx(dk,{chart:L,config:o==null?void 0:o.config}):null]})}):null,k.jsx("div",{className:s("rounded-md border border-border bg-background"),children:k.jsx(gk,{chart:L,config:o==null?void 0:o.config,showControls:$})})]})})}let B=Mi(l,"code"),z=du(l,"download"),N=du(l,"copy");return k.jsx(Vx,{className:t,code:L,isIncomplete:f,language:h,startLine:O,children:B?k.jsxs(k.Fragment,{children:[z?k.jsx(ik,{code:L,language:h}):null,N?k.jsx(ou,{}):null]}):null})},Pc=I.memo(Tk,(e,t)=>e.className===t.className&&Br(e.node,t.node));Pc.displayName="MarkdownCode";var vc=I.memo(sk,(e,t)=>e.className===t.className&&Br(e.node,t.node));vc.displayName="MarkdownImg";var Mc=I.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&I.isValidElement(r[0])){let i=r[0].props.node,a=i==null?void 0:i.tagName;if(a==="img")return k.jsx(k.Fragment,{children:e});if(a==="code"&&"data-block"in r[0].props)return k.jsx(k.Fragment,{children:e})}return k.jsx("p",{...n,children:e})},(e,t)=>Ce(e,t));Mc.displayName="MarkdownParagraph";var xk={ol:Ca,li:hc,ul:pc,hr:mc,strong:gc,a:bc,h1:Ec,h2:Tc,h3:xc,h4:kc,h5:yc,h6:_c,table:Ac,thead:Cc,tbody:Sc,tr:Ic,th:Nc,td:wc,blockquote:Lc,code:Pc,img:vc,pre:({children:e})=>I.isValidElement(e)?I.cloneElement(e,{"data-block":"true"}):e,sup:Rc,sub:Oc,p:Mc,section:Dc},kk=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,yk=new RegExp("\\p{L}","u");function fu(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(kk.test(n))return"rtl";if(yk.test(n))return"ltr"}return"ltr"}var _k=/^[ \t]{0,3}(`{3,}|~{3,})/,Ak=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,hu=e=>{let t=e.split(`
|
|
143
|
+
`),n=null,r=0;for(let i of t){let a=_k.exec(i);if(n===null){if(a){let s=a[1];n=s[0],r=s.length}}else if(a){let s=a[1],u=s[0],o=s.length;u===n&&o>=r&&(n=null,r=0)}}return n!==null},Ck=e=>{let t=e.split(`
|
|
144
|
+
`);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&Ak.test(r))return!0}return!1},Sk=()=>e=>{ot(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},pu=[],mu={allowDangerousHtml:!0},sr=new WeakMap,Ik=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 n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let d="default";return this.keyCache.set(e,d),d}let a=d=>{if(!d||d.length===0)return"";let f="";for(let p=0;p<d.length;p+=1){let h=d[p];if(p>0&&(f+=","),Array.isArray(h)){let[g,_]=h;if(typeof g=="function"){let C=sr.get(g);C||(C=g.name,sr.set(g,C)),f+=C}else f+=String(g);f+=":",f+=JSON.stringify(_)}else if(typeof h=="function"){let g=sr.get(h);g||(g=h.name,sr.set(h,g)),f+=g}else f+=String(h)}return f},s=a(n),u=a(r),o=i?JSON.stringify(i):"",l=`${u}::${s}::${o}`;return this.keyCache.set(e,l),l}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},gu=new Ik,Bc=e=>{let t=Nk(e),n=e.children||"",r=t.runSync(t.parse(n),n);return vk(r,e)},Nk=e=>{let t=gu.get(e);if(t)return t;let n=Lk(e);return gu.set(e,n),n},wk=e=>e.some(t=>Array.isArray(t)?t[0]===xi:t===xi),Lk=e=>{let t=e.rehypePlugins||pu,n=e.remarkPlugins||pu,r=wk(t)?n:[...n,Sk],i=e.remarkRehypeOptions?{...mu,...e.remarkRehypeOptions}:mu;return L2().use(wT).use(r).use(d2,i).use(t)},Rk=e=>e,Ok=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},Dk=(e,t)=>{var n;for(let r in ei)if(Object.hasOwn(ei,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=ei[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},Pk=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},vk=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:u}=t;if(n||r||i||a||u){let o=u||Rk;ot(e,(l,d,f)=>{if(l.type==="raw"&&f&&typeof d=="number")return Ok(f,d,a,l.value),d;if(l.type==="element"&&(Dk(l,o),Pk(l,d,f,r,i,n)&&f&&typeof d=="number"))return s&&l.children?f.children.splice(d,1,...l.children):f.children.splice(d,1),d})}return BE(e,{Fragment:k.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0})},Mk=/\[\^[\w-]{1,200}\](?!:)/,Bk=/\[\^[\w-]{1,200}\]:/,Fk=/<(\w+)[\s>]/,Hk=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),bu=new Map,Eu=new Map,Uk=e=>{let t=e.toLowerCase(),n=bu.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return bu.set(t,r),r},zk=e=>{let t=e.toLowerCase(),n=Eu.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return Eu.set(t,r),r},Tu=(e,t)=>{if(Hk.has(t.toLowerCase()))return 0;let n=e.match(Uk(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},xu=(e,t)=>{let n=e.match(zk(t));return n?n.length:0},jk=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},$k=e=>{let t=Mk.test(e),n=Bk.test(e);if(t||n)return[e];let r=Ze.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let u of r){let o=u.raw,l=i.length;if(a.length>0){i[l-1]+=o;let d=a.at(-1),f=Tu(o,d),p=xu(o,d);for(let h=0;h<f;h+=1)a.push(d);for(let h=0;h<p;h+=1)a.length>0&&a.at(-1)===d&&a.pop();continue}if(u.type==="html"&&u.block){let d=o.match(Fk);if(d){let f=d[1],p=Tu(o,f),h=xu(o,f);p>h&&a.push(f)}}if(l>0&&!s){let d=i[l-1];if(jk(d)%2===1){i[l-1]=d+o;continue}}i.push(o),u.type!=="space"&&(s=u.type==="code")}return i},Yk=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(a,s,u,o)=>{let l=u.replace(/\n\n/g,`
|
|
145
|
+
<!---->
|
|
146
|
+
`);return s+l+o})}return n},qk=/([\\`*_~[\]|])/g,Vk=e=>e.replace(qk,"\\$1"),Wk=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(a,s,u,o)=>s+Vk(u)+o)}return n},Fc=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(Fc).join(""):"",Gk=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));ot(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let i=Fc(r);r.children=i?[{type:"text",value:i}]:[]}})},Qk=()=>e=>{ot(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},Xk=/^[ \t]*<[\w!/?-]/,Kk=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,Zk=e=>typeof e!="string"||e.length===0||!Xk.test(e)?e:e.replace(Kk,"$1"),ku,yu,_u,Au,dr={...Bt,protocols:{...Bt.protocols,href:[...(yu=(ku=Bt.protocols)==null?void 0:ku.href)!=null?yu:[],"tel"]},attributes:{...Bt.attributes,code:[...(Au=(_u=Bt.attributes)==null?void 0:_u.code)!=null?Au:[],"metastring"]}},Bi={raw:xi,sanitize:[Wo,dr],harden:[Qd,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},Jk={gfm:[pb,{}],codeMeta:Qk},Cu=Object.values(Bi),e3=Object.values(Jk),t3={block:" ▋",circle:" ●"},n3={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Ge=I.createContext(n3),Hc=I.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:s,...u})=>{if(s){let d=s.getLastRenderCharCount();s.setPrevContentLength(d)}let o=typeof e=="string"&&n?Zk(e):e,l=k.jsx(Bc,{...u,children:o});return k.jsx(ic.Provider,{value:i,children:a?k.jsx("div",{dir:a,style:{display:"contents"},children:l}):l})},(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 n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.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)});Hc.displayName="Block";var r3=["github-light","github-dark"],i3=I.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:s=Cu,remarkPlugins:u=e3,className:o,shikiTheme:l=r3,mermaid:d,controls:f=!0,isAnimating:p=!1,animated:h,BlockComponent:g=Hc,parseMarkdownIntoBlocksFn:_=$k,caret:C,plugins:y,remend:O,linkSafety:L={enabled:!0},allowedTags:B,literalTagContent:z,translations:N,icons:H,prefix:P,onAnimationStart:G,onAnimationEnd:w,...$})=>{let V=I.useId(),[oe,Q]=I.useTransition(),j=I.useMemo(()=>Fx(P),[P]),Y=I.useRef(null),te=I.useRef(G),Ae=I.useRef(w);te.current=G,Ae.current=w,I.useEffect(()=>{var de,ye,Fe;if(t==="static")return;let Je=Y.current;if(Y.current=p,Je===null){p&&((de=te.current)==null||de.call(te));return}p&&!Je?(ye=te.current)==null||ye.call(te):!p&&Je&&((Fe=Ae.current)==null||Fe.call(Ae))},[p,t]);let Ie=I.useMemo(()=>B?Object.keys(B):[],[B]),E=I.useMemo(()=>{if(typeof e!="string")return"";let de=t==="streaming"&&r?kE(e,O):e;return z&&z.length>0&&(de=Wk(de,z)),Ie.length>0&&(de=Yk(de,Ie)),de},[e,t,r,O,Ie,z]),A=I.useMemo(()=>_(E),[E,_]),[v,T]=I.useState(A);I.useEffect(()=>{t==="streaming"&&!ge?Q(()=>{T(A)}):T(A)},[A,t]);let W=t==="streaming"?v:A,J=I.useMemo(()=>n==="auto"?W.map(fu):void 0,[W,n]),X=I.useMemo(()=>W.map((de,ye)=>`${V}-${ye}`),[W.length,V]),se=I.useMemo(()=>h===!0?"true":h?JSON.stringify(h):"",[h]),ge=I.useMemo(()=>se?se==="true"?Ri():Ri(h):null,[se]),re=I.useMemo(()=>{var de,ye;return{shikiTheme:(ye=(de=y==null?void 0:y.code)==null?void 0:de.getThemes())!=null?ye:l,controls:f,isAnimating:p,mode:t,mermaid:d,linkSafety:L}},[l,f,p,t,d,L,y==null?void 0:y.code]),$e=I.useMemo(()=>N?JSON.stringify(N):"",[N]),Qe=I.useMemo(()=>({...oc,...N}),[$e]),dt=I.useMemo(()=>{let{inlineCode:de,...ye}=a??{},Fe={...xk,...ye};if(de){let Je=Fe.code;Fe.code=Ot=>"data-block"in Ot?Je?I.createElement(Je,Ot):null:I.createElement(de,Ot)}return Fe},[a]),Tt=I.useMemo(()=>{let de=[];return y!=null&&y.cjk&&(de=[...de,...y.cjk.remarkPluginsBefore]),de=[...de,...u],y!=null&&y.cjk&&(de=[...de,...y.cjk.remarkPluginsAfter]),y!=null&&y.math&&(de=[...de,y.math.remarkPlugin]),de},[u,y==null?void 0:y.math,y==null?void 0:y.cjk]),ft=I.useMemo(()=>{var de;let ye=s;if(B&&Object.keys(B).length>0&&s===Cu){let Fe={...dr,tagNames:[...(de=dr.tagNames)!=null?de:[],...Object.keys(B)],attributes:{...dr.attributes,...B}};ye=[Bi.raw,[Wo,Fe],Bi.harden]}return z&&z.length>0&&(ye=[...ye,[Gk,z]]),y!=null&&y.math&&(ye=[...ye,y.math.rehypePlugin]),ge&&p&&(ye=[...ye,ge.rehypePlugin]),ye},[s,y==null?void 0:y.math,ge,p,B,z]),Qt=I.useMemo(()=>{if(!p||W.length===0)return!1;let de=W.at(-1);return hu(de)||Ck(de)},[p,W]),Xn=I.useMemo(()=>C&&p&&!Qt?{"--streamdown-caret":`"${t3[C]}"`}:void 0,[C,p,Qt]);return t==="static"?k.jsx(Di.Provider,{value:Qe,children:k.jsx(Pi.Provider,{value:y??null,children:k.jsx(Ge.Provider,{value:re,children:k.jsx(uu,{icons:H,children:k.jsx(Oi.Provider,{value:j,children:k.jsx("div",{className:j("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",o),dir:n==="auto"?fu(E):n,children:k.jsx(Bc,{components:dt,rehypePlugins:ft,remarkPlugins:Tt,...$,children:E})})})})})})}):k.jsx(Di.Provider,{value:Qe,children:k.jsx(Pi.Provider,{value:y??null,children:k.jsx(Ge.Provider,{value:re,children:k.jsx(uu,{icons:H,children:k.jsx(Oi.Provider,{value:j,children:k.jsxs("div",{className:j("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",C&&!Qt?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,o),style:Xn,children:[W.length===0&&C&&p&&k.jsx("span",{}),W.map((de,ye)=>{var Fe;let Je=ye===W.length-1,Ot=p&&Je&&hu(de);return k.jsx(g,{animatePlugin:ge,components:dt,content:de,dir:(Fe=J==null?void 0:J[ye])!=null?Fe:n!=="auto"?n:void 0,index:ye,isIncomplete:Ot,rehypePlugins:ft,remarkPlugins:Tt,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...$},X[ye])})]})})})})})})},(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.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);i3.displayName="Streamdown";var a3=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:u=!1})=>{let{RotateCcwIcon:o,ZoomInIcon:l,ZoomOutIcon:d}=it(),f=ce(),p=I.useRef(null),h=I.useRef(null),[g,_]=I.useState(s),[C,y]=I.useState({x:0,y:0}),[O,L]=I.useState(!1),[B,z]=I.useState({x:0,y:0}),[N,H]=I.useState({x:0,y:0}),P=I.useCallback(Y=>{_(te=>Math.max(n,Math.min(r,te+Y)))},[n,r]),G=I.useCallback(()=>{P(i)},[P,i]),w=I.useCallback(()=>{P(-i)},[P,i]),$=I.useCallback(()=>{_(s),y({x:0,y:0})},[s]),V=I.useCallback(Y=>{Y.preventDefault();let te=Y.deltaY>0?-i:i;P(te)},[P,i]),oe=I.useCallback(Y=>{if(Y.button!==0||Y.isPrimary===!1)return;L(!0),z({x:Y.clientX,y:Y.clientY}),H(C);let te=Y.currentTarget;te instanceof HTMLElement&&te.setPointerCapture(Y.pointerId)},[C]),Q=I.useCallback(Y=>{if(!O)return;Y.preventDefault();let te=Y.clientX-B.x,Ae=Y.clientY-B.y;y({x:N.x+te,y:N.y+Ae})},[O,B,N]),j=I.useCallback(Y=>{L(!1);let te=Y.currentTarget;te instanceof HTMLElement&&te.releasePointerCapture(Y.pointerId)},[]);return I.useEffect(()=>{let Y=p.current;if(Y)return Y.addEventListener("wheel",V,{passive:!1}),()=>{Y.removeEventListener("wheel",V)}},[V]),I.useEffect(()=>{let Y=h.current;if(Y&&O)return document.body.style.userSelect="none",Y.addEventListener("pointermove",Q,{passive:!1}),Y.addEventListener("pointerup",j),Y.addEventListener("pointercancel",j),()=>{document.body.style.userSelect="",Y.removeEventListener("pointermove",Q),Y.removeEventListener("pointerup",j),Y.removeEventListener("pointercancel",j)}},[O,Q,j]),k.jsxs("div",{className:f("relative flex flex-col",u?"h-full w-full":"min-h-28 w-full",t),ref:p,style:{cursor:O?"grabbing":"grab"},children:[a?k.jsxs("div",{className:f("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",u?"bottom-4 left-4":"bottom-2 left-2"),children:[k.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g>=r,onClick:G,title:"Zoom in",type:"button",children:k.jsx(l,{size:16})}),k.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g<=n,onClick:w,title:"Zoom out",type:"button",children:k.jsx(d,{size:16})}),k.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:$,title:"Reset zoom and pan",type:"button",children:k.jsx(o,{size:16})})]}):null,k.jsx("div",{className:f("flex-1 origin-center transition-transform duration-150 ease-out",u?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:oe,ref:h,role:"application",style:{transform:`translate(${C.x}px, ${C.y}px) scale(${g})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},s3=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=ce(),[s,u]=I.useState(null),[o,l]=I.useState(!1),[d,f]=I.useState(""),[p,h]=I.useState(""),[g,_]=I.useState(0),{mermaid:C}=I.useContext(Ge),y=Aa(),O=C==null?void 0:C.errorComponent,{shouldRender:L,containerRef:B}=Sx({immediate:r});if(I.useEffect(()=>{if(L){if(!y){u("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{u(null),l(!0);let N=y.getMermaid(n),H=e.split("").reduce((w,$)=>(w<<5)-w+$.charCodeAt(0)|0,0),P=`mermaid-${Math.abs(H)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:G}=await N.render(P,e);f(G),h(G)}catch(N){if(!(p||d)){let H=N instanceof Error?N.message:"Failed to render Mermaid chart";u(H)}}finally{l(!1)}})()}},[e,n,g,L,y]),!(L||d||p))return k.jsx("div",{className:a("my-4 min-h-[200px]",t),ref:B});if(o&&!d&&!p)return k.jsx("div",{className:a("my-4 flex justify-center p-4",t),ref:B,children:k.jsxs("div",{className:a("flex items-center space-x-2 text-muted-foreground"),children:[k.jsx("div",{className:a("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),k.jsx("span",{className:a("text-sm"),children:"Loading diagram..."})]})});if(s&&!d&&!p){let N=()=>_(H=>H+1);return O?k.jsx("div",{ref:B,children:k.jsx(O,{chart:e,error:s,retry:N})}):k.jsxs("div",{className:a("rounded-md bg-red-50 p-4",t),ref:B,children:[k.jsxs("p",{className:a("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",s]}),k.jsxs("details",{className:a("mt-2"),children:[k.jsx("summary",{className:a("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),k.jsx("pre",{className:a("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let z=d||p;return k.jsx("div",{className:a("size-full",t),"data-streamdown":"mermaid",ref:B,children:k.jsx(a3,{className:a(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:k.jsx("div",{"aria-label":"Mermaid chart",className:a("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:z},role:"img"})})})};export{zx as B,f3 as M,Ge as R,i3 as U,Yu as _,ro as a,io as b,ps as c,Ff as d,Su as e,Sr as f,Zc as g,$n as h,Nu as i,k as j,Ui as k,Xc as l,o3 as m,l3 as n,I as r,Lt as s,$u as t,s3 as u,SE as w,oo as z};
|