@cuongtran001/kanna 0.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +355 -0
- package/bin/kanna +9 -0
- package/dist/client/apple-touch-icon.png +0 -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/bricolage-grotesque-latin-ext-wght-normal-CcLUaPy7.woff2 +0 -0
- package/dist/client/assets/bricolage-grotesque-latin-wght-normal-DLoelf7F.woff2 +0 -0
- package/dist/client/assets/bricolage-grotesque-vietnamese-wght-normal-BUzh504Q.woff2 +0 -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/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/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-Do7324M0.css +32 -0
- package/dist/client/assets/index-ktE9DLCD.js +2620 -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/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/pierre-dark-DF2SEV7i.js +1 -0
- package/dist/client/assets/pierre-light-DOlZxES8.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/chat-sounds/Blow.mp3 +0 -0
- package/dist/client/chat-sounds/Bottle.mp3 +0 -0
- package/dist/client/chat-sounds/Frog.mp3 +0 -0
- package/dist/client/chat-sounds/Funk.mp3 +0 -0
- package/dist/client/chat-sounds/Glass.mp3 +0 -0
- package/dist/client/chat-sounds/Ping.mp3 +0 -0
- package/dist/client/chat-sounds/Pop.mp3 +0 -0
- package/dist/client/chat-sounds/Purr.mp3 +0 -0
- package/dist/client/chat-sounds/Tink.mp3 +0 -0
- package/dist/client/editor-icons/cursor.png +0 -0
- package/dist/client/editor-icons/custom.png +0 -0
- package/dist/client/editor-icons/default-app.png +0 -0
- package/dist/client/editor-icons/finder.png +0 -0
- package/dist/client/editor-icons/preview.png +0 -0
- package/dist/client/editor-icons/terminal.png +0 -0
- package/dist/client/editor-icons/windsurf.png +0 -0
- package/dist/client/editor-icons/xcode.png +0 -0
- package/dist/client/favicon.png +0 -0
- package/dist/client/fonts/body-medium.woff2 +0 -0
- package/dist/client/fonts/body-regular-italic.woff2 +0 -0
- package/dist/client/fonts/body-regular.woff2 +0 -0
- package/dist/client/fonts/body-semibold.woff2 +0 -0
- package/dist/client/icon-192.png +0 -0
- package/dist/client/icon-512.png +0 -0
- package/dist/client/icon-maskable-512.png +0 -0
- package/dist/client/icon.svg +4 -0
- package/dist/client/index.html +34 -0
- package/dist/client/manifest.webmanifest +46 -0
- package/dist/client/screenshot-light.png +0 -0
- package/dist/client/screenshot.png +0 -0
- package/dist/export-viewer/assets/bricolage-grotesque-latin-ext-wght-normal-CcLUaPy7.woff2 +0 -0
- package/dist/export-viewer/assets/bricolage-grotesque-latin-wght-normal-DLoelf7F.woff2 +0 -0
- package/dist/export-viewer/assets/bricolage-grotesque-vietnamese-wght-normal-BUzh504Q.woff2 +0 -0
- package/dist/export-viewer/assets/index-D1qUumZR.js +410 -0
- package/dist/export-viewer/assets/index-gG2nMW51.css +1 -0
- package/dist/export-viewer/editor-icons/cursor.png +0 -0
- package/dist/export-viewer/editor-icons/custom.png +0 -0
- package/dist/export-viewer/editor-icons/default-app.png +0 -0
- package/dist/export-viewer/editor-icons/finder.png +0 -0
- package/dist/export-viewer/editor-icons/preview.png +0 -0
- package/dist/export-viewer/editor-icons/terminal.png +0 -0
- package/dist/export-viewer/editor-icons/windsurf.png +0 -0
- package/dist/export-viewer/editor-icons/xcode.png +0 -0
- package/dist/export-viewer/fonts/body-medium.woff2 +0 -0
- package/dist/export-viewer/fonts/body-regular-italic.woff2 +0 -0
- package/dist/export-viewer/fonts/body-regular.woff2 +0 -0
- package/dist/export-viewer/fonts/body-semibold.woff2 +0 -0
- package/dist/export-viewer/index.html +14 -0
- package/package.json +99 -0
- package/src/server/__fixtures__/claude-session-empty.jsonl +0 -0
- package/src/server/__fixtures__/claude-session-malformed.jsonl +3 -0
- package/src/server/__fixtures__/claude-session-valid.jsonl +6 -0
- package/src/server/agent.test.ts +2369 -0
- package/src/server/agent.ts +1927 -0
- package/src/server/analytics.test.ts +313 -0
- package/src/server/analytics.ts +131 -0
- package/src/server/app-settings.test.ts +233 -0
- package/src/server/app-settings.ts +548 -0
- package/src/server/auth.test.ts +329 -0
- package/src/server/auth.ts +204 -0
- package/src/server/auto-continue/e2e.test.ts +215 -0
- package/src/server/auto-continue/events.test.ts +30 -0
- package/src/server/auto-continue/events.ts +35 -0
- package/src/server/auto-continue/limit-detector.test.ts +153 -0
- package/src/server/auto-continue/limit-detector.ts +159 -0
- package/src/server/auto-continue/read-model.test.ts +109 -0
- package/src/server/auto-continue/read-model.ts +83 -0
- package/src/server/auto-continue/schedule-manager.test.ts +155 -0
- package/src/server/auto-continue/schedule-manager.ts +116 -0
- package/src/server/claude-session-importer.test.ts +214 -0
- package/src/server/claude-session-importer.ts +187 -0
- package/src/server/claude-session-mapper.test.ts +88 -0
- package/src/server/claude-session-mapper.ts +106 -0
- package/src/server/claude-session-parser.test.ts +38 -0
- package/src/server/claude-session-parser.ts +67 -0
- package/src/server/claude-session-scanner.test.ts +49 -0
- package/src/server/claude-session-scanner.ts +24 -0
- package/src/server/claude-session-types.ts +61 -0
- package/src/server/cli-runtime.test.ts +523 -0
- package/src/server/cli-runtime.ts +405 -0
- package/src/server/cli-supervisor.ts +102 -0
- package/src/server/cli.ts +64 -0
- package/src/server/cloudflare-tunnel/agent-integration.test.ts +76 -0
- package/src/server/cloudflare-tunnel/agent-integration.ts +55 -0
- package/src/server/cloudflare-tunnel/detector.test.ts +72 -0
- package/src/server/cloudflare-tunnel/detector.ts +44 -0
- package/src/server/cloudflare-tunnel/e2e.test.ts +194 -0
- package/src/server/cloudflare-tunnel/events.test.ts +43 -0
- package/src/server/cloudflare-tunnel/events.ts +31 -0
- package/src/server/cloudflare-tunnel/gateway.ts +143 -0
- package/src/server/cloudflare-tunnel/lifecycle.test.ts +48 -0
- package/src/server/cloudflare-tunnel/lifecycle.ts +62 -0
- package/src/server/cloudflare-tunnel/read-model.test.ts +69 -0
- package/src/server/cloudflare-tunnel/read-model.ts +80 -0
- package/src/server/cloudflare-tunnel/tunnel-manager.test.ts +116 -0
- package/src/server/cloudflare-tunnel/tunnel-manager.ts +165 -0
- package/src/server/codex-app-server-protocol.ts +487 -0
- package/src/server/codex-app-server.test.ts +1816 -0
- package/src/server/codex-app-server.ts +1475 -0
- package/src/server/diff-store.test.ts +737 -0
- package/src/server/diff-store.ts +2199 -0
- package/src/server/discovery.test.ts +211 -0
- package/src/server/discovery.ts +301 -0
- package/src/server/event-store.test.ts +797 -0
- package/src/server/event-store.ts +1421 -0
- package/src/server/events.ts +217 -0
- package/src/server/external-open.test.ts +112 -0
- package/src/server/external-open.ts +345 -0
- package/src/server/generate-commit-message.test.ts +79 -0
- package/src/server/generate-commit-message.ts +126 -0
- package/src/server/generate-title.ts +76 -0
- package/src/server/harness-types.ts +19 -0
- package/src/server/keybindings.test.ts +144 -0
- package/src/server/keybindings.ts +178 -0
- package/src/server/llm-provider.test.ts +134 -0
- package/src/server/llm-provider.ts +207 -0
- package/src/server/machine-name.ts +22 -0
- package/src/server/paths-route.test.ts +64 -0
- package/src/server/paths.ts +35 -0
- package/src/server/process-utils.test.ts +12 -0
- package/src/server/process-utils.ts +47 -0
- package/src/server/project-paths.test.ts +95 -0
- package/src/server/project-paths.ts +191 -0
- package/src/server/provider-catalog.test.ts +69 -0
- package/src/server/provider-catalog.ts +87 -0
- package/src/server/quick-response.test.ts +440 -0
- package/src/server/quick-response.ts +300 -0
- package/src/server/read-models.test.ts +509 -0
- package/src/server/read-models.ts +230 -0
- package/src/server/restart.test.ts +27 -0
- package/src/server/restart.ts +30 -0
- package/src/server/server.ts +616 -0
- package/src/server/share.test.ts +180 -0
- package/src/server/share.ts +150 -0
- package/src/server/standalone-export.test.ts +224 -0
- package/src/server/standalone-export.ts +419 -0
- package/src/server/terminal-manager.test.ts +315 -0
- package/src/server/terminal-manager.ts +350 -0
- package/src/server/test-helpers/async-event-queue.ts +52 -0
- package/src/server/test-helpers/wait-for.ts +14 -0
- package/src/server/title-generation.live.test.ts +44 -0
- package/src/server/update-manager.test.ts +158 -0
- package/src/server/update-manager.ts +222 -0
- package/src/server/update-strategy.test.ts +237 -0
- package/src/server/update-strategy.ts +241 -0
- package/src/server/uploads.test.ts +292 -0
- package/src/server/uploads.ts +131 -0
- package/src/server/ws-router.test.ts +2292 -0
- package/src/server/ws-router.ts +1465 -0
- package/src/shared/analytics.ts +30 -0
- package/src/shared/branding.test.ts +31 -0
- package/src/shared/branding.ts +77 -0
- package/src/shared/dev-ports.test.ts +113 -0
- package/src/shared/dev-ports.ts +134 -0
- package/src/shared/ports.ts +2 -0
- package/src/shared/protocol.ts +257 -0
- package/src/shared/share.ts +27 -0
- package/src/shared/tools.test.ts +164 -0
- package/src/shared/tools.ts +327 -0
- package/src/shared/types.test.ts +25 -0
- package/src/shared/types.ts +1088 -0
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
function AT(e,t){for(var r=0;r<t.length;r++){const l=t[r];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(l,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>l[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&l(u)}).observe(document,{childList:!0,subtree:!0});function r(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function l(o){if(o.ep)return;o.ep=!0;const s=r(o);fetch(o.href,s)}})();function kc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cm={exports:{}},La={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var H0;function TT(){if(H0)return La;H0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(l,o,s){var u=null;if(s!==void 0&&(u=""+s),o.key!==void 0&&(u=""+o.key),"key"in o){s={};for(var f in o)f!=="key"&&(s[f]=o[f])}else s=o;return o=s.ref,{$$typeof:e,type:l,key:u,ref:o!==void 0?o:null,props:s}}return La.Fragment=t,La.jsx=r,La.jsxs=r,La}var V0;function _T(){return V0||(V0=1,cm.exports=TT()),cm.exports}var v=_T(),fm={exports:{}},Ie={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var q0;function MT(){if(q0)return Ie;q0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),x=Symbol.iterator;function b(O){return O===null||typeof O!="object"?null:(O=x&&O[x]||O["@@iterator"],typeof O=="function"?O:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,E={};function A(O,H,R){this.props=O,this.context=H,this.refs=E,this.updater=R||w}A.prototype.isReactComponent={},A.prototype.setState=function(O,H){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,H,"setState")},A.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function _(){}_.prototype=A.prototype;function M(O,H,R){this.props=O,this.context=H,this.refs=E,this.updater=R||w}var z=M.prototype=new _;z.constructor=M,C(z,A.prototype),z.isPureReactComponent=!0;var P=Array.isArray;function j(){}var U={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function Z(O,H,R){var ue=R.ref;return{$$typeof:e,type:O,key:H,ref:ue!==void 0?ue:null,props:R}}function D(O,H){return Z(O.type,H,O.props)}function X(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function W(O){var H={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(R){return H[R]})}var oe=/\/+/g;function ne(O,H){return typeof O=="object"&&O!==null&&O.key!=null?W(""+O.key):H.toString(36)}function J(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(j,j):(O.status="pending",O.then(function(H){O.status==="pending"&&(O.status="fulfilled",O.value=H)},function(H){O.status==="pending"&&(O.status="rejected",O.reason=H)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function I(O,H,R,ue,fe){var se=typeof O;(se==="undefined"||se==="boolean")&&(O=null);var re=!1;if(O===null)re=!0;else switch(se){case"bigint":case"string":case"number":re=!0;break;case"object":switch(O.$$typeof){case e:case t:re=!0;break;case g:return re=O._init,I(re(O._payload),H,R,ue,fe)}}if(re)return fe=fe(O),re=ue===""?"."+ne(O,0):ue,P(fe)?(R="",re!=null&&(R=re.replace(oe,"$&/")+"/"),I(fe,H,R,"",function(ge){return ge})):fe!=null&&(X(fe)&&(fe=D(fe,R+(fe.key==null||O&&O.key===fe.key?"":(""+fe.key).replace(oe,"$&/")+"/")+re)),H.push(fe)),1;re=0;var he=ue===""?".":ue+":";if(P(O))for(var ce=0;ce<O.length;ce++)ue=O[ce],se=he+ne(ue,ce),re+=I(ue,H,R,se,fe);else if(ce=b(O),typeof ce=="function")for(O=ce.call(O),ce=0;!(ue=O.next()).done;)ue=ue.value,se=he+ne(ue,ce++),re+=I(ue,H,R,se,fe);else if(se==="object"){if(typeof O.then=="function")return I(J(O),H,R,ue,fe);throw H=String(O),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return re}function Y(O,H,R){if(O==null)return O;var ue=[],fe=0;return I(O,ue,"","",function(se){return H.call(R,se,fe++)}),ue}function G(O){if(O._status===-1){var H=O._result;H=H(),H.then(function(R){(O._status===0||O._status===-1)&&(O._status=1,O._result=R)},function(R){(O._status===0||O._status===-1)&&(O._status=2,O._result=R)}),O._status===-1&&(O._status=0,O._result=H)}if(O._status===1)return O._result.default;throw O._result}var V=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},T={map:Y,forEach:function(O,H,R){Y(O,function(){H.apply(this,arguments)},R)},count:function(O){var H=0;return Y(O,function(){H++}),H},toArray:function(O){return Y(O,function(H){return H})||[]},only:function(O){if(!X(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Ie.Activity=p,Ie.Children=T,Ie.Component=A,Ie.Fragment=r,Ie.Profiler=o,Ie.PureComponent=M,Ie.StrictMode=l,Ie.Suspense=d,Ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Ie.__COMPILER_RUNTIME={__proto__:null,c:function(O){return U.H.useMemoCache(O)}},Ie.cache=function(O){return function(){return O.apply(null,arguments)}},Ie.cacheSignal=function(){return null},Ie.cloneElement=function(O,H,R){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var ue=C({},O.props),fe=O.key;if(H!=null)for(se in H.key!==void 0&&(fe=""+H.key),H)!B.call(H,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&H.ref===void 0||(ue[se]=H[se]);var se=arguments.length-2;if(se===1)ue.children=R;else if(1<se){for(var re=Array(se),he=0;he<se;he++)re[he]=arguments[he+2];ue.children=re}return Z(O.type,fe,ue)},Ie.createContext=function(O){return O={$$typeof:u,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:s,_context:O},O},Ie.createElement=function(O,H,R){var ue,fe={},se=null;if(H!=null)for(ue in H.key!==void 0&&(se=""+H.key),H)B.call(H,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(fe[ue]=H[ue]);var re=arguments.length-2;if(re===1)fe.children=R;else if(1<re){for(var he=Array(re),ce=0;ce<re;ce++)he[ce]=arguments[ce+2];fe.children=he}if(O&&O.defaultProps)for(ue in re=O.defaultProps,re)fe[ue]===void 0&&(fe[ue]=re[ue]);return Z(O,se,fe)},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(O){return{$$typeof:f,render:O}},Ie.isValidElement=X,Ie.lazy=function(O){return{$$typeof:g,_payload:{_status:-1,_result:O},_init:G}},Ie.memo=function(O,H){return{$$typeof:m,type:O,compare:H===void 0?null:H}},Ie.startTransition=function(O){var H=U.T,R={};U.T=R;try{var ue=O(),fe=U.S;fe!==null&&fe(R,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(j,V)}catch(se){V(se)}finally{H!==null&&R.types!==null&&(H.types=R.types),U.T=H}},Ie.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},Ie.use=function(O){return U.H.use(O)},Ie.useActionState=function(O,H,R){return U.H.useActionState(O,H,R)},Ie.useCallback=function(O,H){return U.H.useCallback(O,H)},Ie.useContext=function(O){return U.H.useContext(O)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(O,H){return U.H.useDeferredValue(O,H)},Ie.useEffect=function(O,H){return U.H.useEffect(O,H)},Ie.useEffectEvent=function(O){return U.H.useEffectEvent(O)},Ie.useId=function(){return U.H.useId()},Ie.useImperativeHandle=function(O,H,R){return U.H.useImperativeHandle(O,H,R)},Ie.useInsertionEffect=function(O,H){return U.H.useInsertionEffect(O,H)},Ie.useLayoutEffect=function(O,H){return U.H.useLayoutEffect(O,H)},Ie.useMemo=function(O,H){return U.H.useMemo(O,H)},Ie.useOptimistic=function(O,H){return U.H.useOptimistic(O,H)},Ie.useReducer=function(O,H,R){return U.H.useReducer(O,H,R)},Ie.useRef=function(O){return U.H.useRef(O)},Ie.useState=function(O){return U.H.useState(O)},Ie.useSyncExternalStore=function(O,H,R){return U.H.useSyncExternalStore(O,H,R)},Ie.useTransition=function(){return U.H.useTransition()},Ie.version="19.2.1",Ie}var G0;function Ec(){return G0||(G0=1,fm.exports=MT()),fm.exports}var S=Ec();const Fn=kc(S),h1=AT({__proto__:null,default:Fn},[S]);var dm={exports:{}},Pa={},mm={exports:{}},pm={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Y0;function NT(){return Y0||(Y0=1,(function(e){function t(I,Y){var G=I.length;I.push(Y);e:for(;0<G;){var V=G-1>>>1,T=I[V];if(0<o(T,Y))I[V]=Y,I[G]=T,G=V;else break e}}function r(I){return I.length===0?null:I[0]}function l(I){if(I.length===0)return null;var Y=I[0],G=I.pop();if(G!==Y){I[0]=G;e:for(var V=0,T=I.length,O=T>>>1;V<O;){var H=2*(V+1)-1,R=I[H],ue=H+1,fe=I[ue];if(0>o(R,G))ue<T&&0>o(fe,R)?(I[V]=fe,I[ue]=G,V=ue):(I[V]=R,I[H]=G,V=H);else if(ue<T&&0>o(fe,G))I[V]=fe,I[ue]=G,V=ue;else break e}}return Y}function o(I,Y){var G=I.sortIndex-Y.sortIndex;return G!==0?G:I.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var d=[],m=[],g=1,p=null,x=3,b=!1,w=!1,C=!1,E=!1,A=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function z(I){for(var Y=r(m);Y!==null;){if(Y.callback===null)l(m);else if(Y.startTime<=I)l(m),Y.sortIndex=Y.expirationTime,t(d,Y);else break;Y=r(m)}}function P(I){if(C=!1,z(I),!w)if(r(d)!==null)w=!0,j||(j=!0,W());else{var Y=r(m);Y!==null&&J(P,Y.startTime-I)}}var j=!1,U=-1,B=5,Z=-1;function D(){return E?!0:!(e.unstable_now()-Z<B)}function X(){if(E=!1,j){var I=e.unstable_now();Z=I;var Y=!0;try{e:{w=!1,C&&(C=!1,_(U),U=-1),b=!0;var G=x;try{t:{for(z(I),p=r(d);p!==null&&!(p.expirationTime>I&&D());){var V=p.callback;if(typeof V=="function"){p.callback=null,x=p.priorityLevel;var T=V(p.expirationTime<=I);if(I=e.unstable_now(),typeof T=="function"){p.callback=T,z(I),Y=!0;break t}p===r(d)&&l(d),z(I)}else l(d);p=r(d)}if(p!==null)Y=!0;else{var O=r(m);O!==null&&J(P,O.startTime-I),Y=!1}}break e}finally{p=null,x=G,b=!1}Y=void 0}}finally{Y?W():j=!1}}}var W;if(typeof M=="function")W=function(){M(X)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,ne=oe.port2;oe.port1.onmessage=X,W=function(){ne.postMessage(null)}}else W=function(){A(X,0)};function J(I,Y){U=A(function(){I(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(I){switch(x){case 1:case 2:case 3:var Y=3;break;default:Y=x}var G=x;x=Y;try{return I()}finally{x=G}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(I,Y){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var G=x;x=I;try{return Y()}finally{x=G}},e.unstable_scheduleCallback=function(I,Y,G){var V=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?V+G:V):G=V,I){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=G+T,I={id:g++,callback:Y,priorityLevel:I,startTime:G,expirationTime:T,sortIndex:-1},G>V?(I.sortIndex=G,t(m,I),r(d)===null&&I===r(m)&&(C?(_(U),U=-1):C=!0,J(P,G-V))):(I.sortIndex=T,t(d,I),w||b||(w=!0,j||(j=!0,W()))),I},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(I){var Y=x;return function(){var G=x;x=Y;try{return I.apply(this,arguments)}finally{x=G}}}})(pm)),pm}var K0;function RT(){return K0||(K0=1,mm.exports=NT()),mm.exports}var hm={exports:{}},fn={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var $0;function OT(){if($0)return fn;$0=1;var e=Ec();function t(d){var m="https://react.dev/errors/"+d;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var l={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(d,m,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:d,containerInfo:m,implementation:g}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,m){if(d==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return fn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,fn.createPortal=function(d,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return s(d,m,null,g)},fn.flushSync=function(d){var m=u.T,g=l.p;try{if(u.T=null,l.p=2,d)return d()}finally{u.T=m,l.p=g,l.d.f()}},fn.preconnect=function(d,m){typeof d=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,l.d.C(d,m))},fn.prefetchDNS=function(d){typeof d=="string"&&l.d.D(d)},fn.preinit=function(d,m){if(typeof d=="string"&&m&&typeof m.as=="string"){var g=m.as,p=f(g,m.crossOrigin),x=typeof m.integrity=="string"?m.integrity:void 0,b=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?l.d.S(d,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:p,integrity:x,fetchPriority:b}):g==="script"&&l.d.X(d,{crossOrigin:p,integrity:x,fetchPriority:b,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},fn.preinitModule=function(d,m){if(typeof d=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=f(m.as,m.crossOrigin);l.d.M(d,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&l.d.M(d)},fn.preload=function(d,m){if(typeof d=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,p=f(g,m.crossOrigin);l.d.L(d,g,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},fn.preloadModule=function(d,m){if(typeof d=="string")if(m){var g=f(m.as,m.crossOrigin);l.d.m(d,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else l.d.m(d)},fn.requestFormReset=function(d){l.d.r(d)},fn.unstable_batchedUpdates=function(d,m){return d(m)},fn.useFormState=function(d,m,g){return u.H.useFormState(d,m,g)},fn.useFormStatus=function(){return u.H.useHostTransitionStatus()},fn.version="19.2.1",fn}var X0;function g1(){if(X0)return hm.exports;X0=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(),hm.exports=OT(),hm.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Q0;function jT(){if(Q0)return Pa;Q0=1;var e=RT(),t=Ec(),r=g1();function l(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function s(n){var i=n,a=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(a=i.return),n=i.return;while(n)}return i.tag===3?a:null}function u(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function f(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function d(n){if(s(n)!==n)throw Error(l(188))}function m(n){var i=n.alternate;if(!i){if(i=s(n),i===null)throw Error(l(188));return i!==n?null:n}for(var a=n,c=i;;){var h=a.return;if(h===null)break;var y=h.alternate;if(y===null){if(c=h.return,c!==null){a=c;continue}break}if(h.child===y.child){for(y=h.child;y;){if(y===a)return d(h),n;if(y===c)return d(h),i;y=y.sibling}throw Error(l(188))}if(a.return!==c.return)a=h,c=y;else{for(var k=!1,N=h.child;N;){if(N===a){k=!0,a=h,c=y;break}if(N===c){k=!0,c=h,a=y;break}N=N.sibling}if(!k){for(N=y.child;N;){if(N===a){k=!0,a=y,c=h;break}if(N===c){k=!0,c=y,a=h;break}N=N.sibling}if(!k)throw Error(l(189))}}if(a.alternate!==c)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?n:i}function g(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=g(n),i!==null)return i;n=n.sibling}return null}var p=Object.assign,x=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),M=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function W(n){return n===null||typeof n!="object"?null:(n=X&&n[X]||n["@@iterator"],typeof n=="function"?n:null)}var oe=Symbol.for("react.client.reference");function ne(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===oe?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case C:return"Fragment";case A:return"Profiler";case E:return"StrictMode";case P:return"Suspense";case j:return"SuspenseList";case Z:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case w:return"Portal";case M:return n.displayName||"Context";case _:return(n._context.displayName||"Context")+".Consumer";case z:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case U:return i=n.displayName||null,i!==null?i:ne(n.type)||"Memo";case B:i=n._payload,n=n._init;try{return ne(n(i))}catch{}}return null}var J=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},V=[],T=-1;function O(n){return{current:n}}function H(n){0>T||(n.current=V[T],V[T]=null,T--)}function R(n,i){T++,V[T]=n.current,n.current=i}var ue=O(null),fe=O(null),se=O(null),re=O(null);function he(n,i){switch(R(se,i),R(fe,n),R(ue,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?f0(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=f0(i),n=d0(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}H(ue),R(ue,n)}function ce(){H(ue),H(fe),H(se)}function ge(n){n.memoizedState!==null&&R(re,n);var i=ue.current,a=d0(i,n.type);i!==a&&(R(fe,n),R(ue,a))}function Ce(n){fe.current===n&&(H(ue),H(fe)),re.current===n&&(H(re),ja._currentValue=G)}var ke,We;function $e(n){if(ke===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);ke=i&&i[1]||"",We=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ke+n+We}var bt=!1;function Kt(n,i){if(!n||bt)return"";bt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var ae=function(){throw Error()};if(Object.defineProperty(ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ae,[])}catch(ee){var Q=ee}Reflect.construct(n,[],ae)}else{try{ae.call()}catch(ee){Q=ee}n.call(ae.prototype)}}else{try{throw Error()}catch(ee){Q=ee}(ae=n())&&typeof ae.catch=="function"&&ae.catch(function(){})}}catch(ee){if(ee&&Q&&typeof ee.stack=="string")return[ee.stack,Q.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=c.DetermineComponentFrameRoot(),k=y[0],N=y[1];if(k&&N){var L=k.split(`
|
|
44
|
+
`),$=N.split(`
|
|
45
|
+
`);for(h=c=0;c<L.length&&!L[c].includes("DetermineComponentFrameRoot");)c++;for(;h<$.length&&!$[h].includes("DetermineComponentFrameRoot");)h++;if(c===L.length||h===$.length)for(c=L.length-1,h=$.length-1;1<=c&&0<=h&&L[c]!==$[h];)h--;for(;1<=c&&0<=h;c--,h--)if(L[c]!==$[h]){if(c!==1||h!==1)do if(c--,h--,0>h||L[c]!==$[h]){var ie=`
|
|
46
|
+
`+L[c].replace(" at new "," at ");return n.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",n.displayName)),ie}while(1<=c&&0<=h);break}}}finally{bt=!1,Error.prepareStackTrace=a}return(a=n?n.displayName||n.name:"")?$e(a):""}function en(n,i){switch(n.tag){case 26:case 27:case 5:return $e(n.type);case 16:return $e("Lazy");case 13:return n.child!==i&&i!==null?$e("Suspense Fallback"):$e("Suspense");case 19:return $e("SuspenseList");case 0:case 15:return Kt(n.type,!1);case 11:return Kt(n.type.render,!1);case 1:return Kt(n.type,!0);case 31:return $e("Activity");default:return""}}function Nn(n){try{var i="",a=null;do i+=en(n,a),a=n,n=n.return;while(n);return i}catch(c){return`
|
|
47
|
+
Error generating stack: `+c.message+`
|
|
48
|
+
`+c.stack}}var Qt=Object.prototype.hasOwnProperty,Rn=e.unstable_scheduleCallback,Nt=e.unstable_cancelCallback,je=e.unstable_shouldYield,at=e.unstable_requestPaint,De=e.unstable_now,gt=e.unstable_getCurrentPriorityLevel,te=e.unstable_ImmediatePriority,de=e.unstable_UserBlockingPriority,Ee=e.unstable_NormalPriority,ze=e.unstable_LowPriority,Xe=e.unstable_IdlePriority,Zt=e.log,Ut=e.unstable_setDisableYieldValue,St=null,Et=null;function Mt(n){if(typeof Zt=="function"&&Ut(n),Et&&typeof Et.setStrictMode=="function")try{Et.setStrictMode(St,n)}catch{}}var qe=Math.clz32?Math.clz32:si,tn=Math.log,un=Math.LN2;function si(n){return n>>>=0,n===0?32:31-(tn(n)/un|0)|0}var Yn=256,bn=262144,Kn=4194304;function nn(n){var i=n&42;if(i!==0)return i;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function cr(n,i,a){var c=n.pendingLanes;if(c===0)return 0;var h=0,y=n.suspendedLanes,k=n.pingedLanes;n=n.warmLanes;var N=c&134217727;return N!==0?(c=N&~y,c!==0?h=nn(c):(k&=N,k!==0?h=nn(k):a||(a=N&~n,a!==0&&(h=nn(a))))):(N=c&~y,N!==0?h=nn(N):k!==0?h=nn(k):a||(a=c&~n,a!==0&&(h=nn(a)))),h===0?0:i!==0&&i!==h&&(i&y)===0&&(y=h&-h,a=i&-i,y>=a||y===32&&(a&4194048)!==0)?i:h}function rn(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function Ft(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function zr(){var n=Kn;return Kn<<=1,(Kn&62914560)===0&&(Kn=4194304),n}function wr(n){for(var i=[],a=0;31>a;a++)i.push(n);return i}function pe(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function it(n,i,a,c,h,y){var k=n.pendingLanes;n.pendingLanes=a,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=a,n.entangledLanes&=a,n.errorRecoveryDisabledLanes&=a,n.shellSuspendCounter=0;var N=n.entanglements,L=n.expirationTimes,$=n.hiddenUpdates;for(a=k&~a;0<a;){var ie=31-qe(a),ae=1<<ie;N[ie]=0,L[ie]=-1;var Q=$[ie];if(Q!==null)for($[ie]=null,ie=0;ie<Q.length;ie++){var ee=Q[ie];ee!==null&&(ee.lane&=-536870913)}a&=~ae}c!==0&&Le(n,c,0),y!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=y&~(k&~i))}function Le(n,i,a){n.pendingLanes|=i,n.suspendedLanes&=~i;var c=31-qe(i);n.entangledLanes|=i,n.entanglements[c]=n.entanglements[c]|1073741824|a&261930}function He(n,i){var a=n.entangledLanes|=i;for(n=n.entanglements;a;){var c=31-qe(a),h=1<<c;h&i|n[c]&i&&(n[c]|=i),a&=~h}}function It(n,i){var a=i&-i;return a=(a&42)!==0?1:Wt(a),(a&(n.suspendedLanes|i))!==0?0:a}function Wt(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Rt(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Oe(){var n=Y.p;return n!==0?n:(n=window.event,n===void 0?32:I0(n.type))}function $n(n,i){var a=Y.p;try{return Y.p=n,i()}finally{Y.p=a}}var cn=Math.random().toString(36).slice(2),wt="__reactFiber$"+cn,ft="__reactProps$"+cn,Ir="__reactContainer$"+cn,Il="__reactEvents$"+cn,fr="__reactListeners$"+cn,Qi="__reactHandles$"+cn,Ko="__reactResources$"+cn,lt="__reactMarker$"+cn;function Zi(n){delete n[wt],delete n[ft],delete n[Il],delete n[fr],delete n[Qi]}function ui(n){var i=n[wt];if(i)return i;for(var a=n.parentNode;a;){if(i=a[Ir]||a[wt]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(n=x0(n);n!==null;){if(a=n[wt])return a;n=x0(n)}return i}n=a,a=n.parentNode}return null}function Wi(n){if(n=n[wt]||n[Ir]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function dr(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(l(33))}function ci(n){var i=n[Ko];return i||(i=n[Ko]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Dt(n){n[lt]=!0}var $o=new Set,Xo={};function Dr(n,i){fi(n,i),fi(n+"Capture",i)}function fi(n,i){for(Xo[n]=i,n=0;n<i.length;n++)$o.add(i[n])}var ef=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ji={},bs={};function Dl(n){return Qt.call(bs,n)?!0:Qt.call(Ji,n)?!1:ef.test(n)?bs[n]=!0:(Ji[n]=!0,!1)}function Be(n,i,a){if(Dl(i))if(a===null)n.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+a)}}function dt(n,i,a){if(a===null)n.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+a)}}function Lt(n,i,a,c){if(c===null)n.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttributeNS(i,a,""+c)}}function At(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function tf(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function xE(n,i,a){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var h=c.get,y=c.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return h.call(this)},set:function(k){a=""+k,y.call(this,k)}}),Object.defineProperty(n,i,{enumerable:c.enumerable}),{getValue:function(){return a},setValue:function(k){a=""+k},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function nf(n){if(!n._valueTracker){var i=tf(n)?"checked":"value";n._valueTracker=xE(n,i,""+n[i])}}function ig(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var a=i.getValue(),c="";return n&&(c=tf(n)?n.checked?"true":"false":n.value),n=c,n!==a?(i.setValue(n),!0):!1}function Ss(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var bE=/[\n"\\]/g;function Xn(n){return n.replace(bE,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function rf(n,i,a,c,h,y,k,N){n.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?n.type=k:n.removeAttribute("type"),i!=null?k==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+At(i)):n.value!==""+At(i)&&(n.value=""+At(i)):k!=="submit"&&k!=="reset"||n.removeAttribute("value"),i!=null?lf(n,k,At(i)):a!=null?lf(n,k,At(a)):c!=null&&n.removeAttribute("value"),h==null&&y!=null&&(n.defaultChecked=!!y),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?n.name=""+At(N):n.removeAttribute("name")}function lg(n,i,a,c,h,y,k,N){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.type=y),i!=null||a!=null){if(!(y!=="submit"&&y!=="reset"||i!=null)){nf(n);return}a=a!=null?""+At(a):"",i=i!=null?""+At(i):a,N||i===n.value||(n.value=i),n.defaultValue=i}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=N?n.checked:!!c,n.defaultChecked=!!c,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(n.name=k),nf(n)}function lf(n,i,a){i==="number"&&Ss(n.ownerDocument)===n||n.defaultValue===""+a||(n.defaultValue=""+a)}function Ll(n,i,a,c){if(n=n.options,i){i={};for(var h=0;h<a.length;h++)i["$"+a[h]]=!0;for(a=0;a<n.length;a++)h=i.hasOwnProperty("$"+n[a].value),n[a].selected!==h&&(n[a].selected=h),h&&c&&(n[a].defaultSelected=!0)}else{for(a=""+At(a),i=null,h=0;h<n.length;h++){if(n[h].value===a){n[h].selected=!0,c&&(n[h].defaultSelected=!0);return}i!==null||n[h].disabled||(i=n[h])}i!==null&&(i.selected=!0)}}function og(n,i,a){if(i!=null&&(i=""+At(i),i!==n.value&&(n.value=i),a==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=a!=null?""+At(a):""}function ag(n,i,a,c){if(i==null){if(c!=null){if(a!=null)throw Error(l(92));if(J(c)){if(1<c.length)throw Error(l(93));c=c[0]}a=c}a==null&&(a=""),i=a}a=At(i),n.defaultValue=a,c=n.textContent,c===a&&c!==""&&c!==null&&(n.value=c),nf(n)}function Pl(n,i){if(i){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=i;return}}n.textContent=i}var SE=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function sg(n,i,a){var c=i.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?c?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":c?n.setProperty(i,a):typeof a!="number"||a===0||SE.has(i)?i==="float"?n.cssFloat=a:n[i]=(""+a).trim():n[i]=a+"px"}function ug(n,i,a){if(i!=null&&typeof i!="object")throw Error(l(62));if(n=n.style,a!=null){for(var c in a)!a.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var h in i)c=i[h],i.hasOwnProperty(h)&&a[h]!==c&&sg(n,h,c)}else for(var y in i)i.hasOwnProperty(y)&&sg(n,y,i[y])}function of(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wE=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),CE=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ws(n){return CE.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Lr(){}var af=null;function sf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Bl=null,Ul=null;function cg(n){var i=Wi(n);if(i&&(n=i.stateNode)){var a=n[ft]||null;e:switch(n=i.stateNode,i.type){case"input":if(rf(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),i=a.name,a.type==="radio"&&i!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Xn(""+i)+'"][type="radio"]'),i=0;i<a.length;i++){var c=a[i];if(c!==n&&c.form===n.form){var h=c[ft]||null;if(!h)throw Error(l(90));rf(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(i=0;i<a.length;i++)c=a[i],c.form===n.form&&ig(c)}break e;case"textarea":og(n,a.value,a.defaultValue);break e;case"select":i=a.value,i!=null&&Ll(n,!!a.multiple,i,!1)}}}var uf=!1;function fg(n,i,a){if(uf)return n(i,a);uf=!0;try{var c=n(i);return c}finally{if(uf=!1,(Bl!==null||Ul!==null)&&(uu(),Bl&&(i=Bl,n=Ul,Ul=Bl=null,cg(i),n)))for(i=0;i<n.length;i++)cg(n[i])}}function Qo(n,i){var a=n.stateNode;if(a===null)return null;var c=a[ft]||null;if(c===null)return null;a=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(l(231,i,typeof a));return a}var Pr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cf=!1;if(Pr)try{var Zo={};Object.defineProperty(Zo,"passive",{get:function(){cf=!0}}),window.addEventListener("test",Zo,Zo),window.removeEventListener("test",Zo,Zo)}catch{cf=!1}var di=null,ff=null,Cs=null;function dg(){if(Cs)return Cs;var n,i=ff,a=i.length,c,h="value"in di?di.value:di.textContent,y=h.length;for(n=0;n<a&&i[n]===h[n];n++);var k=a-n;for(c=1;c<=k&&i[a-c]===h[y-c];c++);return Cs=h.slice(n,1<c?1-c:void 0)}function ks(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function Es(){return!0}function mg(){return!1}function Sn(n){function i(a,c,h,y,k){this._reactName=a,this._targetInst=h,this.type=c,this.nativeEvent=y,this.target=k,this.currentTarget=null;for(var N in n)n.hasOwnProperty(N)&&(a=n[N],this[N]=a?a(y):y[N]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Es:mg,this.isPropagationStopped=mg,this}return p(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Es)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Es)},persist:function(){},isPersistent:Es}),i}var el={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},As=Sn(el),Wo=p({},el,{view:0,detail:0}),kE=Sn(Wo),df,mf,Jo,Ts=p({},Wo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hf,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Jo&&(Jo&&n.type==="mousemove"?(df=n.screenX-Jo.screenX,mf=n.screenY-Jo.screenY):mf=df=0,Jo=n),df)},movementY:function(n){return"movementY"in n?n.movementY:mf}}),pg=Sn(Ts),EE=p({},Ts,{dataTransfer:0}),AE=Sn(EE),TE=p({},Wo,{relatedTarget:0}),pf=Sn(TE),_E=p({},el,{animationName:0,elapsedTime:0,pseudoElement:0}),ME=Sn(_E),NE=p({},el,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),RE=Sn(NE),OE=p({},el,{data:0}),hg=Sn(OE),jE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zE={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},IE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function DE(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=IE[n])?!!i[n]:!1}function hf(){return DE}var LE=p({},Wo,{key:function(n){if(n.key){var i=jE[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=ks(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?zE[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hf,charCode:function(n){return n.type==="keypress"?ks(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?ks(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),PE=Sn(LE),BE=p({},Ts,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gg=Sn(BE),UE=p({},Wo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hf}),FE=Sn(UE),HE=p({},el,{propertyName:0,elapsedTime:0,pseudoElement:0}),VE=Sn(HE),qE=p({},Ts,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),GE=Sn(qE),YE=p({},el,{newState:0,oldState:0}),KE=Sn(YE),$E=[9,13,27,32],gf=Pr&&"CompositionEvent"in window,ea=null;Pr&&"documentMode"in document&&(ea=document.documentMode);var XE=Pr&&"TextEvent"in window&&!ea,yg=Pr&&(!gf||ea&&8<ea&&11>=ea),vg=" ",xg=!1;function bg(n,i){switch(n){case"keyup":return $E.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Fl=!1;function QE(n,i){switch(n){case"compositionend":return Sg(i);case"keypress":return i.which!==32?null:(xg=!0,vg);case"textInput":return n=i.data,n===vg&&xg?null:n;default:return null}}function ZE(n,i){if(Fl)return n==="compositionend"||!gf&&bg(n,i)?(n=dg(),Cs=ff=di=null,Fl=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return yg&&i.locale!=="ko"?null:i.data;default:return null}}var WE={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function wg(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!WE[n.type]:i==="textarea"}function Cg(n,i,a,c){Bl?Ul?Ul.push(c):Ul=[c]:Bl=c,i=gu(i,"onChange"),0<i.length&&(a=new As("onChange","change",null,a,c),n.push({event:a,listeners:i}))}var ta=null,na=null;function JE(n){l0(n,0)}function _s(n){var i=dr(n);if(ig(i))return n}function kg(n,i){if(n==="change")return i}var Eg=!1;if(Pr){var yf;if(Pr){var vf="oninput"in document;if(!vf){var Ag=document.createElement("div");Ag.setAttribute("oninput","return;"),vf=typeof Ag.oninput=="function"}yf=vf}else yf=!1;Eg=yf&&(!document.documentMode||9<document.documentMode)}function Tg(){ta&&(ta.detachEvent("onpropertychange",_g),na=ta=null)}function _g(n){if(n.propertyName==="value"&&_s(na)){var i=[];Cg(i,na,n,sf(n)),fg(JE,i)}}function eA(n,i,a){n==="focusin"?(Tg(),ta=i,na=a,ta.attachEvent("onpropertychange",_g)):n==="focusout"&&Tg()}function tA(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return _s(na)}function nA(n,i){if(n==="click")return _s(i)}function rA(n,i){if(n==="input"||n==="change")return _s(i)}function iA(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var On=typeof Object.is=="function"?Object.is:iA;function ra(n,i){if(On(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var a=Object.keys(n),c=Object.keys(i);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var h=a[c];if(!Qt.call(i,h)||!On(n[h],i[h]))return!1}return!0}function Mg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Ng(n,i){var a=Mg(n);n=0;for(var c;a;){if(a.nodeType===3){if(c=n+a.textContent.length,n<=i&&c>=i)return{node:a,offset:i-n};n=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Mg(a)}}function Rg(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?Rg(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function Og(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=Ss(n.document);i instanceof n.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)n=i.contentWindow;else break;i=Ss(n.document)}return i}function xf(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var lA=Pr&&"documentMode"in document&&11>=document.documentMode,Hl=null,bf=null,ia=null,Sf=!1;function jg(n,i,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Sf||Hl==null||Hl!==Ss(c)||(c=Hl,"selectionStart"in c&&xf(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ia&&ra(ia,c)||(ia=c,c=gu(bf,"onSelect"),0<c.length&&(i=new As("onSelect","select",null,i,a),n.push({event:i,listeners:c}),i.target=Hl)))}function tl(n,i){var a={};return a[n.toLowerCase()]=i.toLowerCase(),a["Webkit"+n]="webkit"+i,a["Moz"+n]="moz"+i,a}var Vl={animationend:tl("Animation","AnimationEnd"),animationiteration:tl("Animation","AnimationIteration"),animationstart:tl("Animation","AnimationStart"),transitionrun:tl("Transition","TransitionRun"),transitionstart:tl("Transition","TransitionStart"),transitioncancel:tl("Transition","TransitionCancel"),transitionend:tl("Transition","TransitionEnd")},wf={},zg={};Pr&&(zg=document.createElement("div").style,"AnimationEvent"in window||(delete Vl.animationend.animation,delete Vl.animationiteration.animation,delete Vl.animationstart.animation),"TransitionEvent"in window||delete Vl.transitionend.transition);function nl(n){if(wf[n])return wf[n];if(!Vl[n])return n;var i=Vl[n],a;for(a in i)if(i.hasOwnProperty(a)&&a in zg)return wf[n]=i[a];return n}var Ig=nl("animationend"),Dg=nl("animationiteration"),Lg=nl("animationstart"),oA=nl("transitionrun"),aA=nl("transitionstart"),sA=nl("transitioncancel"),Pg=nl("transitionend"),Bg=new Map,Cf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Cf.push("scrollEnd");function mr(n,i){Bg.set(n,i),Dr(i,[n])}var Ms=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Qn=[],ql=0,kf=0;function Ns(){for(var n=ql,i=kf=ql=0;i<n;){var a=Qn[i];Qn[i++]=null;var c=Qn[i];Qn[i++]=null;var h=Qn[i];Qn[i++]=null;var y=Qn[i];if(Qn[i++]=null,c!==null&&h!==null){var k=c.pending;k===null?h.next=h:(h.next=k.next,k.next=h),c.pending=h}y!==0&&Ug(a,h,y)}}function Rs(n,i,a,c){Qn[ql++]=n,Qn[ql++]=i,Qn[ql++]=a,Qn[ql++]=c,kf|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function Ef(n,i,a,c){return Rs(n,i,a,c),Os(n)}function rl(n,i){return Rs(n,null,null,i),Os(n)}function Ug(n,i,a){n.lanes|=a;var c=n.alternate;c!==null&&(c.lanes|=a);for(var h=!1,y=n.return;y!==null;)y.childLanes|=a,c=y.alternate,c!==null&&(c.childLanes|=a),y.tag===22&&(n=y.stateNode,n===null||n._visibility&1||(h=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,h&&i!==null&&(h=31-qe(a),n=y.hiddenUpdates,c=n[h],c===null?n[h]=[i]:c.push(i),i.lane=a|536870912),y):null}function Os(n){if(50<Aa)throw Aa=0,zd=null,Error(l(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var Gl={};function uA(n,i,a,c){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jn(n,i,a,c){return new uA(n,i,a,c)}function Af(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Br(n,i){var a=n.alternate;return a===null?(a=jn(n.tag,i,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=i,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&65011712,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,i=n.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a.refCleanup=n.refCleanup,a}function Fg(n,i){n.flags&=65011714;var a=n.alternate;return a===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,n.type=a.type,i=a.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}function js(n,i,a,c,h,y){var k=0;if(c=n,typeof n=="function")Af(n)&&(k=1);else if(typeof n=="string")k=pT(n,a,ue.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case Z:return n=jn(31,a,i,h),n.elementType=Z,n.lanes=y,n;case C:return il(a.children,h,y,i);case E:k=8,h|=24;break;case A:return n=jn(12,a,i,h|2),n.elementType=A,n.lanes=y,n;case P:return n=jn(13,a,i,h),n.elementType=P,n.lanes=y,n;case j:return n=jn(19,a,i,h),n.elementType=j,n.lanes=y,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case M:k=10;break e;case _:k=9;break e;case z:k=11;break e;case U:k=14;break e;case B:k=16,c=null;break e}k=29,a=Error(l(130,n===null?"null":typeof n,"")),c=null}return i=jn(k,a,i,h),i.elementType=n,i.type=c,i.lanes=y,i}function il(n,i,a,c){return n=jn(7,n,c,i),n.lanes=a,n}function Tf(n,i,a){return n=jn(6,n,null,i),n.lanes=a,n}function Hg(n){var i=jn(18,null,null,0);return i.stateNode=n,i}function _f(n,i,a){return i=jn(4,n.children!==null?n.children:[],n.key,i),i.lanes=a,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var Vg=new WeakMap;function Zn(n,i){if(typeof n=="object"&&n!==null){var a=Vg.get(n);return a!==void 0?a:(i={value:n,source:i,stack:Nn(i)},Vg.set(n,i),i)}return{value:n,source:i,stack:Nn(i)}}var Yl=[],Kl=0,zs=null,la=0,Wn=[],Jn=0,mi=null,Cr=1,kr="";function Ur(n,i){Yl[Kl++]=la,Yl[Kl++]=zs,zs=n,la=i}function qg(n,i,a){Wn[Jn++]=Cr,Wn[Jn++]=kr,Wn[Jn++]=mi,mi=n;var c=Cr;n=kr;var h=32-qe(c)-1;c&=~(1<<h),a+=1;var y=32-qe(i)+h;if(30<y){var k=h-h%5;y=(c&(1<<k)-1).toString(32),c>>=k,h-=k,Cr=1<<32-qe(i)+h|a<<h|c,kr=y+n}else Cr=1<<y|a<<h|c,kr=n}function Mf(n){n.return!==null&&(Ur(n,1),qg(n,1,0))}function Nf(n){for(;n===zs;)zs=Yl[--Kl],Yl[Kl]=null,la=Yl[--Kl],Yl[Kl]=null;for(;n===mi;)mi=Wn[--Jn],Wn[Jn]=null,kr=Wn[--Jn],Wn[Jn]=null,Cr=Wn[--Jn],Wn[Jn]=null}function Gg(n,i){Wn[Jn++]=Cr,Wn[Jn++]=kr,Wn[Jn++]=mi,Cr=i.id,kr=i.overflow,mi=n}var ln=null,Ct=null,Je=!1,pi=null,er=!1,Rf=Error(l(519));function hi(n){var i=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw oa(Zn(i,n)),Rf}function Yg(n){var i=n.stateNode,a=n.type,c=n.memoizedProps;switch(i[wt]=n,i[ft]=c,a){case"dialog":Ye("cancel",i),Ye("close",i);break;case"iframe":case"object":case"embed":Ye("load",i);break;case"video":case"audio":for(a=0;a<_a.length;a++)Ye(_a[a],i);break;case"source":Ye("error",i);break;case"img":case"image":case"link":Ye("error",i),Ye("load",i);break;case"details":Ye("toggle",i);break;case"input":Ye("invalid",i),lg(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ye("invalid",i);break;case"textarea":Ye("invalid",i),ag(i,c.value,c.defaultValue,c.children)}a=c.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||i.textContent===""+a||c.suppressHydrationWarning===!0||u0(i.textContent,a)?(c.popover!=null&&(Ye("beforetoggle",i),Ye("toggle",i)),c.onScroll!=null&&Ye("scroll",i),c.onScrollEnd!=null&&Ye("scrollend",i),c.onClick!=null&&(i.onclick=Lr),i=!0):i=!1,i||hi(n,!0)}function Kg(n){for(ln=n.return;ln;)switch(ln.tag){case 5:case 31:case 13:er=!1;return;case 27:case 3:er=!0;return;default:ln=ln.return}}function $l(n){if(n!==ln)return!1;if(!Je)return Kg(n),Je=!0,!1;var i=n.tag,a;if((a=i!==3&&i!==27)&&((a=i===5)&&(a=n.type,a=!(a!=="form"&&a!=="button")||Xd(n.type,n.memoizedProps)),a=!a),a&&Ct&&hi(n),Kg(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(l(317));Ct=v0(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(l(317));Ct=v0(n)}else i===27?(i=Ct,Mi(n.type)?(n=em,em=null,Ct=n):Ct=i):Ct=ln?nr(n.stateNode.nextSibling):null;return!0}function ll(){Ct=ln=null,Je=!1}function Of(){var n=pi;return n!==null&&(En===null?En=n:En.push.apply(En,n),pi=null),n}function oa(n){pi===null?pi=[n]:pi.push(n)}var jf=O(null),ol=null,Fr=null;function gi(n,i,a){R(jf,i._currentValue),i._currentValue=a}function Hr(n){n._currentValue=jf.current,H(jf)}function zf(n,i,a){for(;n!==null;){var c=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),n===a)break;n=n.return}}function If(n,i,a,c){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var y=h.dependencies;if(y!==null){var k=h.child;y=y.firstContext;e:for(;y!==null;){var N=y;y=h;for(var L=0;L<i.length;L++)if(N.context===i[L]){y.lanes|=a,N=y.alternate,N!==null&&(N.lanes|=a),zf(y.return,a,n),c||(k=null);break e}y=N.next}}else if(h.tag===18){if(k=h.return,k===null)throw Error(l(341));k.lanes|=a,y=k.alternate,y!==null&&(y.lanes|=a),zf(k,a,n),k=null}else k=h.child;if(k!==null)k.return=h;else for(k=h;k!==null;){if(k===n){k=null;break}if(h=k.sibling,h!==null){h.return=k.return,k=h;break}k=k.return}h=k}}function Xl(n,i,a,c){n=null;for(var h=i,y=!1;h!==null;){if(!y){if((h.flags&524288)!==0)y=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var k=h.alternate;if(k===null)throw Error(l(387));if(k=k.memoizedProps,k!==null){var N=h.type;On(h.pendingProps.value,k.value)||(n!==null?n.push(N):n=[N])}}else if(h===re.current){if(k=h.alternate,k===null)throw Error(l(387));k.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(ja):n=[ja])}h=h.return}n!==null&&If(i,n,a,c),i.flags|=262144}function Is(n){for(n=n.firstContext;n!==null;){if(!On(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function al(n){ol=n,Fr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function on(n){return $g(ol,n)}function Ds(n,i){return ol===null&&al(n),$g(n,i)}function $g(n,i){var a=i._currentValue;if(i={context:i,memoizedValue:a,next:null},Fr===null){if(n===null)throw Error(l(308));Fr=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else Fr=Fr.next=i;return a}var cA=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(a,c){n.push(c)}};this.abort=function(){i.aborted=!0,n.forEach(function(a){return a()})}},fA=e.unstable_scheduleCallback,dA=e.unstable_NormalPriority,Ht={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Df(){return{controller:new cA,data:new Map,refCount:0}}function aa(n){n.refCount--,n.refCount===0&&fA(dA,function(){n.controller.abort()})}var sa=null,Lf=0,Ql=0,Zl=null;function mA(n,i){if(sa===null){var a=sa=[];Lf=0,Ql=Ud(),Zl={status:"pending",value:void 0,then:function(c){a.push(c)}}}return Lf++,i.then(Xg,Xg),i}function Xg(){if(--Lf===0&&sa!==null){Zl!==null&&(Zl.status="fulfilled");var n=sa;sa=null,Ql=0,Zl=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function pA(n,i){var a=[],c={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return n.then(function(){c.status="fulfilled",c.value=i;for(var h=0;h<a.length;h++)(0,a[h])(i)},function(h){for(c.status="rejected",c.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),c}var Qg=I.S;I.S=function(n,i){jv=De(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&mA(n,i),Qg!==null&&Qg(n,i)};var sl=O(null);function Pf(){var n=sl.current;return n!==null?n:yt.pooledCache}function Ls(n,i){i===null?R(sl,sl.current):R(sl,i.pool)}function Zg(){var n=Pf();return n===null?null:{parent:Ht._currentValue,pool:n}}var Wl=Error(l(460)),Bf=Error(l(474)),Ps=Error(l(542)),Bs={then:function(){}};function Wg(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Jg(n,i,a){switch(a=n[a],a===void 0?n.push(i):a!==i&&(i.then(Lr,Lr),i=a),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,ty(n),n;default:if(typeof i.status=="string")i.then(Lr,Lr);else{if(n=yt,n!==null&&100<n.shellSuspendCounter)throw Error(l(482));n=i,n.status="pending",n.then(function(c){if(i.status==="pending"){var h=i;h.status="fulfilled",h.value=c}},function(c){if(i.status==="pending"){var h=i;h.status="rejected",h.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,ty(n),n}throw cl=i,Wl}}function ul(n){try{var i=n._init;return i(n._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(cl=a,Wl):a}}var cl=null;function ey(){if(cl===null)throw Error(l(459));var n=cl;return cl=null,n}function ty(n){if(n===Wl||n===Ps)throw Error(l(483))}var Jl=null,ua=0;function Us(n){var i=ua;return ua+=1,Jl===null&&(Jl=[]),Jg(Jl,n,i)}function ca(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function Fs(n,i){throw i.$$typeof===x?Error(l(525)):(n=Object.prototype.toString.call(i),Error(l(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function ny(n){function i(q,F){if(n){var K=q.deletions;K===null?(q.deletions=[F],q.flags|=16):K.push(F)}}function a(q,F){if(!n)return null;for(;F!==null;)i(q,F),F=F.sibling;return null}function c(q){for(var F=new Map;q!==null;)q.key!==null?F.set(q.key,q):F.set(q.index,q),q=q.sibling;return F}function h(q,F){return q=Br(q,F),q.index=0,q.sibling=null,q}function y(q,F,K){return q.index=K,n?(K=q.alternate,K!==null?(K=K.index,K<F?(q.flags|=67108866,F):K):(q.flags|=67108866,F)):(q.flags|=1048576,F)}function k(q){return n&&q.alternate===null&&(q.flags|=67108866),q}function N(q,F,K,le){return F===null||F.tag!==6?(F=Tf(K,q.mode,le),F.return=q,F):(F=h(F,K),F.return=q,F)}function L(q,F,K,le){var Te=K.type;return Te===C?ie(q,F,K.props.children,le,K.key):F!==null&&(F.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===B&&ul(Te)===F.type)?(F=h(F,K.props),ca(F,K),F.return=q,F):(F=js(K.type,K.key,K.props,null,q.mode,le),ca(F,K),F.return=q,F)}function $(q,F,K,le){return F===null||F.tag!==4||F.stateNode.containerInfo!==K.containerInfo||F.stateNode.implementation!==K.implementation?(F=_f(K,q.mode,le),F.return=q,F):(F=h(F,K.children||[]),F.return=q,F)}function ie(q,F,K,le,Te){return F===null||F.tag!==7?(F=il(K,q.mode,le,Te),F.return=q,F):(F=h(F,K),F.return=q,F)}function ae(q,F,K){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=Tf(""+F,q.mode,K),F.return=q,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case b:return K=js(F.type,F.key,F.props,null,q.mode,K),ca(K,F),K.return=q,K;case w:return F=_f(F,q.mode,K),F.return=q,F;case B:return F=ul(F),ae(q,F,K)}if(J(F)||W(F))return F=il(F,q.mode,K,null),F.return=q,F;if(typeof F.then=="function")return ae(q,Us(F),K);if(F.$$typeof===M)return ae(q,Ds(q,F),K);Fs(q,F)}return null}function Q(q,F,K,le){var Te=F!==null?F.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return Te!==null?null:N(q,F,""+K,le);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case b:return K.key===Te?L(q,F,K,le):null;case w:return K.key===Te?$(q,F,K,le):null;case B:return K=ul(K),Q(q,F,K,le)}if(J(K)||W(K))return Te!==null?null:ie(q,F,K,le,null);if(typeof K.then=="function")return Q(q,F,Us(K),le);if(K.$$typeof===M)return Q(q,F,Ds(q,K),le);Fs(q,K)}return null}function ee(q,F,K,le,Te){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return q=q.get(K)||null,N(F,q,""+le,Te);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case b:return q=q.get(le.key===null?K:le.key)||null,L(F,q,le,Te);case w:return q=q.get(le.key===null?K:le.key)||null,$(F,q,le,Te);case B:return le=ul(le),ee(q,F,K,le,Te)}if(J(le)||W(le))return q=q.get(K)||null,ie(F,q,le,Te,null);if(typeof le.then=="function")return ee(q,F,K,Us(le),Te);if(le.$$typeof===M)return ee(q,F,K,Ds(F,le),Te);Fs(F,le)}return null}function ye(q,F,K,le){for(var Te=null,nt=null,Se=F,Ue=F=0,Ze=null;Se!==null&&Ue<K.length;Ue++){Se.index>Ue?(Ze=Se,Se=null):Ze=Se.sibling;var rt=Q(q,Se,K[Ue],le);if(rt===null){Se===null&&(Se=Ze);break}n&&Se&&rt.alternate===null&&i(q,Se),F=y(rt,F,Ue),nt===null?Te=rt:nt.sibling=rt,nt=rt,Se=Ze}if(Ue===K.length)return a(q,Se),Je&&Ur(q,Ue),Te;if(Se===null){for(;Ue<K.length;Ue++)Se=ae(q,K[Ue],le),Se!==null&&(F=y(Se,F,Ue),nt===null?Te=Se:nt.sibling=Se,nt=Se);return Je&&Ur(q,Ue),Te}for(Se=c(Se);Ue<K.length;Ue++)Ze=ee(Se,q,Ue,K[Ue],le),Ze!==null&&(n&&Ze.alternate!==null&&Se.delete(Ze.key===null?Ue:Ze.key),F=y(Ze,F,Ue),nt===null?Te=Ze:nt.sibling=Ze,nt=Ze);return n&&Se.forEach(function(zi){return i(q,zi)}),Je&&Ur(q,Ue),Te}function Me(q,F,K,le){if(K==null)throw Error(l(151));for(var Te=null,nt=null,Se=F,Ue=F=0,Ze=null,rt=K.next();Se!==null&&!rt.done;Ue++,rt=K.next()){Se.index>Ue?(Ze=Se,Se=null):Ze=Se.sibling;var zi=Q(q,Se,rt.value,le);if(zi===null){Se===null&&(Se=Ze);break}n&&Se&&zi.alternate===null&&i(q,Se),F=y(zi,F,Ue),nt===null?Te=zi:nt.sibling=zi,nt=zi,Se=Ze}if(rt.done)return a(q,Se),Je&&Ur(q,Ue),Te;if(Se===null){for(;!rt.done;Ue++,rt=K.next())rt=ae(q,rt.value,le),rt!==null&&(F=y(rt,F,Ue),nt===null?Te=rt:nt.sibling=rt,nt=rt);return Je&&Ur(q,Ue),Te}for(Se=c(Se);!rt.done;Ue++,rt=K.next())rt=ee(Se,q,Ue,rt.value,le),rt!==null&&(n&&rt.alternate!==null&&Se.delete(rt.key===null?Ue:rt.key),F=y(rt,F,Ue),nt===null?Te=rt:nt.sibling=rt,nt=rt);return n&&Se.forEach(function(ET){return i(q,ET)}),Je&&Ur(q,Ue),Te}function ht(q,F,K,le){if(typeof K=="object"&&K!==null&&K.type===C&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case b:e:{for(var Te=K.key;F!==null;){if(F.key===Te){if(Te=K.type,Te===C){if(F.tag===7){a(q,F.sibling),le=h(F,K.props.children),le.return=q,q=le;break e}}else if(F.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===B&&ul(Te)===F.type){a(q,F.sibling),le=h(F,K.props),ca(le,K),le.return=q,q=le;break e}a(q,F);break}else i(q,F);F=F.sibling}K.type===C?(le=il(K.props.children,q.mode,le,K.key),le.return=q,q=le):(le=js(K.type,K.key,K.props,null,q.mode,le),ca(le,K),le.return=q,q=le)}return k(q);case w:e:{for(Te=K.key;F!==null;){if(F.key===Te)if(F.tag===4&&F.stateNode.containerInfo===K.containerInfo&&F.stateNode.implementation===K.implementation){a(q,F.sibling),le=h(F,K.children||[]),le.return=q,q=le;break e}else{a(q,F);break}else i(q,F);F=F.sibling}le=_f(K,q.mode,le),le.return=q,q=le}return k(q);case B:return K=ul(K),ht(q,F,K,le)}if(J(K))return ye(q,F,K,le);if(W(K)){if(Te=W(K),typeof Te!="function")throw Error(l(150));return K=Te.call(K),Me(q,F,K,le)}if(typeof K.then=="function")return ht(q,F,Us(K),le);if(K.$$typeof===M)return ht(q,F,Ds(q,K),le);Fs(q,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,F!==null&&F.tag===6?(a(q,F.sibling),le=h(F,K),le.return=q,q=le):(a(q,F),le=Tf(K,q.mode,le),le.return=q,q=le),k(q)):a(q,F)}return function(q,F,K,le){try{ua=0;var Te=ht(q,F,K,le);return Jl=null,Te}catch(Se){if(Se===Wl||Se===Ps)throw Se;var nt=jn(29,Se,null,q.mode);return nt.lanes=le,nt.return=q,nt}finally{}}}var fl=ny(!0),ry=ny(!1),yi=!1;function Uf(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ff(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function vi(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function xi(n,i,a){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(ot&2)!==0){var h=c.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),c.pending=i,i=Os(n),Ug(n,null,a),i}return Rs(n,c,i,a),Os(n)}function fa(n,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194048)!==0)){var c=i.lanes;c&=n.pendingLanes,a|=c,i.lanes=a,He(n,a)}}function Hf(n,i){var a=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,y=null;if(a=a.firstBaseUpdate,a!==null){do{var k={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};y===null?h=y=k:y=y.next=k,a=a.next}while(a!==null);y===null?h=y=i:y=y.next=i}else h=y=i;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:y,shared:c.shared,callbacks:c.callbacks},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=i:n.next=i,a.lastBaseUpdate=i}var Vf=!1;function da(){if(Vf){var n=Zl;if(n!==null)throw n}}function ma(n,i,a,c){Vf=!1;var h=n.updateQueue;yi=!1;var y=h.firstBaseUpdate,k=h.lastBaseUpdate,N=h.shared.pending;if(N!==null){h.shared.pending=null;var L=N,$=L.next;L.next=null,k===null?y=$:k.next=$,k=L;var ie=n.alternate;ie!==null&&(ie=ie.updateQueue,N=ie.lastBaseUpdate,N!==k&&(N===null?ie.firstBaseUpdate=$:N.next=$,ie.lastBaseUpdate=L))}if(y!==null){var ae=h.baseState;k=0,ie=$=L=null,N=y;do{var Q=N.lane&-536870913,ee=Q!==N.lane;if(ee?(Qe&Q)===Q:(c&Q)===Q){Q!==0&&Q===Ql&&(Vf=!0),ie!==null&&(ie=ie.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var ye=n,Me=N;Q=i;var ht=a;switch(Me.tag){case 1:if(ye=Me.payload,typeof ye=="function"){ae=ye.call(ht,ae,Q);break e}ae=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Me.payload,Q=typeof ye=="function"?ye.call(ht,ae,Q):ye,Q==null)break e;ae=p({},ae,Q);break e;case 2:yi=!0}}Q=N.callback,Q!==null&&(n.flags|=64,ee&&(n.flags|=8192),ee=h.callbacks,ee===null?h.callbacks=[Q]:ee.push(Q))}else ee={lane:Q,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ie===null?($=ie=ee,L=ae):ie=ie.next=ee,k|=Q;if(N=N.next,N===null){if(N=h.shared.pending,N===null)break;ee=N,N=ee.next,ee.next=null,h.lastBaseUpdate=ee,h.shared.pending=null}}while(!0);ie===null&&(L=ae),h.baseState=L,h.firstBaseUpdate=$,h.lastBaseUpdate=ie,y===null&&(h.shared.lanes=0),ki|=k,n.lanes=k,n.memoizedState=ae}}function iy(n,i){if(typeof n!="function")throw Error(l(191,n));n.call(i)}function ly(n,i){var a=n.callbacks;if(a!==null)for(n.callbacks=null,n=0;n<a.length;n++)iy(a[n],i)}var eo=O(null),Hs=O(0);function oy(n,i){n=Zr,R(Hs,n),R(eo,i),Zr=n|i.baseLanes}function qf(){R(Hs,Zr),R(eo,eo.current)}function Gf(){Zr=Hs.current,H(eo),H(Hs)}var zn=O(null),tr=null;function bi(n){var i=n.alternate;R(Pt,Pt.current&1),R(zn,n),tr===null&&(i===null||eo.current!==null||i.memoizedState!==null)&&(tr=n)}function Yf(n){R(Pt,Pt.current),R(zn,n),tr===null&&(tr=n)}function ay(n){n.tag===22?(R(Pt,Pt.current),R(zn,n),tr===null&&(tr=n)):Si()}function Si(){R(Pt,Pt.current),R(zn,zn.current)}function In(n){H(zn),tr===n&&(tr=null),H(Pt)}var Pt=O(0);function Vs(n){for(var i=n;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Wd(a)||Jd(a)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Vr=0,Pe=null,mt=null,Vt=null,qs=!1,to=!1,dl=!1,Gs=0,pa=0,no=null,hA=0;function Ot(){throw Error(l(321))}function Kf(n,i){if(i===null)return!1;for(var a=0;a<i.length&&a<n.length;a++)if(!On(n[a],i[a]))return!1;return!0}function $f(n,i,a,c,h,y){return Vr=y,Pe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,I.H=n===null||n.memoizedState===null?qy:ud,dl=!1,y=a(c,h),dl=!1,to&&(y=uy(i,a,c,h)),sy(n),y}function sy(n){I.H=ya;var i=mt!==null&&mt.next!==null;if(Vr=0,Vt=mt=Pe=null,qs=!1,pa=0,no=null,i)throw Error(l(300));n===null||qt||(n=n.dependencies,n!==null&&Is(n)&&(qt=!0))}function uy(n,i,a,c){Pe=n;var h=0;do{if(to&&(no=null),pa=0,to=!1,25<=h)throw Error(l(301));if(h+=1,Vt=mt=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}I.H=Gy,y=i(a,c)}while(to);return y}function gA(){var n=I.H,i=n.useState()[0];return i=typeof i.then=="function"?ha(i):i,n=n.useState()[0],(mt!==null?mt.memoizedState:null)!==n&&(Pe.flags|=1024),i}function Xf(){var n=Gs!==0;return Gs=0,n}function Qf(n,i,a){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~a}function Zf(n){if(qs){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}qs=!1}Vr=0,Vt=mt=Pe=null,to=!1,pa=Gs=0,no=null}function hn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vt===null?Pe.memoizedState=Vt=n:Vt=Vt.next=n,Vt}function Bt(){if(mt===null){var n=Pe.alternate;n=n!==null?n.memoizedState:null}else n=mt.next;var i=Vt===null?Pe.memoizedState:Vt.next;if(i!==null)Vt=i,mt=n;else{if(n===null)throw Pe.alternate===null?Error(l(467)):Error(l(310));mt=n,n={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},Vt===null?Pe.memoizedState=Vt=n:Vt=Vt.next=n}return Vt}function Ys(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ha(n){var i=pa;return pa+=1,no===null&&(no=[]),n=Jg(no,n,i),i=Pe,(Vt===null?i.memoizedState:Vt.next)===null&&(i=i.alternate,I.H=i===null||i.memoizedState===null?qy:ud),n}function Ks(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return ha(n);if(n.$$typeof===M)return on(n)}throw Error(l(438,String(n)))}function Wf(n){var i=null,a=Pe.updateQueue;if(a!==null&&(i=a.memoCache),i==null){var c=Pe.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(h){return h.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),a===null&&(a=Ys(),Pe.updateQueue=a),a.memoCache=i,a=i.data[i.index],a===void 0)for(a=i.data[i.index]=Array(n),c=0;c<n;c++)a[c]=D;return i.index++,a}function qr(n,i){return typeof i=="function"?i(n):i}function $s(n){var i=Bt();return Jf(i,mt,n)}function Jf(n,i,a){var c=n.queue;if(c===null)throw Error(l(311));c.lastRenderedReducer=a;var h=n.baseQueue,y=c.pending;if(y!==null){if(h!==null){var k=h.next;h.next=y.next,y.next=k}i.baseQueue=h=y,c.pending=null}if(y=n.baseState,h===null)n.memoizedState=y;else{i=h.next;var N=k=null,L=null,$=i,ie=!1;do{var ae=$.lane&-536870913;if(ae!==$.lane?(Qe&ae)===ae:(Vr&ae)===ae){var Q=$.revertLane;if(Q===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),ae===Ql&&(ie=!0);else if((Vr&Q)===Q){$=$.next,Q===Ql&&(ie=!0);continue}else ae={lane:0,revertLane:$.revertLane,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},L===null?(N=L=ae,k=y):L=L.next=ae,Pe.lanes|=Q,ki|=Q;ae=$.action,dl&&a(y,ae),y=$.hasEagerState?$.eagerState:a(y,ae)}else Q={lane:ae,revertLane:$.revertLane,gesture:$.gesture,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},L===null?(N=L=Q,k=y):L=L.next=Q,Pe.lanes|=ae,ki|=ae;$=$.next}while($!==null&&$!==i);if(L===null?k=y:L.next=N,!On(y,n.memoizedState)&&(qt=!0,ie&&(a=Zl,a!==null)))throw a;n.memoizedState=y,n.baseState=k,n.baseQueue=L,c.lastRenderedState=y}return h===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function ed(n){var i=Bt(),a=i.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=n;var c=a.dispatch,h=a.pending,y=i.memoizedState;if(h!==null){a.pending=null;var k=h=h.next;do y=n(y,k.action),k=k.next;while(k!==h);On(y,i.memoizedState)||(qt=!0),i.memoizedState=y,i.baseQueue===null&&(i.baseState=y),a.lastRenderedState=y}return[y,c]}function cy(n,i,a){var c=Pe,h=Bt(),y=Je;if(y){if(a===void 0)throw Error(l(407));a=a()}else a=i();var k=!On((mt||h).memoizedState,a);if(k&&(h.memoizedState=a,qt=!0),h=h.queue,rd(my.bind(null,c,h,n),[n]),h.getSnapshot!==i||k||Vt!==null&&Vt.memoizedState.tag&1){if(c.flags|=2048,ro(9,{destroy:void 0},dy.bind(null,c,h,a,i),null),yt===null)throw Error(l(349));y||(Vr&127)!==0||fy(c,i,a)}return a}function fy(n,i,a){n.flags|=16384,n={getSnapshot:i,value:a},i=Pe.updateQueue,i===null?(i=Ys(),Pe.updateQueue=i,i.stores=[n]):(a=i.stores,a===null?i.stores=[n]:a.push(n))}function dy(n,i,a,c){i.value=a,i.getSnapshot=c,py(i)&&hy(n)}function my(n,i,a){return a(function(){py(i)&&hy(n)})}function py(n){var i=n.getSnapshot;n=n.value;try{var a=i();return!On(n,a)}catch{return!0}}function hy(n){var i=rl(n,2);i!==null&&An(i,n,2)}function td(n){var i=hn();if(typeof n=="function"){var a=n;if(n=a(),dl){Mt(!0);try{a()}finally{Mt(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qr,lastRenderedState:n},i}function gy(n,i,a,c){return n.baseState=a,Jf(n,mt,typeof c=="function"?c:qr)}function yA(n,i,a,c,h){if(Zs(n))throw Error(l(485));if(n=i.action,n!==null){var y={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){y.listeners.push(k)}};I.T!==null?a(!0):y.isTransition=!1,c(y),a=i.pending,a===null?(y.next=i.pending=y,yy(i,y)):(y.next=a.next,i.pending=a.next=y)}}function yy(n,i){var a=i.action,c=i.payload,h=n.state;if(i.isTransition){var y=I.T,k={};I.T=k;try{var N=a(h,c),L=I.S;L!==null&&L(k,N),vy(n,i,N)}catch($){nd(n,i,$)}finally{y!==null&&k.types!==null&&(y.types=k.types),I.T=y}}else try{y=a(h,c),vy(n,i,y)}catch($){nd(n,i,$)}}function vy(n,i,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(c){xy(n,i,c)},function(c){return nd(n,i,c)}):xy(n,i,a)}function xy(n,i,a){i.status="fulfilled",i.value=a,by(i),n.state=a,i=n.pending,i!==null&&(a=i.next,a===i?n.pending=null:(a=a.next,i.next=a,yy(n,a)))}function nd(n,i,a){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=a,by(i),i=i.next;while(i!==c)}n.action=null}function by(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function Sy(n,i){return i}function wy(n,i){if(Je){var a=yt.formState;if(a!==null){e:{var c=Pe;if(Je){if(Ct){t:{for(var h=Ct,y=er;h.nodeType!==8;){if(!y){h=null;break t}if(h=nr(h.nextSibling),h===null){h=null;break t}}y=h.data,h=y==="F!"||y==="F"?h:null}if(h){Ct=nr(h.nextSibling),c=h.data==="F!";break e}}hi(c)}c=!1}c&&(i=a[0])}}return a=hn(),a.memoizedState=a.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sy,lastRenderedState:i},a.queue=c,a=Fy.bind(null,Pe,c),c.dispatch=a,c=td(!1),y=sd.bind(null,Pe,!1,c.queue),c=hn(),h={state:i,dispatch:null,action:n,pending:null},c.queue=h,a=yA.bind(null,Pe,h,y,a),h.dispatch=a,c.memoizedState=n,[i,a,!1]}function Cy(n){var i=Bt();return ky(i,mt,n)}function ky(n,i,a){if(i=Jf(n,i,Sy)[0],n=$s(qr)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=ha(i)}catch(k){throw k===Wl?Ps:k}else c=i;i=Bt();var h=i.queue,y=h.dispatch;return a!==i.memoizedState&&(Pe.flags|=2048,ro(9,{destroy:void 0},vA.bind(null,h,a),null)),[c,y,n]}function vA(n,i){n.action=i}function Ey(n){var i=Bt(),a=mt;if(a!==null)return ky(i,a,n);Bt(),i=i.memoizedState,a=Bt();var c=a.queue.dispatch;return a.memoizedState=n,[i,c,!1]}function ro(n,i,a,c){return n={tag:n,create:a,deps:c,inst:i,next:null},i=Pe.updateQueue,i===null&&(i=Ys(),Pe.updateQueue=i),a=i.lastEffect,a===null?i.lastEffect=n.next=n:(c=a.next,a.next=n,n.next=c,i.lastEffect=n),n}function Ay(){return Bt().memoizedState}function Xs(n,i,a,c){var h=hn();Pe.flags|=n,h.memoizedState=ro(1|i,{destroy:void 0},a,c===void 0?null:c)}function Qs(n,i,a,c){var h=Bt();c=c===void 0?null:c;var y=h.memoizedState.inst;mt!==null&&c!==null&&Kf(c,mt.memoizedState.deps)?h.memoizedState=ro(i,y,a,c):(Pe.flags|=n,h.memoizedState=ro(1|i,y,a,c))}function Ty(n,i){Xs(8390656,8,n,i)}function rd(n,i){Qs(2048,8,n,i)}function xA(n){Pe.flags|=4;var i=Pe.updateQueue;if(i===null)i=Ys(),Pe.updateQueue=i,i.events=[n];else{var a=i.events;a===null?i.events=[n]:a.push(n)}}function _y(n){var i=Bt().memoizedState;return xA({ref:i,nextImpl:n}),function(){if((ot&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}function My(n,i){return Qs(4,2,n,i)}function Ny(n,i){return Qs(4,4,n,i)}function Ry(n,i){if(typeof i=="function"){n=n();var a=i(n);return function(){typeof a=="function"?a():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function Oy(n,i,a){a=a!=null?a.concat([n]):null,Qs(4,4,Ry.bind(null,i,n),a)}function id(){}function jy(n,i){var a=Bt();i=i===void 0?null:i;var c=a.memoizedState;return i!==null&&Kf(i,c[1])?c[0]:(a.memoizedState=[n,i],n)}function zy(n,i){var a=Bt();i=i===void 0?null:i;var c=a.memoizedState;if(i!==null&&Kf(i,c[1]))return c[0];if(c=n(),dl){Mt(!0);try{n()}finally{Mt(!1)}}return a.memoizedState=[c,i],c}function ld(n,i,a){return a===void 0||(Vr&1073741824)!==0&&(Qe&261930)===0?n.memoizedState=i:(n.memoizedState=a,n=Iv(),Pe.lanes|=n,ki|=n,a)}function Iy(n,i,a,c){return On(a,i)?a:eo.current!==null?(n=ld(n,a,c),On(n,i)||(qt=!0),n):(Vr&42)===0||(Vr&1073741824)!==0&&(Qe&261930)===0?(qt=!0,n.memoizedState=a):(n=Iv(),Pe.lanes|=n,ki|=n,i)}function Dy(n,i,a,c,h){var y=Y.p;Y.p=y!==0&&8>y?y:8;var k=I.T,N={};I.T=N,sd(n,!1,i,a);try{var L=h(),$=I.S;if($!==null&&$(N,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var ie=pA(L,c);ga(n,i,ie,Pn(n))}else ga(n,i,c,Pn(n))}catch(ae){ga(n,i,{then:function(){},status:"rejected",reason:ae},Pn())}finally{Y.p=y,k!==null&&N.types!==null&&(k.types=N.types),I.T=k}}function bA(){}function od(n,i,a,c){if(n.tag!==5)throw Error(l(476));var h=Ly(n).queue;Dy(n,h,i,G,a===null?bA:function(){return Py(n),a(c)})}function Ly(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qr,lastRenderedState:G},next:null};var a={};return i.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qr,lastRenderedState:a},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function Py(n){var i=Ly(n);i.next===null&&(i=n.alternate.memoizedState),ga(n,i.next.queue,{},Pn())}function ad(){return on(ja)}function By(){return Bt().memoizedState}function Uy(){return Bt().memoizedState}function SA(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var a=Pn();n=vi(a);var c=xi(i,n,a);c!==null&&(An(c,i,a),fa(c,i,a)),i={cache:Df()},n.payload=i;return}i=i.return}}function wA(n,i,a){var c=Pn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Zs(n)?Hy(i,a):(a=Ef(n,i,a,c),a!==null&&(An(a,n,c),Vy(a,i,c)))}function Fy(n,i,a){var c=Pn();ga(n,i,a,c)}function ga(n,i,a,c){var h={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Zs(n))Hy(i,h);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=i.lastRenderedReducer,y!==null))try{var k=i.lastRenderedState,N=y(k,a);if(h.hasEagerState=!0,h.eagerState=N,On(N,k))return Rs(n,i,h,0),yt===null&&Ns(),!1}catch{}finally{}if(a=Ef(n,i,h,c),a!==null)return An(a,n,c),Vy(a,i,c),!0}return!1}function sd(n,i,a,c){if(c={lane:2,revertLane:Ud(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Zs(n)){if(i)throw Error(l(479))}else i=Ef(n,a,c,2),i!==null&&An(i,n,2)}function Zs(n){var i=n.alternate;return n===Pe||i!==null&&i===Pe}function Hy(n,i){to=qs=!0;var a=n.pending;a===null?i.next=i:(i.next=a.next,a.next=i),n.pending=i}function Vy(n,i,a){if((a&4194048)!==0){var c=i.lanes;c&=n.pendingLanes,a|=c,i.lanes=a,He(n,a)}}var ya={readContext:on,use:Ks,useCallback:Ot,useContext:Ot,useEffect:Ot,useImperativeHandle:Ot,useLayoutEffect:Ot,useInsertionEffect:Ot,useMemo:Ot,useReducer:Ot,useRef:Ot,useState:Ot,useDebugValue:Ot,useDeferredValue:Ot,useTransition:Ot,useSyncExternalStore:Ot,useId:Ot,useHostTransitionStatus:Ot,useFormState:Ot,useActionState:Ot,useOptimistic:Ot,useMemoCache:Ot,useCacheRefresh:Ot};ya.useEffectEvent=Ot;var qy={readContext:on,use:Ks,useCallback:function(n,i){return hn().memoizedState=[n,i===void 0?null:i],n},useContext:on,useEffect:Ty,useImperativeHandle:function(n,i,a){a=a!=null?a.concat([n]):null,Xs(4194308,4,Ry.bind(null,i,n),a)},useLayoutEffect:function(n,i){return Xs(4194308,4,n,i)},useInsertionEffect:function(n,i){Xs(4,2,n,i)},useMemo:function(n,i){var a=hn();i=i===void 0?null:i;var c=n();if(dl){Mt(!0);try{n()}finally{Mt(!1)}}return a.memoizedState=[c,i],c},useReducer:function(n,i,a){var c=hn();if(a!==void 0){var h=a(i);if(dl){Mt(!0);try{a(i)}finally{Mt(!1)}}}else h=i;return c.memoizedState=c.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},c.queue=n,n=n.dispatch=wA.bind(null,Pe,n),[c.memoizedState,n]},useRef:function(n){var i=hn();return n={current:n},i.memoizedState=n},useState:function(n){n=td(n);var i=n.queue,a=Fy.bind(null,Pe,i);return i.dispatch=a,[n.memoizedState,a]},useDebugValue:id,useDeferredValue:function(n,i){var a=hn();return ld(a,n,i)},useTransition:function(){var n=td(!1);return n=Dy.bind(null,Pe,n.queue,!0,!1),hn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,a){var c=Pe,h=hn();if(Je){if(a===void 0)throw Error(l(407));a=a()}else{if(a=i(),yt===null)throw Error(l(349));(Qe&127)!==0||fy(c,i,a)}h.memoizedState=a;var y={value:a,getSnapshot:i};return h.queue=y,Ty(my.bind(null,c,y,n),[n]),c.flags|=2048,ro(9,{destroy:void 0},dy.bind(null,c,y,a,i),null),a},useId:function(){var n=hn(),i=yt.identifierPrefix;if(Je){var a=kr,c=Cr;a=(c&~(1<<32-qe(c)-1)).toString(32)+a,i="_"+i+"R_"+a,a=Gs++,0<a&&(i+="H"+a.toString(32)),i+="_"}else a=hA++,i="_"+i+"r_"+a.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:ad,useFormState:wy,useActionState:wy,useOptimistic:function(n){var i=hn();i.memoizedState=i.baseState=n;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=a,i=sd.bind(null,Pe,!0,a),a.dispatch=i,[n,i]},useMemoCache:Wf,useCacheRefresh:function(){return hn().memoizedState=SA.bind(null,Pe)},useEffectEvent:function(n){var i=hn(),a={impl:n};return i.memoizedState=a,function(){if((ot&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}},ud={readContext:on,use:Ks,useCallback:jy,useContext:on,useEffect:rd,useImperativeHandle:Oy,useInsertionEffect:My,useLayoutEffect:Ny,useMemo:zy,useReducer:$s,useRef:Ay,useState:function(){return $s(qr)},useDebugValue:id,useDeferredValue:function(n,i){var a=Bt();return Iy(a,mt.memoizedState,n,i)},useTransition:function(){var n=$s(qr)[0],i=Bt().memoizedState;return[typeof n=="boolean"?n:ha(n),i]},useSyncExternalStore:cy,useId:By,useHostTransitionStatus:ad,useFormState:Cy,useActionState:Cy,useOptimistic:function(n,i){var a=Bt();return gy(a,mt,n,i)},useMemoCache:Wf,useCacheRefresh:Uy};ud.useEffectEvent=_y;var Gy={readContext:on,use:Ks,useCallback:jy,useContext:on,useEffect:rd,useImperativeHandle:Oy,useInsertionEffect:My,useLayoutEffect:Ny,useMemo:zy,useReducer:ed,useRef:Ay,useState:function(){return ed(qr)},useDebugValue:id,useDeferredValue:function(n,i){var a=Bt();return mt===null?ld(a,n,i):Iy(a,mt.memoizedState,n,i)},useTransition:function(){var n=ed(qr)[0],i=Bt().memoizedState;return[typeof n=="boolean"?n:ha(n),i]},useSyncExternalStore:cy,useId:By,useHostTransitionStatus:ad,useFormState:Ey,useActionState:Ey,useOptimistic:function(n,i){var a=Bt();return mt!==null?gy(a,mt,n,i):(a.baseState=n,[n,a.queue.dispatch])},useMemoCache:Wf,useCacheRefresh:Uy};Gy.useEffectEvent=_y;function cd(n,i,a,c){i=n.memoizedState,a=a(c,i),a=a==null?i:p({},i,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var fd={enqueueSetState:function(n,i,a){n=n._reactInternals;var c=Pn(),h=vi(c);h.payload=i,a!=null&&(h.callback=a),i=xi(n,h,c),i!==null&&(An(i,n,c),fa(i,n,c))},enqueueReplaceState:function(n,i,a){n=n._reactInternals;var c=Pn(),h=vi(c);h.tag=1,h.payload=i,a!=null&&(h.callback=a),i=xi(n,h,c),i!==null&&(An(i,n,c),fa(i,n,c))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var a=Pn(),c=vi(a);c.tag=2,i!=null&&(c.callback=i),i=xi(n,c,a),i!==null&&(An(i,n,a),fa(i,n,a))}};function Yy(n,i,a,c,h,y,k){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,y,k):i.prototype&&i.prototype.isPureReactComponent?!ra(a,c)||!ra(h,y):!0}function Ky(n,i,a,c){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,c),i.state!==n&&fd.enqueueReplaceState(i,i.state,null)}function ml(n,i){var a=i;if("ref"in i){a={};for(var c in i)c!=="ref"&&(a[c]=i[c])}if(n=n.defaultProps){a===i&&(a=p({},a));for(var h in n)a[h]===void 0&&(a[h]=n[h])}return a}function $y(n){Ms(n)}function Xy(n){console.error(n)}function Qy(n){Ms(n)}function Ws(n,i){try{var a=n.onUncaughtError;a(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function Zy(n,i,a){try{var c=n.onCaughtError;c(a.value,{componentStack:a.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function dd(n,i,a){return a=vi(a),a.tag=3,a.payload={element:null},a.callback=function(){Ws(n,i)},a}function Wy(n){return n=vi(n),n.tag=3,n}function Jy(n,i,a,c){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var y=c.value;n.payload=function(){return h(y)},n.callback=function(){Zy(i,a,c)}}var k=a.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(n.callback=function(){Zy(i,a,c),typeof h!="function"&&(Ei===null?Ei=new Set([this]):Ei.add(this));var N=c.stack;this.componentDidCatch(c.value,{componentStack:N!==null?N:""})})}function CA(n,i,a,c,h){if(a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=a.alternate,i!==null&&Xl(i,a,h,!0),a=zn.current,a!==null){switch(a.tag){case 31:case 13:return tr===null?cu():a.alternate===null&&jt===0&&(jt=3),a.flags&=-257,a.flags|=65536,a.lanes=h,c===Bs?a.flags|=16384:(i=a.updateQueue,i===null?a.updateQueue=new Set([c]):i.add(c),Ld(n,c,h)),!1;case 22:return a.flags|=65536,c===Bs?a.flags|=16384:(i=a.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},a.updateQueue=i):(a=i.retryQueue,a===null?i.retryQueue=new Set([c]):a.add(c)),Ld(n,c,h)),!1}throw Error(l(435,a.tag))}return Ld(n,c,h),cu(),!1}if(Je)return i=zn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=h,c!==Rf&&(n=Error(l(422),{cause:c}),oa(Zn(n,a)))):(c!==Rf&&(i=Error(l(423),{cause:c}),oa(Zn(i,a))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,c=Zn(c,a),h=dd(n.stateNode,c,h),Hf(n,h),jt!==4&&(jt=2)),!1;var y=Error(l(520),{cause:c});if(y=Zn(y,a),Ea===null?Ea=[y]:Ea.push(y),jt!==4&&(jt=2),i===null)return!0;c=Zn(c,a),a=i;do{switch(a.tag){case 3:return a.flags|=65536,n=h&-h,a.lanes|=n,n=dd(a.stateNode,c,n),Hf(a,n),!1;case 1:if(i=a.type,y=a.stateNode,(a.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Ei===null||!Ei.has(y))))return a.flags|=65536,h&=-h,a.lanes|=h,h=Wy(h),Jy(h,n,a,c),Hf(a,h),!1}a=a.return}while(a!==null);return!1}var md=Error(l(461)),qt=!1;function an(n,i,a,c){i.child=n===null?ry(i,null,a,c):fl(i,n.child,a,c)}function ev(n,i,a,c,h){a=a.render;var y=i.ref;if("ref"in c){var k={};for(var N in c)N!=="ref"&&(k[N]=c[N])}else k=c;return al(i),c=$f(n,i,a,k,y,h),N=Xf(),n!==null&&!qt?(Qf(n,i,h),Gr(n,i,h)):(Je&&N&&Mf(i),i.flags|=1,an(n,i,c,h),i.child)}function tv(n,i,a,c,h){if(n===null){var y=a.type;return typeof y=="function"&&!Af(y)&&y.defaultProps===void 0&&a.compare===null?(i.tag=15,i.type=y,nv(n,i,y,c,h)):(n=js(a.type,null,c,i,i.mode,h),n.ref=i.ref,n.return=i,i.child=n)}if(y=n.child,!Sd(n,h)){var k=y.memoizedProps;if(a=a.compare,a=a!==null?a:ra,a(k,c)&&n.ref===i.ref)return Gr(n,i,h)}return i.flags|=1,n=Br(y,c),n.ref=i.ref,n.return=i,i.child=n}function nv(n,i,a,c,h){if(n!==null){var y=n.memoizedProps;if(ra(y,c)&&n.ref===i.ref)if(qt=!1,i.pendingProps=c=y,Sd(n,h))(n.flags&131072)!==0&&(qt=!0);else return i.lanes=n.lanes,Gr(n,i,h)}return pd(n,i,a,c,h)}function rv(n,i,a,c){var h=c.children,y=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(y=y!==null?y.baseLanes|a:a,n!==null){for(c=i.child=n.child,h=0;c!==null;)h=h|c.lanes|c.childLanes,c=c.sibling;c=h&~y}else c=0,i.child=null;return iv(n,i,y,a,c)}if((a&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ls(i,y!==null?y.cachePool:null),y!==null?oy(i,y):qf(),ay(i);else return c=i.lanes=536870912,iv(n,i,y!==null?y.baseLanes|a:a,a,c)}else y!==null?(Ls(i,y.cachePool),oy(i,y),Si(),i.memoizedState=null):(n!==null&&Ls(i,null),qf(),Si());return an(n,i,h,a),i.child}function va(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function iv(n,i,a,c,h){var y=Pf();return y=y===null?null:{parent:Ht._currentValue,pool:y},i.memoizedState={baseLanes:a,cachePool:y},n!==null&&Ls(i,null),qf(),ay(i),n!==null&&Xl(n,i,c,!0),i.childLanes=h,null}function Js(n,i){return i=tu({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function lv(n,i,a){return fl(i,n.child,null,a),n=Js(i,i.pendingProps),n.flags|=2,In(i),i.memoizedState=null,n}function kA(n,i,a){var c=i.pendingProps,h=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(Je){if(c.mode==="hidden")return n=Js(i,c),i.lanes=536870912,va(null,n);if(Yf(i),(n=Ct)?(n=y0(n,er),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:mi!==null?{id:Cr,overflow:kr}:null,retryLane:536870912,hydrationErrors:null},a=Hg(n),a.return=i,i.child=a,ln=i,Ct=null)):n=null,n===null)throw hi(i);return i.lanes=536870912,null}return Js(i,c)}var y=n.memoizedState;if(y!==null){var k=y.dehydrated;if(Yf(i),h)if(i.flags&256)i.flags&=-257,i=lv(n,i,a);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(l(558));else if(qt||Xl(n,i,a,!1),h=(a&n.childLanes)!==0,qt||h){if(c=yt,c!==null&&(k=It(c,a),k!==0&&k!==y.retryLane))throw y.retryLane=k,rl(n,k),An(c,n,k),md;cu(),i=lv(n,i,a)}else n=y.treeContext,Ct=nr(k.nextSibling),ln=i,Je=!0,pi=null,er=!1,n!==null&&Gg(i,n),i=Js(i,c),i.flags|=4096;return i}return n=Br(n.child,{mode:c.mode,children:c.children}),n.ref=i.ref,i.child=n,n.return=i,n}function eu(n,i){var a=i.ref;if(a===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(n===null||n.ref!==a)&&(i.flags|=4194816)}}function pd(n,i,a,c,h){return al(i),a=$f(n,i,a,c,void 0,h),c=Xf(),n!==null&&!qt?(Qf(n,i,h),Gr(n,i,h)):(Je&&c&&Mf(i),i.flags|=1,an(n,i,a,h),i.child)}function ov(n,i,a,c,h,y){return al(i),i.updateQueue=null,a=uy(i,c,a,h),sy(n),c=Xf(),n!==null&&!qt?(Qf(n,i,y),Gr(n,i,y)):(Je&&c&&Mf(i),i.flags|=1,an(n,i,a,y),i.child)}function av(n,i,a,c,h){if(al(i),i.stateNode===null){var y=Gl,k=a.contextType;typeof k=="object"&&k!==null&&(y=on(k)),y=new a(c,y),i.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=fd,i.stateNode=y,y._reactInternals=i,y=i.stateNode,y.props=c,y.state=i.memoizedState,y.refs={},Uf(i),k=a.contextType,y.context=typeof k=="object"&&k!==null?on(k):Gl,y.state=i.memoizedState,k=a.getDerivedStateFromProps,typeof k=="function"&&(cd(i,a,k,c),y.state=i.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(k=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),k!==y.state&&fd.enqueueReplaceState(y,y.state,null),ma(i,c,y,h),da(),y.state=i.memoizedState),typeof y.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(n===null){y=i.stateNode;var N=i.memoizedProps,L=ml(a,N);y.props=L;var $=y.context,ie=a.contextType;k=Gl,typeof ie=="object"&&ie!==null&&(k=on(ie));var ae=a.getDerivedStateFromProps;ie=typeof ae=="function"||typeof y.getSnapshotBeforeUpdate=="function",N=i.pendingProps!==N,ie||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(N||$!==k)&&Ky(i,y,c,k),yi=!1;var Q=i.memoizedState;y.state=Q,ma(i,c,y,h),da(),$=i.memoizedState,N||Q!==$||yi?(typeof ae=="function"&&(cd(i,a,ae,c),$=i.memoizedState),(L=yi||Yy(i,a,L,c,Q,$,k))?(ie||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(i.flags|=4194308)):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=$),y.props=c,y.state=$,y.context=k,c=L):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{y=i.stateNode,Ff(n,i),k=i.memoizedProps,ie=ml(a,k),y.props=ie,ae=i.pendingProps,Q=y.context,$=a.contextType,L=Gl,typeof $=="object"&&$!==null&&(L=on($)),N=a.getDerivedStateFromProps,($=typeof N=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(k!==ae||Q!==L)&&Ky(i,y,c,L),yi=!1,Q=i.memoizedState,y.state=Q,ma(i,c,y,h),da();var ee=i.memoizedState;k!==ae||Q!==ee||yi||n!==null&&n.dependencies!==null&&Is(n.dependencies)?(typeof N=="function"&&(cd(i,a,N,c),ee=i.memoizedState),(ie=yi||Yy(i,a,ie,c,Q,ee,L)||n!==null&&n.dependencies!==null&&Is(n.dependencies))?($||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,ee,L),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,ee,L)),typeof y.componentDidUpdate=="function"&&(i.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof y.componentDidUpdate!="function"||k===n.memoizedProps&&Q===n.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||k===n.memoizedProps&&Q===n.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=ee),y.props=c,y.state=ee,y.context=L,c=ie):(typeof y.componentDidUpdate!="function"||k===n.memoizedProps&&Q===n.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||k===n.memoizedProps&&Q===n.memoizedState||(i.flags|=1024),c=!1)}return y=c,eu(n,i),c=(i.flags&128)!==0,y||c?(y=i.stateNode,a=c&&typeof a.getDerivedStateFromError!="function"?null:y.render(),i.flags|=1,n!==null&&c?(i.child=fl(i,n.child,null,h),i.child=fl(i,null,a,h)):an(n,i,a,h),i.memoizedState=y.state,n=i.child):n=Gr(n,i,h),n}function sv(n,i,a,c){return ll(),i.flags|=256,an(n,i,a,c),i.child}var hd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gd(n){return{baseLanes:n,cachePool:Zg()}}function yd(n,i,a){return n=n!==null?n.childLanes&~a:0,i&&(n|=Ln),n}function uv(n,i,a){var c=i.pendingProps,h=!1,y=(i.flags&128)!==0,k;if((k=y)||(k=n!==null&&n.memoizedState===null?!1:(Pt.current&2)!==0),k&&(h=!0,i.flags&=-129),k=(i.flags&32)!==0,i.flags&=-33,n===null){if(Je){if(h?bi(i):Si(),(n=Ct)?(n=y0(n,er),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:mi!==null?{id:Cr,overflow:kr}:null,retryLane:536870912,hydrationErrors:null},a=Hg(n),a.return=i,i.child=a,ln=i,Ct=null)):n=null,n===null)throw hi(i);return Jd(n)?i.lanes=32:i.lanes=536870912,null}var N=c.children;return c=c.fallback,h?(Si(),h=i.mode,N=tu({mode:"hidden",children:N},h),c=il(c,h,a,null),N.return=i,c.return=i,N.sibling=c,i.child=N,c=i.child,c.memoizedState=gd(a),c.childLanes=yd(n,k,a),i.memoizedState=hd,va(null,c)):(bi(i),vd(i,N))}var L=n.memoizedState;if(L!==null&&(N=L.dehydrated,N!==null)){if(y)i.flags&256?(bi(i),i.flags&=-257,i=xd(n,i,a)):i.memoizedState!==null?(Si(),i.child=n.child,i.flags|=128,i=null):(Si(),N=c.fallback,h=i.mode,c=tu({mode:"visible",children:c.children},h),N=il(N,h,a,null),N.flags|=2,c.return=i,N.return=i,c.sibling=N,i.child=c,fl(i,n.child,null,a),c=i.child,c.memoizedState=gd(a),c.childLanes=yd(n,k,a),i.memoizedState=hd,i=va(null,c));else if(bi(i),Jd(N)){if(k=N.nextSibling&&N.nextSibling.dataset,k)var $=k.dgst;k=$,c=Error(l(419)),c.stack="",c.digest=k,oa({value:c,source:null,stack:null}),i=xd(n,i,a)}else if(qt||Xl(n,i,a,!1),k=(a&n.childLanes)!==0,qt||k){if(k=yt,k!==null&&(c=It(k,a),c!==0&&c!==L.retryLane))throw L.retryLane=c,rl(n,c),An(k,n,c),md;Wd(N)||cu(),i=xd(n,i,a)}else Wd(N)?(i.flags|=192,i.child=n.child,i=null):(n=L.treeContext,Ct=nr(N.nextSibling),ln=i,Je=!0,pi=null,er=!1,n!==null&&Gg(i,n),i=vd(i,c.children),i.flags|=4096);return i}return h?(Si(),N=c.fallback,h=i.mode,L=n.child,$=L.sibling,c=Br(L,{mode:"hidden",children:c.children}),c.subtreeFlags=L.subtreeFlags&65011712,$!==null?N=Br($,N):(N=il(N,h,a,null),N.flags|=2),N.return=i,c.return=i,c.sibling=N,i.child=c,va(null,c),c=i.child,N=n.child.memoizedState,N===null?N=gd(a):(h=N.cachePool,h!==null?(L=Ht._currentValue,h=h.parent!==L?{parent:L,pool:L}:h):h=Zg(),N={baseLanes:N.baseLanes|a,cachePool:h}),c.memoizedState=N,c.childLanes=yd(n,k,a),i.memoizedState=hd,va(n.child,c)):(bi(i),a=n.child,n=a.sibling,a=Br(a,{mode:"visible",children:c.children}),a.return=i,a.sibling=null,n!==null&&(k=i.deletions,k===null?(i.deletions=[n],i.flags|=16):k.push(n)),i.child=a,i.memoizedState=null,a)}function vd(n,i){return i=tu({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function tu(n,i){return n=jn(22,n,null,i),n.lanes=0,n}function xd(n,i,a){return fl(i,n.child,null,a),n=vd(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function cv(n,i,a){n.lanes|=i;var c=n.alternate;c!==null&&(c.lanes|=i),zf(n.return,i,a)}function bd(n,i,a,c,h,y){var k=n.memoizedState;k===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:h,treeForkCount:y}:(k.isBackwards=i,k.rendering=null,k.renderingStartTime=0,k.last=c,k.tail=a,k.tailMode=h,k.treeForkCount=y)}function fv(n,i,a){var c=i.pendingProps,h=c.revealOrder,y=c.tail;c=c.children;var k=Pt.current,N=(k&2)!==0;if(N?(k=k&1|2,i.flags|=128):k&=1,R(Pt,k),an(n,i,c,a),c=Je?la:0,!N&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&cv(n,a,i);else if(n.tag===19)cv(n,a,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(h){case"forwards":for(a=i.child,h=null;a!==null;)n=a.alternate,n!==null&&Vs(n)===null&&(h=a),a=a.sibling;a=h,a===null?(h=i.child,i.child=null):(h=a.sibling,a.sibling=null),bd(i,!1,h,a,y,c);break;case"backwards":case"unstable_legacy-backwards":for(a=null,h=i.child,i.child=null;h!==null;){if(n=h.alternate,n!==null&&Vs(n)===null){i.child=h;break}n=h.sibling,h.sibling=a,a=h,h=n}bd(i,!0,a,null,y,c);break;case"together":bd(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function Gr(n,i,a){if(n!==null&&(i.dependencies=n.dependencies),ki|=i.lanes,(a&i.childLanes)===0)if(n!==null){if(Xl(n,i,a,!1),(a&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(l(153));if(i.child!==null){for(n=i.child,a=Br(n,n.pendingProps),i.child=a,a.return=i;n.sibling!==null;)n=n.sibling,a=a.sibling=Br(n,n.pendingProps),a.return=i;a.sibling=null}return i.child}function Sd(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&Is(n)))}function EA(n,i,a){switch(i.tag){case 3:he(i,i.stateNode.containerInfo),gi(i,Ht,n.memoizedState.cache),ll();break;case 27:case 5:ge(i);break;case 4:he(i,i.stateNode.containerInfo);break;case 10:gi(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Yf(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(bi(i),i.flags|=128,null):(a&i.child.childLanes)!==0?uv(n,i,a):(bi(i),n=Gr(n,i,a),n!==null?n.sibling:null);bi(i);break;case 19:var h=(n.flags&128)!==0;if(c=(a&i.childLanes)!==0,c||(Xl(n,i,a,!1),c=(a&i.childLanes)!==0),h){if(c)return fv(n,i,a);i.flags|=128}if(h=i.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),R(Pt,Pt.current),c)break;return null;case 22:return i.lanes=0,rv(n,i,a,i.pendingProps);case 24:gi(i,Ht,n.memoizedState.cache)}return Gr(n,i,a)}function dv(n,i,a){if(n!==null)if(n.memoizedProps!==i.pendingProps)qt=!0;else{if(!Sd(n,a)&&(i.flags&128)===0)return qt=!1,EA(n,i,a);qt=(n.flags&131072)!==0}else qt=!1,Je&&(i.flags&1048576)!==0&&qg(i,la,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(n=ul(i.elementType),i.type=n,typeof n=="function")Af(n)?(c=ml(n,c),i.tag=1,i=av(null,i,n,c,a)):(i.tag=0,i=pd(null,i,n,c,a));else{if(n!=null){var h=n.$$typeof;if(h===z){i.tag=11,i=ev(null,i,n,c,a);break e}else if(h===U){i.tag=14,i=tv(null,i,n,c,a);break e}}throw i=ne(n)||n,Error(l(306,i,""))}}return i;case 0:return pd(n,i,i.type,i.pendingProps,a);case 1:return c=i.type,h=ml(c,i.pendingProps),av(n,i,c,h,a);case 3:e:{if(he(i,i.stateNode.containerInfo),n===null)throw Error(l(387));c=i.pendingProps;var y=i.memoizedState;h=y.element,Ff(n,i),ma(i,c,null,a);var k=i.memoizedState;if(c=k.cache,gi(i,Ht,c),c!==y.cache&&If(i,[Ht],a,!0),da(),c=k.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:k.cache},i.updateQueue.baseState=y,i.memoizedState=y,i.flags&256){i=sv(n,i,c,a);break e}else if(c!==h){h=Zn(Error(l(424)),i),oa(h),i=sv(n,i,c,a);break e}else{switch(n=i.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(Ct=nr(n.firstChild),ln=i,Je=!0,pi=null,er=!0,a=ry(i,null,c,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(ll(),c===h){i=Gr(n,i,a);break e}an(n,i,c,a)}i=i.child}return i;case 26:return eu(n,i),n===null?(a=C0(i.type,null,i.pendingProps,null))?i.memoizedState=a:Je||(a=i.type,n=i.pendingProps,c=yu(se.current).createElement(a),c[wt]=i,c[ft]=n,sn(c,a,n),Dt(c),i.stateNode=c):i.memoizedState=C0(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return ge(i),n===null&&Je&&(c=i.stateNode=b0(i.type,i.pendingProps,se.current),ln=i,er=!0,h=Ct,Mi(i.type)?(em=h,Ct=nr(c.firstChild)):Ct=h),an(n,i,i.pendingProps.children,a),eu(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&Je&&((h=c=Ct)&&(c=tT(c,i.type,i.pendingProps,er),c!==null?(i.stateNode=c,ln=i,Ct=nr(c.firstChild),er=!1,h=!0):h=!1),h||hi(i)),ge(i),h=i.type,y=i.pendingProps,k=n!==null?n.memoizedProps:null,c=y.children,Xd(h,y)?c=null:k!==null&&Xd(h,k)&&(i.flags|=32),i.memoizedState!==null&&(h=$f(n,i,gA,null,null,a),ja._currentValue=h),eu(n,i),an(n,i,c,a),i.child;case 6:return n===null&&Je&&((n=a=Ct)&&(a=nT(a,i.pendingProps,er),a!==null?(i.stateNode=a,ln=i,Ct=null,n=!0):n=!1),n||hi(i)),null;case 13:return uv(n,i,a);case 4:return he(i,i.stateNode.containerInfo),c=i.pendingProps,n===null?i.child=fl(i,null,c,a):an(n,i,c,a),i.child;case 11:return ev(n,i,i.type,i.pendingProps,a);case 7:return an(n,i,i.pendingProps,a),i.child;case 8:return an(n,i,i.pendingProps.children,a),i.child;case 12:return an(n,i,i.pendingProps.children,a),i.child;case 10:return c=i.pendingProps,gi(i,i.type,c.value),an(n,i,c.children,a),i.child;case 9:return h=i.type._context,c=i.pendingProps.children,al(i),h=on(h),c=c(h),i.flags|=1,an(n,i,c,a),i.child;case 14:return tv(n,i,i.type,i.pendingProps,a);case 15:return nv(n,i,i.type,i.pendingProps,a);case 19:return fv(n,i,a);case 31:return kA(n,i,a);case 22:return rv(n,i,a,i.pendingProps);case 24:return al(i),c=on(Ht),n===null?(h=Pf(),h===null&&(h=yt,y=Df(),h.pooledCache=y,y.refCount++,y!==null&&(h.pooledCacheLanes|=a),h=y),i.memoizedState={parent:c,cache:h},Uf(i),gi(i,Ht,h)):((n.lanes&a)!==0&&(Ff(n,i),ma(i,null,null,a),da()),h=n.memoizedState,y=i.memoizedState,h.parent!==c?(h={parent:c,cache:c},i.memoizedState=h,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=h),gi(i,Ht,c)):(c=y.cache,gi(i,Ht,c),c!==h.cache&&If(i,[Ht],a,!0))),an(n,i,i.pendingProps.children,a),i.child;case 29:throw i.pendingProps}throw Error(l(156,i.tag))}function Yr(n){n.flags|=4}function wd(n,i,a,c,h){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(Bv())n.flags|=8192;else throw cl=Bs,Bf}else n.flags&=-16777217}function mv(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!_0(i))if(Bv())n.flags|=8192;else throw cl=Bs,Bf}function nu(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?zr():536870912,n.lanes|=i,ao|=i)}function xa(n,i){if(!Je)switch(n.tailMode){case"hidden":i=n.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?n.tail=null:a.sibling=null;break;case"collapsed":a=n.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function kt(n){var i=n.alternate!==null&&n.alternate.child===n.child,a=0,c=0;if(i)for(var h=n.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags&65011712,c|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=c,n.childLanes=a,i}function AA(n,i,a){var c=i.pendingProps;switch(Nf(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kt(i),null;case 1:return kt(i),null;case 3:return a=i.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Hr(Ht),ce(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(n===null||n.child===null)&&($l(i)?Yr(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Of())),kt(i),null;case 26:var h=i.type,y=i.memoizedState;return n===null?(Yr(i),y!==null?(kt(i),mv(i,y)):(kt(i),wd(i,h,null,c,a))):y?y!==n.memoizedState?(Yr(i),kt(i),mv(i,y)):(kt(i),i.flags&=-16777217):(n=n.memoizedProps,n!==c&&Yr(i),kt(i),wd(i,h,n,c,a)),null;case 27:if(Ce(i),a=se.current,h=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&Yr(i);else{if(!c){if(i.stateNode===null)throw Error(l(166));return kt(i),null}n=ue.current,$l(i)?Yg(i):(n=b0(h,c,a),i.stateNode=n,Yr(i))}return kt(i),null;case 5:if(Ce(i),h=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&Yr(i);else{if(!c){if(i.stateNode===null)throw Error(l(166));return kt(i),null}if(y=ue.current,$l(i))Yg(i);else{var k=yu(se.current);switch(y){case 1:y=k.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:y=k.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":y=k.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":y=k.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":y=k.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof c.is=="string"?k.createElement("select",{is:c.is}):k.createElement("select"),c.multiple?y.multiple=!0:c.size&&(y.size=c.size);break;default:y=typeof c.is=="string"?k.createElement(h,{is:c.is}):k.createElement(h)}}y[wt]=i,y[ft]=c;e:for(k=i.child;k!==null;){if(k.tag===5||k.tag===6)y.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===i)break e;for(;k.sibling===null;){if(k.return===null||k.return===i)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}i.stateNode=y;e:switch(sn(y,h,c),h){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Yr(i)}}return kt(i),wd(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,a),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==c&&Yr(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(l(166));if(n=se.current,$l(i)){if(n=i.stateNode,a=i.memoizedProps,c=null,h=ln,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}n[wt]=i,n=!!(n.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||u0(n.nodeValue,a)),n||hi(i,!0)}else n=yu(n).createTextNode(c),n[wt]=i,i.stateNode=n}return kt(i),null;case 31:if(a=i.memoizedState,n===null||n.memoizedState!==null){if(c=$l(i),a!==null){if(n===null){if(!c)throw Error(l(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(l(557));n[wt]=i}else ll(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;kt(i),n=!1}else a=Of(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=a),n=!0;if(!n)return i.flags&256?(In(i),i):(In(i),null);if((i.flags&128)!==0)throw Error(l(558))}return kt(i),null;case 13:if(c=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=$l(i),c!==null&&c.dehydrated!==null){if(n===null){if(!h)throw Error(l(318));if(h=i.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(l(317));h[wt]=i}else ll(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;kt(i),h=!1}else h=Of(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return i.flags&256?(In(i),i):(In(i),null)}return In(i),(i.flags&128)!==0?(i.lanes=a,i):(a=c!==null,n=n!==null&&n.memoizedState!==null,a&&(c=i.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool),y=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(y=c.memoizedState.cachePool.pool),y!==h&&(c.flags|=2048)),a!==n&&a&&(i.child.flags|=8192),nu(i,i.updateQueue),kt(i),null);case 4:return ce(),n===null&&qd(i.stateNode.containerInfo),kt(i),null;case 10:return Hr(i.type),kt(i),null;case 19:if(H(Pt),c=i.memoizedState,c===null)return kt(i),null;if(h=(i.flags&128)!==0,y=c.rendering,y===null)if(h)xa(c,!1);else{if(jt!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(y=Vs(n),y!==null){for(i.flags|=128,xa(c,!1),n=y.updateQueue,i.updateQueue=n,nu(i,n),i.subtreeFlags=0,n=a,a=i.child;a!==null;)Fg(a,n),a=a.sibling;return R(Pt,Pt.current&1|2),Je&&Ur(i,c.treeForkCount),i.child}n=n.sibling}c.tail!==null&&De()>au&&(i.flags|=128,h=!0,xa(c,!1),i.lanes=4194304)}else{if(!h)if(n=Vs(y),n!==null){if(i.flags|=128,h=!0,n=n.updateQueue,i.updateQueue=n,nu(i,n),xa(c,!0),c.tail===null&&c.tailMode==="hidden"&&!y.alternate&&!Je)return kt(i),null}else 2*De()-c.renderingStartTime>au&&a!==536870912&&(i.flags|=128,h=!0,xa(c,!1),i.lanes=4194304);c.isBackwards?(y.sibling=i.child,i.child=y):(n=c.last,n!==null?n.sibling=y:i.child=y,c.last=y)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=De(),n.sibling=null,a=Pt.current,R(Pt,h?a&1|2:a&1),Je&&Ur(i,c.treeForkCount),n):(kt(i),null);case 22:case 23:return In(i),Gf(),c=i.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(a&536870912)!==0&&(i.flags&128)===0&&(kt(i),i.subtreeFlags&6&&(i.flags|=8192)):kt(i),a=i.updateQueue,a!==null&&nu(i,a.retryQueue),a=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==a&&(i.flags|=2048),n!==null&&H(sl),null;case 24:return a=null,n!==null&&(a=n.memoizedState.cache),i.memoizedState.cache!==a&&(i.flags|=2048),Hr(Ht),kt(i),null;case 25:return null;case 30:return null}throw Error(l(156,i.tag))}function TA(n,i){switch(Nf(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return Hr(Ht),ce(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return Ce(i),null;case 31:if(i.memoizedState!==null){if(In(i),i.alternate===null)throw Error(l(340));ll()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(In(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(l(340));ll()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return H(Pt),null;case 4:return ce(),null;case 10:return Hr(i.type),null;case 22:case 23:return In(i),Gf(),n!==null&&H(sl),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return Hr(Ht),null;case 25:return null;default:return null}}function pv(n,i){switch(Nf(i),i.tag){case 3:Hr(Ht),ce();break;case 26:case 27:case 5:Ce(i);break;case 4:ce();break;case 31:i.memoizedState!==null&&In(i);break;case 13:In(i);break;case 19:H(Pt);break;case 10:Hr(i.type);break;case 22:case 23:In(i),Gf(),n!==null&&H(sl);break;case 24:Hr(Ht)}}function ba(n,i){try{var a=i.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var h=c.next;a=h;do{if((a.tag&n)===n){c=void 0;var y=a.create,k=a.inst;c=y(),k.destroy=c}a=a.next}while(a!==h)}}catch(N){ut(i,i.return,N)}}function wi(n,i,a){try{var c=i.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var y=h.next;c=y;do{if((c.tag&n)===n){var k=c.inst,N=k.destroy;if(N!==void 0){k.destroy=void 0,h=i;var L=a,$=N;try{$()}catch(ie){ut(h,L,ie)}}}c=c.next}while(c!==y)}}catch(ie){ut(i,i.return,ie)}}function hv(n){var i=n.updateQueue;if(i!==null){var a=n.stateNode;try{ly(i,a)}catch(c){ut(n,n.return,c)}}}function gv(n,i,a){a.props=ml(n.type,n.memoizedProps),a.state=n.memoizedState;try{a.componentWillUnmount()}catch(c){ut(n,i,c)}}function Sa(n,i){try{var a=n.ref;if(a!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof a=="function"?n.refCleanup=a(c):a.current=c}}catch(h){ut(n,i,h)}}function Er(n,i){var a=n.ref,c=n.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(h){ut(n,i,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){ut(n,i,h)}else a.current=null}function yv(n){var i=n.type,a=n.memoizedProps,c=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break e;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(h){ut(n,n.return,h)}}function Cd(n,i,a){try{var c=n.stateNode;XA(c,n.type,a,i),c[ft]=i}catch(h){ut(n,n.return,h)}}function vv(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Mi(n.type)||n.tag===4}function kd(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||vv(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Mi(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Ed(n,i,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(n,i):(i=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,i.appendChild(n),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Lr));else if(c!==4&&(c===27&&Mi(n.type)&&(a=n.stateNode,i=null),n=n.child,n!==null))for(Ed(n,i,a),n=n.sibling;n!==null;)Ed(n,i,a),n=n.sibling}function ru(n,i,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?a.insertBefore(n,i):a.appendChild(n);else if(c!==4&&(c===27&&Mi(n.type)&&(a=n.stateNode),n=n.child,n!==null))for(ru(n,i,a),n=n.sibling;n!==null;)ru(n,i,a),n=n.sibling}function xv(n){var i=n.stateNode,a=n.memoizedProps;try{for(var c=n.type,h=i.attributes;h.length;)i.removeAttributeNode(h[0]);sn(i,c,a),i[wt]=n,i[ft]=a}catch(y){ut(n,n.return,y)}}var Kr=!1,Gt=!1,Ad=!1,bv=typeof WeakSet=="function"?WeakSet:Set,Jt=null;function _A(n,i){if(n=n.containerInfo,Kd=ku,n=Og(n),xf(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var h=c.anchorOffset,y=c.focusNode;c=c.focusOffset;try{a.nodeType,y.nodeType}catch{a=null;break e}var k=0,N=-1,L=-1,$=0,ie=0,ae=n,Q=null;t:for(;;){for(var ee;ae!==a||h!==0&&ae.nodeType!==3||(N=k+h),ae!==y||c!==0&&ae.nodeType!==3||(L=k+c),ae.nodeType===3&&(k+=ae.nodeValue.length),(ee=ae.firstChild)!==null;)Q=ae,ae=ee;for(;;){if(ae===n)break t;if(Q===a&&++$===h&&(N=k),Q===y&&++ie===c&&(L=k),(ee=ae.nextSibling)!==null)break;ae=Q,Q=ae.parentNode}ae=ee}a=N===-1||L===-1?null:{start:N,end:L}}else a=null}a=a||{start:0,end:0}}else a=null;for($d={focusedElem:n,selectionRange:a},ku=!1,Jt=i;Jt!==null;)if(i=Jt,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,Jt=n;else for(;Jt!==null;){switch(i=Jt,y=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(a=0;a<n.length;a++)h=n[a],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&y!==null){n=void 0,a=i,h=y.memoizedProps,y=y.memoizedState,c=a.stateNode;try{var ye=ml(a.type,h);n=c.getSnapshotBeforeUpdate(ye,y),c.__reactInternalSnapshotBeforeUpdate=n}catch(Me){ut(a,a.return,Me)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,a=n.nodeType,a===9)Zd(n);else if(a===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Zd(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(l(163))}if(n=i.sibling,n!==null){n.return=i.return,Jt=n;break}Jt=i.return}}function Sv(n,i,a){var c=a.flags;switch(a.tag){case 0:case 11:case 15:Xr(n,a),c&4&&ba(5,a);break;case 1:if(Xr(n,a),c&4)if(n=a.stateNode,i===null)try{n.componentDidMount()}catch(k){ut(a,a.return,k)}else{var h=ml(a.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(h,i,n.__reactInternalSnapshotBeforeUpdate)}catch(k){ut(a,a.return,k)}}c&64&&hv(a),c&512&&Sa(a,a.return);break;case 3:if(Xr(n,a),c&64&&(n=a.updateQueue,n!==null)){if(i=null,a.child!==null)switch(a.child.tag){case 27:case 5:i=a.child.stateNode;break;case 1:i=a.child.stateNode}try{ly(n,i)}catch(k){ut(a,a.return,k)}}break;case 27:i===null&&c&4&&xv(a);case 26:case 5:Xr(n,a),i===null&&c&4&&yv(a),c&512&&Sa(a,a.return);break;case 12:Xr(n,a);break;case 31:Xr(n,a),c&4&&kv(n,a);break;case 13:Xr(n,a),c&4&&Ev(n,a),c&64&&(n=a.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(a=LA.bind(null,a),rT(n,a))));break;case 22:if(c=a.memoizedState!==null||Kr,!c){i=i!==null&&i.memoizedState!==null||Gt,h=Kr;var y=Gt;Kr=c,(Gt=i)&&!y?Qr(n,a,(a.subtreeFlags&8772)!==0):Xr(n,a),Kr=h,Gt=y}break;case 30:break;default:Xr(n,a)}}function wv(n){var i=n.alternate;i!==null&&(n.alternate=null,wv(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&Zi(i)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Tt=null,wn=!1;function $r(n,i,a){for(a=a.child;a!==null;)Cv(n,i,a),a=a.sibling}function Cv(n,i,a){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(St,a)}catch{}switch(a.tag){case 26:Gt||Er(a,i),$r(n,i,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Gt||Er(a,i);var c=Tt,h=wn;Mi(a.type)&&(Tt=a.stateNode,wn=!1),$r(n,i,a),Na(a.stateNode),Tt=c,wn=h;break;case 5:Gt||Er(a,i);case 6:if(c=Tt,h=wn,Tt=null,$r(n,i,a),Tt=c,wn=h,Tt!==null)if(wn)try{(Tt.nodeType===9?Tt.body:Tt.nodeName==="HTML"?Tt.ownerDocument.body:Tt).removeChild(a.stateNode)}catch(y){ut(a,i,y)}else try{Tt.removeChild(a.stateNode)}catch(y){ut(a,i,y)}break;case 18:Tt!==null&&(wn?(n=Tt,h0(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,a.stateNode),go(n)):h0(Tt,a.stateNode));break;case 4:c=Tt,h=wn,Tt=a.stateNode.containerInfo,wn=!0,$r(n,i,a),Tt=c,wn=h;break;case 0:case 11:case 14:case 15:wi(2,a,i),Gt||wi(4,a,i),$r(n,i,a);break;case 1:Gt||(Er(a,i),c=a.stateNode,typeof c.componentWillUnmount=="function"&&gv(a,i,c)),$r(n,i,a);break;case 21:$r(n,i,a);break;case 22:Gt=(c=Gt)||a.memoizedState!==null,$r(n,i,a),Gt=c;break;default:$r(n,i,a)}}function kv(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{go(n)}catch(a){ut(i,i.return,a)}}}function Ev(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{go(n)}catch(a){ut(i,i.return,a)}}function MA(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new bv),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new bv),i;default:throw Error(l(435,n.tag))}}function iu(n,i){var a=MA(n);i.forEach(function(c){if(!a.has(c)){a.add(c);var h=PA.bind(null,n,c);c.then(h,h)}})}function Cn(n,i){var a=i.deletions;if(a!==null)for(var c=0;c<a.length;c++){var h=a[c],y=n,k=i,N=k;e:for(;N!==null;){switch(N.tag){case 27:if(Mi(N.type)){Tt=N.stateNode,wn=!1;break e}break;case 5:Tt=N.stateNode,wn=!1;break e;case 3:case 4:Tt=N.stateNode.containerInfo,wn=!0;break e}N=N.return}if(Tt===null)throw Error(l(160));Cv(y,k,h),Tt=null,wn=!1,y=h.alternate,y!==null&&(y.return=null),h.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Av(i,n),i=i.sibling}var pr=null;function Av(n,i){var a=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Cn(i,n),kn(n),c&4&&(wi(3,n,n.return),ba(3,n),wi(5,n,n.return));break;case 1:Cn(i,n),kn(n),c&512&&(Gt||a===null||Er(a,a.return)),c&64&&Kr&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(a=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=a===null?c:a.concat(c))));break;case 26:var h=pr;if(Cn(i,n),kn(n),c&512&&(Gt||a===null||Er(a,a.return)),c&4){var y=a!==null?a.memoizedState:null;if(c=n.memoizedState,a===null)if(c===null)if(n.stateNode===null){e:{c=n.type,a=n.memoizedProps,h=h.ownerDocument||h;t:switch(c){case"title":y=h.getElementsByTagName("title")[0],(!y||y[lt]||y[wt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=h.createElement(c),h.head.insertBefore(y,h.querySelector("head > title"))),sn(y,c,a),y[wt]=n,Dt(y),c=y;break e;case"link":var k=A0("link","href",h).get(c+(a.href||""));if(k){for(var N=0;N<k.length;N++)if(y=k[N],y.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&y.getAttribute("rel")===(a.rel==null?null:a.rel)&&y.getAttribute("title")===(a.title==null?null:a.title)&&y.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){k.splice(N,1);break t}}y=h.createElement(c),sn(y,c,a),h.head.appendChild(y);break;case"meta":if(k=A0("meta","content",h).get(c+(a.content||""))){for(N=0;N<k.length;N++)if(y=k[N],y.getAttribute("content")===(a.content==null?null:""+a.content)&&y.getAttribute("name")===(a.name==null?null:a.name)&&y.getAttribute("property")===(a.property==null?null:a.property)&&y.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&y.getAttribute("charset")===(a.charSet==null?null:a.charSet)){k.splice(N,1);break t}}y=h.createElement(c),sn(y,c,a),h.head.appendChild(y);break;default:throw Error(l(468,c))}y[wt]=n,Dt(y),c=y}n.stateNode=c}else T0(h,n.type,n.stateNode);else n.stateNode=E0(h,c,n.memoizedProps);else y!==c?(y===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):y.count--,c===null?T0(h,n.type,n.stateNode):E0(h,c,n.memoizedProps)):c===null&&n.stateNode!==null&&Cd(n,n.memoizedProps,a.memoizedProps)}break;case 27:Cn(i,n),kn(n),c&512&&(Gt||a===null||Er(a,a.return)),a!==null&&c&4&&Cd(n,n.memoizedProps,a.memoizedProps);break;case 5:if(Cn(i,n),kn(n),c&512&&(Gt||a===null||Er(a,a.return)),n.flags&32){h=n.stateNode;try{Pl(h,"")}catch(ye){ut(n,n.return,ye)}}c&4&&n.stateNode!=null&&(h=n.memoizedProps,Cd(n,h,a!==null?a.memoizedProps:h)),c&1024&&(Ad=!0);break;case 6:if(Cn(i,n),kn(n),c&4){if(n.stateNode===null)throw Error(l(162));c=n.memoizedProps,a=n.stateNode;try{a.nodeValue=c}catch(ye){ut(n,n.return,ye)}}break;case 3:if(bu=null,h=pr,pr=vu(i.containerInfo),Cn(i,n),pr=h,kn(n),c&4&&a!==null&&a.memoizedState.isDehydrated)try{go(i.containerInfo)}catch(ye){ut(n,n.return,ye)}Ad&&(Ad=!1,Tv(n));break;case 4:c=pr,pr=vu(n.stateNode.containerInfo),Cn(i,n),kn(n),pr=c;break;case 12:Cn(i,n),kn(n);break;case 31:Cn(i,n),kn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,iu(n,c)));break;case 13:Cn(i,n),kn(n),n.child.flags&8192&&n.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ou=De()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,iu(n,c)));break;case 22:h=n.memoizedState!==null;var L=a!==null&&a.memoizedState!==null,$=Kr,ie=Gt;if(Kr=$||h,Gt=ie||L,Cn(i,n),Gt=ie,Kr=$,kn(n),c&8192)e:for(i=n.stateNode,i._visibility=h?i._visibility&-2:i._visibility|1,h&&(a===null||L||Kr||Gt||pl(n)),a=null,i=n;;){if(i.tag===5||i.tag===26){if(a===null){L=a=i;try{if(y=L.stateNode,h)k=y.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{N=L.stateNode;var ae=L.memoizedProps.style,Q=ae!=null&&ae.hasOwnProperty("display")?ae.display:null;N.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(ye){ut(L,L.return,ye)}}}else if(i.tag===6){if(a===null){L=i;try{L.stateNode.nodeValue=h?"":L.memoizedProps}catch(ye){ut(L,L.return,ye)}}}else if(i.tag===18){if(a===null){L=i;try{var ee=L.stateNode;h?g0(ee,!0):g0(L.stateNode,!1)}catch(ye){ut(L,L.return,ye)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;a===i&&(a=null),i=i.return}a===i&&(a=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=n.updateQueue,c!==null&&(a=c.retryQueue,a!==null&&(c.retryQueue=null,iu(n,a))));break;case 19:Cn(i,n),kn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,iu(n,c)));break;case 30:break;case 21:break;default:Cn(i,n),kn(n)}}function kn(n){var i=n.flags;if(i&2){try{for(var a,c=n.return;c!==null;){if(vv(c)){a=c;break}c=c.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var h=a.stateNode,y=kd(n);ru(n,y,h);break;case 5:var k=a.stateNode;a.flags&32&&(Pl(k,""),a.flags&=-33);var N=kd(n);ru(n,N,k);break;case 3:case 4:var L=a.stateNode.containerInfo,$=kd(n);Ed(n,$,L);break;default:throw Error(l(161))}}catch(ie){ut(n,n.return,ie)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function Tv(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;Tv(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function Xr(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Sv(n,i.alternate,i),i=i.sibling}function pl(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:wi(4,i,i.return),pl(i);break;case 1:Er(i,i.return);var a=i.stateNode;typeof a.componentWillUnmount=="function"&&gv(i,i.return,a),pl(i);break;case 27:Na(i.stateNode);case 26:case 5:Er(i,i.return),pl(i);break;case 22:i.memoizedState===null&&pl(i);break;case 30:pl(i);break;default:pl(i)}n=n.sibling}}function Qr(n,i,a){for(a=a&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,h=n,y=i,k=y.flags;switch(y.tag){case 0:case 11:case 15:Qr(h,y,a),ba(4,y);break;case 1:if(Qr(h,y,a),c=y,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch($){ut(c,c.return,$)}if(c=y,h=c.updateQueue,h!==null){var N=c.stateNode;try{var L=h.shared.hiddenCallbacks;if(L!==null)for(h.shared.hiddenCallbacks=null,h=0;h<L.length;h++)iy(L[h],N)}catch($){ut(c,c.return,$)}}a&&k&64&&hv(y),Sa(y,y.return);break;case 27:xv(y);case 26:case 5:Qr(h,y,a),a&&c===null&&k&4&&yv(y),Sa(y,y.return);break;case 12:Qr(h,y,a);break;case 31:Qr(h,y,a),a&&k&4&&kv(h,y);break;case 13:Qr(h,y,a),a&&k&4&&Ev(h,y);break;case 22:y.memoizedState===null&&Qr(h,y,a),Sa(y,y.return);break;case 30:break;default:Qr(h,y,a)}i=i.sibling}}function Td(n,i){var a=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==a&&(n!=null&&n.refCount++,a!=null&&aa(a))}function _d(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&aa(n))}function hr(n,i,a,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)_v(n,i,a,c),i=i.sibling}function _v(n,i,a,c){var h=i.flags;switch(i.tag){case 0:case 11:case 15:hr(n,i,a,c),h&2048&&ba(9,i);break;case 1:hr(n,i,a,c);break;case 3:hr(n,i,a,c),h&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&aa(n)));break;case 12:if(h&2048){hr(n,i,a,c),n=i.stateNode;try{var y=i.memoizedProps,k=y.id,N=y.onPostCommit;typeof N=="function"&&N(k,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(L){ut(i,i.return,L)}}else hr(n,i,a,c);break;case 31:hr(n,i,a,c);break;case 13:hr(n,i,a,c);break;case 23:break;case 22:y=i.stateNode,k=i.alternate,i.memoizedState!==null?y._visibility&2?hr(n,i,a,c):wa(n,i):y._visibility&2?hr(n,i,a,c):(y._visibility|=2,io(n,i,a,c,(i.subtreeFlags&10256)!==0||!1)),h&2048&&Td(k,i);break;case 24:hr(n,i,a,c),h&2048&&_d(i.alternate,i);break;default:hr(n,i,a,c)}}function io(n,i,a,c,h){for(h=h&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var y=n,k=i,N=a,L=c,$=k.flags;switch(k.tag){case 0:case 11:case 15:io(y,k,N,L,h),ba(8,k);break;case 23:break;case 22:var ie=k.stateNode;k.memoizedState!==null?ie._visibility&2?io(y,k,N,L,h):wa(y,k):(ie._visibility|=2,io(y,k,N,L,h)),h&&$&2048&&Td(k.alternate,k);break;case 24:io(y,k,N,L,h),h&&$&2048&&_d(k.alternate,k);break;default:io(y,k,N,L,h)}i=i.sibling}}function wa(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var a=n,c=i,h=c.flags;switch(c.tag){case 22:wa(a,c),h&2048&&Td(c.alternate,c);break;case 24:wa(a,c),h&2048&&_d(c.alternate,c);break;default:wa(a,c)}i=i.sibling}}var Ca=8192;function lo(n,i,a){if(n.subtreeFlags&Ca)for(n=n.child;n!==null;)Mv(n,i,a),n=n.sibling}function Mv(n,i,a){switch(n.tag){case 26:lo(n,i,a),n.flags&Ca&&n.memoizedState!==null&&hT(a,pr,n.memoizedState,n.memoizedProps);break;case 5:lo(n,i,a);break;case 3:case 4:var c=pr;pr=vu(n.stateNode.containerInfo),lo(n,i,a),pr=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=Ca,Ca=16777216,lo(n,i,a),Ca=c):lo(n,i,a));break;default:lo(n,i,a)}}function Nv(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}function ka(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var a=0;a<i.length;a++){var c=i[a];Jt=c,Ov(c,n)}Nv(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Rv(n),n=n.sibling}function Rv(n){switch(n.tag){case 0:case 11:case 15:ka(n),n.flags&2048&&wi(9,n,n.return);break;case 3:ka(n);break;case 12:ka(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,lu(n)):ka(n);break;default:ka(n)}}function lu(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var a=0;a<i.length;a++){var c=i[a];Jt=c,Ov(c,n)}Nv(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:wi(8,i,i.return),lu(i);break;case 22:a=i.stateNode,a._visibility&2&&(a._visibility&=-3,lu(i));break;default:lu(i)}n=n.sibling}}function Ov(n,i){for(;Jt!==null;){var a=Jt;switch(a.tag){case 0:case 11:case 15:wi(8,a,i);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var c=a.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:aa(a.memoizedState.cache)}if(c=a.child,c!==null)c.return=a,Jt=c;else e:for(a=n;Jt!==null;){c=Jt;var h=c.sibling,y=c.return;if(wv(c),c===a){Jt=null;break e}if(h!==null){h.return=y,Jt=h;break e}Jt=y}}}var NA={getCacheForType:function(n){var i=on(Ht),a=i.data.get(n);return a===void 0&&(a=n(),i.data.set(n,a)),a},cacheSignal:function(){return on(Ht).controller.signal}},RA=typeof WeakMap=="function"?WeakMap:Map,ot=0,yt=null,Ge=null,Qe=0,st=0,Dn=null,Ci=!1,oo=!1,Md=!1,Zr=0,jt=0,ki=0,hl=0,Nd=0,Ln=0,ao=0,Ea=null,En=null,Rd=!1,ou=0,jv=0,au=1/0,su=null,Ei=null,$t=0,Ai=null,so=null,Wr=0,Od=0,jd=null,zv=null,Aa=0,zd=null;function Pn(){return(ot&2)!==0&&Qe!==0?Qe&-Qe:I.T!==null?Ud():Oe()}function Iv(){if(Ln===0)if((Qe&536870912)===0||Je){var n=bn;bn<<=1,(bn&3932160)===0&&(bn=262144),Ln=n}else Ln=536870912;return n=zn.current,n!==null&&(n.flags|=32),Ln}function An(n,i,a){(n===yt&&(st===2||st===9)||n.cancelPendingCommit!==null)&&(uo(n,0),Ti(n,Qe,Ln,!1)),pe(n,a),((ot&2)===0||n!==yt)&&(n===yt&&((ot&2)===0&&(hl|=a),jt===4&&Ti(n,Qe,Ln,!1)),Ar(n))}function Dv(n,i,a){if((ot&6)!==0)throw Error(l(327));var c=!a&&(i&127)===0&&(i&n.expiredLanes)===0||rn(n,i),h=c?zA(n,i):Dd(n,i,!0),y=c;do{if(h===0){oo&&!c&&Ti(n,i,0,!1);break}else{if(a=n.current.alternate,y&&!OA(a)){h=Dd(n,i,!1),y=!1;continue}if(h===2){if(y=i,n.errorRecoveryDisabledLanes&y)var k=0;else k=n.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){i=k;e:{var N=n;h=Ea;var L=N.current.memoizedState.isDehydrated;if(L&&(uo(N,k).flags|=256),k=Dd(N,k,!1),k!==2){if(Md&&!L){N.errorRecoveryDisabledLanes|=y,hl|=y,h=4;break e}y=En,En=h,y!==null&&(En===null?En=y:En.push.apply(En,y))}h=k}if(y=!1,h!==2)continue}}if(h===1){uo(n,0),Ti(n,i,0,!0);break}e:{switch(c=n,y=h,y){case 0:case 1:throw Error(l(345));case 4:if((i&4194048)!==i)break;case 6:Ti(c,i,Ln,!Ci);break e;case 2:En=null;break;case 3:case 5:break;default:throw Error(l(329))}if((i&62914560)===i&&(h=ou+300-De(),10<h)){if(Ti(c,i,Ln,!Ci),cr(c,0,!0)!==0)break e;Wr=i,c.timeoutHandle=m0(Lv.bind(null,c,a,En,su,Rd,i,Ln,hl,ao,Ci,y,"Throttled",-0,0),h);break e}Lv(c,a,En,su,Rd,i,Ln,hl,ao,Ci,y,null,-0,0)}}break}while(!0);Ar(n)}function Lv(n,i,a,c,h,y,k,N,L,$,ie,ae,Q,ee){if(n.timeoutHandle=-1,ae=i.subtreeFlags,ae&8192||(ae&16785408)===16785408){ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Lr},Mv(i,y,ae);var ye=(y&62914560)===y?ou-De():(y&4194048)===y?jv-De():0;if(ye=gT(ae,ye),ye!==null){Wr=y,n.cancelPendingCommit=ye(Gv.bind(null,n,i,y,a,c,h,k,N,L,ie,ae,null,Q,ee)),Ti(n,y,k,!$);return}}Gv(n,i,y,a,c,h,k,N,L)}function OA(n){for(var i=n;;){var a=i.tag;if((a===0||a===11||a===15)&&i.flags&16384&&(a=i.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var c=0;c<a.length;c++){var h=a[c],y=h.getSnapshot;h=h.value;try{if(!On(y(),h))return!1}catch{return!1}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Ti(n,i,a,c){i&=~Nd,i&=~hl,n.suspendedLanes|=i,n.pingedLanes&=~i,c&&(n.warmLanes|=i),c=n.expirationTimes;for(var h=i;0<h;){var y=31-qe(h),k=1<<y;c[y]=-1,h&=~k}a!==0&&Le(n,a,i)}function uu(){return(ot&6)===0?(Ta(0),!1):!0}function Id(){if(Ge!==null){if(st===0)var n=Ge.return;else n=Ge,Fr=ol=null,Zf(n),Jl=null,ua=0,n=Ge;for(;n!==null;)pv(n.alternate,n),n=n.return;Ge=null}}function uo(n,i){var a=n.timeoutHandle;a!==-1&&(n.timeoutHandle=-1,WA(a)),a=n.cancelPendingCommit,a!==null&&(n.cancelPendingCommit=null,a()),Wr=0,Id(),yt=n,Ge=a=Br(n.current,null),Qe=i,st=0,Dn=null,Ci=!1,oo=rn(n,i),Md=!1,ao=Ln=Nd=hl=ki=jt=0,En=Ea=null,Rd=!1,(i&8)!==0&&(i|=i&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=i;0<c;){var h=31-qe(c),y=1<<h;i|=n[h],c&=~y}return Zr=i,Ns(),a}function Pv(n,i){Pe=null,I.H=ya,i===Wl||i===Ps?(i=ey(),st=3):i===Bf?(i=ey(),st=4):st=i===md?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Dn=i,Ge===null&&(jt=1,Ws(n,Zn(i,n.current)))}function Bv(){var n=zn.current;return n===null?!0:(Qe&4194048)===Qe?tr===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?n===tr:!1}function Uv(){var n=I.H;return I.H=ya,n===null?ya:n}function Fv(){var n=I.A;return I.A=NA,n}function cu(){jt=4,Ci||(Qe&4194048)!==Qe&&zn.current!==null||(oo=!0),(ki&134217727)===0&&(hl&134217727)===0||yt===null||Ti(yt,Qe,Ln,!1)}function Dd(n,i,a){var c=ot;ot|=2;var h=Uv(),y=Fv();(yt!==n||Qe!==i)&&(su=null,uo(n,i)),i=!1;var k=jt;e:do try{if(st!==0&&Ge!==null){var N=Ge,L=Dn;switch(st){case 8:Id(),k=6;break e;case 3:case 2:case 9:case 6:zn.current===null&&(i=!0);var $=st;if(st=0,Dn=null,co(n,N,L,$),a&&oo){k=0;break e}break;default:$=st,st=0,Dn=null,co(n,N,L,$)}}jA(),k=jt;break}catch(ie){Pv(n,ie)}while(!0);return i&&n.shellSuspendCounter++,Fr=ol=null,ot=c,I.H=h,I.A=y,Ge===null&&(yt=null,Qe=0,Ns()),k}function jA(){for(;Ge!==null;)Hv(Ge)}function zA(n,i){var a=ot;ot|=2;var c=Uv(),h=Fv();yt!==n||Qe!==i?(su=null,au=De()+500,uo(n,i)):oo=rn(n,i);e:do try{if(st!==0&&Ge!==null){i=Ge;var y=Dn;t:switch(st){case 1:st=0,Dn=null,co(n,i,y,1);break;case 2:case 9:if(Wg(y)){st=0,Dn=null,Vv(i);break}i=function(){st!==2&&st!==9||yt!==n||(st=7),Ar(n)},y.then(i,i);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:Wg(y)?(st=0,Dn=null,Vv(i)):(st=0,Dn=null,co(n,i,y,7));break;case 5:var k=null;switch(Ge.tag){case 26:k=Ge.memoizedState;case 5:case 27:var N=Ge;if(k?_0(k):N.stateNode.complete){st=0,Dn=null;var L=N.sibling;if(L!==null)Ge=L;else{var $=N.return;$!==null?(Ge=$,fu($)):Ge=null}break t}}st=0,Dn=null,co(n,i,y,5);break;case 6:st=0,Dn=null,co(n,i,y,6);break;case 8:Id(),jt=6;break e;default:throw Error(l(462))}}IA();break}catch(ie){Pv(n,ie)}while(!0);return Fr=ol=null,I.H=c,I.A=h,ot=a,Ge!==null?0:(yt=null,Qe=0,Ns(),jt)}function IA(){for(;Ge!==null&&!je();)Hv(Ge)}function Hv(n){var i=dv(n.alternate,n,Zr);n.memoizedProps=n.pendingProps,i===null?fu(n):Ge=i}function Vv(n){var i=n,a=i.alternate;switch(i.tag){case 15:case 0:i=ov(a,i,i.pendingProps,i.type,void 0,Qe);break;case 11:i=ov(a,i,i.pendingProps,i.type.render,i.ref,Qe);break;case 5:Zf(i);default:pv(a,i),i=Ge=Fg(i,Zr),i=dv(a,i,Zr)}n.memoizedProps=n.pendingProps,i===null?fu(n):Ge=i}function co(n,i,a,c){Fr=ol=null,Zf(i),Jl=null,ua=0;var h=i.return;try{if(CA(n,h,i,a,Qe)){jt=1,Ws(n,Zn(a,n.current)),Ge=null;return}}catch(y){if(h!==null)throw Ge=h,y;jt=1,Ws(n,Zn(a,n.current)),Ge=null;return}i.flags&32768?(Je||c===1?n=!0:oo||(Qe&536870912)!==0?n=!1:(Ci=n=!0,(c===2||c===9||c===3||c===6)&&(c=zn.current,c!==null&&c.tag===13&&(c.flags|=16384))),qv(i,n)):fu(i)}function fu(n){var i=n;do{if((i.flags&32768)!==0){qv(i,Ci);return}n=i.return;var a=AA(i.alternate,i,Zr);if(a!==null){Ge=a;return}if(i=i.sibling,i!==null){Ge=i;return}Ge=i=n}while(i!==null);jt===0&&(jt=5)}function qv(n,i){do{var a=TA(n.alternate,n);if(a!==null){a.flags&=32767,Ge=a;return}if(a=n.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!i&&(n=n.sibling,n!==null)){Ge=n;return}Ge=n=a}while(n!==null);jt=6,Ge=null}function Gv(n,i,a,c,h,y,k,N,L){n.cancelPendingCommit=null;do du();while($t!==0);if((ot&6)!==0)throw Error(l(327));if(i!==null){if(i===n.current)throw Error(l(177));if(y=i.lanes|i.childLanes,y|=kf,it(n,a,y,k,N,L),n===yt&&(Ge=yt=null,Qe=0),so=i,Ai=n,Wr=a,Od=y,jd=h,zv=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,BA(Ee,function(){return Qv(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=I.T,I.T=null,h=Y.p,Y.p=2,k=ot,ot|=4;try{_A(n,i,a)}finally{ot=k,Y.p=h,I.T=c}}$t=1,Yv(),Kv(),$v()}}function Yv(){if($t===1){$t=0;var n=Ai,i=so,a=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||a){a=I.T,I.T=null;var c=Y.p;Y.p=2;var h=ot;ot|=4;try{Av(i,n);var y=$d,k=Og(n.containerInfo),N=y.focusedElem,L=y.selectionRange;if(k!==N&&N&&N.ownerDocument&&Rg(N.ownerDocument.documentElement,N)){if(L!==null&&xf(N)){var $=L.start,ie=L.end;if(ie===void 0&&(ie=$),"selectionStart"in N)N.selectionStart=$,N.selectionEnd=Math.min(ie,N.value.length);else{var ae=N.ownerDocument||document,Q=ae&&ae.defaultView||window;if(Q.getSelection){var ee=Q.getSelection(),ye=N.textContent.length,Me=Math.min(L.start,ye),ht=L.end===void 0?Me:Math.min(L.end,ye);!ee.extend&&Me>ht&&(k=ht,ht=Me,Me=k);var q=Ng(N,Me),F=Ng(N,ht);if(q&&F&&(ee.rangeCount!==1||ee.anchorNode!==q.node||ee.anchorOffset!==q.offset||ee.focusNode!==F.node||ee.focusOffset!==F.offset)){var K=ae.createRange();K.setStart(q.node,q.offset),ee.removeAllRanges(),Me>ht?(ee.addRange(K),ee.extend(F.node,F.offset)):(K.setEnd(F.node,F.offset),ee.addRange(K))}}}}for(ae=[],ee=N;ee=ee.parentNode;)ee.nodeType===1&&ae.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ae.length;N++){var le=ae[N];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}ku=!!Kd,$d=Kd=null}finally{ot=h,Y.p=c,I.T=a}}n.current=i,$t=2}}function Kv(){if($t===2){$t=0;var n=Ai,i=so,a=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||a){a=I.T,I.T=null;var c=Y.p;Y.p=2;var h=ot;ot|=4;try{Sv(n,i.alternate,i)}finally{ot=h,Y.p=c,I.T=a}}$t=3}}function $v(){if($t===4||$t===3){$t=0,at();var n=Ai,i=so,a=Wr,c=zv;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?$t=5:($t=0,so=Ai=null,Xv(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(Ei=null),Rt(a),i=i.stateNode,Et&&typeof Et.onCommitFiberRoot=="function")try{Et.onCommitFiberRoot(St,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=I.T,h=Y.p,Y.p=2,I.T=null;try{for(var y=n.onRecoverableError,k=0;k<c.length;k++){var N=c[k];y(N.value,{componentStack:N.stack})}}finally{I.T=i,Y.p=h}}(Wr&3)!==0&&du(),Ar(n),h=n.pendingLanes,(a&261930)!==0&&(h&42)!==0?n===zd?Aa++:(Aa=0,zd=n):Aa=0,Ta(0)}}function Xv(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,aa(i)))}function du(){return Yv(),Kv(),$v(),Qv()}function Qv(){if($t!==5)return!1;var n=Ai,i=Od;Od=0;var a=Rt(Wr),c=I.T,h=Y.p;try{Y.p=32>a?32:a,I.T=null,a=jd,jd=null;var y=Ai,k=Wr;if($t=0,so=Ai=null,Wr=0,(ot&6)!==0)throw Error(l(331));var N=ot;if(ot|=4,Rv(y.current),_v(y,y.current,k,a),ot=N,Ta(0,!1),Et&&typeof Et.onPostCommitFiberRoot=="function")try{Et.onPostCommitFiberRoot(St,y)}catch{}return!0}finally{Y.p=h,I.T=c,Xv(n,i)}}function Zv(n,i,a){i=Zn(a,i),i=dd(n.stateNode,i,2),n=xi(n,i,2),n!==null&&(pe(n,2),Ar(n))}function ut(n,i,a){if(n.tag===3)Zv(n,n,a);else for(;i!==null;){if(i.tag===3){Zv(i,n,a);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Ei===null||!Ei.has(c))){n=Zn(a,n),a=Wy(2),c=xi(i,a,2),c!==null&&(Jy(a,c,i,n),pe(c,2),Ar(c));break}}i=i.return}}function Ld(n,i,a){var c=n.pingCache;if(c===null){c=n.pingCache=new RA;var h=new Set;c.set(i,h)}else h=c.get(i),h===void 0&&(h=new Set,c.set(i,h));h.has(a)||(Md=!0,h.add(a),n=DA.bind(null,n,i,a),i.then(n,n))}function DA(n,i,a){var c=n.pingCache;c!==null&&c.delete(i),n.pingedLanes|=n.suspendedLanes&a,n.warmLanes&=~a,yt===n&&(Qe&a)===a&&(jt===4||jt===3&&(Qe&62914560)===Qe&&300>De()-ou?(ot&2)===0&&uo(n,0):Nd|=a,ao===Qe&&(ao=0)),Ar(n)}function Wv(n,i){i===0&&(i=zr()),n=rl(n,i),n!==null&&(pe(n,i),Ar(n))}function LA(n){var i=n.memoizedState,a=0;i!==null&&(a=i.retryLane),Wv(n,a)}function PA(n,i){var a=0;switch(n.tag){case 31:case 13:var c=n.stateNode,h=n.memoizedState;h!==null&&(a=h.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(l(314))}c!==null&&c.delete(i),Wv(n,a)}function BA(n,i){return Rn(n,i)}var mu=null,fo=null,Pd=!1,pu=!1,Bd=!1,_i=0;function Ar(n){n!==fo&&n.next===null&&(fo===null?mu=fo=n:fo=fo.next=n),pu=!0,Pd||(Pd=!0,FA())}function Ta(n,i){if(!Bd&&pu){Bd=!0;do for(var a=!1,c=mu;c!==null;){if(n!==0){var h=c.pendingLanes;if(h===0)var y=0;else{var k=c.suspendedLanes,N=c.pingedLanes;y=(1<<31-qe(42|n)+1)-1,y&=h&~(k&~N),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(a=!0,n0(c,y))}else y=Qe,y=cr(c,c===yt?y:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(y&3)===0||rn(c,y)||(a=!0,n0(c,y));c=c.next}while(a);Bd=!1}}function UA(){Jv()}function Jv(){pu=Pd=!1;var n=0;_i!==0&&ZA()&&(n=_i);for(var i=De(),a=null,c=mu;c!==null;){var h=c.next,y=e0(c,i);y===0?(c.next=null,a===null?mu=h:a.next=h,h===null&&(fo=a)):(a=c,(n!==0||(y&3)!==0)&&(pu=!0)),c=h}$t!==0&&$t!==5||Ta(n),_i!==0&&(_i=0)}function e0(n,i){for(var a=n.suspendedLanes,c=n.pingedLanes,h=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var k=31-qe(y),N=1<<k,L=h[k];L===-1?((N&a)===0||(N&c)!==0)&&(h[k]=Ft(N,i)):L<=i&&(n.expiredLanes|=N),y&=~N}if(i=yt,a=Qe,a=cr(n,n===i?a:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,a===0||n===i&&(st===2||st===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&Nt(c),n.callbackNode=null,n.callbackPriority=0;if((a&3)===0||rn(n,a)){if(i=a&-a,i===n.callbackPriority)return i;switch(c!==null&&Nt(c),Rt(a)){case 2:case 8:a=de;break;case 32:a=Ee;break;case 268435456:a=Xe;break;default:a=Ee}return c=t0.bind(null,n),a=Rn(a,c),n.callbackPriority=i,n.callbackNode=a,i}return c!==null&&c!==null&&Nt(c),n.callbackPriority=2,n.callbackNode=null,2}function t0(n,i){if($t!==0&&$t!==5)return n.callbackNode=null,n.callbackPriority=0,null;var a=n.callbackNode;if(du()&&n.callbackNode!==a)return null;var c=Qe;return c=cr(n,n===yt?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(Dv(n,c,i),e0(n,De()),n.callbackNode!=null&&n.callbackNode===a?t0.bind(null,n):null)}function n0(n,i){if(du())return null;Dv(n,i,!0)}function FA(){JA(function(){(ot&6)!==0?Rn(te,UA):Jv()})}function Ud(){if(_i===0){var n=Ql;n===0&&(n=Yn,Yn<<=1,(Yn&261888)===0&&(Yn=256)),_i=n}return _i}function r0(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:ws(""+n)}function i0(n,i){var a=i.ownerDocument.createElement("input");return a.name=i.name,a.value=i.value,n.id&&a.setAttribute("form",n.id),i.parentNode.insertBefore(a,i),n=new FormData(n),a.parentNode.removeChild(a),n}function HA(n,i,a,c,h){if(i==="submit"&&a&&a.stateNode===h){var y=r0((h[ft]||null).action),k=c.submitter;k&&(i=(i=k[ft]||null)?r0(i.formAction):k.getAttribute("formAction"),i!==null&&(y=i,k=null));var N=new As("action","action",null,c,h);n.push({event:N,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(_i!==0){var L=k?i0(h,k):new FormData(h);od(a,{pending:!0,data:L,method:h.method,action:y},null,L)}}else typeof y=="function"&&(N.preventDefault(),L=k?i0(h,k):new FormData(h),od(a,{pending:!0,data:L,method:h.method,action:y},y,L))},currentTarget:h}]})}}for(var Fd=0;Fd<Cf.length;Fd++){var Hd=Cf[Fd],VA=Hd.toLowerCase(),qA=Hd[0].toUpperCase()+Hd.slice(1);mr(VA,"on"+qA)}mr(Ig,"onAnimationEnd"),mr(Dg,"onAnimationIteration"),mr(Lg,"onAnimationStart"),mr("dblclick","onDoubleClick"),mr("focusin","onFocus"),mr("focusout","onBlur"),mr(oA,"onTransitionRun"),mr(aA,"onTransitionStart"),mr(sA,"onTransitionCancel"),mr(Pg,"onTransitionEnd"),fi("onMouseEnter",["mouseout","mouseover"]),fi("onMouseLeave",["mouseout","mouseover"]),fi("onPointerEnter",["pointerout","pointerover"]),fi("onPointerLeave",["pointerout","pointerover"]),Dr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Dr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Dr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Dr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Dr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Dr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _a="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),GA=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_a));function l0(n,i){i=(i&4)!==0;for(var a=0;a<n.length;a++){var c=n[a],h=c.event;c=c.listeners;e:{var y=void 0;if(i)for(var k=c.length-1;0<=k;k--){var N=c[k],L=N.instance,$=N.currentTarget;if(N=N.listener,L!==y&&h.isPropagationStopped())break e;y=N,h.currentTarget=$;try{y(h)}catch(ie){Ms(ie)}h.currentTarget=null,y=L}else for(k=0;k<c.length;k++){if(N=c[k],L=N.instance,$=N.currentTarget,N=N.listener,L!==y&&h.isPropagationStopped())break e;y=N,h.currentTarget=$;try{y(h)}catch(ie){Ms(ie)}h.currentTarget=null,y=L}}}}function Ye(n,i){var a=i[Il];a===void 0&&(a=i[Il]=new Set);var c=n+"__bubble";a.has(c)||(o0(i,n,2,!1),a.add(c))}function Vd(n,i,a){var c=0;i&&(c|=4),o0(a,n,c,i)}var hu="_reactListening"+Math.random().toString(36).slice(2);function qd(n){if(!n[hu]){n[hu]=!0,$o.forEach(function(a){a!=="selectionchange"&&(GA.has(a)||Vd(a,!1,n),Vd(a,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[hu]||(i[hu]=!0,Vd("selectionchange",!1,i))}}function o0(n,i,a,c){switch(I0(i)){case 2:var h=xT;break;case 8:h=bT;break;default:h=lm}a=h.bind(null,i,a,n),h=void 0,!cf||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(h=!0),c?h!==void 0?n.addEventListener(i,a,{capture:!0,passive:h}):n.addEventListener(i,a,!0):h!==void 0?n.addEventListener(i,a,{passive:h}):n.addEventListener(i,a,!1)}function Gd(n,i,a,c,h){var y=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var k=c.tag;if(k===3||k===4){var N=c.stateNode.containerInfo;if(N===h)break;if(k===4)for(k=c.return;k!==null;){var L=k.tag;if((L===3||L===4)&&k.stateNode.containerInfo===h)return;k=k.return}for(;N!==null;){if(k=ui(N),k===null)return;if(L=k.tag,L===5||L===6||L===26||L===27){c=y=k;continue e}N=N.parentNode}}c=c.return}fg(function(){var $=y,ie=sf(a),ae=[];e:{var Q=Bg.get(n);if(Q!==void 0){var ee=As,ye=n;switch(n){case"keypress":if(ks(a)===0)break e;case"keydown":case"keyup":ee=PE;break;case"focusin":ye="focus",ee=pf;break;case"focusout":ye="blur",ee=pf;break;case"beforeblur":case"afterblur":ee=pf;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=pg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=AE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=FE;break;case Ig:case Dg:case Lg:ee=ME;break;case Pg:ee=VE;break;case"scroll":case"scrollend":ee=kE;break;case"wheel":ee=GE;break;case"copy":case"cut":case"paste":ee=RE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=gg;break;case"toggle":case"beforetoggle":ee=KE}var Me=(i&4)!==0,ht=!Me&&(n==="scroll"||n==="scrollend"),q=Me?Q!==null?Q+"Capture":null:Q;Me=[];for(var F=$,K;F!==null;){var le=F;if(K=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||K===null||q===null||(le=Qo(F,q),le!=null&&Me.push(Ma(F,le,K))),ht)break;F=F.return}0<Me.length&&(Q=new ee(Q,ye,null,a,ie),ae.push({event:Q,listeners:Me}))}}if((i&7)===0){e:{if(Q=n==="mouseover"||n==="pointerover",ee=n==="mouseout"||n==="pointerout",Q&&a!==af&&(ye=a.relatedTarget||a.fromElement)&&(ui(ye)||ye[Ir]))break e;if((ee||Q)&&(Q=ie.window===ie?ie:(Q=ie.ownerDocument)?Q.defaultView||Q.parentWindow:window,ee?(ye=a.relatedTarget||a.toElement,ee=$,ye=ye?ui(ye):null,ye!==null&&(ht=s(ye),Me=ye.tag,ye!==ht||Me!==5&&Me!==27&&Me!==6)&&(ye=null)):(ee=null,ye=$),ee!==ye)){if(Me=pg,le="onMouseLeave",q="onMouseEnter",F="mouse",(n==="pointerout"||n==="pointerover")&&(Me=gg,le="onPointerLeave",q="onPointerEnter",F="pointer"),ht=ee==null?Q:dr(ee),K=ye==null?Q:dr(ye),Q=new Me(le,F+"leave",ee,a,ie),Q.target=ht,Q.relatedTarget=K,le=null,ui(ie)===$&&(Me=new Me(q,F+"enter",ye,a,ie),Me.target=K,Me.relatedTarget=ht,le=Me),ht=le,ee&&ye)t:{for(Me=YA,q=ee,F=ye,K=0,le=q;le;le=Me(le))K++;le=0;for(var Te=F;Te;Te=Me(Te))le++;for(;0<K-le;)q=Me(q),K--;for(;0<le-K;)F=Me(F),le--;for(;K--;){if(q===F||F!==null&&q===F.alternate){Me=q;break t}q=Me(q),F=Me(F)}Me=null}else Me=null;ee!==null&&a0(ae,Q,ee,Me,!1),ye!==null&&ht!==null&&a0(ae,ht,ye,Me,!0)}}e:{if(Q=$?dr($):window,ee=Q.nodeName&&Q.nodeName.toLowerCase(),ee==="select"||ee==="input"&&Q.type==="file")var nt=kg;else if(wg(Q))if(Eg)nt=rA;else{nt=tA;var Se=eA}else ee=Q.nodeName,!ee||ee.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?$&&of($.elementType)&&(nt=kg):nt=nA;if(nt&&(nt=nt(n,$))){Cg(ae,nt,a,ie);break e}Se&&Se(n,Q,$),n==="focusout"&&$&&Q.type==="number"&&$.memoizedProps.value!=null&&lf(Q,"number",Q.value)}switch(Se=$?dr($):window,n){case"focusin":(wg(Se)||Se.contentEditable==="true")&&(Hl=Se,bf=$,ia=null);break;case"focusout":ia=bf=Hl=null;break;case"mousedown":Sf=!0;break;case"contextmenu":case"mouseup":case"dragend":Sf=!1,jg(ae,a,ie);break;case"selectionchange":if(lA)break;case"keydown":case"keyup":jg(ae,a,ie)}var Ue;if(gf)e:{switch(n){case"compositionstart":var Ze="onCompositionStart";break e;case"compositionend":Ze="onCompositionEnd";break e;case"compositionupdate":Ze="onCompositionUpdate";break e}Ze=void 0}else Fl?bg(n,a)&&(Ze="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(Ze="onCompositionStart");Ze&&(yg&&a.locale!=="ko"&&(Fl||Ze!=="onCompositionStart"?Ze==="onCompositionEnd"&&Fl&&(Ue=dg()):(di=ie,ff="value"in di?di.value:di.textContent,Fl=!0)),Se=gu($,Ze),0<Se.length&&(Ze=new hg(Ze,n,null,a,ie),ae.push({event:Ze,listeners:Se}),Ue?Ze.data=Ue:(Ue=Sg(a),Ue!==null&&(Ze.data=Ue)))),(Ue=XE?QE(n,a):ZE(n,a))&&(Ze=gu($,"onBeforeInput"),0<Ze.length&&(Se=new hg("onBeforeInput","beforeinput",null,a,ie),ae.push({event:Se,listeners:Ze}),Se.data=Ue)),HA(ae,n,$,a,ie)}l0(ae,i)})}function Ma(n,i,a){return{instance:n,listener:i,currentTarget:a}}function gu(n,i){for(var a=i+"Capture",c=[];n!==null;){var h=n,y=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||y===null||(h=Qo(n,a),h!=null&&c.unshift(Ma(n,h,y)),h=Qo(n,i),h!=null&&c.push(Ma(n,h,y))),n.tag===3)return c;n=n.return}return[]}function YA(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function a0(n,i,a,c,h){for(var y=i._reactName,k=[];a!==null&&a!==c;){var N=a,L=N.alternate,$=N.stateNode;if(N=N.tag,L!==null&&L===c)break;N!==5&&N!==26&&N!==27||$===null||(L=$,h?($=Qo(a,y),$!=null&&k.unshift(Ma(a,$,L))):h||($=Qo(a,y),$!=null&&k.push(Ma(a,$,L)))),a=a.return}k.length!==0&&n.push({event:i,listeners:k})}var KA=/\r\n?/g,$A=/\u0000|\uFFFD/g;function s0(n){return(typeof n=="string"?n:""+n).replace(KA,`
|
|
49
|
+
`).replace($A,"")}function u0(n,i){return i=s0(i),s0(n)===i}function pt(n,i,a,c,h,y){switch(a){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Pl(n,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Pl(n,""+c);break;case"className":dt(n,"class",c);break;case"tabIndex":dt(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":dt(n,a,c);break;case"style":ug(n,c,y);break;case"data":if(i!=="object"){dt(n,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||a!=="href")){n.removeAttribute(a);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(a);break}c=ws(""+c),n.setAttribute(a,c);break;case"action":case"formAction":if(typeof c=="function"){n.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(a==="formAction"?(i!=="input"&&pt(n,i,"name",h.name,h,null),pt(n,i,"formEncType",h.formEncType,h,null),pt(n,i,"formMethod",h.formMethod,h,null),pt(n,i,"formTarget",h.formTarget,h,null)):(pt(n,i,"encType",h.encType,h,null),pt(n,i,"method",h.method,h,null),pt(n,i,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(a);break}c=ws(""+c),n.setAttribute(a,c);break;case"onClick":c!=null&&(n.onclick=Lr);break;case"onScroll":c!=null&&Ye("scroll",n);break;case"onScrollEnd":c!=null&&Ye("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(l(61));if(a=c.__html,a!=null){if(h.children!=null)throw Error(l(60));n.innerHTML=a}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}a=ws(""+c),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(a,""+c):n.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(a,""):n.removeAttribute(a);break;case"capture":case"download":c===!0?n.setAttribute(a,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(a,c):n.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(a,c):n.removeAttribute(a);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(a):n.setAttribute(a,c);break;case"popover":Ye("beforetoggle",n),Ye("toggle",n),Be(n,"popover",c);break;case"xlinkActuate":Lt(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Lt(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Lt(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Lt(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Lt(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Lt(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Lt(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Lt(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Lt(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Be(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=wE.get(a)||a,Be(n,a,c))}}function Yd(n,i,a,c,h,y){switch(a){case"style":ug(n,c,y);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(l(61));if(a=c.__html,a!=null){if(h.children!=null)throw Error(l(60));n.innerHTML=a}}break;case"children":typeof c=="string"?Pl(n,c):(typeof c=="number"||typeof c=="bigint")&&Pl(n,""+c);break;case"onScroll":c!=null&&Ye("scroll",n);break;case"onScrollEnd":c!=null&&Ye("scrollend",n);break;case"onClick":c!=null&&(n.onclick=Lr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xo.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),i=a.slice(2,h?a.length-7:void 0),y=n[ft]||null,y=y!=null?y[a]:null,typeof y=="function"&&n.removeEventListener(i,y,h),typeof c=="function")){typeof y!="function"&&y!==null&&(a in n?n[a]=null:n.hasAttribute(a)&&n.removeAttribute(a)),n.addEventListener(i,c,h);break e}a in n?n[a]=c:c===!0?n.setAttribute(a,""):Be(n,a,c)}}}function sn(n,i,a){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ye("error",n),Ye("load",n);var c=!1,h=!1,y;for(y in a)if(a.hasOwnProperty(y)){var k=a[y];if(k!=null)switch(y){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:pt(n,i,y,k,a,null)}}h&&pt(n,i,"srcSet",a.srcSet,a,null),c&&pt(n,i,"src",a.src,a,null);return;case"input":Ye("invalid",n);var N=y=k=h=null,L=null,$=null;for(c in a)if(a.hasOwnProperty(c)){var ie=a[c];if(ie!=null)switch(c){case"name":h=ie;break;case"type":k=ie;break;case"checked":L=ie;break;case"defaultChecked":$=ie;break;case"value":y=ie;break;case"defaultValue":N=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(l(137,i));break;default:pt(n,i,c,ie,a,null)}}lg(n,y,N,L,$,k,h,!1);return;case"select":Ye("invalid",n),c=k=y=null;for(h in a)if(a.hasOwnProperty(h)&&(N=a[h],N!=null))switch(h){case"value":y=N;break;case"defaultValue":k=N;break;case"multiple":c=N;default:pt(n,i,h,N,a,null)}i=y,a=k,n.multiple=!!c,i!=null?Ll(n,!!c,i,!1):a!=null&&Ll(n,!!c,a,!0);return;case"textarea":Ye("invalid",n),y=h=c=null;for(k in a)if(a.hasOwnProperty(k)&&(N=a[k],N!=null))switch(k){case"value":c=N;break;case"defaultValue":h=N;break;case"children":y=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(l(91));break;default:pt(n,i,k,N,a,null)}ag(n,c,h,y);return;case"option":for(L in a)if(a.hasOwnProperty(L)&&(c=a[L],c!=null))switch(L){case"selected":n.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:pt(n,i,L,c,a,null)}return;case"dialog":Ye("beforetoggle",n),Ye("toggle",n),Ye("cancel",n),Ye("close",n);break;case"iframe":case"object":Ye("load",n);break;case"video":case"audio":for(c=0;c<_a.length;c++)Ye(_a[c],n);break;case"image":Ye("error",n),Ye("load",n);break;case"details":Ye("toggle",n);break;case"embed":case"source":case"link":Ye("error",n),Ye("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for($ in a)if(a.hasOwnProperty($)&&(c=a[$],c!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:pt(n,i,$,c,a,null)}return;default:if(of(i)){for(ie in a)a.hasOwnProperty(ie)&&(c=a[ie],c!==void 0&&Yd(n,i,ie,c,a,void 0));return}}for(N in a)a.hasOwnProperty(N)&&(c=a[N],c!=null&&pt(n,i,N,c,a,null))}function XA(n,i,a,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,y=null,k=null,N=null,L=null,$=null,ie=null;for(ee in a){var ae=a[ee];if(a.hasOwnProperty(ee)&&ae!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":L=ae;default:c.hasOwnProperty(ee)||pt(n,i,ee,null,c,ae)}}for(var Q in c){var ee=c[Q];if(ae=a[Q],c.hasOwnProperty(Q)&&(ee!=null||ae!=null))switch(Q){case"type":y=ee;break;case"name":h=ee;break;case"checked":$=ee;break;case"defaultChecked":ie=ee;break;case"value":k=ee;break;case"defaultValue":N=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(l(137,i));break;default:ee!==ae&&pt(n,i,Q,ee,c,ae)}}rf(n,k,N,L,$,ie,y,h);return;case"select":ee=k=N=Q=null;for(y in a)if(L=a[y],a.hasOwnProperty(y)&&L!=null)switch(y){case"value":break;case"multiple":ee=L;default:c.hasOwnProperty(y)||pt(n,i,y,null,c,L)}for(h in c)if(y=c[h],L=a[h],c.hasOwnProperty(h)&&(y!=null||L!=null))switch(h){case"value":Q=y;break;case"defaultValue":N=y;break;case"multiple":k=y;default:y!==L&&pt(n,i,h,y,c,L)}i=N,a=k,c=ee,Q!=null?Ll(n,!!a,Q,!1):!!c!=!!a&&(i!=null?Ll(n,!!a,i,!0):Ll(n,!!a,a?[]:"",!1));return;case"textarea":ee=Q=null;for(N in a)if(h=a[N],a.hasOwnProperty(N)&&h!=null&&!c.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:pt(n,i,N,null,c,h)}for(k in c)if(h=c[k],y=a[k],c.hasOwnProperty(k)&&(h!=null||y!=null))switch(k){case"value":Q=h;break;case"defaultValue":ee=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(l(91));break;default:h!==y&&pt(n,i,k,h,c,y)}og(n,Q,ee);return;case"option":for(var ye in a)if(Q=a[ye],a.hasOwnProperty(ye)&&Q!=null&&!c.hasOwnProperty(ye))switch(ye){case"selected":n.selected=!1;break;default:pt(n,i,ye,null,c,Q)}for(L in c)if(Q=c[L],ee=a[L],c.hasOwnProperty(L)&&Q!==ee&&(Q!=null||ee!=null))switch(L){case"selected":n.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:pt(n,i,L,Q,c,ee)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Me in a)Q=a[Me],a.hasOwnProperty(Me)&&Q!=null&&!c.hasOwnProperty(Me)&&pt(n,i,Me,null,c,Q);for($ in c)if(Q=c[$],ee=a[$],c.hasOwnProperty($)&&Q!==ee&&(Q!=null||ee!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(l(137,i));break;default:pt(n,i,$,Q,c,ee)}return;default:if(of(i)){for(var ht in a)Q=a[ht],a.hasOwnProperty(ht)&&Q!==void 0&&!c.hasOwnProperty(ht)&&Yd(n,i,ht,void 0,c,Q);for(ie in c)Q=c[ie],ee=a[ie],!c.hasOwnProperty(ie)||Q===ee||Q===void 0&&ee===void 0||Yd(n,i,ie,Q,c,ee);return}}for(var q in a)Q=a[q],a.hasOwnProperty(q)&&Q!=null&&!c.hasOwnProperty(q)&&pt(n,i,q,null,c,Q);for(ae in c)Q=c[ae],ee=a[ae],!c.hasOwnProperty(ae)||Q===ee||Q==null&&ee==null||pt(n,i,ae,Q,c,ee)}function c0(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function QA(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,a=performance.getEntriesByType("resource"),c=0;c<a.length;c++){var h=a[c],y=h.transferSize,k=h.initiatorType,N=h.duration;if(y&&N&&c0(k)){for(k=0,N=h.responseEnd,c+=1;c<a.length;c++){var L=a[c],$=L.startTime;if($>N)break;var ie=L.transferSize,ae=L.initiatorType;ie&&c0(ae)&&(L=L.responseEnd,k+=ie*(L<N?1:(N-$)/(L-$)))}if(--c,i+=8*(y+k)/(h.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Kd=null,$d=null;function yu(n){return n.nodeType===9?n:n.ownerDocument}function f0(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function d0(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}function Xd(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Qd=null;function ZA(){var n=window.event;return n&&n.type==="popstate"?n===Qd?!1:(Qd=n,!0):(Qd=null,!1)}var m0=typeof setTimeout=="function"?setTimeout:void 0,WA=typeof clearTimeout=="function"?clearTimeout:void 0,p0=typeof Promise=="function"?Promise:void 0,JA=typeof queueMicrotask=="function"?queueMicrotask:typeof p0<"u"?function(n){return p0.resolve(null).then(n).catch(eT)}:m0;function eT(n){setTimeout(function(){throw n})}function Mi(n){return n==="head"}function h0(n,i){var a=i,c=0;do{var h=a.nextSibling;if(n.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"||a==="/&"){if(c===0){n.removeChild(h),go(i);return}c--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")c++;else if(a==="html")Na(n.ownerDocument.documentElement);else if(a==="head"){a=n.ownerDocument.head,Na(a);for(var y=a.firstChild;y;){var k=y.nextSibling,N=y.nodeName;y[lt]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&y.rel.toLowerCase()==="stylesheet"||a.removeChild(y),y=k}}else a==="body"&&Na(n.ownerDocument.body);a=h}while(a);go(i)}function g0(n,i){var a=n;n=0;do{var c=a.nextSibling;if(a.nodeType===1?i?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(i?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),c&&c.nodeType===8)if(a=c.data,a==="/$"){if(n===0)break;n--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||n++;a=c}while(a)}function Zd(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var a=i;switch(i=i.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Zd(a),Zi(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}n.removeChild(a)}}function tT(n,i,a,c){for(;n.nodeType===1;){var h=a;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[lt])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(y=n.getAttribute("rel"),y==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(y!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(y=n.getAttribute("src"),(y!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&y&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var y=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===y)return n}else return n;if(n=nr(n.nextSibling),n===null)break}return null}function nT(n,i,a){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=nr(n.nextSibling),n===null))return null;return n}function y0(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=nr(n.nextSibling),n===null))return null;return n}function Wd(n){return n.data==="$?"||n.data==="$~"}function Jd(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function rT(n,i){var a=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||a.readyState!=="loading")i();else{var c=function(){i(),a.removeEventListener("DOMContentLoaded",c)};a.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function nr(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return n}var em=null;function v0(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"||a==="/&"){if(i===0)return nr(n.nextSibling);i--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||i++}n=n.nextSibling}return null}function x0(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(i===0)return n;i--}else a!=="/$"&&a!=="/&"||i++}n=n.previousSibling}return null}function b0(n,i,a){switch(i=yu(a),n){case"html":if(n=i.documentElement,!n)throw Error(l(452));return n;case"head":if(n=i.head,!n)throw Error(l(453));return n;case"body":if(n=i.body,!n)throw Error(l(454));return n;default:throw Error(l(451))}}function Na(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);Zi(n)}var rr=new Map,S0=new Set;function vu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Jr=Y.d;Y.d={f:iT,r:lT,D:oT,C:aT,L:sT,m:uT,X:fT,S:cT,M:dT};function iT(){var n=Jr.f(),i=uu();return n||i}function lT(n){var i=Wi(n);i!==null&&i.tag===5&&i.type==="form"?Py(i):Jr.r(n)}var mo=typeof document>"u"?null:document;function w0(n,i,a){var c=mo;if(c&&typeof i=="string"&&i){var h=Xn(i);h='link[rel="'+n+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),S0.has(h)||(S0.add(h),n={rel:n,crossOrigin:a,href:i},c.querySelector(h)===null&&(i=c.createElement("link"),sn(i,"link",n),Dt(i),c.head.appendChild(i)))}}function oT(n){Jr.D(n),w0("dns-prefetch",n,null)}function aT(n,i){Jr.C(n,i),w0("preconnect",n,i)}function sT(n,i,a){Jr.L(n,i,a);var c=mo;if(c&&n&&i){var h='link[rel="preload"][as="'+Xn(i)+'"]';i==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+Xn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+Xn(a.imageSizes)+'"]')):h+='[href="'+Xn(n)+'"]';var y=h;switch(i){case"style":y=po(n);break;case"script":y=ho(n)}rr.has(y)||(n=p({rel:"preload",href:i==="image"&&a&&a.imageSrcSet?void 0:n,as:i},a),rr.set(y,n),c.querySelector(h)!==null||i==="style"&&c.querySelector(Ra(y))||i==="script"&&c.querySelector(Oa(y))||(i=c.createElement("link"),sn(i,"link",n),Dt(i),c.head.appendChild(i)))}}function uT(n,i){Jr.m(n,i);var a=mo;if(a&&n){var c=i&&typeof i.as=="string"?i.as:"script",h='link[rel="modulepreload"][as="'+Xn(c)+'"][href="'+Xn(n)+'"]',y=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=ho(n)}if(!rr.has(y)&&(n=p({rel:"modulepreload",href:n},i),rr.set(y,n),a.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Oa(y)))return}c=a.createElement("link"),sn(c,"link",n),Dt(c),a.head.appendChild(c)}}}function cT(n,i,a){Jr.S(n,i,a);var c=mo;if(c&&n){var h=ci(c).hoistableStyles,y=po(n);i=i||"default";var k=h.get(y);if(!k){var N={loading:0,preload:null};if(k=c.querySelector(Ra(y)))N.loading=5;else{n=p({rel:"stylesheet",href:n,"data-precedence":i},a),(a=rr.get(y))&&tm(n,a);var L=k=c.createElement("link");Dt(L),sn(L,"link",n),L._p=new Promise(function($,ie){L.onload=$,L.onerror=ie}),L.addEventListener("load",function(){N.loading|=1}),L.addEventListener("error",function(){N.loading|=2}),N.loading|=4,xu(k,i,c)}k={type:"stylesheet",instance:k,count:1,state:N},h.set(y,k)}}}function fT(n,i){Jr.X(n,i);var a=mo;if(a&&n){var c=ci(a).hoistableScripts,h=ho(n),y=c.get(h);y||(y=a.querySelector(Oa(h)),y||(n=p({src:n,async:!0},i),(i=rr.get(h))&&nm(n,i),y=a.createElement("script"),Dt(y),sn(y,"link",n),a.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(h,y))}}function dT(n,i){Jr.M(n,i);var a=mo;if(a&&n){var c=ci(a).hoistableScripts,h=ho(n),y=c.get(h);y||(y=a.querySelector(Oa(h)),y||(n=p({src:n,async:!0,type:"module"},i),(i=rr.get(h))&&nm(n,i),y=a.createElement("script"),Dt(y),sn(y,"link",n),a.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(h,y))}}function C0(n,i,a,c){var h=(h=se.current)?vu(h):null;if(!h)throw Error(l(446));switch(n){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(i=po(a.href),a=ci(h).hoistableStyles,c=a.get(i),c||(c={type:"style",instance:null,count:0,state:null},a.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){n=po(a.href);var y=ci(h).hoistableStyles,k=y.get(n);if(k||(h=h.ownerDocument||h,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(n,k),(y=h.querySelector(Ra(n)))&&!y._p&&(k.instance=y,k.state.loading=5),rr.has(n)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},rr.set(n,a),y||mT(h,n,a,k.state))),i&&c===null)throw Error(l(528,""));return k}if(i&&c!==null)throw Error(l(529,""));return null;case"script":return i=a.async,a=a.src,typeof a=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=ho(a),a=ci(h).hoistableScripts,c=a.get(i),c||(c={type:"script",instance:null,count:0,state:null},a.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,n))}}function po(n){return'href="'+Xn(n)+'"'}function Ra(n){return'link[rel="stylesheet"]['+n+"]"}function k0(n){return p({},n,{"data-precedence":n.precedence,precedence:null})}function mT(n,i,a,c){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=n.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),sn(i,"link",a),Dt(i),n.head.appendChild(i))}function ho(n){return'[src="'+Xn(n)+'"]'}function Oa(n){return"script[async]"+n}function E0(n,i,a){if(i.count++,i.instance===null)switch(i.type){case"style":var c=n.querySelector('style[data-href~="'+Xn(a.href)+'"]');if(c)return i.instance=c,Dt(c),c;var h=p({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),Dt(c),sn(c,"style",h),xu(c,a.precedence,n),i.instance=c;case"stylesheet":h=po(a.href);var y=n.querySelector(Ra(h));if(y)return i.state.loading|=4,i.instance=y,Dt(y),y;c=k0(a),(h=rr.get(h))&&tm(c,h),y=(n.ownerDocument||n).createElement("link"),Dt(y);var k=y;return k._p=new Promise(function(N,L){k.onload=N,k.onerror=L}),sn(y,"link",c),i.state.loading|=4,xu(y,a.precedence,n),i.instance=y;case"script":return y=ho(a.src),(h=n.querySelector(Oa(y)))?(i.instance=h,Dt(h),h):(c=a,(h=rr.get(y))&&(c=p({},a),nm(c,h)),n=n.ownerDocument||n,h=n.createElement("script"),Dt(h),sn(h,"link",c),n.head.appendChild(h),i.instance=h);case"void":return null;default:throw Error(l(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,xu(c,a.precedence,n));return i.instance}function xu(n,i,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,y=h,k=0;k<c.length;k++){var N=c[k];if(N.dataset.precedence===i)y=N;else if(y!==h)break}y?y.parentNode.insertBefore(n,y.nextSibling):(i=a.nodeType===9?a.head:a,i.insertBefore(n,i.firstChild))}function tm(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function nm(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var bu=null;function A0(n,i,a){if(bu===null){var c=new Map,h=bu=new Map;h.set(a,c)}else h=bu,c=h.get(a),c||(c=new Map,h.set(a,c));if(c.has(n))return c;for(c.set(n,null),a=a.getElementsByTagName(n),h=0;h<a.length;h++){var y=a[h];if(!(y[lt]||y[wt]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var k=y.getAttribute(i)||"";k=n+k;var N=c.get(k);N?N.push(y):c.set(k,[y])}}return c}function T0(n,i,a){n=n.ownerDocument||n,n.head.insertBefore(a,i==="title"?n.querySelector("head > title"):null)}function pT(n,i,a){if(a===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return n=i.disabled,typeof i.precedence=="string"&&n==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function _0(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function hT(n,i,a,c){if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var h=po(c.href),y=i.querySelector(Ra(h));if(y){i=y._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=Su.bind(n),i.then(n,n)),a.state.loading|=4,a.instance=y,Dt(y);return}y=i.ownerDocument||i,c=k0(c),(h=rr.get(h))&&tm(c,h),y=y.createElement("link"),Dt(y);var k=y;k._p=new Promise(function(N,L){k.onload=N,k.onerror=L}),sn(y,"link",c),a.instance=y}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(a,i),(i=a.state.preload)&&(a.state.loading&3)===0&&(n.count++,a=Su.bind(n),i.addEventListener("load",a),i.addEventListener("error",a))}}var rm=0;function gT(n,i){return n.stylesheets&&n.count===0&&Cu(n,n.stylesheets),0<n.count||0<n.imgCount?function(a){var c=setTimeout(function(){if(n.stylesheets&&Cu(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+i);0<n.imgBytes&&rm===0&&(rm=62500*QA());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Cu(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>rm?50:800)+i);return n.unsuspend=a,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(h)}}:null}function Su(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var wu=null;function Cu(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,wu=new Map,i.forEach(yT,n),wu=null,Su.call(n))}function yT(n,i){if(!(i.state.loading&4)){var a=wu.get(n);if(a)var c=a.get(null);else{a=new Map,wu.set(n,a);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<h.length;y++){var k=h[y];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(a.set(k.dataset.precedence,k),c=k)}c&&a.set(null,c)}h=i.instance,k=h.getAttribute("data-precedence"),y=a.get(k)||c,y===c&&a.set(null,h),a.set(k,h),this.count++,c=Su.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),y?y.parentNode.insertBefore(h,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),i.state.loading|=4}}var ja={$$typeof:M,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function vT(n,i,a,c,h,y,k,N,L){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=wr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wr(0),this.hiddenUpdates=wr(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=y,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function M0(n,i,a,c,h,y,k,N,L,$,ie,ae){return n=new vT(n,i,a,k,L,$,ie,ae,N),i=1,y===!0&&(i|=24),y=jn(3,null,null,i),n.current=y,y.stateNode=n,i=Df(),i.refCount++,n.pooledCache=i,i.refCount++,y.memoizedState={element:c,isDehydrated:a,cache:i},Uf(y),n}function N0(n){return n?(n=Gl,n):Gl}function R0(n,i,a,c,h,y){h=N0(h),c.context===null?c.context=h:c.pendingContext=h,c=vi(i),c.payload={element:a},y=y===void 0?null:y,y!==null&&(c.callback=y),a=xi(n,c,i),a!==null&&(An(a,n,i),fa(a,n,i))}function O0(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<i?a:i}}function im(n,i){O0(n,i),(n=n.alternate)&&O0(n,i)}function j0(n){if(n.tag===13||n.tag===31){var i=rl(n,67108864);i!==null&&An(i,n,67108864),im(n,67108864)}}function z0(n){if(n.tag===13||n.tag===31){var i=Pn();i=Wt(i);var a=rl(n,i);a!==null&&An(a,n,i),im(n,i)}}var ku=!0;function xT(n,i,a,c){var h=I.T;I.T=null;var y=Y.p;try{Y.p=2,lm(n,i,a,c)}finally{Y.p=y,I.T=h}}function bT(n,i,a,c){var h=I.T;I.T=null;var y=Y.p;try{Y.p=8,lm(n,i,a,c)}finally{Y.p=y,I.T=h}}function lm(n,i,a,c){if(ku){var h=om(c);if(h===null)Gd(n,i,c,Eu,a),D0(n,c);else if(wT(h,n,i,a,c))c.stopPropagation();else if(D0(n,c),i&4&&-1<ST.indexOf(n)){for(;h!==null;){var y=Wi(h);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var k=nn(y.pendingLanes);if(k!==0){var N=y;for(N.pendingLanes|=2,N.entangledLanes|=2;k;){var L=1<<31-qe(k);N.entanglements[1]|=L,k&=~L}Ar(y),(ot&6)===0&&(au=De()+500,Ta(0))}}break;case 31:case 13:N=rl(y,2),N!==null&&An(N,y,2),uu(),im(y,2)}if(y=om(c),y===null&&Gd(n,i,c,Eu,a),y===h)break;h=y}h!==null&&c.stopPropagation()}else Gd(n,i,c,null,a)}}function om(n){return n=sf(n),am(n)}var Eu=null;function am(n){if(Eu=null,n=ui(n),n!==null){var i=s(n);if(i===null)n=null;else{var a=i.tag;if(a===13){if(n=u(i),n!==null)return n;n=null}else if(a===31){if(n=f(i),n!==null)return n;n=null}else if(a===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return Eu=n,null}function I0(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(gt()){case te:return 2;case de:return 8;case Ee:case ze:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var sm=!1,Ni=null,Ri=null,Oi=null,za=new Map,Ia=new Map,ji=[],ST="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function D0(n,i){switch(n){case"focusin":case"focusout":Ni=null;break;case"dragenter":case"dragleave":Ri=null;break;case"mouseover":case"mouseout":Oi=null;break;case"pointerover":case"pointerout":za.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ia.delete(i.pointerId)}}function Da(n,i,a,c,h,y){return n===null||n.nativeEvent!==y?(n={blockedOn:i,domEventName:a,eventSystemFlags:c,nativeEvent:y,targetContainers:[h]},i!==null&&(i=Wi(i),i!==null&&j0(i)),n):(n.eventSystemFlags|=c,i=n.targetContainers,h!==null&&i.indexOf(h)===-1&&i.push(h),n)}function wT(n,i,a,c,h){switch(i){case"focusin":return Ni=Da(Ni,n,i,a,c,h),!0;case"dragenter":return Ri=Da(Ri,n,i,a,c,h),!0;case"mouseover":return Oi=Da(Oi,n,i,a,c,h),!0;case"pointerover":var y=h.pointerId;return za.set(y,Da(za.get(y)||null,n,i,a,c,h)),!0;case"gotpointercapture":return y=h.pointerId,Ia.set(y,Da(Ia.get(y)||null,n,i,a,c,h)),!0}return!1}function L0(n){var i=ui(n.target);if(i!==null){var a=s(i);if(a!==null){if(i=a.tag,i===13){if(i=u(a),i!==null){n.blockedOn=i,$n(n.priority,function(){z0(a)});return}}else if(i===31){if(i=f(a),i!==null){n.blockedOn=i,$n(n.priority,function(){z0(a)});return}}else if(i===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Au(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var a=om(n.nativeEvent);if(a===null){a=n.nativeEvent;var c=new a.constructor(a.type,a);af=c,a.target.dispatchEvent(c),af=null}else return i=Wi(a),i!==null&&j0(i),n.blockedOn=a,!1;i.shift()}return!0}function P0(n,i,a){Au(n)&&a.delete(i)}function CT(){sm=!1,Ni!==null&&Au(Ni)&&(Ni=null),Ri!==null&&Au(Ri)&&(Ri=null),Oi!==null&&Au(Oi)&&(Oi=null),za.forEach(P0),Ia.forEach(P0)}function Tu(n,i){n.blockedOn===i&&(n.blockedOn=null,sm||(sm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,CT)))}var _u=null;function B0(n){_u!==n&&(_u=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){_u===n&&(_u=null);for(var i=0;i<n.length;i+=3){var a=n[i],c=n[i+1],h=n[i+2];if(typeof c!="function"){if(am(c||a)===null)continue;break}var y=Wi(a);y!==null&&(n.splice(i,3),i-=3,od(y,{pending:!0,data:h,method:a.method,action:c},c,h))}}))}function go(n){function i(L){return Tu(L,n)}Ni!==null&&Tu(Ni,n),Ri!==null&&Tu(Ri,n),Oi!==null&&Tu(Oi,n),za.forEach(i),Ia.forEach(i);for(var a=0;a<ji.length;a++){var c=ji[a];c.blockedOn===n&&(c.blockedOn=null)}for(;0<ji.length&&(a=ji[0],a.blockedOn===null);)L0(a),a.blockedOn===null&&ji.shift();if(a=(n.ownerDocument||n).$$reactFormReplay,a!=null)for(c=0;c<a.length;c+=3){var h=a[c],y=a[c+1],k=h[ft]||null;if(typeof y=="function")k||B0(a);else if(k){var N=null;if(y&&y.hasAttribute("formAction")){if(h=y,k=y[ft]||null)N=k.formAction;else if(am(h)!==null)continue}else N=k.action;typeof N=="function"?a[c+1]=N:(a.splice(c,3),c-=3),B0(a)}}}function U0(){function n(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(k){return h=k})},focusReset:"manual",scroll:"manual"})}function i(){h!==null&&(h(),h=null),c||setTimeout(a,20)}function a(){if(!c&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,h=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(a,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),h!==null&&(h(),h=null)}}}function um(n){this._internalRoot=n}Mu.prototype.render=um.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(l(409));var a=i.current,c=Pn();R0(a,c,n,i,null,null)},Mu.prototype.unmount=um.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;R0(n.current,2,null,n,null,null),uu(),i[Ir]=null}};function Mu(n){this._internalRoot=n}Mu.prototype.unstable_scheduleHydration=function(n){if(n){var i=Oe();n={blockedOn:null,target:n,priority:i};for(var a=0;a<ji.length&&i!==0&&i<ji[a].priority;a++);ji.splice(a,0,n),a===0&&L0(n)}};var F0=t.version;if(F0!=="19.2.1")throw Error(l(527,F0,"19.2.1"));Y.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(l(188)):(n=Object.keys(n).join(","),Error(l(268,n)));return n=m(i),n=n!==null?g(n):null,n=n===null?null:n.stateNode,n};var kT={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Nu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nu.isDisabled&&Nu.supportsFiber)try{St=Nu.inject(kT),Et=Nu}catch{}}return Pa.createRoot=function(n,i){if(!o(n))throw Error(l(299));var a=!1,c="",h=$y,y=Xy,k=Qy;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(y=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError)),i=M0(n,1,!1,null,null,a,c,null,h,y,k,U0),n[Ir]=i.current,qd(n),new um(i)},Pa.hydrateRoot=function(n,i,a){if(!o(n))throw Error(l(299));var c=!1,h="",y=$y,k=Xy,N=Qy,L=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(k=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError),a.formState!==void 0&&(L=a.formState)),i=M0(n,1,!0,i,a??null,c,h,L,y,k,N,U0),i.context=N0(null),a=i.current,c=Pn(),c=Wt(c),h=vi(c),h.callback=null,xi(a,h,c),a=c,i.current.lanes=a,pe(i,a),Ar(i),n[Ir]=i.current,qd(n),new Mu(i)},Pa.version="19.2.1",Pa}var Z0;function zT(){if(Z0)return dm.exports;Z0=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(),dm.exports=jT(),dm.exports}var IT=zT();/**
|
|
50
|
+
* @license lucide-react v0.562.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const DT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),LT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,l)=>l?l.toUpperCase():r.toLowerCase()),W0=e=>{const t=LT(e);return t.charAt(0).toUpperCase()+t.slice(1)},y1=(...e)=>e.filter((t,r,l)=>!!t&&t.trim()!==""&&l.indexOf(t)===r).join(" ").trim(),PT=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
55
|
+
* @license lucide-react v0.562.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/var BT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
60
|
+
* @license lucide-react v0.562.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const UT=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:l,className:o="",children:s,iconNode:u,...f},d)=>S.createElement("svg",{ref:d,...BT,width:t,height:t,stroke:e,strokeWidth:l?Number(r)*24/Number(t):r,className:y1("lucide",o),...!s&&!PT(f)&&{"aria-hidden":"true"},...f},[...u.map(([m,g])=>S.createElement(m,g)),...Array.isArray(s)?s:[s]]));/**
|
|
65
|
+
* @license lucide-react v0.562.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const Re=(e,t)=>{const r=S.forwardRef(({className:l,...o},s)=>S.createElement(UT,{ref:s,iconNode:t,className:y1(`lucide-${DT(W0(e))}`,`lucide-${e}`,l),...o}));return r.displayName=W0(e),r};/**
|
|
70
|
+
* @license lucide-react v0.562.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const FT=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],HT=Re("arrow-down-to-line",FT);/**
|
|
75
|
+
* @license lucide-react v0.562.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const VT=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],qT=Re("arrow-down",VT);/**
|
|
80
|
+
* @license lucide-react v0.562.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const GT=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],YT=Re("arrow-up",GT);/**
|
|
85
|
+
* @license lucide-react v0.562.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const KT=[["path",{d:"M12 6v12",key:"1vza4d"}],["path",{d:"M17.196 9 6.804 15",key:"1ah31z"}],["path",{d:"m6.804 9 10.392 6",key:"1b6pxd"}]],$T=Re("asterisk",KT);/**
|
|
90
|
+
* @license lucide-react v0.562.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const XT=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],QT=Re("check-check",XT);/**
|
|
95
|
+
* @license lucide-react v0.562.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const ZT=[["path",{d:"M20 4L9 15",key:"1qkx8z"}],["path",{d:"M21 19L3 19",key:"100sma"}],["path",{d:"M9 15L4 10",key:"9zxff7"}]],WT=Re("check-line",ZT);/**
|
|
100
|
+
* @license lucide-react v0.562.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const JT=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],xl=Re("check",JT);/**
|
|
105
|
+
* @license lucide-react v0.562.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const e2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Fp=Re("chevron-down",e2);/**
|
|
110
|
+
* @license lucide-react v0.562.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const t2=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],n2=Re("chevron-left",t2);/**
|
|
115
|
+
* @license lucide-react v0.562.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const r2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],bl=Re("chevron-right",r2);/**
|
|
120
|
+
* @license lucide-react v0.562.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const i2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],l2=Re("chevron-up",i2);/**
|
|
125
|
+
* @license lucide-react v0.562.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const o2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],a2=Re("circle-slash",o2);/**
|
|
130
|
+
* @license lucide-react v0.562.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const s2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],u2=Re("circle",s2);/**
|
|
135
|
+
* @license lucide-react v0.562.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const c2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Hp=Re("copy",c2);/**
|
|
140
|
+
* @license lucide-react v0.562.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const f2=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],d2=Re("corner-down-left",f2);/**
|
|
145
|
+
* @license lucide-react v0.562.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const m2=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],p2=Re("external-link",m2);/**
|
|
150
|
+
* @license lucide-react v0.562.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const h2=[["path",{d:"M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5",key:"4pqfef"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 12v-1",key:"1ej8lb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M8 7V6",key:"1nbb54"}],["circle",{cx:"8",cy:"20",r:"2",key:"ckkr5m"}]],g2=Re("file-archive",h2);/**
|
|
155
|
+
* @license lucide-react v0.562.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const y2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],v2=Re("file-braces",y2);/**
|
|
160
|
+
* @license lucide-react v0.562.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const x2=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],b2=Re("file-code-corner",x2);/**
|
|
165
|
+
* @license lucide-react v0.562.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const S2=[["path",{d:"M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343",key:"1vfytu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0",key:"1etmh7"}]],w2=Re("file-headphone",S2);/**
|
|
170
|
+
* @license lucide-react v0.562.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const C2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]],v1=Re("file-image",C2);/**
|
|
175
|
+
* @license lucide-react v0.562.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const k2=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],E2=Re("file-pen",k2);/**
|
|
180
|
+
* @license lucide-react v0.562.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const A2=[["path",{d:"M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35",key:"17jvcc"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M14 19h6",key:"bvotb8"}],["path",{d:"M17 16v6",key:"18yu1i"}]],T2=Re("file-plus-corner",A2);/**
|
|
185
|
+
* @license lucide-react v0.562.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const _2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],M2=Re("file-spreadsheet",_2);/**
|
|
190
|
+
* @license lucide-react v0.562.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const N2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],R2=Re("file-text",N2);/**
|
|
195
|
+
* @license lucide-react v0.562.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const O2=[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]],j2=Re("file-video-camera",O2);/**
|
|
200
|
+
* @license lucide-react v0.562.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const z2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],I2=Re("file-x",z2);/**
|
|
205
|
+
* @license lucide-react v0.562.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const D2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],x1=Re("file",D2);/**
|
|
210
|
+
* @license lucide-react v0.562.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const L2=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M12 16.5A4.5 4.5 0 1 1 7.5 12 4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 1 1 4.5 4.5 4.5 4.5 0 1 1-4.5 4.5",key:"14wa3c"}],["path",{d:"M12 7.5V9",key:"1oy5b0"}],["path",{d:"M7.5 12H9",key:"eltsq1"}],["path",{d:"M16.5 12H15",key:"vk5kw4"}],["path",{d:"M12 16.5V15",key:"k7eayi"}],["path",{d:"m8 8 1.88 1.88",key:"nxy4qf"}],["path",{d:"M14.12 9.88 16 8",key:"1lst6k"}],["path",{d:"m8 16 1.88-1.88",key:"h2eex1"}],["path",{d:"M14.12 14.12 16 16",key:"uqkrx3"}]],rp=Re("flower",L2);/**
|
|
215
|
+
* @license lucide-react v0.562.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const P2=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],B2=Re("folder-open",P2);/**
|
|
220
|
+
* @license lucide-react v0.562.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const U2=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],F2=Re("link-2",U2);/**
|
|
225
|
+
* @license lucide-react v0.562.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const H2=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],V2=Re("list-checks",H2);/**
|
|
230
|
+
* @license lucide-react v0.562.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const q2=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],J0=Re("list-todo",q2);/**
|
|
235
|
+
* @license lucide-react v0.562.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const G2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ac=Re("loader-circle",G2);/**
|
|
240
|
+
* @license lucide-react v0.562.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const Y2=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],ex=Re("map",Y2);/**
|
|
245
|
+
* @license lucide-react v0.562.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const K2=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],b1=Re("message-circle-question-mark",K2);/**
|
|
250
|
+
* @license lucide-react v0.562.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const $2=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],S1=Re("minimize",$2);/**
|
|
255
|
+
* @license lucide-react v0.562.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const X2=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],w1=Re("pencil",X2);/**
|
|
260
|
+
* @license lucide-react v0.562.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const Q2=[["path",{d:"M13 16H8",key:"wsln4y"}],["path",{d:"M14 8H8",key:"1l3xfs"}],["path",{d:"M16 12H8",key:"1fr5h0"}],["path",{d:"M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",key:"ycz6yz"}]],Z2=Re("receipt-text",Q2);/**
|
|
265
|
+
* @license lucide-react v0.562.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const W2=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],J2=Re("scroll-text",W2);/**
|
|
270
|
+
* @license lucide-react v0.562.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const e_=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],gm=Re("search",e_);/**
|
|
275
|
+
* @license lucide-react v0.562.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const t_=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],n_=Re("send",t_);/**
|
|
280
|
+
* @license lucide-react v0.562.0 - ISC
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the ISC license.
|
|
283
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const r_=[["path",{d:"M22 2 2 22",key:"y4kqgn"}]],i_=Re("slash",r_);/**
|
|
285
|
+
* @license lucide-react v0.562.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/const l_=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],o_=Re("sparkles",l_);/**
|
|
290
|
+
* @license lucide-react v0.562.0 - ISC
|
|
291
|
+
*
|
|
292
|
+
* This source code is licensed under the ISC license.
|
|
293
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
+
*/const a_=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],s_=Re("square-x",a_);/**
|
|
295
|
+
* @license lucide-react v0.562.0 - ISC
|
|
296
|
+
*
|
|
297
|
+
* This source code is licensed under the ISC license.
|
|
298
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
+
*/const u_=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],c_=Re("terminal",u_);/**
|
|
300
|
+
* @license lucide-react v0.562.0 - ISC
|
|
301
|
+
*
|
|
302
|
+
* This source code is licensed under the ISC license.
|
|
303
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
+
*/const f_=[["rect",{width:"18",height:"12",x:"3",y:"8",rx:"1",key:"158fvp"}],["path",{d:"M10 8V5c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v3",key:"s0042v"}],["path",{d:"M19 8V5c0-.6-.4-1-1-1h-3a1 1 0 0 0-1 1v3",key:"9wmeh2"}]],d_=Re("toy-brick",f_);/**
|
|
305
|
+
* @license lucide-react v0.562.0 - ISC
|
|
306
|
+
*
|
|
307
|
+
* This source code is licensed under the ISC license.
|
|
308
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
+
*/const m_=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],p_=Re("upload",m_);/**
|
|
310
|
+
* @license lucide-react v0.562.0 - ISC
|
|
311
|
+
*
|
|
312
|
+
* This source code is licensed under the ISC license.
|
|
313
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
+
*/const h_=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],Vp=Re("user-round",h_);/**
|
|
315
|
+
* @license lucide-react v0.562.0 - ISC
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the ISC license.
|
|
318
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/const g_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Lo=Re("x",g_);/**
|
|
320
|
+
* @license lucide-react v0.562.0 - ISC
|
|
321
|
+
*
|
|
322
|
+
* This source code is licensed under the ISC license.
|
|
323
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
+
*/const y_=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],v_=Re("zap",y_);var ym={exports:{}},vm={};/**
|
|
325
|
+
* @license React
|
|
326
|
+
* use-sync-external-store-shim.production.js
|
|
327
|
+
*
|
|
328
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
329
|
+
*
|
|
330
|
+
* This source code is licensed under the MIT license found in the
|
|
331
|
+
* LICENSE file in the root directory of this source tree.
|
|
332
|
+
*/var tx;function x_(){if(tx)return vm;tx=1;var e=Ec();function t(p,x){return p===x&&(p!==0||1/p===1/x)||p!==p&&x!==x}var r=typeof Object.is=="function"?Object.is:t,l=e.useState,o=e.useEffect,s=e.useLayoutEffect,u=e.useDebugValue;function f(p,x){var b=x(),w=l({inst:{value:b,getSnapshot:x}}),C=w[0].inst,E=w[1];return s(function(){C.value=b,C.getSnapshot=x,d(C)&&E({inst:C})},[p,b,x]),o(function(){return d(C)&&E({inst:C}),p(function(){d(C)&&E({inst:C})})},[p]),u(b),b}function d(p){var x=p.getSnapshot;p=p.value;try{var b=x();return!r(p,b)}catch{return!0}}function m(p,x){return x()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return vm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,vm}var nx;function b_(){return nx||(nx=1,ym.exports=x_()),ym.exports}var C1=b_(),Tl=g1();const S_=kc(Tl);var xm={};S.forwardRef(function(t,r){return S.createElement("div",{ref:r,...t})});var qp=S.forwardRef(function(t,r){return S.createElement("div",{ref:r,...t})}),ir=qp;function Gp(e){var t;const{props:r}=e,l=r.horizontal,o=r.contentInset,s=o??e.nativeContentInset,u=(t=e.contentInsetOverride)!=null?t:void 0;if(u){const f={bottom:0,right:0,...s,...u};return(l?f.right:f.bottom)||0}return s&&(l?s.right:s.bottom)||0}function sr(e){var t;const{values:r,state:l}=e,o=r.get("stylePaddingTop")||0,s=l.props.stylePaddingBottom||0,u=r.get("headerSize")||0,f=r.get("footerSize")||0,d=Gp(l),m=(t=l.pendingTotalSize)!=null?t:r.get("totalSize");return u+f+m+o+s+(d||0)}var w_=e=>e,Tc=S.createContext(null),C_=0;function k_({children:e}){const[t]=S.useState(()=>({animatedScrollY:w_(0),columnWrapperStyle:void 0,contextNum:C_++,listeners:new Map,mapViewabilityAmountCallbacks:new Map,mapViewabilityAmountValues:new Map,mapViewabilityCallbacks:new Map,mapViewabilityConfigStates:new Map,mapViewabilityValues:new Map,positionListeners:new Map,state:void 0,values:new Map([["stylePaddingTop",0],["headerSize",0],["numContainers",0],["activeStickyIndex",-1],["totalSize",0],["scrollAdjustPending",0]]),viewRefs:new Map}));return S.createElement(Tc.Provider,{value:t},e)}function ii(){return S.useContext(Tc)}function k1(e,t){let r=[],l=[];return{get:()=>{const o=[];let s=!1;for(let u=0;u<t.length;u++){const f=Ae(e,t[u]);o.push(f),f!==l[u]&&(s=!0)}return l=o,s&&(r=o),r},subscribe:o=>{const s=[];for(const u of t)s.push(Mo(e,u,o));return()=>{for(const u of s)u()}}}}function Mo(e,t,r){const{listeners:l}=e;let o=l.get(t);return o||(o=new Set,l.set(t,o)),o.add(r),()=>o.delete(r)}function Ae(e,t){const{values:r}=e;return r.get(t)}function Ne(e,t,r){const{listeners:l,values:o}=e;if(o.get(t)!==r){o.set(t,r);const s=l.get(t);if(s)for(const u of s)u(r)}}function E_(e,t,r){const{positionListeners:l}=e;let o=l.get(t);return o||(o=new Set,l.set(t,o)),o.add(r),()=>o.delete(r)}function A_(e,t,r){const{positionListeners:l}=e,o=l.get(t);if(o)for(const s of o)s(r)}function _l(e){const t=S.useContext(Tc),{subscribe:r,get:l}=S.useMemo(()=>k1(t,e),[t,e]);return C1.useSyncExternalStore(r,l)}function T_(e,t){const r=S.useContext(Tc),{subscribe:l,get:o}=S.useMemo(()=>k1(r,[e]),[r,e]);return C1.useSyncExternalStore(l,()=>t(o()[0]))}var yo=({children:e})=>S.createElement(qp,{style:{alignItems:"center",flexDirection:"row",justifyContent:"space-between"}},e);S.memo(function({state:t}){const r=ii(),[l=0,o=0,s=0,u=0,f=0,d=0]=_l(["totalSize","scrollAdjust","debugRawScroll","debugComputedScroll","numContainers","numContainersPooled"]),m=sr(r),[,g]=S.useReducer(p=>p+1,0);return __(()=>{g()},100),S.createElement(qp,{pointerEvents:"none",style:{backgroundColor:"#FFFFFFCC",borderRadius:4,padding:4,paddingBottom:4,paddingLeft:4,position:"absolute",right:0,top:0}},S.createElement(yo,null,S.createElement(ir,null,"TotalSize:"),S.createElement(ir,null,l.toFixed(2))),S.createElement(yo,null,S.createElement(ir,null,"ContentSize:"),S.createElement(ir,null,m.toFixed(2))),S.createElement(yo,null,S.createElement(ir,null,"At end:"),S.createElement(ir,null,String(t.isAtEnd))),S.createElement(yo,null,S.createElement(ir,null,"ScrollAdjust:"),S.createElement(ir,null,o.toFixed(2))),S.createElement(yo,null,S.createElement(ir,null,"RawScroll: "),S.createElement(ir,null,s.toFixed(2))),S.createElement(yo,null,S.createElement(ir,null,"ComputedScroll: "),S.createElement(ir,null,u.toFixed(2))))});function __(e,t){S.useEffect(()=>{const r=setInterval(e,t);return()=>clearInterval(r)},[t])}var M_=typeof __DEV__<"u"?__DEV__:void 0,rx,ix=typeof process<"u"&&typeof xm=="object"&&xm?(rx="production")!=null?rx:xm.MODE:void 0,lx=typeof ix=="string"?ix.toLowerCase()!=="production":void 0,ox,_n=(ox=lx??M_)!=null?ox:!1,ko=-1e7,N_=_n&&!1,R_=_n&&!1,E1=S.forwardRef,Ml=S.memo;function Yp(e){return typeof e=="function"}function _c(e){return Array.isArray(e)}var ax=new Set;function Wu(e,t){_n&&!ax.has(e)&&(ax.add(e),console.warn(`[legend-list] ${t}`))}function lc(e){return Math.floor(e*8)/8}function Za(e){return e==null}function O_(e,t){return e-t}function sx(e,t){var r,l,o;return(o=(l=(r=e[`padding${t}`])!=null?r:e.paddingVertical)!=null?l:e.padding)!=null?o:0}function ux(e,t,r){return sx(e,r)+sx(t,r)}function ip(e,t){var r,l;const o=(l=(r=e.state)==null?void 0:r.containerItemKeys)==null?void 0:l.get(t);if(o!==void 0)return o;const s=Ae(e,"numContainers");for(let u=0;u<s;u++)if(Ae(e,`containerItemKey${u}`)===t)return u;return-1}var j_=Ml(function({id:t,horizontal:r,style:l,refView:o,...s}){const[u=ko]=_l([`containerPosition${t}`]),f={contain:"paint layout style"},d=_c(l)?Object.assign({},...l):l,m=r?{...f,...d,left:u}:{...f,...d,top:u},{animatedScrollY:g,index:p,onLayout:x,onLayoutChange:b,stickyHeaderConfig:w,...C}=s;return S.createElement("div",{"data-index":p,ref:o,...C,style:m})}),z_=Ml(function({id:t,horizontal:r,style:l,refView:o,index:s,animatedScrollY:u,stickyHeaderConfig:f,onLayout:d,onLayoutChange:m,children:g,...p}){const[x=ko,b]=_l([`containerPosition${t}`,"activeStickyIndex"]),w={contain:"paint layout style"},C=S.useMemo(()=>{var A;return(A=_c(l)?Object.assign({},...l):l)!=null?A:{}},[l]),E=S.useMemo(()=>{var A;const _={...w,...C};delete _.transform;const M=(A=f==null?void 0:f.offset)!=null?A:0,z=M??0,P=b===s;return _.position=P?"sticky":"absolute",_.zIndex=s+1e3,r?_.left=P?z:x:_.top=P?z:x,_},[C,r,x,s,b,f==null?void 0:f.offset]);return S.createElement("div",{"data-index":s,ref:o,style:E,...p},g)}),I_=j_,A1=S.createContext(null);function D_(){return S.useContext(A1)}function L_(){const e=D_();return T_("lastItemKeys",r=>{if(e){const{itemKey:l}=e;if(!Za(l))return(r==null?void 0:r.includes(l))||!1}return!1})}function P_({ItemSeparatorComponent:e,leadingItem:t}){return L_()?null:S.createElement(e,{leadingItem:t})}var bm=null;function B_(){return bm||(bm=new ResizeObserver(e=>{for(const t of e){const r=Ju.get(t.target);if(r)for(const l of r)l(t)}})),bm}var Ju=new WeakMap;function U_(e,t){if(typeof ResizeObserver>"u")return()=>{};if(!e)return()=>{};const r=B_();let l=Ju.get(e);return l||(l=new Set,Ju.set(e,l),r.observe(e)),l.add(t),()=>{l&&(l.delete(t),l.size===0&&(Ju.delete(e),r.unobserve(e)))}}function Kp({ref:e,onLayoutProp:t,onLayoutChange:r,webLayoutResync:l},o){return S.useLayoutEffect(()=>{var s,u;const f=e.current,m=((u=(s=f==null?void 0:f.getScrollableNode)==null?void 0:s.call(f))!=null?u:null)||f;if(!m)return;const g=(b,w)=>{b.height===0&&b.width===0||(r(b,w),t==null||t({nativeEvent:{layout:b}}))},p=m.getBoundingClientRect();g(cx(p),!0);let x=p;return U_(m,b=>{var w;const C=b.target instanceof HTMLElement?b.target:void 0,E=(w=b.contentRect)!=null?w:C==null?void 0:C.getBoundingClientRect(),A=E.width!==x.width||E.height!==x.height,_=!!(l!=null&&l());(A||_)&&(x=E,g(cx(E),!1))})},o||[]),{}}function cx(e){return e?{height:e.height,width:e.width,x:e.left,y:e.top}:{height:0,width:0,x:0,y:0}}var No={OS:"web"};function T1(e){const t=e.mvcpAnchorLock;return t?Date.now()>t.expiresAt?(e.mvcpAnchorLock=void 0,!1):!0:!1}function Wa(e){return e.dataChangeNeedsScrollUpdate||T1(e)}var F_=Ml(function({id:t,recycleItems:r,horizontal:l,getRenderedItem:o,updateItemSize:s,ItemSeparatorComponent:u,stickyHeaderConfig:f}){const d=ii(),{columnWrapperStyle:m,animatedScrollY:g}=d,p=d.state.props.positionComponentInternal,x=d.state.props.stickyPositionComponentInternal,[b=0,w=1,C,E,A=1,_,M]=_l([`containerColumn${t}`,`containerSpan${t}`,`containerItemData${t}`,`containerItemKey${t}`,"numColumns","extraData",`containerSticky${t}`]),z=S.useRef({didLayout:!1,horizontal:l,itemKey:E,pendingShrinkToken:0,updateItemSize:s});z.current.horizontal=l,z.current.itemKey=E,z.current.updateItemSize=s;const P=S.useRef(null),[j,U]=S.useState(0),B=b>0?b:1,Z=Math.min(Math.max(w||1,1),A),D=A>1?`${(B-1)/A*100}%`:0,X=A>1?`${Z/A*100}%`:void 0,W=S.useMemo(()=>{let T;if(m){const{columnGap:O,rowGap:H,gap:R}=m;l?T={paddingRight:O||R||void 0,paddingVertical:A>1?(H||R||0)/2:void 0}:T={paddingBottom:H||R||void 0,paddingHorizontal:A>1?(O||R||0)/2:void 0}}return l?{flexDirection:u?"row":void 0,height:X,left:0,position:"absolute",top:D,...T||{}}:{left:D,position:"absolute",right:A>1?null:0,top:0,width:X,...T||{}}},[l,D,X,m,A]),oe=S.useMemo(()=>E!==void 0?o(E):null,[E,C,_]),{index:ne,renderedItem:J}=oe||{},I=S.useMemo(()=>(d.viewRefs.set(t,P),{containerId:t,index:ne,itemKey:E,triggerLayout:()=>{U(T=>T+1)},value:C}),[t,E,ne,C]),Y=S.useCallback(T=>{const{horizontal:O,itemKey:H,updateItemSize:R,lastSize:ue,pendingShrinkToken:fe}=z.current;if(Za(H))return;z.current.didLayout=!0;let se=T;const re=O?"width":"height",he=lc(T[re]),ce=ue?lc(ue[re]):void 0,ge=()=>{z.current.lastSize=se,R(H,se),z.current.didLayout=!0};if(!Wa(d.state)&&ce!==void 0&&he+1<ce){const ke=fe+1;z.current.pendingShrinkToken=ke,requestAnimationFrame(()=>{var We;if(z.current.pendingShrinkToken!==ke)return;const $e=P.current,bt=(We=$e==null?void 0:$e.getBoundingClientRect)==null?void 0:We.call($e);bt&&(se={height:bt.height,width:bt.width}),ge()});return}ge()},[]),{onLayout:G}=Kp({onLayoutChange:Y,ref:P,webLayoutResync:()=>Wa(d.state)},[E,j]),V=M?x||z_:p||I_;return S.createElement(V,{animatedScrollY:M?g:void 0,horizontal:l,id:t,index:ne,key:r?void 0:E,onLayout:G,refView:P,stickyHeaderConfig:f,style:W},S.createElement(A1.Provider,{value:I},J,oe&&u&&S.createElement(P_,{ItemSeparatorComponent:u,leadingItem:oe.item})))}),H_=e=>{const t=e.getAttribute("data-index");if(t===null)return[e,null];const r=Number.parseInt(t,10);return[e,Number.isNaN(r)?null:r]};function V_(e){const t=Array.from(e.children);if(t.length<=1)return t;const r=t.map(H_);r.sort((f,d)=>{const m=f[1],g=d[1];return m===null?1:g===null?-1:m-g});const l=new Map;r.forEach((f,d)=>{l.set(f[0],d)});const o=t.map(f=>l.get(f)),s=q_(o),u=new Set(s);for(let f=0;f<r.length;f++){const d=r[f][0],m=t.indexOf(d);if(!u.has(m)){let g=null;for(let p=f+1;p<r.length;p++){const x=r[p][0],b=t.indexOf(x);if(u.has(b)){g=x;break}}g?e.insertBefore(d,g):e.appendChild(d)}}}function q_(e){const t=e.length,r=[],l=new Array(t).fill(-1),o=[];for(let f=0;f<t;f++){const d=e[f];let m=0,g=r.length;for(;m<g;){const p=Math.floor((m+g)/2);e[o[p]]<d?m=p+1:g=p}m===r.length?(r.push(d),o.push(f)):(r[m]=d,o[m]=f),m>0&&(l[f]=o[m-1])}const s=[];let u=o[o.length-1];for(;u!==-1;)s.unshift(u),u=l[u];return s}function G_(e){const t=ii(),r=S.useRef(void 0);S.useEffect(()=>{const l=Mo(t,"lastPositionUpdate",()=>{r.current!==void 0&&clearTimeout(r.current),r.current=setTimeout(()=>{const o=e.current;o&&V_(o),r.current=void 0},500)});return()=>{l(),r.current!==void 0&&clearTimeout(r.current)}},[t])}var Y_=Ml(function({horizontal:t,numColumns:r,children:l}){const o=S.useRef(null),u=ii().columnWrapperStyle,[f,d]=_l(["otherAxisSize","totalSize"]);G_(o);const m=t?{minHeight:f,position:"relative",width:d}:{height:d,minWidth:f,position:"relative"};if(u&&r>1){const{columnGap:g,rowGap:p,gap:x}=u,b=g||x||0,w=p||x||0;t?(w&&(m.marginTop=m.marginBottom=-w/2),b&&(m.marginRight=-b)):(b&&(m.marginLeft=m.marginRight=-b),w&&(m.marginBottom=-w))}return S.createElement("div",{ref:o,style:m},l)}),K_=Ml(function({horizontal:t,recycleItems:r,ItemSeparatorComponent:l,updateItemSize:o,getRenderedItem:s,stickyHeaderConfig:u}){const[f,d]=_l(["numContainersPooled","numColumns"]),m=[];for(let g=0;g<f;g++)m.push(S.createElement(F_,{getRenderedItem:s,horizontal:t,ItemSeparatorComponent:l,id:g,key:g,recycleItems:r,stickyHeaderConfig:u,updateItemSize:o}));return S.createElement(Y_,{horizontal:t,numColumns:d},m)});function $_(e){return _c(e)?Object.assign({},...e.filter(Boolean)):e}var oc={create:e=>e,flatten:e=>$_(e)};function X_(e){const t=S.useRef(e),r=S.useRef(void 0);t.current=e;const l=S.useMemo(()=>({cancel(){r.current!==void 0&&(cancelAnimationFrame(r.current),r.current=void 0)},flush(){l.cancel(),t.current()},schedule(){if(r.current!==void 0)return!1;const o=requestAnimationFrame(()=>{r.current===o&&(r.current=void 0,t.current())});return r.current=o,!0}}),[]);return S.useEffect(()=>()=>{l.cancel()},[l]),l}function Q_(){return typeof document>"u"?null:document.scrollingElement||document.documentElement||document.body}function lp(){var e,t,r,l;return typeof window>"u"?{x:0,y:0}:{x:(t=(e=window.scrollX)!=null?e:window.pageXOffset)!=null?t:0,y:(l=(r=window.scrollY)!=null?r:window.pageYOffset)!=null?l:0}}function fx(e,t){var r,l;const o=e==null?void 0:e.getBoundingClientRect();return{left:((r=o==null?void 0:o.left)!=null?r:0)+t.x,top:((l=o==null?void 0:o.top)!=null?l:0)+t.y}}function _1(e){var t,r;return{height:(t=e==null?void 0:e.scrollHeight)!=null?t:0,width:(r=e==null?void 0:e.scrollWidth)!=null?r:0}}function Z_(e,t,r){return _1(r?t:e)}function dx(e,t,r){var l,o,s,u,f,d;if(t&&typeof window<"u"){const m=e==null?void 0:e.getBoundingClientRect();return{height:r&&(o=(l=m==null?void 0:m.height)!=null?l:e==null?void 0:e.clientHeight)!=null?o:window.innerHeight,width:r?window.innerWidth:(u=(s=m==null?void 0:m.width)!=null?s:e==null?void 0:e.clientWidth)!=null?u:window.innerWidth}}return{height:(f=e==null?void 0:e.clientHeight)!=null?f:0,width:(d=e==null?void 0:e.clientWidth)!=null?d:0}}function mx(e,t){return Math.max(0,Math.min(e,t))}function px(e,t){return t?e.width:e.height}function W_(e,t,r){return Math.max(0,px(e,r)-px(t,r))}function hx(e,t){return t&&Q_()||e}function J_(e,t){return t&&typeof window<"u"?window:e}function eM(e,t,r){const l=e.getBoundingClientRect(),o=lp();return{height:t&&typeof window<"u"&&!r?window.innerHeight:l.height,width:t&&typeof window<"u"&&r?window.innerWidth:l.width,x:t?l.left+o.x:l.left,y:t?l.top+o.y:l.top}}function tM({clampedOffset:e,horizontal:t,listPos:r,scroll:l}){return{left:t?r.left+e:l.x,top:t?l.y:r.top+e}}var gx=S.forwardRef(function({children:t,style:r,contentContainerStyle:l,horizontal:o=!1,contentOffset:s,maintainVisibleContentPosition:u,onScroll:f,onMomentumScrollEnd:d,showsHorizontalScrollIndicator:m=!0,showsVerticalScrollIndicator:g=!0,refreshControl:p,useWindowScroll:x=!1,onLayout:b,...w},C){const E=ii(),A=S.useRef(null),_=S.useRef(null),M=x,z=S.useCallback(()=>J_(A.current,M),[M]),P=S.useCallback(()=>{const G=A.current,V=Z_(G,_.current,M),T=dx(G,M,o);return W_(V,T,o)},[o,M]),j=S.useCallback(()=>{const G=A.current;if(M){const V=P(),T=lp(),O=fx(G,T),H=o?T.x-O.left:T.y-O.top;return mx(H,V)}return G?o?G.scrollLeft:G.scrollTop:0},[P,o,M]),U=S.useCallback((G,V)=>{const T=A.current,O=z();if(!O||typeof O.scrollTo!="function")return;const H=P(),R=mx(G,H),fe={behavior:V?"smooth":"auto"};if(M){const se=lp(),re=fx(T,se),{left:he,top:ce}=tM({clampedOffset:R,horizontal:o,listPos:re,scroll:se});fe.left=he,fe.top=ce}else o?fe.left=R:fe.top=R;O.scrollTo(fe)},[P,z,o,M]);S.useImperativeHandle(C,()=>({getBoundingClientRect:()=>{var V;return(V=A.current)==null?void 0:V.getBoundingClientRect()},getContentNode:()=>_.current,getCurrentScrollOffset:j,getScrollableNode:()=>hx(A.current,M),getScrollEventTarget:()=>z(),getScrollResponder:()=>hx(A.current,M),isWindowScroll:()=>M,scrollBy:(V,T)=>{const O=z();!O||typeof O.scrollBy!="function"||O.scrollBy({behavior:"auto",left:V,top:T})},scrollTo:V=>{const{x:T=0,y:O=0,animated:H=!0}=V;U(o?T:O,H)},scrollToEnd:(V={})=>{const{animated:T=!0}=V,O=P();U(O,T)},scrollToOffset:V=>{const{offset:T,animated:O=!0}=V;U(T,O)}}),[j,P,z,o,M,U]);const B=S.useCallback(()=>{if(!f||!A.current)return;const G=_1(_.current),V=dx(A.current,M,o),T=j(),O={nativeEvent:{contentOffset:{x:o?T:0,y:o?0:T},contentSize:{height:G.height,width:G.width},layoutMeasurement:{height:V.height,width:V.width}}};f(O)},[j,o,M,f]),Z=X_(B),D=S.useCallback(G=>{var V;if(!f)return;const T=(V=E.state)==null?void 0:V.scrollingTo;T&&!T.animated?Z.flush():Z.schedule()},[f,Z]);S.useLayoutEffect(()=>{const G=z();if(G)return G.addEventListener("scroll",D,{passive:!0}),()=>{G.removeEventListener("scroll",D),Z.cancel()}},[z,D,Z]),S.useEffect(()=>{const G=()=>{s&&U(o?s.x||0:s.y||0,!1)};G(),requestAnimationFrame(G)},[s==null?void 0:s.x,s==null?void 0:s.y,o,U]),S.useLayoutEffect(()=>{if(!b||!A.current)return;const G=A.current,V=()=>{b({nativeEvent:{layout:eM(G,M,o)}})};V();const T=new ResizeObserver(()=>{V()});T.observe(G);const O=()=>{V()};return M&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.addEventListener("resize",O),()=>{T.disconnect(),M&&typeof window<"u"&&typeof window.removeEventListener=="function"&&window.removeEventListener("resize",O)}},[M,b]);const X={...M?{}:{overflow:"auto",overflowX:o||m?"auto":"hidden",overflowY:o?g?"auto":"hidden":"auto",WebkitOverflowScrolling:"touch"},...oc.flatten(r)},W={display:o?"flex":"block",flexDirection:o?"row":void 0,minHeight:o?void 0:"100%",minWidth:o?"100%":void 0,...oc.flatten(l)},{contentInset:oe,scrollEventThrottle:ne,ScrollComponent:J,useWindowScroll:I,...Y}=w;return S.createElement("div",{ref:A,...Y,style:X},p,S.createElement("div",{ref:_,style:W},t))});function yx(e,t){const r=ii();S.useLayoutEffect(()=>Mo(r,e,o=>{t(o)}),[t,r,e])}function nM(){const e=ii(),t=S.useRef(0),r=S.useRef(void 0),l=S.useCallback(()=>{var o;const s=Ae(e,"scrollAdjust"),u=Ae(e,"scrollAdjustUserOffset"),f=(s||0)+(u||0),d=(o=e.state)==null?void 0:o.refScroller.current;if(d&&f!==t.current){const m=f-t.current;if(m!==0){const g=d.getContentNode(),p=d.getCurrentScrollOffset(),x=d.getScrollableNode();if(!g){d.scrollBy(0,m),t.current=f;return}const b=g.scrollHeight,w=x.clientHeight,C=p+m;if(m>0&&!e.state.adjustingFromInitialMount&&b<C+w){const E=e.state.props.stylePaddingBottom||0,A=(C+w-b)*2;g.style.paddingBottom=`${A}px`,g.offsetHeight,d.scrollBy(0,m),r.current!==void 0&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{r.current=void 0,g.style.paddingBottom=E?`${E}px`:"0"})}else d.scrollBy(0,m)}t.current=f}},[e]);return yx("scrollAdjust",l),yx("scrollAdjustUserOffset",l),null}function rM({ScrollComponent:e,...t}){const[r]=_l(["snapToOffsets"]);return S.createElement(e,{...t,snapToOffsets:r})}var vx=({onLayoutChange:e,refView:t,children:r,...l})=>{const o=t??S.useRef(null);return Kp({onLayoutChange:e,ref:o}),S.createElement("div",{...l,ref:o},r)},Sm=e=>S.isValidElement(e)?e:e?S.createElement(e,null):null,iM=Ml(function({canRender:t,style:r,contentContainerStyle:l,horizontal:o,initialContentOffset:s,recycleItems:u,ItemSeparatorComponent:f,alignItemsAtEnd:d,onScroll:m,onLayout:g,ListHeaderComponent:p,ListHeaderComponentStyle:x,ListFooterComponent:b,ListFooterComponentStyle:w,ListEmptyComponent:C,getRenderedItem:E,updateItemSize:A,refScrollView:_,renderScrollComponent:M,onLayoutFooter:z,scrollAdjustHandler:P,snapToIndices:j,stickyHeaderConfig:U,stickyHeaderIndices:B,useWindowScroll:Z=!1,...D}){const X=ii(),W=X.state.props.maintainVisibleContentPosition,oe=M?S.useMemo(()=>S.forwardRef((Y,G)=>M({...Y,ref:G})),[M]):gx,ne=j?rM:oe;S.useLayoutEffect(()=>{p||Ne(X,"headerSize",0),b||Ne(X,"footerSize",0)},[p,b,X]);const J=S.useCallback(Y=>{const G=Y[o?"width":"height"];Ne(X,"headerSize",G)},[X,o]),I=S.useCallback((Y,G)=>{const V=Y[o?"width":"height"];Ne(X,"footerSize",V),z==null||z(Y,G)},[X,o,z]);return S.createElement(ne,{...D,...oe===gx?{useWindowScroll:Z}:{},contentContainerStyle:[l,o?{height:"100%"}:{}],contentOffset:s!==void 0?o?{x:s,y:0}:{x:0,y:s}:void 0,horizontal:o,maintainVisibleContentPosition:W.size||W.data?{minIndexForVisible:0}:void 0,onLayout:g,onScroll:m,ref:_,ScrollComponent:j?oe:void 0,style:r},S.createElement(nM,null),p&&S.createElement(vx,{onLayoutChange:J,style:x},Sm(p)),C&&Sm(C),t&&!C&&S.createElement(K_,{getRenderedItem:E,horizontal:o,ItemSeparatorComponent:f,recycleItems:u,stickyHeaderConfig:U,updateItemSize:A}),b&&S.createElement(vx,{onLayoutChange:I,style:w},Sm(b)),_n&&N_)});function $p(e,t){const r=e.state;return t!==void 0&&r.positions[t]||0}function lM(e){return(Ae(e,"stylePaddingTop")||0)+(Ae(e,"headerSize")||0)}function _t(e,t){const{data:r,keyExtractor:l}=e.props;if(!r)return"";const s=t<r.length?l?l(r[t],t):t:null;return e.idCache[t]=s,s}function Ka(e,t,r){const l=e.state,o=l.totalSize;let s=l.totalSize;t===null?(s=r,l.timeoutSetPaddingTop&&(clearTimeout(l.timeoutSetPaddingTop),l.timeoutSetPaddingTop=void 0)):s+=r,o!==s&&(l.pendingTotalSize=void 0,l.totalSize=s,Ne(e,"totalSize",s))}function M1(e,t,r){const l=e.state,{sizes:o}=l,s=o.get(t),u=s!==void 0?r-s:r;u!==0&&Ka(e,t,u),o.set(t,r)}function Gn(e,t,r,l,o,s){var u,f;const d=e.state,{sizesKnown:m,sizes:g,averageSizes:p,props:{estimatedItemSize:x,getEstimatedItemSize:b,getFixedItemSize:w,getItemType:C},scrollingTo:E}=d,A=m.get(t);if(A!==void 0)return A;let _;if(s){const z=g.get(t);if(z!==void 0)return z}const M=C&&(u=C(l,r))!=null?u:"";if(w&&(_=w(l,r,M),_!==void 0&&m.set(t,_)),_===void 0&&o&&A===void 0&&!E){const z=(f=p[M])==null?void 0:f.avg;z!==void 0&&(_=lc(z))}return _===void 0&&(_=g.get(t),_!==void 0)||(_===void 0&&(_=b?b(l,r,M):x),M1(e,t,_)),_}function N1(e,t){if(t===void 0||t<0)return;const r=_t(e.state,t);return Gn(e,r,t,e.state.props.data[t])}function Xp(e,t,r){var l;const o=e.state,{index:s,viewOffset:u,viewPosition:f}=r;let d=t;if(u&&(d-=u),s!==void 0){const m=lM(e);m&&(d+=m)}if(f!==void 0&&s!==void 0){const m=o.props.data.length;if(m===0)return d;const g=s<0||s>=m,p=(l=o.props.estimatedItemSize)!=null?l:0,x=g?p:Gn(e,_t(o,s),s,o.props.data[s]),b=Gp(o);if(d-=f*(o.scrollLength-b-x),!g&&s===o.props.data.length-1){const w=Ae(e,"footerSize")||0;d+=w}}return d}function Sl(e,t,r){const l=e.state,o=sr(e);let s=t;if(Number.isFinite(o)&&Number.isFinite(l.scrollLength)&&No.OS!=="android"){const u=Math.max(0,o-l.scrollLength),f=r==null?void 0:r.viewOffset,d=typeof f=="number"&&f<0?-f:0,m=u+d;s=Math.min(t,m)}return s=Math.max(0,s),s}function oM(e,t,r){return{...t,nativeEvent:{...t.nativeEvent,contentOffset:e.props.horizontal?{x:r,y:0}:{x:0,y:r}}}}function aM(e,t){var r,l,o,s;const u=e.state,f=u.deferredPublicOnScrollEvent;u.deferredPublicOnScrollEvent=void 0,f&&((s=(o=u.props).onScroll)==null||s.call(o,oM(u,f,(l=(r=t??u.scrollPending)!=null?r:u.scroll)!=null?l:0)))}var Ru=1;function sM(e){return!!(e!=null&&e.didDispatchNativeScroll||e!=null&&e.didRetrySilentInitialScroll||e!=null&&e.watchdog)}function xx(e){e.initialScrollSession=void 0}function op(e){const{bootstrap:t,completion:r,kind:l,previousDataLength:o}=e;return l==="offset"?{completion:r,kind:l,previousDataLength:o}:{bootstrap:t,completion:r,kind:l,previousDataLength:o}}function ec(e,t=(r=>(r=(l=>(l=e.initialScrollSession)==null?void 0:l.kind)())!=null?r:"bootstrap")()){var r,l;return e.initialScrollSession?e.initialScrollSession.kind!==t&&(e.initialScrollSession=op({bootstrap:e.initialScrollSession.kind==="bootstrap"?e.initialScrollSession.bootstrap:void 0,completion:e.initialScrollSession.completion,kind:t,previousDataLength:e.initialScrollSession.previousDataLength})):e.initialScrollSession=op({completion:{},kind:t,previousDataLength:0}),(l=(r=e.initialScrollSession).completion)!=null||(r.completion={}),e.initialScrollSession.completion}var Qp={didDispatchNativeScroll(e){var t,r;return!!((r=(t=e.initialScrollSession)==null?void 0:t.completion)!=null&&r.didDispatchNativeScroll)},didRetrySilentInitialScroll(e){var t,r;return!!((r=(t=e.initialScrollSession)==null?void 0:t.completion)!=null&&r.didRetrySilentInitialScroll)},markInitialScrollNativeDispatch(e){ec(e).didDispatchNativeScroll=!0},markSilentInitialScrollRetry(e){ec(e).didRetrySilentInitialScroll=!0},resetFlags(e){if(!e.initialScrollSession)return;const t=ec(e,e.initialScrollSession.kind);t.didDispatchNativeScroll=void 0,t.didRetrySilentInitialScroll=void 0}},yn={clear(e){yn.set(e,void 0)},didObserveProgress(e,t){const r=Math.abs(t.startScroll-t.targetOffset),l=Math.abs(e-t.targetOffset);return l<=Ru||l+Ru<r},get(e){var t,r;return(r=(t=e.initialScrollSession)==null?void 0:t.completion)==null?void 0:r.watchdog},hasNonZeroTargetOffset(e){return e!==void 0&&e>Ru},isAtZeroTargetOffset(e){return e<=Ru},set(e,t){var r,l;if(!t&&!((l=(r=e.initialScrollSession)==null?void 0:r.completion)!=null&&l.watchdog))return;const o=ec(e);o.watchdog=t?{startScroll:t.startScroll,targetOffset:t.targetOffset}:void 0}};function Nl(e,t={}){var r,l,o;const s=e.initialScrollSession,u=(r=t.kind)!=null?r:s==null?void 0:s.kind,f=s==null?void 0:s.completion,d=Object.hasOwn(t,"bootstrap"),m=u==="bootstrap"?d?t.bootstrap:(s==null?void 0:s.kind)==="bootstrap"?s.bootstrap:void 0:void 0;if(!u||!e.initialScroll&&!m&&!sM(f))return xx(e);const g=(o=(l=t.previousDataLength)!=null?l:s==null?void 0:s.previousDataLength)!=null?o:0;return e.initialScrollSession=op({bootstrap:m,completion:f,kind:u,previousDataLength:g}),e.initialScrollSession}function Ja(e){var t,r;const l=e.state;if(l!=null&&l.scrollingTo){const o=l.pendingScrollResolve;l.pendingScrollResolve=void 0;const s=l.scrollingTo;if(l.scrollHistory.length=0,l.scrollingTo=void 0,l.pendingTotalSize!==void 0&&Ka(e,null,l.pendingTotalSize),l.scrollAdjustHandler.commitPendingAdjust(s),s.isInitialScroll||l.initialScroll){const u=((t=l.initialScrollSession)==null?void 0:t.kind)==="offset";es(e,{onFinished:o,preserveTarget:u&&l.props.data.length===0||!!s.isInitialScroll&&!!((r=l.initialScroll)!=null&&r.preserveForFooterLayout),recalculateItems:!0,syncObservedOffset:u,waitForCompletionFrame:!!s.waitForInitialScrollCompletionFrame});return}o==null||o()}}var uM=80,cM=1500,fM=320,dM=1;function mM(e,t){const r=e.state,{animated:l,horizontal:o,offset:s}=t,u=r.refScroller.current,f=u==null?void 0:u.getScrollableNode();if(!u||!f)return;const d=!!l,m=!!o,g=m?s:0,p=m?0:s;if(u.scrollTo({animated:d,x:g,y:p}),d){const x=u.getScrollEventTarget();pM(e,{readOffset:()=>u.getCurrentScrollOffset(),target:x,targetOffset:s})}else r.scroll=s,setTimeout(()=>{Ja(e)},100)}function pM(e,t){const{readOffset:r,target:l,targetOffset:o}=t;if(!l){Ja(e);return}const s="onscrollend"in l;let u,f=!1;const d=e.state.scrollingTo,m=setTimeout(()=>p("max"),cM),g=()=>{l.removeEventListener("scroll",x),s&&l.removeEventListener("scrollend",b),u&&clearTimeout(u),clearTimeout(m)},p=w=>{if(f)return;if(d!==e.state.scrollingTo){f=!0,g();return}const C=r(),E=Math.abs(C-o)<=dM;w==="scrollend"&&!E||(f=!0,g(),Ja(e))},x=()=>{u&&clearTimeout(u),u=setTimeout(()=>p("idle"),uM)},b=()=>p("scrollend");l.addEventListener("scroll",x),s?l.addEventListener("scrollend",b):u=setTimeout(()=>p("idle"),fM)}function hM(e,t){var r;const{isInitialScroll:l,requestedOffset:o,targetOffset:s}=t,u=yn.get(e),f=!e.didFinishInitialScroll&&(l||!!u)&&yn.hasNonZeroTargetOffset(s),d=!e.didFinishInitialScroll&&!!u&&yn.isAtZeroTargetOffset(o);if(f){e.hasScrolled=!1,yn.set(e,{startScroll:(r=u==null?void 0:u.startScroll)!=null?r:e.scroll,targetOffset:s});return}d&&yn.clear(e)}function Mc(e,t){var r;const l=e.state,{noScrollingTo:o,forceScroll:s,...u}=t,{animated:f,isInitialScroll:d,offset:m,precomputedWithViewOffset:g,waitForInitialScrollCompletionFrame:p}=u,{props:{horizontal:x}}=l;l.animFrameCheckFinishedScroll&&cancelAnimationFrame(e.state.animFrameCheckFinishedScroll),l.timeoutCheckFinishedScrollFallback&&clearTimeout(e.state.timeoutCheckFinishedScrollFallback);const b=g?m:Xp(e,m,u),w=!!d&&((r=l.initialScrollSession)==null?void 0:r.kind)==="offset",C=Sl(e,b,u),E=w?b:C;l.scrollHistory.length=0,o||(d&&Qp.resetFlags(l),l.scrollingTo={...u,targetOffset:C,waitForInitialScrollCompletionFrame:p}),l.scrollPending=C,hM(l,{isInitialScroll:d,requestedOffset:E,targetOffset:C}),s||!d||No.OS==="android"?mM(e,{animated:f,horizontal:x,offset:E}):l.scroll=E}function R1(e,t){return t<=0?-1:e>=t?t-1:e<0?0:e}function Ou(e,{index:t,viewOffset:r=0,animated:l=!0,forceScroll:o,isInitialScroll:s,viewPosition:u}){const f=e.state,{data:d}=f.props;t=R1(t,d.length);const m=N1(e,t),g=$p(e,t);t===d.length-1&&u===void 0&&(u=1),f.scrollForNextCalculateItemsInView=void 0,Mc(e,{animated:l,forceScroll:o,index:t,isInitialScroll:s,itemSize:m,offset:g,viewOffset:r,viewPosition:u??0})}var gM=1.3,O1=(e,t,r,l,o,s,u,f,d)=>{const m=Math.abs(e),g=t||r>0&&m<=r,p=()=>{f({atThreshold:t,contentSize:s.contentSize,dataLength:s.dataLength,scrollPosition:s.scrollPosition})};return l?!t&&r>0&&m>=r*gM||!t&&r<=0&&m>0?(f(void 0),!1):(g&&(!o||o.atThreshold!==t||o.contentSize!==s.contentSize||o.dataLength!==s.dataLength)&&(d&&u(e),p()),!0):g?(u(e),p(),!0):!1};function j1(e){var t;const r=e.state;if(!r||r.initialScroll)return;const{queuedInitialLayout:l,scrollLength:o,scroll:s,maintainingScrollAtEnd:u,props:{maintainScrollAtEndThreshold:f,onEndReachedThreshold:d}}=r;if(r.initialScroll)return;const m=sr(e);if(m>0&&l&&!u){const g=Gp(r),p=m-s-o-g,x=m<o;r.isAtEnd=x||p<o*f,r.isEndReached=O1(p,x,d*o,r.isEndReached,r.endReachedSnapshot,{contentSize:m,dataLength:(t=r.props.data)==null?void 0:t.length,scrollPosition:s},b=>{var w,C;return(C=(w=r.props).onEndReached)==null?void 0:C.call(w,{distanceFromEnd:b})},b=>{r.endReachedSnapshot=b},!0)}}function yM(e){const t=e==null?void 0:e.state;if(!t||t.initialScroll||t.scrollingTo)return;const{dataChangeEpoch:r,isStartReached:l,props:{data:o,onStartReachedThreshold:s},scroll:u,scrollLength:f,startReachedSnapshot:d,startReachedSnapshotDataChangeEpoch:m,totalSize:g}=t,p=o.length,x=s*f,b=m!==r,w=x>0&&Math.abs(u)<=x,C=!!l&&w&&!!b&&!Wa(t);l&&x>0&&u>x&&d&&(b||d.contentSize!==g||d.dataLength!==p)&&(t.isStartReached=!1,t.startReachedSnapshot=void 0,t.startReachedSnapshotDataChangeEpoch=void 0),t.isAtStart=u<=0,!(l&&w&&b&&!C)&&(t.isStartReached=O1(u,!1,x,t.isStartReached,C?void 0:d,{contentSize:g,dataLength:p,scrollPosition:u},E=>{var A,_;return(_=(A=t.props).onStartReached)==null?void 0:_.call(A,{distanceFromStart:E})},E=>{t.startReachedSnapshot=E,t.startReachedSnapshotDataChangeEpoch=E?r:void 0},C))}function Nc(e){j1(e),yM(e)}function Zp(e,{didLayout:t,didInitialScroll:r}){const{state:l}=e,{loadStartTime:o,props:{onLoad:s}}=l;t&&(l.didContainersLayout=!0),r&&(l.didFinishInitialScroll=!0),!!(l.didContainersLayout&&l.didFinishInitialScroll)&&!Ae(e,"readyToRender")&&(Ne(e,"readyToRender",!0),s&&s({elapsedTimeInMs:Date.now()-o}))}function bx(e,t){e.scroll=t,e.scrollPending=t,e.scrollPrev=t}function Rc(e,t){const{forceScroll:r,resolvedOffset:l,target:o,waitForCompletionFrame:s}=t,u=o.index,f=u!==void 0?R1(u,e.state.props.data.length):void 0,d=N1(e,f);Mc(e,{animated:!1,forceScroll:r,index:f!==void 0&&f>=0?f:void 0,isInitialScroll:!0,itemSize:d,offset:l,precomputedWithViewOffset:!0,viewOffset:o.viewOffset,viewPosition:o.viewPosition,waitForInitialScrollCompletionFrame:s})}function Ro(e,t,r){var l;e.initialScroll=t,r!=null&&r.resetDidFinish&&e.didFinishInitialScroll&&(e.didFinishInitialScroll=!1),Nl(e,{kind:((l=e.initialScrollSession)==null?void 0:l.kind)==="offset"?"offset":"bootstrap"})}function es(e,t){var r,l,o;const s=e.state;if((t==null?void 0:t.resolvedOffset)!==void 0)bx(s,t.resolvedOffset);else if(t!=null&&t.syncObservedOffset&&((r=s.initialScrollSession)==null?void 0:r.kind)==="offset"){const f=(o=(l=s.refScroller.current)==null?void 0:l.getCurrentScrollOffset)==null?void 0:o.call(l);typeof f=="number"&&Number.isFinite(f)&&bx(s,f)}const u=()=>{var f,d,m,g,p,x,b;const w=((f=s.initialScrollSession)==null?void 0:f.kind)==="bootstrap",C=(g=(m=(d=t==null?void 0:t.resolvedOffset)!=null?d:s.scrollPending)!=null?m:s.scroll)!=null?g:0;yn.clear(s),t!=null&&t.preserveTarget||(s.initialScroll=void 0),Nl(s),t!=null&&t.recalculateItems&&((p=s.props)!=null&&p.data)&&((x=s.triggerCalculateItemsInView)==null||x.call(s,{forceFullItemPositions:!0})),t!=null&&t.recalculateItems&&Nc(e),Zp(e,{didInitialScroll:!0}),w&&aM(e,C),(b=t==null?void 0:t.onFinished)==null||b.call(t)};if(t!=null&&t.waitForCompletionFrame){requestAnimationFrame(u);return}u()}function ti(e,t){var r,l;if(((r=e.state.initialScrollSession)==null?void 0:r.kind)==="offset")return(l=t.contentOffset)!=null?l:0;const s=t.index!==void 0?$p(e,t.index):0,u=Xp(e,s,t);return Sl(e,u,t)}function z1(e,t){const{didFinishInitialScroll:r,queuedInitialLayout:l,scrollingTo:o}=e,s=e.initialScroll,u=!!(o!=null&&o.isInitialScroll),f=!!(t!=null&&t.requiresMeasuredLayout)&&!l&&!u;if(!(!s||f||r||o&&!u))return{initialScroll:s,isInitialScrollInProgress:u,queuedInitialLayout:l,scrollingTo:o}}function vM(e,t){var r,l,o;const s=e.state,u=z1(s,{requiresMeasuredLayout:!0});if(!u)return!1;const{initialScroll:f,isInitialScrollInProgress:d,queuedInitialLayout:m}=u,g=d?u.scrollingTo:void 0,p=ti(e,f),x=g?(r=g.targetOffset)!=null?r:g.offset:void 0,b=f.contentOffset===void 0||Math.abs(f.contentOffset-p)>1,w=x!==void 0&&Math.abs(x-p)>1,C=x!==void 0&&Math.abs(s.scroll-x)<=1&&Math.abs(s.scrollPending-x)<=1;if(!(t!=null&&t.forceScroll)&&!b&&d&&!w||t!=null&&t.forceScroll&&C)return!1;b&&((l=s.initialScrollSession)==null?void 0:l.kind)!=="offset"&&Ro(s,{...f,contentOffset:p});const E=(o=t==null?void 0:t.forceScroll)!=null?o:!!m||d&&b;return Rc(e,{forceScroll:E,resolvedOffset:p,target:f}),!0}function xM(e,t){var r,l;const o=e.state,s=z1(o);if(!s)return!1;const{initialScroll:u,queuedInitialLayout:f}=s,d=(r=u.contentOffset)!=null?r:0,m=Math.abs(o.scroll-d)<=1&&Math.abs(o.scrollPending-d)<=1;if(t!=null&&t.forceScroll&&m)return!1;const g=!!o.lastLayout&&o.scrollLength>0,p=(l=t==null?void 0:t.forceScroll)!=null?l:g||!!f;return Rc(e,{forceScroll:p,resolvedOffset:d,target:u}),!0}function ac(e,t){var r;return((r=e.state.initialScrollSession)==null?void 0:r.kind)==="offset"?xM(e,{forceScroll:t==null?void 0:t.forceScroll}):vM(e,{forceScroll:t==null?void 0:t.forceScroll})}function Sx(e){return e==null}function I1(e){const{startBuffered:t,endBuffered:r}=e;return!Sx(r)&&!Sx(t)&&t>=0&&r>=0?Array.from(e.containerItemKeys.keys()).map(l=>e.indexByKey.get(l)).filter(l=>l!==void 0&&l>=t&&l<=r).sort((l,o)=>l-o):[]}function Wp(e,t=I1(e)){return t.length>0&&t.every(r=>{const l=_t(e,r);return e.sizesKnown.has(l)})}var D1=1,bM=8,SM=24,wM="LegendList bootstrap initial scroll aborted after exceeding convergence bounds.";function ur(e){var t;return((t=e.initialScrollSession)==null?void 0:t.kind)==="bootstrap"?e.initialScrollSession.bootstrap:void 0}function ss(e){var t;return((t=e.initialScrollSession)==null?void 0:t.kind)==="offset"}function CM(e,t){if(!e||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function kM(e){const{dataLength:t,getSize:r,offset:l,positions:o,scrollLength:s,startIndex:u}=e,f=l+s,d=[];let m=u!==void 0?Math.max(0,Math.min(t-1,u)):0;for(;m>0;){const g=m-1,p=o[g];if(p===void 0){m=g;continue}const x=r(g);if(x===void 0){m=g;continue}if(p+x<=l)break;m=g}for(;m<t;m++){const g=o[m];if(g===void 0)continue;const p=r(m);if(p!==void 0){if(g<f&&g+p>l)d.push(m);else if(d.length>0&&g>=f)break}}return d}function EM(e){const{mountFrameCount:t,maxFrames:r=bM,maxPasses:l=SM,passCount:o}=e;return t>=r||o>=l}function L1(e,t){return EM(t)?(_n&&console.warn(wM),DM(e),!0):!1}function ts(e){var t;const r=ur(e),l=r==null?void 0:r.frameHandle;l!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(l),r&&(r.frameHandle=void 0),Nl(e,{bootstrap:void 0,kind:(t=e.initialScrollSession)==null?void 0:t.kind})}function P1(e,t){var r,l,o;const s=ur(e);Nl(e,{bootstrap:{frameHandle:s==null?void 0:s.frameHandle,mountFrameCount:(r=s==null?void 0:s.mountFrameCount)!=null?r:0,passCount:0,previousResolvedOffset:void 0,scroll:t.scroll,seedContentOffset:(o=(l=t.seedContentOffset)!=null?l:s==null?void 0:s.seedContentOffset)!=null?o:t.scroll,targetIndexSeed:t.targetIndexSeed,visibleIndices:void 0},kind:"bootstrap"})}function AM(e,t){var r,l,o;const s=ur(e);s?(s.passCount=0,s.previousResolvedOffset=void 0,s.scroll=(r=t==null?void 0:t.scroll)!=null?r:s.scroll,s.seedContentOffset=(l=t==null?void 0:t.seedContentOffset)!=null?l:s.seedContentOffset,s.targetIndexSeed=(o=t==null?void 0:t.targetIndexSeed)!=null?o:s.targetIndexSeed,s.visibleIndices=void 0,Nl(e,{bootstrap:s,kind:"bootstrap"})):(t==null?void 0:t.scroll)!==void 0&&P1(e,{scroll:t.scroll,seedContentOffset:t.seedContentOffset,targetIndexSeed:t.targetIndexSeed})}function ap(e){requestAnimationFrame(()=>{var t;ur(e)&&((t=e.triggerCalculateItemsInView)==null||t.call(e,{forceFullItemPositions:!0}))})}function Jp(e){const t=e.state,r=ur(t);if(!r||r.frameHandle!==void 0)return;const l=()=>{const o=ur(t);o&&(o.frameHandle=void 0,o.mountFrameCount+=1,!L1(e,{mountFrameCount:o.mountFrameCount,passCount:o.passCount})&&Jp(e))};r.frameHandle=requestAnimationFrame(l)}function sp(e,t){AM(e.state,t),Jp(e),ap(e.state)}function B1(e){const{dataLength:t,footerSize:r,preserveForFooterLayout:l,stylePaddingBottom:o}=e;return{contentOffset:void 0,index:Math.max(0,t-1),preserveForBottomPadding:!0,preserveForFooterLayout:l,viewOffset:-o-r,viewPosition:1}}function TM(e){return!!(e!=null&&e.preserveForBottomPadding)}function wl(e){return!!(e!=null&&e.preserveForFooterLayout)}function _M(e){return!!(e&&e.viewPosition===1&&(TM(e)||wl(e)))}function MM(e){const{dataLength:t,footerSize:r,initialScrollAtEnd:l,stylePaddingBottom:o,target:s}=e,u=wl(s);return{...s,contentOffset:void 0,index:l?Math.max(0,t-1):s.index,preserveForBottomPadding:!0,preserveForFooterLayout:u,viewOffset:-o-(u?r:0),viewPosition:1}}function NM(e,t){return e.index===t.index&&e.preserveForBottomPadding===t.preserveForBottomPadding&&e.preserveForFooterLayout===t.preserveForFooterLayout&&e.viewOffset===t.viewOffset&&e.viewPosition===t.viewPosition}function up(e,t){if(wl(t)){if(e.didFinishInitialScroll&&!ur(e)){e.initialScroll=void 0,Nl(e);return}Ro(e,{...t,preserveForFooterLayout:void 0})}}function U1(e,t,r=D1){const l=e.state;if(!l.didFinishInitialScroll)return!1;const o=cp(l);return Math.abs(o-ti(e,t))>r}function cp(e){var t,r,l,o;const s=(r=(t=e.refScroller.current)==null?void 0:t.getCurrentScrollOffset)==null?void 0:r.call(t);return typeof s=="number"&&Number.isFinite(s)?s:(o=(l=e.scrollPending)!=null?l:e.scroll)!=null?o:0}function RM(e,t){var r,l,o;const{initialScrollAtEnd:s,target:u}=t,f=e.state,d=ti(e,u),m=d===0&&!s&&(ss(f)?Math.abs((r=u.contentOffset)!=null?r:0)<=1:u.index===0&&((l=u.viewPosition)!=null?l:0)===0&&Math.abs((o=u.viewOffset)!=null?o:0)<=1),g=f.props.data.length===0&&u.index!==void 0;m?(ts(f),es(e,{resolvedOffset:d})):g?(ts(f),es(e,{preserveTarget:!0,resolvedOffset:d})):(P1(f,{scroll:d,seedContentOffset:0,targetIndexSeed:u.index}),Jp(e))}function OM(e,t){const{dataLength:r,didDataChange:l,initialScrollAtEnd:o,previousDataLength:s,stylePaddingBottom:u}=t,f=e.state,d=f.initialScroll;if(ss(f)||!d)return;const m=!!(f.didFinishInitialScroll&&s===0&&r>0&&d.index!==void 0),g=ur(f),p=r>0&&(o||_M(d));if(!(!l&&!m&&!p)){if(p){if(!m&&U1(e,d)){up(f,d);return}const x=o?B1({dataLength:r,footerSize:Ae(e,"footerSize")||0,preserveForFooterLayout:wl(d),stylePaddingBottom:u}):MM({dataLength:r,footerSize:Ae(e,"footerSize")||0,initialScrollAtEnd:o,stylePaddingBottom:u,target:d});if(!NM(d,x)||g||m||l){Ro(f,x,{resetDidFinish:m}),sp(e,{scroll:ti(e,x),seedContentOffset:m&&!g?cp(f):void 0,targetIndexSeed:x.index});return}}l&&(g||m)&&(Ro(f,d,{resetDidFinish:m}),sp(e,{scroll:ti(e,d),seedContentOffset:m&&!g?cp(f):void 0,targetIndexSeed:d.index}))}}function jM(e,t){const{dataLength:r,footerSize:l,initialScrollAtEnd:o,stylePaddingBottom:s}=t,u=e.state;if(!o)return;const f=u.initialScroll;if(!(ss(u)||r===0||!f||!(ur(u)||wl(f))))if(U1(e,f))up(u,f);else{const m=B1({dataLength:r,footerSize:l,preserveForFooterLayout:wl(f),stylePaddingBottom:s});f.index!==m.index||f.viewPosition!==m.viewPosition||f.viewOffset!==m.viewOffset?(Ro(u,m,{resetDidFinish:!!u.didFinishInitialScroll}),sp(e,{scroll:ti(e,m),targetIndexSeed:m.index})):up(u,f)}}function zM(e){var t,r;const l=e.state,o=ur(l),s=l.initialScroll;if(!o||!s||ss(l)||(t=l.scrollingTo)!=null&&t.isInitialScroll||(o.passCount+=1,L1(e,{mountFrameCount:o.mountFrameCount,passCount:o.passCount})))return;s.index!==void 0&&l.startBuffered>=0&&l.endBuffered>=0&&s.index>=l.startBuffered&&s.index<=l.endBuffered&&(o.targetIndexSeed=void 0);const u=ti(e,s),f=I1(l),d=Wp(l,f),m=Math.abs(o.scroll-u)>1,{data:g}=l.props,p=kM({dataLength:g.length,getSize:E=>{var A,_;const M=(A=l.idCache[E])!=null?A:_t(l,E);return(_=l.sizes.get(M))!=null?_:Gn(e,M,E,g[E])},offset:u,positions:l.positions,scrollLength:l.scrollLength,startIndex:(r=o.targetIndexSeed)!=null?r:l.startBuffered>=0?l.startBuffered:void 0}),x=p.length>0&&p.every(E=>{var A;const _=(A=l.idCache[E])!=null?A:_t(l,E);return l.sizesKnown.has(_)}),b=o.previousResolvedOffset,w=o.visibleIndices;if(o.previousResolvedOffset=u,o.visibleIndices=p,m){o.scroll=u,ap(l);return}if(!d||!x)return;if(!(b!==void 0&&Math.abs(b-u)<=D1&&CM(w,p))){ap(l);return}ts(l),Rc(e,{forceScroll:!0,resolvedOffset:u,target:s,waitForCompletionFrame:No.OS==="web"})}function IM(e,t){const r=e.state;ts(r),es(e,{preserveTarget:wl(r.initialScroll),recalculateItems:!0,resolvedOffset:t})}function DM(e){var t,r,l,o;const s=e.state,u=ur(s),f=s.initialScroll;u&&f&&!ss(s)&&s.refScroller.current?(ts(s),Rc(e,{forceScroll:!0,resolvedOffset:u.scroll,target:f,waitForCompletionFrame:No.OS==="web"})):IM(e,(o=(l=(r=(t=ur(s))==null?void 0:t.scroll)!=null?r:s.scrollPending)!=null?l:s.scroll)!=null?o:0)}var LM=20,PM=1,BM=1,wm=16;function eh(e,t){const r=e.state.scrollingTo;t!=null&&t.onlyIfAligned&&(!(r!=null&&r.isInitialScroll)||r.animated||!th(e,r).isAtResolvedTarget)||(e.state.animFrameCheckFinishedScroll=requestAnimationFrame(()=>HM(e)))}function UM(e,t){const{clampedTargetOffset:r,scrollingTo:l}=t;return!l.isInitialScroll||e.hasScrolled||r<=PM}function FM(e,t){return!!(t!=null&&t.isInitialScroll)&&Qp.didDispatchNativeScroll(e)&&!e.hasScrolled}function F1(e){var t;return(t=yn.get(e))==null?void 0:t.targetOffset}function H1(e){const t=F1(e);return!e.didFinishInitialScroll&&yn.hasNonZeroTargetOffset(t)}function wx(e,t){var r,l;if(!t.isInitialScroll||t.animated||!e.didContainersLayout||((r=e.initialScrollSession)==null?void 0:r.kind)==="bootstrap")return!1;const o=(l=t.targetOffset)!=null?l:t.offset;return yn.hasNonZeroTargetOffset(o)&&Qp.didDispatchNativeScroll(e)&&!e.hasScrolled||yn.isAtZeroTargetOffset(o)||Math.abs(e.scroll-o)>1||Math.abs(e.scrollPending-o)>1?!1:!!t.waitForInitialScrollCompletionFrame||H1(e)}function Cx(e){var t;const{state:r}=e;return!!((t=r.scrollingTo)!=null&&t.isInitialScroll)&&r.props.data.length>0&&sr(e)<=r.scrollLength&&r.scrollPending<=BM}function th(e,t){var r;const{state:l}=e,o=l.scrollPending,s=l.scrollAdjustHandler.getAdjust(),u=(r=t.targetOffset)!=null?r:Sl(e,t.offset-(t.viewOffset||0),t),f=Sl(e,o,t),d=Math.abs(o-u),m=Math.abs(d-s);return{clampedTargetOffset:u,isAtResolvedTarget:Math.abs(o-f)<1&&(d<1||!t.animated&&m<1)}}function HM(e){const t=e.state.scrollingTo;if(!t)return;const{state:r}=e;r.animFrameCheckFinishedScroll=void 0;const l=th(e,t);l.isAtResolvedTarget&&UM(r,{clampedTargetOffset:l.clampedTargetOffset,scrollingTo:t})&&Ja(e)}function VM(e,t){var r;(r=e.state.refScroller.current)==null||r.scrollTo({animated:!1,x:e.state.props.horizontal?t:0,y:e.state.props.horizontal?0:t})}function qM(e){const t=e.state,r=t.scrollingTo,l=Cx(e),o=FM(t,r),s=r!==void 0?wx(t,r):!1,u=(r==null?void 0:r.isInitialScroll)&&!l&&!s||!t.didContainersLayout,f=l||s?0:o?wm:u?500:100;t.timeoutCheckFinishedScrollFallback=setTimeout(()=>{let d=0;const m=p=>{t.timeoutCheckFinishedScrollFallback=setTimeout(g,p)},g=()=>{var p;t.timeoutCheckFinishedScrollFallback=void 0;const x=t.scrollingTo;if(x){d++;const b=H1(t)&&!t.hasScrolled,w=o?5:b?LM:5,C=Cx(e),E=wx(t,x),A=th(e,x),_=o&&A.isAtResolvedTarget&&d>=1;if(C||t.hasScrolled||E||_||d>w)Ja(e);else if(b&&d<=w){const M=(p=F1(t))!=null?p:t.scrollPending;VM(e,M),m(o?wm:100)}else m(o?wm:100)}};g()},f)}function GM(e){var t;if(!e.state.initialScroll)return;const r=()=>ac(e,{forceScroll:!0});r(),((t=e.state.initialScrollSession)==null?void 0:t.kind)!=="offset"&&requestAnimationFrame(r),eh(e,{onlyIfAligned:!0})}function YM(e,t){var r,l;const{dataLength:o,hasFooterComponent:s,initialContentOffset:u,initialScrollAtEnd:f,useBootstrapInitialScroll:d}=t,m=e.state,g=m.initialScroll,p=u??0,x=d&&f&&s;if(g&&(g.contentOffset===void 0||!!g.preserveForFooterLayout!==x&&((r=m.initialScrollSession)==null?void 0:r.kind)!=="offset")&&Ro(m,{...g,contentOffset:p,preserveForFooterLayout:x}),d&&g&&((l=m.initialScrollSession)==null?void 0:l.kind)!=="offset"){RM(e,{initialScrollAtEnd:f,target:m.initialScroll});return}!p&&!(!!g&&o===0&&!(p===0&&!f))&&(g&&!f?es(e,{resolvedOffset:p}):Zp(e,{didInitialScroll:!0}))}function KM(e,t){var r,l,o;const{dataLength:s,didDataChange:u,initialScrollAtEnd:f,stylePaddingBottom:d,useBootstrapInitialScroll:m}=t,g=e.state,p=(l=(r=g.initialScrollSession)==null?void 0:r.previousDataLength)!=null?l:0;if(g.initialScrollSession&&(g.initialScrollSession.previousDataLength=s),Nl(g),m){OM(e,{dataLength:s,didDataChange:u,initialScrollAtEnd:f,previousDataLength:p,stylePaddingBottom:d});return}const x=p===0&&s>0&&!!g.initialScroll&&((o=e.state.initialScrollSession)==null?void 0:o.kind)==="offset"&&!!g.didFinishInitialScroll;p!==0||s===0||!g.initialScroll||!g.queuedInitialLayout||g.didFinishInitialScroll&&!x||(x&&(g.didFinishInitialScroll=!1),ac(e))}function nh(e,t,r){const l=e.state;if(Math.abs(t)>.1){const o=()=>{l.scrollAdjustHandler.requestAdjust(t),l.adjustingFromInitialMount&&l.adjustingFromInitialMount--};l.scroll+=t,l.scrollForNextCalculateItemsInView=void 0,Ae(e,"readyToRender")?o():(l.adjustingFromInitialMount=(l.adjustingFromInitialMount||0)+1,requestAnimationFrame(o))}}var gn=.1,$M=300,XM=2,QM=1;function ZM(e,t,r,l){if(!t){e.mvcpAnchorLock=void 0;return}const o=e.mvcpAnchorLock;if(!o)return;const s=l>o.expiresAt,u=e.indexByKey.get(o.id)===void 0;if(s||u||!r){e.mvcpAnchorLock=void 0;return}return o}function WM(e,t){{const{anchorId:r,anchorPosition:l,dataChanged:o,now:s,positionDiff:u}=t,f=!!o||!!e.mvcpAnchorLock,d=e.props.maintainVisibleContentPosition.data;if(!f||!d||e.scrollingTo||!r||l===void 0)return;const m=e.mvcpAnchorLock,g=!o&&Math.abs(u)<=gn&&(m==null?void 0:m.id)===r?m.quietPasses+1:0;if(!o&&g>=XM){e.mvcpAnchorLock=void 0;return}e.mvcpAnchorLock={expiresAt:s+$M,id:r,position:l,quietPasses:g}}}function JM(e,t,r,l,o,s){return!1}function eN(e,t,r){if(Math.abs(t)<=gn)return 0;const o=Math.max(0,r-e.scrollLength)-e.scroll;return t<0?Math.max(t,Math.min(0,o)):t>0?Math.min(t,Math.max(0,o)):0}function tN(e,t){return e<0?-t:t}function Cm(e,t,r){const l=e.state;l.pendingNativeMVCPAdjust=void 0;const o=t-r;Math.abs(o)>gn&&nh(e,o)}function nN(e){const t=e.state,r=t.pendingNativeMVCPAdjust;if(!r||Math.abs(r.manualApplied)>gn)return;const l=sr(e),o=eN(t,r.amount,l);if(Math.abs(o)<=gn)return;const s=r.amount-o;Math.abs(s)<=gn||(r.manualApplied=s,nh(e,s),r.furthestProgressTowardAmount=0)}function rN(e,t){const r=e.state,l=r.pendingNativeMVCPAdjust;if(!l)return!1;const o=l.amount-l.manualApplied,s=t-(l.startScroll+l.manualApplied),u=o<0&&s>gn||o>0&&s<-gn,f=tN(o,s);if(Math.abs(o)<=gn)return r.pendingNativeMVCPAdjust=void 0,!0;if(u)return r.pendingNativeMVCPAdjust=void 0,!1;if(f+gn>=Math.abs(o))return Cm(e,o,s),!0;const d=Math.max(0,sr(e)-r.scrollLength);return Math.abs(t-d)<=QM||r.pendingMaintainScrollAtEnd&&r.isAtEnd&&f>gn?(Cm(e,o,s),!0):f>l.furthestProgressTowardAmount+gn?(l.furthestProgressTowardAmount=f,!1):(l.furthestProgressTowardAmount>gn&&f<l.furthestProgressTowardAmount-gn&&(r.pendingNativeMVCPAdjust=void 0),!1)}function iN(e,t){const r=e.state,{idsInView:l,positions:o,props:s}=r,{maintainVisibleContentPosition:{data:u,size:f,shouldRestorePosition:d}}=s,m=Date.now(),g=!!t||!!r.mvcpAnchorLock,p=r.scrollingTo,x=ZM(r,g,u,m);let b,w;const C=[],E=p==null?void 0:p.index,A=p==null?void 0:p.viewPosition,_=E!==void 0&&r.props.data.length>0&&E>=r.props.data.length-1&&(A??0)>0,M=t?u:f,z=r.indexByKey,P=r.scroll;if(sr(e),M){if(x&&E===void 0?(w=x.id,b=x.position):E!==void 0?w=_t(r,E):l.length>0&&r.didContainersLayout&&!t&&(w=l.find(j=>z.get(j)!==void 0)),t&&l.length>0&&r.didContainersLayout)for(let j=0;j<l.length;j++){const U=l[j],B=z.get(U);if(B!==void 0){const Z=o[B];Z!==void 0&&C.push({id:U,position:Z})}}if(w!==void 0&&b===void 0){const j=z.get(w);j!==void 0&&(b=o[j])}return()=>{let j=0,U=x==null?void 0:x.id,B,Z=!1;const D=r.props.data;if(t&&u&&E===void 0&&w!==void 0&&(x==null?void 0:x.id)===w&&d!==void 0&&w!==void 0){const oe=z.get(w);if(oe!==void 0){const ne=D[oe];Z=ne===void 0||!d(ne,oe,D),Z&&(x==null?void 0:x.id)===w&&(r.mvcpAnchorLock=void 0)}}if(t&&u&&E===void 0&&(()=>{if(w===void 0||Z)return!0;const oe=z.get(w);return oe===void 0||o[oe]===void 0})())for(let oe=0;oe<C.length;oe++){const{id:ne,position:J}=C[oe],I=z.get(ne);if(I!==void 0&&d){const G=D[I];if(G===void 0||!d(G,I,D))continue}const Y=I!==void 0?o[I]:void 0;if(Y!==void 0){j=Y-J,U=ne,B=Y;break}}if(!Z&&w!==void 0&&b!==void 0){const oe=z.get(w),ne=oe!==void 0?o[oe]:void 0;if(ne!==void 0){const J=sr(e);let I=ne-b;I!==0&&_&&r.scroll+r.scrollLength>J&&(I>0?I=Math.max(0,J-r.scroll-r.scrollLength):I=0),j=I,U=w,B=ne}}if(A&&A>0){const oe=Gn(e,w,E,r.props.data[E]),ne=p==null?void 0:p.itemSize;if(oe!==void 0&&ne!==void 0&&oe!==ne){const J=oe-ne;J!==0&&(j+=J*A,p.itemSize=oe)}}if(WM(r,{anchorId:U,anchorPosition:B,dataChanged:t,now:m,positionDiff:j}),JM()){r.pendingNativeMVCPAdjust={amount:j,furthestProgressTowardAmount:0,manualApplied:0,startScroll:P},nN(e);return}Math.abs(j)>gn&&nh(e,j)}}}function lN(e,t,r){var l;const o=e.state,s=Ae(e,"numColumns");let u=t;o.columns[t]!==1&&(u=kx(o,s,t));let d=0;const m=o.columns[u];if(u>0){const g=u-1,p=(l=o.positions[g])!=null?l:0,x=kx(o,s,g),b=oN(e,x,g,r);d=p+b}return{column:m,currentRowTop:d,startIndex:u}}function kx(e,t,r){if(t<=1)return Math.max(0,r);let l=Math.max(0,r);for(;l>0&&e.columns[l]!==1;)l--;return l}function oN(e,t,r,l){const o=e.state;if(r<t)return 0;const{data:s}=o.props;if(!s)return 0;let u=0;for(let f=t;f<=r;f++){if(f<0||f>=s.length)continue;const d=o.idCache[f],m=Gn(e,d,f,s[f],l);m>u&&(u=m)}return u}function aN(e){var t,r;const l=e.state,{positions:o,props:{data:s}}=l,u=(t=Ae(e,"numColumns"))!=null?t:1;if(s.length===0)Ka(e,null,0);else{const f=s.length-1,d=_t(l,f),m=o[f];if(d!==void 0&&m!==void 0)if(u>1){let g=f;for(;g>0;){const x=l.columns[g];if(x===1||x===void 0)break;g-=1}let p=0;for(let x=g;x<=f;x++){const b=(r=l.idCache[x])!=null?r:_t(l,x),w=Gn(e,b,x,s[x]);w>p&&(p=w)}Ka(e,null,m+p)}else{const g=Gn(e,d,f,s[f]);if(g!==void 0){const p=m+g;Ka(e,null,p)}}}}var rh=e=>{const{scrollHistory:t}=e,r=t.length-1;if(r<1)return 0;const l=t[r],o=Date.now();let s=0;for(let m=r;m>0;m--){const g=t[m].scroll-t[m-1].scroll;if(g!==0){s=Math.sign(g);break}}if(s===0)return 0;let u=l;for(let m=r-1;m>=0;m--){const g=t[m],x=t[m+1].scroll-g.scroll,b=Math.sign(x);if(b!==0&&b!==s||o-g.time>1e3)break;u=g}const f=l.scroll-u.scroll,d=l.time-u.time;return d>0?f/d:0};function V1(e){const t=e.state,{props:{snapToIndices:r}}=t,l=Array(r.length);for(let o=0;o<r.length;o++){const s=r[o];_t(t,s),l[o]=t.positions[s]}Ne(e,"snapToOffsets",l)}function q1(e,t,{startIndex:r,scrollBottomBuffered:l,forceFullUpdate:o=!1,doMVCP:s}={doMVCP:!1,forceFullUpdate:!1,scrollBottomBuffered:-1,startIndex:0}){var u,f,d,m,g;const p=e.state,x=e.positionListeners.size>0,{columns:b,columnSpans:w,indexByKey:C,positions:E,idCache:A,sizesKnown:_,props:{data:M,getEstimatedItemSize:z,overrideItemLayout:P,snapToIndices:j},scrollingTo:U}=p,B=M.length,Z=(u=Ae(e,"numColumns"))!=null?u:1,D=Z>1,X=_n?new Map:void 0,W=Ae(e,"extraData"),oe=P?{span:1}:void 0,ne=p.lastScrollDelta,J=rh(p),I=!o&&!t&&(Math.abs(J)>0||p.scrollLength>0&&ne>p.scrollLength),Y=l+1e3,G=!z,V=!s||t||p.scrollAdjustHandler.getAdjust()!==0||((f=Ae(e,"scrollAdjustPending"))!=null?f:0)!==0;let T=0,O=1,H=0;if(t&&(w.length=0),D||(b.length&&(b.length=0),w.length&&(w.length=0)),r>0){if(D){const{startIndex:re,currentRowTop:he}=lN(e,r,G);r=re,T=he}else if(r<B){const re=r-1,he=_t(p,re),ce=(d=E[re])!=null?d:0,ge=(m=_.get(he))!=null?m:Gn(e,he,re,M[re],G,V);T=ce+ge}}const R=t||C.size===0,ue=D&&!!P&&!!oe;let fe=!1,se;for(let re=r;re<B;re++){if(I&&se!==void 0&&re>se){fe=!0;break}I&&se===void 0&&!U&&!t&&T>Y&&(se=re+(D?Z:1)+10);const he=(g=A[re])!=null?g:_t(p,re);let ce=1;if(ue){oe.span=1,P(oe,M[re],re,Z,W);const ke=oe.span;ke!==void 0&&Number.isFinite(ke)&&(ce=Math.max(1,Math.min(Z,Math.round(ke))))}D&&O+ce-1>Z&&(T+=H,O=1,H=0);const ge=_.get(he),Ce=ge!==void 0?ge:Gn(e,he,re,M[re],G,V);_n&&R&&(X.has(he)&&console.error(`[legend-list] Error: Detected overlapping key (${he}) which causes missing items and gaps and other terrrible things. Check that keyExtractor returns unique values.`),X.set(he,re)),T!==E[re]&&(E[re]=T,x&&A_(e,he,T)),R&&C.set(he,re),D?(b[re]=O,w[re]=ce,Ce>H&&(H=Ce),O+=ce,O>Z&&(T+=H,O=1,H=0)):T+=Ce}fe||aN(e),j&&V1(e)}function G1(e,t){let r=e.mapViewabilityConfigStates;r||(r=new Map,e.mapViewabilityConfigStates=r);let l=r.get(t);return l||(l={end:-1,previousEnd:-1,previousStart:-1,start:-1,viewableItems:[]},r.set(t,l)),l}function sN(e){let{viewabilityConfig:t,viewabilityConfigCallbackPairs:r,onViewableItemsChanged:l}=e;return(t||l)&&(r=[...r||[],{onViewableItemsChanged:l,viewabilityConfig:t||{viewAreaCoveragePercentThreshold:0}}]),r}function uN(e,t,r,l,o,s){const{timeouts:u,props:{data:f}}=e;for(const d of r){const m=G1(t,d.viewabilityConfig.id);if(m.start=o,m.end=s,d.viewabilityConfig.minimumViewTime){const g=setTimeout(()=>{u.delete(g),Ex(f,d,e,t,l)},d.viewabilityConfig.minimumViewTime);u.add(g)}else Ex(f,d,e,t,l)}}function Ex(e,t,r,l,o){const{viewabilityConfig:s,onViewableItemsChanged:u}=t,f=s.id,d=G1(l,f),{viewableItems:m,start:g,end:p}=d,x=new Map;for(const[C,E]of l.mapViewabilityAmountValues)x.set(C,Y1(r,l,s,C,E.key,o,E.item,E.index));const b=[];if(m)for(const C of m){const E=ip(l,C.key);Tx(r,l,s,E,C.key,o,C.item,C.index)||(C.isViewable=!1,b.push(C))}const w=[];for(let C=g;C<=p;C++){const E=e[C];if(E){const A=_t(r,C),_=ip(l,A);if(Tx(r,l,s,_,A,o,E,C)){const M={containerId:_,index:C,isViewable:!0,item:E,key:A};w.push(M),m!=null&&m.find(z=>z.key===M.key)||b.push(M)}}}if(Object.assign(d,{previousEnd:p,previousStart:g,viewableItems:w}),b.length>0){d.viewableItems=w;for(let C=0;C<b.length;C++){const E=b[C];cN(l,f,E.containerId,E)}u&&u({changed:b,viewableItems:w})}for(const[C,E]of l.mapViewabilityAmountValues)E.sizeVisible<0&&l.mapViewabilityAmountValues.delete(C)}function Ax(e,t){if(!e)return!1;const r=Object.keys(t);for(let l=0;l<r.length;l++){const o=r[l];if(e[o]!==t[o])return!1}return!0}function Y1(e,t,r,l,o,s,u,f){const{sizes:d,scroll:m}=e,g=(Ae(t,"stylePaddingTop")||0)+(Ae(t,"headerSize")||0),{itemVisiblePercentThreshold:p,viewAreaCoveragePercentThreshold:x}=r,b=x!=null,w=b?x:p,C=m-g,E=e.positions[f],A=d.get(o)||0;if(E===void 0){const W={containerId:l,index:f,isViewable:!1,item:u,key:o,percentOfScroller:0,percentVisible:0,scrollSize:s,size:A,sizeVisible:-1},oe=t.mapViewabilityAmountValues.get(l);if(!Ax(oe,W)){t.mapViewabilityAmountValues.set(l,W);const ne=t.mapViewabilityAmountCallbacks.get(l);ne&&ne(W)}return W}const _=E-C,M=_+A,z=_>=0&&M<=s&&M>_,P=z?A:Math.min(M,s)-Math.max(_,0),j=A?z?100:100*(P/A):0,U=A?100*(P/s):0,Z=(z?100:b?U:j)>=w,D={containerId:l,index:f,isViewable:Z,item:u,key:o,percentOfScroller:U,percentVisible:j,scrollSize:s,size:A,sizeVisible:P},X=t.mapViewabilityAmountValues.get(l);if(!Ax(X,D)){t.mapViewabilityAmountValues.set(l,D);const W=t.mapViewabilityAmountCallbacks.get(l);W&&W(D)}return D}function Tx(e,t,r,l,o,s,u,f){let d=t.mapViewabilityAmountValues.get(l);return(!d||d.key!==o)&&(d=Y1(e,t,r,l,o,s,u,f)),d.isViewable}function cN(e,t,r,l){const o=r+t;e.mapViewabilityValues.set(o,l);const s=e.mapViewabilityCallbacks.get(o);s==null||s(l)}var _x=Tl.unstable_batchedUpdates,fN=typeof _x=="function"?_x:e=>e();function dN(e,t,r,l,o,s,u){const f=Ae(e,"numContainers"),d=e.state,{stickyContainerPool:m,containerItemTypes:g}=d,p=[],x=[],b=new Set(o);let w=!1;const C=d.props.stickyIndicesSet,E=(u==null?void 0:u.filter(P=>C.has(P)))||[],A=(P,j)=>{if(!j)return!0;const U=g.get(P);return U?U===j:!0},_=s?[...s]:[];let M=0;for(let P=0;P<E.length;P++){const j=_[M];let U=!1;for(const B of m){const Z=Ae(e,`containerItemKey${B}`),D=b.has(B);if((Z===void 0||D)&&A(B,j)&&!p.includes(B)){p.push(B),D&&b.delete(B)&&(w=!0),U=!0,s&&M++;break}}if(!U){const B=f+p.filter(Z=>Z>=f).length;p.push(B),m.add(B),s&&M++}}for(let P=0;P<f&&p.length<t;P++){if(m.has(P))continue;const j=Ae(e,`containerItemKey${P}`),U=_[M],B=j!==void 0&&b.has(P);(j===void 0||B&&A(P,U))&&(B&&(b.delete(P),w=!0),p.push(P),s&&M++)}for(let P=0;P<f&&p.length<t;P++){if(m.has(P))continue;const j=Ae(e,`containerItemKey${P}`);if(j===void 0)continue;const U=d.indexByKey.get(j);if(U<r||U>l){const Z=U<r?r-U:U-l;(!s||M<_.length&&A(P,_[M]))&&x.push({distance:Z,index:P})}}const z=t-p.length;if(z>0){if(x.length>0){x.length>z&&(x.sort(mN),x.length=z);for(const j of x)p.push(j.index),s&&M++}const P=t-p.length;if(P>0){for(let j=0;j<P;j++)p.push(f+j);_n&&f+P>Ae(e,"numContainersPooled")&&console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize or increasing initialContainerPoolRatio.",{debugInfo:{numContainers:f,numContainersPooled:Ae(e,"numContainersPooled"),numNeeded:t,stillNeeded:P}})}}if(w){o.length=0;for(const P of b)o.push(P)}return p.sort(O_)}function mN(e,t){return t.distance-e.distance}function pN(e){const t=e.state;t.queuedInitialLayout=!0,j1(e),Zp(e,{didLayout:!0})}function hN(e,t,r){const l=r.positions;for(let o=e.length-1;o>=0;o--){const s=e[o],u=l[s];if(u!==void 0&&t>=u)return o}return-1}function gN(e,t){const r=e.state;return new Set(Array.from(r.stickyContainerPool).map(l=>Ae(e,`containerItemKey${l}`)).map(l=>l?r.indexByKey.get(l):void 0).filter(l=>l!==void 0&&t.has(l)))}function yN(e,t,r,l,o,s,u,f){var d;const m=e.state,g=gN(e,t);Ne(e,"activeStickyIndex",l>=0?r[l]:-1);for(let p=0;p<=1;p++){const x=l-p;if(x<0||g.has(r[x]))continue;const b=r[x],w=(d=m.idCache[b])!=null?d:_t(m,b);w&&!m.containerItemKeys.has(w)&&(b<u||b>f)&&!s.has(b)&&(s.add(b),o.push(b))}}function vN(e,t,r,l,o,s,u){var f,d;const m=e.state;for(const g of m.stickyContainerPool){const p=Ae(e,`containerItemKey${g}`),x=p?m.indexByKey.get(p):void 0;if(x===void 0||u.has(x))continue;const b=t.indexOf(x);if(b===-1){m.stickyContainerPool.delete(g),Ne(e,`containerSticky${g}`,!1);continue}if(b>=o-1&&b<=o+1)continue;const C=t[b+1];let E=!1;if(C){const A=m.positions[C];E=A!==void 0&&r>A+l*2}else{const A=(f=m.idCache[x])!=null?f:_t(m,x);if(A){const _=m.positions[x],M=(d=m.sizes.get(A))!=null?d:Gn(e,A,x,m.props.data[x]);E=_!==void 0&&r>_+M+l*3}}E&&s.push(g)}}function Fi(e,t={}){const r=e.state;fN(()=>{var l,o,s,u,f,d,m,g,p,x,b,w,C,E;const{columns:A,columnSpans:_,containerItemKeys:M,enableScrollForNextCalculateItemsInView:z,idCache:P,indexByKey:j,minIndexSizeChanged:U,positions:B,props:{alwaysRenderIndicesArr:Z,alwaysRenderIndicesSet:D,drawDistance:X,getItemType:W,itemsAreEqual:oe,keyExtractor:ne,onStickyHeaderChange:J},scrollForNextCalculateItemsInView:I,scrollLength:Y,sizes:G,startBufferedId:V,viewabilityConfigCallbackPairs:T}=r,{data:O}=r.props,H=r.props.stickyIndicesArr||[],R=r.props.stickyIndicesSet||new Set,ue=Z||[],fe=D||new Set,{dataChanged:se,doMVCP:re,forceFullItemPositions:he}=t,ce=((l=r.initialScrollSession)==null?void 0:l.kind)==="bootstrap"?r.initialScrollSession.bootstrap:void 0,ge=!!ce,Ce=Ae(e,"numContainers");if(!O||Y===0||!Ce)return;let ke=sr(e);const We=Ae(e,"stylePaddingTop")+Ae(e,"headerSize"),$e=Ae(e,"numColumns"),bt=rh(r),Kt=0,{queuedInitialLayout:en}=r,Nn=ge?(o=ce==null?void 0:ce.scroll)!=null?o:r.scroll:!en&&r.initialScroll?ti(e,r.initialScroll):r.scroll,Qt=(s=Ae(e,"scrollAdjustPending"))!=null?s:0,Rn=Qt-We;let Nt=Math.round(Nn+Kt+Rn);Nt+Y>ke&&(Nt=Math.max(0,ke-Y));const je=Ae(e,"activeStickyIndex"),at=H.length>0?hN(H,Nt,r):-1,De=at>=0?H[at]:-1;(at>=0||je>=0)&&Ne(e,"activeStickyIndex",De);let gt=X,te=X;bt>0||bt===0&&Nt<Math.max(50,X)?(gt=X*.5,te=X*1.5):(gt=X*1.5,te=X*.5);const de=Nt-gt,Ee=Nt+Y+(Nt<0?-Nt:0),ze=Ee+te;if(!ge&&!se&&!he&&I){const{top:pe,bottom:it}=I;if(pe===null&&it===null)r.scrollForNextCalculateItemsInView=void 0;else if((pe===null||de>pe)&&(it===null||ze<it)&&!Wa(r))return}const Xe=re&&!ge?iN(e,se):void 0;se&&(j.clear(),P.length=0,B.length=0,A.length=0,_.length=0);const Zt=he||se?0:(u=U??r.startBuffered)!=null?u:0;q1(e,se,{doMVCP:re,forceFullUpdate:!!he,scrollBottomBuffered:ze,startIndex:Zt}),ke=sr(e),U!==void 0&&(r.minIndexSizeChanged=void 0),Xe==null||Xe();let Ut=null,St=null,Et=null,Mt=null,qe=null,tn=(f=ge?ce==null?void 0:ce.targetIndexSeed:void 0)!=null?f:!se&&V&&j.get(V)||0;for(let pe=tn;pe>=0;pe--){const it=(d=P[pe])!=null?d:_t(r,pe),Le=B[pe],He=(m=G.get(it))!=null?m:Gn(e,it,pe,O[pe]);if(Le+He>Nt-gt)tn=pe;else break}if($e>1)for(;tn>0;){const pe=A[tn];if(pe===1||pe===void 0)break;tn-=1}let un=!1,si,Yn,bn=0;for(let pe=0;pe<Ce;pe++){const it=Ae(e,`containerItemKey${pe}`);if(it!==void 0){const Le=j.get(it);bn=Math.max(bn,Le)}}let Kn;const nn=O.length;for(let pe=Math.max(0,tn);pe<nn&&(!un||pe<=bn);pe++){const it=(g=P[pe])!=null?g:_t(r,pe),Le=(p=G.get(it))!=null?p:Gn(e,it,pe,O[pe]),He=B[pe];un||(Ut===null&&He+Le>Nt&&(Ut=pe),Kn===void 0&&He>=Nt-10&&He<=Ee&&(Kn=pe),St===null&&He+Le>de&&(St=pe,Et=it,de<0?si=null:si=He),Ut!==null&&(He<=Ee&&(Mt=pe),He<=ze?(qe=pe,ze>ke?Yn=null:Yn=He+Le):un=!0))}const cr=[],rn=Kn??Ut;if(rn!=null&&Mt!==null)for(let pe=rn;pe<=Mt;pe++){const it=(x=P[pe])!=null?x:_t(r,pe);cr.push(it)}Object.assign(r,{endBuffered:qe,endNoBuffer:Mt,firstFullyOnScreenIndex:Kn,idsInView:cr,startBuffered:St,startBufferedId:Et,startNoBuffer:Ut}),z&&si!==void 0&&Yn!==void 0&&(r.scrollForNextCalculateItemsInView=Za(si)&&Za(Yn)?void 0:{bottom:Yn,top:si});let Ft=Ce;const zr=[];if(se)for(let pe=0;pe<Ft;pe++){const it=Ae(e,`containerItemKey${pe}`);(!ne||it&&j.get(it)===void 0)&&zr.push(pe)}if(St!==null&&qe!==null){const pe=[],it=new Set;for(let Le=St;Le<=qe;Le++){const He=(b=P[Le])!=null?b:_t(r,Le);M.has(He)||(it.add(Le),pe.push(Le))}if(ue.length>0)for(const Le of ue){if(Le<0||Le>=nn)continue;const He=(w=P[Le])!=null?w:_t(r,Le);He&&!M.has(He)&&!it.has(Le)&&(it.add(Le),pe.push(Le))}if(H.length>0?yN(e,R,H,at,pe,it,St,qe):je!==-1&&Ne(e,"activeStickyIndex",-1),pe.length>0){const Le=W?pe.map(It=>{const Wt=W(O[It],It);return Wt!==void 0?String(Wt):""}):void 0,He=dN(e,pe.length,St,qe,zr,Le,pe);for(let It=0;It<pe.length;It++){const Wt=pe[It],Rt=He[It],Oe=(C=P[Wt])!=null?C:_t(r,Wt),$n=Ae(e,`containerItemKey${Rt}`);$n&&$n!==Oe&&M.delete($n),Ne(e,`containerItemKey${Rt}`,Oe),Ne(e,`containerItemData${Rt}`,O[Wt]),Le&&r.containerItemTypes.set(Rt,Le[It]),M.set(Oe,Rt);const cn=`containerSticky${Rt}`,wt=R.has(Wt),ft=fe.has(Wt);wt?(Ne(e,cn,!0),r.stickyContainerPool.add(Rt)):(Ae(e,cn)&&Ne(e,cn,!1),ft?r.stickyContainerPool.add(Rt):r.stickyContainerPool.has(Rt)&&r.stickyContainerPool.delete(Rt)),Rt>=Ft&&(Ft=Rt+1)}Ft!==Ce&&(Ne(e,"numContainers",Ft),Ft>Ae(e,"numContainersPooled")&&Ne(e,"numContainersPooled",Math.ceil(Ft*1.5)))}if(ue.length>0)for(const Le of ue){if(Le<0||Le>=nn)continue;const He=(E=P[Le])!=null?E:_t(r,Le),It=M.get(He);It!==void 0&&r.stickyContainerPool.add(It)}}r.stickyContainerPool.size>0&&vN(e,H,Nt,X,at,zr,fe);let wr=!1;for(let pe=0;pe<Ft;pe++){const it=Ae(e,`containerItemKey${pe}`);if(zr.includes(pe))it!==void 0&&M.delete(it),r.containerItemTypes.delete(pe),r.stickyContainerPool.has(pe)&&(Ne(e,`containerSticky${pe}`,!1),r.stickyContainerPool.delete(pe)),Ne(e,`containerItemKey${pe}`,void 0),Ne(e,`containerItemData${pe}`,void 0),Ne(e,`containerPosition${pe}`,ko),Ne(e,`containerColumn${pe}`,-1),Ne(e,`containerSpan${pe}`,1);else{const Le=j.get(it),He=O[Le];if(He!==void 0){const It=B[Le];if(It===void 0)Ne(e,`containerPosition${pe}`,ko);else{const Wt=(It||0)-Qt,Rt=A[Le]||1,Oe=_[Le]||1,$n=Ae(e,`containerPosition${pe}`),cn=Ae(e,`containerColumn${pe}`),wt=Ae(e,`containerSpan${pe}`),ft=Ae(e,`containerItemData${pe}`);Wt>ko&&Wt!==$n&&(Ne(e,`containerPosition${pe}`,Wt),wr=!0),Rt>=0&&Rt!==cn&&Ne(e,`containerColumn${pe}`,Rt),Oe!==wt&&Ne(e,`containerSpan${pe}`,Oe),ft!==He&&(!oe||!oe(ft,He,Le,O))&&Ne(e,`containerItemData${pe}`,He)}}}}if(wr&&Ne(e,"lastPositionUpdate",Date.now()),ge){zM(e);return}if(!en&&qe!==null&&Wp(r)&&(pN(e),GM(e)),T&&Ut!==null&&Mt!==null&&uN(e.state,e,T,Y,Ut,Mt),J&&H.length>0&&De!==void 0&&De!==je){const pe=O[De];pe!==void 0&&J({index:De,item:pe})}})}function xN(e,t,r){if(!r||!t||t.length!==r.length)return!0;const{idCache:l,props:{keyExtractor:o}}=e;for(let s=0;s<t.length;s++)if(t[s]!==r[s]||(o?l[s]!==o(r[s],s):t[s]!==r[s]))return!0;return!1}function Oc(e){const t=e.state,{didContainersLayout:r,isAtEnd:l,pendingNativeMVCPAdjust:o,refScroller:s,props:{maintainScrollAtEnd:u}}=t,f=!!(l&&u&&r);return o?(t.pendingMaintainScrollAtEnd=f,!1):(t.pendingMaintainScrollAtEnd=!1,f?(sr(e)<t.scrollLength&&(t.scroll=0),requestAnimationFrame(()=>{var m;t.isAtEnd&&(t.maintainingScrollAtEnd=!0,(m=s.current)==null||m.scrollToEnd({animated:u.animated}),setTimeout(()=>{t.maintainingScrollAtEnd=!1},u.animated?500:0))}),!0):!1)}function bN(e,t,r){var l;const{averageSizes:o,sizesKnown:s,indexByKey:u,props:{itemsAreEqual:f,getItemType:d,keyExtractor:m}}=e;if(!f||!t.length||!r.length){for(const b in o)delete o[b];return}const g={},p=r.length,x=t.length;for(let b=0;b<p;b++){const w=r[b],C=m?m(w,b):String(b),E=u.get(C);if(E!==void 0&&E<x){const A=s.get(C);if(A===void 0)continue;const _=t[E];if(f(_,w,b,r)){const z=d&&(l=d(w,b))!=null?l:"";let P=g[z];P||(P=g[z]={count:0,totalSize:0}),P.totalSize+=A,P.count++}}}for(const b in o)delete o[b];for(const b in g){const{totalSize:w,count:C}=g[b];C>0&&(o[b]={avg:w/C,num:C})}}function SN(e,t){const r=e.state,{previousData:l}=r;l&&bN(r,l,t);const{maintainScrollAtEnd:o}=r.props;Fi(e,{dataChanged:!0,doMVCP:!0});const u=(o==null?void 0:o.onDataChange)&&Oc(e);!u&&l&&t.length>l.length&&(r.isEndReached=!1),u||Nc(e),delete r.previousData}function K1(e){var t,r,l;const o=e.state,{scrollLength:s,props:{data:u,drawDistance:f,getEstimatedItemSize:d,getFixedItemSize:m,getItemType:g,numColumns:p,estimatedItemSize:x}}=o,b=Ae(e,"numContainers");if(s>0&&u.length>0&&!b){let w;if(m||d){let E=0;const A=Math.min(20,u.length);for(let _=0;_<A;_++){const M=u[_];if(M!==void 0){const z=(t=g==null?void 0:g(M,_))!=null?t:"";E+=(l=(r=m==null?void 0:m(M,_,z))!=null?r:d==null?void 0:d(M,_,z))!=null?l:x}}w=E/A}else w=x;const C=Math.ceil((s+f*2)/w*p);for(let E=0;E<C;E++)Ne(e,`containerPosition${E}`,ko),Ne(e,`containerColumn${E}`,-1),Ne(e,`containerSpan${E}`,1);return Ne(e,"numContainers",C),Ne(e,"numContainersPooled",C*o.props.initialContainerPoolRatio),o.lastLayout&&(o.initialScroll?requestAnimationFrame(()=>{Fi(e,{dataChanged:!0,doMVCP:!0})}):Fi(e,{dataChanged:!0,doMVCP:!0})),!0}}function wN(){return typeof window>"u"?{height:0,width:0}:{height:window.innerHeight,width:window.innerWidth}}function CN(e,t,r){const l=e.state,{maintainScrollAtEnd:o,useWindowScroll:s}=l.props,u=l.props.horizontal?"width":"height",f=l.props.horizontal?"height":"width";let d=t;if(s){const E=wN()[u];d=E>0?{...t,[u]:E}:t}const m=d[u],g=l.scrollLength,p=m>0?m:g,x=d[f],b=!l.lastLayout||p>l.scrollLength||l.lastLayout.x!==d.x||l.lastLayout.y!==d.y;l.lastLayout=d;const w=l.otherAxisSize,C=p!==l.scrollLength||x!==w;C&&(l.scrollLength=p,l.otherAxisSize=x,l.lastBatchingAction=Date.now(),l.scrollForNextCalculateItemsInView=void 0,p>0&&K1(e),b&&Fi(e,{doMVCP:!0}),(C||x!==w)&&Ne(e,"scrollSize",{height:d.height,width:d.width}),o!=null&&o.onLayout&&Oc(e),Nc(e),l&&(l.needsOtherAxisSize=x-(l.props.stylePaddingTop||0)<10),_n&&m===0&&Wu("height0",`List ${l.props.horizontal?"width":"height"} is 0. You may need to set a style or \`flex: \` for the list, because children are absolutely positioned.`)),r(!0)}function ih(e,t,r){var l;const o=e.state,{ignoreScrollFromMVCP:s,lastScrollAdjustForHistory:u,scrollAdjustHandler:f,scrollHistory:d,scrollingTo:m}=o,g=o.scroll;o.hasScrolled=!0,o.lastBatchingAction=Date.now();const p=Date.now(),x=f.getAdjust(),b=u!==void 0&&Math.abs(x-u)>.1;if(b&&(d.length=0),o.lastScrollAdjustForHistory=x,m===void 0&&!(d.length===0&&t===o.scroll)&&(b||d.push({scroll:t,time:p})),d.length>5&&d.shift(),s&&!m){const{lt:z,gt:P}=s;if(z&&t<z||P&&t>P){o.ignoreScrollFromMVCPIgnored=!0;return}}o.scrollPrev=g,o.scrollPrevTime=o.scrollTime,o.scroll=t,o.scrollTime=p;const w=Math.abs(t-g),C=rN(e,t),E=o.scrollLength,A=o.scrollLastCalculate;if(Wa(o)||C||r||A===void 0||Math.abs(o.scroll-A)>2){o.scrollLastCalculate=o.scroll,o.ignoreScrollFromMVCPIgnored=!1,o.lastScrollDelta=w;const z=()=>{var j;(j=o.triggerCalculateItemsInView)==null||j.call(o,{doMVCP:m!==void 0}),Nc(e)};E>0&&m===void 0&&w>E?Tl.flushSync(z):z();const P=!!o.pendingMaintainScrollAtEnd||!!((l=o.props.maintainScrollAtEnd)!=null&&l.onDataChange);C&&P&&(o.pendingMaintainScrollAtEnd=!1,Oc(e)),o.dataChangeNeedsScrollUpdate=!1,o.lastScrollDelta=0}}function kN(e,t){const r=yn.get(e);if(!!r&&yn.didObserveProgress(t,r)){yn.clear(e);return}r&&(e.hasScrolled=!1,yn.set(e,{startScroll:r.startScroll,targetOffset:r.targetOffset}))}function EN(e){var t;return!!e.initialScroll&&((t=e.initialScrollSession)==null?void 0:t.kind)==="bootstrap"&&!e.didFinishInitialScroll}function AN(e){return{...e,nativeEvent:{...e.nativeEvent}}}function TN(e,t){var r,l,o,s;const u=e.state,{scrollProcessingEnabled:f}=u;if(f===!1||((l=(r=t.nativeEvent)==null?void 0:r.contentSize)==null?void 0:l.height)===0&&((o=t.nativeEvent.contentSize)==null?void 0:o.width)===0)return;let d=!1;if((s=t.nativeEvent)!=null&&s.contentInset){const{contentInset:g}=t.nativeEvent,p=u.nativeContentInset;(!p||p.top!==g.top||p.bottom!==g.bottom||p.left!==g.left||p.right!==g.right)&&(u.nativeContentInset=g,d=!0)}let m=t.nativeEvent.contentOffset[u.props.horizontal?"x":"y"];if(u.scrollingTo&&u.scrollingTo.offset>=m){const g=Sl(e,m,u.scrollingTo);if(m!==g&&Math.abs(m-g)>1){m=g,Mc(e,{forceScroll:!0,isInitialScroll:!0,noScrollingTo:!0,offset:m});return}}u.scrollPending=m,ih(e,m,d),kN(u,m),u.scrollingTo&&eh(e),u.props.onScroll&&(EN(u)?u.deferredPublicOnScrollEvent=AN(t):u.props.onScroll(t))}var _N=class{constructor(e){this.appliedAdjust=0,this.pendingAdjust=0,this.ctx=e}requestAdjust(e){const t=this.ctx.state.scrollingTo;t!=null&&t.animated&&!t.isInitialScroll?(this.pendingAdjust+=e,Ne(this.ctx,"scrollAdjustPending",this.pendingAdjust)):(this.appliedAdjust+=e,Ne(this.ctx,"scrollAdjust",this.appliedAdjust)),this.ctx.state.scrollingTo&&eh(this.ctx)}getAdjust(){return this.appliedAdjust}commitPendingAdjust(e){{const t=this.ctx.state,r=this.pendingAdjust;if(this.pendingAdjust=0,r!==0){let l;if((e==null?void 0:e.index)!==void 0){const s=$p(this.ctx,e.index);l=Xp(this.ctx,s,e),l=Sl(this.ctx,l,e)}else l=Sl(this.ctx,t.scroll+r);const o=l-t.scroll;(Math.abs(o)>.1||Math.abs(r)>.1)&&(this.appliedAdjust+=o,t.scroll=l,t.scrollForNextCalculateItemsInView=void 0,Ne(this.ctx,"scrollAdjust",this.appliedAdjust)),Ne(this.ctx,"scrollAdjustPending",0),Fi(this.ctx)}}}};function MN(e){const t=e.state;{if(!t.mvcpAnchorLock){t.queuedMVCPRecalculate!==void 0&&(cancelAnimationFrame(t.queuedMVCPRecalculate),t.queuedMVCPRecalculate=void 0),Fi(e,{doMVCP:!0});return}if(t.queuedMVCPRecalculate!==void 0)return;t.queuedMVCPRecalculate=requestAnimationFrame(()=>{t.queuedMVCPRecalculate=void 0,Fi(e,{doMVCP:!0})})}}function NN(e,t,r){var l;const o=e.state,{didContainersLayout:s,sizesKnown:u,props:{getFixedItemSize:f,getItemType:d,horizontal:m,suggestEstimatedItemSize:g,onItemSizeChanged:p,data:x,maintainScrollAtEnd:b}}=o;if(!x)return;const w=o.indexByKey.get(t);if(f){if(w===void 0)return;const U=o.props.data[w];if(U===void 0)return;const B=d&&(l=d(U,w))!=null?l:"",Z=f(U,w,B);if(Z!==void 0&&Z===u.get(t))return}let C=!s,E=!1,A,_=Ae(e,"otherAxisSize")||0;const M=o.sizesKnown.get(t),z=RN(e,t,r),P=lc(m?r.width:r.height);if(z!==0){A=A!==void 0?Math.min(A,w):w;const{startBuffered:U,endBuffered:B}=o;if(C||(C=w>=U&&w<=B),!C&&o.containerItemKeys.has(t)&&(C=!0),o.needsOtherAxisSize){const Z=m?r.height:r.width;_=Math.max(_,Z)}M!==void 0&&Math.abs(M-P)>5&&(E=!0),p==null||p({index:w,itemData:o.props.data[w],itemKey:t,previous:P-z,size:P})}A!==void 0&&(o.minIndexSizeChanged=o.minIndexSizeChanged!==void 0?Math.min(o.minIndexSizeChanged,A):A),_n&&g&&A!==void 0&&(o.timeoutSizeMessage&&clearTimeout(o.timeoutSizeMessage),o.timeoutSizeMessage=setTimeout(()=>{var U;o.timeoutSizeMessage=void 0;const B=o.sizesKnown.size,Z=(U=o.averageSizes[""])==null?void 0:U.avg;console.warn(`[legend-list] Based on the ${B} items rendered so far, the optimal estimated size is ${Z}.`)},1e3));const j=Ae(e,"otherAxisSize");(!j||_>j)&&Ne(e,"otherAxisSize",_),(s||Wp(o))&&(C&&(o.scrollForNextCalculateItemsInView=void 0,MN(e)),E&&b!=null&&b.onItemLayout&&Oc(e))}function RN(e,t,r){var l;const o=e.state,{indexByKey:s,sizesKnown:u,averageSizes:f,props:{data:d,horizontal:m,getEstimatedItemSize:g,getItemType:p,getFixedItemSize:x}}=o;if(!d)return 0;const b=s.get(t),w=Gn(e,t,b,d[b]),C=m?r.width:r.height,E=Math.round(C),A=u.get(t);if(u.set(t,E),!g&&!x&&E>0){const _=p&&(l=p(d[b],b))!=null?l:"";let M=f[_];M||(M=f[_]={avg:0,num:0}),M.num===0?(M.avg=E,M.num++):A!==void 0&&A>0?M.avg+=(E-A)/M.num:(M.avg=(M.avg*M.num+E)/(M.num+1),M.num++)}return!w||Math.abs(w-E)>.1?(M1(e,t,E),E-w):0}function ju(e){return S.useMemo(()=>e?(t,r,l)=>t!==void 0&&r!==void 0?e(t,r,l):void 0:void 0,[e])}var ON=(...e)=>S.useCallback(r=>{for(const l of e)l&&(Yp(l)?l(r):l.current=r)},e);function jN(e){return null}function zN(e,t,r,l){return l}function IN(e){const{gap:t,columnGap:r,rowGap:l}=e;if(t||r||l)return e.gap=void 0,e.columnGap=void 0,e.rowGap=void 0,{columnGap:r,gap:t,rowGap:l}}function DN(e){const t=e.state,r=800,l=2;let o=0;const s=()=>!!t.didDataChange||!!t.didColumnsChange||t.queuedMVCPRecalculate!==void 0||t.ignoreScrollFromMVCP!==void 0||T1(t),u=(p,x)=>{const b=Date.now();let w=0;const C=()=>{if(p!==o)return;s()?w=0:w+=1;const E=Date.now()-b>=r;if(w>=l||E){x();return}requestAnimationFrame(C)};requestAnimationFrame(C)},f=p=>new Promise(x=>{var b;const w=++o;(b=t.pendingScrollResolve)==null||b.call(t),t.pendingScrollResolve=x;const C=()=>{if(w!==o)return;(!p()||!t.scrollingTo)&&(t.pendingScrollResolve===x&&(t.pendingScrollResolve=void 0),x())};if(s()){u(w,C);return}C()}),d=p=>{if(t){const{index:x,...b}=p,{startNoBuffer:w,endNoBuffer:C}=t;if(x<w||x>C){const E=x<w?0:1;return Ou(e,{...b,index:x,viewPosition:E}),!0}}return!1},m=t.refScroller;return{clearCaches:p=>{var x,b;const w=(x=p==null?void 0:p.mode)!=null?x:"sizes";t.sizes.clear(),t.sizesKnown.clear();for(const C in t.averageSizes)delete t.averageSizes[C];t.minIndexSizeChanged=0,t.scrollForNextCalculateItemsInView=void 0,t.pendingTotalSize=void 0,t.totalSize=0,Ne(e,"totalSize",0),w==="full"&&(t.indexByKey.clear(),t.idCache.length=0,t.positions.length=0,t.columns.length=0,t.columnSpans.length=0),(b=t.triggerCalculateItemsInView)==null||b.call(t,{forceFullItemPositions:!0})},flashScrollIndicators:()=>m.current.flashScrollIndicators(),getNativeScrollRef:()=>m.current,getScrollableNode:()=>m.current.getScrollableNode(),getScrollResponder:()=>m.current.getScrollResponder(),getState:()=>({activeStickyIndex:Ae(e,"activeStickyIndex"),contentLength:sr(e),data:t.props.data,elementAtIndex:p=>{var x;return(x=e.viewRefs.get(ip(e,_t(t,p))))==null?void 0:x.current},end:t.endNoBuffer,endBuffered:t.endBuffered,isAtEnd:t.isAtEnd,isAtStart:t.isAtStart,isEndReached:t.isEndReached,isStartReached:t.isStartReached,listen:(p,x)=>Mo(e,p,x),listenToPosition:(p,x)=>E_(e,p,x),positionAtIndex:p=>t.positions[p],positionByKey:p=>{const x=t.indexByKey.get(p);return x===void 0?void 0:t.positions[x]},scroll:t.scroll,scrollLength:t.scrollLength,scrollVelocity:rh(t),sizeAtIndex:p=>t.sizesKnown.get(_t(t,p)),sizes:t.sizesKnown,start:t.startNoBuffer,startBuffered:t.startBuffered}),reportContentInset:p=>{t.contentInsetOverride=p??void 0,ih(e,t.scroll,!0)},scrollIndexIntoView:p=>f(()=>d(p)),scrollItemIntoView:({item:p,...x})=>f(()=>{const w=t.props.data.indexOf(p);return w!==-1?(d({index:w,...x}),!0):!1}),scrollToEnd:p=>f(()=>{const x=t.props.data,b=t.props.stylePaddingBottom,w=x.length-1;if(w!==-1){const C=b||0,E=Ae(e,"footerSize")||0;return Ou(e,{...p,index:w,viewOffset:-C-E+((p==null?void 0:p.viewOffset)||0),viewPosition:1}),!0}return!1}),scrollToIndex:p=>f(()=>(Ou(e,p),!0)),scrollToItem:({item:p,...x})=>f(()=>{const w=t.props.data.indexOf(p);return w!==-1?(Ou(e,{index:w,...x}),!0):!1}),scrollToOffset:p=>f(()=>(Mc(e,p),!0)),setScrollProcessingEnabled:p=>{t.scrollProcessingEnabled=p},setVisibleContentAnchorOffset:p=>{const x=Yp(p)?p(Ae(e,"scrollAdjustUserOffset")||0):p;Ne(e,"scrollAdjustUserOffset",x)}}}var LN=(e,t)=>e-t,Mx=e=>typeof e=="number"&&Number.isFinite(e)?Math.max(0,Math.floor(e)):0,zu=(e,t,r)=>{r>=0&&r<t&&e.add(r)};function PN(e,t,r){var l,o;if(!e||t.length===0)return[];const s=new Set,u=t.length,f=Mx(e.top);if(f>0)for(let g=0;g<Math.min(f,u);g++)zu(s,u,g);const d=Mx(e.bottom);if(d>0)for(let g=Math.max(0,u-d);g<u;g++)zu(s,u,g);if((l=e.indices)!=null&&l.length)for(const g of e.indices)Number.isFinite(g)&&zu(s,u,Math.floor(g));if((o=e.keys)!=null&&o.length){const g=new Set(e.keys);for(let p=0;p<u&&g.size>0;p++){const x=r(t[p],p);g.has(x)&&(zu(s,u,p),g.delete(x))}}const m=Array.from(s);return m.sort(LN),m}function BN(e,t){var r;const l=e.state;if(!l)return null;const{indexByKey:o,props:{data:s,getItemType:u,renderItem:f}}=l,d=o.get(t);if(d===void 0)return null;let m=null;const g=Ae(e,"extraData"),p=s[d];if(f&&!Za(p)){const x={data:s,extraData:g,index:d,item:p,type:u&&(r=u(p,d))!=null?r:""};m=Yp(f)?f(x):Fn.createElement(f,x)}return{index:d,item:s[d],renderedItem:m}}function Nx(e,t){var r,l,o;return{animated:!1,onDataChange:t?(r=e==null?void 0:e.dataChange)!=null?r:!1:!0,onItemLayout:t?(l=e==null?void 0:e.itemLayout)!=null?l:!1:!0,onLayout:t?(o=e==null?void 0:e.layout)!=null?o:!1:!0}}function UN(e){var t;return e?e===!0?{...Nx(void 0,!1),animated:!1}:{...Nx(e.on,"on"in e),animated:(t=e.animated)!=null?t:!1}:void 0}function FN(e){var t,r;return e===!0?{data:!0,size:!0}:e&&typeof e=="object"?{data:(t=e.data)!=null?t:!1,shouldRestorePosition:e.shouldRestorePosition,size:(r=e.size)!=null?r:!0}:e===!1?{data:!1,size:!1}:{data:!1,size:!0}}function HN(e,{stylePaddingTop:t}){const r=e.state;if(t!==void 0){const l=Ae(e,"stylePaddingTop")||0;if(t<l){let o=Ae(e,"totalSize")||0;Ne(e,"totalSize",o+l),r.timeoutSetPaddingTop=setTimeout(()=>{o=Ae(e,"totalSize")||0,Ne(e,"totalSize",o-l)},16)}Ne(e,"stylePaddingTop",t)}}function VN(e){const t=S.useRef(null),r=S.useRef(0),l=S.useRef(null),o=()=>{t.current&&(clearTimeout(t.current),t.current=null)};return S.useCallback((u,f,...d)=>{{const m=Date.now();l.current=d,m-r.current>=f?(r.current=m,u(...d),o()):(o(),t.current=setTimeout(()=>{l.current&&(r.current=Date.now(),u(...l.current),t.current=null,l.current=null)},f-(m-r.current)))}},[e])}function qN(e,t){const r=VN("throttle");return l=>r(e,t,{nativeEvent:l.nativeEvent})}var GN=Ml(E1(function(t,r){const{children:l,data:o,renderItem:s,...u}=t,d=l!==void 0&&o===void 0?{...u,childrenMode:!0,data:(_c(l)?l:S.Children.toArray(l)).flat(1),renderItem:({item:m})=>m}:{...u,data:o||[],renderItem:s};return S.createElement(k_,null,S.createElement(YN,{...d,ref:r}))})),YN=E1(function(t,r){var l,o,s,u,f,d,m;const{alignItemsAtEnd:g=!1,alwaysRender:p,columnWrapperStyle:x,contentContainerStyle:b,contentInset:w,data:C=[],dataVersion:E,drawDistance:A=250,estimatedItemSize:_=100,estimatedListSize:M,extraData:z,getEstimatedItemSize:P,getFixedItemSize:j,getItemType:U,horizontal:B,initialContainerPoolRatio:Z=2,initialScrollAtEnd:D=!1,initialScrollIndex:X,initialScrollOffset:W,itemsAreEqual:oe,keyExtractor:ne,ListEmptyComponent:J,ListFooterComponent:I,ListFooterComponentStyle:Y,ListHeaderComponent:G,maintainScrollAtEnd:V=!1,maintainScrollAtEndThreshold:T=.1,maintainVisibleContentPosition:O,numColumns:H=1,overrideItemLayout:R,onEndReached:ue,onEndReachedThreshold:fe=.5,onItemSizeChanged:se,onMetricsChange:re,onLayout:he,onLoad:ce,onMomentumScrollEnd:ge,onRefresh:Ce,onScroll:ke,onStartReached:We,onStartReachedThreshold:$e=.5,onStickyHeaderChange:bt,onViewableItemsChanged:Kt,progressViewOffset:en,recycleItems:Nn=!1,refreshControl:Qt,refreshing:Rn,refScrollView:Nt,renderScrollComponent:je,renderItem:at,scrollEventThrottle:De,snapToIndices:gt,stickyHeaderIndices:te,stickyIndices:de,style:Ee,suggestEstimatedItemSize:ze,useWindowScroll:Xe=!1,viewabilityConfig:Zt,viewabilityConfigCallbackPairs:Ut,...St}=t,Et=t.animatedPropsInternal,Mt=t.positionComponentInternal,qe=t.stickyPositionComponentInternal,{childrenMode:tn,positionComponentInternal:un,stickyPositionComponentInternal:si,...Yn}=St,bn=oc.flatten(b),Kn=g&&(B?(bn==null?void 0:bn.minWidth)==null:(bn==null?void 0:bn.minHeight)==null),nn={...bn,...g?{display:"flex",flexDirection:B?"row":"column",...Kn?{flexGrow:1}:{},justifyContent:"flex-end"}:{}},cr={...oc.flatten(Ee)},rn=ux(cr,nn,"Top"),Ft=ux(cr,nn,"Bottom"),zr=UN(V),wr=FN(O),pe=X!=null,it=W!=null,Le=!D&&!pe&&it,He=D||pe,It=D?{index:Math.max(0,C.length-1),preserveForBottomPadding:!0,viewOffset:-Ft,viewPosition:1}:pe?typeof X=="object"?{index:(l=X.index)!=null?l:0,preserveForBottomPadding:X.viewOffset===void 0&&X.viewPosition===1?!0:void 0,viewOffset:(o=X.viewOffset)!=null?o:X.viewPosition===1?-Ft:0,viewPosition:(s=X.viewPosition)!=null?s:0}:{index:X??0,viewOffset:W??0}:Le?{contentOffset:W??0,index:0,viewOffset:0}:void 0,[Wt,Rt]=S.useState(!1),Oe=ii();Oe.columnWrapperStyle=x||(nn?IN(nn):void 0);const $n=S.useRef(null),cn=ON($n,Nt),wt=ne??((Be,dt)=>dt.toString()),ft=te??de,Ir=S.useMemo(()=>{const Be=PN(p,C,wt);return{arr:Be,set:new Set(Be)}},[p==null?void 0:p.top,p==null?void 0:p.bottom,(u=p==null?void 0:p.indices)==null?void 0:u.join(","),(f=p==null?void 0:p.keys)==null?void 0:f.join(","),C,E,wt]);_n&&de&&!te&&Wu("stickyIndices","stickyIndices has been renamed to stickyHeaderIndices. Please update your props to use stickyHeaderIndices."),_n&&Xe&&je&&Wu("useWindowScrollRenderScrollComponent","useWindowScroll is not supported when renderScrollComponent is provided.");const Il=!!Xe&&!je,fr=S.useRef(void 0),Qi=!!R,Ko=S.useRef(Qi);if(!fr.current){if(!Oe.state){const Be=(M??{height:0,width:0})[B?"width":"height"];Oe.state={activeStickyIndex:-1,averageSizes:{},columnSpans:[],columns:[],containerItemKeys:new Map,containerItemTypes:new Map,contentInsetOverride:void 0,dataChangeEpoch:0,dataChangeNeedsScrollUpdate:!1,didColumnsChange:!1,didDataChange:!1,enableScrollForNextCalculateItemsInView:!0,endBuffered:-1,endNoBuffer:-1,endReachedSnapshot:void 0,firstFullyOnScreenIndex:-1,idCache:[],idsInView:[],indexByKey:new Map,initialScroll:It,initialScrollSession:It?{kind:Le?"offset":"bootstrap",previousDataLength:C.length}:void 0,isAtEnd:!1,isAtStart:!1,isEndReached:null,isFirst:!0,isStartReached:null,lastBatchingAction:Date.now(),lastLayout:void 0,lastScrollDelta:0,loadStartTime:Date.now(),minIndexSizeChanged:0,nativeContentInset:void 0,nativeMarginTop:0,pendingNativeMVCPAdjust:void 0,positions:[],props:{},queuedCalculateItemsInView:0,refScroller:{current:null},scroll:0,scrollAdjustHandler:new _N(Oe),scrollForNextCalculateItemsInView:void 0,scrollHistory:[],scrollLength:Be,scrollPending:0,scrollPrev:0,scrollPrevTime:0,scrollProcessingEnabled:!0,scrollTime:0,sizes:new Map,sizesKnown:new Map,startBuffered:-1,startNoBuffer:-1,startReachedSnapshot:void 0,startReachedSnapshotDataChangeEpoch:void 0,stickyContainerPool:new Set,stickyContainers:new Map,timeoutSizeMessage:0,timeouts:new Set,totalSize:0,viewabilityConfigCallbackPairs:void 0};const dt=Oe.state;dt.triggerCalculateItemsInView=Lt=>Fi(Oe,Lt),dt.reprocessCurrentScroll=()=>ih(Oe,dt.scroll,!0),Ne(Oe,"maintainVisibleContentPosition",wr),Ne(Oe,"extraData",z)}fr.current=Oe.state}const lt=fr.current,Zi=lt.isFirst;lt.didColumnsChange=H!==lt.props.numColumns;const ui=lt.props.data!==C,dr=lt.props.dataVersion!==E||ui&&xN(lt,C,lt.props.data);dr&&(lt.dataChangeEpoch+=1,lt.dataChangeNeedsScrollUpdate=!0,lt.didDataChange=!0,lt.previousData=lt.props.data);const ci=De&&ke?qN(ke,De):ke;lt.props={alignItemsAtEnd:g,alwaysRender:p,alwaysRenderIndicesArr:Ir.arr,alwaysRenderIndicesSet:Ir.set,animatedProps:Et,contentInset:w,data:C,dataVersion:E,drawDistance:A,estimatedItemSize:_,getEstimatedItemSize:ju(P),getFixedItemSize:ju(j),getItemType:ju(U),horizontal:!!B,initialContainerPoolRatio:Z,itemsAreEqual:oe,keyExtractor:ju(wt),maintainScrollAtEnd:zr,maintainScrollAtEndThreshold:T,maintainVisibleContentPosition:wr,numColumns:H,onEndReached:ue,onEndReachedThreshold:fe,onItemSizeChanged:se,onLoad:ce,onScroll:ci,onStartReached:We,onStartReachedThreshold:$e,onStickyHeaderChange:bt,overrideItemLayout:R,positionComponentInternal:Mt,recycleItems:!!Nn,renderItem:at,snapToIndices:gt,stickyIndicesArr:ft??[],stickyIndicesSet:S.useMemo(()=>new Set(ft??[]),[ft==null?void 0:ft.join(",")]),stickyPositionComponentInternal:qe,stylePaddingBottom:Ft,stylePaddingTop:rn,suggestEstimatedItemSize:!!ze,useWindowScroll:Il},lt.refScroller=$n;const Dt=S.useMemo(()=>C.length?Array.from({length:Math.min(H,C.length)},(Be,dt)=>_t(lt,C.length-1-dt)):[],[C,E,H]),$o=Be=>{Ne(Oe,"lastItemKeys",Dt),Ne(Oe,"numColumns",H);const dt=Ae(Oe,"stylePaddingTop");HN(Oe,{stylePaddingTop:rn}),fr.current.props.stylePaddingBottom=Ft;let Lt=rn-dt;Be&&wr.size&&Lt&&dt!==void 0&&No.OS};Zi&&($o(!1),q1(Oe,!0));const Xo=S.useMemo(()=>{var Be,dt;const Lt=lt.initialScroll;if(!Lt)return;const At=(Be=Lt.contentOffset)!=null?Be:ti(Oe,Lt);return He&&((dt=lt.initialScrollSession)==null?void 0:dt.kind)==="bootstrap"&&No.OS==="web"?void 0:At},[He]);S.useLayoutEffect(()=>{YM(Oe,{dataLength:C.length,hasFooterComponent:!!I,initialContentOffset:Xo,initialScrollAtEnd:D,useBootstrapInitialScroll:He})},[]),(Zi||dr||H!==Ae(Oe,"numColumns"))&&(fr.current.lastBatchingAction=Date.now(),!ne&&!Zi&&dr&&(_n&&!tn&&Wu("keyExtractor","Changing data without a keyExtractor can cause slow performance and resetting scroll. If your list data can change you should use a keyExtractor with a unique id for best performance and behavior."),fr.current.sizes.clear(),fr.current.positions.length=0,fr.current.totalSize=0,Ne(Oe,"totalSize",0))),S.useLayoutEffect(()=>{KM(Oe,{dataLength:C.length,didDataChange:dr,initialScrollAtEnd:D,stylePaddingBottom:Ft,useBootstrapInitialScroll:He})},[C.length,dr,D,Ft,He]);const Dr=S.useCallback(Be=>{He&&jM(Oe,{dataLength:C.length,footerSize:Be[B?"width":"height"],initialScrollAtEnd:D,stylePaddingBottom:Ft})},[C.length,D,B,Ft,He]),fi=S.useCallback(Be=>{CN(Oe,Be,Rt),!He&&ac(Oe)},[He]),{onLayout:ef}=Kp({onLayoutChange:fi,onLayoutProp:he,ref:$n});S.useLayoutEffect(()=>{gt&&V1(Oe)},[gt]),S.useLayoutEffect(()=>{const{didColumnsChange:Be,didDataChange:dt,isFirst:Lt,props:{data:At}}=lt;!(At.length>0&&K1(Oe))&&!Lt&&(dt||Be)&&SN(Oe,At),lt.didColumnsChange=!1,lt.didDataChange=!1,lt.isFirst=!1},[C,E,H]),S.useLayoutEffect(()=>{var Be;Ne(Oe,"extraData",z);const dt=Ko.current!==Qi;Ko.current=Qi,(Qi||dt)&&H>1&&((Be=lt.triggerCalculateItemsInView)==null||Be.call(lt,{forceFullItemPositions:!0}))},[z,Qi,H]),S.useLayoutEffect(()=>$o(!0),[E,Dt.join(","),H,Ft,rn]),S.useEffect(()=>{if(!re)return;let Be;const dt=()=>{const At={footerSize:Ae(Oe,"footerSize")||0,headerSize:Ae(Oe,"headerSize")||0};(!Be||At.headerSize!==Be.headerSize||At.footerSize!==Be.footerSize)&&(Be=At,re(At))};dt();const Lt=[Mo(Oe,"headerSize",dt),Mo(Oe,"footerSize",dt)];return()=>{for(const At of Lt)At()}},[Oe,re]),S.useEffect(()=>{const Be=sN({onViewableItemsChanged:Kt,viewabilityConfig:Zt,viewabilityConfigCallbackPairs:Ut});lt.viewabilityConfigCallbackPairs=Be,lt.enableScrollForNextCalculateItemsInView=!Be},[Zt,Ut,Kt]),S.useImperativeHandle(r,()=>DN(Oe),[]),S.useEffect(()=>{He||ac(Oe)},[He]);const Ji=S.useMemo(()=>({getRenderedItem:Be=>BN(Oe,Be),onMomentumScrollEnd:Be=>{qM(Oe),ge&&ge(Be)},onScroll:Be=>TN(Oe,Be),updateItemSize:(Be,dt)=>NN(Oe,Be,dt)}),[]),bs=zN(ft,B,Oe,Ji.onScroll),Dl=Qt;return S.createElement(S.Fragment,null,S.createElement(iM,{...Yn,alignItemsAtEnd:g,canRender:Wt,contentContainerStyle:nn,contentInset:w,getRenderedItem:Ji.getRenderedItem,horizontal:B,initialContentOffset:Xo,ListEmptyComponent:C.length===0?J:void 0,ListFooterComponent:I,ListFooterComponentStyle:Y,ListHeaderComponent:G,onLayout:ef,onLayoutFooter:Dr,onMomentumScrollEnd:Ji.onMomentumScrollEnd,onScroll:bs,recycleItems:Nn,refreshControl:Dl?rn>0?S.cloneElement(Dl,{progressViewOffset:((d=Dl.props.progressViewOffset)!=null?d:0)+rn}):Dl:Ce&&S.createElement(jN,{onRefresh:Ce,progressViewOffset:(en||0)+rn,refreshing:!!Rn}),refScrollView:cn,renderScrollComponent:je,scrollAdjustHandler:(m=fr.current)==null?void 0:m.scrollAdjustHandler,scrollEventThrottle:0,snapToIndices:gt,stickyHeaderIndices:ft,style:cr,updateItemSize:Ji.updateItemSize,useWindowScroll:Il}),_n&&R_)}),KN=GN,$N=KN;function $1(e){var t,r,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=$1(e[t]))&&(l&&(l+=" "),l+=r)}else for(r in e)e[r]&&(l&&(l+=" "),l+=r);return l}function X1(){for(var e,t,r=0,l="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=$1(e))&&(l&&(l+=" "),l+=t);return l}const XN=(e,t)=>{const r=new Array(e.length+t.length);for(let l=0;l<e.length;l++)r[l]=e[l];for(let l=0;l<t.length;l++)r[e.length+l]=t[l];return r},QN=(e,t)=>({classGroupId:e,validator:t}),Q1=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),sc="-",Rx=[],ZN="arbitrary..",WN=e=>{const t=eR(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:l}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return JN(u);const f=u.split(sc),d=f[0]===""&&f.length>1?1:0;return Z1(f,d,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const d=l[u],m=r[u];return d?m?XN(m,d):d:m||Rx}return r[u]||Rx}}},Z1=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const m=Z1(e,t+1,s);if(m)return m}const u=r.validators;if(u===null)return;const f=t===0?e.join(sc):e.slice(t).join(sc),d=u.length;for(let m=0;m<d;m++){const g=u[m];if(g.validator(f))return g.classGroupId}},JN=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),l=t.slice(0,r);return l?ZN+l:void 0})(),eR=e=>{const{theme:t,classGroups:r}=e;return tR(r,t)},tR=(e,t)=>{const r=Q1();for(const l in e){const o=e[l];lh(o,r,l,t)}return r},lh=(e,t,r,l)=>{const o=e.length;for(let s=0;s<o;s++){const u=e[s];nR(u,t,r,l)}},nR=(e,t,r,l)=>{if(typeof e=="string"){rR(e,t,r);return}if(typeof e=="function"){iR(e,t,r,l);return}lR(e,t,r,l)},rR=(e,t,r)=>{const l=e===""?t:W1(t,e);l.classGroupId=r},iR=(e,t,r,l)=>{if(oR(e)){lh(e(l),t,r,l);return}t.validators===null&&(t.validators=[]),t.validators.push(QN(r,e))},lR=(e,t,r,l)=>{const o=Object.entries(e),s=o.length;for(let u=0;u<s;u++){const[f,d]=o[u];lh(d,W1(t,f),r,l)}},W1=(e,t)=>{let r=e;const l=t.split(sc),o=l.length;for(let s=0;s<o;s++){const u=l[s];let f=r.nextPart.get(u);f||(f=Q1(),r.nextPart.set(u,f)),r=f}return r},oR=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,aR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),l=Object.create(null);const o=(s,u)=>{r[s]=u,t++,t>e&&(t=0,l=r,r=Object.create(null))};return{get(s){let u=r[s];if(u!==void 0)return u;if((u=l[s])!==void 0)return o(s,u),u},set(s,u){s in r?r[s]=u:o(s,u)}}},fp="!",Ox=":",sR=[],jx=(e,t,r,l,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:l,isExternal:o}),uR=e=>{const{prefix:t,experimentalParseClassName:r}=e;let l=o=>{const s=[];let u=0,f=0,d=0,m;const g=o.length;for(let C=0;C<g;C++){const E=o[C];if(u===0&&f===0){if(E===Ox){s.push(o.slice(d,C)),d=C+1;continue}if(E==="/"){m=C;continue}}E==="["?u++:E==="]"?u--:E==="("?f++:E===")"&&f--}const p=s.length===0?o:o.slice(d);let x=p,b=!1;p.endsWith(fp)?(x=p.slice(0,-1),b=!0):p.startsWith(fp)&&(x=p.slice(1),b=!0);const w=m&&m>d?m-d:void 0;return jx(s,b,x,w)};if(t){const o=t+Ox,s=l;l=u=>u.startsWith(o)?s(u.slice(o.length)):jx(sR,!1,u,void 0,!0)}if(r){const o=l;l=s=>r({className:s,parseClassName:o})}return l},cR=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,l)=>{t.set(r,1e6+l)}),r=>{const l=[];let o=[];for(let s=0;s<r.length;s++){const u=r[s],f=u[0]==="[",d=t.has(u);f||d?(o.length>0&&(o.sort(),l.push(...o),o=[]),l.push(u)):o.push(u)}return o.length>0&&(o.sort(),l.push(...o)),l}},fR=e=>({cache:aR(e.cacheSize),parseClassName:uR(e),sortModifiers:cR(e),...WN(e)}),dR=/\s+/,mR=(e,t)=>{const{parseClassName:r,getClassGroupId:l,getConflictingClassGroupIds:o,sortModifiers:s}=t,u=[],f=e.trim().split(dR);let d="";for(let m=f.length-1;m>=0;m-=1){const g=f[m],{isExternal:p,modifiers:x,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:C}=r(g);if(p){d=g+(d.length>0?" "+d:d);continue}let E=!!C,A=l(E?w.substring(0,C):w);if(!A){if(!E){d=g+(d.length>0?" "+d:d);continue}if(A=l(w),!A){d=g+(d.length>0?" "+d:d);continue}E=!1}const _=x.length===0?"":x.length===1?x[0]:s(x).join(":"),M=b?_+fp:_,z=M+A;if(u.indexOf(z)>-1)continue;u.push(z);const P=o(A,E);for(let j=0;j<P.length;++j){const U=P[j];u.push(M+U)}d=g+(d.length>0?" "+d:d)}return d},pR=(...e)=>{let t=0,r,l,o="";for(;t<e.length;)(r=e[t++])&&(l=J1(r))&&(o&&(o+=" "),o+=l);return o},J1=e=>{if(typeof e=="string")return e;let t,r="";for(let l=0;l<e.length;l++)e[l]&&(t=J1(e[l]))&&(r&&(r+=" "),r+=t);return r},hR=(e,...t)=>{let r,l,o,s;const u=d=>{const m=t.reduce((g,p)=>p(g),e());return r=fR(m),l=r.cache.get,o=r.cache.set,s=f,f(d)},f=d=>{const m=l(d);if(m)return m;const g=mR(d,r);return o(d,g),g};return s=u,(...d)=>s(pR(...d))},gR=[],Xt=e=>{const t=r=>r[e]||gR;return t.isThemeGetter=!0,t},eS=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,tS=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yR=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,vR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xR=/\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$/,bR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,SR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ii=e=>yR.test(e),Ve=e=>!!e&&!Number.isNaN(Number(e)),Di=e=>!!e&&Number.isInteger(Number(e)),km=e=>e.endsWith("%")&&Ve(e.slice(0,-1)),ei=e=>vR.test(e),nS=()=>!0,CR=e=>xR.test(e)&&!bR.test(e),oh=()=>!1,kR=e=>SR.test(e),ER=e=>wR.test(e),AR=e=>!ve(e)&&!xe(e),TR=e=>Gi(e,lS,oh),ve=e=>eS.test(e),gl=e=>Gi(e,oS,CR),zx=e=>Gi(e,IR,Ve),_R=e=>Gi(e,sS,nS),MR=e=>Gi(e,aS,oh),Ix=e=>Gi(e,rS,oh),NR=e=>Gi(e,iS,ER),Iu=e=>Gi(e,uS,kR),xe=e=>tS.test(e),Ba=e=>Rl(e,oS),RR=e=>Rl(e,aS),Dx=e=>Rl(e,rS),OR=e=>Rl(e,lS),jR=e=>Rl(e,iS),Du=e=>Rl(e,uS,!0),zR=e=>Rl(e,sS,!0),Gi=(e,t,r)=>{const l=eS.exec(e);return l?l[1]?t(l[1]):r(l[2]):!1},Rl=(e,t,r=!1)=>{const l=tS.exec(e);return l?l[1]?t(l[1]):r:!1},rS=e=>e==="position"||e==="percentage",iS=e=>e==="image"||e==="url",lS=e=>e==="length"||e==="size"||e==="bg-size",oS=e=>e==="length",IR=e=>e==="number",aS=e=>e==="family-name",sS=e=>e==="number"||e==="weight",uS=e=>e==="shadow",DR=()=>{const e=Xt("color"),t=Xt("font"),r=Xt("text"),l=Xt("font-weight"),o=Xt("tracking"),s=Xt("leading"),u=Xt("breakpoint"),f=Xt("container"),d=Xt("spacing"),m=Xt("radius"),g=Xt("shadow"),p=Xt("inset-shadow"),x=Xt("text-shadow"),b=Xt("drop-shadow"),w=Xt("blur"),C=Xt("perspective"),E=Xt("aspect"),A=Xt("ease"),_=Xt("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...z(),xe,ve],j=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],B=()=>[xe,ve,d],Z=()=>[Ii,"full","auto",...B()],D=()=>[Di,"none","subgrid",xe,ve],X=()=>["auto",{span:["full",Di,xe,ve]},Di,xe,ve],W=()=>[Di,"auto",xe,ve],oe=()=>["auto","min","max","fr",xe,ve],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...B()],Y=()=>[Ii,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],G=()=>[Ii,"screen","full","dvw","lvw","svw","min","max","fit",...B()],V=()=>[Ii,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],T=()=>[e,xe,ve],O=()=>[...z(),Dx,Ix,{position:[xe,ve]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",OR,TR,{size:[xe,ve]}],ue=()=>[km,Ba,gl],fe=()=>["","none","full",m,xe,ve],se=()=>["",Ve,Ba,gl],re=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>[Ve,km,Dx,Ix],ge=()=>["","none",w,xe,ve],Ce=()=>["none",Ve,xe,ve],ke=()=>["none",Ve,xe,ve],We=()=>[Ve,xe,ve],$e=()=>[Ii,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ei],breakpoint:[ei],color:[nS],container:[ei],"drop-shadow":[ei],ease:["in","out","in-out"],font:[AR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ei],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ei],shadow:[ei],spacing:["px",Ve],text:[ei],"text-shadow":[ei],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ii,ve,xe,E]}],container:["container"],columns:[{columns:[Ve,ve,xe,f]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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:P()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{"inset-s":Z(),start:Z()}],end:[{"inset-e":Z(),end:Z()}],"inset-bs":[{"inset-bs":Z()}],"inset-be":[{"inset-be":Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[Di,"auto",xe,ve]}],basis:[{basis:[Ii,"full","auto",f,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ve,Ii,"auto","initial","none",ve]}],grow:[{grow:["",Ve,xe,ve]}],shrink:[{shrink:["",Ve,xe,ve]}],order:[{order:[Di,"first","last","none",xe,ve]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":oe()}],"auto-rows":[{"auto-rows":oe()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...ne(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...V()]}],"min-block-size":[{"min-block":["auto",...V()]}],"max-block-size":[{"max-block":["none",...V()]}],w:[{w:[f,"screen",...Y()]}],"min-w":[{"min-w":[f,"screen","none",...Y()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",r,Ba,gl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,zR,_R]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",km,ve]}],"font-family":[{font:[RR,MR,t]}],"font-features":[{"font-features":[ve]}],"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:[o,xe,ve]}],"line-clamp":[{"line-clamp":[Ve,"none",xe,zx]}],leading:[{leading:[s,...B()]}],"list-image":[{"list-image":["none",xe,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xe,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ve,"from-font","auto",xe,gl]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[Ve,"auto",xe,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe,ve]}],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",xe,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Di,xe,ve],radial:["",xe,ve],conic:[Di,xe,ve]},jR,NR]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ve,xe,ve]}],"outline-w":[{outline:["",Ve,Ba,gl]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",g,Du,Iu]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",p,Du,Iu]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[Ve,gl]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",x,Du,Iu]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[Ve,xe,ve]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"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":[Ve]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[xe,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"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":z()}],"mask-image-conic-pos":[{"mask-conic":[Ve]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,ve]}],filter:[{filter:["","none",xe,ve]}],blur:[{blur:ge()}],brightness:[{brightness:[Ve,xe,ve]}],contrast:[{contrast:[Ve,xe,ve]}],"drop-shadow":[{"drop-shadow":["","none",b,Du,Iu]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",Ve,xe,ve]}],"hue-rotate":[{"hue-rotate":[Ve,xe,ve]}],invert:[{invert:["",Ve,xe,ve]}],saturate:[{saturate:[Ve,xe,ve]}],sepia:[{sepia:["",Ve,xe,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,ve]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[Ve,xe,ve]}],"backdrop-contrast":[{"backdrop-contrast":[Ve,xe,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ve,xe,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ve,xe,ve]}],"backdrop-invert":[{"backdrop-invert":["",Ve,xe,ve]}],"backdrop-opacity":[{"backdrop-opacity":[Ve,xe,ve]}],"backdrop-saturate":[{"backdrop-saturate":[Ve,xe,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",Ve,xe,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",xe,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ve,"initial",xe,ve]}],ease:[{ease:["linear","initial",A,xe,ve]}],delay:[{delay:[Ve,xe,ve]}],animate:[{animate:["none",_,xe,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,xe,ve]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:Ce()}],"rotate-x":[{"rotate-x":Ce()}],"rotate-y":[{"rotate-y":Ce()}],"rotate-z":[{"rotate-z":Ce()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:We()}],"skew-x":[{"skew-x":We()}],"skew-y":[{"skew-y":We()}],transform:[{transform:[xe,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$e()}],"translate-x":[{"translate-x":$e()}],"translate-y":[{"translate-y":$e()}],"translate-z":[{"translate-z":$e()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"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",xe,ve]}],"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":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"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",xe,ve]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[Ve,Ba,gl,zx]}],stroke:[{stroke:["none",...T()]}],"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"]}},LR=hR(DR);function we(...e){return LR(X1(e))}const us=({children:e,className:t,animate:r=!0,shimmerWidth:l,...o})=>v.jsx("span",{className:we("mx-auto max-w-md text-foreground/60",r&&"animate-shiny-pulse",t),...o,children:e}),Lx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Px=X1,PR=(e,t)=>r=>{var l;if((t==null?void 0:t.variants)==null)return Px(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:s}=t,u=Object.keys(o).map(m=>{const g=r==null?void 0:r[m],p=s==null?void 0:s[m];if(g===null)return null;const x=Lx(g)||Lx(p);return o[m][x]}),f=r&&Object.entries(r).reduce((m,g)=>{let[p,x]=g;return x===void 0||(m[p]=x),m},{}),d=t==null||(l=t.compoundVariants)===null||l===void 0?void 0:l.reduce((m,g)=>{let{class:p,className:x,...b}=g;return Object.entries(b).every(w=>{let[C,E]=w;return Array.isArray(E)?E.includes({...s,...f}[C]):{...s,...f}[C]===E})?[...m,p,x]:m},[]);return Px(e,u,d,r==null?void 0:r.class,r==null?void 0:r.className)},BR=PR("touch-manipulation inline-flex items-center justify-center whitespace-nowrap cursor-pointer rounded-md text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none",{variants:{variant:{default:"bg-primary text-primary-foreground disabled:bg-primary/50 disabled:text-primary-foreground/90 hover:bg-primary/90",juicy:"bg-logo text-primary-foreground disabled:text-primary-foreground/50 hover:bg-logo/90",destructive:"bg-destructive/80 dark:text-white",outline:"border disabled:bg-transparent disabled:text-foreground/50 border-inpu disabled:border-input/90 bg-card hover:bg-muted hover:text-accent-foreground",secondary:"bg-transparent border border-border text-secondary-foreground hover:text-secondary-foreground/60 disabled:text-secondary-foreground/50",ghost:"hover:bg-accent dark:hover:bg-card hover:text-accent-foreground text-muted-foreground disabled:text-muted-foreground/50 border border-border/0 hover:border-border",link:"text-primary disabled:text-primary/50 underline-offset-4 hover:underline",none:""},size:{default:"h-10 px-4 rounded-full py-2",sm:"h-9 rounded-full px-3",lg:"h-11 rounded-full px-8",icon:"h-9 w-9 rounded-full","icon-mobile":"h-11 w-11 rounded-full md:h-9 md:w-9",none:"","icon-sm":"h-5.5 w-5.5 rounded-md"}},defaultVariants:{variant:"default",size:"default"}}),zt=S.forwardRef(({className:e,variant:t,size:r,type:l="button",...o},s)=>v.jsx("button",{type:l,className:we(BR({variant:t,size:r,className:e})),ref:s,...o}));zt.displayName="Button";const UR=new Set([".c",".cc",".cfg",".conf",".cpp",".cs",".css",".diff",".env",".go",".graphql",".h",".hpp",".html",".ini",".java",".js",".json",".jsonc",".jsx",".kt",".log",".lua",".md",".mjs",".patch",".php",".pl",".properties",".py",".rb",".rs",".scss",".sh",".sql",".swift",".toml",".ts",".tsx",".txt",".vue",".xml",".yaml",".yml",".zsh"]),FR=new Set([".gitignore",".npmrc",".prettierrc",".python-version",".ruby-version",".tool-versions","Dockerfile","Gemfile","Makefile","Procfile"]);function Lu(e){if(!e)return;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>0?t:void 0}function Bx(e){var l,o;const t=/^(?<path>\/.+?)#L(?<line>\d+)(?:C(?<column>\d+))?$/.exec(e);if((l=t==null?void 0:t.groups)!=null&&l.path)return{path:t.groups.path,line:Lu(t.groups.line),column:Lu(t.groups.column)};const r=/^(?<path>\/.+?):(?<line>\d+)(?::(?<column>\d+))?$/.exec(e);return(o=r==null?void 0:r.groups)!=null&&o.path?{path:r.groups.path,line:Lu(r.groups.line),column:Lu(r.groups.column)}:e.startsWith("/")?{path:e}:null}function HR(e){if(!e)return null;const t=e.trim();if(!t||/^(mailto:|ftp:|file:)/i.test(t))return null;if(/^https?:/i.test(t)){if(typeof window>"u")return null;try{const r=new URL(t);return r.origin!==window.location.origin||!r.pathname.startsWith("/")?null:Bx(`${r.pathname}${r.hash}`)}catch{return null}}return Bx(t)}function VR(e){const t=e.split(/[\\/]/).pop()??e;if(FR.has(t))return!0;const r=t.lastIndexOf("."),l=r>=0?t.slice(r).toLowerCase():"";return UR.has(l)}function Pu(e,t){if(!e)return"";if(t){const r=t.endsWith("/")?t:`${t}/`;if(e.startsWith(r))return e.slice(r.length);if(e===t)return""}return e.replace(/^\/home\/user\/workspace\//,"")}const cS={readonly:!1,localLinkMode:"open",attachmentMode:"live"},fS=S.createContext(cS);function qR({children:e,value:t}){return v.jsx(fS.Provider,{value:{...cS,...t},children:e})}function jc(){return S.useContext(fS)}const uc=()=>{},dS=S.createContext(uc);function mS({children:e,onOpenLocalLink:t}){return v.jsx(dS.Provider,{value:t??uc,children:e})}const dp={Task:J0,TaskOutput:J0,Bash:c_,Glob:gm,Grep:gm,ExitPlanMode:ex,Read:x1,Edit:E2,Write:T2,Delete:I2,NotebookEdit:w1,WebFetch:HT,TodoWrite:WT,WebSearch:gm,KillShell:s_,AskUserQuestion:b1,Skill:o_,EnterPlanMode:ex},pS=d_;function hS(e){return dp[e]?dp[e]:pS}function li({children:e,className:t}){return v.jsx("div",{className:we("flex gap-3 justify-start items-center",t),children:e})}function gS({children:e,className:t}){return v.jsx("div",{className:we("flex items-center gap-1.5 text-xs",t),children:e})}function Hi({children:e,className:t}){return v.jsx("span",{className:we("font-medium text-foreground/80",t),children:e})}function GR({children:e}){return v.jsx("span",{className:"text-muted-foreground",children:e})}function zc({children:e,expandedContent:t,defaultExpanded:r=!1}){const[l,o]=S.useState(r);return v.jsxs("div",{className:"flex flex-col w-full",children:[v.jsxs("button",{onClick:()=>o(!l),className:`group/expandable-row cursor-pointer grid grid-cols-[auto_1fr] items-center gap-1 text-sm ${l?"":"hover:opacity-60 transition-opacity"}`,children:[v.jsx("div",{className:"grid grid-cols-[auto_1fr] items-center gap-1.5",children:e}),v.jsx(bl,{className:`h-4.5 w-4.5 text-muted-icon translate-y-[0.5px] transition-all duration-200 opacity-0 group-hover/expandable-row:opacity-100 ${l?"rotate-90 opacity-100":""}`})]}),l&&t]})}function Ux({label:e,children:t,copyText:r}){const[l,o]=S.useState(!1),s=r??cc(t),u=S.useCallback(async()=>{await navigator.clipboard.writeText(s),o(!0),setTimeout(()=>o(!1),2e3)},[s]);return v.jsxs("div",{children:[v.jsx("span",{className:"font-medium text-muted-foreground",children:e}),v.jsxs("div",{className:"relative group/codeblock",children:[v.jsx("pre",{className:"my-1 text-xs font-mono whitespace-no-wrap break-all bg-muted border border-border rounded-lg p-2 max-h-64 overflow-auto w-full",children:t}),v.jsx(zt,{variant:"ghost",size:"icon","aria-label":l?"Copied":"Copy code",className:we("absolute top-[4px] right-[4px] z-10 h-11 w-11 md:h-6.5 md:w-6.5 rounded-sm text-muted-foreground opacity-100 md:opacity-0 md:group-hover/codeblock:opacity-100 transition-opacity [@media(hover:none)]:!opacity-100",!l&&"hover:text-foreground",l&&"hover:!bg-transparent hover:!border-transparent"),onClick:u,children:l?v.jsx(xl,{className:"h-3.5 w-3.5 text-success"}):v.jsx(Hp,{className:"h-4 w-4"})})]})]})}function yS({children:e,icon:t,className:r}){return v.jsxs("span",{className:we("inline-flex items-center gap-1 px-2 py-1 bg-muted border border-border rounded-full",r),children:[t&&v.jsx(t,{className:"h-3 w-3 text-muted-foreground"}),e]})}function Ic({children:e,className:t}){return v.jsxs("div",{className:we("grid grid-cols-[auto_1fr] gap-2 min-w-0",t),children:[v.jsx("div",{className:" min-w-5 flex flex-col relative items-center justify-center",children:v.jsx("div",{className:"min-h-full w-[1px] bg-muted-foreground/20"})}),v.jsx("div",{className:"-ml-[1px] min-w-0 overflow-hidden",children:e})]})}function cc(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(Array.isArray(e))return e.map(cc).join("");if(e&&typeof e=="object"&&"props"in e){const t=e.props;return cc(t.children)}return""}function Fx(e,t){return S.isValidElement(e)?S.cloneElement(e,{className:we(e.props.className,t)}):e}const YR={h1:({children:e})=>v.jsx("h1",{className:"text-[20px] font-normal leading-tight mt-5 mb-3 first:mt-0 last:mb-0",children:e}),h2:({children:e})=>v.jsx("h2",{className:"text-[18px] font-normal leading-tight mt-5 mb-3 first:mt-0 last:mb-0",children:e}),h3:({children:e})=>v.jsx("h3",{className:"text-[16px] font-normal leading-tight mt-5 mb-3 first:mt-0 last:mb-0",children:e}),h4:({children:e})=>v.jsx("h4",{className:"text-[16px] font-normal leading-tight mt-5 mb-3 first:mt-0 last:mb-0",children:e}),h5:({children:e})=>v.jsx("h5",{className:"text-[16px] font-normal leading-tight mt-5 mb-3 first:mt-0 last:mb-0",children:e}),h6:({children:e})=>v.jsx("h6",{className:"text-[16px] font-normal leading-tight mt-5 mb-3 first:mt-0 last:mb-0",children:e}),pre:({children:e,...t})=>{const[r,l]=S.useState(!1),o=cc(e),s=async()=>{await navigator.clipboard.writeText(o),l(!0),setTimeout(()=>l(!1),2e3)};return v.jsxs("div",{className:"relative overflow-x-auto max-w-full min-w-0 no-code-highlight group/pre",children:[v.jsx("pre",{className:"min-w-0 rounded-xl py-2.5 px-3.5 [.no-pre-highlight_&]:bg-background",...t,children:e}),v.jsx(zt,{variant:"ghost",size:"icon","aria-label":r?"Copied":"Copy code",className:we("absolute top-[35px] -translate-y-[50%] -translate-x-[1px] rounded-md right-1.5 h-11 w-11 md:h-8 md:w-8 text-muted-foreground opacity-100 md:opacity-0 md:group-hover/pre:opacity-100 transition-opacity [@media(hover:none)]:!opacity-100",!r&&"hover:text-foreground",r&&"hover:!bg-transparent hover:!border-transparent"),onClick:s,children:r?v.jsx(xl,{className:"h-4 w-4 text-success"}):v.jsx(Hp,{className:"h-4 w-4"})})]})},code:({children:e,className:t,...r})=>t?v.jsx("code",{className:"block text-xs whitespace-pre",...r,children:e}):v.jsx("code",{className:"break-all px-1 bg-border/60 dark:[.no-pre-highlight_&]:bg-background dark:[.text-pretty_&]:bg-neutral [.no-code-highlight_&]:!bg-transparent py-0.5 rounded text-sm whitespace-wrap",...r,children:e}),table:({children:e,...t})=>v.jsx("div",{className:"border border-border rounded-xl overflow-x-auto",children:v.jsx("table",{className:"table-auto min-w-full divide-y divide-border bg-background",...t,children:e})}),tbody:({children:e,...t})=>v.jsx("tbody",{className:"divide-y divide-border",...t,children:e}),th:({children:e,...t})=>v.jsx("th",{className:"text-left text-xs uppercase text-muted-foreground tracking-wider p-2 pl-0 first:pl-3 bg-muted dark:bg-card [&_*]:font-semibold",...t,children:e}),td:({children:e,...t})=>v.jsx("td",{className:"text-left p-2 pl-0 first:pl-3 [&_*]:font-normal ",...t,children:e}),p:({children:e,...t})=>v.jsx("p",{className:"break-words mt-5 mb-3 first:mt-0 last:mb-0",...t,children:e}),blockquote:({children:e,...t})=>(()=>{const r=S.Children.toArray(e),l=r[0];l!==void 0&&(r[0]=Fx(l,"mt-0"));const o=r.length-1,s=r[o];return s!==void 0&&(r[o]=Fx(s,"mb-0")),v.jsx("blockquote",{className:"my-2 mt-5 mb-3 first:mt-0 last:mb-0 border-l-2 border-border/80 pl-2 text-muted-foreground",...t,children:r})})(),a:({children:e,...t})=>v.jsx("a",{className:"transition-all underline decoration-2 text-logo decoration-logo/50 hover:text-logo/70 dark:text-logo dark:decoration-logo/70 dark:hover:text-logo/60 dark:hover:decoration-logo/40 ",target:"_blank",rel:"noopener noreferrer",...t,children:e})};function Po(e){return{...YR,a:({children:t,href:r,onClick:l,...o})=>{const s=S.useContext(dS),u=jc(),f=HR(r);return f&&u.localLinkMode==="text"?v.jsx("span",{className:"transition-all underline decoration-2 text-logo decoration-logo/50",children:t}):v.jsx("a",{className:"transition-all underline decoration-2 text-logo decoration-logo/50 hover:text-logo/70 dark:text-logo dark:decoration-logo/70 dark:hover:text-logo/60 dark:hover:decoration-logo/40 ",href:r,target:f?void 0:"_blank",rel:f?void 0:"noopener noreferrer",onClick:d=>{l==null||l(d),!(d.defaultPrevented||!f||s===uc)&&(d.preventDefault(),s({...f,clientX:d.clientX,clientY:d.clientY,trigger:"click"}))},onContextMenu:d=>{!f||s===uc||(d.preventDefault(),s({...f,clientX:d.clientX,clientY:d.clientY,trigger:"contextmenu"}))},...o,children:t})}}}function KR({onStop:e}){return v.jsx(li,{className:"ml-[1px]",children:v.jsx(gS,{children:v.jsxs("div",{className:"group/draining relative flex items-center gap-1.5",children:[v.jsxs("div",{className:"flex items-center gap-1.5 group-hover/draining:opacity-0 transition-opacity",children:[v.jsx(Ac,{className:"size-4.5 animate-spin text-muted-icon"}),v.jsx(us,{className:"ml-[1px] text-sm",shimmerWidth:44,children:"Running..."})]}),v.jsxs("button",{onClick:e,className:"absolute inset-0 flex items-center gap-1.5 opacity-0 group-hover/draining:opacity-100 transition-opacity cursor-pointer",children:[v.jsx(Lo,{className:"size-4.5 text-muted-foreground"}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Stop"})]})]})})})}function $R(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const XR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,QR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ZR={};function Hx(e,t){return(ZR.jsx?QR:XR).test(e)}const WR=/[ \t\n\f\r]/g;function JR(e){return typeof e=="object"?e.type==="text"?Vx(e.value):!1:Vx(e)}function Vx(e){return e.replace(WR,"")===""}class cs{constructor(t,r,l){this.normal=r,this.property=t,l&&(this.space=l)}}cs.prototype.normal={};cs.prototype.property={};cs.prototype.space=void 0;function vS(e,t){const r={},l={};for(const o of e)Object.assign(r,o.property),Object.assign(l,o.normal);return new cs(r,l,t)}function mp(e){return e.toLowerCase()}class Mn{constructor(t,r){this.attribute=r,this.property=t}}Mn.prototype.attribute="";Mn.prototype.booleanish=!1;Mn.prototype.boolean=!1;Mn.prototype.commaOrSpaceSeparated=!1;Mn.prototype.commaSeparated=!1;Mn.prototype.defined=!1;Mn.prototype.mustUseProperty=!1;Mn.prototype.number=!1;Mn.prototype.overloadedBoolean=!1;Mn.prototype.property="";Mn.prototype.spaceSeparated=!1;Mn.prototype.space=void 0;let eO=0;const Fe=Ol(),Yt=Ol(),pp=Ol(),me=Ol(),xt=Ol(),Eo=Ol(),Un=Ol();function Ol(){return 2**++eO}const hp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Fe,booleanish:Yt,commaOrSpaceSeparated:Un,commaSeparated:Eo,number:me,overloadedBoolean:pp,spaceSeparated:xt},Symbol.toStringTag,{value:"Module"})),Em=Object.keys(hp);class ah extends Mn{constructor(t,r,l,o){let s=-1;if(super(t,r),qx(this,"space",o),typeof l=="number")for(;++s<Em.length;){const u=Em[s];qx(this,Em[s],(l&hp[u])===hp[u])}}}ah.prototype.defined=!0;function qx(e,t,r){r&&(e[t]=r)}function Bo(e){const t={},r={};for(const[l,o]of Object.entries(e.properties)){const s=new ah(l,e.transform(e.attributes||{},l),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(s.mustUseProperty=!0),t[l]=s,r[mp(l)]=l,r[mp(s.attribute)]=l}return new cs(t,r,e.space)}const xS=Bo({properties:{ariaActiveDescendant:null,ariaAtomic:Yt,ariaAutoComplete:null,ariaBusy:Yt,ariaChecked:Yt,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:xt,ariaCurrent:null,ariaDescribedBy:xt,ariaDetails:null,ariaDisabled:Yt,ariaDropEffect:xt,ariaErrorMessage:null,ariaExpanded:Yt,ariaFlowTo:xt,ariaGrabbed:Yt,ariaHasPopup:null,ariaHidden:Yt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xt,ariaLevel:me,ariaLive:null,ariaModal:Yt,ariaMultiLine:Yt,ariaMultiSelectable:Yt,ariaOrientation:null,ariaOwns:xt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Yt,ariaReadOnly:Yt,ariaRelevant:null,ariaRequired:Yt,ariaRoleDescription:xt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Yt,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function bS(e,t){return t in e?e[t]:t}function SS(e,t){return bS(e,t.toLowerCase())}const tO=Bo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Eo,acceptCharset:xt,accessKey:xt,action:null,allow:null,allowFullScreen:Fe,allowPaymentRequest:Fe,allowUserMedia:Fe,alt:null,as:null,async:Fe,autoCapitalize:null,autoComplete:xt,autoFocus:Fe,autoPlay:Fe,blocking:xt,capture:null,charSet:null,checked:Fe,cite:null,className:xt,cols:me,colSpan:null,content:null,contentEditable:Yt,controls:Fe,controlsList:xt,coords:me|Eo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Fe,defer:Fe,dir:null,dirName:null,disabled:Fe,download:pp,draggable:Yt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Fe,formTarget:null,headers:xt,height:me,hidden:pp,high:me,href:null,hrefLang:null,htmlFor:xt,httpEquiv:xt,id:null,imageSizes:null,imageSrcSet:null,inert:Fe,inputMode:null,integrity:null,is:null,isMap:Fe,itemId:null,itemProp:xt,itemRef:xt,itemScope:Fe,itemType:xt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Fe,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:Fe,muted:Fe,name:null,nonce:null,noModule:Fe,noValidate:Fe,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:Fe,optimum:me,pattern:null,ping:xt,placeholder:null,playsInline:Fe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Fe,referrerPolicy:null,rel:xt,required:Fe,reversed:Fe,rows:me,rowSpan:me,sandbox:xt,scope:null,scoped:Fe,seamless:Fe,selected:Fe,shadowRootClonable:Fe,shadowRootDelegatesFocus:Fe,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Yt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:Fe,useMap:null,value:Yt,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Fe,declare:Fe,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:Fe,noHref:Fe,noShade:Fe,noWrap:Fe,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Yt,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Fe,disableRemotePlayback:Fe,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:SS}),nO=Bo({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:Un,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:xt,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:Fe,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:Eo,g2:Eo,glyphName:Eo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:Un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Un,rev:Un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Un,requiredFeatures:Un,requiredFonts:Un,requiredFormats:Un,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:Un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Un,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Un,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:bS}),wS=Bo({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()}}),CS=Bo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:SS}),kS=Bo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),rO={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"},iO=/[A-Z]/g,Gx=/-[a-z]/g,lO=/^data[-\w.:]+$/i;function oO(e,t){const r=mp(t);let l=t,o=Mn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&lO.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Gx,sO);l="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Gx.test(s)){let u=s.replace(iO,aO);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=ah}return new o(l,t)}function aO(e){return"-"+e.toLowerCase()}function sO(e){return e.charAt(1).toUpperCase()}const uO=vS([xS,tO,wS,CS,kS],"html"),sh=vS([xS,nO,wS,CS,kS],"svg");function cO(e){return e.join(" ").trim()}var vo={},Am,Yx;function fO(){if(Yx)return Am;Yx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
|
|
333
|
+
`,m="/",g="*",p="",x="comment",b="declaration";function w(E,A){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];A=A||{};var _=1,M=1;function z(ne){var J=ne.match(t);J&&(_+=J.length);var I=ne.lastIndexOf(d);M=~I?ne.length-I:M+ne.length}function P(){var ne={line:_,column:M};return function(J){return J.position=new j(ne),Z(),J}}function j(ne){this.start=ne,this.end={line:_,column:M},this.source=A.source}j.prototype.content=E;function U(ne){var J=new Error(A.source+":"+_+":"+M+": "+ne);if(J.reason=ne,J.filename=A.source,J.line=_,J.column=M,J.source=E,!A.silent)throw J}function B(ne){var J=ne.exec(E);if(J){var I=J[0];return z(I),E=E.slice(I.length),J}}function Z(){B(r)}function D(ne){var J;for(ne=ne||[];J=X();)J!==!1&&ne.push(J);return ne}function X(){var ne=P();if(!(m!=E.charAt(0)||g!=E.charAt(1))){for(var J=2;p!=E.charAt(J)&&(g!=E.charAt(J)||m!=E.charAt(J+1));)++J;if(J+=2,p===E.charAt(J-1))return U("End of comment missing");var I=E.slice(2,J-2);return M+=2,z(I),E=E.slice(J),M+=2,ne({type:x,comment:I})}}function W(){var ne=P(),J=B(l);if(J){if(X(),!B(o))return U("property missing ':'");var I=B(s),Y=ne({type:b,property:C(J[0].replace(e,p)),value:I?C(I[0].replace(e,p)):p});return B(u),Y}}function oe(){var ne=[];D(ne);for(var J;J=W();)J!==!1&&(ne.push(J),D(ne));return ne}return Z(),oe()}function C(E){return E?E.replace(f,p):p}return Am=w,Am}var Kx;function dO(){if(Kx)return vo;Kx=1;var e=vo&&vo.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(vo,"__esModule",{value:!0}),vo.default=r;const t=e(fO());function r(l,o){let s=null;if(!l||typeof l!="string")return s;const u=(0,t.default)(l),f=typeof o=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:m,value:g}=d;f?o(m,g,d):g&&(s=s||{},s[m]=g)}),s}return vo}var Ua={},$x;function mO(){if($x)return Ua;$x=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(m){return!m||r.test(m)||e.test(m)},u=function(m,g){return g.toUpperCase()},f=function(m,g){return"".concat(g,"-")},d=function(m,g){return g===void 0&&(g={}),s(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(o,f):m=m.replace(l,f),m.replace(t,u))};return Ua.camelCase=d,Ua}var Fa,Xx;function pO(){if(Xx)return Fa;Xx=1;var e=Fa&&Fa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(dO()),r=mO();function l(o,s){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(f,d){f&&d&&(u[(0,r.camelCase)(f,s)]=d)}),u}return l.default=l,Fa=l,Fa}var hO=pO();const gO=kc(hO),ES=AS("end"),uh=AS("start");function AS(e){return t;function t(r){const l=r&&r.position&&r.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function yO(e){const t=uh(e),r=ES(e);if(t&&r)return{start:t,end:r}}function $a(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Qx(e.position):"start"in e||"end"in e?Qx(e):"line"in e||"column"in e?gp(e):""}function gp(e){return Zx(e&&e.line)+":"+Zx(e&&e.column)}function Qx(e){return gp(e&&e.start)+"-"+gp(e&&e.end)}function Zx(e){return e&&typeof e=="number"?e:1}class pn extends Error{constructor(t,r,l){super(),typeof r=="string"&&(l=r,r=void 0);let o="",s={},u=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof t=="string"?o=t:!s.cause&&t&&(u=!0,o=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof l=="string"){const d=l.indexOf(":");d===-1?s.ruleId=l:(s.source=l.slice(0,d),s.ruleId=l.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=$a(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=u&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}pn.prototype.file="";pn.prototype.name="";pn.prototype.reason="";pn.prototype.message="";pn.prototype.stack="";pn.prototype.column=void 0;pn.prototype.line=void 0;pn.prototype.ancestors=void 0;pn.prototype.cause=void 0;pn.prototype.fatal=void 0;pn.prototype.place=void 0;pn.prototype.ruleId=void 0;pn.prototype.source=void 0;const ch={}.hasOwnProperty,vO=new Map,xO=/[A-Z]/g,bO=new Set(["table","tbody","thead","tfoot","tr"]),SO=new Set(["td","th"]),TS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wO(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let l;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=NO(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=MO(r,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:l,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?sh:uO,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=_S(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function _S(e,t,r){if(t.type==="element")return CO(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kO(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return AO(e,t,r);if(t.type==="mdxjsEsm")return EO(e,t);if(t.type==="root")return TO(e,t,r);if(t.type==="text")return _O(e,t)}function CO(e,t,r){const l=e.schema;let o=l;t.tagName.toLowerCase()==="svg"&&l.space==="html"&&(o=sh,e.schema=o),e.ancestors.push(t);const s=NS(e,t.tagName,!1),u=RO(e,t);let f=dh(e,t);return bO.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!JR(d):!0})),MS(e,u,s,t),fh(u,f),e.ancestors.pop(),e.schema=l,e.create(t,s,u,r)}function kO(e,t){if(t.data&&t.data.estree&&e.evaluater){const l=t.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}ns(e,t.position)}function EO(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ns(e,t.position)}function AO(e,t,r){const l=e.schema;let o=l;t.name==="svg"&&l.space==="html"&&(o=sh,e.schema=o),e.ancestors.push(t);const s=t.name===null?e.Fragment:NS(e,t.name,!0),u=OO(e,t),f=dh(e,t);return MS(e,u,s,t),fh(u,f),e.ancestors.pop(),e.schema=l,e.create(t,s,u,r)}function TO(e,t,r){const l={};return fh(l,dh(e,t)),e.create(t,e.Fragment,l,r)}function _O(e,t){return t.value}function MS(e,t,r,l){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=l)}function fh(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function MO(e,t,r){return l;function l(o,s,u,f){const m=Array.isArray(u.children)?r:t;return f?m(s,u,f):m(s,u)}}function NO(e,t){return r;function r(l,o,s,u){const f=Array.isArray(s.children),d=uh(l);return t(o,s,u,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function RO(e,t){const r={};let l,o;for(o in t.properties)if(o!=="children"&&ch.call(t.properties,o)){const s=jO(e,o,t.properties[o]);if(s){const[u,f]=s;e.tableCellAlignToStyle&&u==="align"&&typeof f=="string"&&SO.has(t.tagName)?l=f:r[u]=f}}if(l){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return r}function OO(e,t){const r={};for(const l of t.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const s=l.data.estree.body[0];s.type;const u=s.expression;u.type;const f=u.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else ns(e,t.position);else{const o=l.name;let s;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const f=l.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else ns(e,t.position);else s=l.value===null?!0:l.value;r[o]=s}return r}function dh(e,t){const r=[];let l=-1;const o=e.passKeys?new Map:vO;for(;++l<t.children.length;){const s=t.children[l];let u;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const m=o.get(d)||0;u=d+"-"+m,o.set(d,m+1)}}const f=_S(e,s,u);f!==void 0&&r.push(f)}return r}function jO(e,t,r){const l=oO(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=l.commaSeparated?$R(r):cO(r)),l.property==="style"){let o=typeof r=="object"?r:zO(e,String(r));return e.stylePropertyNameCase==="css"&&(o=IO(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&l.space?rO[l.property]||l.property:l.attribute,r]}}function zO(e,t){try{return gO(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const l=r,o=new pn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=TS+"#cannot-parse-style-attribute",o}}function NS(e,t,r){let l;if(!r)l={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let s=-1,u;for(;++s<o.length;){const f=Hx(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};u=u?{type:"MemberExpression",object:u,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}l=u}else l=Hx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(l.type==="Literal"){const o=l.value;return ch.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(l);ns(e)}function ns(e,t){const r=new pn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=TS+"#cannot-handle-mdx-estrees-without-createevaluater",r}function IO(e){const t={};let r;for(r in e)ch.call(e,r)&&(t[DO(r)]=e[r]);return t}function DO(e){let t=e.replace(xO,LO);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function LO(e){return"-"+e.toLowerCase()}const Tm={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"]},PO={};function mh(e,t){const r=PO,l=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return RS(e,l,o)}function RS(e,t,r){if(BO(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Wx(e.children,t,r)}return Array.isArray(e)?Wx(e,t,r):""}function Wx(e,t,r){const l=[];let o=-1;for(;++o<e.length;)l[o]=RS(e[o],t,r);return l.join("")}function BO(e){return!!(e&&typeof e=="object")}const Jx=document.createElement("i");function ph(e){const t="&"+e+";";Jx.innerHTML=t;const r=Jx.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Vn(e,t,r,l){const o=e.length;let s=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,r=r>0?r:0,l.length<1e4)u=Array.from(l),u.unshift(t,r),e.splice(...u);else for(r&&e.splice(t,r);s<l.length;)u=l.slice(s,s+1e4),u.unshift(t,0),e.splice(...u),s+=1e4,t+=1e4}function or(e,t){return e.length>0?(Vn(e,e.length,0,t),e):t}const eb={}.hasOwnProperty;function OS(e){const t={};let r=-1;for(;++r<e.length;)UO(t,e[r]);return t}function UO(e,t){let r;for(r in t){const o=(eb.call(e,r)?e[r]:void 0)||(e[r]={}),s=t[r];let u;if(s)for(u in s){eb.call(o,u)||(o[u]=[]);const f=s[u];FO(o[u],Array.isArray(f)?f:f?[f]:[])}}}function FO(e,t){let r=-1;const l=[];for(;++r<t.length;)(t[r].add==="after"?e:l).push(t[r]);Vn(e,0,0,l)}function jS(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function yr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vn=Yi(/[A-Za-z]/),dn=Yi(/[\dA-Za-z]/),HO=Yi(/[#-'*+\--9=?A-Z^-~]/);function fc(e){return e!==null&&(e<32||e===127)}const yp=Yi(/\d/),VO=Yi(/[\dA-Fa-f]/),qO=Yi(/[!-/:-@[-`{-~]/);function _e(e){return e!==null&&e<-2}function vt(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const Dc=Yi(new RegExp("\\p{P}|\\p{S}","u")),Cl=Yi(/\s/);function Yi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Uo(e){const t=[];let r=-1,l=0,o=0;for(;++r<e.length;){const s=e.charCodeAt(r);let u="";if(s===37&&dn(e.charCodeAt(r+1))&&dn(e.charCodeAt(r+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(u=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(r+1);s<56320&&f>56319&&f<57344?(u=String.fromCharCode(s,f),o=1):u="�"}else u=String.fromCharCode(s);u&&(t.push(e.slice(l,r),encodeURIComponent(u)),l=r+o+1,u=""),o&&(r+=o,o=0)}return t.join("")+e.slice(l)}function tt(e,t,r,l){const o=l?l-1:Number.POSITIVE_INFINITY;let s=0;return u;function u(d){return Ke(d)?(e.enter(r),f(d)):t(d)}function f(d){return Ke(d)&&s++<o?(e.consume(d),f):(e.exit(r),t(d))}}const GO={tokenize:YO};function YO(e){const t=e.attempt(this.parser.constructs.contentInitial,l,o);let r;return t;function l(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),tt(e,t,"linePrefix")}function o(f){return e.enter("paragraph"),s(f)}function s(f){const d=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=d),r=d,u(f)}function u(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return _e(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),u)}}const KO={tokenize:$O},tb={tokenize:XO};function $O(e){const t=this,r=[];let l=0,o,s,u;return f;function f(M){if(l<r.length){const z=r[l];return t.containerState=z[1],e.attempt(z[0].continuation,d,m)(M)}return m(M)}function d(M){if(l++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&_();const z=t.events.length;let P=z,j;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){j=t.events[P][1].end;break}A(l);let U=z;for(;U<t.events.length;)t.events[U][1].end={...j},U++;return Vn(t.events,P+1,0,t.events.slice(z)),t.events.length=U,m(M)}return f(M)}function m(M){if(l===r.length){if(!o)return x(M);if(o.currentConstruct&&o.currentConstruct.concrete)return w(M);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(tb,g,p)(M)}function g(M){return o&&_(),A(l),x(M)}function p(M){return t.parser.lazy[t.now().line]=l!==r.length,u=t.now().offset,w(M)}function x(M){return t.containerState={},e.attempt(tb,b,w)(M)}function b(M){return l++,r.push([t.currentConstruct,t.containerState]),x(M)}function w(M){if(M===null){o&&_(),A(0),e.consume(M);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),C(M)}function C(M){if(M===null){E(e.exit("chunkFlow"),!0),A(0),e.consume(M);return}return _e(M)?(e.consume(M),E(e.exit("chunkFlow")),l=0,t.interrupt=void 0,f):(e.consume(M),C)}function E(M,z){const P=t.sliceStream(M);if(z&&P.push(null),M.previous=s,s&&(s.next=M),s=M,o.defineSkip(M.start),o.write(P),t.parser.lazy[M.start.line]){let j=o.events.length;for(;j--;)if(o.events[j][1].start.offset<u&&(!o.events[j][1].end||o.events[j][1].end.offset>u))return;const U=t.events.length;let B=U,Z,D;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(Z){D=t.events[B][1].end;break}Z=!0}for(A(l),j=U;j<t.events.length;)t.events[j][1].end={...D},j++;Vn(t.events,B+1,0,t.events.slice(U)),t.events.length=j}}function A(M){let z=r.length;for(;z-- >M;){const P=r[z];t.containerState=P[1],P[0].exit.call(t,e)}r.length=M}function _(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function XO(e,t,r){return tt(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Oo(e){if(e===null||vt(e)||Cl(e))return 1;if(Dc(e))return 2}function Lc(e,t,r){const l=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!l.includes(s)&&(t=s(t,r),l.push(s))}return t}const vp={name:"attention",resolveAll:QO,tokenize:ZO};function QO(e,t){let r=-1,l,o,s,u,f,d,m,g;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(l=r;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&t.sliceSerialize(e[l][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[l][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;d=e[l][1].end.offset-e[l][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const p={...e[l][1].end},x={...e[r][1].start};nb(p,-d),nb(x,d),u={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[l][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:x},s={type:d>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[r][1].start}},o={type:d>1?"strong":"emphasis",start:{...u.start},end:{...f.end}},e[l][1].end={...u.start},e[r][1].start={...f.end},m=[],e[l][1].end.offset-e[l][1].start.offset&&(m=or(m,[["enter",e[l][1],t],["exit",e[l][1],t]])),m=or(m,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",s,t]]),m=or(m,Lc(t.parser.constructs.insideSpan.null,e.slice(l+1,r),t)),m=or(m,[["exit",s,t],["enter",f,t],["exit",f,t],["exit",o,t]]),e[r][1].end.offset-e[r][1].start.offset?(g=2,m=or(m,[["enter",e[r][1],t],["exit",e[r][1],t]])):g=0,Vn(e,l-1,r-l+3,m),r=l+m.length-g-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function ZO(e,t){const r=this.parser.constructs.attentionMarkers.null,l=this.previous,o=Oo(l);let s;return u;function u(d){return s=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===s)return e.consume(d),f;const m=e.exit("attentionSequence"),g=Oo(d),p=!g||g===2&&o||r.includes(d),x=!o||o===2&&g||r.includes(l);return m._open=!!(s===42?p:p&&(o||!x)),m._close=!!(s===42?x:x&&(g||!p)),t(d)}}function nb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const WO={name:"autolink",tokenize:JO};function JO(e,t,r){let l=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(b){return vn(b)?(e.consume(b),u):b===64?r(b):m(b)}function u(b){return b===43||b===45||b===46||dn(b)?(l=1,f(b)):m(b)}function f(b){return b===58?(e.consume(b),l=0,d):(b===43||b===45||b===46||dn(b))&&l++<32?(e.consume(b),f):(l=0,m(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||fc(b)?r(b):(e.consume(b),d)}function m(b){return b===64?(e.consume(b),g):HO(b)?(e.consume(b),m):r(b)}function g(b){return dn(b)?p(b):r(b)}function p(b){return b===46?(e.consume(b),l=0,g):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):x(b)}function x(b){if((b===45||dn(b))&&l++<63){const w=b===45?x:p;return e.consume(b),w}return r(b)}}const fs={partial:!0,tokenize:ej};function ej(e,t,r){return l;function l(s){return Ke(s)?tt(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||_e(s)?t(s):r(s)}}const zS={continuation:{tokenize:nj},exit:rj,name:"blockQuote",tokenize:tj};function tj(e,t,r){const l=this;return o;function o(u){if(u===62){const f=l.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),s}return r(u)}function s(u){return Ke(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function nj(e,t,r){const l=this;return o;function o(u){return Ke(u)?tt(e,s,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):s(u)}function s(u){return e.attempt(zS,t,r)(u)}}function rj(e){e.exit("blockQuote")}const IS={name:"characterEscape",tokenize:ij};function ij(e,t,r){return l;function l(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return qO(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(s)}}const DS={name:"characterReference",tokenize:lj};function lj(e,t,r){const l=this;let o=0,s,u;return f;function f(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),s=31,u=dn,g(p))}function m(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,u=VO,g):(e.enter("characterReferenceValue"),s=7,u=yp,g(p))}function g(p){if(p===59&&o){const x=e.exit("characterReferenceValue");return u===dn&&!ph(l.sliceSerialize(x))?r(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(p)&&o++<s?(e.consume(p),g):r(p)}}const rb={partial:!0,tokenize:aj},ib={concrete:!0,name:"codeFenced",tokenize:oj};function oj(e,t,r){const l=this,o={partial:!0,tokenize:P};let s=0,u=0,f;return d;function d(j){return m(j)}function m(j){const U=l.events[l.events.length-1];return s=U&&U[1].type==="linePrefix"?U[2].sliceSerialize(U[1],!0).length:0,f=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(j)}function g(j){return j===f?(u++,e.consume(j),g):u<3?r(j):(e.exit("codeFencedFenceSequence"),Ke(j)?tt(e,p,"whitespace")(j):p(j))}function p(j){return j===null||_e(j)?(e.exit("codeFencedFence"),l.interrupt?t(j):e.check(rb,C,z)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(j))}function x(j){return j===null||_e(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(j)):Ke(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tt(e,b,"whitespace")(j)):j===96&&j===f?r(j):(e.consume(j),x)}function b(j){return j===null||_e(j)?p(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(j))}function w(j){return j===null||_e(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(j)):j===96&&j===f?r(j):(e.consume(j),w)}function C(j){return e.attempt(o,z,E)(j)}function E(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),A}function A(j){return s>0&&Ke(j)?tt(e,_,"linePrefix",s+1)(j):_(j)}function _(j){return j===null||_e(j)?e.check(rb,C,z)(j):(e.enter("codeFlowValue"),M(j))}function M(j){return j===null||_e(j)?(e.exit("codeFlowValue"),_(j)):(e.consume(j),M)}function z(j){return e.exit("codeFenced"),t(j)}function P(j,U,B){let Z=0;return D;function D(J){return j.enter("lineEnding"),j.consume(J),j.exit("lineEnding"),X}function X(J){return j.enter("codeFencedFence"),Ke(J)?tt(j,W,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):W(J)}function W(J){return J===f?(j.enter("codeFencedFenceSequence"),oe(J)):B(J)}function oe(J){return J===f?(Z++,j.consume(J),oe):Z>=u?(j.exit("codeFencedFenceSequence"),Ke(J)?tt(j,ne,"whitespace")(J):ne(J)):B(J)}function ne(J){return J===null||_e(J)?(j.exit("codeFencedFence"),U(J)):B(J)}}}function aj(e,t,r){const l=this;return o;function o(u){return u===null?r(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s)}function s(u){return l.parser.lazy[l.now().line]?r(u):t(u)}}const _m={name:"codeIndented",tokenize:uj},sj={partial:!0,tokenize:cj};function uj(e,t,r){const l=this;return o;function o(m){return e.enter("codeIndented"),tt(e,s,"linePrefix",5)(m)}function s(m){const g=l.events[l.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?u(m):r(m)}function u(m){return m===null?d(m):_e(m)?e.attempt(sj,u,d)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||_e(m)?(e.exit("codeFlowValue"),u(m)):(e.consume(m),f)}function d(m){return e.exit("codeIndented"),t(m)}}function cj(e,t,r){const l=this;return o;function o(u){return l.parser.lazy[l.now().line]?r(u):_e(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):tt(e,s,"linePrefix",5)(u)}function s(u){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):_e(u)?o(u):r(u)}}const fj={name:"codeText",previous:mj,resolve:dj,tokenize:pj};function dj(e){let t=e.length-4,r=3,l,o;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(l=r;++l<t;)if(e[l][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(l=r-1,t++;++l<=t;)o===void 0?l!==t&&e[l][1].type!=="lineEnding"&&(o=l):(l===t||e[l][1].type==="lineEnding")&&(e[o][1].type="codeTextData",l!==o+2&&(e[o][1].end=e[l-1][1].end,e.splice(o+2,l-o-2),t-=l-o-2,l=o+2),o=void 0);return e}function mj(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pj(e,t,r){let l=0,o,s;return u;function u(p){return e.enter("codeText"),e.enter("codeTextSequence"),f(p)}function f(p){return p===96?(e.consume(p),l++,f):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?r(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(s=e.enter("codeTextSequence"),o=0,g(p)):_e(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),m(p))}function m(p){return p===null||p===32||p===96||_e(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),m)}function g(p){return p===96?(e.consume(p),o++,g):o===l?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(s.type="codeTextData",m(p))}}class hj{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,r){const l=r??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(t,l):t>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(t,r,l){const o=r||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return l&&Ha(this.left,l),s.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),Ha(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ha(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 r=this.left.splice(t,Number.POSITIVE_INFINITY);Ha(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ha(this.left,r.reverse())}}}function Ha(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function LS(e){const t={};let r=-1,l,o,s,u,f,d,m;const g=new hj(e);for(;++r<g.length;){for(;r in t;)r=t[r];if(l=g.get(r),r&&l[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(d=l[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(l[0]==="enter")l[1].contentType&&(Object.assign(t,gj(g,r)),r=t[r],m=!0);else if(l[1]._container){for(s=r,o=void 0;s--;)if(u=g.get(s),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(g.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=s);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(l[1].end={...g.get(o)[1].start},f=g.slice(o,r),f.unshift(l),g.splice(o,r-o+1,f))}}return Vn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function gj(e,t){const r=e.get(t)[1],l=e.get(t)[2];let o=t-1;const s=[];let u=r._tokenizer;u||(u=l.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const f=u.events,d=[],m={};let g,p,x=-1,b=r,w=0,C=0;const E=[C];for(;b;){for(;e.get(++o)[1]!==b;);s.push(o),b._tokenizer||(g=l.sliceStream(b),b.next||g.push(null),p&&u.defineSkip(b.start),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(g),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),p=b,b=b.next}for(b=r;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(C=x+1,E.push(C),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(u.events=[],b?(b._tokenizer=void 0,b.previous=void 0):E.pop(),x=E.length;x--;){const A=f.slice(E[x],E[x+1]),_=s.pop();d.push([_,_+A.length-1]),e.splice(_,2,A)}for(d.reverse(),x=-1;++x<d.length;)m[w+d[x][0]]=w+d[x][1],w+=d[x][1]-d[x][0]-1;return m}const yj={resolve:xj,tokenize:bj},vj={partial:!0,tokenize:Sj};function xj(e){return LS(e),e}function bj(e,t){let r;return l;function l(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?s(f):_e(f)?e.check(vj,u,s)(f):(e.consume(f),o)}function s(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function u(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function Sj(e,t,r){const l=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),tt(e,s,"linePrefix")}function s(u){if(u===null||_e(u))return r(u);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):e.interrupt(l.parser.constructs.flow,r,t)(u)}}function PS(e,t,r,l,o,s,u,f,d){const m=d||Number.POSITIVE_INFINITY;let g=0;return p;function p(A){return A===60?(e.enter(l),e.enter(o),e.enter(s),e.consume(A),e.exit(s),x):A===null||A===32||A===41||fc(A)?r(A):(e.enter(l),e.enter(u),e.enter(f),e.enter("chunkString",{contentType:"string"}),C(A))}function x(A){return A===62?(e.enter(s),e.consume(A),e.exit(s),e.exit(o),e.exit(l),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===62?(e.exit("chunkString"),e.exit(f),x(A)):A===null||A===60||_e(A)?r(A):(e.consume(A),A===92?w:b)}function w(A){return A===60||A===62||A===92?(e.consume(A),b):b(A)}function C(A){return!g&&(A===null||A===41||vt(A))?(e.exit("chunkString"),e.exit(f),e.exit(u),e.exit(l),t(A)):g<m&&A===40?(e.consume(A),g++,C):A===41?(e.consume(A),g--,C):A===null||A===32||A===40||fc(A)?r(A):(e.consume(A),A===92?E:C)}function E(A){return A===40||A===41||A===92?(e.consume(A),C):C(A)}}function BS(e,t,r,l,o,s){const u=this;let f=0,d;return m;function m(b){return e.enter(l),e.enter(o),e.consume(b),e.exit(o),e.enter(s),g}function g(b){return f>999||b===null||b===91||b===93&&!d||b===94&&!f&&"_hiddenFootnoteSupport"in u.parser.constructs?r(b):b===93?(e.exit(s),e.enter(o),e.consume(b),e.exit(o),e.exit(l),t):_e(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||b===91||b===93||_e(b)||f++>999?(e.exit("chunkString"),g(b)):(e.consume(b),d||(d=!Ke(b)),b===92?x:p)}function x(b){return b===91||b===92||b===93?(e.consume(b),f++,p):p(b)}}function US(e,t,r,l,o,s){let u;return f;function f(x){return x===34||x===39||x===40?(e.enter(l),e.enter(o),e.consume(x),e.exit(o),u=x===40?41:x,d):r(x)}function d(x){return x===u?(e.enter(o),e.consume(x),e.exit(o),e.exit(l),t):(e.enter(s),m(x))}function m(x){return x===u?(e.exit(s),d(u)):x===null?r(x):_e(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),tt(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===u||x===null||_e(x)?(e.exit("chunkString"),m(x)):(e.consume(x),x===92?p:g)}function p(x){return x===u||x===92?(e.consume(x),g):g(x)}}function Xa(e,t){let r;return l;function l(o){return _e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,l):Ke(o)?tt(e,l,r?"linePrefix":"lineSuffix")(o):t(o)}}const wj={name:"definition",tokenize:kj},Cj={partial:!0,tokenize:Ej};function kj(e,t,r){const l=this;let o;return s;function s(b){return e.enter("definition"),u(b)}function u(b){return BS.call(l,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return o=yr(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):r(b)}function d(b){return vt(b)?Xa(e,m)(b):m(b)}function m(b){return PS(e,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return e.attempt(Cj,p,p)(b)}function p(b){return Ke(b)?tt(e,x,"whitespace")(b):x(b)}function x(b){return b===null||_e(b)?(e.exit("definition"),l.parser.defined.push(o),t(b)):r(b)}}function Ej(e,t,r){return l;function l(f){return vt(f)?Xa(e,o)(f):r(f)}function o(f){return US(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return Ke(f)?tt(e,u,"whitespace")(f):u(f)}function u(f){return f===null||_e(f)?t(f):r(f)}}const Aj={name:"hardBreakEscape",tokenize:Tj};function Tj(e,t,r){return l;function l(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return _e(s)?(e.exit("hardBreakEscape"),t(s)):r(s)}}const _j={name:"headingAtx",resolve:Mj,tokenize:Nj};function Mj(e,t){let r=e.length-2,l=3,o,s;return e[l][1].type==="whitespace"&&(l+=2),r-2>l&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(l===r-1||r-4>l&&e[r-2][1].type==="whitespace")&&(r-=l+1===r?2:4),r>l&&(o={type:"atxHeadingText",start:e[l][1].start,end:e[r][1].end},s={type:"chunkText",start:e[l][1].start,end:e[r][1].end,contentType:"text"},Vn(e,l,r-l+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function Nj(e,t,r){let l=0;return o;function o(g){return e.enter("atxHeading"),s(g)}function s(g){return e.enter("atxHeadingSequence"),u(g)}function u(g){return g===35&&l++<6?(e.consume(g),u):g===null||vt(g)?(e.exit("atxHeadingSequence"),f(g)):r(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||_e(g)?(e.exit("atxHeading"),t(g)):Ke(g)?tt(e,f,"whitespace")(g):(e.enter("atxHeadingText"),m(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),f(g))}function m(g){return g===null||g===35||vt(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),m)}}const Rj=["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"],lb=["pre","script","style","textarea"],Oj={concrete:!0,name:"htmlFlow",resolveTo:Ij,tokenize:Dj},jj={partial:!0,tokenize:Pj},zj={partial:!0,tokenize:Lj};function Ij(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 Dj(e,t,r){const l=this;let o,s,u,f,d;return m;function m(R){return g(R)}function g(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),p}function p(R){return R===33?(e.consume(R),x):R===47?(e.consume(R),s=!0,C):R===63?(e.consume(R),o=3,l.interrupt?t:T):vn(R)?(e.consume(R),u=String.fromCharCode(R),E):r(R)}function x(R){return R===45?(e.consume(R),o=2,b):R===91?(e.consume(R),o=5,f=0,w):vn(R)?(e.consume(R),o=4,l.interrupt?t:T):r(R)}function b(R){return R===45?(e.consume(R),l.interrupt?t:T):r(R)}function w(R){const ue="CDATA[";return R===ue.charCodeAt(f++)?(e.consume(R),f===ue.length?l.interrupt?t:W:w):r(R)}function C(R){return vn(R)?(e.consume(R),u=String.fromCharCode(R),E):r(R)}function E(R){if(R===null||R===47||R===62||vt(R)){const ue=R===47,fe=u.toLowerCase();return!ue&&!s&&lb.includes(fe)?(o=1,l.interrupt?t(R):W(R)):Rj.includes(u.toLowerCase())?(o=6,ue?(e.consume(R),A):l.interrupt?t(R):W(R)):(o=7,l.interrupt&&!l.parser.lazy[l.now().line]?r(R):s?_(R):M(R))}return R===45||dn(R)?(e.consume(R),u+=String.fromCharCode(R),E):r(R)}function A(R){return R===62?(e.consume(R),l.interrupt?t:W):r(R)}function _(R){return Ke(R)?(e.consume(R),_):D(R)}function M(R){return R===47?(e.consume(R),D):R===58||R===95||vn(R)?(e.consume(R),z):Ke(R)?(e.consume(R),M):D(R)}function z(R){return R===45||R===46||R===58||R===95||dn(R)?(e.consume(R),z):P(R)}function P(R){return R===61?(e.consume(R),j):Ke(R)?(e.consume(R),P):M(R)}function j(R){return R===null||R===60||R===61||R===62||R===96?r(R):R===34||R===39?(e.consume(R),d=R,U):Ke(R)?(e.consume(R),j):B(R)}function U(R){return R===d?(e.consume(R),d=null,Z):R===null||_e(R)?r(R):(e.consume(R),U)}function B(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||vt(R)?P(R):(e.consume(R),B)}function Z(R){return R===47||R===62||Ke(R)?M(R):r(R)}function D(R){return R===62?(e.consume(R),X):r(R)}function X(R){return R===null||_e(R)?W(R):Ke(R)?(e.consume(R),X):r(R)}function W(R){return R===45&&o===2?(e.consume(R),I):R===60&&o===1?(e.consume(R),Y):R===62&&o===4?(e.consume(R),O):R===63&&o===3?(e.consume(R),T):R===93&&o===5?(e.consume(R),V):_e(R)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(jj,H,oe)(R)):R===null||_e(R)?(e.exit("htmlFlowData"),oe(R)):(e.consume(R),W)}function oe(R){return e.check(zj,ne,H)(R)}function ne(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),J}function J(R){return R===null||_e(R)?oe(R):(e.enter("htmlFlowData"),W(R))}function I(R){return R===45?(e.consume(R),T):W(R)}function Y(R){return R===47?(e.consume(R),u="",G):W(R)}function G(R){if(R===62){const ue=u.toLowerCase();return lb.includes(ue)?(e.consume(R),O):W(R)}return vn(R)&&u.length<8?(e.consume(R),u+=String.fromCharCode(R),G):W(R)}function V(R){return R===93?(e.consume(R),T):W(R)}function T(R){return R===62?(e.consume(R),O):R===45&&o===2?(e.consume(R),T):W(R)}function O(R){return R===null||_e(R)?(e.exit("htmlFlowData"),H(R)):(e.consume(R),O)}function H(R){return e.exit("htmlFlow"),t(R)}}function Lj(e,t,r){const l=this;return o;function o(u){return _e(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):r(u)}function s(u){return l.parser.lazy[l.now().line]?r(u):t(u)}}function Pj(e,t,r){return l;function l(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(fs,t,r)}}const Bj={name:"htmlText",tokenize:Uj};function Uj(e,t,r){const l=this;let o,s,u;return f;function f(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),m):T===47?(e.consume(T),P):T===63?(e.consume(T),M):vn(T)?(e.consume(T),B):r(T)}function m(T){return T===45?(e.consume(T),g):T===91?(e.consume(T),s=0,w):vn(T)?(e.consume(T),_):r(T)}function g(T){return T===45?(e.consume(T),b):r(T)}function p(T){return T===null?r(T):T===45?(e.consume(T),x):_e(T)?(u=p,Y(T)):(e.consume(T),p)}function x(T){return T===45?(e.consume(T),b):p(T)}function b(T){return T===62?I(T):T===45?x(T):p(T)}function w(T){const O="CDATA[";return T===O.charCodeAt(s++)?(e.consume(T),s===O.length?C:w):r(T)}function C(T){return T===null?r(T):T===93?(e.consume(T),E):_e(T)?(u=C,Y(T)):(e.consume(T),C)}function E(T){return T===93?(e.consume(T),A):C(T)}function A(T){return T===62?I(T):T===93?(e.consume(T),A):C(T)}function _(T){return T===null||T===62?I(T):_e(T)?(u=_,Y(T)):(e.consume(T),_)}function M(T){return T===null?r(T):T===63?(e.consume(T),z):_e(T)?(u=M,Y(T)):(e.consume(T),M)}function z(T){return T===62?I(T):M(T)}function P(T){return vn(T)?(e.consume(T),j):r(T)}function j(T){return T===45||dn(T)?(e.consume(T),j):U(T)}function U(T){return _e(T)?(u=U,Y(T)):Ke(T)?(e.consume(T),U):I(T)}function B(T){return T===45||dn(T)?(e.consume(T),B):T===47||T===62||vt(T)?Z(T):r(T)}function Z(T){return T===47?(e.consume(T),I):T===58||T===95||vn(T)?(e.consume(T),D):_e(T)?(u=Z,Y(T)):Ke(T)?(e.consume(T),Z):I(T)}function D(T){return T===45||T===46||T===58||T===95||dn(T)?(e.consume(T),D):X(T)}function X(T){return T===61?(e.consume(T),W):_e(T)?(u=X,Y(T)):Ke(T)?(e.consume(T),X):Z(T)}function W(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),o=T,oe):_e(T)?(u=W,Y(T)):Ke(T)?(e.consume(T),W):(e.consume(T),ne)}function oe(T){return T===o?(e.consume(T),o=void 0,J):T===null?r(T):_e(T)?(u=oe,Y(T)):(e.consume(T),oe)}function ne(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||vt(T)?Z(T):(e.consume(T),ne)}function J(T){return T===47||T===62||vt(T)?Z(T):r(T)}function I(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):r(T)}function Y(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),G}function G(T){return Ke(T)?tt(e,V,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):V(T)}function V(T){return e.enter("htmlTextData"),u(T)}}const hh={name:"labelEnd",resolveAll:qj,resolveTo:Gj,tokenize:Yj},Fj={tokenize:Kj},Hj={tokenize:$j},Vj={tokenize:Xj};function qj(e){let t=-1;const r=[];for(;++t<e.length;){const l=e[t][1];if(r.push(e[t]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const o=l.type==="labelImage"?4:2;l.type="data",t+=o}}return e.length!==r.length&&Vn(e,0,e.length,r),e}function Gj(e,t){let r=e.length,l=0,o,s,u,f;for(;r--;)if(o=e[r][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=r,o.type!=="labelLink")){l=2;break}}else o.type==="labelEnd"&&(u=r);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[s][1].start},end:{...e[u][1].end}},g={type:"labelText",start:{...e[s+l+2][1].end},end:{...e[u-2][1].start}};return f=[["enter",d,t],["enter",m,t]],f=or(f,e.slice(s+1,s+l+3)),f=or(f,[["enter",g,t]]),f=or(f,Lc(t.parser.constructs.insideSpan.null,e.slice(s+l+4,u-3),t)),f=or(f,[["exit",g,t],e[u-2],e[u-1],["exit",m,t]]),f=or(f,e.slice(u+1)),f=or(f,[["exit",d,t]]),Vn(e,s,e.length,f),e}function Yj(e,t,r){const l=this;let o=l.events.length,s,u;for(;o--;)if((l.events[o][1].type==="labelImage"||l.events[o][1].type==="labelLink")&&!l.events[o][1]._balanced){s=l.events[o][1];break}return f;function f(x){return s?s._inactive?p(x):(u=l.parser.defined.includes(yr(l.sliceSerialize({start:s.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),d):r(x)}function d(x){return x===40?e.attempt(Fj,g,u?g:p)(x):x===91?e.attempt(Hj,g,u?m:p)(x):u?g(x):p(x)}function m(x){return e.attempt(Vj,g,p)(x)}function g(x){return t(x)}function p(x){return s._balanced=!0,r(x)}}function Kj(e,t,r){return l;function l(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),o}function o(p){return vt(p)?Xa(e,s)(p):s(p)}function s(p){return p===41?g(p):PS(e,u,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function u(p){return vt(p)?Xa(e,d)(p):g(p)}function f(p){return r(p)}function d(p){return p===34||p===39||p===40?US(e,m,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):g(p)}function m(p){return vt(p)?Xa(e,g)(p):g(p)}function g(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):r(p)}}function $j(e,t,r){const l=this;return o;function o(f){return BS.call(l,e,s,u,"reference","referenceMarker","referenceString")(f)}function s(f){return l.parser.defined.includes(yr(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?t(f):r(f)}function u(f){return r(f)}}function Xj(e,t,r){return l;function l(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):r(s)}}const Qj={name:"labelStartImage",resolveAll:hh.resolveAll,tokenize:Zj};function Zj(e,t,r){const l=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),u):r(f)}function u(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?r(f):t(f)}}const Wj={name:"labelStartLink",resolveAll:hh.resolveAll,tokenize:Jj};function Jj(e,t,r){const l=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),s}function s(u){return u===94&&"_hiddenFootnoteSupport"in l.parser.constructs?r(u):t(u)}}const Mm={name:"lineEnding",tokenize:ez};function ez(e,t){return r;function r(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),tt(e,t,"linePrefix")}}const tc={name:"thematicBreak",tokenize:tz};function tz(e,t,r){let l=0,o;return s;function s(m){return e.enter("thematicBreak"),u(m)}function u(m){return o=m,f(m)}function f(m){return m===o?(e.enter("thematicBreakSequence"),d(m)):l>=3&&(m===null||_e(m))?(e.exit("thematicBreak"),t(m)):r(m)}function d(m){return m===o?(e.consume(m),l++,d):(e.exit("thematicBreakSequence"),Ke(m)?tt(e,f,"whitespace")(m):f(m))}}const Tn={continuation:{tokenize:lz},exit:az,name:"list",tokenize:iz},nz={partial:!0,tokenize:sz},rz={partial:!0,tokenize:oz};function iz(e,t,r){const l=this,o=l.events[l.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return f;function f(b){const w=l.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!l.containerState.marker||b===l.containerState.marker:yp(b)){if(l.containerState.type||(l.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(tc,r,m)(b):m(b);if(!l.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return r(b)}function d(b){return yp(b)&&++u<10?(e.consume(b),d):(!l.interrupt||u<2)&&(l.containerState.marker?b===l.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),m(b)):r(b)}function m(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||b,e.check(fs,l.interrupt?r:g,e.attempt(nz,x,p))}function g(b){return l.containerState.initialBlankLine=!0,s++,x(b)}function p(b){return Ke(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),x):r(b)}function x(b){return l.containerState.size=s+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function lz(e,t,r){const l=this;return l.containerState._closeFlow=void 0,e.check(fs,o,s);function o(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,tt(e,t,"listItemIndent",l.containerState.size+1)(f)}function s(f){return l.containerState.furtherBlankLines||!Ke(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,u(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(rz,t,u)(f))}function u(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,tt(e,e.attempt(Tn,t,r),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function oz(e,t,r){const l=this;return tt(e,o,"listItemIndent",l.containerState.size+1);function o(s){const u=l.events[l.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===l.containerState.size?t(s):r(s)}}function az(e){e.exit(this.containerState.type)}function sz(e,t,r){const l=this;return tt(e,o,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const u=l.events[l.events.length-1];return!Ke(s)&&u&&u[1].type==="listItemPrefixWhitespace"?t(s):r(s)}}const ob={name:"setextUnderline",resolveTo:uz,tokenize:cz};function uz(e,t){let r=e.length,l,o,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){l=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&e.splice(r,1),!s&&e[r][1].type==="definition"&&(s=r);const u={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",u,t]),e.splice(s+1,0,["exit",e[l][1],t]),e[l][1].end={...e[s][1].end}):e[l][1]=u,e.push(["exit",u,t]),e}function cz(e,t,r){const l=this;let o;return s;function s(m){let g=l.events.length,p;for(;g--;)if(l.events[g][1].type!=="lineEnding"&&l.events[g][1].type!=="linePrefix"&&l.events[g][1].type!=="content"){p=l.events[g][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||p)?(e.enter("setextHeadingLine"),o=m,u(m)):r(m)}function u(m){return e.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===o?(e.consume(m),f):(e.exit("setextHeadingLineSequence"),Ke(m)?tt(e,d,"lineSuffix")(m):d(m))}function d(m){return m===null||_e(m)?(e.exit("setextHeadingLine"),t(m)):r(m)}}const fz={tokenize:dz};function dz(e){const t=this,r=e.attempt(fs,l,e.attempt(this.parser.constructs.flowInitial,o,tt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(yj,o)),"linePrefix")));return r;function l(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const mz={resolveAll:HS()},pz=FS("string"),hz=FS("text");function FS(e){return{resolveAll:HS(e==="text"?gz:void 0),tokenize:t};function t(r){const l=this,o=this.parser.constructs[e],s=r.attempt(o,u,f);return u;function u(g){return m(g)?s(g):f(g)}function f(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),d}function d(g){return m(g)?(r.exit("data"),s(g)):(r.consume(g),d)}function m(g){if(g===null)return!0;const p=o[g];let x=-1;if(p)for(;++x<p.length;){const b=p[x];if(!b.previous||b.previous.call(l,l.previous))return!0}return!1}}}function HS(e){return t;function t(r,l){let o=-1,s;for(;++o<=r.length;)s===void 0?r[o]&&r[o][1].type==="data"&&(s=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==s+2&&(r[s][1].end=r[o-1][1].end,r.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(r,l):r}}function gz(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const l=e[r-1][1],o=t.sliceStream(l);let s=o.length,u=-1,f=0,d;for(;s--;){const m=o[s];if(typeof m=="string"){for(u=m.length;m.charCodeAt(u-1)===32;)f++,u--;if(u)break;u=-1}else if(m===-2)d=!0,f++;else if(m!==-1){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(f=0),f){const m={type:r===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?u:l.start._bufferIndex+u,_index:l.start._index+s,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...m.start},l.start.offset===l.end.offset?Object.assign(l,m):(e.splice(r,0,["enter",m,t],["exit",m,t]),r+=2)}r++}return e}const yz={42:Tn,43:Tn,45:Tn,48:Tn,49:Tn,50:Tn,51:Tn,52:Tn,53:Tn,54:Tn,55:Tn,56:Tn,57:Tn,62:zS},vz={91:wj},xz={[-2]:_m,[-1]:_m,32:_m},bz={35:_j,42:tc,45:[ob,tc],60:Oj,61:ob,95:tc,96:ib,126:ib},Sz={38:DS,92:IS},wz={[-5]:Mm,[-4]:Mm,[-3]:Mm,33:Qj,38:DS,42:vp,60:[WO,Bj],91:Wj,92:[Aj,IS],93:hh,95:vp,96:fj},Cz={null:[vp,mz]},kz={null:[42,95]},Ez={null:[]},Az=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:kz,contentInitial:vz,disable:Ez,document:yz,flow:bz,flowInitial:xz,insideSpan:Cz,string:Sz,text:wz},Symbol.toStringTag,{value:"Module"}));function Tz(e,t,r){let l={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const o={},s=[];let u=[],f=[];const d={attempt:U(P),check:U(j),consume:_,enter:M,exit:z,interrupt:U(j,{interrupt:!0})},m={code:null,containerState:{},defineSkip:C,events:[],now:w,parser:e,previous:null,sliceSerialize:x,sliceStream:b,write:p};let g=t.tokenize.call(m,d);return t.resolveAll&&s.push(t),m;function p(X){return u=or(u,X),E(),u[u.length-1]!==null?[]:(B(t,0),m.events=Lc(s,m.events,m),m.events)}function x(X,W){return Mz(b(X),W)}function b(X){return _z(u,X)}function w(){const{_bufferIndex:X,_index:W,line:oe,column:ne,offset:J}=l;return{_bufferIndex:X,_index:W,line:oe,column:ne,offset:J}}function C(X){o[X.line]=X.column,D()}function E(){let X;for(;l._index<u.length;){const W=u[l._index];if(typeof W=="string")for(X=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===X&&l._bufferIndex<W.length;)A(W.charCodeAt(l._bufferIndex));else A(W)}}function A(X){g=g(X)}function _(X){_e(X)?(l.line++,l.column=1,l.offset+=X===-3?2:1,D()):X!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===u[l._index].length&&(l._bufferIndex=-1,l._index++)),m.previous=X}function M(X,W){const oe=W||{};return oe.type=X,oe.start=w(),m.events.push(["enter",oe,m]),f.push(oe),oe}function z(X){const W=f.pop();return W.end=w(),m.events.push(["exit",W,m]),W}function P(X,W){B(X,W.from)}function j(X,W){W.restore()}function U(X,W){return oe;function oe(ne,J,I){let Y,G,V,T;return Array.isArray(ne)?H(ne):"tokenize"in ne?H([ne]):O(ne);function O(se){return re;function re(he){const ce=he!==null&&se[he],ge=he!==null&&se.null,Ce=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(ge)?ge:ge?[ge]:[]];return H(Ce)(he)}}function H(se){return Y=se,G=0,se.length===0?I:R(se[G])}function R(se){return re;function re(he){return T=Z(),V=se,se.partial||(m.currentConstruct=se),se.name&&m.parser.constructs.disable.null.includes(se.name)?fe():se.tokenize.call(W?Object.assign(Object.create(m),W):m,d,ue,fe)(he)}}function ue(se){return X(V,T),J}function fe(se){return T.restore(),++G<Y.length?R(Y[G]):I}}}function B(X,W){X.resolveAll&&!s.includes(X)&&s.push(X),X.resolve&&Vn(m.events,W,m.events.length-W,X.resolve(m.events.slice(W),m)),X.resolveTo&&(m.events=X.resolveTo(m.events,m))}function Z(){const X=w(),W=m.previous,oe=m.currentConstruct,ne=m.events.length,J=Array.from(f);return{from:ne,restore:I};function I(){l=X,m.previous=W,m.currentConstruct=oe,m.events.length=ne,f=J,D()}}function D(){l.line in o&&l.column<2&&(l.column=o[l.line],l.offset+=o[l.line]-1)}}function _z(e,t){const r=t.start._index,l=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex;let u;if(r===o)u=[e[r].slice(l,s)];else{if(u=e.slice(r,o),l>-1){const f=u[0];typeof f=="string"?u[0]=f.slice(l):u.shift()}s>0&&u.push(e[o].slice(0,s))}return u}function Mz(e,t){let r=-1;const l=[];let o;for(;++r<e.length;){const s=e[r];let u;if(typeof s=="string")u=s;else switch(s){case-5:{u="\r";break}case-4:{u=`
|
|
334
|
+
`;break}case-3:{u=`\r
|
|
335
|
+
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(s)}o=s===-2,l.push(u)}return l.join("")}function Nz(e){const l={constructs:OS([Az,...(e||{}).extensions||[]]),content:o(GO),defined:[],document:o(KO),flow:o(fz),lazy:{},string:o(pz),text:o(hz)};return l;function o(s){return u;function u(f){return Tz(l,s,f)}}}function Rz(e){for(;!LS(e););return e}const ab=/[\0\t\n\r]/g;function Oz(){let e=1,t="",r=!0,l;return o;function o(s,u,f){const d=[];let m,g,p,x,b;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(u||void 0).decode(s)),p=0,t="",r&&(s.charCodeAt(0)===65279&&p++,r=void 0);p<s.length;){if(ab.lastIndex=p,m=ab.exec(s),x=m&&m.index!==void 0?m.index:s.length,b=s.charCodeAt(x),!m){t=s.slice(p);break}if(b===10&&p===x&&l)d.push(-3),l=void 0;else switch(l&&(d.push(-5),l=void 0),p<x&&(d.push(s.slice(p,x)),e+=x-p),b){case 0:{d.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,d.push(-2);e++<g;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:l=!0,e=1}p=x+1}return f&&(l&&d.push(-5),t&&d.push(t),d.push(null)),d}}const jz=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zz(e){return e.replace(jz,Iz)}function Iz(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),s=o===120||o===88;return jS(r.slice(s?2:1),s?16:10)}return ph(r)||e}const VS={}.hasOwnProperty;function Dz(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),Lz(r)(Rz(Nz(r).document().write(Oz()(e,t,!0))))}function Lz(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Qt),autolinkProtocol:Z,autolinkEmail:Z,atxHeading:s(bt),blockQuote:s(ge),characterEscape:Z,characterReference:Z,codeFenced:s(Ce),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(Ce,u),codeText:s(ke,u),codeTextData:Z,data:Z,codeFlowValue:Z,definition:s(We),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s($e),hardBreakEscape:s(Kt),hardBreakTrailing:s(Kt),htmlFlow:s(en,u),htmlFlowData:Z,htmlText:s(en,u),htmlTextData:Z,image:s(Nn),label:u,link:s(Qt),listItem:s(Nt),listItemValue:x,listOrdered:s(Rn,p),listUnordered:s(Rn),paragraph:s(je),reference:R,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:s(bt),strong:s(at),thematicBreak:s(gt)},exit:{atxHeading:d(),atxHeadingSequence:P,autolink:d(),autolinkEmail:ce,autolinkProtocol:he,blockQuote:d(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:se,characterReference:re,codeFenced:d(E),codeFencedFence:C,codeFencedFenceInfo:b,codeFencedFenceMeta:w,codeFlowValue:D,codeIndented:d(A),codeText:d(J),codeTextData:D,data:D,definition:d(),definitionDestinationString:z,definitionLabelString:_,definitionTitleString:M,emphasis:d(),hardBreakEscape:d(W),hardBreakTrailing:d(W),htmlFlow:d(oe),htmlFlowData:D,htmlText:d(ne),htmlTextData:D,image:d(Y),label:V,labelText:G,lineEnding:X,link:d(I),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ue,resourceDestinationString:T,resourceTitleString:O,resource:H,setextHeading:d(B),setextHeadingLineSequence:U,setextHeadingText:j,strong:d(),thematicBreak:d()}};qS(t,(e||{}).mdastExtensions||[]);const r={};return l;function l(te){let de={type:"root",children:[]};const Ee={stack:[de],tokenStack:[],config:t,enter:f,exit:m,buffer:u,resume:g,data:r},ze=[];let Xe=-1;for(;++Xe<te.length;)if(te[Xe][1].type==="listOrdered"||te[Xe][1].type==="listUnordered")if(te[Xe][0]==="enter")ze.push(Xe);else{const Zt=ze.pop();Xe=o(te,Zt,Xe)}for(Xe=-1;++Xe<te.length;){const Zt=t[te[Xe][0]];VS.call(Zt,te[Xe][1].type)&&Zt[te[Xe][1].type].call(Object.assign({sliceSerialize:te[Xe][2].sliceSerialize},Ee),te[Xe][1])}if(Ee.tokenStack.length>0){const Zt=Ee.tokenStack[Ee.tokenStack.length-1];(Zt[1]||sb).call(Ee,void 0,Zt[0])}for(de.position={start:Li(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:Li(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<t.transforms.length;)de=t.transforms[Xe](de)||de;return de}function o(te,de,Ee){let ze=de-1,Xe=-1,Zt=!1,Ut,St,Et,Mt;for(;++ze<=Ee;){const qe=te[ze];switch(qe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{qe[0]==="enter"?Xe++:Xe--,Mt=void 0;break}case"lineEndingBlank":{qe[0]==="enter"&&(Ut&&!Mt&&!Xe&&!Et&&(Et=ze),Mt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Mt=void 0}if(!Xe&&qe[0]==="enter"&&qe[1].type==="listItemPrefix"||Xe===-1&&qe[0]==="exit"&&(qe[1].type==="listUnordered"||qe[1].type==="listOrdered")){if(Ut){let tn=ze;for(St=void 0;tn--;){const un=te[tn];if(un[1].type==="lineEnding"||un[1].type==="lineEndingBlank"){if(un[0]==="exit")continue;St&&(te[St][1].type="lineEndingBlank",Zt=!0),un[1].type="lineEnding",St=tn}else if(!(un[1].type==="linePrefix"||un[1].type==="blockQuotePrefix"||un[1].type==="blockQuotePrefixWhitespace"||un[1].type==="blockQuoteMarker"||un[1].type==="listItemIndent"))break}Et&&(!St||Et<St)&&(Ut._spread=!0),Ut.end=Object.assign({},St?te[St][1].start:qe[1].end),te.splice(St||ze,0,["exit",Ut,qe[2]]),ze++,Ee++}if(qe[1].type==="listItemPrefix"){const tn={type:"listItem",_spread:!1,start:Object.assign({},qe[1].start),end:void 0};Ut=tn,te.splice(ze,0,["enter",tn,qe[2]]),ze++,Ee++,Et=void 0,Mt=!0}}}return te[de][1]._spread=Zt,Ee}function s(te,de){return Ee;function Ee(ze){f.call(this,te(ze),ze),de&&de.call(this,ze)}}function u(){this.stack.push({type:"fragment",children:[]})}function f(te,de,Ee){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([de,Ee||void 0]),te.position={start:Li(de.start),end:void 0}}function d(te){return de;function de(Ee){te&&te.call(this,Ee),m.call(this,Ee)}}function m(te,de){const Ee=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==te.type&&(de?de.call(this,te,ze[0]):(ze[1]||sb).call(this,te,ze[0]));else throw new Error("Cannot close `"+te.type+"` ("+$a({start:te.start,end:te.end})+"): it’s not open");Ee.position.end=Li(te.end)}function g(){return mh(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function x(te){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function b(){const te=this.resume(),de=this.stack[this.stack.length-1];de.lang=te}function w(){const te=this.resume(),de=this.stack[this.stack.length-1];de.meta=te}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te.replace(/(\r?\n|\r)$/g,"")}function _(te){const de=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=de,Ee.identifier=yr(this.sliceSerialize(te)).toLowerCase()}function M(){const te=this.resume(),de=this.stack[this.stack.length-1];de.title=te}function z(){const te=this.resume(),de=this.stack[this.stack.length-1];de.url=te}function P(te){const de=this.stack[this.stack.length-1];if(!de.depth){const Ee=this.sliceSerialize(te).length;de.depth=Ee}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function U(te){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function Z(te){const Ee=this.stack[this.stack.length-1].children;let ze=Ee[Ee.length-1];(!ze||ze.type!=="text")&&(ze=De(),ze.position={start:Li(te.start),end:void 0},Ee.push(ze)),this.stack.push(ze)}function D(te){const de=this.stack.pop();de.value+=this.sliceSerialize(te),de.position.end=Li(te.end)}function X(te){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ee=de.children[de.children.length-1];Ee.position.end=Li(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(de.type)&&(Z.call(this,te),D.call(this,te))}function W(){this.data.atHardBreak=!0}function oe(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te}function ne(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te}function J(){const te=this.resume(),de=this.stack[this.stack.length-1];de.value=te}function I(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=de,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function Y(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=de,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function G(te){const de=this.sliceSerialize(te),Ee=this.stack[this.stack.length-2];Ee.label=zz(de),Ee.identifier=yr(de).toLowerCase()}function V(){const te=this.stack[this.stack.length-1],de=this.resume(),Ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ee.type==="link"){const ze=te.children;Ee.children=ze}else Ee.alt=de}function T(){const te=this.resume(),de=this.stack[this.stack.length-1];de.url=te}function O(){const te=this.resume(),de=this.stack[this.stack.length-1];de.title=te}function H(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function ue(te){const de=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=de,Ee.identifier=yr(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function fe(te){this.data.characterReferenceType=te.type}function se(te){const de=this.sliceSerialize(te),Ee=this.data.characterReferenceType;let ze;Ee?(ze=jS(de,Ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=ph(de);const Xe=this.stack[this.stack.length-1];Xe.value+=ze}function re(te){const de=this.stack.pop();de.position.end=Li(te.end)}function he(te){D.call(this,te);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(te)}function ce(te){D.call(this,te);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(te)}function ge(){return{type:"blockquote",children:[]}}function Ce(){return{type:"code",lang:null,meta:null,value:""}}function ke(){return{type:"inlineCode",value:""}}function We(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function $e(){return{type:"emphasis",children:[]}}function bt(){return{type:"heading",depth:0,children:[]}}function Kt(){return{type:"break"}}function en(){return{type:"html",value:""}}function Nn(){return{type:"image",title:null,url:"",alt:null}}function Qt(){return{type:"link",title:null,url:"",children:[]}}function Rn(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function Nt(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function je(){return{type:"paragraph",children:[]}}function at(){return{type:"strong",children:[]}}function De(){return{type:"text",value:""}}function gt(){return{type:"thematicBreak"}}}function Li(e){return{line:e.line,column:e.column,offset:e.offset}}function qS(e,t){let r=-1;for(;++r<t.length;){const l=t[r];Array.isArray(l)?qS(e,l):Pz(e,l)}}function Pz(e,t){let r;for(r in t)if(VS.call(t,r))switch(r){case"canContainEols":{const l=t[r];l&&e[r].push(...l);break}case"transforms":{const l=t[r];l&&e[r].push(...l);break}case"enter":case"exit":{const l=t[r];l&&Object.assign(e[r],l);break}}}function sb(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+$a({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$a({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+$a({start:t.start,end:t.end})+") is still open")}function Bz(e){const t=this;t.parser=r;function r(l){return Dz(l,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Uz(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function Fz(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
336
|
+
`}]}function Hz(e,t){const r=t.value?t.value+`
|
|
337
|
+
`:"",l={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(l.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:l,children:[{type:"text",value:r}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Vz(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function qz(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Gz(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(t.identifier).toUpperCase(),o=Uo(l.toLowerCase()),s=e.footnoteOrder.indexOf(l);let u,f=e.footnoteCounts.get(l);f===void 0?(f=0,e.footnoteOrder.push(l),u=e.footnoteOrder.length):u=s+1,f+=1,e.footnoteCounts.set(l,f);const d={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const m={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,m),e.applyData(t,m)}function Yz(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Kz(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function GS(e,t){const r=t.referenceType;let l="]";if(r==="collapsed"?l+="[]":r==="full"&&(l+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+l}];const o=e.all(t),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=l:o.push({type:"text",value:l}),o}function $z(e,t){const r=String(t.identifier).toUpperCase(),l=e.definitionById.get(r);if(!l)return GS(e,t);const o={src:Uo(l.url||""),alt:t.alt};l.title!==null&&l.title!==void 0&&(o.title=l.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,s),e.applyData(t,s)}function Xz(e,t){const r={src:Uo(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const l={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,l),e.applyData(t,l)}function Qz(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const l={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,l),e.applyData(t,l)}function Zz(e,t){const r=String(t.identifier).toUpperCase(),l=e.definitionById.get(r);if(!l)return GS(e,t);const o={href:Uo(l.url||"")};l.title!==null&&l.title!==void 0&&(o.title=l.title);const s={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Wz(e,t){const r={href:Uo(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const l={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Jz(e,t,r){const l=e.all(t),o=r?eI(r):YS(t),s={},u=[];if(typeof t.checked=="boolean"){const g=l[0];let p;g&&g.type==="element"&&g.tagName==="p"?p=g:(p={type:"element",tagName:"p",properties:{},children:[]},l.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<l.length;){const g=l[f];(o||f!==0||g.type!=="element"||g.tagName!=="p")&&u.push({type:"text",value:`
|
|
338
|
+
`}),g.type==="element"&&g.tagName==="p"&&!o?u.push(...g.children):u.push(g)}const d=l[l.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
|
|
339
|
+
`});const m={type:"element",tagName:"li",properties:s,children:u};return e.patch(t,m),e.applyData(t,m)}function eI(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let l=-1;for(;!t&&++l<r.length;)t=YS(r[l])}return t}function YS(e){const t=e.spread;return t??e.children.length>1}function tI(e,t){const r={},l=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++o<l.length;){const u=l[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(l,!0)};return e.patch(t,s),e.applyData(t,s)}function nI(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function rI(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function iI(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lI(e,t){const r=e.all(t),l=r.shift(),o=[];if(l){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(t.children[0],u),o.push(u)}if(r.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=uh(t.children[1]),d=ES(t.children[t.children.length-1]);f&&d&&(u.position={start:f,end:d}),o.push(u)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,s),e.applyData(t,s)}function oI(e,t,r){const l=r?r.children:void 0,s=(l?l.indexOf(t):1)===0?"th":"td",u=r&&r.type==="table"?r.align:void 0,f=u?u.length:t.children.length;let d=-1;const m=[];for(;++d<f;){const p=t.children[d],x={},b=u?u[d]:void 0;b&&(x.align=b);let w={type:"element",tagName:s,properties:x,children:[]};p&&(w.children=e.all(p),e.patch(p,w),w=e.applyData(p,w)),m.push(w)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,g),e.applyData(t,g)}function aI(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const ub=9,cb=32;function sI(e){const t=String(e),r=/\r?\n|\r/g;let l=r.exec(t),o=0;const s=[];for(;l;)s.push(fb(t.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=r.exec(t);return s.push(fb(t.slice(o),o>0,!1)),s.join("")}function fb(e,t,r){let l=0,o=e.length;if(t){let s=e.codePointAt(l);for(;s===ub||s===cb;)l++,s=e.codePointAt(l)}if(r){let s=e.codePointAt(o-1);for(;s===ub||s===cb;)o--,s=e.codePointAt(o-1)}return o>l?e.slice(l,o):""}function uI(e,t){const r={type:"text",value:sI(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function cI(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const fI={blockquote:Uz,break:Fz,code:Hz,delete:Vz,emphasis:qz,footnoteReference:Gz,heading:Yz,html:Kz,imageReference:$z,image:Xz,inlineCode:Qz,linkReference:Zz,link:Wz,listItem:Jz,list:tI,paragraph:nI,root:rI,strong:iI,table:lI,tableCell:aI,tableRow:oI,text:uI,thematicBreak:cI,toml:Bu,yaml:Bu,definition:Bu,footnoteDefinition:Bu};function Bu(){}const KS=-1,Pc=0,Qa=1,dc=2,gh=3,yh=4,vh=5,xh=6,$S=7,XS=8,db=typeof self=="object"?self:globalThis,dI=(e,t)=>{const r=(o,s)=>(e.set(s,o),o),l=o=>{if(e.has(o))return e.get(o);const[s,u]=t[o];switch(s){case Pc:case KS:return r(u,o);case Qa:{const f=r([],o);for(const d of u)f.push(l(d));return f}case dc:{const f=r({},o);for(const[d,m]of u)f[l(d)]=l(m);return f}case gh:return r(new Date(u),o);case yh:{const{source:f,flags:d}=u;return r(new RegExp(f,d),o)}case vh:{const f=r(new Map,o);for(const[d,m]of u)f.set(l(d),l(m));return f}case xh:{const f=r(new Set,o);for(const d of u)f.add(l(d));return f}case $S:{const{name:f,message:d}=u;return r(new db[f](d),o)}case XS:return r(BigInt(u),o);case"BigInt":return r(Object(BigInt(u)),o);case"ArrayBuffer":return r(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:f}=new Uint8Array(u);return r(new DataView(f),u)}}return r(new db[s](u),o)};return l},mb=e=>dI(new Map,e)(0),xo="",{toString:mI}={},{keys:pI}=Object,Va=e=>{const t=typeof e;if(t!=="object"||!e)return[Pc,t];const r=mI.call(e).slice(8,-1);switch(r){case"Array":return[Qa,xo];case"Object":return[dc,xo];case"Date":return[gh,xo];case"RegExp":return[yh,xo];case"Map":return[vh,xo];case"Set":return[xh,xo];case"DataView":return[Qa,r]}return r.includes("Array")?[Qa,r]:r.includes("Error")?[$S,r]:[dc,r]},Uu=([e,t])=>e===Pc&&(t==="function"||t==="symbol"),hI=(e,t,r,l)=>{const o=(u,f)=>{const d=l.push(u)-1;return r.set(f,d),d},s=u=>{if(r.has(u))return r.get(u);let[f,d]=Va(u);switch(f){case Pc:{let g=u;switch(d){case"bigint":f=XS,g=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return o([KS],u)}return o([f,g],u)}case Qa:{if(d){let x=u;return d==="DataView"?x=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(u)),o([d,[...x]],u)}const g=[],p=o([f,g],u);for(const x of u)g.push(s(x));return p}case dc:{if(d)switch(d){case"BigInt":return o([d,u.toString()],u);case"Boolean":case"Number":case"String":return o([d,u.valueOf()],u)}if(t&&"toJSON"in u)return s(u.toJSON());const g=[],p=o([f,g],u);for(const x of pI(u))(e||!Uu(Va(u[x])))&&g.push([s(x),s(u[x])]);return p}case gh:return o([f,u.toISOString()],u);case yh:{const{source:g,flags:p}=u;return o([f,{source:g,flags:p}],u)}case vh:{const g=[],p=o([f,g],u);for(const[x,b]of u)(e||!(Uu(Va(x))||Uu(Va(b))))&&g.push([s(x),s(b)]);return p}case xh:{const g=[],p=o([f,g],u);for(const x of u)(e||!Uu(Va(x)))&&g.push(s(x));return p}}const{message:m}=u;return o([f,{name:d,message:m}],u)};return s},pb=(e,{json:t,lossy:r}={})=>{const l=[];return hI(!(t||r),!!t,new Map,l)(e),l},mc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?mb(pb(e,t)):structuredClone(e):(e,t)=>mb(pb(e,t));function gI(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function yI(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function vI(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||gI,l=e.options.footnoteBackLabel||yI,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[d]);if(!m)continue;const g=e.all(m),p=String(m.identifier).toUpperCase(),x=Uo(p.toLowerCase());let b=0;const w=[],C=e.footnoteCounts.get(p);for(;C!==void 0&&++b<=C;){w.length>0&&w.push({type:"text",value:" "});let _=typeof r=="string"?r:r(d,b);typeof _=="string"&&(_={type:"text",value:_}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(d,b),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const E=g[g.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const _=E.children[E.children.length-1];_&&_.type==="text"?_.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...w)}else g.push(...w);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(g,!0)};e.patch(m,A),f.push(A)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...mc(u),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
340
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
341
|
+
`}]}}const Bc=(function(e){if(e==null)return wI;if(typeof e=="function")return Uc(e);if(typeof e=="object")return Array.isArray(e)?xI(e):bI(e);if(typeof e=="string")return SI(e);throw new Error("Expected function, string, or object as test")});function xI(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Bc(e[r]);return Uc(l);function l(...o){let s=-1;for(;++s<t.length;)if(t[s].apply(this,o))return!0;return!1}}function bI(e){const t=e;return Uc(r);function r(l){const o=l;let s;for(s in e)if(o[s]!==t[s])return!1;return!0}}function SI(e){return Uc(t);function t(r){return r&&r.type===e}}function Uc(e){return t;function t(r,l,o){return!!(CI(r)&&e.call(this,r,typeof l=="number"?l:void 0,o||void 0))}}function wI(){return!0}function CI(e){return e!==null&&typeof e=="object"&&"type"in e}const QS=[],kI=!0,xp=!1,EI="skip";function ZS(e,t,r,l){let o;typeof t=="function"&&typeof r!="function"?(l=r,r=t):o=t;const s=Bc(o),u=l?-1:1;f(e,void 0,[])();function f(d,m,g){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const b=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return x;function x(){let b=QS,w,C,E;if((!t||s(d,m,g[g.length-1]||void 0))&&(b=AI(r(d,g)),b[0]===xp))return b;if("children"in d&&d.children){const A=d;if(A.children&&b[0]!==EI)for(C=(l?A.children.length:-1)+u,E=g.concat(A);C>-1&&C<A.children.length;){const _=A.children[C];if(w=f(_,C,E)(),w[0]===xp)return w;C=typeof w[1]=="number"?w[1]:C+u}}return b}}}function AI(e){return Array.isArray(e)?e:typeof e=="number"?[kI,e]:e==null?QS:[e]}function bh(e,t,r,l){let o,s,u;typeof t=="function"&&typeof r!="function"?(s=void 0,u=t,o=r):(s=t,u=r,o=l),ZS(e,s,f,o);function f(d,m){const g=m[m.length-1],p=g?g.children.indexOf(d):void 0;return u(d,p,g)}}const bp={}.hasOwnProperty,TI={};function _I(e,t){const r=t||TI,l=new Map,o=new Map,s=new Map,u={...fI,...r.handlers},f={all:m,applyData:NI,definitionById:l,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:u,one:d,options:r,patch:MI,wrap:OI};return bh(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const p=g.type==="definition"?l:o,x=String(g.identifier).toUpperCase();p.has(x)||p.set(x,g)}}),f;function d(g,p){const x=g.type,b=f.handlers[x];if(bp.call(f.handlers,x)&&b)return b(f,g,p);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in g){const{children:C,...E}=g,A=mc(E);return A.children=f.all(g),A}return mc(g)}return(f.options.unknownHandler||RI)(f,g,p)}function m(g){const p=[];if("children"in g){const x=g.children;let b=-1;for(;++b<x.length;){const w=f.one(x[b],g);if(w){if(b&&x[b-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=hb(w.value)),!Array.isArray(w)&&w.type==="element")){const C=w.children[0];C&&C.type==="text"&&(C.value=hb(C.value))}Array.isArray(w)?p.push(...w):p.push(w)}}}return p}}function MI(e,t){e.position&&(t.position=yO(e))}function NI(e,t){let r=t;if(e&&e.data){const l=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof l=="string")if(r.type==="element")r.tagName=l;else{const u="children"in r?r.children:[r];r={type:"element",tagName:l,properties:{},children:u}}r.type==="element"&&s&&Object.assign(r.properties,mc(s)),"children"in r&&r.children&&o!==null&&o!==void 0&&(r.children=o)}return r}function RI(e,t){const r=t.data||{},l="value"in t&&!(bp.call(r,"hProperties")||bp.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function OI(e,t){const r=[];let l=-1;for(t&&r.push({type:"text",value:`
|
|
342
|
+
`});++l<e.length;)l&&r.push({type:"text",value:`
|
|
343
|
+
`}),r.push(e[l]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
344
|
+
`}),r}function hb(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function gb(e,t){const r=_I(e,t),l=r.one(e,void 0),o=vI(r),s=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
|
|
345
|
+
`},o),s}function jI(e,t){return e&&"run"in e?async function(r,l){const o=gb(r,{file:l,...t});await e.run(o,l)}:function(r,l){return gb(r,{file:l,...e||t})}}function yb(e){if(e)throw e}var Nm,vb;function zI(){if(vb)return Nm;vb=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},s=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var g=e.call(m,"constructor"),p=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!p)return!1;var x;for(x in m);return typeof x>"u"||e.call(m,x)},u=function(m,g){r&&g.name==="__proto__"?r(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},f=function(m,g){if(g==="__proto__")if(e.call(m,g)){if(l)return l(m,g).value}else return;return m[g]};return Nm=function d(){var m,g,p,x,b,w,C=arguments[0],E=1,A=arguments.length,_=!1;for(typeof C=="boolean"&&(_=C,C=arguments[1]||{},E=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});E<A;++E)if(m=arguments[E],m!=null)for(g in m)p=f(C,g),x=f(m,g),C!==x&&(_&&x&&(s(x)||(b=o(x)))?(b?(b=!1,w=p&&o(p)?p:[]):w=p&&s(p)?p:{},u(C,{name:g,newValue:d(_,w,x)})):typeof x<"u"&&u(C,{name:g,newValue:x}));return C},Nm}var II=zI();const Rm=kc(II);function Sp(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 DI(){const e=[],t={run:r,use:l};return t;function r(...o){let s=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);f(null,...o);function f(d,...m){const g=e[++s];let p=-1;if(d){u(d);return}for(;++p<o.length;)(m[p]===null||m[p]===void 0)&&(m[p]=o[p]);o=m,g?LI(g,f)(...m):u(null,...m)}}function l(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function LI(e,t){let r;return l;function l(...u){const f=e.length>u.length;let d;f&&u.push(o);try{d=e.apply(this,u)}catch(m){const g=m;if(f&&r)throw g;return o(g)}f||(d&&d.then&&typeof d.then=="function"?d.then(s,o):d instanceof Error?o(d):s(d))}function o(u,...f){r||(r=!0,t(u,...f))}function s(u){o(null,u)}}const Tr={basename:PI,dirname:BI,extname:UI,join:FI,sep:"/"};function PI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ds(e);let r=0,l=-1,o=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){r=o+1;break}}else l<0&&(s=!0,l=o+1);return l<0?"":e.slice(r,l)}if(t===e)return"";let u=-1,f=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){r=o+1;break}}else u<0&&(s=!0,u=o+1),f>-1&&(e.codePointAt(o)===t.codePointAt(f--)?f<0&&(l=o):(f=-1,l=u));return r===l?l=u:l<0&&(l=e.length),e.slice(r,l)}function BI(e){if(ds(e),e.length===0)return".";let t=-1,r=e.length,l;for(;--r;)if(e.codePointAt(r)===47){if(l){t=r;break}}else l||(l=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function UI(e){ds(e);let t=e.length,r=-1,l=0,o=-1,s=0,u;for(;t--;){const f=e.codePointAt(t);if(f===47){if(u){l=t+1;break}continue}r<0&&(u=!0,r=t+1),f===46?o<0?o=t:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||r<0||s===0||s===1&&o===r-1&&o===l+1?"":e.slice(o,r)}function FI(...e){let t=-1,r;for(;++t<e.length;)ds(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":HI(r)}function HI(e){ds(e);const t=e.codePointAt(0)===47;let r=VI(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function VI(e,t){let r="",l=0,o=-1,s=0,u=-1,f,d;for(;++u<=e.length;){if(u<e.length)f=e.codePointAt(u);else{if(f===47)break;f=47}if(f===47){if(!(o===u-1||s===1))if(o!==u-1&&s===2){if(r.length<2||l!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(d=r.lastIndexOf("/"),d!==r.length-1){d<0?(r="",l=0):(r=r.slice(0,d),l=r.length-1-r.lastIndexOf("/")),o=u,s=0;continue}}else if(r.length>0){r="",l=0,o=u,s=0;continue}}t&&(r=r.length>0?r+"/..":"..",l=2)}else r.length>0?r+="/"+e.slice(o+1,u):r=e.slice(o+1,u),l=u-o-1;o=u,s=0}else f===46&&s>-1?s++:s=-1}return r}function ds(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const qI={cwd:GI};function GI(){return"/"}function wp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function YI(e){if(typeof e=="string")e=new URL(e);else if(!wp(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 KI(e)}function KI(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const l=t.codePointAt(r+2);if(l===70||l===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Om=["history","path","basename","stem","extname","dirname"];class WS{constructor(t){let r;t?wp(t)?r={path:t}:typeof t=="string"||$I(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":qI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<Om.length;){const s=Om[l];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let o;for(o in r)Om.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?Tr.basename(this.path):void 0}set basename(t){zm(t,"basename"),jm(t,"basename"),this.path=Tr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Tr.dirname(this.path):void 0}set dirname(t){xb(this.basename,"dirname"),this.path=Tr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Tr.extname(this.path):void 0}set extname(t){if(jm(t,"extname"),xb(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=Tr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){wp(t)&&(t=YI(t)),zm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Tr.basename(this.path,this.extname):void 0}set stem(t){zm(t,"stem"),jm(t,"stem"),this.path=Tr.join(this.dirname||"",t+(this.extname||""))}fail(t,r,l){const o=this.message(t,r,l);throw o.fatal=!0,o}info(t,r,l){const o=this.message(t,r,l);return o.fatal=void 0,o}message(t,r,l){const o=new pn(t,r,l);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function jm(e,t){if(e&&e.includes(Tr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Tr.sep+"`")}function zm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function xb(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function $I(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const XI=(function(e){const l=this.constructor.prototype,o=l[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,l),s}),QI={}.hasOwnProperty;class Sh extends XI{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=DI()}copy(){const t=new Sh;let r=-1;for(;++r<this.attachers.length;){const l=this.attachers[r];t.use(...l)}return t.data(Rm(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Lm("data",this.frozen),this.namespace[t]=r,this):QI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Lm("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const o=r.call(t,...l);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Fu(t),l=this.parser||this.Parser;return Im("parse",l),l(String(r),r)}process(t,r){const l=this;return this.freeze(),Im("process",this.parser||this.Parser),Dm("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(s,u){const f=Fu(t),d=l.parse(f);l.run(d,f,function(g,p,x){if(g||!p||!x)return m(g);const b=p,w=l.stringify(b,x);JI(w)?x.value=w:x.result=w,m(g,x)});function m(g,p){g||!p?u(g):s?s(p):r(void 0,p)}}}processSync(t){let r=!1,l;return this.freeze(),Im("processSync",this.parser||this.Parser),Dm("processSync",this.compiler||this.Compiler),this.process(t,o),Sb("processSync","process",r),l;function o(s,u){r=!0,yb(s),l=u}}run(t,r,l){bb(t),this.freeze();const o=this.transformers;return!l&&typeof r=="function"&&(l=r,r=void 0),l?s(void 0,l):new Promise(s);function s(u,f){const d=Fu(r);o.run(t,d,m);function m(g,p,x){const b=p||t;g?f(g):u?u(b):l(void 0,b,x)}}}runSync(t,r){let l=!1,o;return this.run(t,r,s),Sb("runSync","run",l),o;function s(u,f){yb(u),o=f,l=!0}}stringify(t,r){this.freeze();const l=Fu(r),o=this.compiler||this.Compiler;return Dm("stringify",o),bb(t),o(t,l)}use(t,...r){const l=this.attachers,o=this.namespace;if(Lm("use",this.frozen),t!=null)if(typeof t=="function")d(t,r);else if(typeof t=="object")Array.isArray(t)?f(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(m){if(typeof m=="function")d(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...p]=m;d(g,p)}else u(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function u(m){if(!("plugins"in m)&&!("settings"in m))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");f(m.plugins),m.settings&&(o.settings=Rm(!0,o.settings,m.settings))}function f(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const p=m[g];s(p)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function d(m,g){let p=-1,x=-1;for(;++p<l.length;)if(l[p][0]===m){x=p;break}if(x===-1)l.push([m,...g]);else if(g.length>0){let[b,...w]=g;const C=l[x][1];Sp(C)&&Sp(b)&&(b=Rm(!0,C,b)),l[x]=[m,b,...w]}}}}const ZI=new Sh().freeze();function Im(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Dm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Lm(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 bb(e){if(!Sp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Sb(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fu(e){return WI(e)?e:new WS(e)}function WI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function JI(e){return typeof e=="string"||e3(e)}function e3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const t3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",wb=[],Cb={allowDangerousHtml:!0},n3=/^(https?|ircs?|mailto|xmpp)$/i,r3=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Fo(e){const t=i3(e),r=l3(e);return o3(t.runSync(t.parse(r),r),e)}function i3(e){const t=e.rehypePlugins||wb,r=e.remarkPlugins||wb,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Cb}:Cb;return ZI().use(Bz).use(r).use(jI,l).use(t)}function l3(e){const t=e.children||"",r=new WS;return typeof t=="string"&&(r.value=t),r}function o3(e,t){const r=t.allowedElements,l=t.allowElement,o=t.components,s=t.disallowedElements,u=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||a3;for(const g of r3)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+t3+g.id,void 0);return bh(e,m),wO(e,{Fragment:v.Fragment,components:o,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function m(g,p,x){if(g.type==="raw"&&x&&typeof p=="number")return u?x.children.splice(p,1):x.children[p]={type:"text",value:g.value},p;if(g.type==="element"){let b;for(b in Tm)if(Object.hasOwn(Tm,b)&&Object.hasOwn(g.properties,b)){const w=g.properties[b],C=Tm[b];(C===null||C.includes(g.tagName))&&(g.properties[b]=d(String(w||""),b,g))}}if(g.type==="element"){let b=r?!r.includes(g.tagName):s?s.includes(g.tagName):!1;if(!b&&l&&typeof p=="number"&&(b=!l(g,p,x)),b&&x&&typeof p=="number")return f&&g.children?x.children.splice(p,1,...g.children):x.children.splice(p,1),p}}}function a3(e){const t=e.indexOf(":"),r=e.indexOf("?"),l=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||r!==-1&&t>r||l!==-1&&t>l||n3.test(e.slice(0,t))?e:""}function kb(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let l=0,o=r.indexOf(t);for(;o!==-1;)l++,o=r.indexOf(t,o+t.length);return l}function s3(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function u3(e,t,r){const o=Bc((r||{}).ignore||[]),s=c3(t);let u=-1;for(;++u<s.length;)ZS(e,"text",f);function f(m,g){let p=-1,x;for(;++p<g.length;){const b=g[p],w=x?x.children:void 0;if(o(b,w?w.indexOf(b):void 0,x))return;x=b}if(x)return d(m,g)}function d(m,g){const p=g[g.length-1],x=s[u][0],b=s[u][1];let w=0;const E=p.children.indexOf(m);let A=!1,_=[];x.lastIndex=0;let M=x.exec(m.value);for(;M;){const z=M.index,P={index:M.index,input:M.input,stack:[...g,m]};let j=b(...M,P);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?x.lastIndex=z+1:(w!==z&&_.push({type:"text",value:m.value.slice(w,z)}),Array.isArray(j)?_.push(...j):j&&_.push(j),w=z+M[0].length,A=!0),!x.global)break;M=x.exec(m.value)}return A?(w<m.value.length&&_.push({type:"text",value:m.value.slice(w)}),p.children.splice(E,1,..._)):_=[m],E+_.length}}function c3(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let l=-1;for(;++l<r.length;){const o=r[l];t.push([f3(o[0]),d3(o[1])])}return t}function f3(e){return typeof e=="string"?new RegExp(s3(e),"g"):e}function d3(e){return typeof e=="function"?e:function(){return e}}const Pm="phrasing",Bm=["autolink","link","image","label"];function m3(){return{transforms:[b3],enter:{literalAutolink:h3,literalAutolinkEmail:Um,literalAutolinkHttp:Um,literalAutolinkWww:Um},exit:{literalAutolink:x3,literalAutolinkEmail:v3,literalAutolinkHttp:g3,literalAutolinkWww:y3}}}function p3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Pm,notInConstruct:Bm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Pm,notInConstruct:Bm},{character:":",before:"[ps]",after:"\\/",inConstruct:Pm,notInConstruct:Bm}]}}function h3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Um(e){this.config.enter.autolinkProtocol.call(this,e)}function g3(e){this.config.exit.autolinkProtocol.call(this,e)}function y3(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 v3(e){this.config.exit.autolinkEmail.call(this,e)}function x3(e){this.exit(e)}function b3(e){u3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,S3],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),w3]],{ignore:["link","linkReference"]})}function S3(e,t,r,l,o){let s="";if(!JS(o)||(/^w/i.test(t)&&(r=t+r,t="",s="http://"),!C3(r)))return!1;const u=k3(r+l);if(!u[0])return!1;const f={type:"link",title:null,url:s+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[f,{type:"text",value:u[1]}]:f}function w3(e,t,r,l){return!JS(l,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function C3(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 k3(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],l=r.indexOf(")");const o=kb(e,"(");let s=kb(e,")");for(;l!==-1&&o>s;)e+=r.slice(0,l+1),r=r.slice(l+1),l=r.indexOf(")"),s++;return[e,r]}function JS(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Cl(r)||Dc(r))&&(!t||r!==47)}ew.peek=j3;function E3(){this.buffer()}function A3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function T3(){this.buffer()}function _3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function M3(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=yr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function N3(e){this.exit(e)}function R3(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=yr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function O3(e){this.exit(e)}function j3(){return"["}function ew(e,t,r,l){const o=r.createTracker(l);let s=o.move("[^");const u=r.enter("footnoteReference"),f=r.enter("reference");return s+=o.move(r.safe(r.associationId(e),{after:"]",before:s})),f(),u(),s+=o.move("]"),s}function z3(){return{enter:{gfmFootnoteCallString:E3,gfmFootnoteCall:A3,gfmFootnoteDefinitionLabelString:T3,gfmFootnoteDefinition:_3},exit:{gfmFootnoteCallString:M3,gfmFootnoteCall:N3,gfmFootnoteDefinitionLabelString:R3,gfmFootnoteDefinition:O3}}}function I3(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:ew},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(l,o,s,u){const f=s.createTracker(u);let d=f.move("[^");const m=s.enter("footnoteDefinition"),g=s.enter("label");return d+=f.move(s.safe(s.associationId(l),{before:d,after:"]"})),g(),d+=f.move("]:"),l.children&&l.children.length>0&&(f.shift(4),d+=f.move((t?`
|
|
346
|
+
`:" ")+s.indentLines(s.containerFlow(l,f.current()),t?tw:D3))),m(),d}}function D3(e,t,r){return t===0?e:tw(e,t,r)}function tw(e,t,r){return(r?"":" ")+e}const L3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];nw.peek=H3;function P3(){return{canContainEols:["delete"],enter:{strikethrough:U3},exit:{strikethrough:F3}}}function B3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:L3}],handlers:{delete:nw}}}function U3(e){this.enter({type:"delete",children:[]},e)}function F3(e){this.exit(e)}function nw(e,t,r,l){const o=r.createTracker(l),s=r.enter("strikethrough");let u=o.move("~~");return u+=r.containerPhrasing(e,{...o.current(),before:u,after:"~"}),u+=o.move("~~"),s(),u}function H3(){return"~"}function V3(e){return e.length}function q3(e,t){const r=t||{},l=(r.align||[]).concat(),o=r.stringLength||V3,s=[],u=[],f=[],d=[];let m=0,g=-1;for(;++g<e.length;){const C=[],E=[];let A=-1;for(e[g].length>m&&(m=e[g].length);++A<e[g].length;){const _=G3(e[g][A]);if(r.alignDelimiters!==!1){const M=o(_);E[A]=M,(d[A]===void 0||M>d[A])&&(d[A]=M)}C.push(_)}u[g]=C,f[g]=E}let p=-1;if(typeof l=="object"&&"length"in l)for(;++p<m;)s[p]=Eb(l[p]);else{const C=Eb(l);for(;++p<m;)s[p]=C}p=-1;const x=[],b=[];for(;++p<m;){const C=s[p];let E="",A="";C===99?(E=":",A=":"):C===108?E=":":C===114&&(A=":");let _=r.alignDelimiters===!1?1:Math.max(1,d[p]-E.length-A.length);const M=E+"-".repeat(_)+A;r.alignDelimiters!==!1&&(_=E.length+_+A.length,_>d[p]&&(d[p]=_),b[p]=_),x[p]=M}u.splice(1,0,x),f.splice(1,0,b),g=-1;const w=[];for(;++g<u.length;){const C=u[g],E=f[g];p=-1;const A=[];for(;++p<m;){const _=C[p]||"";let M="",z="";if(r.alignDelimiters!==!1){const P=d[p]-(E[p]||0),j=s[p];j===114?M=" ".repeat(P):j===99?P%2?(M=" ".repeat(P/2+.5),z=" ".repeat(P/2-.5)):(M=" ".repeat(P/2),z=M):z=" ".repeat(P)}r.delimiterStart!==!1&&!p&&A.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&_==="")&&(r.delimiterStart!==!1||p)&&A.push(" "),r.alignDelimiters!==!1&&A.push(M),A.push(_),r.alignDelimiters!==!1&&A.push(z),r.padding!==!1&&A.push(" "),(r.delimiterEnd!==!1||p!==m-1)&&A.push("|")}w.push(r.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return w.join(`
|
|
347
|
+
`)}function G3(e){return e==null?"":String(e)}function Eb(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 Y3(e,t,r,l){const o=r.enter("blockquote"),s=r.createTracker(l);s.move("> "),s.shift(2);const u=r.indentLines(r.containerFlow(e,s.current()),K3);return o(),u}function K3(e,t,r){return">"+(r?"":" ")+e}function $3(e,t){return Ab(e,t.inConstruct,!0)&&!Ab(e,t.notInConstruct,!1)}function Ab(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let l=-1;for(;++l<t.length;)if(e.includes(t[l]))return!0;return!1}function Tb(e,t,r,l){let o=-1;for(;++o<r.unsafe.length;)if(r.unsafe[o].character===`
|
|
348
|
+
`&&$3(r.stack,r.unsafe[o]))return/[ \t]/.test(l.before)?"":" ";return`\\
|
|
349
|
+
`}function X3(e,t){const r=String(e);let l=r.indexOf(t),o=l,s=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===o?++s>u&&(u=s):s=1,o=l+t.length,l=r.indexOf(t,o);return u}function Q3(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 Z3(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 W3(e,t,r,l){const o=Z3(r),s=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(Q3(e,r)){const p=r.enter("codeIndented"),x=r.indentLines(s,J3);return p(),x}const f=r.createTracker(l),d=o.repeat(Math.max(X3(s,o)+1,3)),m=r.enter("codeFenced");let g=f.move(d);if(e.lang){const p=r.enter(`codeFencedLang${u}`);g+=f.move(r.safe(e.lang,{before:g,after:" ",encode:["`"],...f.current()})),p()}if(e.lang&&e.meta){const p=r.enter(`codeFencedMeta${u}`);g+=f.move(" "),g+=f.move(r.safe(e.meta,{before:g,after:`
|
|
350
|
+
`,encode:["`"],...f.current()})),p()}return g+=f.move(`
|
|
351
|
+
`),s&&(g+=f.move(s+`
|
|
352
|
+
`)),g+=f.move(d),m(),g}function J3(e,t,r){return(r?"":" ")+e}function wh(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 eD(e,t,r,l){const o=wh(r),s=o==='"'?"Quote":"Apostrophe",u=r.enter("definition");let f=r.enter("label");const d=r.createTracker(l);let m=d.move("[");return m+=d.move(r.safe(r.associationId(e),{before:m,after:"]",...d.current()})),m+=d.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),m+=d.move("<"),m+=d.move(r.safe(e.url,{before:m,after:">",...d.current()})),m+=d.move(">")):(f=r.enter("destinationRaw"),m+=d.move(r.safe(e.url,{before:m,after:e.title?" ":`
|
|
353
|
+
`,...d.current()}))),f(),e.title&&(f=r.enter(`title${s}`),m+=d.move(" "+o),m+=d.move(r.safe(e.title,{before:m,after:o,...d.current()})),m+=d.move(o),f()),u(),m}function tD(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 rs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function pc(e,t,r){const l=Oo(e),o=Oo(t);return l===void 0?o===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}rw.peek=nD;function rw(e,t,r,l){const o=tD(r),s=r.enter("emphasis"),u=r.createTracker(l),f=u.move(o);let d=u.move(r.containerPhrasing(e,{after:o,before:f,...u.current()}));const m=d.charCodeAt(0),g=pc(l.before.charCodeAt(l.before.length-1),m,o);g.inside&&(d=rs(m)+d.slice(1));const p=d.charCodeAt(d.length-1),x=pc(l.after.charCodeAt(0),p,o);x.inside&&(d=d.slice(0,-1)+rs(p));const b=u.move(o);return s(),r.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},f+d+b}function nD(e,t,r){return r.options.emphasis||"*"}function rD(e,t){let r=!1;return bh(e,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return r=!0,xp}),!!((!e.depth||e.depth<3)&&mh(e)&&(t.options.setext||r))}function iD(e,t,r,l){const o=Math.max(Math.min(6,e.depth||1),1),s=r.createTracker(l);if(rD(e,r)){const g=r.enter("headingSetext"),p=r.enter("phrasing"),x=r.containerPhrasing(e,{...s.current(),before:`
|
|
354
|
+
`,after:`
|
|
355
|
+
`});return p(),g(),x+`
|
|
356
|
+
`+(o===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
357
|
+
`))+1))}const u="#".repeat(o),f=r.enter("headingAtx"),d=r.enter("phrasing");s.move(u+" ");let m=r.containerPhrasing(e,{before:"# ",after:`
|
|
358
|
+
`,...s.current()});return/^[\t ]/.test(m)&&(m=rs(m.charCodeAt(0))+m.slice(1)),m=m?u+" "+m:u,r.options.closeAtx&&(m+=" "+u),d(),f(),m}iw.peek=lD;function iw(e){return e.value||""}function lD(){return"<"}lw.peek=oD;function lw(e,t,r,l){const o=wh(r),s=o==='"'?"Quote":"Apostrophe",u=r.enter("image");let f=r.enter("label");const d=r.createTracker(l);let m=d.move("![");return m+=d.move(r.safe(e.alt,{before:m,after:"]",...d.current()})),m+=d.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),m+=d.move("<"),m+=d.move(r.safe(e.url,{before:m,after:">",...d.current()})),m+=d.move(">")):(f=r.enter("destinationRaw"),m+=d.move(r.safe(e.url,{before:m,after:e.title?" ":")",...d.current()}))),f(),e.title&&(f=r.enter(`title${s}`),m+=d.move(" "+o),m+=d.move(r.safe(e.title,{before:m,after:o,...d.current()})),m+=d.move(o),f()),m+=d.move(")"),u(),m}function oD(){return"!"}ow.peek=aD;function ow(e,t,r,l){const o=e.referenceType,s=r.enter("imageReference");let u=r.enter("label");const f=r.createTracker(l);let d=f.move("![");const m=r.safe(e.alt,{before:d,after:"]",...f.current()});d+=f.move(m+"]["),u();const g=r.stack;r.stack=[],u=r.enter("reference");const p=r.safe(r.associationId(e),{before:d,after:"]",...f.current()});return u(),r.stack=g,s(),o==="full"||!m||m!==p?d+=f.move(p+"]"):o==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function aD(){return"!"}aw.peek=sD;function aw(e,t,r){let l=e.value||"",o="`",s=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(l);)o+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++s<r.unsafe.length;){const u=r.unsafe[s],f=r.compilePattern(u);let d;if(u.atBreak)for(;d=f.exec(l);){let m=d.index;l.charCodeAt(m)===10&&l.charCodeAt(m-1)===13&&m--,l=l.slice(0,m)+" "+l.slice(d.index+1)}}return o+l+o}function sD(){return"`"}function sw(e,t){const r=mh(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}uw.peek=uD;function uw(e,t,r,l){const o=wh(r),s=o==='"'?"Quote":"Apostrophe",u=r.createTracker(l);let f,d;if(sw(e,r)){const g=r.stack;r.stack=[],f=r.enter("autolink");let p=u.move("<");return p+=u.move(r.containerPhrasing(e,{before:p,after:">",...u.current()})),p+=u.move(">"),f(),r.stack=g,p}f=r.enter("link"),d=r.enter("label");let m=u.move("[");return m+=u.move(r.containerPhrasing(e,{before:m,after:"](",...u.current()})),m+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),m+=u.move("<"),m+=u.move(r.safe(e.url,{before:m,after:">",...u.current()})),m+=u.move(">")):(d=r.enter("destinationRaw"),m+=u.move(r.safe(e.url,{before:m,after:e.title?" ":")",...u.current()}))),d(),e.title&&(d=r.enter(`title${s}`),m+=u.move(" "+o),m+=u.move(r.safe(e.title,{before:m,after:o,...u.current()})),m+=u.move(o),d()),m+=u.move(")"),f(),m}function uD(e,t,r){return sw(e,r)?"<":"["}cw.peek=cD;function cw(e,t,r,l){const o=e.referenceType,s=r.enter("linkReference");let u=r.enter("label");const f=r.createTracker(l);let d=f.move("[");const m=r.containerPhrasing(e,{before:d,after:"]",...f.current()});d+=f.move(m+"]["),u();const g=r.stack;r.stack=[],u=r.enter("reference");const p=r.safe(r.associationId(e),{before:d,after:"]",...f.current()});return u(),r.stack=g,s(),o==="full"||!m||m!==p?d+=f.move(p+"]"):o==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function cD(){return"["}function Ch(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 fD(e){const t=Ch(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function dD(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 fw(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 mD(e,t,r,l){const o=r.enter("list"),s=r.bulletCurrent;let u=e.ordered?dD(r):Ch(r);const f=e.ordered?u==="."?")":".":fD(r);let d=t&&r.bulletLastUsed?u===r.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&g&&(!g.children||!g.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(d=!0),fw(r)===u&&g){let p=-1;for(;++p<e.children.length;){const x=e.children[p];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=f),r.bulletCurrent=u;const m=r.containerFlow(e,l);return r.bulletLastUsed=u,r.bulletCurrent=s,o(),m}function pD(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 hD(e,t,r,l){const o=pD(r);let s=r.bulletCurrent||Ch(r);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let u=s.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const f=r.createTracker(l);f.move(s+" ".repeat(u-s.length)),f.shift(u);const d=r.enter("listItem"),m=r.indentLines(r.containerFlow(e,f.current()),g);return d(),m;function g(p,x,b){return x?(b?"":" ".repeat(u))+p:(b?s:s+" ".repeat(u-s.length))+p}}function gD(e,t,r,l){const o=r.enter("paragraph"),s=r.enter("phrasing"),u=r.containerPhrasing(e,l);return s(),o(),u}const yD=Bc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function vD(e,t,r,l){return(e.children.some(function(u){return yD(u)})?r.containerPhrasing:r.containerFlow).call(r,e,l)}function xD(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}dw.peek=bD;function dw(e,t,r,l){const o=xD(r),s=r.enter("strong"),u=r.createTracker(l),f=u.move(o+o);let d=u.move(r.containerPhrasing(e,{after:o,before:f,...u.current()}));const m=d.charCodeAt(0),g=pc(l.before.charCodeAt(l.before.length-1),m,o);g.inside&&(d=rs(m)+d.slice(1));const p=d.charCodeAt(d.length-1),x=pc(l.after.charCodeAt(0),p,o);x.inside&&(d=d.slice(0,-1)+rs(p));const b=u.move(o+o);return s(),r.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},f+d+b}function bD(e,t,r){return r.options.strong||"*"}function SD(e,t,r,l){return r.safe(e.value,l)}function wD(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 CD(e,t,r){const l=(fw(r)+(r.options.ruleSpaces?" ":"")).repeat(wD(r));return r.options.ruleSpaces?l.slice(0,-1):l}const mw={blockquote:Y3,break:Tb,code:W3,definition:eD,emphasis:rw,hardBreak:Tb,heading:iD,html:iw,image:lw,imageReference:ow,inlineCode:aw,link:uw,linkReference:cw,list:mD,listItem:hD,paragraph:gD,root:vD,strong:dw,text:SD,thematicBreak:CD};function kD(){return{enter:{table:ED,tableData:_b,tableHeader:_b,tableRow:TD},exit:{codeText:_D,table:AD,tableData:Fm,tableHeader:Fm,tableRow:Fm}}}function ED(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function AD(e){this.exit(e),this.data.inTable=void 0}function TD(e){this.enter({type:"tableRow",children:[]},e)}function Fm(e){this.exit(e)}function _b(e){this.enter({type:"tableCell",children:[]},e)}function _D(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,MD));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function MD(e,t){return t==="|"?t:e}function ND(e){const t=e||{},r=t.tableCellPadding,l=t.tablePipeAlign,o=t.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
359
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:u,tableCell:d,tableRow:f}};function u(b,w,C,E){return m(g(b,C,E),b.align)}function f(b,w,C,E){const A=p(b,C,E),_=m([A]);return _.slice(0,_.indexOf(`
|
|
360
|
+
`))}function d(b,w,C,E){const A=C.enter("tableCell"),_=C.enter("phrasing"),M=C.containerPhrasing(b,{...E,before:s,after:s});return _(),A(),M}function m(b,w){return q3(b,{align:w,alignDelimiters:l,padding:r,stringLength:o})}function g(b,w,C){const E=b.children;let A=-1;const _=[],M=w.enter("table");for(;++A<E.length;)_[A]=p(E[A],w,C);return M(),_}function p(b,w,C){const E=b.children;let A=-1;const _=[],M=w.enter("tableRow");for(;++A<E.length;)_[A]=d(E[A],b,w,C);return M(),_}function x(b,w,C){let E=mw.inlineCode(b,w,C);return C.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function RD(){return{exit:{taskListCheckValueChecked:Mb,taskListCheckValueUnchecked:Mb,paragraph:jD}}}function OD(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:zD}}}function Mb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function jD(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const l=r.children[0];if(l&&l.type==="text"){const o=t.children;let s=-1,u;for(;++s<o.length;){const f=o[s];if(f.type==="paragraph"){u=f;break}}u===r&&(l.value=l.value.slice(1),l.value.length===0?r.children.shift():r.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,r.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function zD(e,t,r,l){const o=e.children[0],s=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",f=r.createTracker(l);s&&f.move(u);let d=mw.listItem(e,t,r,{...l,...f.current()});return s&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),d;function m(g){return g+u}}function ID(){return[m3(),z3(),P3(),kD(),RD()]}function DD(e){return{extensions:[p3(),I3(e),B3(),ND(e),OD()]}}const LD={tokenize:VD,partial:!0},pw={tokenize:qD,partial:!0},hw={tokenize:GD,partial:!0},gw={tokenize:YD,partial:!0},PD={tokenize:KD,partial:!0},yw={name:"wwwAutolink",tokenize:FD,previous:xw},vw={name:"protocolAutolink",tokenize:HD,previous:bw},oi={name:"emailAutolink",tokenize:UD,previous:Sw},Rr={};function BD(){return{text:Rr}}let yl=48;for(;yl<123;)Rr[yl]=oi,yl++,yl===58?yl=65:yl===91&&(yl=97);Rr[43]=oi;Rr[45]=oi;Rr[46]=oi;Rr[95]=oi;Rr[72]=[oi,vw];Rr[104]=[oi,vw];Rr[87]=[oi,yw];Rr[119]=[oi,yw];function UD(e,t,r){const l=this;let o,s;return u;function u(p){return!Cp(p)||!Sw.call(l,l.previous)||kh(l.events)?r(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(p))}function f(p){return Cp(p)?(e.consume(p),f):p===64?(e.consume(p),d):r(p)}function d(p){return p===46?e.check(PD,g,m)(p):p===45||p===95||dn(p)?(s=!0,e.consume(p),d):g(p)}function m(p){return e.consume(p),o=!0,d}function g(p){return s&&o&&vn(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):r(p)}}function FD(e,t,r){const l=this;return o;function o(u){return u!==87&&u!==119||!xw.call(l,l.previous)||kh(l.events)?r(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(LD,e.attempt(pw,e.attempt(hw,s),r),r)(u))}function s(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function HD(e,t,r){const l=this;let o="",s=!1;return u;function u(p){return(p===72||p===104)&&bw.call(l,l.previous)&&!kh(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(p),e.consume(p),f):r(p)}function f(p){if(vn(p)&&o.length<5)return o+=String.fromCodePoint(p),e.consume(p),f;if(p===58){const x=o.toLowerCase();if(x==="http"||x==="https")return e.consume(p),d}return r(p)}function d(p){return p===47?(e.consume(p),s?m:(s=!0,d)):r(p)}function m(p){return p===null||fc(p)||vt(p)||Cl(p)||Dc(p)?r(p):e.attempt(pw,e.attempt(hw,g),r)(p)}function g(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function VD(e,t,r){let l=0;return o;function o(u){return(u===87||u===119)&&l<3?(l++,e.consume(u),o):u===46&&l===3?(e.consume(u),s):r(u)}function s(u){return u===null?r(u):t(u)}}function qD(e,t,r){let l,o,s;return u;function u(m){return m===46||m===95?e.check(gw,d,f)(m):m===null||vt(m)||Cl(m)||m!==45&&Dc(m)?d(m):(s=!0,e.consume(m),u)}function f(m){return m===95?l=!0:(o=l,l=void 0),e.consume(m),u}function d(m){return o||l||!s?r(m):t(m)}}function GD(e,t){let r=0,l=0;return o;function o(u){return u===40?(r++,e.consume(u),o):u===41&&l<r?s(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(gw,t,s)(u):u===null||vt(u)||Cl(u)?t(u):(e.consume(u),o)}function s(u){return u===41&&l++,e.consume(u),o}}function YD(e,t,r){return l;function l(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),l):f===38?(e.consume(f),s):f===93?(e.consume(f),o):f===60||f===null||vt(f)||Cl(f)?t(f):r(f)}function o(f){return f===null||f===40||f===91||vt(f)||Cl(f)?t(f):l(f)}function s(f){return vn(f)?u(f):r(f)}function u(f){return f===59?(e.consume(f),l):vn(f)?(e.consume(f),u):r(f)}}function KD(e,t,r){return l;function l(s){return e.consume(s),o}function o(s){return dn(s)?r(s):t(s)}}function xw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||vt(e)}function bw(e){return!vn(e)}function Sw(e){return!(e===47||Cp(e))}function Cp(e){return e===43||e===45||e===46||e===95||dn(e)}function kh(e){let t=e.length,r=!1;for(;t--;){const l=e[t][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){r=!0;break}if(l._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const $D={tokenize:nL,partial:!0};function XD(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:JD,continuation:{tokenize:eL},exit:tL}},text:{91:{name:"gfmFootnoteCall",tokenize:WD},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:QD,resolveTo:ZD}}}}function QD(e,t,r){const l=this;let o=l.events.length;const s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u;for(;o--;){const d=l.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return f;function f(d){if(!u||!u._balanced)return r(d);const m=yr(l.sliceSerialize({start:u.end,end:l.now()}));return m.codePointAt(0)!==94||!s.includes(m.slice(1))?r(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function ZD(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},f=[e[r+1],e[r+2],["enter",l,t],e[r+3],e[r+4],["enter",o,t],["exit",o,t],["enter",s,t],["enter",u,t],["exit",u,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",l,t]];return e.splice(r,e.length-r+1,...f),e}function WD(e,t,r){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let s=0,u;return f;function f(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?r(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(p){if(s>999||p===93&&!u||p===null||p===91||vt(p))return r(p);if(p===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return o.includes(yr(l.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(p)}return vt(p)||(u=!0),s++,e.consume(p),p===92?g:m}function g(p){return p===91||p===92||p===93?(e.consume(p),s++,m):m(p)}}function JD(e,t,r){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let s,u=0,f;return d;function d(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):r(w)}function g(w){if(u>999||w===93&&!f||w===null||w===91||vt(w))return r(w);if(w===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return s=yr(l.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return vt(w)||(f=!0),u++,e.consume(w),w===92?p:g}function p(w){return w===91||w===92||w===93?(e.consume(w),u++,g):g(w)}function x(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),o.includes(s)||o.push(s),tt(e,b,"gfmFootnoteDefinitionWhitespace")):r(w)}function b(w){return t(w)}}function eL(e,t,r){return e.check(fs,t,e.attempt($D,t,r))}function tL(e){e.exit("gfmFootnoteDefinition")}function nL(e,t,r){const l=this;return tt(e,o,"gfmFootnoteDefinitionIndent",5);function o(s){const u=l.events[l.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(s):r(s)}}function rL(e){let r=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:s,resolveAll:o};return r==null&&(r=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function o(u,f){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let m=d;for(;m--;)if(u[m][0]==="exit"&&u[m][1].type==="strikethroughSequenceTemporary"&&u[m][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[m][1].end.offset-u[m][1].start.offset){u[d][1].type="strikethroughSequence",u[m][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},u[m][1].start),end:Object.assign({},u[d][1].end)},p={type:"strikethroughText",start:Object.assign({},u[m][1].end),end:Object.assign({},u[d][1].start)},x=[["enter",g,f],["enter",u[m][1],f],["exit",u[m][1],f],["enter",p,f]],b=f.parser.constructs.insideSpan.null;b&&Vn(x,x.length,0,Lc(b,u.slice(m+1,d),f)),Vn(x,x.length,0,[["exit",p,f],["enter",u[d][1],f],["exit",u[d][1],f],["exit",g,f]]),Vn(u,m-1,d-m+3,x),d=m+x.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function s(u,f,d){const m=this.previous,g=this.events;let p=0;return x;function x(w){return m===126&&g[g.length-1][1].type!=="characterEscape"?d(w):(u.enter("strikethroughSequenceTemporary"),b(w))}function b(w){const C=Oo(m);if(w===126)return p>1?d(w):(u.consume(w),p++,b);if(p<2&&!r)return d(w);const E=u.exit("strikethroughSequenceTemporary"),A=Oo(w);return E._open=!A||A===2&&!!C,E._close=!C||C===2&&!!A,f(w)}}}class iL{constructor(){this.map=[]}add(t,r,l){lL(this,t,r,l)}consume(t){if(this.map.sort(function(s,u){return s[0]-u[0]}),this.map.length===0)return;let r=this.map.length;const l=[];for(;r>0;)r-=1,l.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];l.push(t.slice()),t.length=0;let o=l.pop();for(;o;){for(const s of o)t.push(s);o=l.pop()}this.map.length=0}}function lL(e,t,r,l){let o=0;if(!(r===0&&l.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=r,e.map[o][2].push(...l);return}o+=1}e.map.push([t,r,l])}}function oL(e,t){let r=!1;const l=[];for(;t<e.length;){const o=e[t];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&l.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=l.length-1;l[s]=l[s]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return l}function aL(){return{flow:{null:{name:"table",tokenize:sL,resolveAll:uL}}}}function sL(e,t,r){const l=this;let o=0,s=0,u;return f;function f(D){let X=l.events.length-1;for(;X>-1;){const ne=l.events[X][1].type;if(ne==="lineEnding"||ne==="linePrefix")X--;else break}const W=X>-1?l.events[X][1].type:null,oe=W==="tableHead"||W==="tableRow"?j:d;return oe===j&&l.parser.lazy[l.now().line]?r(D):oe(D)}function d(D){return e.enter("tableHead"),e.enter("tableRow"),m(D)}function m(D){return D===124||(u=!0,s+=1),g(D)}function g(D){return D===null?r(D):_e(D)?s>1?(s=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),b):r(D):Ke(D)?tt(e,g,"whitespace")(D):(s+=1,u&&(u=!1,o+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),u=!0,g):(e.enter("data"),p(D)))}function p(D){return D===null||D===124||vt(D)?(e.exit("data"),g(D)):(e.consume(D),D===92?x:p)}function x(D){return D===92||D===124?(e.consume(D),p):p(D)}function b(D){return l.interrupt=!1,l.parser.lazy[l.now().line]?r(D):(e.enter("tableDelimiterRow"),u=!1,Ke(D)?tt(e,w,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):w(D))}function w(D){return D===45||D===58?E(D):D===124?(u=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),C):P(D)}function C(D){return Ke(D)?tt(e,E,"whitespace")(D):E(D)}function E(D){return D===58?(s+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),A):D===45?(s+=1,A(D)):D===null||_e(D)?z(D):P(D)}function A(D){return D===45?(e.enter("tableDelimiterFiller"),_(D)):P(D)}function _(D){return D===45?(e.consume(D),_):D===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),M):(e.exit("tableDelimiterFiller"),M(D))}function M(D){return Ke(D)?tt(e,z,"whitespace")(D):z(D)}function z(D){return D===124?w(D):D===null||_e(D)?!u||o!==s?P(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):P(D)}function P(D){return r(D)}function j(D){return e.enter("tableRow"),U(D)}function U(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),U):D===null||_e(D)?(e.exit("tableRow"),t(D)):Ke(D)?tt(e,U,"whitespace")(D):(e.enter("data"),B(D))}function B(D){return D===null||D===124||vt(D)?(e.exit("data"),U(D)):(e.consume(D),D===92?Z:B)}function Z(D){return D===92||D===124?(e.consume(D),B):B(D)}}function uL(e,t){let r=-1,l=!0,o=0,s=[0,0,0,0],u=[0,0,0,0],f=!1,d=0,m,g,p;const x=new iL;for(;++r<e.length;){const b=e[r],w=b[1];b[0]==="enter"?w.type==="tableHead"?(f=!1,d!==0&&(Nb(x,t,d,m,g),g=void 0,d=0),m={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},x.add(r,0,[["enter",m,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(l=!0,p=void 0,s=[0,0,0,0],u=[0,r+1,0,0],f&&(f=!1,g={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},x.add(r,0,[["enter",g,t]])),o=w.type==="tableDelimiterRow"?2:g?3:1):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(l=!1,u[2]===0&&(s[1]!==0&&(u[0]=u[1],p=Hu(x,t,s,o,void 0,p),s=[0,0,0,0]),u[2]=r)):w.type==="tableCellDivider"&&(l?l=!1:(s[1]!==0&&(u[0]=u[1],p=Hu(x,t,s,o,void 0,p)),s=u,u=[s[1],r,0,0])):w.type==="tableHead"?(f=!0,d=r):w.type==="tableRow"||w.type==="tableDelimiterRow"?(d=r,s[1]!==0?(u[0]=u[1],p=Hu(x,t,s,o,r,p)):u[1]!==0&&(p=Hu(x,t,u,o,r,p)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=r)}for(d!==0&&Nb(x,t,d,m,g),x.consume(t.events),r=-1;++r<t.events.length;){const b=t.events[r];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=oL(t.events,r))}return e}function Hu(e,t,r,l,o,s){const u=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(s.end=Object.assign({},Co(t.events,r[0])),e.add(r[0],0,[["exit",s,t]]));const d=Co(t.events,r[1]);if(s={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(r[1],0,[["enter",s,t]]),r[2]!==0){const m=Co(t.events,r[2]),g=Co(t.events,r[3]),p={type:f,start:Object.assign({},m),end:Object.assign({},g)};if(e.add(r[2],0,[["enter",p,t]]),l!==2){const x=t.events[r[2]],b=t.events[r[3]];if(x[1].end=Object.assign({},b[1].end),x[1].type="chunkText",x[1].contentType="text",r[3]>r[2]+1){const w=r[2]+1,C=r[3]-r[2]-1;e.add(w,C,[])}}e.add(r[3]+1,0,[["exit",p,t]])}return o!==void 0&&(s.end=Object.assign({},Co(t.events,o)),e.add(o,0,[["exit",s,t]]),s=void 0),s}function Nb(e,t,r,l,o){const s=[],u=Co(t.events,r);o&&(o.end=Object.assign({},u),s.push(["exit",o,t])),l.end=Object.assign({},u),s.push(["exit",l,t]),e.add(r+1,0,s)}function Co(e,t){const r=e[t],l=r[0]==="enter"?"start":"end";return r[1][l]}const cL={name:"tasklistCheck",tokenize:dL};function fL(){return{text:{91:cL}}}function dL(e,t,r){const l=this;return o;function o(d){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?r(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),s)}function s(d){return vt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):r(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(d)}function f(d){return _e(d)?t(d):Ke(d)?e.check({tokenize:mL},t,r)(d):r(d)}}function mL(e,t,r){return tt(e,l,"whitespace");function l(o){return o===null?r(o):t(o)}}function pL(e){return OS([BD(),XD(),rL(e),aL(),fL()])}const hL={};function Ho(e){const t=this,r=e||hL,l=t.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),s=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),u=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(pL(r)),s.push(ID()),u.push(DD(r))}function gL({message:e,onRemove:t,onSendNow:r}){return v.jsx("div",{className:"flex justify-end py-2",children:v.jsxs("div",{className:"flex max-w-[85%] sm:max-w-[80%] flex-col items-end gap-1.5",children:[e.attachments.length>0?v.jsx("div",{className:"flex flex-wrap justify-end gap-2",children:e.attachments.map(l=>v.jsxs("div",{className:"max-w-[220px] rounded-xl border border-dashed border-border bg-transparent px-3 py-2 text-left",children:[v.jsx("div",{className:"truncate text-[13px] font-medium text-foreground",children:l.displayName}),v.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:l.mimeType})]},l.id))}):null,e.content?v.jsxs("div",{className:"relative group",children:[v.jsxs("div",{className:"grid grid-cols-[1fr_auto] items-end gap-2.5 rounded-[20px] border border-dashed border-border bg-transparent pl-3.5 pr-1.5 py-1.5 prose prose-sm prose-invert text-left text-primary [&_p]:whitespace-pre-line",children:[v.jsx("div",{children:v.jsx(Fo,{remarkPlugins:[Ho],components:Po(),children:e.content})}),v.jsx(zt,{type:"button",variant:"default",size:"none",className:"rounded-full size-[24px] bg-muted text-muted-foreground border border-primary/10 group-hover:!text-primary hover:bg-muted/60",onClick:r,children:v.jsx(YT,{className:"size-3.5"})})]}),v.jsx(zt,{type:"button",variant:"none",size:"none",className:"opacity-0 scale-[0.1] group-hover:scale-[1.0] group-hover:opacity-100 !p-0.5 border rounded-full text-xs font-medium text-muted-foreground hover:text-foreground gap-0.5 absolute top-0 left-0 bg-background -translate-x-[28%] -translate-y-[28%]",onClick:t,children:v.jsx(Lo,{className:"size-3"})})]}):null]})})}const yL={connecting:"Connecting...",acquiring_sandbox:"Booting...",initializing:"Initializing...",starting:"Starting...",running:"Running...",waiting_for_user:"Waiting...",failed:"Failed"};function vL({status:e}){const t=(e?yL[e]:void 0)||"Processing...",r=e==="failed";return v.jsx(li,{className:"ml-[1px]",children:v.jsxs(gS,{children:[r?v.jsx(Lo,{className:"size-4.5 text-destructive"}):v.jsx(Ac,{className:"size-4.5 animate-spin text-muted-icon"}),v.jsx(us,{className:"ml-[1px] text-sm",shimmerWidth:44,children:t})]})})}function be(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function xL(e,t){const r=S.createContext(t),l=s=>{const{children:u,...f}=s,d=S.useMemo(()=>f,Object.values(f));return v.jsx(r.Provider,{value:d,children:u})};l.displayName=e+"Provider";function o(s){const u=S.useContext(r);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[l,o]}function Ki(e,t=[]){let r=[];function l(s,u){const f=S.createContext(u),d=r.length;r=[...r,u];const m=p=>{var A;const{scope:x,children:b,...w}=p,C=((A=x==null?void 0:x[e])==null?void 0:A[d])||f,E=S.useMemo(()=>w,Object.values(w));return v.jsx(C.Provider,{value:E,children:b})};m.displayName=s+"Provider";function g(p,x){var C;const b=((C=x==null?void 0:x[e])==null?void 0:C[d])||f,w=S.useContext(b);if(w)return w;if(u!==void 0)return u;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[m,g]}const o=()=>{const s=r.map(u=>S.createContext(u));return function(f){const d=(f==null?void 0:f[e])||s;return S.useMemo(()=>({[`__scope${e}`]:{...f,[e]:d}}),[f,d])}};return o.scopeName=e,[l,bL(o,...t)]}function bL(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const l=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const u=l.reduce((f,{useScope:d,scopeName:m})=>{const p=d(s)[`__scope${m}`];return{...f,...p}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}function Rb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Eh(...e){return t=>{let r=!1;const l=e.map(o=>{const s=Rb(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<l.length;o++){const s=l[o];typeof s=="function"?s():Rb(e[o],null)}}}}function ct(...e){return S.useCallback(Eh(...e),e)}function jo(e){const t=SL(e),r=S.forwardRef((l,o)=>{const{children:s,...u}=l,f=S.Children.toArray(s),d=f.find(CL);if(d){const m=d.props.children,g=f.map(p=>p===d?S.Children.count(m)>1?S.Children.only(null):S.isValidElement(m)?m.props.children:null:p);return v.jsx(t,{...u,ref:o,children:S.isValidElement(m)?S.cloneElement(m,void 0,g):null})}return v.jsx(t,{...u,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function SL(e){const t=S.forwardRef((r,l)=>{const{children:o,...s}=r;if(S.isValidElement(o)){const u=EL(o),f=kL(s,o.props);return o.type!==S.Fragment&&(f.ref=l?Eh(l,u):u),S.cloneElement(o,f)}return S.Children.count(o)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ww=Symbol("radix.slottable");function wL(e){const t=({children:r})=>v.jsx(v.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=ww,t}function CL(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ww}function kL(e,t){const r={...t};for(const l in t){const o=e[l],s=t[l];/^on[A-Z]/.test(l)?o&&s?r[l]=(...f)=>{const d=s(...f);return o(...f),d}:o&&(r[l]=o):l==="style"?r[l]={...o,...s}:l==="className"&&(r[l]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function EL(e){var l,o;let t=(l=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:l.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var AL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],et=AL.reduce((e,t)=>{const r=jo(`Primitive.${t}`),l=S.forwardRef((o,s)=>{const{asChild:u,...f}=o,d=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(d,{...f,ref:s})});return l.displayName=`Primitive.${t}`,{...e,[t]:l}},{});function Cw(e,t){e&&Tl.flushSync(()=>e.dispatchEvent(t))}function Ah(e){const t=e+"CollectionProvider",[r,l]=Ki(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),u=C=>{const{scope:E,children:A}=C,_=Fn.useRef(null),M=Fn.useRef(new Map).current;return v.jsx(o,{scope:E,itemMap:M,collectionRef:_,children:A})};u.displayName=t;const f=e+"CollectionSlot",d=jo(f),m=Fn.forwardRef((C,E)=>{const{scope:A,children:_}=C,M=s(f,A),z=ct(E,M.collectionRef);return v.jsx(d,{ref:z,children:_})});m.displayName=f;const g=e+"CollectionItemSlot",p="data-radix-collection-item",x=jo(g),b=Fn.forwardRef((C,E)=>{const{scope:A,children:_,...M}=C,z=Fn.useRef(null),P=ct(E,z),j=s(g,A);return Fn.useEffect(()=>(j.itemMap.set(z,{ref:z,...M}),()=>void j.itemMap.delete(z))),v.jsx(x,{[p]:"",ref:P,children:_})});b.displayName=g;function w(C){const E=s(e+"CollectionConsumer",C);return Fn.useCallback(()=>{const _=E.collectionRef.current;if(!_)return[];const M=Array.from(_.querySelectorAll(`[${p}]`));return Array.from(E.itemMap.values()).sort((j,U)=>M.indexOf(j.ref.current)-M.indexOf(U.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:u,Slot:m,ItemSlot:b},w,l]}var TL=S.createContext(void 0);function kw(e){const t=S.useContext(TL);return e||t||"ltr"}function vr(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...r)=>{var l;return(l=t.current)==null?void 0:l.call(t,...r)},[])}function _L(e,t=globalThis==null?void 0:globalThis.document){const r=vr(e);S.useEffect(()=>{const l=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",l,{capture:!0}),()=>t.removeEventListener("keydown",l,{capture:!0})},[r,t])}var ML="DismissableLayer",kp="dismissableLayer.update",NL="dismissableLayer.pointerDownOutside",RL="dismissableLayer.focusOutside",Ob,Ew=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ms=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:l,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:u,onDismiss:f,...d}=e,m=S.useContext(Ew),[g,p]=S.useState(null),x=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=S.useState({}),w=ct(t,U=>p(U)),C=Array.from(m.layers),[E]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),A=C.indexOf(E),_=g?C.indexOf(g):-1,M=m.layersWithOutsidePointerEventsDisabled.size>0,z=_>=A,P=zL(U=>{const B=U.target,Z=[...m.branches].some(D=>D.contains(B));!z||Z||(o==null||o(U),u==null||u(U),U.defaultPrevented||f==null||f())},x),j=IL(U=>{const B=U.target;[...m.branches].some(D=>D.contains(B))||(s==null||s(U),u==null||u(U),U.defaultPrevented||f==null||f())},x);return _L(U=>{_===m.layers.size-1&&(l==null||l(U),!U.defaultPrevented&&f&&(U.preventDefault(),f()))},x),S.useEffect(()=>{if(g)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Ob=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),jb(),()=>{r&&m.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=Ob)}},[g,x,r,m]),S.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),jb())},[g,m]),S.useEffect(()=>{const U=()=>b({});return document.addEventListener(kp,U),()=>document.removeEventListener(kp,U)},[]),v.jsx(et.div,{...d,ref:w,style:{pointerEvents:M?z?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,j.onFocusCapture),onBlurCapture:be(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,P.onPointerDownCapture)})});ms.displayName=ML;var OL="DismissableLayerBranch",jL=S.forwardRef((e,t)=>{const r=S.useContext(Ew),l=S.useRef(null),o=ct(t,l);return S.useEffect(()=>{const s=l.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),v.jsx(et.div,{...e,ref:o})});jL.displayName=OL;function zL(e,t=globalThis==null?void 0:globalThis.document){const r=vr(e),l=S.useRef(!1),o=S.useRef(()=>{});return S.useEffect(()=>{const s=f=>{if(f.target&&!l.current){let d=function(){Aw(NL,r,m,{discrete:!0})};const m={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);l.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>l.current=!0}}function IL(e,t=globalThis==null?void 0:globalThis.document){const r=vr(e),l=S.useRef(!1);return S.useEffect(()=>{const o=s=>{s.target&&!l.current&&Aw(RL,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>l.current=!0,onBlurCapture:()=>l.current=!1}}function jb(){const e=new CustomEvent(kp);document.dispatchEvent(e)}function Aw(e,t,r,{discrete:l}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),l?Cw(o,s):o.dispatchEvent(s)}var Hm=0;function Th(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zb()),document.body.insertAdjacentElement("beforeend",e[1]??zb()),Hm++,()=>{Hm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hm--}},[])}function zb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Vm="focusScope.autoFocusOnMount",qm="focusScope.autoFocusOnUnmount",Ib={bubbles:!1,cancelable:!0},DL="FocusScope",Fc=S.forwardRef((e,t)=>{const{loop:r=!1,trapped:l=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...u}=e,[f,d]=S.useState(null),m=vr(o),g=vr(s),p=S.useRef(null),x=ct(t,C=>d(C)),b=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(l){let C=function(M){if(b.paused||!f)return;const z=M.target;f.contains(z)?p.current=z:Pi(p.current,{select:!0})},E=function(M){if(b.paused||!f)return;const z=M.relatedTarget;z!==null&&(f.contains(z)||Pi(p.current,{select:!0}))},A=function(M){if(document.activeElement===document.body)for(const P of M)P.removedNodes.length>0&&Pi(f)};document.addEventListener("focusin",C),document.addEventListener("focusout",E);const _=new MutationObserver(A);return f&&_.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",E),_.disconnect()}}},[l,f,b.paused]),S.useEffect(()=>{if(f){Lb.add(b);const C=document.activeElement;if(!f.contains(C)){const A=new CustomEvent(Vm,Ib);f.addEventListener(Vm,m),f.dispatchEvent(A),A.defaultPrevented||(LL(HL(Tw(f)),{select:!0}),document.activeElement===C&&Pi(f))}return()=>{f.removeEventListener(Vm,m),setTimeout(()=>{const A=new CustomEvent(qm,Ib);f.addEventListener(qm,g),f.dispatchEvent(A),A.defaultPrevented||Pi(C??document.body,{select:!0}),f.removeEventListener(qm,g),Lb.remove(b)},0)}}},[f,m,g,b]);const w=S.useCallback(C=>{if(!r&&!l||b.paused)return;const E=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,A=document.activeElement;if(E&&A){const _=C.currentTarget,[M,z]=PL(_);M&&z?!C.shiftKey&&A===z?(C.preventDefault(),r&&Pi(M,{select:!0})):C.shiftKey&&A===M&&(C.preventDefault(),r&&Pi(z,{select:!0})):A===_&&C.preventDefault()}},[r,l,b.paused]);return v.jsx(et.div,{tabIndex:-1,...u,ref:x,onKeyDown:w})});Fc.displayName=DL;function LL(e,{select:t=!1}={}){const r=document.activeElement;for(const l of e)if(Pi(l,{select:t}),document.activeElement!==r)return}function PL(e){const t=Tw(e),r=Db(t,e),l=Db(t.reverse(),e);return[r,l]}function Tw(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>{const o=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||o?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Db(e,t){for(const r of e)if(!BL(r,{upTo:t}))return r}function BL(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function UL(e){return e instanceof HTMLInputElement&&"select"in e}function Pi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&UL(e)&&t&&e.select()}}var Lb=FL();function FL(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Pb(e,t),e.unshift(t)},remove(t){var r;e=Pb(e,t),(r=e[0])==null||r.resume()}}}function Pb(e,t){const r=[...e],l=r.indexOf(t);return l!==-1&&r.splice(l,1),r}function HL(e){return e.filter(t=>t.tagName!=="A")}var mn=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},VL=h1[" useId ".trim().toString()]||(()=>{}),qL=0;function Ao(e){const[t,r]=S.useState(VL());return mn(()=>{r(l=>l??String(qL++))},[e]),t?`radix-${t}`:""}const GL=["top","right","bottom","left"],Vi=Math.min,Hn=Math.max,hc=Math.round,Vu=Math.floor,Nr=e=>({x:e,y:e}),YL={left:"right",right:"left",bottom:"top",top:"bottom"};function Ep(e,t,r){return Hn(e,Vi(t,r))}function ni(e,t){return typeof e=="function"?e(t):e}function ri(e){return e.split("-")[0]}function Vo(e){return e.split("-")[1]}function _h(e){return e==="x"?"y":"x"}function Mh(e){return e==="y"?"height":"width"}function Mr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Nh(e){return _h(Mr(e))}function KL(e,t,r){r===void 0&&(r=!1);const l=Vo(e),o=Nh(e),s=Mh(o);let u=o==="x"?l===(r?"end":"start")?"right":"left":l==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(u=gc(u)),[u,gc(u)]}function $L(e){const t=gc(e);return[Ap(e),t,Ap(t)]}function Ap(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Bb=["left","right"],Ub=["right","left"],XL=["top","bottom"],QL=["bottom","top"];function ZL(e,t,r){switch(e){case"top":case"bottom":return r?t?Ub:Bb:t?Bb:Ub;case"left":case"right":return t?XL:QL;default:return[]}}function WL(e,t,r,l){const o=Vo(e);let s=ZL(ri(e),r==="start",l);return o&&(s=s.map(u=>u+"-"+o),t&&(s=s.concat(s.map(Ap)))),s}function gc(e){const t=ri(e);return YL[t]+e.slice(t.length)}function JL(e){return{top:0,right:0,bottom:0,left:0,...e}}function _w(e){return typeof e!="number"?JL(e):{top:e,right:e,bottom:e,left:e}}function yc(e){const{x:t,y:r,width:l,height:o}=e;return{width:l,height:o,top:r,left:t,right:t+l,bottom:r+o,x:t,y:r}}function Fb(e,t,r){let{reference:l,floating:o}=e;const s=Mr(t),u=Nh(t),f=Mh(u),d=ri(t),m=s==="y",g=l.x+l.width/2-o.width/2,p=l.y+l.height/2-o.height/2,x=l[f]/2-o[f]/2;let b;switch(d){case"top":b={x:g,y:l.y-o.height};break;case"bottom":b={x:g,y:l.y+l.height};break;case"right":b={x:l.x+l.width,y:p};break;case"left":b={x:l.x-o.width,y:p};break;default:b={x:l.x,y:l.y}}switch(Vo(t)){case"start":b[u]-=x*(r&&m?-1:1);break;case"end":b[u]+=x*(r&&m?-1:1);break}return b}async function e4(e,t){var r;t===void 0&&(t={});const{x:l,y:o,platform:s,rects:u,elements:f,strategy:d}=e,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:x=!1,padding:b=0}=ni(t,e),w=_w(b),E=f[x?p==="floating"?"reference":"floating":p],A=yc(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(E)))==null||r?E:E.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(f.floating)),boundary:m,rootBoundary:g,strategy:d})),_=p==="floating"?{x:l,y:o,width:u.floating.width,height:u.floating.height}:u.reference,M=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f.floating)),z=await(s.isElement==null?void 0:s.isElement(M))?await(s.getScale==null?void 0:s.getScale(M))||{x:1,y:1}:{x:1,y:1},P=yc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:_,offsetParent:M,strategy:d}):_);return{top:(A.top-P.top+w.top)/z.y,bottom:(P.bottom-A.bottom+w.bottom)/z.y,left:(A.left-P.left+w.left)/z.x,right:(P.right-A.right+w.right)/z.x}}const t4=50,n4=async(e,t,r)=>{const{placement:l="bottom",strategy:o="absolute",middleware:s=[],platform:u}=r,f=u.detectOverflow?u:{...u,detectOverflow:e4},d=await(u.isRTL==null?void 0:u.isRTL(t));let m=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:g,y:p}=Fb(m,l,d),x=l,b=0;const w={};for(let C=0;C<s.length;C++){const E=s[C];if(!E)continue;const{name:A,fn:_}=E,{x:M,y:z,data:P,reset:j}=await _({x:g,y:p,initialPlacement:l,placement:x,strategy:o,middlewareData:w,rects:m,platform:f,elements:{reference:e,floating:t}});g=M??g,p=z??p,w[A]={...w[A],...P},j&&b<t4&&(b++,typeof j=="object"&&(j.placement&&(x=j.placement),j.rects&&(m=j.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):j.rects),{x:g,y:p}=Fb(m,x,d)),C=-1)}return{x:g,y:p,placement:x,strategy:o,middlewareData:w}},r4=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:l,placement:o,rects:s,platform:u,elements:f,middlewareData:d}=t,{element:m,padding:g=0}=ni(e,t)||{};if(m==null)return{};const p=_w(g),x={x:r,y:l},b=Nh(o),w=Mh(b),C=await u.getDimensions(m),E=b==="y",A=E?"top":"left",_=E?"bottom":"right",M=E?"clientHeight":"clientWidth",z=s.reference[w]+s.reference[b]-x[b]-s.floating[w],P=x[b]-s.reference[b],j=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let U=j?j[M]:0;(!U||!await(u.isElement==null?void 0:u.isElement(j)))&&(U=f.floating[M]||s.floating[w]);const B=z/2-P/2,Z=U/2-C[w]/2-1,D=Vi(p[A],Z),X=Vi(p[_],Z),W=D,oe=U-C[w]-X,ne=U/2-C[w]/2+B,J=Ep(W,ne,oe),I=!d.arrow&&Vo(o)!=null&&ne!==J&&s.reference[w]/2-(ne<W?D:X)-C[w]/2<0,Y=I?ne<W?ne-W:ne-oe:0;return{[b]:x[b]+Y,data:{[b]:J,centerOffset:ne-J-Y,...I&&{alignmentOffset:Y}},reset:I}}}),i4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,l;const{placement:o,middlewareData:s,rects:u,initialPlacement:f,platform:d,elements:m}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:x,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0,...E}=ni(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const A=ri(o),_=Mr(f),M=ri(f)===f,z=await(d.isRTL==null?void 0:d.isRTL(m.floating)),P=x||(M||!C?[gc(f)]:$L(f)),j=w!=="none";!x&&j&&P.push(...WL(f,C,w,z));const U=[f,...P],B=await d.detectOverflow(t,E),Z=[];let D=((l=s.flip)==null?void 0:l.overflows)||[];if(g&&Z.push(B[A]),p){const ne=KL(o,u,z);Z.push(B[ne[0]],B[ne[1]])}if(D=[...D,{placement:o,overflows:Z}],!Z.every(ne=>ne<=0)){var X,W;const ne=(((X=s.flip)==null?void 0:X.index)||0)+1,J=U[ne];if(J&&(!(p==="alignment"?_!==Mr(J):!1)||D.every(G=>Mr(G.placement)===_?G.overflows[0]>0:!0)))return{data:{index:ne,overflows:D},reset:{placement:J}};let I=(W=D.filter(Y=>Y.overflows[0]<=0).sort((Y,G)=>Y.overflows[1]-G.overflows[1])[0])==null?void 0:W.placement;if(!I)switch(b){case"bestFit":{var oe;const Y=(oe=D.filter(G=>{if(j){const V=Mr(G.placement);return V===_||V==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(V=>V>0).reduce((V,T)=>V+T,0)]).sort((G,V)=>G[1]-V[1])[0])==null?void 0:oe[0];Y&&(I=Y);break}case"initialPlacement":I=f;break}if(o!==I)return{reset:{placement:I}}}return{}}}};function Hb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vb(e){return GL.some(t=>e[t]>=0)}const l4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:l}=t,{strategy:o="referenceHidden",...s}=ni(e,t);switch(o){case"referenceHidden":{const u=await l.detectOverflow(t,{...s,elementContext:"reference"}),f=Hb(u,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Vb(f)}}}case"escaped":{const u=await l.detectOverflow(t,{...s,altBoundary:!0}),f=Hb(u,r.floating);return{data:{escapedOffsets:f,escaped:Vb(f)}}}default:return{}}}}},Mw=new Set(["left","top"]);async function o4(e,t){const{placement:r,platform:l,elements:o}=e,s=await(l.isRTL==null?void 0:l.isRTL(o.floating)),u=ri(r),f=Vo(r),d=Mr(r)==="y",m=Mw.has(u)?-1:1,g=s&&d?-1:1,p=ni(t,e);let{mainAxis:x,crossAxis:b,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return f&&typeof w=="number"&&(b=f==="end"?w*-1:w),d?{x:b*g,y:x*m}:{x:x*m,y:b*g}}const a4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,l;const{x:o,y:s,placement:u,middlewareData:f}=t,d=await o4(t,e);return u===((r=f.offset)==null?void 0:r.placement)&&(l=f.arrow)!=null&&l.alignmentOffset?{}:{x:o+d.x,y:s+d.y,data:{...d,placement:u}}}}},s4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:l,placement:o,platform:s}=t,{mainAxis:u=!0,crossAxis:f=!1,limiter:d={fn:A=>{let{x:_,y:M}=A;return{x:_,y:M}}},...m}=ni(e,t),g={x:r,y:l},p=await s.detectOverflow(t,m),x=Mr(ri(o)),b=_h(x);let w=g[b],C=g[x];if(u){const A=b==="y"?"top":"left",_=b==="y"?"bottom":"right",M=w+p[A],z=w-p[_];w=Ep(M,w,z)}if(f){const A=x==="y"?"top":"left",_=x==="y"?"bottom":"right",M=C+p[A],z=C-p[_];C=Ep(M,C,z)}const E=d.fn({...t,[b]:w,[x]:C});return{...E,data:{x:E.x-r,y:E.y-l,enabled:{[b]:u,[x]:f}}}}}},u4=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:l,placement:o,rects:s,middlewareData:u}=t,{offset:f=0,mainAxis:d=!0,crossAxis:m=!0}=ni(e,t),g={x:r,y:l},p=Mr(o),x=_h(p);let b=g[x],w=g[p];const C=ni(f,t),E=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(d){const M=x==="y"?"height":"width",z=s.reference[x]-s.floating[M]+E.mainAxis,P=s.reference[x]+s.reference[M]-E.mainAxis;b<z?b=z:b>P&&(b=P)}if(m){var A,_;const M=x==="y"?"width":"height",z=Mw.has(ri(o)),P=s.reference[p]-s.floating[M]+(z&&((A=u.offset)==null?void 0:A[p])||0)+(z?0:E.crossAxis),j=s.reference[p]+s.reference[M]+(z?0:((_=u.offset)==null?void 0:_[p])||0)-(z?E.crossAxis:0);w<P?w=P:w>j&&(w=j)}return{[x]:b,[p]:w}}}},c4=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,l;const{placement:o,rects:s,platform:u,elements:f}=t,{apply:d=()=>{},...m}=ni(e,t),g=await u.detectOverflow(t,m),p=ri(o),x=Vo(o),b=Mr(o)==="y",{width:w,height:C}=s.floating;let E,A;p==="top"||p==="bottom"?(E=p,A=x===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(A=p,E=x==="end"?"top":"bottom");const _=C-g.top-g.bottom,M=w-g.left-g.right,z=Vi(C-g[E],_),P=Vi(w-g[A],M),j=!t.middlewareData.shift;let U=z,B=P;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(B=M),(l=t.middlewareData.shift)!=null&&l.enabled.y&&(U=_),j&&!x){const D=Hn(g.left,0),X=Hn(g.right,0),W=Hn(g.top,0),oe=Hn(g.bottom,0);b?B=w-2*(D!==0||X!==0?D+X:Hn(g.left,g.right)):U=C-2*(W!==0||oe!==0?W+oe:Hn(g.top,g.bottom))}await d({...t,availableWidth:B,availableHeight:U});const Z=await u.getDimensions(f.floating);return w!==Z.width||C!==Z.height?{reset:{rects:!0}}:{}}}};function Hc(){return typeof window<"u"}function qo(e){return Nw(e)?(e.nodeName||"").toLowerCase():"#document"}function qn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Or(e){var t;return(t=(Nw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Nw(e){return Hc()?e instanceof Node||e instanceof qn(e).Node:!1}function xr(e){return Hc()?e instanceof Element||e instanceof qn(e).Element:!1}function ai(e){return Hc()?e instanceof HTMLElement||e instanceof qn(e).HTMLElement:!1}function qb(e){return!Hc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qn(e).ShadowRoot}function ps(e){const{overflow:t,overflowX:r,overflowY:l,display:o}=br(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+r)&&o!=="inline"&&o!=="contents"}function f4(e){return/^(table|td|th)$/.test(qo(e))}function Vc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const d4=/transform|translate|scale|rotate|perspective|filter/,m4=/paint|layout|strict|content/,vl=e=>!!e&&e!=="none";let Gm;function Rh(e){const t=xr(e)?br(e):e;return vl(t.transform)||vl(t.translate)||vl(t.scale)||vl(t.rotate)||vl(t.perspective)||!Oh()&&(vl(t.backdropFilter)||vl(t.filter))||d4.test(t.willChange||"")||m4.test(t.contain||"")}function p4(e){let t=qi(e);for(;ai(t)&&!zo(t);){if(Rh(t))return t;if(Vc(t))return null;t=qi(t)}return null}function Oh(){return Gm==null&&(Gm=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Gm}function zo(e){return/^(html|body|#document)$/.test(qo(e))}function br(e){return qn(e).getComputedStyle(e)}function qc(e){return xr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qi(e){if(qo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qb(e)&&e.host||Or(e);return qb(t)?t.host:t}function Rw(e){const t=qi(e);return zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:ai(t)&&ps(t)?t:Rw(t)}function is(e,t,r){var l;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Rw(e),s=o===((l=e.ownerDocument)==null?void 0:l.body),u=qn(o);if(s){const f=Tp(u);return t.concat(u,u.visualViewport||[],ps(o)?o:[],f&&r?is(f):[])}else return t.concat(o,is(o,[],r))}function Tp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ow(e){const t=br(e);let r=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const o=ai(e),s=o?e.offsetWidth:r,u=o?e.offsetHeight:l,f=hc(r)!==s||hc(l)!==u;return f&&(r=s,l=u),{width:r,height:l,$:f}}function jh(e){return xr(e)?e:e.contextElement}function To(e){const t=jh(e);if(!ai(t))return Nr(1);const r=t.getBoundingClientRect(),{width:l,height:o,$:s}=Ow(t);let u=(s?hc(r.width):r.width)/l,f=(s?hc(r.height):r.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const h4=Nr(0);function jw(e){const t=qn(e);return!Oh()||!t.visualViewport?h4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function g4(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==qn(e)?!1:t}function kl(e,t,r,l){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=jh(e);let u=Nr(1);t&&(l?xr(l)&&(u=To(l)):u=To(e));const f=g4(s,r,l)?jw(s):Nr(0);let d=(o.left+f.x)/u.x,m=(o.top+f.y)/u.y,g=o.width/u.x,p=o.height/u.y;if(s){const x=qn(s),b=l&&xr(l)?qn(l):l;let w=x,C=Tp(w);for(;C&&l&&b!==w;){const E=To(C),A=C.getBoundingClientRect(),_=br(C),M=A.left+(C.clientLeft+parseFloat(_.paddingLeft))*E.x,z=A.top+(C.clientTop+parseFloat(_.paddingTop))*E.y;d*=E.x,m*=E.y,g*=E.x,p*=E.y,d+=M,m+=z,w=qn(C),C=Tp(w)}}return yc({width:g,height:p,x:d,y:m})}function Gc(e,t){const r=qc(e).scrollLeft;return t?t.left+r:kl(Or(e)).left+r}function zw(e,t){const r=e.getBoundingClientRect(),l=r.left+t.scrollLeft-Gc(e,r),o=r.top+t.scrollTop;return{x:l,y:o}}function y4(e){let{elements:t,rect:r,offsetParent:l,strategy:o}=e;const s=o==="fixed",u=Or(l),f=t?Vc(t.floating):!1;if(l===u||f&&s)return r;let d={scrollLeft:0,scrollTop:0},m=Nr(1);const g=Nr(0),p=ai(l);if((p||!p&&!s)&&((qo(l)!=="body"||ps(u))&&(d=qc(l)),p)){const b=kl(l);m=To(l),g.x=b.x+l.clientLeft,g.y=b.y+l.clientTop}const x=u&&!p&&!s?zw(u,d):Nr(0);return{width:r.width*m.x,height:r.height*m.y,x:r.x*m.x-d.scrollLeft*m.x+g.x+x.x,y:r.y*m.y-d.scrollTop*m.y+g.y+x.y}}function v4(e){return Array.from(e.getClientRects())}function x4(e){const t=Or(e),r=qc(e),l=e.ownerDocument.body,o=Hn(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),s=Hn(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let u=-r.scrollLeft+Gc(e);const f=-r.scrollTop;return br(l).direction==="rtl"&&(u+=Hn(t.clientWidth,l.clientWidth)-o),{width:o,height:s,x:u,y:f}}const Gb=25;function b4(e,t){const r=qn(e),l=Or(e),o=r.visualViewport;let s=l.clientWidth,u=l.clientHeight,f=0,d=0;if(o){s=o.width,u=o.height;const g=Oh();(!g||g&&t==="fixed")&&(f=o.offsetLeft,d=o.offsetTop)}const m=Gc(l);if(m<=0){const g=l.ownerDocument,p=g.body,x=getComputedStyle(p),b=g.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,w=Math.abs(l.clientWidth-p.clientWidth-b);w<=Gb&&(s-=w)}else m<=Gb&&(s+=m);return{width:s,height:u,x:f,y:d}}function S4(e,t){const r=kl(e,!0,t==="fixed"),l=r.top+e.clientTop,o=r.left+e.clientLeft,s=ai(e)?To(e):Nr(1),u=e.clientWidth*s.x,f=e.clientHeight*s.y,d=o*s.x,m=l*s.y;return{width:u,height:f,x:d,y:m}}function Yb(e,t,r){let l;if(t==="viewport")l=b4(e,r);else if(t==="document")l=x4(Or(e));else if(xr(t))l=S4(t,r);else{const o=jw(e);l={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return yc(l)}function Iw(e,t){const r=qi(e);return r===t||!xr(r)||zo(r)?!1:br(r).position==="fixed"||Iw(r,t)}function w4(e,t){const r=t.get(e);if(r)return r;let l=is(e,[],!1).filter(f=>xr(f)&&qo(f)!=="body"),o=null;const s=br(e).position==="fixed";let u=s?qi(e):e;for(;xr(u)&&!zo(u);){const f=br(u),d=Rh(u);!d&&f.position==="fixed"&&(o=null),(s?!d&&!o:!d&&f.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||ps(u)&&!d&&Iw(e,u))?l=l.filter(g=>g!==u):o=f,u=qi(u)}return t.set(e,l),l}function C4(e){let{element:t,boundary:r,rootBoundary:l,strategy:o}=e;const u=[...r==="clippingAncestors"?Vc(t)?[]:w4(t,this._c):[].concat(r),l],f=Yb(t,u[0],o);let d=f.top,m=f.right,g=f.bottom,p=f.left;for(let x=1;x<u.length;x++){const b=Yb(t,u[x],o);d=Hn(b.top,d),m=Vi(b.right,m),g=Vi(b.bottom,g),p=Hn(b.left,p)}return{width:m-p,height:g-d,x:p,y:d}}function k4(e){const{width:t,height:r}=Ow(e);return{width:t,height:r}}function E4(e,t,r){const l=ai(t),o=Or(t),s=r==="fixed",u=kl(e,!0,s,t);let f={scrollLeft:0,scrollTop:0};const d=Nr(0);function m(){d.x=Gc(o)}if(l||!l&&!s)if((qo(t)!=="body"||ps(o))&&(f=qc(t)),l){const b=kl(t,!0,s,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else o&&m();s&&!l&&o&&m();const g=o&&!l&&!s?zw(o,f):Nr(0),p=u.left+f.scrollLeft-d.x-g.x,x=u.top+f.scrollTop-d.y-g.y;return{x:p,y:x,width:u.width,height:u.height}}function Ym(e){return br(e).position==="static"}function Kb(e,t){if(!ai(e)||br(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Or(e)===r&&(r=r.ownerDocument.body),r}function Dw(e,t){const r=qn(e);if(Vc(e))return r;if(!ai(e)){let o=qi(e);for(;o&&!zo(o);){if(xr(o)&&!Ym(o))return o;o=qi(o)}return r}let l=Kb(e,t);for(;l&&f4(l)&&Ym(l);)l=Kb(l,t);return l&&zo(l)&&Ym(l)&&!Rh(l)?r:l||p4(e)||r}const A4=async function(e){const t=this.getOffsetParent||Dw,r=this.getDimensions,l=await r(e.floating);return{reference:E4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function T4(e){return br(e).direction==="rtl"}const _4={convertOffsetParentRelativeRectToViewportRelativeRect:y4,getDocumentElement:Or,getClippingRect:C4,getOffsetParent:Dw,getElementRects:A4,getClientRects:v4,getDimensions:k4,getScale:To,isElement:xr,isRTL:T4};function Lw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function M4(e,t){let r=null,l;const o=Or(e);function s(){var f;clearTimeout(l),(f=r)==null||f.disconnect(),r=null}function u(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),s();const m=e.getBoundingClientRect(),{left:g,top:p,width:x,height:b}=m;if(f||t(),!x||!b)return;const w=Vu(p),C=Vu(o.clientWidth-(g+x)),E=Vu(o.clientHeight-(p+b)),A=Vu(g),M={rootMargin:-w+"px "+-C+"px "+-E+"px "+-A+"px",threshold:Hn(0,Vi(1,d))||1};let z=!0;function P(j){const U=j[0].intersectionRatio;if(U!==d){if(!z)return u();U?u(!1,U):l=setTimeout(()=>{u(!1,1e-7)},1e3)}U===1&&!Lw(m,e.getBoundingClientRect())&&u(),z=!1}try{r=new IntersectionObserver(P,{...M,root:o.ownerDocument})}catch{r=new IntersectionObserver(P,M)}r.observe(e)}return u(!0),s}function N4(e,t,r,l){l===void 0&&(l={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=l,m=jh(e),g=o||s?[...m?is(m):[],...t?is(t):[]]:[];g.forEach(A=>{o&&A.addEventListener("scroll",r,{passive:!0}),s&&A.addEventListener("resize",r)});const p=m&&f?M4(m,r):null;let x=-1,b=null;u&&(b=new ResizeObserver(A=>{let[_]=A;_&&_.target===m&&b&&t&&(b.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var M;(M=b)==null||M.observe(t)})),r()}),m&&!d&&b.observe(m),t&&b.observe(t));let w,C=d?kl(e):null;d&&E();function E(){const A=kl(e);C&&!Lw(C,A)&&r(),C=A,w=requestAnimationFrame(E)}return r(),()=>{var A;g.forEach(_=>{o&&_.removeEventListener("scroll",r),s&&_.removeEventListener("resize",r)}),p==null||p(),(A=b)==null||A.disconnect(),b=null,d&&cancelAnimationFrame(w)}}const R4=a4,O4=s4,j4=i4,z4=c4,I4=l4,$b=r4,D4=u4,L4=(e,t,r)=>{const l=new Map,o={platform:_4,...r},s={...o.platform,_c:l};return n4(e,t,{...o,platform:s})};var P4=typeof document<"u",B4=function(){},nc=P4?S.useLayoutEffect:B4;function vc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,l,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(l=r;l--!==0;)if(!vc(e[l],t[l]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(l=r;l--!==0;)if(!{}.hasOwnProperty.call(t,o[l]))return!1;for(l=r;l--!==0;){const s=o[l];if(!(s==="_owner"&&e.$$typeof)&&!vc(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Pw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xb(e,t){const r=Pw(e);return Math.round(t*r)/r}function Km(e){const t=S.useRef(e);return nc(()=>{t.current=e}),t}function U4(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:l=[],platform:o,elements:{reference:s,floating:u}={},transform:f=!0,whileElementsMounted:d,open:m}=e,[g,p]=S.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[x,b]=S.useState(l);vc(x,l)||b(l);const[w,C]=S.useState(null),[E,A]=S.useState(null),_=S.useCallback(G=>{G!==j.current&&(j.current=G,C(G))},[]),M=S.useCallback(G=>{G!==U.current&&(U.current=G,A(G))},[]),z=s||w,P=u||E,j=S.useRef(null),U=S.useRef(null),B=S.useRef(g),Z=d!=null,D=Km(d),X=Km(o),W=Km(m),oe=S.useCallback(()=>{if(!j.current||!U.current)return;const G={placement:t,strategy:r,middleware:x};X.current&&(G.platform=X.current),L4(j.current,U.current,G).then(V=>{const T={...V,isPositioned:W.current!==!1};ne.current&&!vc(B.current,T)&&(B.current=T,Tl.flushSync(()=>{p(T)}))})},[x,t,r,X,W]);nc(()=>{m===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,p(G=>({...G,isPositioned:!1})))},[m]);const ne=S.useRef(!1);nc(()=>(ne.current=!0,()=>{ne.current=!1}),[]),nc(()=>{if(z&&(j.current=z),P&&(U.current=P),z&&P){if(D.current)return D.current(z,P,oe);oe()}},[z,P,oe,D,Z]);const J=S.useMemo(()=>({reference:j,floating:U,setReference:_,setFloating:M}),[_,M]),I=S.useMemo(()=>({reference:z,floating:P}),[z,P]),Y=S.useMemo(()=>{const G={position:r,left:0,top:0};if(!I.floating)return G;const V=Xb(I.floating,g.x),T=Xb(I.floating,g.y);return f?{...G,transform:"translate("+V+"px, "+T+"px)",...Pw(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:V,top:T}},[r,f,I.floating,g.x,g.y]);return S.useMemo(()=>({...g,update:oe,refs:J,elements:I,floatingStyles:Y}),[g,oe,J,I,Y])}const F4=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:l,padding:o}=typeof e=="function"?e(r):e;return l&&t(l)?l.current!=null?$b({element:l.current,padding:o}).fn(r):{}:l?$b({element:l,padding:o}).fn(r):{}}}},H4=(e,t)=>{const r=R4(e);return{name:r.name,fn:r.fn,options:[e,t]}},V4=(e,t)=>{const r=O4(e);return{name:r.name,fn:r.fn,options:[e,t]}},q4=(e,t)=>({fn:D4(e).fn,options:[e,t]}),G4=(e,t)=>{const r=j4(e);return{name:r.name,fn:r.fn,options:[e,t]}},Y4=(e,t)=>{const r=z4(e);return{name:r.name,fn:r.fn,options:[e,t]}},K4=(e,t)=>{const r=I4(e);return{name:r.name,fn:r.fn,options:[e,t]}},$4=(e,t)=>{const r=F4(e);return{name:r.name,fn:r.fn,options:[e,t]}};var X4="Arrow",Bw=S.forwardRef((e,t)=>{const{children:r,width:l=10,height:o=5,...s}=e;return v.jsx(et.svg,{...s,ref:t,width:l,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});Bw.displayName=X4;var Q4=Bw;function Z4(e){const[t,r]=S.useState(void 0);return mn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const l=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let u,f;if("borderBoxSize"in s){const d=s.borderBoxSize,m=Array.isArray(d)?d[0]:d;u=m.inlineSize,f=m.blockSize}else u=e.offsetWidth,f=e.offsetHeight;r({width:u,height:f})});return l.observe(e,{box:"border-box"}),()=>l.unobserve(e)}else r(void 0)},[e]),t}var zh="Popper",[Uw,Go]=Ki(zh),[W4,Fw]=Uw(zh),Hw=e=>{const{__scopePopper:t,children:r}=e,[l,o]=S.useState(null);return v.jsx(W4,{scope:t,anchor:l,onAnchorChange:o,children:r})};Hw.displayName=zh;var Vw="PopperAnchor",qw=S.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:l,...o}=e,s=Fw(Vw,r),u=S.useRef(null),f=ct(t,u),d=S.useRef(null);return S.useEffect(()=>{const m=d.current;d.current=(l==null?void 0:l.current)||u.current,m!==d.current&&s.onAnchorChange(d.current)}),l?null:v.jsx(et.div,{...o,ref:f})});qw.displayName=Vw;var Ih="PopperContent",[J4,e5]=Uw(Ih),Gw=S.forwardRef((e,t)=>{var re,he,ce,ge,Ce,ke;const{__scopePopper:r,side:l="bottom",sideOffset:o=0,align:s="center",alignOffset:u=0,arrowPadding:f=0,avoidCollisions:d=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:x=!1,updatePositionStrategy:b="optimized",onPlaced:w,...C}=e,E=Fw(Ih,r),[A,_]=S.useState(null),M=ct(t,We=>_(We)),[z,P]=S.useState(null),j=Z4(z),U=(j==null?void 0:j.width)??0,B=(j==null?void 0:j.height)??0,Z=l+(s!=="center"?"-"+s:""),D=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},X=Array.isArray(m)?m:[m],W=X.length>0,oe={padding:D,boundary:X.filter(n5),altBoundary:W},{refs:ne,floatingStyles:J,placement:I,isPositioned:Y,middlewareData:G}=U4({strategy:"fixed",placement:Z,whileElementsMounted:(...We)=>N4(...We,{animationFrame:b==="always"}),elements:{reference:E.anchor},middleware:[H4({mainAxis:o+B,alignmentAxis:u}),d&&V4({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?q4():void 0,...oe}),d&&G4({...oe}),Y4({...oe,apply:({elements:We,rects:$e,availableWidth:bt,availableHeight:Kt})=>{const{width:en,height:Nn}=$e.reference,Qt=We.floating.style;Qt.setProperty("--radix-popper-available-width",`${bt}px`),Qt.setProperty("--radix-popper-available-height",`${Kt}px`),Qt.setProperty("--radix-popper-anchor-width",`${en}px`),Qt.setProperty("--radix-popper-anchor-height",`${Nn}px`)}}),z&&$4({element:z,padding:f}),r5({arrowWidth:U,arrowHeight:B}),x&&K4({strategy:"referenceHidden",...oe})]}),[V,T]=$w(I),O=vr(w);mn(()=>{Y&&(O==null||O())},[Y,O]);const H=(re=G.arrow)==null?void 0:re.x,R=(he=G.arrow)==null?void 0:he.y,ue=((ce=G.arrow)==null?void 0:ce.centerOffset)!==0,[fe,se]=S.useState();return mn(()=>{A&&se(window.getComputedStyle(A).zIndex)},[A]),v.jsx("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:Y?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(ge=G.transformOrigin)==null?void 0:ge.x,(Ce=G.transformOrigin)==null?void 0:Ce.y].join(" "),...((ke=G.hide)==null?void 0:ke.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(J4,{scope:r,placedSide:V,onArrowChange:P,arrowX:H,arrowY:R,shouldHideArrow:ue,children:v.jsx(et.div,{"data-side":V,"data-align":T,...C,ref:M,style:{...C.style,animation:Y?void 0:"none"}})})})});Gw.displayName=Ih;var Yw="PopperArrow",t5={top:"bottom",right:"left",bottom:"top",left:"right"},Kw=S.forwardRef(function(t,r){const{__scopePopper:l,...o}=t,s=e5(Yw,l),u=t5[s.placedSide];return v.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:v.jsx(Q4,{...o,ref:r,style:{...o.style,display:"block"}})})});Kw.displayName=Yw;function n5(e){return e!==null}var r5=e=>({name:"transformOrigin",options:e,fn(t){var E,A,_;const{placement:r,rects:l,middlewareData:o}=t,u=((E=o.arrow)==null?void 0:E.centerOffset)!==0,f=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[m,g]=$w(r),p={start:"0%",center:"50%",end:"100%"}[g],x=(((A=o.arrow)==null?void 0:A.x)??0)+f/2,b=(((_=o.arrow)==null?void 0:_.y)??0)+d/2;let w="",C="";return m==="bottom"?(w=u?p:`${x}px`,C=`${-d}px`):m==="top"?(w=u?p:`${x}px`,C=`${l.floating.height+d}px`):m==="right"?(w=`${-d}px`,C=u?p:`${b}px`):m==="left"&&(w=`${l.floating.width+d}px`,C=u?p:`${b}px`),{data:{x:w,y:C}}}});function $w(e){const[t,r="center"]=e.split("-");return[t,r]}var i5=Hw,Dh=qw,Lh=Gw,Ph=Kw,l5="Portal",hs=S.forwardRef((e,t)=>{var f;const{container:r,...l}=e,[o,s]=S.useState(!1);mn(()=>s(!0),[]);const u=r||o&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return u?S_.createPortal(v.jsx(et.div,{...l,ref:t}),u):null});hs.displayName=l5;function o5(e,t){return S.useReducer((r,l)=>t[r][l]??r,e)}var jr=e=>{const{present:t,children:r}=e,l=a5(t),o=typeof r=="function"?r({present:l.isPresent}):S.Children.only(r),s=ct(l.ref,s5(o));return typeof r=="function"||l.isPresent?S.cloneElement(o,{ref:s}):null};jr.displayName="Presence";function a5(e){const[t,r]=S.useState(),l=S.useRef(null),o=S.useRef(e),s=S.useRef("none"),u=e?"mounted":"unmounted",[f,d]=o5(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const m=qu(l.current);s.current=f==="mounted"?m:"none"},[f]),mn(()=>{const m=l.current,g=o.current;if(g!==e){const x=s.current,b=qu(m);e?d("MOUNT"):b==="none"||(m==null?void 0:m.display)==="none"?d("UNMOUNT"):d(g&&x!==b?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),mn(()=>{if(t){let m;const g=t.ownerDocument.defaultView??window,p=b=>{const C=qu(l.current).includes(CSS.escape(b.animationName));if(b.target===t&&C&&(d("ANIMATION_END"),!o.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",m=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},x=b=>{b.target===t&&(s.current=qu(l.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{g.clearTimeout(m),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:S.useCallback(m=>{l.current=m?getComputedStyle(m):null,r(m)},[])}}function qu(e){return(e==null?void 0:e.animationName)||"none"}function s5(e){var l,o;let t=(l=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:l.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var u5=h1[" useInsertionEffect ".trim().toString()]||mn;function Xw({prop:e,defaultProp:t,onChange:r=()=>{},caller:l}){const[o,s,u]=c5({defaultProp:t,onChange:r}),f=e!==void 0,d=f?e:o;{const g=S.useRef(e!==void 0);S.useEffect(()=>{const p=g.current;p!==f&&console.warn(`${l} is changing from ${p?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=f},[f,l])}const m=S.useCallback(g=>{var p;if(f){const x=f5(g)?g(e):g;x!==e&&((p=u.current)==null||p.call(u,x))}else s(g)},[f,e,s,u]);return[d,m]}function c5({defaultProp:e,onChange:t}){const[r,l]=S.useState(e),o=S.useRef(r),s=S.useRef(t);return u5(()=>{s.current=t},[t]),S.useEffect(()=>{var u;o.current!==r&&((u=s.current)==null||u.call(s,r),o.current=r)},[r,o]),[r,l,s]}function f5(e){return typeof e=="function"}var $m="rovingFocusGroup.onEntryFocus",d5={bubbles:!1,cancelable:!0},gs="RovingFocusGroup",[_p,Qw,m5]=Ah(gs),[p5,Zw]=Ki(gs,[m5]),[h5,g5]=p5(gs),Ww=S.forwardRef((e,t)=>v.jsx(_p.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(_p.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(y5,{...e,ref:t})})}));Ww.displayName=gs;var y5=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:l,loop:o=!1,dir:s,currentTabStopId:u,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:d,onEntryFocus:m,preventScrollOnEntryFocus:g=!1,...p}=e,x=S.useRef(null),b=ct(t,x),w=kw(s),[C,E]=Xw({prop:u,defaultProp:f??null,onChange:d,caller:gs}),[A,_]=S.useState(!1),M=vr(m),z=Qw(r),P=S.useRef(!1),[j,U]=S.useState(0);return S.useEffect(()=>{const B=x.current;if(B)return B.addEventListener($m,M),()=>B.removeEventListener($m,M)},[M]),v.jsx(h5,{scope:r,orientation:l,dir:w,loop:o,currentTabStopId:C,onItemFocus:S.useCallback(B=>E(B),[E]),onItemShiftTab:S.useCallback(()=>_(!0),[]),onFocusableItemAdd:S.useCallback(()=>U(B=>B+1),[]),onFocusableItemRemove:S.useCallback(()=>U(B=>B-1),[]),children:v.jsx(et.div,{tabIndex:A||j===0?-1:0,"data-orientation":l,...p,ref:b,style:{outline:"none",...e.style},onMouseDown:be(e.onMouseDown,()=>{P.current=!0}),onFocus:be(e.onFocus,B=>{const Z=!P.current;if(B.target===B.currentTarget&&Z&&!A){const D=new CustomEvent($m,d5);if(B.currentTarget.dispatchEvent(D),!D.defaultPrevented){const X=z().filter(I=>I.focusable),W=X.find(I=>I.active),oe=X.find(I=>I.id===C),J=[W,oe,...X].filter(Boolean).map(I=>I.ref.current);tC(J,g)}}P.current=!1}),onBlur:be(e.onBlur,()=>_(!1))})})}),Jw="RovingFocusGroupItem",eC=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:l=!0,active:o=!1,tabStopId:s,children:u,...f}=e,d=Ao(),m=s||d,g=g5(Jw,r),p=g.currentTabStopId===m,x=Qw(r),{onFocusableItemAdd:b,onFocusableItemRemove:w,currentTabStopId:C}=g;return S.useEffect(()=>{if(l)return b(),()=>w()},[l,b,w]),v.jsx(_p.ItemSlot,{scope:r,id:m,focusable:l,active:o,children:v.jsx(et.span,{tabIndex:p?0:-1,"data-orientation":g.orientation,...f,ref:t,onMouseDown:be(e.onMouseDown,E=>{l?g.onItemFocus(m):E.preventDefault()}),onFocus:be(e.onFocus,()=>g.onItemFocus(m)),onKeyDown:be(e.onKeyDown,E=>{if(E.key==="Tab"&&E.shiftKey){g.onItemShiftTab();return}if(E.target!==E.currentTarget)return;const A=b5(E,g.orientation,g.dir);if(A!==void 0){if(E.metaKey||E.ctrlKey||E.altKey||E.shiftKey)return;E.preventDefault();let M=x().filter(z=>z.focusable).map(z=>z.ref.current);if(A==="last")M.reverse();else if(A==="prev"||A==="next"){A==="prev"&&M.reverse();const z=M.indexOf(E.currentTarget);M=g.loop?S5(M,z+1):M.slice(z+1)}setTimeout(()=>tC(M))}}),children:typeof u=="function"?u({isCurrentTabStop:p,hasTabStop:C!=null}):u})})});eC.displayName=Jw;var v5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function x5(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function b5(e,t,r){const l=x5(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(l))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(l)))return v5[l]}function tC(e,t=!1){const r=document.activeElement;for(const l of e)if(l===r||(l.focus({preventScroll:t}),document.activeElement!==r))return}function S5(e,t){return e.map((r,l)=>e[(t+l)%e.length])}var w5=Ww,C5=eC,k5=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bo=new WeakMap,Gu=new WeakMap,Yu={},Xm=0,nC=function(e){return e&&(e.host||nC(e.parentNode))},E5=function(e,t){return t.map(function(r){if(e.contains(r))return r;var l=nC(r);return l&&e.contains(l)?l:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},A5=function(e,t,r,l){var o=E5(t,Array.isArray(e)?e:[e]);Yu[r]||(Yu[r]=new WeakMap);var s=Yu[r],u=[],f=new Set,d=new Set(o),m=function(p){!p||f.has(p)||(f.add(p),m(p.parentNode))};o.forEach(m);var g=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(x){if(f.has(x))g(x);else try{var b=x.getAttribute(l),w=b!==null&&b!=="false",C=(bo.get(x)||0)+1,E=(s.get(x)||0)+1;bo.set(x,C),s.set(x,E),u.push(x),C===1&&w&&Gu.set(x,!0),E===1&&x.setAttribute(r,"true"),w||x.setAttribute(l,"true")}catch(A){console.error("aria-hidden: cannot operate on ",x,A)}})};return g(t),f.clear(),Xm++,function(){u.forEach(function(p){var x=bo.get(p)-1,b=s.get(p)-1;bo.set(p,x),s.set(p,b),x||(Gu.has(p)||p.removeAttribute(l),Gu.delete(p)),b||p.removeAttribute(r)}),Xm--,Xm||(bo=new WeakMap,bo=new WeakMap,Gu=new WeakMap,Yu={})}},Bh=function(e,t,r){r===void 0&&(r="data-aria-hidden");var l=Array.from(Array.isArray(e)?e:[e]),o=k5(e);return o?(l.push.apply(l,Array.from(o.querySelectorAll("[aria-live], script"))),A5(l,o,r,"aria-hidden")):function(){return null}},_r=function(){return _r=Object.assign||function(t){for(var r,l=1,o=arguments.length;l<o;l++){r=arguments[l];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},_r.apply(this,arguments)};function rC(e,t){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(r[l]=e[l]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,l=Object.getOwnPropertySymbols(e);o<l.length;o++)t.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(e,l[o])&&(r[l[o]]=e[l[o]]);return r}function T5(e,t,r){if(r||arguments.length===2)for(var l=0,o=t.length,s;l<o;l++)(s||!(l in t))&&(s||(s=Array.prototype.slice.call(t,0,l)),s[l]=t[l]);return e.concat(s||Array.prototype.slice.call(t))}var rc="right-scroll-bar-position",ic="width-before-scroll-bar",_5="with-scroll-bars-hidden",M5="--removed-body-scroll-bar-size";function Qm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function N5(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(l){var o=r.value;o!==l&&(r.value=l,r.callback(l,o))}}}})[0];return r.callback=t,r.facade}var R5=typeof window<"u"?S.useLayoutEffect:S.useEffect,Qb=new WeakMap;function O5(e,t){var r=N5(null,function(l){return e.forEach(function(o){return Qm(o,l)})});return R5(function(){var l=Qb.get(r);if(l){var o=new Set(l),s=new Set(e),u=r.current;o.forEach(function(f){s.has(f)||Qm(f,null)}),s.forEach(function(f){o.has(f)||Qm(f,u)})}Qb.set(r,e)},[e]),r}function j5(e){return e}function z5(e,t){t===void 0&&(t=j5);var r=[],l=!1,o={read:function(){if(l)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var u=t(s,l);return r.push(u),function(){r=r.filter(function(f){return f!==u})}},assignSyncMedium:function(s){for(l=!0;r.length;){var u=r;r=[],u.forEach(s)}r={push:function(f){return s(f)},filter:function(){return r}}},assignMedium:function(s){l=!0;var u=[];if(r.length){var f=r;r=[],f.forEach(s),u=r}var d=function(){var g=u;u=[],g.forEach(s)},m=function(){return Promise.resolve().then(d)};m(),r={push:function(g){u.push(g),m()},filter:function(g){return u=u.filter(g),r}}}};return o}function I5(e){e===void 0&&(e={});var t=z5(null);return t.options=_r({async:!0,ssr:!1},e),t}var iC=function(e){var t=e.sideCar,r=rC(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var l=t.read();if(!l)throw new Error("Sidecar medium not found");return S.createElement(l,_r({},r))};iC.isSideCarExport=!0;function D5(e,t){return e.useMedium(t),iC}var lC=I5(),Zm=function(){},Yc=S.forwardRef(function(e,t){var r=S.useRef(null),l=S.useState({onScrollCapture:Zm,onWheelCapture:Zm,onTouchMoveCapture:Zm}),o=l[0],s=l[1],u=e.forwardProps,f=e.children,d=e.className,m=e.removeScrollBar,g=e.enabled,p=e.shards,x=e.sideCar,b=e.noRelative,w=e.noIsolation,C=e.inert,E=e.allowPinchZoom,A=e.as,_=A===void 0?"div":A,M=e.gapMode,z=rC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=x,j=O5([r,t]),U=_r(_r({},z),o);return S.createElement(S.Fragment,null,g&&S.createElement(P,{sideCar:lC,removeScrollBar:m,shards:p,noRelative:b,noIsolation:w,inert:C,setCallbacks:s,allowPinchZoom:!!E,lockRef:r,gapMode:M}),u?S.cloneElement(S.Children.only(f),_r(_r({},U),{ref:j})):S.createElement(_,_r({},U,{className:d,ref:j}),f))});Yc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Yc.classNames={fullWidth:ic,zeroRight:rc};var L5=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function P5(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=L5();return t&&e.setAttribute("nonce",t),e}function B5(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function U5(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var F5=function(){var e=0,t=null;return{add:function(r){e==0&&(t=P5())&&(B5(t,r),U5(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},H5=function(){var e=F5();return function(t,r){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},oC=function(){var e=H5(),t=function(r){var l=r.styles,o=r.dynamic;return e(l,o),null};return t},V5={left:0,top:0,right:0,gap:0},Wm=function(e){return parseInt(e||"",10)||0},q5=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],l=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Wm(r),Wm(l),Wm(o)]},G5=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return V5;var t=q5(e),r=document.documentElement.clientWidth,l=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,l-r+t[2]-t[0])}},Y5=oC(),_o="data-scroll-locked",K5=function(e,t,r,l){var o=e.left,s=e.top,u=e.right,f=e.gap;return r===void 0&&(r="margin"),`
|
|
361
|
+
.`.concat(_5,` {
|
|
362
|
+
overflow: hidden `).concat(l,`;
|
|
363
|
+
padding-right: `).concat(f,"px ").concat(l,`;
|
|
364
|
+
}
|
|
365
|
+
body[`).concat(_o,`] {
|
|
366
|
+
overflow: hidden `).concat(l,`;
|
|
367
|
+
overscroll-behavior: contain;
|
|
368
|
+
`).concat([t&&"position: relative ".concat(l,";"),r==="margin"&&`
|
|
369
|
+
padding-left: `.concat(o,`px;
|
|
370
|
+
padding-top: `).concat(s,`px;
|
|
371
|
+
padding-right: `).concat(u,`px;
|
|
372
|
+
margin-left:0;
|
|
373
|
+
margin-top:0;
|
|
374
|
+
margin-right: `).concat(f,"px ").concat(l,`;
|
|
375
|
+
`),r==="padding"&&"padding-right: ".concat(f,"px ").concat(l,";")].filter(Boolean).join(""),`
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.`).concat(rc,` {
|
|
379
|
+
right: `).concat(f,"px ").concat(l,`;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.`).concat(ic,` {
|
|
383
|
+
margin-right: `).concat(f,"px ").concat(l,`;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.`).concat(rc," .").concat(rc,` {
|
|
387
|
+
right: 0 `).concat(l,`;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.`).concat(ic," .").concat(ic,` {
|
|
391
|
+
margin-right: 0 `).concat(l,`;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
body[`).concat(_o,`] {
|
|
395
|
+
`).concat(M5,": ").concat(f,`px;
|
|
396
|
+
}
|
|
397
|
+
`)},Zb=function(){var e=parseInt(document.body.getAttribute(_o)||"0",10);return isFinite(e)?e:0},$5=function(){S.useEffect(function(){return document.body.setAttribute(_o,(Zb()+1).toString()),function(){var e=Zb()-1;e<=0?document.body.removeAttribute(_o):document.body.setAttribute(_o,e.toString())}},[])},X5=function(e){var t=e.noRelative,r=e.noImportant,l=e.gapMode,o=l===void 0?"margin":l;$5();var s=S.useMemo(function(){return G5(o)},[o]);return S.createElement(Y5,{styles:K5(s,!t,o,r?"":"!important")})},Mp=!1;if(typeof window<"u")try{var Ku=Object.defineProperty({},"passive",{get:function(){return Mp=!0,!0}});window.addEventListener("test",Ku,Ku),window.removeEventListener("test",Ku,Ku)}catch{Mp=!1}var So=Mp?{passive:!1}:!1,Q5=function(e){return e.tagName==="TEXTAREA"},aC=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Q5(e)&&r[t]==="visible")},Z5=function(e){return aC(e,"overflowY")},W5=function(e){return aC(e,"overflowX")},Wb=function(e,t){var r=t.ownerDocument,l=t;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var o=sC(e,l);if(o){var s=uC(e,l),u=s[1],f=s[2];if(u>f)return!0}l=l.parentNode}while(l&&l!==r.body);return!1},J5=function(e){var t=e.scrollTop,r=e.scrollHeight,l=e.clientHeight;return[t,r,l]},e6=function(e){var t=e.scrollLeft,r=e.scrollWidth,l=e.clientWidth;return[t,r,l]},sC=function(e,t){return e==="v"?Z5(t):W5(t)},uC=function(e,t){return e==="v"?J5(t):e6(t)},t6=function(e,t){return e==="h"&&t==="rtl"?-1:1},n6=function(e,t,r,l,o){var s=t6(e,window.getComputedStyle(t).direction),u=s*l,f=r.target,d=t.contains(f),m=!1,g=u>0,p=0,x=0;do{if(!f)break;var b=uC(e,f),w=b[0],C=b[1],E=b[2],A=C-E-s*w;(w||A)&&sC(e,f)&&(p+=A,x+=w);var _=f.parentNode;f=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!d&&f!==document.body||d&&(t.contains(f)||t===f));return(g&&Math.abs(p)<1||!g&&Math.abs(x)<1)&&(m=!0),m},$u=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Jb=function(e){return[e.deltaX,e.deltaY]},e1=function(e){return e&&"current"in e?e.current:e},r6=function(e,t){return e[0]===t[0]&&e[1]===t[1]},i6=function(e){return`
|
|
398
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
399
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
400
|
+
`)},l6=0,wo=[];function o6(e){var t=S.useRef([]),r=S.useRef([0,0]),l=S.useRef(),o=S.useState(l6++)[0],s=S.useState(oC)[0],u=S.useRef(e);S.useEffect(function(){u.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var C=T5([e.lockRef.current],(e.shards||[]).map(e1),!0).filter(Boolean);return C.forEach(function(E){return E.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),C.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var f=S.useCallback(function(C,E){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!u.current.allowPinchZoom;var A=$u(C),_=r.current,M="deltaX"in C?C.deltaX:_[0]-A[0],z="deltaY"in C?C.deltaY:_[1]-A[1],P,j=C.target,U=Math.abs(M)>Math.abs(z)?"h":"v";if("touches"in C&&U==="h"&&j.type==="range")return!1;var B=window.getSelection(),Z=B&&B.anchorNode,D=Z?Z===j||Z.contains(j):!1;if(D)return!1;var X=Wb(U,j);if(!X)return!0;if(X?P=U:(P=U==="v"?"h":"v",X=Wb(U,j)),!X)return!1;if(!l.current&&"changedTouches"in C&&(M||z)&&(l.current=P),!P)return!0;var W=l.current||P;return n6(W,E,C,W==="h"?M:z)},[]),d=S.useCallback(function(C){var E=C;if(!(!wo.length||wo[wo.length-1]!==s)){var A="deltaY"in E?Jb(E):$u(E),_=t.current.filter(function(P){return P.name===E.type&&(P.target===E.target||E.target===P.shadowParent)&&r6(P.delta,A)})[0];if(_&&_.should){E.cancelable&&E.preventDefault();return}if(!_){var M=(u.current.shards||[]).map(e1).filter(Boolean).filter(function(P){return P.contains(E.target)}),z=M.length>0?f(E,M[0]):!u.current.noIsolation;z&&E.cancelable&&E.preventDefault()}}},[]),m=S.useCallback(function(C,E,A,_){var M={name:C,delta:E,target:A,should:_,shadowParent:a6(A)};t.current.push(M),setTimeout(function(){t.current=t.current.filter(function(z){return z!==M})},1)},[]),g=S.useCallback(function(C){r.current=$u(C),l.current=void 0},[]),p=S.useCallback(function(C){m(C.type,Jb(C),C.target,f(C,e.lockRef.current))},[]),x=S.useCallback(function(C){m(C.type,$u(C),C.target,f(C,e.lockRef.current))},[]);S.useEffect(function(){return wo.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:x}),document.addEventListener("wheel",d,So),document.addEventListener("touchmove",d,So),document.addEventListener("touchstart",g,So),function(){wo=wo.filter(function(C){return C!==s}),document.removeEventListener("wheel",d,So),document.removeEventListener("touchmove",d,So),document.removeEventListener("touchstart",g,So)}},[]);var b=e.removeScrollBar,w=e.inert;return S.createElement(S.Fragment,null,w?S.createElement(s,{styles:i6(o)}):null,b?S.createElement(X5,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function a6(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const s6=D5(lC,o6);var Kc=S.forwardRef(function(e,t){return S.createElement(Yc,_r({},e,{ref:t,sideCar:s6}))});Kc.classNames=Yc.classNames;var Np=["Enter"," "],u6=["ArrowDown","PageUp","Home"],cC=["ArrowUp","PageDown","End"],c6=[...u6,...cC],f6={ltr:[...Np,"ArrowRight"],rtl:[...Np,"ArrowLeft"]},d6={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ys="Menu",[ls,m6,p6]=Ah(ys),[jl,fC]=Ki(ys,[p6,Go,Zw]),$c=Go(),dC=Zw(),[h6,zl]=jl(ys),[g6,vs]=jl(ys),mC=e=>{const{__scopeMenu:t,open:r=!1,children:l,dir:o,onOpenChange:s,modal:u=!0}=e,f=$c(t),[d,m]=S.useState(null),g=S.useRef(!1),p=vr(s),x=kw(o);return S.useEffect(()=>{const b=()=>{g.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>g.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),v.jsx(i5,{...f,children:v.jsx(h6,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:m,children:v.jsx(g6,{scope:t,onClose:S.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:g,dir:x,modal:u,children:l})})})};mC.displayName=ys;var y6="MenuAnchor",Uh=S.forwardRef((e,t)=>{const{__scopeMenu:r,...l}=e,o=$c(r);return v.jsx(Dh,{...o,...l,ref:t})});Uh.displayName=y6;var Fh="MenuPortal",[v6,pC]=jl(Fh,{forceMount:void 0}),hC=e=>{const{__scopeMenu:t,forceMount:r,children:l,container:o}=e,s=zl(Fh,t);return v.jsx(v6,{scope:t,forceMount:r,children:v.jsx(jr,{present:r||s.open,children:v.jsx(hs,{asChild:!0,container:o,children:l})})})};hC.displayName=Fh;var ar="MenuContent",[x6,Hh]=jl(ar),gC=S.forwardRef((e,t)=>{const r=pC(ar,e.__scopeMenu),{forceMount:l=r.forceMount,...o}=e,s=zl(ar,e.__scopeMenu),u=vs(ar,e.__scopeMenu);return v.jsx(ls.Provider,{scope:e.__scopeMenu,children:v.jsx(jr,{present:l||s.open,children:v.jsx(ls.Slot,{scope:e.__scopeMenu,children:u.modal?v.jsx(b6,{...o,ref:t}):v.jsx(S6,{...o,ref:t})})})})}),b6=S.forwardRef((e,t)=>{const r=zl(ar,e.__scopeMenu),l=S.useRef(null),o=ct(t,l);return S.useEffect(()=>{const s=l.current;if(s)return Bh(s)},[]),v.jsx(Vh,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:be(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),S6=S.forwardRef((e,t)=>{const r=zl(ar,e.__scopeMenu);return v.jsx(Vh,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),w6=jo("MenuContent.ScrollLock"),Vh=S.forwardRef((e,t)=>{const{__scopeMenu:r,loop:l=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:f,onEntryFocus:d,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:x,onDismiss:b,disableOutsideScroll:w,...C}=e,E=zl(ar,r),A=vs(ar,r),_=$c(r),M=dC(r),z=m6(r),[P,j]=S.useState(null),U=S.useRef(null),B=ct(t,U,E.onContentChange),Z=S.useRef(0),D=S.useRef(""),X=S.useRef(0),W=S.useRef(null),oe=S.useRef("right"),ne=S.useRef(0),J=w?Kc:S.Fragment,I=w?{as:w6,allowPinchZoom:!0}:void 0,Y=V=>{var re,he;const T=D.current+V,O=z().filter(ce=>!ce.disabled),H=document.activeElement,R=(re=O.find(ce=>ce.ref.current===H))==null?void 0:re.textValue,ue=O.map(ce=>ce.textValue),fe=z6(ue,T,R),se=(he=O.find(ce=>ce.textValue===fe))==null?void 0:he.ref.current;(function ce(ge){D.current=ge,window.clearTimeout(Z.current),ge!==""&&(Z.current=window.setTimeout(()=>ce(""),1e3))})(T),se&&setTimeout(()=>se.focus())};S.useEffect(()=>()=>window.clearTimeout(Z.current),[]),Th();const G=S.useCallback(V=>{var O,H;return oe.current===((O=W.current)==null?void 0:O.side)&&D6(V,(H=W.current)==null?void 0:H.area)},[]);return v.jsx(x6,{scope:r,searchRef:D,onItemEnter:S.useCallback(V=>{G(V)&&V.preventDefault()},[G]),onItemLeave:S.useCallback(V=>{var T;G(V)||((T=U.current)==null||T.focus(),j(null))},[G]),onTriggerLeave:S.useCallback(V=>{G(V)&&V.preventDefault()},[G]),pointerGraceTimerRef:X,onPointerGraceIntentChange:S.useCallback(V=>{W.current=V},[]),children:v.jsx(J,{...I,children:v.jsx(Fc,{asChild:!0,trapped:o,onMountAutoFocus:be(s,V=>{var T;V.preventDefault(),(T=U.current)==null||T.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:v.jsx(ms,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:x,onDismiss:b,children:v.jsx(w5,{asChild:!0,...M,dir:A.dir,orientation:"vertical",loop:l,currentTabStopId:P,onCurrentTabStopIdChange:j,onEntryFocus:be(d,V=>{A.isUsingKeyboardRef.current||V.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(Lh,{role:"menu","aria-orientation":"vertical","data-state":OC(E.open),"data-radix-menu-content":"",dir:A.dir,..._,...C,ref:B,style:{outline:"none",...C.style},onKeyDown:be(C.onKeyDown,V=>{const O=V.target.closest("[data-radix-menu-content]")===V.currentTarget,H=V.ctrlKey||V.altKey||V.metaKey,R=V.key.length===1;O&&(V.key==="Tab"&&V.preventDefault(),!H&&R&&Y(V.key));const ue=U.current;if(V.target!==ue||!c6.includes(V.key))return;V.preventDefault();const se=z().filter(re=>!re.disabled).map(re=>re.ref.current);cC.includes(V.key)&&se.reverse(),O6(se)}),onBlur:be(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(Z.current),D.current="")}),onPointerMove:be(e.onPointerMove,os(V=>{const T=V.target,O=ne.current!==V.clientX;if(V.currentTarget.contains(T)&&O){const H=V.clientX>ne.current?"right":"left";oe.current=H,ne.current=V.clientX}}))})})})})})})});gC.displayName=ar;var C6="MenuGroup",qh=S.forwardRef((e,t)=>{const{__scopeMenu:r,...l}=e;return v.jsx(et.div,{role:"group",...l,ref:t})});qh.displayName=C6;var k6="MenuLabel",yC=S.forwardRef((e,t)=>{const{__scopeMenu:r,...l}=e;return v.jsx(et.div,{...l,ref:t})});yC.displayName=k6;var xc="MenuItem",t1="menu.itemSelect",Xc=S.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:l,...o}=e,s=S.useRef(null),u=vs(xc,e.__scopeMenu),f=Hh(xc,e.__scopeMenu),d=ct(t,s),m=S.useRef(!1),g=()=>{const p=s.current;if(!r&&p){const x=new CustomEvent(t1,{bubbles:!0,cancelable:!0});p.addEventListener(t1,b=>l==null?void 0:l(b),{once:!0}),Cw(p,x),x.defaultPrevented?m.current=!1:u.onClose()}};return v.jsx(vC,{...o,ref:d,disabled:r,onClick:be(e.onClick,g),onPointerDown:p=>{var x;(x=e.onPointerDown)==null||x.call(e,p),m.current=!0},onPointerUp:be(e.onPointerUp,p=>{var x;m.current||(x=p.currentTarget)==null||x.click()}),onKeyDown:be(e.onKeyDown,p=>{const x=f.searchRef.current!=="";r||x&&p.key===" "||Np.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Xc.displayName=xc;var vC=S.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:l=!1,textValue:o,...s}=e,u=Hh(xc,r),f=dC(r),d=S.useRef(null),m=ct(t,d),[g,p]=S.useState(!1),[x,b]=S.useState("");return S.useEffect(()=>{const w=d.current;w&&b((w.textContent??"").trim())},[s.children]),v.jsx(ls.ItemSlot,{scope:r,disabled:l,textValue:o??x,children:v.jsx(C5,{asChild:!0,...f,focusable:!l,children:v.jsx(et.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":l||void 0,"data-disabled":l?"":void 0,...s,ref:m,onPointerMove:be(e.onPointerMove,os(w=>{l?u.onItemLeave(w):(u.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:be(e.onPointerLeave,os(w=>u.onItemLeave(w))),onFocus:be(e.onFocus,()=>p(!0)),onBlur:be(e.onBlur,()=>p(!1))})})})}),E6="MenuCheckboxItem",xC=S.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:l,...o}=e;return v.jsx(kC,{scope:e.__scopeMenu,checked:r,children:v.jsx(Xc,{role:"menuitemcheckbox","aria-checked":bc(r)?"mixed":r,...o,ref:t,"data-state":Yh(r),onSelect:be(o.onSelect,()=>l==null?void 0:l(bc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});xC.displayName=E6;var bC="MenuRadioGroup",[A6,T6]=jl(bC,{value:void 0,onValueChange:()=>{}}),SC=S.forwardRef((e,t)=>{const{value:r,onValueChange:l,...o}=e,s=vr(l);return v.jsx(A6,{scope:e.__scopeMenu,value:r,onValueChange:s,children:v.jsx(qh,{...o,ref:t})})});SC.displayName=bC;var wC="MenuRadioItem",CC=S.forwardRef((e,t)=>{const{value:r,...l}=e,o=T6(wC,e.__scopeMenu),s=r===o.value;return v.jsx(kC,{scope:e.__scopeMenu,checked:s,children:v.jsx(Xc,{role:"menuitemradio","aria-checked":s,...l,ref:t,"data-state":Yh(s),onSelect:be(l.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,r)},{checkForDefaultPrevented:!1})})})});CC.displayName=wC;var Gh="MenuItemIndicator",[kC,_6]=jl(Gh,{checked:!1}),EC=S.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:l,...o}=e,s=_6(Gh,r);return v.jsx(jr,{present:l||bc(s.checked)||s.checked===!0,children:v.jsx(et.span,{...o,ref:t,"data-state":Yh(s.checked)})})});EC.displayName=Gh;var M6="MenuSeparator",AC=S.forwardRef((e,t)=>{const{__scopeMenu:r,...l}=e;return v.jsx(et.div,{role:"separator","aria-orientation":"horizontal",...l,ref:t})});AC.displayName=M6;var N6="MenuArrow",TC=S.forwardRef((e,t)=>{const{__scopeMenu:r,...l}=e,o=$c(r);return v.jsx(Ph,{...o,...l,ref:t})});TC.displayName=N6;var R6="MenuSub",[bU,_C]=jl(R6),qa="MenuSubTrigger",MC=S.forwardRef((e,t)=>{const r=zl(qa,e.__scopeMenu),l=vs(qa,e.__scopeMenu),o=_C(qa,e.__scopeMenu),s=Hh(qa,e.__scopeMenu),u=S.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:d}=s,m={__scopeMenu:e.__scopeMenu},g=S.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return S.useEffect(()=>g,[g]),S.useEffect(()=>{const p=f.current;return()=>{window.clearTimeout(p),d(null)}},[f,d]),v.jsx(Uh,{asChild:!0,...m,children:v.jsx(vC,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":OC(r.open),...e,ref:Eh(t,o.onTriggerChange),onClick:p=>{var x;(x=e.onClick)==null||x.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:be(e.onPointerMove,os(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!r.open&&!u.current&&(s.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{r.onOpenChange(!0),g()},100))})),onPointerLeave:be(e.onPointerLeave,os(p=>{var b,w;g();const x=(b=r.content)==null?void 0:b.getBoundingClientRect();if(x){const C=(w=r.content)==null?void 0:w.dataset.side,E=C==="right",A=E?-5:5,_=x[E?"left":"right"],M=x[E?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+A,y:p.clientY},{x:_,y:x.top},{x:M,y:x.top},{x:M,y:x.bottom},{x:_,y:x.bottom}],side:C}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:be(e.onKeyDown,p=>{var b;const x=s.searchRef.current!=="";e.disabled||x&&p.key===" "||f6[l.dir].includes(p.key)&&(r.onOpenChange(!0),(b=r.content)==null||b.focus(),p.preventDefault())})})})});MC.displayName=qa;var NC="MenuSubContent",RC=S.forwardRef((e,t)=>{const r=pC(ar,e.__scopeMenu),{forceMount:l=r.forceMount,...o}=e,s=zl(ar,e.__scopeMenu),u=vs(ar,e.__scopeMenu),f=_C(NC,e.__scopeMenu),d=S.useRef(null),m=ct(t,d);return v.jsx(ls.Provider,{scope:e.__scopeMenu,children:v.jsx(jr,{present:l||s.open,children:v.jsx(ls.Slot,{scope:e.__scopeMenu,children:v.jsx(Vh,{id:f.contentId,"aria-labelledby":f.triggerId,...o,ref:m,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{var p;u.isUsingKeyboardRef.current&&((p=d.current)==null||p.focus()),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:be(e.onFocusOutside,g=>{g.target!==f.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:be(e.onEscapeKeyDown,g=>{u.onClose(),g.preventDefault()}),onKeyDown:be(e.onKeyDown,g=>{var b;const p=g.currentTarget.contains(g.target),x=d6[u.dir].includes(g.key);p&&x&&(s.onOpenChange(!1),(b=f.trigger)==null||b.focus(),g.preventDefault())})})})})})});RC.displayName=NC;function OC(e){return e?"open":"closed"}function bc(e){return e==="indeterminate"}function Yh(e){return bc(e)?"indeterminate":e?"checked":"unchecked"}function O6(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function j6(e,t){return e.map((r,l)=>e[(t+l)%e.length])}function z6(e,t,r){const o=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let u=j6(e,Math.max(s,0));o.length===1&&(u=u.filter(m=>m!==r));const d=u.find(m=>m.toLowerCase().startsWith(o.toLowerCase()));return d!==r?d:void 0}function I6(e,t){const{x:r,y:l}=e;let o=!1;for(let s=0,u=t.length-1;s<t.length;u=s++){const f=t[s],d=t[u],m=f.x,g=f.y,p=d.x,x=d.y;g>l!=x>l&&r<(p-m)*(l-g)/(x-g)+m&&(o=!o)}return o}function D6(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return I6(r,t)}function os(e){return t=>t.pointerType==="mouse"?e(t):void 0}var L6=mC,P6=Uh,B6=hC,U6=gC,F6=qh,H6=yC,V6=Xc,q6=xC,G6=SC,Y6=CC,K6=EC,$6=AC,X6=TC,Q6=MC,Z6=RC,Kh="ContextMenu",[W6]=Ki(Kh,[fC]),xn=fC(),[J6,jC]=W6(Kh),zC=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:l,dir:o,modal:s=!0}=e,[u,f]=S.useState(!1),d=xn(t),m=vr(l),g=S.useCallback(p=>{f(p),m(p)},[m]);return v.jsx(J6,{scope:t,open:u,onOpenChange:g,modal:s,children:v.jsx(L6,{...d,dir:o,open:u,onOpenChange:g,modal:s,children:r})})};zC.displayName=Kh;var IC="ContextMenuTrigger",DC=S.forwardRef((e,t)=>{const{__scopeContextMenu:r,disabled:l=!1,...o}=e,s=jC(IC,r),u=xn(r),f=S.useRef({x:0,y:0}),d=S.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...f.current})}),m=S.useRef(0),g=S.useCallback(()=>window.clearTimeout(m.current),[]),p=x=>{f.current={x:x.clientX,y:x.clientY},s.onOpenChange(!0)};return S.useEffect(()=>g,[g]),S.useEffect(()=>void(l&&g()),[l,g]),v.jsxs(v.Fragment,{children:[v.jsx(P6,{...u,virtualRef:d}),v.jsx(et.span,{"data-state":s.open?"open":"closed","data-disabled":l?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:l?e.onContextMenu:be(e.onContextMenu,x=>{g(),p(x),x.preventDefault()}),onPointerDown:l?e.onPointerDown:be(e.onPointerDown,Xu(x=>{g(),m.current=window.setTimeout(()=>p(x),700)})),onPointerMove:l?e.onPointerMove:be(e.onPointerMove,Xu(g)),onPointerCancel:l?e.onPointerCancel:be(e.onPointerCancel,Xu(g)),onPointerUp:l?e.onPointerUp:be(e.onPointerUp,Xu(g))})]})});DC.displayName=IC;var eP="ContextMenuPortal",LC=e=>{const{__scopeContextMenu:t,...r}=e,l=xn(t);return v.jsx(B6,{...l,...r})};LC.displayName=eP;var PC="ContextMenuContent",BC=S.forwardRef((e,t)=>{const{__scopeContextMenu:r,...l}=e,o=jC(PC,r),s=xn(r),u=S.useRef(!1);return v.jsx(U6,{...s,...l,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:f=>{var d;(d=e.onCloseAutoFocus)==null||d.call(e,f),!f.defaultPrevented&&u.current&&f.preventDefault(),u.current=!1},onInteractOutside:f=>{var d;(d=e.onInteractOutside)==null||d.call(e,f),!f.defaultPrevented&&!o.modal&&(u.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});BC.displayName=PC;var tP="ContextMenuGroup",nP=S.forwardRef((e,t)=>{const{__scopeContextMenu:r,...l}=e,o=xn(r);return v.jsx(F6,{...o,...l,ref:t})});nP.displayName=tP;var rP="ContextMenuLabel",iP=S.forwardRef((e,t)=>{const{__scopeContextMenu:r,...l}=e,o=xn(r);return v.jsx(H6,{...o,...l,ref:t})});iP.displayName=rP;var lP="ContextMenuItem",UC=S.forwardRef((e,t)=>{const{__scopeContextMenu:r,...l}=e,o=xn(r);return v.jsx(V6,{...o,...l,ref:t})});UC.displayName=lP;var oP="ContextMenuCheckboxItem",aP=S.forwardRef((e,t)=>{const{__scopeContextMenu:r,...l}=e,o=xn(r);return v.jsx(q6,{...o,...l,ref:t})});aP.displayName=oP;var sP="ContextMenuRadioGroup",uP=S.forwardRef((e,t)=>{const{__scopeContextMenu:r,...l}=e,o=xn(r);return v.jsx(G6,{...o,...l,ref:t})});uP.displayName=sP;var cP="ContextMenuRadioItem",fP=S.forwardRef((e,t)=>{const{__scopeContextMenu:r,...l}=e,o=xn(r);return v.jsx(Y6,{...o,...l,ref:t})});fP.displayName=cP;var dP="ContextMenuItemIndicator",mP=S.forwardRef((e,t)=>{const{__scopeContextMenu:r,...l}=e,o=xn(r);return v.jsx(K6,{...o,...l,ref:t})});mP.displayName=dP;var pP="ContextMenuSeparator",FC=S.forwardRef((e,t)=>{const{__scopeContextMenu:r,...l}=e,o=xn(r);return v.jsx($6,{...o,...l,ref:t})});FC.displayName=pP;var hP="ContextMenuArrow",gP=S.forwardRef((e,t)=>{const{__scopeContextMenu:r,...l}=e,o=xn(r);return v.jsx(X6,{...o,...l,ref:t})});gP.displayName=hP;var yP="ContextMenuSubTrigger",vP=S.forwardRef((e,t)=>{const{__scopeContextMenu:r,...l}=e,o=xn(r);return v.jsx(Q6,{...o,...l,ref:t})});vP.displayName=yP;var xP="ContextMenuSubContent",bP=S.forwardRef((e,t)=>{const{__scopeContextMenu:r,...l}=e,o=xn(r);return v.jsx(Z6,{...o,...l,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});bP.displayName=xP;function Xu(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var SP=zC,wP=DC,CP=LC,HC=BC,VC=UC,qC=FC;const GC=S.createContext(null);function kP({onOpenChange:e,...t}){const[r,l]=S.useState(0),o=S.useCallback(()=>{l(s=>s+1),e==null||e(!1)},[e]);return v.jsx(GC.Provider,{value:o,children:v.jsx(SP,{onOpenChange:e,...t},r)})}const EP=wP,YC=S.forwardRef(({className:e,...t},r)=>v.jsx(CP,{children:v.jsx(HC,{ref:r,className:we("z-50 min-w-[170px] overflow-hidden rounded-xl border border-border bg-background p-1 shadow-lg outline-hidden animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...t})}));YC.displayName=HC.displayName;const KC=S.forwardRef(({className:e,onSelect:t,...r},l)=>{const o=S.useContext(GC);return v.jsx(VC,{ref:l,className:we("relative flex cursor-default select-none items-center gap-2.5 rounded-lg px-3 py-2 text-xs font-medium text-foreground outline-hidden transition-colors hover:bg-muted focus:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),onSelect:s=>{t==null||t(s),o==null||o()},...r})});KC.displayName=VC.displayName;const AP=S.forwardRef(({className:e,...t},r)=>v.jsx(qC,{ref:r,className:we("-mx-1 my-1 h-px bg-border",e),...t}));AP.displayName=qC.displayName;const n1=e=>{let t;const r=new Set,l=(m,g)=>{const p=typeof m=="function"?m(t):m;if(!Object.is(p,t)){const x=t;t=g??(typeof p!="object"||p===null)?p:Object.assign({},t,p),r.forEach(b=>b(t,x))}},o=()=>t,f={setState:l,getState:o,getInitialState:()=>d,subscribe:m=>(r.add(m),()=>r.delete(m))},d=t=e(l,o,f);return f},TP=(e=>e?n1(e):n1),_P=e=>e;function MP(e,t=_P){const r=Fn.useSyncExternalStore(e.subscribe,Fn.useCallback(()=>t(e.getState()),[e,t]),Fn.useCallback(()=>t(e.getInitialState()),[e,t]));return Fn.useDebugValue(r),r}const NP=e=>{const t=TP(e),r=l=>MP(t,l);return Object.assign(r,t),r},$C=(e=>NP),XC=1e3,RP=500,OP=5e3,QC=450,jP=250,zP=900,Rp="cursor";function as(e){switch(e){case"vscode":return"code {path}";case"xcode":return"xed {path}";case"windsurf":return"windsurf {path}";case"custom":return"cursor {path}";case"cursor":default:return"cursor {path}"}}function IP(e){return Number.isFinite(e)?Math.min(OP,Math.max(RP,Math.round(e))):XC}function DP(e){return Number.isFinite(e)?Math.min(zP,Math.max(jP,Math.round(e))):QC}function LP(e){switch(e){case"vscode":case"xcode":case"windsurf":case"custom":case"cursor":return e;default:return Rp}}function r1(e,t){const r=e==null?void 0:e.trim();return r&&r.length>0?r:as(t)}$C()(e=>({scrollbackLines:XC,minColumnWidth:QC,editorPreset:Rp,editorCommandTemplate:as(Rp),setScrollbackLines:t=>e({scrollbackLines:IP(t)}),setMinColumnWidth:t=>e({minColumnWidth:DP(t)}),setEditorPreset:t=>e(r=>{const l=LP(t);return{editorPreset:l,editorCommandTemplate:l==="custom"?r1(r.editorCommandTemplate,l):as(l)}}),setEditorCommandTemplate:t=>e(r=>({editorCommandTemplate:r1(t,r.editorPreset)}))}));const Bi={cursor:"/editor-icons/cursor.png",defaultApp:"/editor-icons/default-app.png",finder:"/editor-icons/finder.png",preview:"/editor-icons/preview.png",xcode:"/editor-icons/xcode.png",terminal:"/editor-icons/terminal.png",windsurf:"/editor-icons/windsurf.png",custom:"/editor-icons/custom.png"};function Ui({src:e,className:t}){return v.jsx("img",{src:e,alt:"","aria-hidden":"true",draggable:!1,className:t})}function PP({preset:e,className:t}){switch(e){case"xcode":return v.jsx(Ui,{src:Bi.xcode,className:t});case"windsurf":return v.jsx(Ui,{src:Bi.windsurf,className:t});case"custom":return v.jsx(Ui,{src:Bi.custom,className:t});case"cursor":case"vscode":default:return v.jsx(Ui,{src:Bi.cursor,className:t})}}function BP({className:e}){return v.jsx(Ui,{src:Bi.finder,className:e})}function UP({className:e}){return v.jsx(Ui,{src:Bi.preview,className:e})}function FP({className:e}){return v.jsx(Ui,{src:Bi.defaultApp,className:e})}function HP({className:e}){return v.jsx(B2,{className:e})}function VP({className:e}){return v.jsx(Ui,{src:Bi.terminal,className:e})}var ZC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),qP="VisuallyHidden",WC=S.forwardRef((e,t)=>v.jsx(et.span,{...e,ref:t,style:{...ZC,...e.style}}));WC.displayName=qP;var GP=WC,[Qc]=Ki("Tooltip",[Go]),$h=Go(),YP="TooltipProvider",i1="tooltip.open",[SU,JC]=Qc(YP),ek="Tooltip",[wU,xs]=Qc(ek),Op="TooltipTrigger",KP=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...l}=e,o=xs(Op,r),s=JC(Op,r),u=$h(r),f=S.useRef(null),d=ct(t,f,o.onTriggerChange),m=S.useRef(!1),g=S.useRef(!1),p=S.useCallback(()=>m.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),v.jsx(Dh,{asChild:!0,...u,children:v.jsx(et.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...l,ref:d,onPointerMove:be(e.onPointerMove,x=>{x.pointerType!=="touch"&&!g.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),g.current=!0)}),onPointerLeave:be(e.onPointerLeave,()=>{o.onTriggerLeave(),g.current=!1}),onPointerDown:be(e.onPointerDown,()=>{o.open&&o.onClose(),m.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:be(e.onFocus,()=>{m.current||o.onOpen()}),onBlur:be(e.onBlur,o.onClose),onClick:be(e.onClick,o.onClose)})})});KP.displayName=Op;var Xh="TooltipPortal",[$P,XP]=Qc(Xh,{forceMount:void 0}),tk=e=>{const{__scopeTooltip:t,forceMount:r,children:l,container:o}=e,s=xs(Xh,t);return v.jsx($P,{scope:t,forceMount:r,children:v.jsx(jr,{present:r||s.open,children:v.jsx(hs,{asChild:!0,container:o,children:l})})})};tk.displayName=Xh;var Io="TooltipContent",nk=S.forwardRef((e,t)=>{const r=XP(Io,e.__scopeTooltip),{forceMount:l=r.forceMount,side:o="top",...s}=e,u=xs(Io,e.__scopeTooltip);return v.jsx(jr,{present:l||u.open,children:u.disableHoverableContent?v.jsx(rk,{side:o,...s,ref:t}):v.jsx(QP,{side:o,...s,ref:t})})}),QP=S.forwardRef((e,t)=>{const r=xs(Io,e.__scopeTooltip),l=JC(Io,e.__scopeTooltip),o=S.useRef(null),s=ct(t,o),[u,f]=S.useState(null),{trigger:d,onClose:m}=r,g=o.current,{onPointerInTransitChange:p}=l,x=S.useCallback(()=>{f(null),p(!1)},[p]),b=S.useCallback((w,C)=>{const E=w.currentTarget,A={x:w.clientX,y:w.clientY},_=tB(A,E.getBoundingClientRect()),M=nB(A,_),z=rB(C.getBoundingClientRect()),P=lB([...M,...z]);f(P),p(!0)},[p]);return S.useEffect(()=>()=>x(),[x]),S.useEffect(()=>{if(d&&g){const w=E=>b(E,g),C=E=>b(E,d);return d.addEventListener("pointerleave",w),g.addEventListener("pointerleave",C),()=>{d.removeEventListener("pointerleave",w),g.removeEventListener("pointerleave",C)}}},[d,g,b,x]),S.useEffect(()=>{if(u){const w=C=>{const E=C.target,A={x:C.clientX,y:C.clientY},_=(d==null?void 0:d.contains(E))||(g==null?void 0:g.contains(E)),M=!iB(A,u);_?x():M&&(x(),m())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,g,u,m,x]),v.jsx(rk,{...e,ref:s})}),[ZP,WP]=Qc(ek,{isInside:!1}),JP=wL("TooltipContent"),rk=S.forwardRef((e,t)=>{const{__scopeTooltip:r,children:l,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:u,...f}=e,d=xs(Io,r),m=$h(r),{onClose:g}=d;return S.useEffect(()=>(document.addEventListener(i1,g),()=>document.removeEventListener(i1,g)),[g]),S.useEffect(()=>{if(d.trigger){const p=x=>{const b=x.target;b!=null&&b.contains(d.trigger)&&g()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,g]),v.jsx(ms,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:p=>p.preventDefault(),onDismiss:g,children:v.jsxs(Lh,{"data-state":d.stateAttribute,...m,...f,ref:t,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(JP,{children:l}),v.jsx(ZP,{scope:r,isInside:!0,children:v.jsx(GP,{id:d.contentId,role:"tooltip",children:o||l})})]})})});nk.displayName=Io;var ik="TooltipArrow",eB=S.forwardRef((e,t)=>{const{__scopeTooltip:r,...l}=e,o=$h(r);return WP(ik,r).isInside?null:v.jsx(Ph,{...o,...l,ref:t})});eB.displayName=ik;function tB(e,t){const r=Math.abs(t.top-e.y),l=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,l,o,s)){case s:return"left";case o:return"right";case r:return"top";case l:return"bottom";default:throw new Error("unreachable")}}function nB(e,t,r=5){const l=[];switch(t){case"top":l.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":l.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":l.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":l.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return l}function rB(e){const{top:t,right:r,bottom:l,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:l},{x:o,y:l}]}function iB(e,t){const{x:r,y:l}=e;let o=!1;for(let s=0,u=t.length-1;s<t.length;u=s++){const f=t[s],d=t[u],m=f.x,g=f.y,p=d.x,x=d.y;g>l!=x>l&&r<(p-m)*(l-g)/(x-g)+m&&(o=!o)}return o}function lB(e){const t=e.slice();return t.sort((r,l)=>r.x<l.x?-1:r.x>l.x?1:r.y<l.y?-1:r.y>l.y?1:0),oB(t)}function oB(e){if(e.length<=1)return e.slice();const t=[];for(let l=0;l<e.length;l++){const o=e[l];for(;t.length>=2;){const s=t[t.length-1],u=t[t.length-2];if((s.x-u.x)*(o.y-u.y)>=(s.y-u.y)*(o.x-u.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let l=e.length-1;l>=0;l--){const o=e[l];for(;r.length>=2;){const s=r[r.length-1],u=r[r.length-2];if((s.x-u.x)*(o.y-u.y)>=(s.y-u.y)*(o.x-u.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var lk=tk,Qh=nk;function aB({className:e,...t}){return v.jsx("kbd",{className:we("pointer-events-none inline-flex h-5 min-w-5 items-center justify-center rounded border border-border/60 bg-muted/50 px-1.5 font-mono text-[11px] font-medium text-current select-none",e),...t})}function sB({className:e,...t}){return v.jsx("span",{className:we("inline-flex items-center gap-0.5",e),...t})}const uB="z-50 overflow-hidden rounded-md border border-border bg-card p-0.5 text-[11px] font-medium text-card-foreground shadow-sm animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",cB=S.forwardRef(({className:e,sideOffset:t=4,...r},l)=>v.jsx(lk,{children:v.jsx(Qh,{ref:l,sideOffset:t,className:we("z-50 overflow-hidden rounded-md bg-card text-card-foreground border border-border px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));cB.displayName=Qh.displayName;function ok(e){return e.toUpperCase()}function fB(e){const t=e.split("+");return v.jsx(sB,{children:t.map((r,l)=>v.jsx(aB,{children:ok(r)},`${r}-${l}`))})}const dB=S.forwardRef(({className:e,sideOffset:t=4,children:r,shortcut:l,...o},s)=>{const u=l===void 0?null:Array.isArray(l)?l[0]??null:l;return v.jsx(lk,{children:v.jsx(Qh,{ref:s,sideOffset:t,className:we(uB,e),...o,children:u?fB(u):v.jsx("span",{children:typeof r=="string"?ok(r):r})})})});dB.displayName="HotkeyTooltipContent";function l1(e,[t,r]){return Math.min(r,Math.max(t,e))}function mB(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var pB=[" ","Enter","ArrowUp","ArrowDown"],hB=[" ","Enter"],Zc="Select",[Zh,Wc,gB]=Ah(Zc),[Yo]=Ki(Zc,[gB,Go]),Wh=Go(),[CU,$i]=Yo(Zc),[kU,yB]=Yo(Zc),ak="SelectTrigger",sk=S.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:l=!1,...o}=e,s=Wh(r),u=$i(ak,r),f=u.disabled||l,d=ct(t,u.onTriggerChange),m=Wc(r),g=S.useRef("touch"),[p,x,b]=Nk(C=>{const E=m().filter(M=>!M.disabled),A=E.find(M=>M.value===u.value),_=Rk(E,C,A);_!==void 0&&u.onValueChange(_.value)}),w=C=>{f||(u.onOpenChange(!0),b()),C&&(u.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})};return v.jsx(Dh,{asChild:!0,...s,children:v.jsx(et.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":Mk(u.value)?"":void 0,...o,ref:d,onClick:be(o.onClick,C=>{C.currentTarget.focus(),g.current!=="mouse"&&w(C)}),onPointerDown:be(o.onPointerDown,C=>{g.current=C.pointerType;const E=C.target;E.hasPointerCapture(C.pointerId)&&E.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(w(C),C.preventDefault())}),onKeyDown:be(o.onKeyDown,C=>{const E=p.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&x(C.key),!(E&&C.key===" ")&&pB.includes(C.key)&&(w(),C.preventDefault())})})})});sk.displayName=ak;var uk="SelectValue",vB=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:l,style:o,children:s,placeholder:u="",...f}=e,d=$i(uk,r),{onValueNodeHasChildrenChange:m}=d,g=s!==void 0,p=ct(t,d.onValueNodeChange);return mn(()=>{m(g)},[m,g]),v.jsx(et.span,{...f,ref:p,style:{pointerEvents:"none"},children:Mk(d.value)?v.jsx(v.Fragment,{children:u}):s})});vB.displayName=uk;var xB="SelectIcon",ck=S.forwardRef((e,t)=>{const{__scopeSelect:r,children:l,...o}=e;return v.jsx(et.span,{"aria-hidden":!0,...o,ref:t,children:l||"▼"})});ck.displayName=xB;var bB="SelectPortal",fk=e=>v.jsx(hs,{asChild:!0,...e});fk.displayName=bB;var El="SelectContent",dk=S.forwardRef((e,t)=>{const r=$i(El,e.__scopeSelect),[l,o]=S.useState();if(mn(()=>{o(new DocumentFragment)},[]),!r.open){const s=l;return s?Tl.createPortal(v.jsx(mk,{scope:e.__scopeSelect,children:v.jsx(Zh.Slot,{scope:e.__scopeSelect,children:v.jsx("div",{children:e.children})})}),s):null}return v.jsx(pk,{...e,ref:t})});dk.displayName=El;var gr=10,[mk,Xi]=Yo(El),SB="SelectContentImpl",wB=jo("SelectContent.RemoveScroll"),pk=S.forwardRef((e,t)=>{const{__scopeSelect:r,position:l="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:u,side:f,sideOffset:d,align:m,alignOffset:g,arrowPadding:p,collisionBoundary:x,collisionPadding:b,sticky:w,hideWhenDetached:C,avoidCollisions:E,...A}=e,_=$i(El,r),[M,z]=S.useState(null),[P,j]=S.useState(null),U=ct(t,re=>z(re)),[B,Z]=S.useState(null),[D,X]=S.useState(null),W=Wc(r),[oe,ne]=S.useState(!1),J=S.useRef(!1);S.useEffect(()=>{if(M)return Bh(M)},[M]),Th();const I=S.useCallback(re=>{const[he,...ce]=W().map(ke=>ke.ref.current),[ge]=ce.slice(-1),Ce=document.activeElement;for(const ke of re)if(ke===Ce||(ke==null||ke.scrollIntoView({block:"nearest"}),ke===he&&P&&(P.scrollTop=0),ke===ge&&P&&(P.scrollTop=P.scrollHeight),ke==null||ke.focus(),document.activeElement!==Ce))return},[W,P]),Y=S.useCallback(()=>I([B,M]),[I,B,M]);S.useEffect(()=>{oe&&Y()},[oe,Y]);const{onOpenChange:G,triggerPointerDownPosRef:V}=_;S.useEffect(()=>{if(M){let re={x:0,y:0};const he=ge=>{var Ce,ke;re={x:Math.abs(Math.round(ge.pageX)-(((Ce=V.current)==null?void 0:Ce.x)??0)),y:Math.abs(Math.round(ge.pageY)-(((ke=V.current)==null?void 0:ke.y)??0))}},ce=ge=>{re.x<=10&&re.y<=10?ge.preventDefault():M.contains(ge.target)||G(!1),document.removeEventListener("pointermove",he),V.current=null};return V.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",ce,{capture:!0})}}},[M,G,V]),S.useEffect(()=>{const re=()=>G(!1);return window.addEventListener("blur",re),window.addEventListener("resize",re),()=>{window.removeEventListener("blur",re),window.removeEventListener("resize",re)}},[G]);const[T,O]=Nk(re=>{const he=W().filter(Ce=>!Ce.disabled),ce=he.find(Ce=>Ce.ref.current===document.activeElement),ge=Rk(he,re,ce);ge&&setTimeout(()=>ge.ref.current.focus())}),H=S.useCallback((re,he,ce)=>{const ge=!J.current&&!ce;(_.value!==void 0&&_.value===he||ge)&&(Z(re),ge&&(J.current=!0))},[_.value]),R=S.useCallback(()=>M==null?void 0:M.focus(),[M]),ue=S.useCallback((re,he,ce)=>{const ge=!J.current&&!ce;(_.value!==void 0&&_.value===he||ge)&&X(re)},[_.value]),fe=l==="popper"?jp:hk,se=fe===jp?{side:f,sideOffset:d,align:m,alignOffset:g,arrowPadding:p,collisionBoundary:x,collisionPadding:b,sticky:w,hideWhenDetached:C,avoidCollisions:E}:{};return v.jsx(mk,{scope:r,content:M,viewport:P,onViewportChange:j,itemRefCallback:H,selectedItem:B,onItemLeave:R,itemTextRefCallback:ue,focusSelectedItem:Y,selectedItemText:D,position:l,isPositioned:oe,searchRef:T,children:v.jsx(Kc,{as:wB,allowPinchZoom:!0,children:v.jsx(Fc,{asChild:!0,trapped:_.open,onMountAutoFocus:re=>{re.preventDefault()},onUnmountAutoFocus:be(o,re=>{var he;(he=_.trigger)==null||he.focus({preventScroll:!0}),re.preventDefault()}),children:v.jsx(ms,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:re=>re.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:v.jsx(fe,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:re=>re.preventDefault(),...A,...se,onPlaced:()=>ne(!0),ref:U,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:be(A.onKeyDown,re=>{const he=re.ctrlKey||re.altKey||re.metaKey;if(re.key==="Tab"&&re.preventDefault(),!he&&re.key.length===1&&O(re.key),["ArrowUp","ArrowDown","Home","End"].includes(re.key)){let ge=W().filter(Ce=>!Ce.disabled).map(Ce=>Ce.ref.current);if(["ArrowUp","End"].includes(re.key)&&(ge=ge.slice().reverse()),["ArrowUp","ArrowDown"].includes(re.key)){const Ce=re.target,ke=ge.indexOf(Ce);ge=ge.slice(ke+1)}setTimeout(()=>I(ge)),re.preventDefault()}})})})})})})});pk.displayName=SB;var CB="SelectItemAlignedPosition",hk=S.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:l,...o}=e,s=$i(El,r),u=Xi(El,r),[f,d]=S.useState(null),[m,g]=S.useState(null),p=ct(t,U=>g(U)),x=Wc(r),b=S.useRef(!1),w=S.useRef(!0),{viewport:C,selectedItem:E,selectedItemText:A,focusSelectedItem:_}=u,M=S.useCallback(()=>{if(s.trigger&&s.valueNode&&f&&m&&C&&E&&A){const U=s.trigger.getBoundingClientRect(),B=m.getBoundingClientRect(),Z=s.valueNode.getBoundingClientRect(),D=A.getBoundingClientRect();if(s.dir!=="rtl"){const Ce=D.left-B.left,ke=Z.left-Ce,We=U.left-ke,$e=U.width+We,bt=Math.max($e,B.width),Kt=window.innerWidth-gr,en=l1(ke,[gr,Math.max(gr,Kt-bt)]);f.style.minWidth=$e+"px",f.style.left=en+"px"}else{const Ce=B.right-D.right,ke=window.innerWidth-Z.right-Ce,We=window.innerWidth-U.right-ke,$e=U.width+We,bt=Math.max($e,B.width),Kt=window.innerWidth-gr,en=l1(ke,[gr,Math.max(gr,Kt-bt)]);f.style.minWidth=$e+"px",f.style.right=en+"px"}const X=x(),W=window.innerHeight-gr*2,oe=C.scrollHeight,ne=window.getComputedStyle(m),J=parseInt(ne.borderTopWidth,10),I=parseInt(ne.paddingTop,10),Y=parseInt(ne.borderBottomWidth,10),G=parseInt(ne.paddingBottom,10),V=J+I+oe+G+Y,T=Math.min(E.offsetHeight*5,V),O=window.getComputedStyle(C),H=parseInt(O.paddingTop,10),R=parseInt(O.paddingBottom,10),ue=U.top+U.height/2-gr,fe=W-ue,se=E.offsetHeight/2,re=E.offsetTop+se,he=J+I+re,ce=V-he;if(he<=ue){const Ce=X.length>0&&E===X[X.length-1].ref.current;f.style.bottom="0px";const ke=m.clientHeight-C.offsetTop-C.offsetHeight,We=Math.max(fe,se+(Ce?R:0)+ke+Y),$e=he+We;f.style.height=$e+"px"}else{const Ce=X.length>0&&E===X[0].ref.current;f.style.top="0px";const We=Math.max(ue,J+C.offsetTop+(Ce?H:0)+se)+ce;f.style.height=We+"px",C.scrollTop=he-ue+C.offsetTop}f.style.margin=`${gr}px 0`,f.style.minHeight=T+"px",f.style.maxHeight=W+"px",l==null||l(),requestAnimationFrame(()=>b.current=!0)}},[x,s.trigger,s.valueNode,f,m,C,E,A,s.dir,l]);mn(()=>M(),[M]);const[z,P]=S.useState();mn(()=>{m&&P(window.getComputedStyle(m).zIndex)},[m]);const j=S.useCallback(U=>{U&&w.current===!0&&(M(),_==null||_(),w.current=!1)},[M,_]);return v.jsx(EB,{scope:r,contentWrapper:f,shouldExpandOnScrollRef:b,onScrollButtonChange:j,children:v.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:z},children:v.jsx(et.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});hk.displayName=CB;var kB="SelectPopperPosition",jp=S.forwardRef((e,t)=>{const{__scopeSelect:r,align:l="start",collisionPadding:o=gr,...s}=e,u=Wh(r);return v.jsx(Lh,{...u,...s,ref:t,align:l,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});jp.displayName=kB;var[EB,Jh]=Yo(El,{}),zp="SelectViewport",gk=S.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:l,...o}=e,s=Xi(zp,r),u=Jh(zp,r),f=ct(t,s.onViewportChange),d=S.useRef(0);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),v.jsx(Zh.Slot,{scope:r,children:v.jsx(et.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:be(o.onScroll,m=>{const g=m.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:x}=u;if(x!=null&&x.current&&p){const b=Math.abs(d.current-g.scrollTop);if(b>0){const w=window.innerHeight-gr*2,C=parseFloat(p.style.minHeight),E=parseFloat(p.style.height),A=Math.max(C,E);if(A<w){const _=A+b,M=Math.min(w,_),z=_-M;p.style.height=M+"px",p.style.bottom==="0px"&&(g.scrollTop=z>0?z:0,p.style.justifyContent="flex-end")}}}d.current=g.scrollTop})})})]})});gk.displayName=zp;var yk="SelectGroup",[AB,TB]=Yo(yk),_B=S.forwardRef((e,t)=>{const{__scopeSelect:r,...l}=e,o=Ao();return v.jsx(AB,{scope:r,id:o,children:v.jsx(et.div,{role:"group","aria-labelledby":o,...l,ref:t})})});_B.displayName=yk;var vk="SelectLabel",xk=S.forwardRef((e,t)=>{const{__scopeSelect:r,...l}=e,o=TB(vk,r);return v.jsx(et.div,{id:o.id,...l,ref:t})});xk.displayName=vk;var Sc="SelectItem",[MB,bk]=Yo(Sc),Sk=S.forwardRef((e,t)=>{const{__scopeSelect:r,value:l,disabled:o=!1,textValue:s,...u}=e,f=$i(Sc,r),d=Xi(Sc,r),m=f.value===l,[g,p]=S.useState(s??""),[x,b]=S.useState(!1),w=ct(t,_=>{var M;return(M=d.itemRefCallback)==null?void 0:M.call(d,_,l,o)}),C=Ao(),E=S.useRef("touch"),A=()=>{o||(f.onValueChange(l),f.onOpenChange(!1))};if(l==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return v.jsx(MB,{scope:r,value:l,disabled:o,textId:C,isSelected:m,onItemTextChange:S.useCallback(_=>{p(M=>M||((_==null?void 0:_.textContent)??"").trim())},[]),children:v.jsx(Zh.ItemSlot,{scope:r,value:l,disabled:o,textValue:g,children:v.jsx(et.div,{role:"option","aria-labelledby":C,"data-highlighted":x?"":void 0,"aria-selected":m&&x,"data-state":m?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...u,ref:w,onFocus:be(u.onFocus,()=>b(!0)),onBlur:be(u.onBlur,()=>b(!1)),onClick:be(u.onClick,()=>{E.current!=="mouse"&&A()}),onPointerUp:be(u.onPointerUp,()=>{E.current==="mouse"&&A()}),onPointerDown:be(u.onPointerDown,_=>{E.current=_.pointerType}),onPointerMove:be(u.onPointerMove,_=>{var M;E.current=_.pointerType,o?(M=d.onItemLeave)==null||M.call(d):E.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(u.onPointerLeave,_=>{var M;_.currentTarget===document.activeElement&&((M=d.onItemLeave)==null||M.call(d))}),onKeyDown:be(u.onKeyDown,_=>{var z;((z=d.searchRef)==null?void 0:z.current)!==""&&_.key===" "||(hB.includes(_.key)&&A(),_.key===" "&&_.preventDefault())})})})})});Sk.displayName=Sc;var Ga="SelectItemText",wk=S.forwardRef((e,t)=>{const{__scopeSelect:r,className:l,style:o,...s}=e,u=$i(Ga,r),f=Xi(Ga,r),d=bk(Ga,r),m=yB(Ga,r),[g,p]=S.useState(null),x=ct(t,A=>p(A),d.onItemTextChange,A=>{var _;return(_=f.itemTextRefCallback)==null?void 0:_.call(f,A,d.value,d.disabled)}),b=g==null?void 0:g.textContent,w=S.useMemo(()=>v.jsx("option",{value:d.value,disabled:d.disabled,children:b},d.value),[d.disabled,d.value,b]),{onNativeOptionAdd:C,onNativeOptionRemove:E}=m;return mn(()=>(C(w),()=>E(w)),[C,E,w]),v.jsxs(v.Fragment,{children:[v.jsx(et.span,{id:d.textId,...s,ref:x}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Tl.createPortal(s.children,u.valueNode):null]})});wk.displayName=Ga;var Ck="SelectItemIndicator",kk=S.forwardRef((e,t)=>{const{__scopeSelect:r,...l}=e;return bk(Ck,r).isSelected?v.jsx(et.span,{"aria-hidden":!0,...l,ref:t}):null});kk.displayName=Ck;var Ip="SelectScrollUpButton",Ek=S.forwardRef((e,t)=>{const r=Xi(Ip,e.__scopeSelect),l=Jh(Ip,e.__scopeSelect),[o,s]=S.useState(!1),u=ct(t,l.onScrollButtonChange);return mn(()=>{if(r.viewport&&r.isPositioned){let f=function(){const m=d.scrollTop>0;s(m)};const d=r.viewport;return f(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[r.viewport,r.isPositioned]),o?v.jsx(Tk,{...e,ref:u,onAutoScroll:()=>{const{viewport:f,selectedItem:d}=r;f&&d&&(f.scrollTop=f.scrollTop-d.offsetHeight)}}):null});Ek.displayName=Ip;var Dp="SelectScrollDownButton",Ak=S.forwardRef((e,t)=>{const r=Xi(Dp,e.__scopeSelect),l=Jh(Dp,e.__scopeSelect),[o,s]=S.useState(!1),u=ct(t,l.onScrollButtonChange);return mn(()=>{if(r.viewport&&r.isPositioned){let f=function(){const m=d.scrollHeight-d.clientHeight,g=Math.ceil(d.scrollTop)<m;s(g)};const d=r.viewport;return f(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[r.viewport,r.isPositioned]),o?v.jsx(Tk,{...e,ref:u,onAutoScroll:()=>{const{viewport:f,selectedItem:d}=r;f&&d&&(f.scrollTop=f.scrollTop+d.offsetHeight)}}):null});Ak.displayName=Dp;var Tk=S.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:l,...o}=e,s=Xi("SelectScrollButton",r),u=S.useRef(null),f=Wc(r),d=S.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return S.useEffect(()=>()=>d(),[d]),mn(()=>{var g;const m=f().find(p=>p.ref.current===document.activeElement);(g=m==null?void 0:m.ref.current)==null||g.scrollIntoView({block:"nearest"})},[f]),v.jsx(et.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:be(o.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(l,50))}),onPointerMove:be(o.onPointerMove,()=>{var m;(m=s.onItemLeave)==null||m.call(s),u.current===null&&(u.current=window.setInterval(l,50))}),onPointerLeave:be(o.onPointerLeave,()=>{d()})})}),NB="SelectSeparator",_k=S.forwardRef((e,t)=>{const{__scopeSelect:r,...l}=e;return v.jsx(et.div,{"aria-hidden":!0,...l,ref:t})});_k.displayName=NB;var Lp="SelectArrow",RB=S.forwardRef((e,t)=>{const{__scopeSelect:r,...l}=e,o=Wh(r),s=$i(Lp,r),u=Xi(Lp,r);return s.open&&u.position==="popper"?v.jsx(Ph,{...o,...l,ref:t}):null});RB.displayName=Lp;var OB="SelectBubbleInput",jB=S.forwardRef(({__scopeSelect:e,value:t,...r},l)=>{const o=S.useRef(null),s=ct(l,o),u=mB(t);return S.useEffect(()=>{const f=o.current;if(!f)return;const d=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(d,"value").set;if(u!==t&&g){const p=new Event("change",{bubbles:!0});g.call(f,t),f.dispatchEvent(p)}},[u,t]),v.jsx(et.select,{...r,style:{...ZC,...r.style},ref:s,defaultValue:t})});jB.displayName=OB;function Mk(e){return e===""||e===void 0}function Nk(e){const t=vr(e),r=S.useRef(""),l=S.useRef(0),o=S.useCallback(u=>{const f=r.current+u;t(f),(function d(m){r.current=m,window.clearTimeout(l.current),m!==""&&(l.current=window.setTimeout(()=>d(""),1e3))})(f)},[t]),s=S.useCallback(()=>{r.current="",window.clearTimeout(l.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(l.current),[]),[r,o,s]}function Rk(e,t,r){const o=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let u=zB(e,Math.max(s,0));o.length===1&&(u=u.filter(m=>m!==r));const d=u.find(m=>m.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==r?d:void 0}function zB(e,t){return e.map((r,l)=>e[(t+l)%e.length])}var Ok=sk,IB=ck,DB=fk,jk=dk,LB=gk,zk=xk,Ik=Sk,PB=wk,BB=kk,Dk=Ek,Lk=Ak,Pk=_k;const UB=S.forwardRef(({className:e,children:t,...r},l)=>v.jsxs(Ok,{ref:l,className:we("flex h-9 w-full items-center justify-between gap-2 rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground outline-none transition-colors","placeholder:text-muted-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50","[&>span]:line-clamp-1",e),...r,children:[t,v.jsx(IB,{asChild:!0,children:v.jsx(Fp,{className:"h-4 w-4 shrink-0 opacity-50"})})]}));UB.displayName=Ok.displayName;const Bk=S.forwardRef(({className:e,...t},r)=>v.jsx(Dk,{ref:r,className:we("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(l2,{className:"h-4 w-4"})}));Bk.displayName=Dk.displayName;const Uk=S.forwardRef(({className:e,...t},r)=>v.jsx(Lk,{ref:r,className:we("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(Fp,{className:"h-4 w-4"})}));Uk.displayName=Lk.displayName;const FB=S.forwardRef(({className:e,children:t,position:r="popper",...l},o)=>v.jsx(DB,{children:v.jsxs(jk,{ref:o,className:we("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-lg border border-border bg-background text-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...l,children:[v.jsx(Bk,{}),v.jsx(LB,{className:we("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),v.jsx(Uk,{})]})}));FB.displayName=jk.displayName;const HB=S.forwardRef(({className:e,...t},r)=>v.jsx(zk,{ref:r,className:we("px-2 py-1.5 text-sm font-semibold",e),...t}));HB.displayName=zk.displayName;const VB=S.forwardRef(({className:e,children:t,...r},l)=>v.jsxs(Ik,{ref:l,className:we("relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-2 pr-8 text-sm outline-none","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[v.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(BB,{children:v.jsx(xl,{className:"h-4 w-4"})})}),v.jsx(PB,{children:t})]}));VB.displayName=Ik.displayName;const qB=S.forwardRef(({className:e,...t},r)=>v.jsx(Pk,{ref:r,className:we("-mx-1 my-1 h-px bg-border",e),...t}));qB.displayName=Pk.displayName;const GB="py-2 pl-2 pr-8",YB="rounded-md text-sm font-normal focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground",KB="flex items-center gap-3",$B="h-5 w-5 shrink-0";function XB({value:e,label:t,isMac:r}){return v.jsxs("span",{className:KB,children:[v.jsx(ZB,{value:e,isMac:r,className:$B}),v.jsx("span",{children:t})]})}function QB(e,t){return{preset:e,commandTemplate:e==="custom"&&(t==null?void 0:t.trim())||as(e)}}function ZB({value:e,isMac:t,className:r}){return e==="finder"?t?v.jsx(BP,{className:r}):v.jsx(HP,{className:r}):e==="terminal"?v.jsx(VP,{className:r}):e==="preview"?v.jsx(UP,{className:r}):e==="default"?v.jsx(FP,{className:r}):v.jsx(PP,{preset:e.replace("editor:",""),className:r})}function WB({editorPreset:e,isMac:t,includeFinder:r=!0,includeTerminal:l=!1,includePreview:o=!1,includeDefault:s=!1,menuKind:u="context"}){const f=[{value:"editor:cursor",label:"Cursor"},{value:"editor:xcode",label:"Xcode"},{value:"editor:windsurf",label:"Windsurf"},...e==="custom"?[{value:"editor:custom",label:"Custom"}]:[]],d=`editor:${e}`,m=[...f.filter(g=>g.value===d),...f.filter(g=>g.value!==d)];return u==="navbar"?[...m.filter(g=>g.value===d),...r?[{value:"finder",label:t?"Finder":"Folder"}]:[],...l?[{value:"terminal",label:"Terminal"}]:[],...m.filter(g=>g.value!==d)]:[...m,...o&&t?[{value:"preview",label:"Preview"}]:[],...r?[{value:"finder",label:t?"Finder":"Folder"}]:[],...l?[{value:"terminal",label:"Terminal"}]:[],...s?[{value:"default",label:"Default App"}]:[]]}function JB(e){if(e.value==="finder"){e.onOpenExternal("open_finder");return}if(e.value==="terminal"){e.onOpenExternal("open_terminal");return}if(e.value==="preview"){e.onOpenExternal("open_preview");return}if(e.value==="default"){e.onOpenExternal("open_default");return}const t=e.value.replace("editor:","");e.onOpenExternal("open_editor",QB(t,e.editorCommandTemplate))}function e8({isMac:e,editorPreset:t,editorCommandTemplate:r,includeFinder:l=!0,includeTerminal:o=!1,includePreview:s=!1,includeDefault:u=!1,onOpenExternal:f}){const d=WB({editorPreset:t,isMac:e,includeFinder:l,includeTerminal:o,includePreview:s,includeDefault:u});return v.jsx(YC,{className:"rounded-lg p-1",children:d.map(m=>v.jsx(KC,{className:`${GB} ${YB}`,onSelect:g=>{g.preventDefault(),JB({value:m.value,editorCommandTemplate:r,onOpenExternal:f})},children:v.jsx(XB,{value:m.value,label:m.label,isMac:e})},m.value))})}const t8=1024*1024,n8=256*1024,o1=200,Pp=20,Fk=new Set([".c",".cc",".cfg",".conf",".cpp",".cs",".css",".env",".go",".graphql",".h",".hpp",".html",".ini",".java",".js",".jsonc",".jsx",".kt",".lua",".mjs",".php",".pl",".properties",".py",".rb",".rs",".scss",".sh",".sql",".swift",".toml",".ts",".tsx",".txt",".vue",".xml",".yaml",".yml",".zsh"]),r8=new Set([".7z",".bz2",".gz",".rar",".tar",".tgz",".xz",".zip"]),i8=new Set([".aac",".flac",".m4a",".mp3",".ogg",".wav"]),l8=new Set([".avi",".m4v",".mov",".mp4",".mkv",".webm"]);function Hk(e){const t=e.mimeType.toLowerCase(),r=Vk(e.displayName);return t.startsWith("image/")?{kind:"image",openInNewTab:!1}:t==="application/pdf"?{kind:"pdf",openInNewTab:!1}:t==="application/json"?e.size<=n8?{kind:"json",openInNewTab:!1}:{kind:"external",openInNewTab:!0}:r===".md"?{kind:"markdown",openInNewTab:!1}:t==="text/csv"||t==="text/tab-separated-values"?{kind:"table",openInNewTab:!1}:t.startsWith("text/")?{kind:"text",openInNewTab:!1}:Fk.has(r)?{kind:"text",openInNewTab:!1}:{kind:"external",openInNewTab:!0}}function o8(e){const t=e.mimeType.toLowerCase(),r=Vk(e.displayName);return t.startsWith("image/")?"image":t==="application/pdf"||r===".pdf"?"pdf":t==="application/json"||r===".json"||r===".jsonc"?"json":r===".md"?"markdown":t==="text/csv"||t==="text/tab-separated-values"||r===".csv"||r===".tsv"?"table":t.startsWith("audio/")||i8.has(r)?"audio":t.startsWith("video/")||l8.has(r)?"video":t.includes("zip")||t.includes("archive")||r8.has(r)?"archive":Fk.has(r)?r===".txt"?"text":"code":t.startsWith("text/")?"text":"file"}async function a8(e,t){const r=typeof AbortController<"u"?new AbortController:null,l=typeof window<"u"&&r?window.setTimeout(()=>r.abort("preview-timeout"),15e3):null;try{const o=await fetch(c8(e),{signal:r==null?void 0:r.signal,headers:{Accept:"text/plain, text/markdown, application/json, text/csv, text/tab-separated-values, */*"}});if(!o.ok)throw new Error(`Preview request failed with status ${o.status}`);if(!o.body){const p=await o.text(),x=new TextEncoder().encode(p),b=x.length>t;return{content:b?new TextDecoder().decode(x.slice(0,t)):p,truncated:b}}const s=o.body.getReader(),u=[];let f=0,d=!1;for(;;){const{done:p,value:x}=await s.read();if(p)break;if(!x)continue;const b=t-f;if(b<=0){d=!0,await s.cancel();break}if(x.byteLength>b){u.push(x.slice(0,b)),f+=b,d=!0,await s.cancel();break}u.push(x),f+=x.byteLength}const m=new Uint8Array(f);let g=0;for(const p of u)m.set(p,g),g+=p.byteLength;return{content:new TextDecoder().decode(m),truncated:d}}catch(o){throw f8(o)?new Error("Preview request timed out"):o}finally{l!==null&&window.clearTimeout(l)}}function s8(e){try{return`${JSON.stringify(JSON.parse(e),null,2)}
|
|
401
|
+
`}catch{return e}}function u8(e,t){const r=d8(e,t),l=r.length,o=r.reduce((f,d)=>Math.max(f,d.length),0),s=l>o1,u=o>Pp;return{rows:r.slice(0,o1).map(f=>f.slice(0,Pp)),rowCount:l,columnCount:o,truncatedRows:s,truncatedColumns:u}}function Vk(e){const t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""}function c8(e){return typeof window>"u"?e:new URL(e,document.baseURI||window.location.href).toString()}function f8(e){return e instanceof DOMException&&e.name==="AbortError"?!0:typeof e=="string"&&e==="preview-timeout"}function d8(e,t){const r=[];let l=[],o="",s=!1;for(let u=0;u<e.length;u+=1){const f=e[u],d=e[u+1];if(f==='"'){s&&d==='"'?(o+='"',u+=1):s=!s;continue}if(!s&&f===t){l.push(o),o="";continue}if(!s&&(f===`
|
|
402
|
+
`||f==="\r")){f==="\r"&&d===`
|
|
403
|
+
`&&(u+=1),l.push(o),r.push(l),l=[],o="";continue}o+=f}return(o.length>0||l.length>0)&&(l.push(o),r.push(l)),r}function m8({attachment:e,previewUrl:t,onClick:r,onRemove:l,className:o,size:s="transcript"}){const u=e.contentUrl||t,f=s==="composer";return v.jsxs("div",{className:we("group relative flex flex-row items-end",o),children:[v.jsxs("button",{type:"button",onClick:r,className:we("group/image relative overflow-hidden rounded-xl border border-border/80 bg-background shadow-sm",f?"min-w-[80px]":"min-w-[200px]"),children:[u?v.jsx("img",{src:u,alt:e.displayName,className:we("rounded-xl object-contain bg-muted",f?"min-h-[50px] min-w-[80px] max-h-[120px] max-w-[200px]":"min-h-[100px] min-w-[200px] max-h-[300px] max-w-[300px]")}):v.jsx("div",{className:we("flex items-center justify-center rounded-xl bg-muted text-muted-foreground",f?"min-h-[64px] min-w-[80px]":"min-h-[160px] min-w-[200px]"),children:v.jsx(v1,{className:we(f?"size-6":"size-8")})}),v.jsxs("div",{className:we("pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/75 via-black/30 to-transparent text-left opacity-0 transition-opacity duration-200 group-hover/image:opacity-100",f?"px-2.5 pb-2 pt-6":"px-4 pb-3 pt-10"),children:[v.jsx("div",{className:we("truncate font-medium text-white",f?"text-xs":"text-sm"),children:e.displayName}),v.jsxs("div",{className:"truncate text-xs text-white/80",children:[e.mimeType," · ",eg(e.size)]})]})]}),l?v.jsx(qk,{displayName:e.displayName,onRemove:l}):null]})}function p8({attachment:e,onClick:t,onRemove:r,className:l}){const o=e.kind==="mention"?"text":o8(e),s=y8(o),u=e.kind==="mention",f=u?h8(e.displayName):e.displayName,d=u?g8(e.displayName):"";return v.jsxs("div",{className:we("group relative",l),children:[v.jsxs("button",{type:"button",onClick:t,title:u?e.displayName:void 0,className:"flex w-[200px] items-center gap-2 rounded-xl border border-border bg-background/85 p-1 pr-3 text-left transition-colors hover:bg-accent/50",children:[v.jsx("div",{className:"flex min-h-10 min-w-10 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground",children:v.jsx(s,{className:"size-5"})}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("div",{className:"max-w-[150px] truncate text-[13px] font-medium text-foreground",children:f}),u?v.jsx("div",{className:"max-w-[150px] truncate text-[11px] text-muted-foreground",children:d?`@${d}`:"@mention"}):v.jsxs("div",{className:"truncate text-[11px] text-muted-foreground",children:[e.mimeType," · ",eg(e.size)]})]})]}),r?v.jsx(qk,{displayName:e.displayName,onRemove:r}):null]})}function h8(e){const t=e.replace(/\/+$/,""),r=t.lastIndexOf("/");return r>=0?t.slice(r+1):t}function g8(e){const t=e.replace(/\/+$/,""),r=t.lastIndexOf("/");return r>=0?t.slice(0,r):""}function qk({displayName:e,onRemove:t}){return v.jsx("button",{type:"button",className:"absolute right-2 top-2 rounded-full bg-background/90 p-1 text-muted-foreground shadow-sm transition hover:bg-muted hover:text-foreground",onClick:r=>{r.preventDefault(),r.stopPropagation(),t()},"aria-label":`Remove ${e}`,children:v.jsx(Lo,{className:"h-3.5 w-3.5"})})}function y8(e){switch(e){case"image":return v1;case"pdf":return Z2;case"markdown":return J2;case"json":return v2;case"table":return M2;case"code":return b2;case"text":return R2;case"archive":return g2;case"audio":return w2;case"video":return j2;default:return x1}}function eg(e){return e<1024?`${e} B`:e<1024*1024?`${Math.max(1,Math.round(e/1024))} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}var Jc="Dialog",[Gk]=Ki(Jc),[v8,Sr]=Gk(Jc),Yk=e=>{const{__scopeDialog:t,children:r,open:l,defaultOpen:o,onOpenChange:s,modal:u=!0}=e,f=S.useRef(null),d=S.useRef(null),[m,g]=Xw({prop:l,defaultProp:o??!1,onChange:s,caller:Jc});return v.jsx(v8,{scope:t,triggerRef:f,contentRef:d,contentId:Ao(),titleId:Ao(),descriptionId:Ao(),open:m,onOpenChange:g,onOpenToggle:S.useCallback(()=>g(p=>!p),[g]),modal:u,children:r})};Yk.displayName=Jc;var Kk="DialogTrigger",x8=S.forwardRef((e,t)=>{const{__scopeDialog:r,...l}=e,o=Sr(Kk,r),s=ct(t,o.triggerRef);return v.jsx(et.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":rg(o.open),...l,ref:s,onClick:be(e.onClick,o.onOpenToggle)})});x8.displayName=Kk;var tg="DialogPortal",[b8,$k]=Gk(tg,{forceMount:void 0}),Xk=e=>{const{__scopeDialog:t,forceMount:r,children:l,container:o}=e,s=Sr(tg,t);return v.jsx(b8,{scope:t,forceMount:r,children:S.Children.map(l,u=>v.jsx(jr,{present:r||s.open,children:v.jsx(hs,{asChild:!0,container:o,children:u})}))})};Xk.displayName=tg;var wc="DialogOverlay",Qk=S.forwardRef((e,t)=>{const r=$k(wc,e.__scopeDialog),{forceMount:l=r.forceMount,...o}=e,s=Sr(wc,e.__scopeDialog);return s.modal?v.jsx(jr,{present:l||s.open,children:v.jsx(w8,{...o,ref:t})}):null});Qk.displayName=wc;var S8=jo("DialogOverlay.RemoveScroll"),w8=S.forwardRef((e,t)=>{const{__scopeDialog:r,...l}=e,o=Sr(wc,r);return v.jsx(Kc,{as:S8,allowPinchZoom:!0,shards:[o.contentRef],children:v.jsx(et.div,{"data-state":rg(o.open),...l,ref:t,style:{pointerEvents:"auto",...l.style}})})}),Al="DialogContent",Zk=S.forwardRef((e,t)=>{const r=$k(Al,e.__scopeDialog),{forceMount:l=r.forceMount,...o}=e,s=Sr(Al,e.__scopeDialog);return v.jsx(jr,{present:l||s.open,children:s.modal?v.jsx(C8,{...o,ref:t}):v.jsx(k8,{...o,ref:t})})});Zk.displayName=Al;var C8=S.forwardRef((e,t)=>{const r=Sr(Al,e.__scopeDialog),l=S.useRef(null),o=ct(t,r.contentRef,l);return S.useEffect(()=>{const s=l.current;if(s)return Bh(s)},[]),v.jsx(Wk,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(e.onCloseAutoFocus,s=>{var u;s.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:be(e.onPointerDownOutside,s=>{const u=s.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0;(u.button===2||f)&&s.preventDefault()}),onFocusOutside:be(e.onFocusOutside,s=>s.preventDefault())})}),k8=S.forwardRef((e,t)=>{const r=Sr(Al,e.__scopeDialog),l=S.useRef(!1),o=S.useRef(!1);return v.jsx(Wk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var u,f;(u=e.onCloseAutoFocus)==null||u.call(e,s),s.defaultPrevented||(l.current||(f=r.triggerRef.current)==null||f.focus(),s.preventDefault()),l.current=!1,o.current=!1},onInteractOutside:s=>{var d,m;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(l.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=s.target;((m=r.triggerRef.current)==null?void 0:m.contains(u))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Wk=S.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:l,onOpenAutoFocus:o,onCloseAutoFocus:s,...u}=e,f=Sr(Al,r),d=S.useRef(null),m=ct(t,d);return Th(),v.jsxs(v.Fragment,{children:[v.jsx(Fc,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:o,onUnmountAutoFocus:s,children:v.jsx(ms,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":rg(f.open),...u,ref:m,onDismiss:()=>f.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(E8,{titleId:f.titleId}),v.jsx(T8,{contentRef:d,descriptionId:f.descriptionId})]})]})}),ng="DialogTitle",Jk=S.forwardRef((e,t)=>{const{__scopeDialog:r,...l}=e,o=Sr(ng,r);return v.jsx(et.h2,{id:o.titleId,...l,ref:t})});Jk.displayName=ng;var eE="DialogDescription",tE=S.forwardRef((e,t)=>{const{__scopeDialog:r,...l}=e,o=Sr(eE,r);return v.jsx(et.p,{id:o.descriptionId,...l,ref:t})});tE.displayName=eE;var nE="DialogClose",rE=S.forwardRef((e,t)=>{const{__scopeDialog:r,...l}=e,o=Sr(nE,r);return v.jsx(et.button,{type:"button",...l,ref:t,onClick:be(e.onClick,()=>o.onOpenChange(!1))})});rE.displayName=nE;function rg(e){return e?"open":"closed"}var iE="DialogTitleWarning",[EU,lE]=xL(iE,{contentName:Al,titleName:ng,docsSlug:"dialog"}),E8=({titleId:e})=>{const t=lE(iE),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
404
|
+
|
|
405
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
406
|
+
|
|
407
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return S.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},A8="DialogDescriptionWarning",T8=({contentRef:e,descriptionId:t})=>{const l=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lE(A8).contentName}}.`;return S.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(l))},[l,e,t]),null},_8=Yk,M8=Xk,oE=Qk,aE=Zk,N8=Jk,R8=tE,O8=rE;const j8="data-focus-fallback-ignore",z8="kanna:restore-chat-input-focus",sE="data-chat-selection-zone",I8=_8,D8=M8,uE=S.forwardRef(({className:e,...t},r)=>v.jsx(oE,{ref:r,className:we("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));uE.displayName=oE.displayName;const L8={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg"},cE=S.forwardRef(({className:e,children:t,size:r="md",...l},o)=>v.jsxs(D8,{children:[v.jsx(uE,{}),v.jsxs(aE,{ref:o,[j8]:"",onCloseAutoFocus:s=>{var u;s.preventDefault(),window.dispatchEvent(new Event(z8)),(u=l.onCloseAutoFocus)==null||u.call(l,s)},className:we("fixed left-1/2 top-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-background shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]","max-h-[85vh] flex flex-col",L8[r],e),...l,children:[t,v.jsxs(O8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[v.jsx(Lo,{className:"h-4 w-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));cE.displayName=aE.displayName;function P8({className:e,...t}){return v.jsx("div",{className:we("shrink-0 flex flex-col space-y-1.5 p-4 border-b border-border",e),...t})}function B8({className:e,...t}){return v.jsx(N8,{className:we("text-lg font-medium leading-none tracking-tight",e),...t})}function U8({className:e,...t}){return v.jsx(R8,{className:we("text-sm text-muted-foreground",e),...t})}function F8({className:e,...t}){return v.jsx("div",{className:we("flex-1 min-h-0 overflow-y-auto px-4 pb-4 pt-3.5",e),...t})}function H8({className:e,...t}){return v.jsx("div",{className:we("shrink-0 flex justify-end gap-2 border-t border-border bg-background p-2 rounded-b-xl",e),...t})}function V8({className:e,...t}){return v.jsx("button",{className:we("touch-manipulation inline-flex items-center justify-center whitespace-nowrap cursor-pointer text-sm font-medium transition-colors","rounded-full h-9 px-4","hover:bg-accent dark:hover:bg-card hover:text-accent-foreground text-muted-foreground","disabled:pointer-events-none disabled:text-muted-foreground/50",e),...t})}function q8(e){const t=e.split(`
|
|
408
|
+
`),r=/^\s*(\d+)→(.*)$/;return t.map(l=>{const o=l.match(r);return o?{lineNumber:parseInt(o[1],10),content:o[2]}:{lineNumber:null,content:l}})}function G8(e){return e.replace(/<[^>]+>/g,"")}function Y8(e,t){const r=e.split(`
|
|
409
|
+
`),l=t.split(`
|
|
410
|
+
`),o=K8(r,l),s=$8(r,l,o);return X8(s)}function K8(e,t){const r=e.length,l=t.length,o=Array.from({length:r+1},()=>Array(l+1).fill(0));for(let s=1;s<=r;s++)for(let u=1;u<=l;u++)o[s][u]=e[s-1]===t[u-1]?o[s-1][u-1]+1:Math.max(o[s-1][u],o[s][u-1]);return o}function $8(e,t,r){const l=[];let o=e.length,s=t.length;for(;o>0||s>0;)o>0&&s>0&&e[o-1]===t[s-1]?(l.push({type:"context",text:e[o-1],oldIdx:o,newIdx:s}),o--,s--):s>0&&(o===0||r[o][s-1]>=r[o-1][s])?(l.push({type:"added",text:t[s-1],oldIdx:o,newIdx:s}),s--):(l.push({type:"removed",text:e[o-1],oldIdx:o,newIdx:s}),o--);return l.reverse()}function X8(e){return e.map(t=>{const r=t.type==="removed"?"-":t.type==="added"?"+":" ";return{type:t.type,content:`${r}${t.text}`}})}function Ya({content:e,isDiff:t=!1,oldString:r,newString:l}){const o=S.useMemo(()=>t&&r!==void 0&&l!==void 0?Y8(r,l):[],[t,r,l]),s=S.useMemo(()=>t?[]:q8(e),[e,t]),u=S.useMemo(()=>s.some(f=>f.lineNumber!==null),[s]);return t&&o.length>0?v.jsx("div",{className:"my-1 rounded-lg border border-border overflow-hidden",children:v.jsx("div",{className:"overflow-auto max-h-64 md:max-h-[50vh]",children:v.jsx("table",{className:"w-full border-collapse text-xs font-mono",children:v.jsx("tbody",{children:o.map((f,d)=>{const m=f.type==="removed"?"bg-destructive/10 dark:bg-destructive/15":f.type==="added"?"bg-success/10 dark:bg-success/15":"",g=f.type==="removed"?"text-destructive":f.type==="added"?"text-success":"text-foreground";return v.jsxs("tr",{className:m,children:[v.jsx("td",{className:`px-2 py-0 select-none w-0 whitespace-nowrap ${f.type==="removed"?"text-destructive/50":f.type==="added"?"text-success/50":"text-muted-foreground/50"}`,children:f.type==="removed"?"-":f.type==="added"?"+":" "}),v.jsx("td",{className:`px-2 py-0 whitespace-pre select-all ${g}`,children:f.content.slice(1)})]},d)})})})})}):v.jsx("div",{className:"my-1 rounded-lg border border-border overflow-hidden",children:v.jsx("div",{className:"overflow-auto max-h-64 md:max-h-[50vh]",children:v.jsx("table",{className:"w-full border-collapse text-xs font-mono",children:v.jsx("tbody",{children:s.map((f,d)=>v.jsxs("tr",{children:[u&&v.jsx("td",{className:"px-2 py-0 select-none w-0 whitespace-nowrap text-muted-foreground/50 text-right",children:f.lineNumber!==null?f.lineNumber:""}),v.jsx("td",{className:"px-2 py-0 whitespace-pre select-all text-foreground",children:G8(f.content)})]},d))})})})})}function Q8({attachment:e,onOpenChange:t}){const[r,l]=S.useState({}),o=S.useMemo(()=>e?Hk(e):null,[e]),s=e?r[e.id]:void 0,u=e!=null&&e.contentUrl?W8(e.contentUrl):"";S.useEffect(()=>{if(!e||!o||o.openInNewTab||o.kind==="image"||o.kind==="pdf"||o.kind==="external")return;const m=o.kind;if((s==null?void 0:s.status)==="loading"||(s==null?void 0:s.status)==="ready")return;let g=!1;return l(p=>({...p,[e.id]:{status:"loading"}})),a8(e.contentUrl,t8).then(({content:p,truncated:x})=>{if(g)return;if(m==="table"){const w=e.mimeType==="text/tab-separated-values"?" ":",";l(C=>({...C,[e.id]:{status:"ready",kind:"table",truncated:x,table:u8(p,w)}}));return}const b=m==="json"?s8(p):p;l(w=>({...w,[e.id]:{status:"ready",kind:m,content:b,truncated:x}}))}).catch(p=>{if(g)return;const x=p instanceof Error?p.message:"Unable to load preview.";l(b=>({...b,[e.id]:{status:"error",message:x}}))}),()=>{g=!0}},[e==null?void 0:e.id,e==null?void 0:e.contentUrl,e==null?void 0:e.mimeType,o==null?void 0:o.kind,o==null?void 0:o.openInNewTab]);async function f(){var m;!u||typeof navigator>"u"||!((m=navigator.clipboard)!=null&&m.writeText)||await navigator.clipboard.writeText(u)}function d(){!u||typeof window>"u"||window.open(u,"_blank","noopener,noreferrer")}return v.jsx(I8,{open:e!==null&&!(o!=null&&o.openInNewTab),onOpenChange:t,children:v.jsx(cE,{size:"lg",className:"max-w-[min(92vw,960px)] overflow-hidden p-0",children:e&&o&&!o.openInNewTab?v.jsxs(v.Fragment,{children:[v.jsx(P8,{className:"pr-12",children:v.jsx(B8,{className:"text-md",children:e.displayName})}),v.jsx(F8,{className:"bg-muted/20 p-4",children:Z8(e,o.kind,s)}),v.jsxs(H8,{className:"items-center justify-between gap-3 px-4 py-3",children:[v.jsxs(U8,{className:"truncate",children:[e.mimeType," · ",eg(e.size)]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsxs(V8,{type:"button",onClick:f,children:[v.jsx(F2,{className:"mr-2 h-4 w-4"}),"Copy Link"]}),v.jsxs(zt,{type:"button",variant:"outline",onClick:d,children:[v.jsx(p2,{className:"mr-2 h-4 w-4"}),"Open In New Tab"]})]})]})]}):null})})}function Z8(e,t,r){if(t==="image")return v.jsx("div",{className:"flex items-center justify-center",children:v.jsx("img",{src:e.contentUrl,alt:e.displayName,className:"max-h-[70vh] w-auto max-w-full rounded-2xl object-contain"})});if(t==="pdf")return v.jsx("iframe",{src:e.contentUrl,title:e.displayName,className:"h-[70vh] w-full rounded-xl border border-border bg-background"});if(!r||r.status==="loading")return v.jsx("div",{className:"flex h-[50vh] items-center justify-center text-sm text-muted-foreground",children:"Loading preview…"});if(r.status==="error")return v.jsx("div",{className:"flex h-[50vh] items-center justify-center text-sm text-destructive",children:r.message});if(r.kind==="markdown"&&r.content!==void 0)return v.jsxs("div",{className:"space-y-3",children:[r.truncated?v.jsx(Jm,{message:"Preview truncated to 1024 KB."}):null,v.jsx("div",{className:"prose prose-sm max-w-none overflow-auto rounded-xl border border-border bg-background p-4 prose-invert",children:v.jsx(Fo,{remarkPlugins:[Ho],components:Po(),children:r.content})})]});if(r.kind==="table"&&r.table){const l=r.table.rows.length>0,[o,...s]=r.table.rows,u=[r.truncated?"Preview truncated to 1024 KB.":null,r.table.truncatedRows?`Showing first ${r.table.rows.length} of ${r.table.rowCount} rows.`:null,r.table.truncatedColumns?`Showing first ${Pp} of ${r.table.columnCount} columns.`:null].filter(Boolean);return v.jsxs("div",{className:"space-y-3",children:[u.length>0?v.jsx(Jm,{message:u.join(" ")}):null,v.jsx("div",{className:"max-h-[70vh] overflow-auto rounded-xl border border-border bg-background",children:v.jsxs("table",{className:"min-w-full border-collapse text-xs",children:[l?v.jsx("thead",{className:"sticky top-0 bg-muted",children:v.jsx("tr",{children:o.map((f,d)=>v.jsx("th",{className:"border-b border-border px-3 py-2 text-left font-medium text-foreground",children:f||" "},`${f}-${d}`))})}):null,v.jsx("tbody",{children:(l?s:r.table.rows).map((f,d)=>v.jsx("tr",{className:"odd:bg-background even:bg-muted/20",children:f.map((m,g)=>v.jsx("td",{className:"max-w-[320px] border-b border-border px-3 py-2 align-top text-foreground",children:v.jsx("div",{className:"whitespace-pre-wrap break-words",children:m||" "})},`${d}-${g}`))},d))})]})})]})}return v.jsxs("div",{className:"space-y-3",children:[r.truncated?v.jsx(Jm,{message:"Preview truncated to 1024 KB."}):null,v.jsx(Ya,{content:r.content??""})]})}function Jm({message:e}){return v.jsx("div",{className:"rounded-xl border border-border bg-background px-3 py-2 text-sm text-muted-foreground",children:e})}function W8(e){return typeof window>"u"?e:new URL(e,document.baseURI||window.location.href).toString()}function J8(e){var r;const t=e.match(/^<system-message>\s*([\s\S]*?)\s*<\/system-message>\s*([\s\S]*)$/);return t?{systemMessage:((r=t[1])==null?void 0:r.trim())||null,body:t[2]??""}:{systemMessage:null,body:e}}function e9({content:e,attachments:t=[],steered:r=!1,autoContinue:l}){const[o,s]=S.useState(null),u=jc(),f=S.useMemo(()=>J8(e),[e]),d=u.attachmentMode==="metadata",m=!u.readonly||u.attachmentMode==="bundle",g=S.useMemo(()=>t.filter(w=>w.kind==="image"&&(w.contentUrl||d)),[t,d]),p=S.useMemo(()=>t.filter(w=>w.kind!=="image"||!w.contentUrl&&!d),[t,d]),x=t.find(w=>w.id===o)??null;function b(w){if(!m||!w.contentUrl)return;if(Hk(w).openInNewTab){typeof window<"u"&&window.open(new URL(w.contentUrl,document.baseURI||window.location.href).toString(),"_blank","noopener,noreferrer");return}s(w.id)}return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex flex-col items-end gap-2",children:[g.length>0?v.jsx("div",{className:"flex max-w-[85%] sm:max-w-[80%] flex-wrap justify-end gap-3",children:g.map(w=>v.jsx(m8,{attachment:w,onClick:m?()=>b(w):void 0},w.id))}):null,p.length>0?v.jsx("div",{className:"flex max-w-[85%] sm:max-w-[80%] flex-wrap justify-end gap-2",children:p.map(w=>v.jsx(p8,{attachment:w,onClick:m?()=>b(w):void 0},w.id))}):null,f.body||!f.body&&t.length===0&&e&&!f.systemMessage?v.jsxs("div",{className:"flex max-w-[85%] items-center gap-2 sm:max-w-[80%]",children:[r?v.jsx(v_,{"aria-label":"Sent mid-turn",className:"size-3.5 shrink-0 text-muted-foreground"}):null,v.jsx("div",{className:"min-w-0 flex-1 rounded-[20px] border border-border bg-muted px-3.5 py-1.5 text-primary prose prose-sm prose-invert [&_p]:whitespace-pre-line",children:v.jsx(Fo,{remarkPlugins:[Ho],components:Po(),children:f.body})})]}):null,l?v.jsx("span",{className:"text-xs text-muted-foreground opacity-70",children:"auto-sent"}):null]}),v.jsx(Q8,{attachment:x,onOpenChange:w=>!w&&s(null)})]})}function t9({json:e}){return v.jsx("div",{className:"flex gap-3 justify-start",children:v.jsx("div",{className:"flex-1 max-w-[90%]",children:v.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap break-words bg-muted rounded-lg p-3 overflow-auto max-h-96",children:e})})})}function Bp(e){return e.split(/[\s_-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}const n9=[/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(['"])([\s\S]*)\1$/,/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(.+)$/,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(.+)$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(.+)$/i];function r9(e){const t=e.trim();for(const r of n9){const l=t.match(r);if(!l)continue;const o=(l[2]??l[1]??"").trim();if(o)return o}return t}function fE({title:e,count:t,children:r,badge:l}){const[o,s]=S.useState(!1);return t===0?null:v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsxs("button",{onClick:()=>s(!o),className:"flex items-center gap-1 cursor-pointer group/section hover:opacity-60 transition-opacity",children:[v.jsx(bl,{className:we("h-3.5 w-3.5 text-muted-foreground transition-transform duration-200",o&&"rotate-90")}),v.jsx("span",{className:"text-muted-foreground font-medium",children:e}),v.jsx("span",{className:"text-muted-foreground/60",children:t}),l]}),o&&v.jsx("div",{className:"ml-5",children:r})]})}function ep({title:e,items:t,icon:r,getIcon:l}){return t.length===0?null:v.jsx(fE,{title:e,count:t.length,children:v.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.map(o=>v.jsx(yS,{icon:l?l(o):r,children:o},o))})})}function i9(e){const t=e.match(/^mcp__([^_]+)__(.+)$/);return t?{server:t[1],tool:t[2]}:null}function dE({status:e}){const t=e==="connected"?"bg-success":e==="pending"?"bg-warning":"bg-destructive";return v.jsx("span",{className:we("inline-block h-2 w-2 rounded-full shrink-0",t)})}function l9(e){switch(e){case"connected":return"Connected";case"failed":return"Failed";case"needs-auth":return"Needs auth";case"pending":return"Connecting...";case"disabled":return"Disabled";default:return e}}function a1({server:e}){const[t,r]=S.useState(!1),l=e.status==="connected";return v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsxs("button",{onClick:()=>l&&e.tools.length>0&&r(!t),className:we("flex items-center gap-1.5",l&&e.tools.length>0&&"cursor-pointer hover:opacity-60 transition-opacity"),children:[l&&e.tools.length>0&&v.jsx(bl,{className:we("h-3 w-3 text-muted-foreground transition-transform duration-200",t&&"rotate-90")}),v.jsx(dE,{status:e.status}),v.jsx("span",{className:"text-muted-foreground font-medium",children:Bp(e.name)}),l?v.jsxs("span",{className:"text-muted-foreground/50",children:[e.tools.length," tools"]}):v.jsx("span",{className:"text-muted-foreground/50",children:l9(e.status)})]}),!l&&e.error&&v.jsx("span",{className:"text-destructive ml-5",children:e.error}),t&&e.tools.length>0&&v.jsx("div",{className:"flex flex-wrap gap-1.5 ml-5",children:e.tools.map(o=>v.jsx(yS,{icon:hS(`mcp__${e.name}__${o}`),children:o},o))})]})}function o9({servers:e}){if(e.length===0)return null;const t=e.filter(o=>o.status==="connected"),r=e.filter(o=>o.status!=="connected"),l=r.length>0?v.jsxs("span",{className:"flex items-center gap-1 ml-1",children:[v.jsx(dE,{status:"failed"}),v.jsxs("span",{className:"text-muted-foreground/60",children:[r.length," disconnected"]})]}):null;return v.jsx(fE,{title:"MCP Servers",count:e.length,badge:l,children:v.jsxs("div",{className:"flex flex-col gap-2",children:[t.map(o=>v.jsx(a1,{server:o},o.name)),r.map(o=>v.jsx(a1,{server:o},o.name))]})})}function a9({rawJson:e}){const[t,r]=S.useState(!1);return v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsxs("button",{onClick:()=>r(!t),className:"flex items-center gap-1 cursor-pointer group/section hover:opacity-60 transition-opacity",children:[v.jsx(bl,{className:we("h-3.5 w-3.5 text-muted-foreground transition-transform duration-200",t&&"rotate-90")}),v.jsx("span",{className:"text-muted-foreground font-medium",children:"Raw Message"})]}),t&&v.jsx("pre",{className:"ml-5 text-xs whitespace-pre-wrap break-all border border-border rounded-md p-3 overflow-x-auto max-h-96 overflow-y-auto",children:e})]})}function s9({message:e,rawJson:t}){const{coreTools:r,mcpServersWithTools:l}=S.useMemo(()=>{const o=new Map,s=[];for(const f of e.tools){const d=i9(f);if(d){const m=o.get(d.server)||[];m.push(d.tool),o.set(d.server,m)}else s.push(f)}const u=e.mcpServers.map(f=>({name:f.name,status:f.status,error:f.error,tools:o.get(f.name)||[]}));return{coreTools:s,mcpServersWithTools:u}},[e.tools,e.mcpServers]);return v.jsx(li,{children:v.jsxs(zc,{expandedContent:v.jsx(Ic,{className:"my-4 text-xs",children:v.jsxs("div",{className:"flex flex-col gap-3",children:[v.jsx(GR,{children:e.model}),v.jsx(ep,{title:"Tools",items:r,getIcon:o=>dp[o]??pS}),v.jsx(ep,{title:"Agents",items:e.agents,icon:Vp}),v.jsx(ep,{title:"Commands",items:e.slashCommands,icon:i_}),v.jsx(o9,{servers:l}),t&&v.jsx(a9,{rawJson:t})]})}),children:[v.jsx($T,{className:"h-5 w-5 text-logo"}),v.jsx(Hi,{children:"Session Started"})]})})}function u9({message:e}){return v.jsx(li,{className:"hidden",children:v.jsxs(zc,{expandedContent:v.jsx(Ic,{className:"my-4 text-xs",children:v.jsx("pre",{className:"font-mono whitespace-pre-wrap break-all bg-muted border border-border rounded-lg p-2 max-h-64 overflow-auto",children:JSON.stringify(e.accountInfo,null,2)})}),children:[v.jsx("div",{className:"size-5 flex justify-center items-center ",children:v.jsx(Vp,{className:"h-4 w-4 text-muted-foreground"})}),v.jsx(Hi,{children:"Account"})]})})}function c9({message:e}){return v.jsx("div",{className:"text-pretty prose prose-sm dark:prose-invert px-0.5 w-full max-w-[70ch] space-y-4",children:v.jsx(Fo,{remarkPlugins:[Ho],components:Po(),children:e.text})})}function f9({question:e,currentIndex:t,totalQuestions:r,onBack:l,children:o}){const s=l&&t>0;return v.jsxs("div",{className:"rounded-2xl border border-border overflow-hidden",children:[v.jsxs("div",{className:"relative",children:[v.jsxs("h3",{className:"font-medium text-foreground text-sm p-3 px-4 bg-card border-b border-border text-foreground flex flex-row items-center gap-2",children:[s?v.jsx("button",{onClick:l,className:" text-muted-foreground hover:opacity-60 transition-all flex items-center",children:v.jsx(n2,{className:"h-4 w-4 -ml-0.5",strokeWidth:3})}):r>1?v.jsxs("span",{className:"font-bold text-muted-foreground whitespace-nowrap",children:[t+1," of ",r]}):null,e]}),r>1&&v.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-border",children:v.jsx("div",{className:"h-full bg-muted-foreground/40 transition-all duration-300",style:{width:`${t/r*100}%`}})})]}),o]})}function s1({label:e,description:t}){return v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-foreground text-sm",children:e}),t&&v.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:t})]})}function mE({selected:e,multiSelect:t,onClick:r}){return v.jsx("button",{type:"button",onClick:r,className:we("flex-shrink-0 w-5 h-5 border-1 flex items-center justify-center",t?"rounded":"rounded-full",e?"border-transparent bg-foreground":"border-muted-foreground/50 bg-background",r&&e&&"cursor-pointer"),children:e&&v.jsx(xl,{strokeWidth:3,className:"translate-y-[0.5px] h-3 w-3 text-white dark:text-background"})})}function d9({option:e,selected:t,multiSelect:r,onClick:l,isLast:o}){const s="w-full text-left p-3 pt-2.5 pl-4 pr-5 bg-background",u=o?"":"border-b border-border";return l?v.jsx("button",{onClick:l,className:we(s,u,"transition-all cursor-pointer"),children:v.jsxs("div",{className:"flex items-center justify-between gap-3",children:[v.jsx("div",{className:"flex-1 min-w-0",children:v.jsx(s1,{label:e.label,description:e.description})}),v.jsx(mE,{selected:t,multiSelect:r})]})}):v.jsx("div",{className:we(s,u),children:v.jsx(s1,{label:e.label,description:e.description})})}function m9(e){return e==null?void 0:e.answers}function lr(e){return e.id||e.question}function p9({message:e,onSubmit:t,isLatest:r}){var Y,G;const l=jc(),o=e.input.questions,s=!!e.result,u=m9(e.result),f=((Y=e.result)==null?void 0:Y.discarded)===!0,[d,m]=S.useState(0),[g,p]=S.useState({}),[x,b]=S.useState({}),[w,C]=S.useState(u??null),[E,A]=S.useState(s),_=(V,T)=>{var fe;const O=(fe=x[V])==null?void 0:fe.trim(),H=g[V]||"",R=T||o.find(se=>lr(se)===V);if(R!=null&&R.multiSelect)return[H,O].filter(Boolean).flatMap(se=>se.split(", ").filter(Boolean));const ue=O||H;return ue?[ue]:[]},M=V=>{const T=g[lr(V)]||"";return V.multiSelect?T.split(", ").filter(Boolean):[T]},z=(V,T)=>{const O=lr(V);if(V.multiSelect){const H=g[O]?g[O].split(", ").filter(Boolean):[],R=H.includes(T)?H.filter(ue=>ue!==T):[...H,T];p({...g,[O]:R.join(", ")})}else p({...g,[O]:T}),b({...x,[O]:""}),d<o.length-1&&setTimeout(()=>m(d+1),150)},P=(V,T)=>{const O=lr(V);b({...x,[O]:T}),T&&!V.multiSelect&&p({...g,[O]:""})},j=V=>{const T=lr(V);V.multiSelect&&x[T]&&b({...x,[T]:""})},U=o.every(V=>_(lr(V),V).length>0),B=o[d],Z=d===o.length-1,D=B&&_(lr(B),B).length>0,X=()=>{d<o.length-1&&m(d+1)},W=()=>{d>0&&m(d-1)},oe=()=>{if(!U)return;const V={};for(const T of o){const O=lr(T);V[O]=_(O,T)}C(V),A(!0),t(e.toolId,o,V)},ne=V=>{if(V.key==="Enter"&&!(!B||!D)){if(V.preventDefault(),Z){oe();return}X()}};if(E||s){const V=u||w||{};return v.jsx("div",{className:"w-full",children:v.jsxs("div",{className:"rounded-2xl border border-border overflow-hidden",children:[v.jsxs("div",{className:"font-medium text-sm p-3 px-4 pr-5 bg-muted border-b border-border flex flex-row items-center justify-between",children:[v.jsxs("p",{children:["Question",o.length!==1?"s":""]}),v.jsx("p",{className:"",children:f?"Discarded":"Answers"})]}),o.map((T,O)=>{const H=V[lr(T)]||V[T.question]||[],R=O===o.length-1;return v.jsxs("div",{className:we("w-full p-3 pt-2.5 pl-4 pr-5 bg-background flex items-center justify-between gap-3",!R&&"border-b border-border"),children:[v.jsx("div",{className:"text-sm text-pretty",children:T.question}),H.length>0&&v.jsx("div",{className:"text-sm font-medium text-right max-w-[50%] text-pretty",children:H.join(", ")}),H.length===0&&v.jsx("div",{className:"text-sm font-medium text-right italic",children:f?"Discarded":"No Response"})]},lr(T))})]})})}if(l.readonly)return v.jsx("div",{className:"w-full",children:v.jsxs("div",{className:"rounded-2xl border border-border overflow-hidden",children:[v.jsxs("div",{className:"font-medium text-sm p-3 px-4 pr-5 bg-muted border-b border-border flex flex-row items-center justify-between gap-3",children:[v.jsxs("p",{children:["Question",o.length!==1?"s":""]}),v.jsx("p",{className:"text-muted-foreground",children:"Awaiting response"})]}),o.map((V,T)=>{var O;return v.jsxs("div",{className:we("w-full p-3 pt-2.5 pl-4 pr-5 bg-background flex items-center justify-between gap-3",T<o.length-1&&"border-b border-border"),children:[v.jsx("div",{className:"text-sm text-pretty",children:V.question}),v.jsx("div",{className:"max-w-[50%] text-right text-xs text-muted-foreground text-pretty",children:((O=V.options)==null?void 0:O.map(H=>H.label).join(", "))||"Freeform response"})]},lr(V))})]})});if(!r)return v.jsx("div",{className:"w-full py-2",children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(b1,{className:"h-4 w-4 text-muted-foreground"}),v.jsx("span",{className:"text-sm text-muted-foreground",children:"Questions pending (newer question active)"})]})});if(!B)return null;const J=M(B),I=x[lr(B)]||"";return v.jsxs("div",{className:"w-full space-y-3",children:[v.jsxs(f9,{question:B.question,currentIndex:d,totalQuestions:o.length,onBack:d>0?W:void 0,children:[(G=B.options)==null?void 0:G.map(V=>v.jsx(d9,{option:V,selected:J.includes(V.label),multiSelect:B.multiSelect,onClick:()=>z(B,V.label)},V.label)),v.jsx("div",{className:"transition-all bg-background",children:v.jsxs("div",{className:"flex pr-5 items-center justify-between gap-3",children:[v.jsx("input",{type:"text",value:I,onChange:V=>P(B,V.target.value),onKeyDown:ne,placeholder:"Other...",className:"flex-1 px-3 !py-1 pl-4 min-h-[55px] min-w-0 text-sm bg-transparent outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded-md text-foreground placeholder:text-muted-foreground"}),v.jsx(mE,{selected:!!I,multiSelect:B.multiSelect,onClick:B.multiSelect&&I?()=>j(B):void 0})]})})]}),v.jsxs("div",{className:"flex justify-end gap-2 mx-2",children:[!Z&&D&&(B.multiSelect||!!I)&&v.jsx(zt,{size:"sm",onClick:X,children:"Next"}),Z&&v.jsx(zt,{size:"sm",onClick:oe,disabled:!U,className:we(!U&&"opacity-50 cursor-not-allowed","rounded-full"),children:"Submit"})]})]})}function h9({message:e,onConfirm:t,isLatest:r}){const l=jc(),o=!!e.result,[s,u]=S.useState(!1),[f,d]=S.useState(!1),[m,g]=S.useState(!1),[p,x]=S.useState(""),b=S.useRef(null),w=e.input;S.useEffect(()=>{m&&b.current&&b.current.focus()},[m]);const C=async()=>{w!=null&&w.plan&&(await navigator.clipboard.writeText(w.plan),d(!0),setTimeout(()=>d(!1),2e3))},E=o?e.result:null,A=(E==null?void 0:E.discarded)===!0;return v.jsxs("div",{className:"flex flex-col gap-3",children:[v.jsxs("div",{className:"relative rounded-2xl border border-border overflow-hidden group/plan",children:[(w==null?void 0:w.plan)&&v.jsx(zt,{variant:"ghost",size:"icon","aria-label":f?"Copied":"Copy plan",className:we("absolute top-2 right-2 z-10 h-11 w-11 md:h-8 md:w-8 rounded-md text-muted-foreground opacity-100 md:opacity-0 md:group-hover/plan:opacity-100 transition-opacity [@media(hover:none)]:!opacity-100",!f&&"hover:text-foreground",f&&"hover:!bg-transparent hover:!border-transparent"),onClick:C,children:f?v.jsx(xl,{className:"h-4 w-4 text-success"}):v.jsx(Hp,{className:"h-4 w-4"})}),v.jsxs("div",{className:we("!pt-5 !pb-0 px-4 md:py-4.5 md:px-5.5 bg-muted dark:bg-card overflow-scroll no-pre-highlight transition-all",o&&!s?"max-h-[min(400px,40vh)] ":"",o?"hover:!pb-[32px]":""),children:[o&&v.jsxs(zt,{variant:"ghost",className:"absolute z-10 bottom-2 pr-2.5 !pl-3.5 h-[34px] inline-flex gap-1 text-sm left-[50%] -translate-x-[50%] text-muted-foreground backdrop-blur-sm hover:text-foreground opacity-0 group-hover/plan:opacity-100 transition-all rounded-full border border-border",onClick:()=>u(!s),children:[s?"Show Less":"Show More",v.jsx(Fp,{className:`size-3.5 transition-transform ${s?"rotate-180":""}`})]}),w!=null&&w.plan?v.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:[v.jsx(Fo,{remarkPlugins:[Ho],components:Po(),children:w.plan}),v.jsx("div",{className:"mt-5"})]}):v.jsx("p",{className:"text-sm text-muted-foreground",children:"No plan provided"})]})]}),o?v.jsx("div",{className:"flex justify-end mx-2",children:v.jsxs("span",{className:"pl-4 inline text-sm font-medium bg-background text-foreground/60 border border-border py-1.5 px-3 rounded-[20px] leading-relaxed max-w-[85%] sm:max-w-[80%]",children:[v.jsx("em",{children:A?"Discarded":E!=null&&E.clearContext?"Approved & Cleared Context":E!=null&&E.confirmed?"Approved":E!=null&&E.message?`Adjusted: "${E.message}"`:"Adjusted Plan"}),v.jsx(d2,{className:"inline h-4 w-4 ml-1.5 -mt-0.5"})]})}):r?l.readonly?v.jsx("div",{className:"flex justify-end mx-2",children:v.jsx("span",{className:"inline text-sm text-muted-foreground italic",children:"Plan pending in original session"})}):v.jsxs("div",{className:"flex flex-col gap-3",children:[!m&&v.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center justify-end gap-2 mx-2",children:[v.jsxs(zt,{size:"sm",onClick:()=>t(e.toolId,!0,!0),className:"rounded-full bg-primary text-background pr-4 md:order-last",children:[v.jsx(QT,{className:"h-4 w-4 mr-1.5"}),"Approve & Clear"]}),v.jsxs("div",{className:"flex items-stretch md:items-center gap-2 md:contents",children:[v.jsxs(zt,{size:"sm",variant:"outline",onClick:()=>g(!0),className:"rounded-full border-border flex-1 md:flex-initial md:order-first",children:[v.jsx(w1,{className:"h-4 w-4 mr-1.5"}),"Suggest Edits"]}),v.jsxs(zt,{size:"sm",variant:"outline",onClick:()=>t(e.toolId,!0),className:"rounded-full border-border flex-1 md:flex-initial",children:[v.jsx(xl,{className:"h-4 w-4 mr-1.5"}),"Approve"]})]})]}),m&&v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx("textarea",{ref:b,value:p,onChange:_=>x(_.target.value),onKeyDown:_=>{_.key==="Enter"&&!_.shiftKey&&p.trim()&&(_.preventDefault(),t(e.toolId,!1,void 0,p.trim())),_.key==="Escape"&&(g(!1),x(""))},placeholder:"Describe what you'd like to change...",rows:3,className:"w-full rounded-2xl border border-border bg-muted dark:bg-card px-4 py-3 text-sm text-foreground placeholder:text-muted-foreground resize-none outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"}),v.jsxs("div",{className:"flex items-center justify-end gap-2 mx-2",children:[v.jsx(zt,{size:"sm",variant:"ghost",onClick:()=>{g(!1),x("")},className:"rounded-full text-muted-foreground",children:"Cancel"}),v.jsxs(zt,{size:"sm",disabled:!p.trim(),onClick:()=>t(e.toolId,!1,void 0,p.trim()),className:"rounded-full bg-primary text-background disabled:opacity-50 disabled:pointer-events-none",children:[v.jsx(n_,{className:"h-4 w-4 mr-1.5"}),"Adjust Plan"]})]})]})]}):v.jsx("div",{className:"flex justify-end mx-2",children:v.jsx("span",{className:"inline text-sm text-muted-foreground italic",children:"Plan pending (newer prompt active)"})})]})}const g9={completed:{Icon:xl,iconClass:"text-success",textClass:"text-muted-foreground"},in_progress:{Icon:Ac,iconClass:"text-foreground animate-spin",textClass:"text-foreground font-medium"},pending:{Icon:u2,iconClass:"text-muted-foreground",textClass:"text-muted-foreground"}};function y9({message:e}){const t=e.input.todos;return t.length?v.jsx("div",{className:"w-full",children:v.jsxs("div",{className:"rounded-2xl border border-border overflow-hidden",children:[v.jsxs("h3",{className:"font-medium text-foreground text-sm p-3 px-4 bg-card border-b border-border flex items-center gap-2",children:[v.jsx(V2,{className:"h-4 w-4 text-muted-foreground"}),"Progress"]}),v.jsx("div",{children:t.map((r,l)=>{const o=l===t.length-1,{Icon:s,iconClass:u,textClass:f}=g9[r.status];return v.jsxs("div",{className:we("flex items-center gap-3 px-4 py-2.5 bg-background",!o&&"border-b border-border"),children:[v.jsx(s,{className:we("h-4 w-4 flex-shrink-0",u)}),v.jsx("span",{className:we("text-sm",f),children:r.status==="in_progress"?r.activeForm:r.content})]},l)})})]})}):null}function u1(e){return(e&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)?e.content:Array.isArray(e)?e:[]).flatMap(r=>!r||typeof r!="object"||!("type"in r)||r.type!=="image"?[]:"data"in r&&typeof r.data=="string"?[{type:"image",data:r.data,mimeType:typeof r.mimeType=="string"?r.mimeType:void 0}]:"source"in r&&r.source&&typeof r.source=="object"&&"type"in r.source&&r.source.type==="base64"&&"data"in r.source&&typeof r.source.data=="string"?[{type:"image",data:r.source.data,mimeType:typeof r.source.media_type=="string"?r.source.media_type:void 0}]:[])}function v9({images:e}){return v.jsx("div",{className:"flex flex-col gap-3",children:e.map((t,r)=>{const l=t.mimeType||"image/png";return v.jsx("div",{className:"overflow-hidden rounded-lg border border-border bg-muted/20",children:v.jsx("img",{src:`data:${l};base64,${t.data}`,alt:`Read result ${r+1}`,className:"max-h-[50vh] w-full object-contain bg-background"})},`${l}:${r}`)})})}function pE({message:e,isLoading:t=!1,localPath:r}){var E;const l=e.result!==void 0,o=!l&&t,s=S.useMemo(()=>{if(e.toolKind==="skill")return e.input.skill;if(e.toolKind==="glob")return`Search files ${e.input.pattern==="**/*"?"in all directories":`matching ${e.input.pattern}`}`;if(e.toolKind==="grep"){const A=e.input.pattern,_=e.input.outputMode;return _==="count"?`Count \`${A}\` occurrences`:_==="content"?`Find \`${A}\` in text`:`Find \`${A}\` in files`}return e.toolKind==="bash"?e.input.description||(e.input.command?r9(e.input.command):"Bash"):e.toolKind==="web_search"?e.input.query||"Web Search":e.toolKind==="read_file"?`Read ${Pu(e.input.filePath,r)}`:e.toolKind==="write_file"?`Write ${Pu(e.input.filePath,r)}`:e.toolKind==="edit_file"?`Edit ${Pu(e.input.filePath,r)}`:e.toolKind==="delete_file"?`Delete ${Pu(e.input.filePath,r)}`:e.toolKind==="mcp_generic"?`${Bp(e.input.tool)} from ${Bp(e.input.server)}`:e.toolKind==="subagent_task"&&e.input.subagentType||e.toolName},[e.input,e.toolName,r]),u=S.useMemo(()=>e.toolKind==="subagent_task",[e.toolKind]),f=S.useMemo(()=>{if(e.toolKind==="skill")return e.input.skill},[e.input,e.toolKind]),d=e.toolKind==="bash",m=e.toolKind==="write_file",g=e.toolKind==="edit_file",p=e.toolKind==="delete_file",x=e.toolKind==="read_file",b=S.useMemo(()=>{if(typeof e.result=="string")return e.result;if(!e.result)return"";if(typeof e.result=="object"&&e.result!==null&&"content"in e.result){const A=e.result.content;if(typeof A=="string")return A}return JSON.stringify(e.result,null,2)},[e.result]),w=S.useMemo(()=>{if(!x)return[];if(e.result&&typeof e.result=="object"&&"blocks"in e.result){const A=e.result.blocks;if(Array.isArray(A)){const _=u1(A);if(_.length>0)return _}}return u1(e.rawResult)},[x,e.rawResult,e.result]),C=S.useMemo(()=>{switch(e.toolKind){case"bash":return e.input.command;case"write_file":case"delete_file":return e.input.content;default:return JSON.stringify(e.input,null,2)}},[e]);return v.jsx(li,{className:"w-full",children:v.jsxs(zc,{expandedContent:v.jsx(Ic,{className:"my-4 text-sm",children:v.jsxs("div",{className:"flex flex-col gap-2",children:[g?v.jsx(Ya,{content:"",isDiff:!0,oldString:e.input.oldString,newString:e.input.newString}):p?v.jsx(Ya,{content:e.input.content}):!x&&!m&&v.jsx(Ux,{label:d?v.jsxs("span",{className:"flex items-center gap-2 w-full",children:[v.jsx("span",{children:"Command"}),!!e.input.timeoutMs&&v.jsxs("span",{className:"text-muted-foreground",children:["timeout: ",String(e.input.timeoutMs),"ms"]}),!!e.input.runInBackground&&v.jsx("span",{className:"text-muted-foreground",children:"background"})]}):m?"Contents":"Input",copyText:C,children:C}),l&&x&&!e.isError&&(w.length>0?v.jsxs("div",{children:[v.jsx("span",{className:"font-medium text-muted-foreground",children:"Image"}),v.jsx("div",{className:"mt-1",children:v.jsx(v9,{images:w})})]}):v.jsx(Ya,{content:b})),m&&!e.isError&&v.jsx(Ya,{content:e.input.content}),l&&!x&&!(m&&!e.isError)&&!(g&&!e.isError)&&!(p&&!e.isError)&&v.jsx(Ux,{label:e.isError?"Error":"Result",copyText:b,children:b})]})}),children:[v.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:(()=>{if(e.isError)return v.jsx(Lo,{className:"size-4 text-destructive"});if(u)return v.jsx(Vp,{className:"size-4 text-muted-icon"});const A=hS(e.toolName);return v.jsx(A,{className:"size-4 text-muted-icon"})})()}),v.jsx(Hi,{className:"text-left transition-opacity duration-200 truncate",children:v.jsx(us,{animate:o,shimmerWidth:Math.max(20,(((E=f||s)==null?void 0:E.length)??33)*3),children:f||s})})]})})}function x9({message:e}){const t=r=>{if(r<1e3)return`${r}ms`;const l=Math.floor(r/1e3),o=Math.floor(l/3600),s=Math.floor(l%3600/60),u=l%60;return o>0?`${o}h${s>0?` ${s}m`:""}`:s>0?`${s}m${u>0?` ${u}s`:""}`:`${u}s`};return e.success?v.jsxs(li,{className:`px-0.5 text-xs tracking-wide ${e.durationMs>6e4?"":"hidden"}`,children:[v.jsx("div",{className:"w-full h-[1px] bg-border"}),v.jsxs(Hi,{className:"whitespace-nowrap text-[11px] tracking-widest text-muted-foreground/60 uppercase flex-shrink-0",children:["Worked for ",t(e.durationMs)]}),v.jsx("div",{className:"w-full h-[1px] bg-border"})]}):v.jsx("div",{className:"px-4 py-3 mx-2 my-1 rounded-lg bg-destructive/10 border border-destructive/20 text-destructive text-sm",children:e.result||"An unknown error occurred."})}function b9({message:e}){return v.jsx("div",{className:"flex items-center justify-end gap-2 text-sm text-muted-foreground",children:v.jsxs("div",{className:"inline-flex gap-1.5 items-center justify-center whitespace-nowrap text-sm font-medium bg-background text-foreground/60 border border-border h-9 pl-1 pr-4 rounded-full",children:[v.jsx(a2,{className:"h-4 w-4 ml-1.5"}),v.jsx("em",{children:"Interrupted"})]})})}function Cc({size:e=4}){return v.jsxs("svg",{className:"flex-1",viewBox:`0 0 100 ${e}`,preserveAspectRatio:"none",style:{height:`${e}px`},children:[v.jsx("pattern",{id:"zigzag",width:e,height:e,patternUnits:"userSpaceOnUse",children:v.jsx("path",{d:`M0 ${e} L${e/2} 0 L${e} ${e}`,fill:"none",stroke:"currentColor",strokeWidth:"0.5",className:"text-muted-foreground/30",style:{stroke:"currentColor"}})}),v.jsx("rect",{width:"100%",height:e,fill:"url(#zigzag)",className:"text-muted-foreground/30"})]})}function S9(){return v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(Cc,{}),v.jsx("span",{className:"text-[11px] tracking-widest text-muted-foreground uppercase flex-shrink-0",children:"Compacted"}),v.jsx(Cc,{})]})}function w9(){return v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(Cc,{}),v.jsx("span",{className:"text-[11px] tracking-widest text-muted-foreground uppercase flex-shrink-0",children:"Context Cleared"}),v.jsx(Cc,{})]})}function C9({message:e}){return v.jsx(li,{children:v.jsxs(zc,{expandedContent:v.jsx(Ic,{className:"my-4 text-xs",children:v.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:v.jsx(Fo,{remarkPlugins:[Ho],components:Po(),children:e.summary})})}),children:[v.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:v.jsx(S1,{className:"h-4.5 w-4.5 text-muted-foreground"})}),v.jsx(Hi,{children:"Summarized"})]})})}const k9={compacting:"Compacting..."};function E9({message:e}){const t=k9[e.status]||e.status;return v.jsxs(li,{className:"grid grid-cols-[auto_1fr] items-center gap-1.5 text-sm animate-pulse",children:[v.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:v.jsx(S1,{className:"h-4.5 w-4.5 text-muted-foreground"})}),v.jsx(Hi,{className:"text-left transition-opacity duration-200 truncate",children:t})]})}const A9={read_file:{key:"read",singular:"read",plural:"reads"},edit_file:{key:"edit",singular:"edit",plural:"edits"},write_file:{key:"write",singular:"write",plural:"writes"},delete_file:{key:"delete",singular:"delete",plural:"deletes"},bash:{key:"bash",singular:"command",plural:"commands"},grep:{key:"grep",singular:"search",plural:"searches"},glob:{key:"glob",singular:"glob",plural:"globs"},subagent_task:{key:"task",singular:"agent",plural:"agents"},web_search:{key:"websearch",singular:"web search",plural:"web searches"},skill:{key:"skill",singular:"skill",plural:"skills"},todo_write:{key:"todo",singular:"todo update",plural:"todo updates"}},T9={key:"other",singular:"tool call",plural:"tool calls"};function _9(e){return A9[e]??T9}function M9(e){const t=new Map,r=[];for(const l of e){const o=l.toolKind,s=_9(o),u=t.get(s.key);u?u.count++:(t.set(s.key,{category:s,count:1}),r.push(s.key))}return r.map(l=>{const{category:o,count:s}=t.get(l);return`${s} ${s===1?o.singular:o.plural}`}).join(", ")}function N9({messages:e,isLoading:t,localPath:r,expanded:l,onExpandedChange:o}){const s=S.useMemo(()=>M9(e),[e]),f=e.some(d=>d.result===void 0)&&t;return v.jsx(li,{className:"w-full",children:v.jsxs("div",{className:"flex flex-col w-full",children:[v.jsx("button",{onClick:()=>o(!l),className:`group cursor-pointer grid grid-cols-[auto_1fr] items-center gap-1 text-sm ${!l&&!f?"hover:opacity-60 transition-opacity":""}`,children:v.jsxs("div",{className:"grid grid-cols-[auto_1fr] items-center gap-1.5",children:[v.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:v.jsx(bl,{className:`h-4.5 w-4.5 text-muted-icon transition-all duration-200 ${l?"rotate-90":""}`})}),v.jsx(Hi,{className:"text-left",children:v.jsx(us,{animate:f,children:s})})]})}),l&&v.jsxs("div",{className:"my-4 flex flex-col gap-3",children:[e.map(d=>v.jsx(pE,{message:d,isLoading:t,localPath:r},d.id)),e.length>5&&v.jsx("button",{onClick:()=>o(!1),className:"cursor-pointer grid grid-cols-[auto_1fr] items-center gap-1 text-xs hover:opacity-80 transition-opacity",children:v.jsxs("div",{className:"grid grid-cols-[auto_1fr] items-center gap-1.5",children:[v.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:v.jsx(bl,{className:"h-4.5 w-4.5 text-muted-icon -rotate-90"})}),v.jsx(Hi,{className:"text-left",children:"Collapse"})]})})]})]})})}function R9(e){if(e!=="system")return e}function tp(e,t){const r=R9(t),l=new Intl.DateTimeFormat("en-GB",{timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(new Date(e)),o=u=>{var f;return((f=l.find(d=>d.type===u))==null?void 0:f.value)??"00"};let s=o("hour");return s==="24"&&(s="00"),`${o("day")}/${o("month")}/${o("year")} ${s}:${o("minute")}`}const O9=/^(\d{2})\/(\d{2})\/(\d{4}) (\d{2}):(\d{2})$/;function c1(e,t){if(e==="system")return-new Date(t).getTimezoneOffset();const r=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(new Date(t)),l=u=>{var f;return Number(((f=r.find(d=>d.type===u))==null?void 0:f.value)??0)};let o=l("hour");o===24&&(o=0);const s=Date.UTC(l("year"),l("month")-1,l("day"),o,l("minute"),l("second"));return Math.round((s-t)/6e4)}function j9(e,t){const r=O9.exec(e.trim());if(!r)return null;const[,l,o,s,u,f]=r,d=Number(l),m=Number(o),g=Number(s),p=Number(u),x=Number(f);if(m<1||m>12||d<1||d>31||p>23||x>59)return null;const b=Date.UTC(g,m-1,d,p,x),w=c1(t,b),C=b-w*6e4,E=c1(t,C);return C-(E-w)*6e4}const Up=S.forwardRef(({className:e,type:t,...r},l)=>v.jsx("input",{ref:l,type:t,className:we("flex w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground outline-none placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...r}));Up.displayName="Input";function z9({schedule:e,onAccept:t,onReschedule:r,onCancel:l}){const[o,s]=S.useState(()=>tp(e.scheduledAt??e.resetAt,e.tz)),[u,f]=S.useState(!1),d=S.useMemo(()=>j9(o,e.tz),[o,e.tz]),m=d!==null&&d>Date.now(),g=d===null?"Use format dd/mm/yyyy hh:mm":m?null:"Time must be in the future";if(e.state==="fired"){const x=tp(e.scheduledAt??e.resetAt,e.tz);return v.jsxs("div",{className:"rounded border px-3 py-2 text-sm",children:["Auto-continued at ",x]})}if(e.state==="cancelled")return v.jsx("div",{className:"rounded border px-3 py-2 text-sm opacity-70",children:"Auto-continue cancelled"});if(e.state==="proposed"){const x=e.resetAt<=Date.now();return v.jsxs("div",{className:"rounded border px-3 py-2 text-sm space-y-2",children:[v.jsx("div",{className:"font-medium",children:"Rate limit hit — schedule auto-continue?"}),x&&v.jsx("div",{className:"text-amber-500",children:"Reset time has passed — accept to continue now."}),v.jsx(Up,{value:o,onChange:b=>s(b.target.value),placeholder:"dd/mm/yyyy hh:mm"}),g&&v.jsx("div",{className:"text-xs text-red-500",children:g}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(zt,{type:"button",disabled:!m,onClick:()=>d!==null&&t(d),children:"Schedule"}),v.jsx(zt,{type:"button",variant:"ghost",onClick:l,children:"Dismiss"})]})]})}const p=tp(e.scheduledAt??e.resetAt,e.tz);if(!u){const x=e.tz==="system"?"local":e.tz;return v.jsxs("div",{className:"rounded border px-3 py-2 text-sm flex items-center justify-between gap-2",children:[v.jsxs("div",{children:["Auto-continue at ",p," (",x,")"]}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(zt,{type:"button",variant:"secondary",onClick:()=>f(!0),children:"Change time"}),v.jsx(zt,{type:"button",variant:"ghost",onClick:l,children:"Cancel"})]})]})}return v.jsxs("div",{className:"rounded border px-3 py-2 text-sm space-y-2",children:[v.jsx(Up,{value:o,onChange:x=>s(x.target.value),placeholder:"dd/mm/yyyy hh:mm"}),g&&v.jsx("div",{className:"text-xs text-red-500",children:g}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(zt,{type:"button",disabled:!m,onClick:()=>{d!==null&&(r(d),f(!1))},children:"Save"}),v.jsx(zt,{type:"button",variant:"ghost",onClick:()=>f(!1),children:"Back"})]})]})}const I9=new Set(["AskUserQuestion","ExitPlanMode","TodoWrite"]);function f1(e){if(e.kind!=="tool")return!1;const t=e.toolName;return!I9.has(t)}function D9(e,{isFirstSystem:t,isFirstAccount:r,isLatestTodoWrite:l,hideResult:o,isFinalStatus:s}){let u=!e.hidden;if(u)switch(e.kind){case"system_init":u=t;break;case"account_info":u=r;break;case"tool":u=e.toolKind!=="todo_write"||l;break;case"result":u=!o&&(!e.success||e.durationMs>6e4);break;case"context_window_updated":u=!1;break;case"status":u=s;break;default:u=!0;break}return{isFirstSystem:t,isFirstAccount:r,isLatestTodoWrite:l,hideResult:o,isFinalStatus:s,shouldRender:u}}function L9(e,t){const r=e.findIndex(o=>o.kind==="system_init"),l=e.findIndex(o=>o.kind==="account_info");return e.map((o,s)=>{const u=e[s-1],f=e[s+1];return D9(o,{isFirstSystem:r===s,isFirstAccount:l===s,isLatestTodoWrite:o.id===t.TodoWrite,hideResult:(f==null?void 0:f.kind)==="context_cleared"||(u==null?void 0:u.kind)==="context_cleared",isFinalStatus:s===e.length-1})})}function P9(e,t){const r=[];let l=0;for(;l<e.length;){const o=e[l],s=t[l];if(s!=null&&s.shouldRender&&f1(o)){const u=[o],f=l;for(l+=1;l<e.length;){const d=e[l],m=t[l];if(!(m!=null&&m.shouldRender)){l+=1;continue}if(!f1(d))break;u.push(d),l+=1}u.length>=2?r.push({type:"tool-group",messages:u,startIndex:f}):r.push({type:"single",message:o,index:f});continue}r.push({type:"single",message:o,index:l}),l+=1}return r}function d1(e){var r;return e.type==="single"?e.message.id:`tool-group:${((r=e.messages[0])==null?void 0:r.id)??e.startIndex}`}function np(e,t){return e===t?!0:!e||!t||e.length!==t.length?!1:e.every((r,l)=>r===t[l])}function B9(e,t){return e.id===t.id&&e.kind===t.kind&&e.displayName===t.displayName&&e.absolutePath===t.absolutePath&&e.relativePath===t.relativePath&&e.contentUrl===t.contentUrl&&e.mimeType===t.mimeType&&e.size===t.size}function U9(e,t){return e===t?!0:!e||!t||e.length!==t.length?!1:e.every((r,l)=>B9(r,t[l]))}function Do(e,t){var r,l;if(e===t)return!0;if(e.kind!==t.kind||e.id!==t.id||e.hidden!==t.hidden)return!1;switch(e.kind){case"user_prompt":return e.content===(t.kind==="user_prompt"?t.content:null)&&t.kind==="user_prompt"&&e.steered===t.steered&&((r=e.autoContinue)==null?void 0:r.scheduleId)===((l=t.autoContinue)==null?void 0:l.scheduleId)&&U9(e.attachments,t.attachments);case"system_init":return t.kind==="system_init"&&e.provider===t.provider&&e.model===t.model&&np(e.tools,t.tools)&&np(e.agents,t.agents)&&np(e.slashCommands,t.slashCommands)&&e.debugRaw===t.debugRaw;case"account_info":return t.kind==="account_info"&&JSON.stringify(e.accountInfo)===JSON.stringify(t.accountInfo);case"assistant_text":return t.kind==="assistant_text"&&e.text===t.text;case"tool":return t.kind==="tool"&&e.toolKind===t.toolKind&&e.toolName===t.toolName&&e.toolId===t.toolId&&e.isError===t.isError&&JSON.stringify(e.input)===JSON.stringify(t.input)&&JSON.stringify(e.result)===JSON.stringify(t.result)&&JSON.stringify(e.rawResult)===JSON.stringify(t.rawResult);case"result":return t.kind==="result"&&e.success===t.success&&e.cancelled===t.cancelled&&e.result===t.result&&e.durationMs===t.durationMs&&e.costUsd===t.costUsd;case"status":return t.kind==="status"&&e.status===t.status;case"compact_summary":return t.kind==="compact_summary"&&e.summary===t.summary;case"context_window_updated":return t.kind==="context_window_updated"&&JSON.stringify(e.usage)===JSON.stringify(t.usage);case"compact_boundary":case"context_cleared":case"interrupted":return!0;case"unknown":return t.kind==="unknown"&&e.json===t.json;case"auto_continue_prompt":return t.kind==="auto_continue_prompt"&&e.scheduleId===t.scheduleId}}function F9(e,t){return e.kind!==t.kind||e.id!==t.id?!1:e.kind==="single"&&t.kind==="single"?e.index===t.index&&e.isLoading===t.isLoading&&e.localPath===t.localPath&&e.isFirstSystem===t.isFirstSystem&&e.isFirstAccount===t.isFirstAccount&&e.isLatestAskUserQuestion===t.isLatestAskUserQuestion&&e.isLatestExitPlanMode===t.isLatestExitPlanMode&&e.isLatestTodoWrite===t.isLatestTodoWrite&&e.hideResult===t.hideResult&&e.isFinalStatus===t.isFinalStatus&&Do(e.message,t.message):e.kind==="tool-group"&&t.kind==="tool-group"?e.startIndex===t.startIndex&&e.isLoading===t.isLoading&&e.localPath===t.localPath&&e.messages.length===t.messages.length&&e.messages.every((r,l)=>Do(r,t.messages[l])):!1}function H9(e,t){const r=new Map;let l=e.length!==t.byId.size;const o=e.map((s,u)=>{const f=t.byId.get(s.id),d=f&&F9(f,s)?f:s;return r.set(s.id,d),!l&&t.result[u]!==d&&(l=!0),d});return l?{byId:r,result:o}:t}function V9(e){const t=S.useRef({byId:new Map,result:[]});return S.useMemo(()=>{const r=H9(e,t.current);return t.current=r,r.result},[e])}const q9=S.memo(function({message:t,index:r,isLoading:l,localPath:o,isFirstSystem:s,isFirstAccount:u,isLatestAskUserQuestion:f,isLatestExitPlanMode:d,isLatestTodoWrite:m,hideResult:g,isFinalStatus:p,onAskUserQuestionSubmit:x,onExitPlanModeConfirm:b,schedules:w,onAutoContinueAccept:C,onAutoContinueReschedule:E,onAutoContinueCancel:A}){let _=null;if(t.kind==="user_prompt")_=v.jsx(e9,{content:t.content,attachments:t.attachments,steered:t.steered,autoContinue:t.autoContinue},t.id);else switch(t.kind){case"auto_continue_prompt":{const M=w[t.scheduleId];if(!M){_=v.jsx("div",{className:"rounded border px-3 py-2 text-sm opacity-70",children:"Auto-continue expired"},t.id);break}_=v.jsx(z9,{schedule:M,onAccept:z=>C(t.scheduleId,z),onReschedule:z=>E(t.scheduleId,z),onCancel:()=>A(t.scheduleId)},t.id);break}case"unknown":_=v.jsx(t9,{json:t.json},t.id);break;case"system_init":_=s?v.jsx(s9,{message:t,rawJson:t.debugRaw},t.id):null;break;case"account_info":_=u?v.jsx(u9,{message:t},t.id):null;break;case"assistant_text":_=v.jsx(c9,{message:t},t.id);break;case"tool":if(t.toolKind==="ask_user_question"){_=v.jsx(p9,{message:t,onSubmit:x,isLatest:f},t.id);break}if(t.toolKind==="exit_plan_mode"){_=v.jsx(h9,{message:t,onConfirm:b,isLatest:d},t.id);break}if(t.toolKind==="todo_write"){_=m?v.jsx(y9,{message:t},t.id):null;break}_=v.jsx(pE,{message:t,isLoading:l,localPath:o},t.id);break;case"result":_=g?null:v.jsx(x9,{message:t},t.id);break;case"context_window_updated":_=null;break;case"interrupted":_=v.jsx(b9,{message:t},t.id);break;case"compact_boundary":_=v.jsx(S9,{},t.id);break;case"context_cleared":_=v.jsx(w9,{},t.id);break;case"compact_summary":_=v.jsx(C9,{message:t},t.id);break;case"status":_=p?v.jsx(E9,{message:t},t.id):null;break}return _?v.jsx("div",{id:`msg-${t.id}`,className:"group relative","data-index":r,[sE]:"",children:_}):null},(e,t)=>e.index===t.index&&e.isLoading===t.isLoading&&e.localPath===t.localPath&&e.isFirstSystem===t.isFirstSystem&&e.isFirstAccount===t.isFirstAccount&&e.isLatestAskUserQuestion===t.isLatestAskUserQuestion&&e.isLatestExitPlanMode===t.isLatestExitPlanMode&&e.isLatestTodoWrite===t.isLatestTodoWrite&&e.hideResult===t.hideResult&&e.isFinalStatus===t.isFinalStatus&&e.onAskUserQuestionSubmit===t.onAskUserQuestionSubmit&&e.onExitPlanModeConfirm===t.onExitPlanModeConfirm&&e.schedules===t.schedules&&e.onAutoContinueAccept===t.onAutoContinueAccept&&e.onAutoContinueReschedule===t.onAutoContinueReschedule&&e.onAutoContinueCancel===t.onAutoContinueCancel&&Do(e.message,t.message)),G9=S.memo(function({id:t,startIndex:r,messages:l,isLoading:o,localPath:s,expanded:u,onExpandedChange:f}){return v.jsx("div",{className:"group relative",[sE]:"",children:v.jsx(N9,{messages:l,isLoading:o,localPath:s,expanded:u,onExpandedChange:d=>f(t,d)})})},(e,t)=>e.id===t.id&&e.startIndex===t.startIndex&&e.isLoading===t.isLoading&&e.localPath===t.localPath&&e.expanded===t.expanded&&e.onExpandedChange===t.onExpandedChange&&e.messages.length===t.messages.length&&e.messages.every((r,l)=>Do(r,t.messages[l])));function hE(e,{isLoading:t,localPath:r,latestToolIds:l}){const o=L9(e,l),s=P9(e,o),u=[];for(const f of s){if(f.type==="tool-group"){u.push({kind:"tool-group",id:d1(f),startIndex:f.startIndex,messages:f.messages,isLoading:t&&f.messages.some(g=>g.kind==="tool"&&g.result===void 0),localPath:r});continue}const d=o[f.index];if(!d)continue;const m={kind:"single",id:d1(f),message:f.message,index:f.index,isLoading:f.message.kind==="tool"&&f.message.result===void 0&&t,localPath:r,isFirstSystem:d.isFirstSystem,isFirstAccount:d.isFirstAccount,isLatestAskUserQuestion:f.message.id===l.AskUserQuestion,isLatestExitPlanMode:f.message.id===l.ExitPlanMode,isLatestTodoWrite:d.isLatestTodoWrite,hideResult:d.hideResult,isFinalStatus:d.isFinalStatus};d.shouldRender&&u.push(m)}return u}const gE=S.memo(function({row:t,toolGroupExpanded:r,onToolGroupExpandedChange:l,onAskUserQuestionSubmit:o,onExitPlanModeConfirm:s,schedules:u,onAutoContinueAccept:f,onAutoContinueReschedule:d,onAutoContinueCancel:m}){return t.kind==="tool-group"?v.jsx(G9,{id:t.id,startIndex:t.startIndex,messages:t.messages,isLoading:t.isLoading,localPath:t.localPath,expanded:r??!1,onExpandedChange:l}):v.jsx(q9,{message:t.message,index:t.index,isLoading:t.isLoading,localPath:t.localPath,isFirstSystem:t.isFirstSystem,isFirstAccount:t.isFirstAccount,isLatestAskUserQuestion:t.isLatestAskUserQuestion,isLatestExitPlanMode:t.isLatestExitPlanMode,isLatestTodoWrite:t.isLatestTodoWrite,hideResult:t.hideResult,isFinalStatus:t.isFinalStatus,onAskUserQuestionSubmit:o,onExitPlanModeConfirm:s,schedules:u,onAutoContinueAccept:f,onAutoContinueReschedule:d,onAutoContinueCancel:m})},(e,t)=>{if(e.toolGroupExpanded!==t.toolGroupExpanded||e.onToolGroupExpandedChange!==t.onToolGroupExpandedChange||e.onAskUserQuestionSubmit!==t.onAskUserQuestionSubmit||e.onExitPlanModeConfirm!==t.onExitPlanModeConfirm||e.schedules!==t.schedules||e.onAutoContinueAccept!==t.onAutoContinueAccept||e.onAutoContinueReschedule!==t.onAutoContinueReschedule||e.onAutoContinueCancel!==t.onAutoContinueCancel||e.row.kind!==t.row.kind||e.row.id!==t.row.id)return!1;if(e.row.kind==="tool-group"&&t.row.kind==="tool-group"){const r=e.row,l=t.row;return r.startIndex===l.startIndex&&r.isLoading===l.isLoading&&r.localPath===l.localPath&&r.messages.length===l.messages.length&&r.messages.every((o,s)=>Do(o,l.messages[s]))}return e.row.kind==="single"&&t.row.kind==="single"?e.row.index===t.row.index&&e.row.isLoading===t.row.isLoading&&e.row.localPath===t.row.localPath&&e.row.isFirstSystem===t.row.isFirstSystem&&e.row.isFirstAccount===t.row.isFirstAccount&&e.row.isLatestAskUserQuestion===t.row.isLatestAskUserQuestion&&e.row.isLatestExitPlanMode===t.row.isLatestExitPlanMode&&e.row.isLatestTodoWrite===t.row.isLatestTodoWrite&&e.row.hideResult===t.row.hideResult&&e.row.isFinalStatus===t.row.isFinalStatus&&Do(e.row.message,t.row.message):!1}),Y9={},K9=(e,t)=>{},$9=(e,t)=>{},X9=e=>{};function Q9({messages:e,isLoading:t,localPath:r,latestToolIds:l,onOpenLocalLink:o,onAskUserQuestionSubmit:s,onExitPlanModeConfirm:u,schedules:f=Y9,onAutoContinueAccept:d=K9,onAutoContinueReschedule:m=$9,onAutoContinueCancel:g=X9,onTunnelAccept:p,onTunnelStop:x,onTunnelRetry:b}){const[w,C]=S.useState({}),E=S.useMemo(()=>hE(e,{isLoading:t,localPath:r,latestToolIds:l}),[t,l,r,e]),A=S.useCallback((_,M)=>{C(z=>z[_]===M?z:{...z,[_]:M})},[]);return v.jsx(mS,{onOpenLocalLink:o,children:E.map(_=>v.jsx("div",{className:"mx-auto max-w-[800px] pb-5",children:v.jsx(gE,{row:_,toolGroupExpanded:_.kind==="tool-group"?w[_.id]??!1:void 0,onToolGroupExpandedChange:A,onAskUserQuestionSubmit:s,onExitPlanModeConfirm:u,schedules:f,onAutoContinueAccept:d,onAutoContinueReschedule:m,onAutoContinueCancel:g})},_.id))})}S.memo(Q9);const Z9={neutral:"border-border bg-card",muted:"border-border/50 bg-card/50 opacity-75",success:"border-emerald-500/30 bg-emerald-500/5",error:"border-destructive/40 bg-destructive/5"},W9={primary:"default",secondary:"secondary",ghost:"ghost",destructive:"destructive"};function Qu({title:e,description:t,body:r,errorMessage:l,tone:o="neutral",actions:s=[]}){const[u,f]=S.useState(null),d=S.useCallback(async g=>{if(u)return;let p;try{p=g.onClick()}catch(x){console.error("[transcript-action-card] sync click threw",x);return}if(p instanceof Promise){f(g.id);try{await p}catch(x){console.error("[transcript-action-card] async click rejected",x)}finally{f(null)}}},[u]),m=u!==null;return v.jsxs("div",{"data-focus-fallback-ignore":!0,className:we("rounded-lg border px-4 py-3 text-sm space-y-2 transition-colors",Z9[o]),children:[v.jsx("div",{className:"flex items-start justify-between gap-3",children:v.jsxs("div",{className:"space-y-1 min-w-0 flex-1",children:[v.jsx("div",{className:"font-medium leading-tight",children:e}),t?v.jsx("div",{className:"text-muted-foreground text-xs leading-snug",children:t}):null]})}),r?v.jsx("div",{className:"text-xs leading-snug",children:r}):null,l?v.jsx("div",{className:"text-destructive text-xs leading-snug",children:l}):null,s.length>0?v.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:s.map(g=>{const p=u===g.id;return v.jsxs(zt,{type:"button",size:"sm",variant:W9[g.variant??"ghost"],disabled:g.disabled||m&&!p,onClick:()=>{d(g)},className:"gap-1.5",children:[p?v.jsx(Ac,{className:"size-3.5 animate-spin"}):null,g.label]},g.id)})}):null]})}const J9=3e4;function eU({record:e,onAccept:t,onStop:r,onRetry:l,onDismiss:o}){const s=S.useRef(null),u=S.useRef(e.state);S.useEffect(()=>{e.state!==u.current&&s.current&&(s.current(),s.current=null),u.current=e.state},[e.state]);const f=()=>new Promise(m=>{s.current=m,setTimeout(()=>{s.current===m&&(s.current=null,m())},J9)});if(e.state==="proposed"){const m=[{id:"expose",label:"Expose",variant:"primary",onClick:async()=>{await t(e.tunnelId),await f()}},{id:"dismiss",label:"Dismiss",variant:"ghost",onClick:()=>o(e.tunnelId)}];return v.jsx(Qu,{title:`Port ${e.port} detected`,description:"Expose via Cloudflare quick tunnel?",actions:m})}if(e.state==="active"){const m=e.url??"",g=[{id:"copy",label:"Copy URL",variant:"secondary",onClick:async()=>{m&&await navigator.clipboard.writeText(m)}},{id:"stop",label:"Stop tunnel",variant:"ghost",onClick:async()=>{await r(e.tunnelId),await f()}}];return v.jsx(Qu,{title:`Tunnel live on port ${e.port}`,tone:"success",body:v.jsx("a",{href:m,target:"_blank",rel:"noreferrer",className:"font-mono break-all underline-offset-4 hover:underline",children:m}),actions:g})}if(e.state==="stopped")return v.jsx(Qu,{title:`Tunnel stopped (port ${e.port})`,tone:"muted"});const d=[{id:"retry",label:"Retry",variant:"primary",onClick:async()=>{await l(e.tunnelId),await f()}},{id:"dismiss",label:"Dismiss",variant:"ghost",onClick:()=>o(e.tunnelId)}];return v.jsx(Qu,{title:`Tunnel failed on port ${e.port}`,tone:"error",errorMessage:e.error??void 0,actions:d})}const m1="What are we building?",tU=72,nU=S.memo(function({activeChatId:t,listRef:r,messages:l,queuedMessages:o,transcriptPaddingBottom:s,localPath:u,latestToolIds:f,isHistoryLoading:d,hasOlderHistory:m,isProcessing:g,runtimeStatus:p,isDraining:x,commandError:b,loadOlderHistory:w,onStopDraining:C,onSteerQueuedMessage:E,onRemoveQueuedMessage:A,onOpenLocalLink:_,onAskUserQuestionSubmit:M,onExitPlanModeConfirm:z,schedules:P,onAutoContinueAccept:j,onAutoContinueReschedule:U,onAutoContinueCancel:B,tunnels:Z,liveTunnelId:D,onTunnelAccept:X,onTunnelStop:W,onTunnelRetry:oe,showScrollButton:ne,onIsAtEndChange:J,scrollToBottom:I,typedEmptyStateText:Y,isEmptyStateTypingComplete:G,isPageFileDragActive:V,showEmptyState:T,editorPreset:O="cursor",editorCommandTemplate:H,platform:R="darwin",headerOffsetPx:ue=tU}){const fe=S.useRef(0),se=S.useRef(null),[re,he]=S.useState({}),[ce,ge]=S.useState(null),Ce=R==="darwin",ke=S.useMemo(()=>hE(l,{isLoading:g,localPath:u??void 0,latestToolIds:f}),[g,f,u,l]),We=V9(ke);S.useEffect(()=>{he({})},[t]),S.useEffect(()=>{const je=fe.current;if(fe.current=We.length,je>0||We.length===0)return;J(!0);const at=window.requestAnimationFrame(()=>{var De,gt;(gt=(De=r.current)==null?void 0:De.scrollToEnd)==null||gt.call(De,{animated:!1})});return()=>window.cancelAnimationFrame(at)},[r,J,We.length]);const $e=S.useCallback((je,at)=>{he(De=>De[je]===at?De:{...De,[je]:at})},[]),bt=S.useCallback(je=>{var gt,te,de,Ee;const at=typeof je=="object"&&je!==null&&"currentTarget"in je&&je.currentTarget instanceof HTMLElement?je.currentTarget:(te=(gt=r.current)==null?void 0:gt.getScrollableNode)==null?void 0:te.call(gt);if(at instanceof HTMLElement){const ze=at.scrollHeight-at.clientHeight-at.scrollTop;J(ze<=4);return}const De=(Ee=(de=r.current)==null?void 0:de.getState)==null?void 0:Ee.call(de);De&&J(De.isAtEnd)},[r,J]);S.useEffect(()=>{let je;const at=window.requestAnimationFrame(()=>{var te,de;const De=(de=(te=r.current)==null?void 0:te.getScrollableNode)==null?void 0:de.call(te);if(!(De instanceof HTMLElement))return;const gt=()=>{bt({currentTarget:De})};De.addEventListener("scroll",gt,{passive:!0}),gt(),je=()=>{De.removeEventListener("scroll",gt)}});return()=>{window.cancelAnimationFrame(at),je==null||je()}},[t,bt,r,We.length]);const Kt=S.useCallback(()=>{d||!m||w()},[m,d,w]),en=S.useCallback(je=>{if(je.trigger!=="contextmenu"){const at=VR(je.path)?"open_editor":"open_default";_(je,at);return}ge(je),window.requestAnimationFrame(()=>{const at=se.current;if(!at)return;const De=je.clientX??window.innerWidth/2,gt=je.clientY??window.innerHeight/2;at.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:De,clientY:gt,view:window}))})},[_]),Nn=S.useCallback(({item:je})=>v.jsx("div",{className:"mx-auto w-full max-w-[800px] pb-5","data-transcript-row-id":je.id,children:v.jsx(gE,{row:je,toolGroupExpanded:je.kind==="tool-group"?re[je.id]??!1:void 0,onToolGroupExpandedChange:$e,onAskUserQuestionSubmit:M,onExitPlanModeConfirm:z,schedules:P,onAutoContinueAccept:j,onAutoContinueReschedule:U,onAutoContinueCancel:B})}),[$e,M,z,P,j,U,B,re]),Qt=v.jsx("div",{className:"mx-auto w-full max-w-[800px]",style:{paddingTop:`${ue}px`},children:d?v.jsx("div",{className:"flex justify-center pb-4",children:v.jsx("span",{className:"text-sm translate-y-[-0.5px]",children:v.jsx(us,{animate:!0,shimmerWidth:Math.max(20,72),children:"Loading more messages..."})})}):null}),Rn=D&&Z?Z[D]:void 0,Nt=v.jsxs("div",{className:"mx-auto w-full max-w-[800px]",children:[Rn&&X&&W&&oe&&v.jsx("div",{className:"pb-5",children:v.jsx(eU,{record:Rn,onAccept:X,onStop:W,onRetry:oe,onDismiss:W})}),g?v.jsx(vL,{status:p??void 0}):null,o.map(je=>v.jsx(gL,{message:je,onRemove:()=>void A(je.id),onSendNow:()=>void E(je.id)},je.id)),!g&&x?v.jsx(KR,{onStop:()=>void C()}):null,b?v.jsx("div",{className:"rounded-xl border border-destructive/20 bg-destructive/5 px-4 py-3 text-sm text-destructive",children:b}):null]});return v.jsxs(v.Fragment,{children:[v.jsx(mS,{onOpenLocalLink:en,children:v.jsx($N,{ref:r,data:We,extraData:{toolGroupExpanded:re,schedules:P,tunnels:Z,liveTunnelId:D},keyExtractor:rU,renderItem:Nn,estimatedItemSize:96,initialScrollAtEnd:!0,maintainScrollAtEnd:!0,maintainScrollAtEndThreshold:.1,maintainVisibleContentPosition:!0,onScroll:bt,onStartReached:Kt,onStartReachedThreshold:.1,className:"h-full flex-1 overflow-x-hidden overscroll-y-contain px-3 scroll-pt-[72px] [scrollbar-gutter:auto]",contentContainerStyle:{paddingBottom:s+10},ListHeaderComponent:Qt,ListFooterComponent:Nt})}),v.jsxs(kP,{onOpenChange:je=>{je||ge(null)},children:[v.jsx(EP,{asChild:!0,children:v.jsx("span",{ref:se,"aria-hidden":"true",className:"pointer-events-none fixed size-px opacity-0",style:{left:(ce==null?void 0:ce.clientX)??0,top:(ce==null?void 0:ce.clientY)??0}})}),ce?v.jsx(e8,{isMac:Ce,editorPreset:O,editorCommandTemplate:H,includeFinder:!0,includePreview:!0,includeDefault:!0,onOpenExternal:(je,at)=>{_(ce,je,at)}}):null]}),T?v.jsx("div",{className:"pointer-events-none absolute inset-x-4 animate-fade-in",style:{top:ue,bottom:s},children:v.jsx("div",{className:"mx-auto flex h-full max-w-[800px] items-center justify-center",children:v.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 text-muted-foreground opacity-70",children:[v.jsx(rp,{strokeWidth:1.5,className:"kanna-empty-state-flower size-8 text-muted-foreground"}),v.jsx("div",{className:"kanna-empty-state-text flex max-w-xs items-center text-center text-base font-normal text-muted-foreground","aria-label":m1,children:v.jsxs("span",{className:"relative inline-grid place-items-start",children:[v.jsxs("span",{className:"invisible col-start-1 row-start-1 flex items-center whitespace-pre",children:[v.jsx("span",{children:m1}),v.jsx("span",{className:"kanna-typewriter-cursor-slot","aria-hidden":"true"})]}),v.jsxs("span",{className:"col-start-1 row-start-1 flex items-center whitespace-pre",children:[v.jsx("span",{children:Y}),v.jsx("span",{className:"kanna-typewriter-cursor-slot","aria-hidden":"true",children:v.jsx("span",{className:"kanna-typewriter-cursor","data-typing-complete":G?"true":"false"})})]})]})})]})})}):null,V?v.jsxs("div",{className:"pointer-events-none absolute inset-0 z-30",children:[v.jsx("div",{className:"absolute inset-0 bg-background/70"}),v.jsx("div",{className:"absolute inset-6 ",children:v.jsx("div",{className:"flex h-full items-center justify-center",children:v.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 text-center",children:[v.jsx(p_,{className:"mx-auto size-14 text-foreground",strokeWidth:1.75}),v.jsx("div",{className:"text-xl font-medium text-foreground",children:"Drop up to 10 files"})]})})})]}):null,v.jsx("div",{style:{bottom:s-20},className:we("absolute left-1/2 z-10 -translate-x-1/2 transition-all",ne?"scale-100 opacity-100 duration-200 ease-[cubic-bezier(0.22,1,0.36,1)]":"pointer-events-none scale-75 opacity-0 duration-200 ease-out"),children:v.jsx("button",{onClick:I,className:"flex aspect-square cursor-pointer items-center gap-1.5 rounded-full border border-border bg-card px-2 text-sm text-foreground transition-colors hover:bg-muted",children:v.jsx(qT,{className:"h-5 w-5"})})})]})});function rU(e){return e.id}const iU=["AskUserQuestion","ExitPlanMode","TodoWrite"],lU=new Set(["TodoWrite"]);function oU(e,t){for(let r=e.length-1;r>=0;r-=1){const l=e[r];if(l.kind!=="tool")continue;const o=l;if(o.toolName===t&&!o.result)return o.id}return null}function aU(e,t){for(let r=e.length-1;r>=0;r-=1){const l=e[r];if(l.kind!=="tool")continue;const o=l;if(o.toolName===t)return o.id}return null}function sU(e){const t={};for(const r of iU)t[r]=lU.has(r)?aU(e,r):oU(e,r);return t}function Zu(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function uU(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}}function cU(e){const t=e&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)?e.content:Array.isArray(e)?e:[],r=[];for(const l of t)if(!(!l||typeof l!="object"||!("type"in l))){if(l.type==="text"&&typeof l.text=="string"){r.push({type:"text",text:l.text});continue}if(l.type==="image"){if("data"in l&&typeof l.data=="string"){r.push({type:"image",data:l.data,mimeType:typeof l.mimeType=="string"?l.mimeType:void 0});continue}"source"in l&&l.source&&typeof l.source=="object"&&"type"in l.source&&l.source.type==="base64"&&"data"in l.source&&typeof l.source.data=="string"&&r.push({type:"image",data:l.source.data,mimeType:typeof l.source.media_type=="string"?l.source.media_type:void 0})}}return r}function fU(e,t){const r=uU(t);switch(e.toolKind){case"ask_user_question":{const s=Zu(r),u=Zu(s==null?void 0:s.answers)??(s||{});return{answers:Object.fromEntries(Object.entries(u).map(([f,d])=>Array.isArray(d)?[f,d.map(m=>String(m))]:d&&typeof d=="object"&&Array.isArray(d.answers)?[f,d.answers.map(m=>String(m))]:d==null||d===""?[f,[]]:[f,[String(d)]])),...(s==null?void 0:s.discarded)===!0?{discarded:!0}:{}}}case"exit_plan_mode":{const s=Zu(r);return{confirmed:typeof(s==null?void 0:s.confirmed)=="boolean"?s.confirmed:void 0,clearContext:typeof(s==null?void 0:s.clearContext)=="boolean"?s.clearContext:void 0,message:typeof(s==null?void 0:s.message)=="string"?s.message:void 0,...(s==null?void 0:s.discarded)===!0?{discarded:!0}:{}}}case"read_file":if(typeof r=="string")return r;const l=cU(r);if(l.length>0)return{content:l.flatMap(s=>s.type==="text"?[s.text]:[]).join(""),blocks:l};const o=Zu(r);return{content:typeof(o==null?void 0:o.content)=="string"?o.content:JSON.stringify(r,null,2)};default:return r}}function yE(e){return new Date(e).toISOString()}function Bn(e){return{id:e._id,messageId:e.messageId,timestamp:yE(e.createdAt),hidden:e.hidden}}function dU(e){return{id:e._id,messageId:e.messageId,hidden:e.hidden,kind:"tool",toolKind:e.tool.toolKind,toolName:e.tool.toolName,toolId:e.tool.toolId,input:e.tool.input,timestamp:yE(e.createdAt)}}function mU(e){if(e.debugRaw)try{return JSON.parse(e.debugRaw).tool_use_result}catch{return}}function pU(e){const t=new Map,r=[];for(const l of e)switch(l.kind){case"user_prompt":r.push({...Bn(l),kind:"user_prompt",content:l.content,attachments:l.attachments??[],steered:l.steered,autoContinue:l.autoContinue});break;case"system_init":r.push({...Bn(l),kind:"system_init",provider:l.provider,model:l.model,tools:l.tools,agents:l.agents,slashCommands:l.slashCommands,mcpServers:l.mcpServers,debugRaw:l.debugRaw});break;case"account_info":r.push({...Bn(l),kind:"account_info",accountInfo:l.accountInfo});break;case"assistant_text":r.push({...Bn(l),kind:"assistant_text",text:l.text});break;case"tool_call":{const o=dU(l);t.set(l.tool.toolId,{hydrated:o,normalized:l.tool}),r.push(o);break}case"tool_result":{const o=t.get(l.toolId);if(o){const s=o.normalized.toolKind==="ask_user_question"||o.normalized.toolKind==="exit_plan_mode"?mU(l)??l.content:l.content;o.hydrated.result=fU(o.normalized,s),o.hydrated.rawResult=s,o.hydrated.isError=l.isError}break}case"result":r.push({...Bn(l),kind:"result",success:!l.isError,cancelled:l.subtype==="cancelled",result:l.result,durationMs:l.durationMs,costUsd:l.costUsd});break;case"status":r.push({...Bn(l),kind:"status",status:l.status});break;case"context_window_updated":r.push({...Bn(l),kind:"context_window_updated",usage:l.usage});break;case"compact_boundary":r.push({...Bn(l),kind:"compact_boundary"});break;case"compact_summary":r.push({...Bn(l),kind:"compact_summary",summary:l.summary});break;case"context_cleared":r.push({...Bn(l),kind:"context_cleared"});break;case"interrupted":r.push({...Bn(l),kind:"interrupted"});break;case"auto_continue_prompt":r.push({...Bn(l),kind:"auto_continue_prompt",scheduleId:l.scheduleId});break;default:r.push({...Bn(l),kind:"unknown",json:JSON.stringify(l,null,2)});break}return r}function hU(e,t){var r,l,o,s,u,f;return{...e,...t,terminal:{...e.terminal,...t.terminal},editor:{...e.editor,...t.editor},providerDefaults:{claude:{...e.providerDefaults.claude,...(r=t.providerDefaults)==null?void 0:r.claude,modelOptions:{...e.providerDefaults.claude.modelOptions,...(o=(l=t.providerDefaults)==null?void 0:l.claude)==null?void 0:o.modelOptions}},codex:{...e.providerDefaults.codex,...(s=t.providerDefaults)==null?void 0:s.codex,modelOptions:{...e.providerDefaults.codex.modelOptions,...(f=(u=t.providerDefaults)==null?void 0:u.codex)==null?void 0:f.modelOptions}}},cloudflareTunnel:{...e.cloudflareTunnel,...t.cloudflareTunnel}}}$C()(e=>({settings:null,hydrationStatus:"idle",setHydrationStatus:t=>e({hydrationStatus:t}),setFromServer:t=>e({settings:t,hydrationStatus:"ready"}),applyOptimisticPatch:t=>e(r=>({settings:r.settings?hU(r.settings,t):r.settings}))}));S.createContext(void 0);function gU(e){return e==="dark"?"black-translucent":"default"}function p1(e,t){if(typeof document>"u")return;let r=document.head.querySelector(`meta[name="${e}"]`);r||(r=document.createElement("meta"),r.setAttribute("name",e),document.head.appendChild(r)),r.setAttribute("content",t)}function yU(e){if(typeof document>"u"||typeof window>"u")return;const t=getComputedStyle(document.body).backgroundColor||getComputedStyle(document.documentElement).backgroundColor;t&&p1("theme-color",t),p1("apple-mobile-web-app-status-bar-style",gU(e)),document.documentElement.style.colorScheme=e}const vU="Kanna";function xU(){const[e,t]=S.useState({status:"loading"}),[r,l]=S.useState(!0),o=S.useRef(null);S.useEffect(()=>{let w=!1;return fetch(new URL("./transcript.json",document.baseURI).toString(),{headers:{Accept:"application/json"}}).then(async C=>{if(!C.ok)throw new Error(`Transcript request failed with status ${C.status}`);return await C.json()}).then(C=>{w||t({status:"ready",bundle:C})}).catch(C=>{w||t({status:"error",message:C instanceof Error?C.message:"Unable to load transcript."})}),()=>{w=!0}},[]),S.useEffect(()=>{if(e.status!=="ready")return;document.title=`${e.bundle.title} | Kanna`,document.documentElement.classList.toggle("dark",e.bundle.theme==="dark"),document.documentElement.style.colorScheme=e.bundle.theme;const w=window.requestAnimationFrame(()=>{yU(e.bundle.theme)});return()=>{window.cancelAnimationFrame(w)}},[e]);const s=S.useMemo(()=>e.status==="ready"?pU(e.bundle.messages):[],[e]),u=S.useMemo(()=>sU(s),[s]),f=S.useCallback(()=>{},[]),d=S.useCallback(()=>Promise.resolve(),[]),m=S.useCallback((w,C,E)=>Promise.resolve(),[]),g=S.useCallback((w,C,E,A)=>Promise.resolve(),[]),p=S.useCallback(()=>Promise.resolve(),[]),x=S.useCallback(()=>{var w,C;(C=(w=o.current)==null?void 0:w.scrollToEnd)==null||C.call(w,{animated:!0})},[]),b=S.useCallback(()=>{window.open("https://kanna.sh","_blank","noopener,noreferrer")},[]);return e.status==="loading"?v.jsx("div",{className:"flex h-full items-center justify-center bg-background text-sm text-muted-foreground",children:"Loading transcript..."}):e.status==="error"?v.jsx("div",{className:"flex h-full items-center justify-center bg-background px-6",children:v.jsx("div",{className:"max-w-md rounded-2xl border border-destructive/20 bg-destructive/10 px-4 py-3 text-sm text-foreground",children:e.message})}):v.jsx(qR,{value:{readonly:!0,localLinkMode:"text",attachmentMode:e.bundle.attachmentMode},children:v.jsx("div",{className:"h-full bg-background",children:v.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:[v.jsx("header",{className:"flex-shrink-0 border-b border-border px-4",children:v.jsxs("div",{className:"mx-auto flex h-16 w-full items-center gap-2 min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[v.jsxs("a",{className:"flex flex-shrink-0 items-center gap-2",href:"https://kanna.sh",target:"_blank",rel:"noopener noreferrer",children:[v.jsx(rp,{className:"h-5 w-5 sm:h-6 sm:w-6 text-logo"}),v.jsx("span",{className:"font-logo text-base uppercase sm:text-lg text-slate-600 dark:text-slate-100",children:vU})]}),v.jsx("span",{className:"hidden text-sm text-muted-foreground sm:inline",children:"/"}),v.jsx("span",{className:"truncate text-sm text-muted-foreground",children:e.bundle.title})]}),v.jsx("div",{className:"flex-1 md:hidden"})]})}),v.jsxs("div",{className:"relative flex h-full min-h-0 flex-col overflow-hidden",children:[v.jsx(nU,{activeChatId:e.bundle.chatId,listRef:o,messages:s,queuedMessages:[],transcriptPaddingBottom:120,localPath:e.bundle.localPath,latestToolIds:u,isHistoryLoading:!1,hasOlderHistory:!1,isProcessing:!1,runtimeStatus:null,isDraining:!1,commandError:null,loadOlderHistory:d,onStopDraining:f,onSteerQueuedMessage:d,onRemoveQueuedMessage:d,onOpenLocalLink:p,onAskUserQuestionSubmit:m,onExitPlanModeConfirm:g,schedules:{},onAutoContinueAccept:f,onAutoContinueReschedule:f,onAutoContinueCancel:f,showScrollButton:!r&&s.length>0,onIsAtEndChange:l,scrollToBottom:x,typedEmptyStateText:"",isEmptyStateTypingComplete:!0,isPageFileDragActive:!1,showEmptyState:!1,headerOffsetPx:20}),v.jsx("div",{className:"absolute bottom-4 left-1/2 z-20 w-full -translate-x-1/2 md:w-auto",children:v.jsxs("div",{className:"mx-2 flex items-center gap-3 rounded-xl border border-border bg-background/95 px-4 py-3 shadow-lg backdrop-blur-lg md:mx-0",children:[v.jsx(rp,{className:"h-6 w-6 flex-shrink-0 text-logo"}),v.jsx("p",{className:"flex-1 text-sm text-foreground sm:text-base",children:"Kanna is a delightful open-source harness UI"}),v.jsxs("a",{className:"ml-4 flex flex-shrink-0 flex-row items-center gap-1 rounded-lg bg-logo px-3 py-1.5 pr-2 text-sm font-bold text-white transition-colors hover:bg-logo/90",href:"https://kanna.sh",target:"_blank",rel:"noopener noreferrer",onClick:w=>{w.preventDefault(),b()},children:[v.jsx("span",{children:"Try It"}),v.jsx(bl,{className:"h-4 w-4 translate-y-[0.5px]"})]})]})})]})]})})})}const vE=document.getElementById("root");if(!vE)throw new Error("Missing #root");IT.createRoot(vE).render(v.jsx(S.StrictMode,{children:v.jsx(xU,{})}));
|