palettecn 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +10 -0
- package/dist/web/nitro.json +17 -0
- package/dist/web/public/assets/abap-BdvmRIgS.js +1 -0
- package/dist/web/public/assets/actionscript-3-et0rQaqm.js +1 -0
- package/dist/web/public/assets/ada-DPgrustg.js +1 -0
- package/dist/web/public/assets/andromeeda-DJl1yeV_.js +1 -0
- package/dist/web/public/assets/angular-html-Dm7s7tSx.js +1 -0
- package/dist/web/public/assets/angular-ts-B_ywTULt.js +1 -0
- package/dist/web/public/assets/apache-CFpsYX8S.js +1 -0
- package/dist/web/public/assets/apex-CN5n6pbI.js +1 -0
- package/dist/web/public/assets/apl-Dm11wHHc.js +1 -0
- package/dist/web/public/assets/applescript-JrY23hsL.js +1 -0
- package/dist/web/public/assets/ara-DR83hn3A.js +1 -0
- package/dist/web/public/assets/asciidoc-Dpu9XLB1.js +1 -0
- package/dist/web/public/assets/asm-BYI3A31V.js +1 -0
- package/dist/web/public/assets/astro-DP1naDCT.js +1 -0
- package/dist/web/public/assets/aurora-x-Nav5jnoQ.js +1 -0
- package/dist/web/public/assets/awk-BIoTx_w6.js +1 -0
- package/dist/web/public/assets/ayu-dark-H5QV5J7K.js +1 -0
- package/dist/web/public/assets/ayu-light-BrwTNGnU.js +1 -0
- package/dist/web/public/assets/ayu-mirage-Bg6FpF5w.js +1 -0
- package/dist/web/public/assets/ballerina-BFvDNd4T.js +1 -0
- package/dist/web/public/assets/bat-DtQkx7Ny.js +1 -0
- package/dist/web/public/assets/beancount-BIjKALa1.js +1 -0
- package/dist/web/public/assets/berry-BPkDN_EZ.js +1 -0
- package/dist/web/public/assets/bibtex-Dur2CNW6.js +1 -0
- package/dist/web/public/assets/bicep-BMz1bZ7m.js +1 -0
- package/dist/web/public/assets/bird2-91rdr9s7.js +1 -0
- package/dist/web/public/assets/blade-DD5O596X.js +1 -0
- package/dist/web/public/assets/bsl-FmB7U2qd.js +1 -0
- package/dist/web/public/assets/bundle-mjs-Bso3xn9x.js +1 -0
- package/dist/web/public/assets/c-DqqBLLyl.js +1 -0
- package/dist/web/public/assets/c3-CJTbEooS.js +1 -0
- package/dist/web/public/assets/cadence-C0GI7BZZ.js +1 -0
- package/dist/web/public/assets/cairo-B5JMmIC0.js +1 -0
- package/dist/web/public/assets/catppuccin-frappe-D76-cUjK.js +1 -0
- package/dist/web/public/assets/catppuccin-latte-DUHNJ_6_.js +1 -0
- package/dist/web/public/assets/catppuccin-macchiato-CFhPH2wd.js +1 -0
- package/dist/web/public/assets/catppuccin-mocha-BRD0cvUW.js +1 -0
- package/dist/web/public/assets/chunk-FRKYWMV7-DUkk3w4h.js +122 -0
- package/dist/web/public/assets/clarity-KgUVrNfC.js +1 -0
- package/dist/web/public/assets/clojure-BhQuoGIG.js +1 -0
- package/dist/web/public/assets/cmake-CA59gUFQ.js +1 -0
- package/dist/web/public/assets/cobol-CCFShgGZ.js +1 -0
- package/dist/web/public/assets/codeowners-CD36YqjJ.js +1 -0
- package/dist/web/public/assets/codeql-CrMosKUt.js +1 -0
- package/dist/web/public/assets/coffee-C-Mn3tBT.js +1 -0
- package/dist/web/public/assets/common-lisp-DYnOjAFz.js +1 -0
- package/dist/web/public/assets/components-DiZ1dSl3.js +77 -0
- package/dist/web/public/assets/coq-BaHtq3Qt.js +1 -0
- package/dist/web/public/assets/cpp-D8Y73ItU.js +1 -0
- package/dist/web/public/assets/crystal-CnXWqbxx.js +1 -0
- package/dist/web/public/assets/csharp-D6sghVPa.js +1 -0
- package/dist/web/public/assets/css-CUGjdPw_.js +1 -0
- package/dist/web/public/assets/csv-DuxyxUAI.js +1 -0
- package/dist/web/public/assets/cue-D9NRAX0_.js +1 -0
- package/dist/web/public/assets/cypher-HJRdtilF.js +1 -0
- package/dist/web/public/assets/d-B4Ont7_X.js +1 -0
- package/dist/web/public/assets/dark-plus-DZSBycyp.js +1 -0
- package/dist/web/public/assets/dart-Dp4asavE.js +1 -0
- package/dist/web/public/assets/dax-DBUubp6S.js +1 -0
- package/dist/web/public/assets/desktop-DQ0n6zIQ.js +1 -0
- package/dist/web/public/assets/diff-CFHlrffC.js +1 -0
- package/dist/web/public/assets/docker-BuefmsF5.js +1 -0
- package/dist/web/public/assets/dotenv-BKTsUQ_r.js +1 -0
- package/dist/web/public/assets/dracula-MOn9qacs.js +1 -0
- package/dist/web/public/assets/dracula-soft-C4r_sC_D.js +1 -0
- package/dist/web/public/assets/dream-maker-BNdv5lLS.js +1 -0
- package/dist/web/public/assets/edge-C-Mi8Oda.js +1 -0
- package/dist/web/public/assets/elixir-CTS5wQtX.js +1 -0
- package/dist/web/public/assets/elm-rM310x8D.js +1 -0
- package/dist/web/public/assets/emacs-lisp-D9FIGRtM.js +1 -0
- package/dist/web/public/assets/erb-oaGjGVGO.js +1 -0
- package/dist/web/public/assets/erlang-q4Mkyw3m.js +1 -0
- package/dist/web/public/assets/everforest-dark-CNa2QFRn.js +1 -0
- package/dist/web/public/assets/everforest-light-DRbUDqJT.js +1 -0
- package/dist/web/public/assets/fennel-DpqQTaVZ.js +1 -0
- package/dist/web/public/assets/field-1-Ujza0S5j.js +1 -0
- package/dist/web/public/assets/fish-hyk5x6Q4.js +1 -0
- package/dist/web/public/assets/fluent-DMll-MGX.js +1 -0
- package/dist/web/public/assets/fortran-fixed-form-BmdfKovV.js +1 -0
- package/dist/web/public/assets/fortran-free-form-MCAifii4.js +1 -0
- package/dist/web/public/assets/fsharp-DLlBn9Nl.js +1 -0
- package/dist/web/public/assets/gdresource-BzFzBRli.js +1 -0
- package/dist/web/public/assets/gdscript-D3R4J0Cv.js +1 -0
- package/dist/web/public/assets/gdshader-BAubtqqN.js +1 -0
- package/dist/web/public/assets/genie-BnIIX2pC.js +1 -0
- package/dist/web/public/assets/gherkin-CL3NUuB1.js +1 -0
- package/dist/web/public/assets/git-commit-BYPE8h85.js +1 -0
- package/dist/web/public/assets/git-rebase-Bmmgf6eN.js +1 -0
- package/dist/web/public/assets/github-dark-default-C6I2oE4c.js +1 -0
- package/dist/web/public/assets/github-dark-dimmed-DEqwxg6D.js +1 -0
- package/dist/web/public/assets/github-dark-high-contrast-DDt3j0cs.js +1 -0
- package/dist/web/public/assets/github-dark-oLN6SDKl.js +1 -0
- package/dist/web/public/assets/github-light-DaN-N2Gj.js +1 -0
- package/dist/web/public/assets/github-light-default-B3EwMbS7.js +1 -0
- package/dist/web/public/assets/github-light-high-contrast-Cl9D0f_e.js +1 -0
- package/dist/web/public/assets/gleam-Cvj8QRtQ.js +1 -0
- package/dist/web/public/assets/glimmer-js-CahbROb1.js +1 -0
- package/dist/web/public/assets/glimmer-ts-JMFYNbot.js +1 -0
- package/dist/web/public/assets/global-XWAvxWcA.css +2 -0
- package/dist/web/public/assets/glsl-BCuCNM3V.js +1 -0
- package/dist/web/public/assets/gn-DxCHSEMl.js +1 -0
- package/dist/web/public/assets/gnuplot-CkGXHK7B.js +1 -0
- package/dist/web/public/assets/go-B_NLCuTj.js +1 -0
- package/dist/web/public/assets/graphql-RXOfHGfI.js +1 -0
- package/dist/web/public/assets/groovy-DVge8oRs.js +1 -0
- package/dist/web/public/assets/gruvbox-dark-hard-BwZz1yni.js +1 -0
- package/dist/web/public/assets/gruvbox-dark-medium-Bqy6jkuO.js +1 -0
- package/dist/web/public/assets/gruvbox-dark-soft-DjUvyUfH.js +1 -0
- package/dist/web/public/assets/gruvbox-light-hard-BTLmfPdm.js +1 -0
- package/dist/web/public/assets/gruvbox-light-medium-DeWqsWs6.js +1 -0
- package/dist/web/public/assets/gruvbox-light-soft-BL8ld-1F.js +1 -0
- package/dist/web/public/assets/hack-BBQpwyf_.js +1 -0
- package/dist/web/public/assets/haml-mWELc9kh.js +1 -0
- package/dist/web/public/assets/handlebars-COrUo8cC.js +1 -0
- package/dist/web/public/assets/haskell-DRmM8XlQ.js +1 -0
- package/dist/web/public/assets/haxe-BEhq8ZEr.js +1 -0
- package/dist/web/public/assets/hcl-B5ZIaGS0.js +1 -0
- package/dist/web/public/assets/highlighted-body-TPN3WLV5-YJgGFx4e.js +1 -0
- package/dist/web/public/assets/hjson-B9uRLqIO.js +1 -0
- package/dist/web/public/assets/hlsl-Hv1kKjrS.js +1 -0
- package/dist/web/public/assets/horizon-ClXGBjWw.js +1 -0
- package/dist/web/public/assets/horizon-bright-CvUCr3ux.js +1 -0
- package/dist/web/public/assets/houston-NqkqG60q.js +1 -0
- package/dist/web/public/assets/html-cmigv1ou.js +1 -0
- package/dist/web/public/assets/html-derivative-B3me0pSu.js +1 -0
- package/dist/web/public/assets/http-BojM9cyU.js +1 -0
- package/dist/web/public/assets/hurl-BxEmMiGP.js +1 -0
- package/dist/web/public/assets/hxml-CoBuVbfs.js +1 -0
- package/dist/web/public/assets/hy-CeISYGGU.js +1 -0
- package/dist/web/public/assets/imba-xjcDFXUW.js +1 -0
- package/dist/web/public/assets/ini-D0ZCSj6e.js +1 -0
- package/dist/web/public/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/web/public/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/web/public/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/web/public/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/web/public/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/web/public/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/web/public/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/web/public/assets/java-BvheClGI.js +1 -0
- package/dist/web/public/assets/javascript-DjlJORDg.js +1 -0
- package/dist/web/public/assets/jinja-Bi4sG72X.js +1 -0
- package/dist/web/public/assets/jison-BTz5Ik2Y.js +1 -0
- package/dist/web/public/assets/json-CiTd40Rg.js +1 -0
- package/dist/web/public/assets/json5-FR9EyF7a.js +1 -0
- package/dist/web/public/assets/jsonc-CHIeFfsD.js +1 -0
- package/dist/web/public/assets/jsonl-B4WQkwTf.js +1 -0
- package/dist/web/public/assets/jsonnet-vd-gzGkL.js +1 -0
- package/dist/web/public/assets/jssm-C_bj1LkZ.js +1 -0
- package/dist/web/public/assets/jsx-Bx-RZMFH.js +1 -0
- package/dist/web/public/assets/jsx-runtime-n8k0hwt8.js +1 -0
- package/dist/web/public/assets/julia-BKcIfSxk.js +1 -0
- package/dist/web/public/assets/just-IkZCagAs.js +1 -0
- package/dist/web/public/assets/kanagawa-dragon-B3Cz89vt.js +1 -0
- package/dist/web/public/assets/kanagawa-lotus-CRe_W5Ft.js +1 -0
- package/dist/web/public/assets/kanagawa-wave-BPqZ5XB7.js +1 -0
- package/dist/web/public/assets/kdl-BzL_Ak31.js +1 -0
- package/dist/web/public/assets/kotlin-BQQFk6ql.js +1 -0
- package/dist/web/public/assets/kusto-vWe6OLKV.js +1 -0
- package/dist/web/public/assets/laserwave-CwtvEUcj.js +1 -0
- package/dist/web/public/assets/latex-9N90_WFU.js +1 -0
- package/dist/web/public/assets/lean-CaqenOqv.js +1 -0
- package/dist/web/public/assets/less-CERnPzn6.js +1 -0
- package/dist/web/public/assets/light-plus-B9_M_OKq.js +1 -0
- package/dist/web/public/assets/liquid-CQLPDP7m.js +1 -0
- package/dist/web/public/assets/llvm-BylJXvm7.js +1 -0
- package/dist/web/public/assets/log-CBBcNcbO.js +1 -0
- package/dist/web/public/assets/logo-r-8Jc8Xk.js +1 -0
- package/dist/web/public/assets/lua-BBL6LXKd.js +1 -0
- package/dist/web/public/assets/luau-B2g7L-zP.js +1 -0
- package/dist/web/public/assets/main-0lKVDR64.css +2 -0
- package/dist/web/public/assets/main-CcNf0BOb.js +126 -0
- package/dist/web/public/assets/make-DK-HzJ2w.js +1 -0
- package/dist/web/public/assets/markdown-FgdsukgR.js +1 -0
- package/dist/web/public/assets/marko-CLZwt2N2.js +1 -0
- package/dist/web/public/assets/material-theme-DOJ9PS4O.js +1 -0
- package/dist/web/public/assets/material-theme-darker-DOurH5jT.js +1 -0
- package/dist/web/public/assets/material-theme-lighter-BfPWxCP6.js +1 -0
- package/dist/web/public/assets/material-theme-ocean-BcO5PKoq.js +1 -0
- package/dist/web/public/assets/material-theme-palenight-ClWQBDDd.js +1 -0
- package/dist/web/public/assets/matlab-DwyUVNXd.js +1 -0
- package/dist/web/public/assets/mdc-Bo8CRPg4.js +1 -0
- package/dist/web/public/assets/mdx-3EBShbsD.js +1 -0
- package/dist/web/public/assets/mermaid-ByG2-SLz.js +1 -0
- package/dist/web/public/assets/mermaid-O7DHMXV3-COAgR3aM.js +1 -0
- package/dist/web/public/assets/min-dark-ClJ2x5pc.js +1 -0
- package/dist/web/public/assets/min-light-BsOUz5iE.js +1 -0
- package/dist/web/public/assets/mipsasm-BKDtQCf3.js +1 -0
- package/dist/web/public/assets/mojo-DmEAK7iv.js +1 -0
- package/dist/web/public/assets/monokai-BKc3VADO.js +1 -0
- package/dist/web/public/assets/moonbit-Qm8v_cKN.js +1 -0
- package/dist/web/public/assets/move-CMectUPk.js +1 -0
- package/dist/web/public/assets/narrat-Bdm8NaK8.js +1 -0
- package/dist/web/public/assets/nextflow-BpSt05nC.js +1 -0
- package/dist/web/public/assets/nextflow-groovy-BZ-bqJ-u.js +1 -0
- package/dist/web/public/assets/nginx-ChZL5FWE.js +1 -0
- package/dist/web/public/assets/night-owl-CbFc5pXO.js +1 -0
- package/dist/web/public/assets/night-owl-light-zYbVCVuz.js +1 -0
- package/dist/web/public/assets/nim-5JnPAJWa.js +1 -0
- package/dist/web/public/assets/nix-P5P-2qHs.js +1 -0
- package/dist/web/public/assets/nord-C7hKGudV.js +1 -0
- package/dist/web/public/assets/nushell-DKPnC5RG.js +1 -0
- package/dist/web/public/assets/objective-c-BPwXtM0v.js +1 -0
- package/dist/web/public/assets/objective-cpp-CWYEdWNG.js +1 -0
- package/dist/web/public/assets/ocaml-CL7OJ02v.js +1 -0
- package/dist/web/public/assets/odin-Dtay25eA.js +1 -0
- package/dist/web/public/assets/one-dark-pro-CrdFNNwF.js +1 -0
- package/dist/web/public/assets/one-light-BUiz8X4B.js +1 -0
- package/dist/web/public/assets/openscad-WD4sXUUp.js +1 -0
- package/dist/web/public/assets/pascal-A6-MZnZ8.js +1 -0
- package/dist/web/public/assets/perl-Yq3AfnVV.js +1 -0
- package/dist/web/public/assets/php-CCj0foPx.js +1 -0
- package/dist/web/public/assets/pkl-cmPbg8fI.js +1 -0
- package/dist/web/public/assets/plastic-DtQ_LnDB.js +1 -0
- package/dist/web/public/assets/plsql-DwmuVd7q.js +1 -0
- package/dist/web/public/assets/po-CkVxkZaj.js +1 -0
- package/dist/web/public/assets/poimandres-Dt0xZuaa.js +1 -0
- package/dist/web/public/assets/polar-hStNz_W2.js +1 -0
- package/dist/web/public/assets/postcss-ZIk0AQ7M.js +1 -0
- package/dist/web/public/assets/powerquery-D0gqoHHD.js +1 -0
- package/dist/web/public/assets/powershell-DXB5HoVh.js +1 -0
- package/dist/web/public/assets/prisma-DmTrfxC0.js +1 -0
- package/dist/web/public/assets/prolog-CdoyriEj.js +1 -0
- package/dist/web/public/assets/proto-4MrN11dS.js +1 -0
- package/dist/web/public/assets/pug-svYJKDOQ.js +1 -0
- package/dist/web/public/assets/puppet-MEaLGpAP.js +1 -0
- package/dist/web/public/assets/purescript-CPxCorqB.js +1 -0
- package/dist/web/public/assets/python-f4fp5z0z.js +1 -0
- package/dist/web/public/assets/qml-BzEtWdqI.js +1 -0
- package/dist/web/public/assets/qmldir-DCjSceJ_.js +1 -0
- package/dist/web/public/assets/qss-BdM02NUc.js +1 -0
- package/dist/web/public/assets/r-luosIeJH.js +1 -0
- package/dist/web/public/assets/racket-D2tfa8Zc.js +1 -0
- package/dist/web/public/assets/raku-KeGPJVZg.js +1 -0
- package/dist/web/public/assets/razor-Bokxs4Qx.js +1 -0
- package/dist/web/public/assets/red-C0qZ-1lN.js +1 -0
- package/dist/web/public/assets/reg-DdnswvOj.js +1 -0
- package/dist/web/public/assets/regexp-CYC8h6V9.js +1 -0
- package/dist/web/public/assets/rel-RhzEfSRc.js +1 -0
- package/dist/web/public/assets/riscv-dS5TzX10.js +1 -0
- package/dist/web/public/assets/ron-CQjQSCVp.js +1 -0
- package/dist/web/public/assets/rose-pine-C89ViLdr.js +1 -0
- package/dist/web/public/assets/rose-pine-dawn-Dq2gf0yi.js +1 -0
- package/dist/web/public/assets/rose-pine-moon-CBDvXVs_.js +1 -0
- package/dist/web/public/assets/rosmsg-nvjuSIGu.js +1 -0
- package/dist/web/public/assets/routes-BXqJCOpL.js +542 -0
- package/dist/web/public/assets/rst-1xwvVGf7.js +1 -0
- package/dist/web/public/assets/ruby-Blad-eDx.js +1 -0
- package/dist/web/public/assets/rust-rV8q_xyI.js +1 -0
- package/dist/web/public/assets/sas-DUPWtptg.js +1 -0
- package/dist/web/public/assets/sass-CuxdoNN0.js +1 -0
- package/dist/web/public/assets/scala-Df4L7N3R.js +1 -0
- package/dist/web/public/assets/scheme-DalRmAPH.js +1 -0
- package/dist/web/public/assets/scss-CYQ8LEwP.js +1 -0
- package/dist/web/public/assets/sdbl-B_TmFnGf.js +1 -0
- package/dist/web/public/assets/shaderlab-DYEMDY3e.js +1 -0
- package/dist/web/public/assets/shellscript-DjKZ34ac.js +1 -0
- package/dist/web/public/assets/shellsession-C3kcnBnh.js +1 -0
- package/dist/web/public/assets/slack-dark-ak_jOeLl.js +1 -0
- package/dist/web/public/assets/slack-ochin-ByiYhLwu.js +1 -0
- package/dist/web/public/assets/smalltalk-DTTnjjZJ.js +1 -0
- package/dist/web/public/assets/snazzy-light-BBRYeY60.js +1 -0
- package/dist/web/public/assets/solarized-dark-BtoLnWkw.js +1 -0
- package/dist/web/public/assets/solarized-light-CtzUA7GI.js +1 -0
- package/dist/web/public/assets/solidity-CSIHEQ2t.js +1 -0
- package/dist/web/public/assets/soy-BN0uzUAI.js +1 -0
- package/dist/web/public/assets/sparql-B6k9tA6Q.js +1 -0
- package/dist/web/public/assets/splunk-DkRzN7V_.js +1 -0
- package/dist/web/public/assets/sql-Bx-WX28V.js +1 -0
- package/dist/web/public/assets/ssh-config-Bqp7ng33.js +1 -0
- package/dist/web/public/assets/stata-HAj7doU8.js +1 -0
- package/dist/web/public/assets/stylus-CdbCxDLX.js +1 -0
- package/dist/web/public/assets/surrealql-BkGf0I3k.js +1 -0
- package/dist/web/public/assets/svelte-DtWg6ssL.js +1 -0
- package/dist/web/public/assets/swift-yRu2dtgr.js +1 -0
- package/dist/web/public/assets/synthwave-84-2WIu6MHX.js +1 -0
- package/dist/web/public/assets/system-verilog-GUE_oP1V.js +1 -0
- package/dist/web/public/assets/systemd-FLIJAQZV.js +1 -0
- package/dist/web/public/assets/talonscript-DTR-8ILs.js +1 -0
- package/dist/web/public/assets/tasl-WHNWP-1F.js +1 -0
- package/dist/web/public/assets/tcl-BaBXNNp6.js +1 -0
- package/dist/web/public/assets/templ-Dc9vj00n.js +1 -0
- package/dist/web/public/assets/terraform-uJUFpr8t.js +1 -0
- package/dist/web/public/assets/tex-DA3dAz55.js +1 -0
- package/dist/web/public/assets/tokyo-night-BbogFqAr.js +1 -0
- package/dist/web/public/assets/toml-CyR4Gqq1.js +1 -0
- package/dist/web/public/assets/ts-tags-BD1j21LH.js +1 -0
- package/dist/web/public/assets/tsv-COLVYI6A.js +1 -0
- package/dist/web/public/assets/tsx-CFm2E6uK.js +1 -0
- package/dist/web/public/assets/turtle-PQwt4gkb.js +1 -0
- package/dist/web/public/assets/twig-DrUXy85s.js +1 -0
- package/dist/web/public/assets/typescript-Dy-5sXFx.js +1 -0
- package/dist/web/public/assets/typespec-Bb7qHV0g.js +1 -0
- package/dist/web/public/assets/typst-Bj_JElGz.js +1 -0
- package/dist/web/public/assets/v-BTkrtik4.js +1 -0
- package/dist/web/public/assets/vala-AXT1CI9v.js +1 -0
- package/dist/web/public/assets/vb-DzTKUgW8.js +1 -0
- package/dist/web/public/assets/verilog-aI3j5Xj8.js +1 -0
- package/dist/web/public/assets/vesper-BmnwIC_B.js +1 -0
- package/dist/web/public/assets/vhdl-4IgBB7vO.js +1 -0
- package/dist/web/public/assets/viml-D_XMKSR6.js +1 -0
- package/dist/web/public/assets/vitesse-black-DhmxIXiA.js +1 -0
- package/dist/web/public/assets/vitesse-dark-dvEH_9qt.js +1 -0
- package/dist/web/public/assets/vitesse-light-Ca0W2L1O.js +1 -0
- package/dist/web/public/assets/vue-DC_yTvy2.js +1 -0
- package/dist/web/public/assets/vue-html-Bp8x4gdt.js +1 -0
- package/dist/web/public/assets/vue-vine-ZcUkuUUp.js +1 -0
- package/dist/web/public/assets/vyper-Dz2f7-FK.js +1 -0
- package/dist/web/public/assets/wasm-CuXPCj65.js +1 -0
- package/dist/web/public/assets/wasm-DHkXUMsP.js +1 -0
- package/dist/web/public/assets/wenyan-BRAtM0Iv.js +1 -0
- package/dist/web/public/assets/wgsl-CMpn9jTa.js +1 -0
- package/dist/web/public/assets/wikitext-DRmBVmVA.js +1 -0
- package/dist/web/public/assets/wit-Drp_HLqJ.js +1 -0
- package/dist/web/public/assets/wolfram-C33umj7M.js +1 -0
- package/dist/web/public/assets/xml-BHoOtGbO.js +1 -0
- package/dist/web/public/assets/xsl-CN1PlFqm.js +1 -0
- package/dist/web/public/assets/yaml-DT0mpn8u.js +1 -0
- package/dist/web/public/assets/zenscript-BlYQ_Frf.js +1 -0
- package/dist/web/public/assets/zig-Buk7I0y-.js +1 -0
- package/dist/web/server/_chunks/ssr-renderer.mjs +15 -0
- package/dist/web/server/_libs/@ai-sdk/anthropic+[...].mjs +14021 -0
- package/dist/web/server/_libs/@ai-sdk/moonshotai+[...].mjs +898 -0
- package/dist/web/server/_libs/@ai-sdk/react+[...].mjs +8969 -0
- package/dist/web/server/_libs/@emotion/is-prop-valid+[...].mjs +34 -0
- package/dist/web/server/_libs/@floating-ui/core+[...].mjs +698 -0
- package/dist/web/server/_libs/@floating-ui/dom+[...].mjs +644 -0
- package/dist/web/server/_libs/@floating-ui/react-dom+[...].mjs +475 -0
- package/dist/web/server/_libs/@lobehub/icons+[...].mjs +3079 -0
- package/dist/web/server/_libs/@radix-ui/react-arrow+[...].mjs +184 -0
- package/dist/web/server/_libs/@radix-ui/react-collapsible+[...].mjs +374 -0
- package/dist/web/server/_libs/@radix-ui/react-dialog+[...].mjs +1503 -0
- package/dist/web/server/_libs/@radix-ui/react-menu+[...].mjs +1236 -0
- package/dist/web/server/_libs/@radix-ui/react-select+[...].mjs +1007 -0
- package/dist/web/server/_libs/@shikijs/core+[...].mjs +9017 -0
- package/dist/web/server/_libs/@shikijs/engine-javascript+[...].mjs +3159 -0
- package/dist/web/server/_libs/@streamdown/math+[...].mjs +37559 -0
- package/dist/web/server/_libs/@tanstack/react-router+[...].mjs +14074 -0
- package/dist/web/server/_libs/_.mjs +3 -0
- package/dist/web/server/_libs/_2.mjs +3 -0
- package/dist/web/server/_libs/_3.mjs +2 -0
- package/dist/web/server/_libs/_4.mjs +2 -0
- package/dist/web/server/_libs/ai-sdk__gateway+vercel__oidc.mjs +1255 -0
- package/dist/web/server/_libs/ai-sdk__google.mjs +1630 -0
- package/dist/web/server/_libs/ai-sdk__openai+zod.mjs +4951 -0
- package/dist/web/server/_libs/ai-sdk__provider-utils.mjs +411 -0
- package/dist/web/server/_libs/ai-sdk__provider.mjs +222 -0
- package/dist/web/server/_libs/bail.mjs +13 -0
- package/dist/web/server/_libs/character-entities.mjs +2135 -0
- package/dist/web/server/_libs/class-variance-authority+clsx.mjs +69 -0
- package/dist/web/server/_libs/color+[...].mjs +2185 -0
- package/dist/web/server/_libs/copy-text-to-clipboard.mjs +40 -0
- package/dist/web/server/_libs/d3-array.mjs +231 -0
- package/dist/web/server/_libs/d3-color.mjs +330 -0
- package/dist/web/server/_libs/d3-format.mjs +252 -0
- package/dist/web/server/_libs/d3-interpolate.mjs +207 -0
- package/dist/web/server/_libs/d3-path.mjs +77 -0
- package/dist/web/server/_libs/d3-scale+[...].mjs +1907 -0
- package/dist/web/server/_libs/d3-shape.mjs +818 -0
- package/dist/web/server/_libs/date-fns.mjs +3012 -0
- package/dist/web/server/_libs/date-fns__tz.mjs +249 -0
- package/dist/web/server/_libs/decimal.js-light.mjs +884 -0
- package/dist/web/server/_libs/decode-named-character-reference+[...].mjs +19 -0
- package/dist/web/server/_libs/dexie.mjs +3745 -0
- package/dist/web/server/_libs/escape-string-regexp.mjs +7 -0
- package/dist/web/server/_libs/estree-util-is-identifier-name.mjs +20 -0
- package/dist/web/server/_libs/eventemitter3.mjs +237 -0
- package/dist/web/server/_libs/extend.mjs +75 -0
- package/dist/web/server/_libs/fast-equals.mjs +423 -0
- package/dist/web/server/_libs/framer-motion+[...].mjs +9573 -0
- package/dist/web/server/_libs/fuzzysort.mjs +621 -0
- package/dist/web/server/_libs/h3+rou3+srvx.mjs +1158 -0
- package/dist/web/server/_libs/hast-util-raw+[...].mjs +800 -0
- package/dist/web/server/_libs/hast-util-sanitize.mjs +780 -0
- package/dist/web/server/_libs/hast-util-to-jsx-runtime+[...].mjs +853 -0
- package/dist/web/server/_libs/hookable.mjs +41 -0
- package/dist/web/server/_libs/html-url-attributes.mjs +44 -0
- package/dist/web/server/_libs/is-plain-obj.mjs +8 -0
- package/dist/web/server/_libs/lodash.mjs +4532 -0
- package/dist/web/server/_libs/lucide-react.mjs +605 -0
- package/dist/web/server/_libs/markdown-table.mjs +289 -0
- package/dist/web/server/_libs/marked.mjs +1511 -0
- package/dist/web/server/_libs/mdast-util-find-and-replace.mjs +198 -0
- package/dist/web/server/_libs/mdast-util-from-markdown+[...].mjs +8121 -0
- package/dist/web/server/_libs/mdast-util-gfm+[...].mjs +2060 -0
- package/dist/web/server/_libs/mdast-util-to-hast+[...].mjs +1770 -0
- package/dist/web/server/_libs/micromark-extension-gfm+[...].mjs +2235 -0
- package/dist/web/server/_libs/nanoid.mjs +26 -0
- package/dist/web/server/_libs/next-themes.mjs +124 -0
- package/dist/web/server/_libs/prop-types.mjs +69 -0
- package/dist/web/server/_libs/radix-ui__number.mjs +6 -0
- package/dist/web/server/_libs/radix-ui__primitive.mjs +9 -0
- package/dist/web/server/_libs/radix-ui__react-collection.mjs +80 -0
- package/dist/web/server/_libs/radix-ui__react-direction.mjs +11 -0
- package/dist/web/server/_libs/radix-ui__react-label.mjs +23 -0
- package/dist/web/server/_libs/radix-ui__react-menubar.mjs +400 -0
- package/dist/web/server/_libs/radix-ui__react-popover.mjs +251 -0
- package/dist/web/server/_libs/radix-ui__react-progress.mjs +81 -0
- package/dist/web/server/_libs/radix-ui__react-scroll-area.mjs +669 -0
- package/dist/web/server/_libs/radix-ui__react-separator.mjs +32 -0
- package/dist/web/server/_libs/radix-ui__react-slider.mjs +464 -0
- package/dist/web/server/_libs/radix-ui__react-switch.mjs +120 -0
- package/dist/web/server/_libs/radix-ui__react-tabs.mjs +145 -0
- package/dist/web/server/_libs/radix-ui__react-tooltip.mjs +494 -0
- package/dist/web/server/_libs/react-day-picker.mjs +3510 -0
- package/dist/web/server/_libs/react-is.mjs +48 -0
- package/dist/web/server/_libs/react-resizable-panels.mjs +1517 -0
- package/dist/web/server/_libs/react-smooth.mjs +1024 -0
- package/dist/web/server/_libs/recharts+[...].mjs +12998 -0
- package/dist/web/server/_libs/rehype-harden.mjs +210 -0
- package/dist/web/server/_libs/rehype-raw.mjs +37 -0
- package/dist/web/server/_libs/rehype-sanitize.mjs +27 -0
- package/dist/web/server/_libs/remark-gfm.mjs +34 -0
- package/dist/web/server/_libs/remark-parse.mjs +37 -0
- package/dist/web/server/_libs/remark-rehype.mjs +169 -0
- package/dist/web/server/_libs/remend.mjs +544 -0
- package/dist/web/server/_libs/scule.mjs +55 -0
- package/dist/web/server/_libs/shiki+streamdown__code.mjs +1748 -0
- package/dist/web/server/_libs/shiki.mjs +16 -0
- package/dist/web/server/_libs/shikijs__engine-oniguruma.mjs +387 -0
- package/dist/web/server/_libs/shikijs__langs.mjs +1357 -0
- package/dist/web/server/_libs/shikijs__themes.mjs +268 -0
- package/dist/web/server/_libs/sonner.mjs +909 -0
- package/dist/web/server/_libs/streamdown+[...].mjs +5842 -0
- package/dist/web/server/_libs/tanstack__history.mjs +342 -0
- package/dist/web/server/_libs/tanstack__query-core.mjs +2073 -0
- package/dist/web/server/_libs/tanstack__react-query.mjs +146 -0
- package/dist/web/server/_libs/tanstack__router-core.mjs +6 -0
- package/dist/web/server/_libs/tanstack__zod-adapter.mjs +16 -0
- package/dist/web/server/_libs/ufo.mjs +64 -0
- package/dist/web/server/_libs/ungap__structured-clone.mjs +197 -0
- package/dist/web/server/_libs/use-stick-to-bottom.mjs +410 -0
- package/dist/web/server/_libs/vercel__oidc.mjs +393 -0
- package/dist/web/server/_libs/zhipu-ai-provider.mjs +13483 -0
- package/dist/web/server/_libs/zustand.mjs +48 -0
- package/dist/web/server/_runtime.mjs +35 -0
- package/dist/web/server/_ssr/components-BzCiScpA.mjs +1452 -0
- package/dist/web/server/_ssr/dist-3Mu7PF0n.mjs +137 -0
- package/dist/web/server/_ssr/dist-BRaLXgxZ.mjs +17 -0
- package/dist/web/server/_ssr/field-1-agM60DBf.mjs +167 -0
- package/dist/web/server/_ssr/get-providers-BoYkp0Of.mjs +40 -0
- package/dist/web/server/_ssr/initialize-provider-B6W8V5Eg.mjs +19 -0
- package/dist/web/server/_ssr/model-list-CDFjdz2P.mjs +60 -0
- package/dist/web/server/_ssr/router-BmmOCtJZ.mjs +168 -0
- package/dist/web/server/_ssr/routes-CvlpZK4Q.mjs +2630 -0
- package/dist/web/server/_ssr/schemas-DsZ5O3zp.mjs +67 -0
- package/dist/web/server/_ssr/send-message-DUT1vRvx.mjs +135 -0
- package/dist/web/server/_ssr/ssr.mjs +5253 -0
- package/dist/web/server/_ssr/start-rewezkfD.mjs +4 -0
- package/dist/web/server/_ssr/submit-key-CcCv6-yy.mjs +62 -0
- package/dist/web/server/_ssr/suggestions-B0Uc3p7F.mjs +38 -0
- package/dist/web/server/_ssr/use-providers-Bwqg2U3N.mjs +1554 -0
- package/dist/web/server/_tanstack-start-manifest_v-BMIvh4y6.mjs +60 -0
- package/dist/web/server/index.mjs +2531 -0
- package/dist/web/server/node_modules/tslib/modules/index.js +70 -0
- package/dist/web/server/node_modules/tslib/modules/package.json +3 -0
- package/dist/web/server/node_modules/tslib/package.json +47 -0
- package/dist/web/server/node_modules/tslib/tslib.js +484 -0
- package/package.json +32 -0
|
@@ -0,0 +1,542 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-Dm7s7tSx.js","assets/jsx-runtime-n8k0hwt8.js","assets/html-cmigv1ou.js","assets/css-CUGjdPw_.js","assets/javascript-DjlJORDg.js","assets/angular-ts-B_ywTULt.js","assets/scss-CYQ8LEwP.js","assets/apl-Dm11wHHc.js","assets/json-CiTd40Rg.js","assets/xml-BHoOtGbO.js","assets/java-BvheClGI.js","assets/astro-DP1naDCT.js","assets/postcss-ZIk0AQ7M.js","assets/tsx-CFm2E6uK.js","assets/typescript-Dy-5sXFx.js","assets/blade-DD5O596X.js","assets/html-derivative-B3me0pSu.js","assets/sql-Bx-WX28V.js","assets/bsl-FmB7U2qd.js","assets/sdbl-B_TmFnGf.js","assets/c-DqqBLLyl.js","assets/cairo-B5JMmIC0.js","assets/python-f4fp5z0z.js","assets/cobol-CCFShgGZ.js","assets/coffee-C-Mn3tBT.js","assets/cpp-D8Y73ItU.js","assets/glsl-BCuCNM3V.js","assets/regexp-CYC8h6V9.js","assets/crystal-CnXWqbxx.js","assets/shellscript-DjKZ34ac.js","assets/edge-C-Mi8Oda.js","assets/elixir-CTS5wQtX.js","assets/elm-rM310x8D.js","assets/erb-oaGjGVGO.js","assets/ruby-Blad-eDx.js","assets/graphql-RXOfHGfI.js","assets/jsx-Bx-RZMFH.js","assets/haml-mWELc9kh.js","assets/lua-BBL6LXKd.js","assets/yaml-DT0mpn8u.js","assets/erlang-q4Mkyw3m.js","assets/markdown-FgdsukgR.js","assets/fortran-fixed-form-BmdfKovV.js","assets/fortran-free-form-MCAifii4.js","assets/fsharp-DLlBn9Nl.js","assets/gdresource-BzFzBRli.js","assets/gdscript-D3R4J0Cv.js","assets/gdshader-BAubtqqN.js","assets/git-commit-BYPE8h85.js","assets/diff-CFHlrffC.js","assets/git-rebase-Bmmgf6eN.js","assets/glimmer-js-CahbROb1.js","assets/glimmer-ts-JMFYNbot.js","assets/hack-BBQpwyf_.js","assets/handlebars-COrUo8cC.js","assets/http-BojM9cyU.js","assets/hurl-BxEmMiGP.js","assets/csv-DuxyxUAI.js","assets/hxml-CoBuVbfs.js","assets/haxe-BEhq8ZEr.js","assets/jinja-Bi4sG72X.js","assets/jison-BTz5Ik2Y.js","assets/julia-BKcIfSxk.js","assets/r-luosIeJH.js","assets/just-IkZCagAs.js","assets/perl-Yq3AfnVV.js","assets/latex-9N90_WFU.js","assets/tex-DA3dAz55.js","assets/liquid-CQLPDP7m.js","assets/marko-CLZwt2N2.js","assets/less-CERnPzn6.js","assets/mdc-Bo8CRPg4.js","assets/nextflow-BpSt05nC.js","assets/nextflow-groovy-BZ-bqJ-u.js","assets/nginx-ChZL5FWE.js","assets/nim-5JnPAJWa.js","assets/php-CCj0foPx.js","assets/pug-svYJKDOQ.js","assets/qml-BzEtWdqI.js","assets/razor-Bokxs4Qx.js","assets/csharp-D6sghVPa.js","assets/rst-1xwvVGf7.js","assets/cmake-CA59gUFQ.js","assets/sas-DUPWtptg.js","assets/shaderlab-DYEMDY3e.js","assets/hlsl-Hv1kKjrS.js","assets/shellsession-C3kcnBnh.js","assets/soy-BN0uzUAI.js","assets/sparql-B6k9tA6Q.js","assets/turtle-PQwt4gkb.js","assets/stata-HAj7doU8.js","assets/surrealql-BkGf0I3k.js","assets/svelte-DtWg6ssL.js","assets/templ-Dc9vj00n.js","assets/go-B_NLCuTj.js","assets/ts-tags-BD1j21LH.js","assets/twig-DrUXy85s.js","assets/vue-DC_yTvy2.js","assets/vue-html-Bp8x4gdt.js","assets/vue-vine-ZcUkuUUp.js","assets/stylus-CdbCxDLX.js","assets/xsl-CN1PlFqm.js","assets/components-DiZ1dSl3.js","assets/main-CcNf0BOb.js","assets/main-0lKVDR64.css","assets/field-1-Ujza0S5j.js","assets/bundle-mjs-Bso3xn9x.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./jsx-runtime-n8k0hwt8.js";import{A as c,C as l,D as u,E as d,O as f,S as p,T as m,b as h,c as g,d as _,g as v,h as y,k as b,l as x,m as S,p as C,r as w,t as T,u as E,v as ee,w as te,x as D,y as ne}from"./field-1-Ujza0S5j.js";import{A as re,B as ie,C as ae,D as oe,E as se,F as ce,G as le,H as ue,I as de,L as fe,M as pe,N as me,O as he,P as ge,R as _e,S as ve,T as ye,U as be,V as xe,W as Se,_ as Ce,a as we,b as Te,c as Ee,d as De,f as Oe,g as ke,h as Ae,i as je,j as Me,k as Ne,l as Pe,m as Fe,n as Ie,o as Le,p as Re,r as ze,s as Be,t as O,u as Ve,v as He,w as Ue,x as We,y as Ge,z as Ke}from"./main-CcNf0BOb.js";import{n as qe}from"./bundle-mjs-Bso3xn9x.js";import{C as Je,S as Ye,_ as Xe,b as Ze,c as Qe,d as $e,f as et,g as tt,h as nt,i as rt,l as it,m as at,o as ot,p as st,s as ct,u as lt,v as ut,w as dt,x as ft,y as pt}from"./chunk-FRKYWMV7-DUkk3w4h.js";var mt=xe(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),ht=xe(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),gt=xe(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),_t=xe(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),vt=xe(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),yt=xe(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),bt=xe(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),xt=xe(`clover`,[[`path`,{d:`M16.17 7.83 2 22`,key:`t58vo8`}],[`path`,{d:`M4.02 12a2.827 2.827 0 1 1 3.81-4.17A2.827 2.827 0 1 1 12 4.02a2.827 2.827 0 1 1 4.17 3.81A2.827 2.827 0 1 1 19.98 12a2.827 2.827 0 1 1-3.81 4.17A2.827 2.827 0 1 1 12 19.98a2.827 2.827 0 1 1-4.17-3.81A1 1 0 1 1 4 12`,key:`17k36q`}],[`path`,{d:`m7.83 7.83 8.34 8.34`,key:`1d7sxk`}]]),St=xe(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),Ct=xe(`copy`,[[`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`}]]),wt=xe(`corner-down-left`,[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]),Tt=xe(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),Et=xe(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Dt=xe(`mouse-pointer-click`,[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]),Ot=xe(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),kt=xe(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),At=xe(`pencil`,[[`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`}]]),jt=xe(`pipette`,[[`path`,{d:`m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12`,key:`1y3wsu`}],[`path`,{d:`m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z`,key:`110lr1`}],[`path`,{d:`m2 22 .414-.414`,key:`jhxm08`}]]),Mt=xe(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Nt=xe(`refresh-ccw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),Pt=xe(`scan-eye`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`path`,{d:`M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0`,key:`11ak4c`}]]),Ft=xe(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),It=xe(`sparkle`,[[`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`}]]),Lt=xe(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Rt=xe(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),zt=xe(`type-outline`,[[`path`,{d:`M14 16.5a.5.5 0 0 0 .5.5h.5a2 2 0 0 1 0 4H9a2 2 0 0 1 0-4h.5a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5V8a2 2 0 0 1-4 0V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v3a2 2 0 0 1-4 0v-.5a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5Z`,key:`1reda3`}]]),Bt=xe(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Vt=class extends _e{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=ye(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ut(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Wt(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Wt(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof pe(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!ge(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Gt(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||pe(this.options.enabled,this.#t)!==pe(t.enabled,this.#t)||me(this.options.staleTime,this.#t)!==me(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||pe(this.options.enabled,this.#t)!==pe(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return eee(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(re)),t}#g(){this.#b();let e=me(this.options.staleTime,this.#t);if(he||this.#r.isStale||!Ne(e))return;let t=de(this.#r.dataUpdatedAt,e)+1;this.#d=fe.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(he||pe(this.options.enabled,this.#t)===!1||!Ne(this.#p)||this.#p===0)&&(this.#f=fe.setInterval(()=>{(this.options.refetchIntervalInBackground||se.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(fe.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(fe.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Ut(e,t),o=i&&Gt(e,n,t,r);(a||o)&&(l={...l,...ae(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=Me(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=Me(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Kt(e,t),refetch:this.refetch,promise:this.#o,isEnabled:pe(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=ye())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!ge(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){Ue.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Ht(e,t){return pe(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Ut(e,t){return Ht(e,t)||e.state.data!==void 0&&Wt(e,t,t.refetchOnMount)}function Wt(e,t,n){if(pe(t.enabled,e)!==!1&&me(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Kt(e,t)}return!1}function Gt(e,t,n,r){return(e!==t||pe(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Kt(e,n)}function Kt(e,t){return pe(t.enabled,e)!==!1&&e.isStaleByTime(me(t.staleTime,e))}function eee(e,t){return!ge(e.getCurrentResult(),t)}var tee=class extends _e{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),ge(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&oe(t.mutationKey)!==oe(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??ve();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Ue.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},k=t(a(),1),qt=k.createContext(!1),Jt=()=>k.useContext(qt);qt.Provider;var A=s();function Yt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xt=k.createContext(Yt()),Zt=()=>k.useContext(Xt),Qt=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?ce(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},$t=e=>{k.useEffect(()=>{e.clearReset()},[e])},en=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||ce(n,[e.error,r])),tn=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},nn=(e,t)=>e.isLoading&&e.isFetching&&!t,rn=(e,t)=>e?.suspense&&t.isPending,an=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function on(e,t,n){let r=Jt(),i=Zt(),a=We(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,tn(o),Qt(o,i,s),$t(i);let c=!a.getQueryCache().get(o.queryHash),[l]=k.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(e=>{let t=d?l.subscribe(Ue.batchCalls(e)):re;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),k.useEffect(()=>{l.setOptions(o)},[o,l]),rn(o,u))throw an(o,l,i);if(en({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!he&&nn(u,r)&&(c?an(o,l,i):s?.promise)?.catch(re).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function sn(e,t){return on(e,Vt,t)}function cn(e,t){let n=We(t),[r]=k.useState(()=>new tee(n,e));k.useEffect(()=>{r.setOptions(e)},[r,e]);let i=k.useSyncExternalStore(k.useCallback(e=>r.subscribe(Ue.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=k.useCallback((e,t)=>{r.mutate(e,t).catch(re)},[r]);if(i.error&&ce(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function ln(e){let t=be();return k.useCallback(async(...n)=>{try{let t=await e(...n);if(le(t))throw t;return t}catch(e){if(le(e))return e.options._fromLocation=t.state.location,t.navigate(t.resolveRedirect(e).options);throw e}},[t,e])}function un(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var dn=e((()=>{})),fn=(0,k.createContext)({});function pn(e){let t=(0,k.useRef)(null);return t.current===null&&(t.current=e()),t.current}var mn=typeof window<`u`?k.useLayoutEffect:k.useEffect,hn=(0,k.createContext)(null);function gn(e,t){e.indexOf(t)===-1&&e.push(t)}function _n(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var vn=(e,t,n)=>n>t?t:n<e?e:n,yn={},bn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function xn(e){return typeof e==`object`&&!!e}var Sn=e=>/^0[^.\s]+$/u.test(e);function Cn(e){let t;return()=>(t===void 0&&(t=e()),t)}var wn=e=>e,Tn=(e,t)=>n=>t(e(n)),En=(...e)=>e.reduce(Tn),Dn=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},On=class{constructor(){this.subscriptions=[]}add(e){return gn(this.subscriptions,e),()=>_n(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},kn=e=>e*1e3,An=e=>e/1e3;function jn(e,t){return t?1e3/t*e:0}var Mn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Nn=1e-7,Pn=12;function Fn(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Mn(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Nn&&++s<Pn);return o}function In(e,t,n,r){if(e===t&&n===r)return wn;let i=t=>Fn(t,0,1,e,n);return e=>e===0||e===1?e:Mn(i(e),t,r)}var Ln=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Rn=e=>t=>1-e(1-t),zn=In(.33,1.53,.69,.99),Bn=Rn(zn),Vn=Ln(Bn),Hn=e=>e>=1?1:(e*=2)<1?.5*Bn(e):.5*(2-2**(-10*(e-1))),Un=e=>1-Math.sin(Math.acos(e)),Wn=Rn(Un),Gn=Ln(Un),Kn=In(.42,0,1,1),qn=In(0,0,.58,1),Jn=In(.42,0,.58,1),Yn=e=>Array.isArray(e)&&typeof e[0]!=`number`,Xn=e=>Array.isArray(e)&&typeof e[0]==`number`,Zn={linear:wn,easeIn:Kn,easeInOut:Jn,easeOut:qn,circIn:Un,circInOut:Gn,circOut:Wn,backIn:Bn,backInOut:Vn,backOut:zn,anticipate:Hn},Qn=e=>typeof e==`string`,$n=e=>{if(Xn(e)){e.length;let[t,n,r,i]=e;return In(t,n,r,i)}else if(Qn(e))return Zn[e],`${e}`,Zn[e];return e},er=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],tr={value:null,addProjectionMetrics:null};function nr(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&tr.value&&tr.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var rr=40;function ir(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=er.reduce((e,n)=>(e[n]=nr(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=yn.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,rr),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:er.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<er.length;t++)o[er[t]].cancel(e)},state:i,steps:o}}var{schedule:ar,cancel:or,state:sr,steps:cr}=ir(typeof requestAnimationFrame<`u`?requestAnimationFrame:wn,!0),lr;function ur(){lr=void 0}var dr={now:()=>(lr===void 0&&dr.set(sr.isProcessing||yn.useManualTiming?sr.timestamp:performance.now()),lr),set:e=>{lr=e,queueMicrotask(ur)}},fr={layout:0,mainThread:0,waapi:0},pr=e=>t=>typeof t==`string`&&t.startsWith(e),mr=pr(`--`),hr=pr(`var(--`),gr=e=>hr(e)?_r.test(e.split(`/*`)[0].trim()):!1,_r=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function vr(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var yr={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},br={...yr,transform:e=>vn(0,1,e)},xr={...yr,default:1},Sr=e=>Math.round(e*1e5)/1e5,Cr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wr(e){return e==null}var Tr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Er=(e,t)=>n=>!!(typeof n==`string`&&Tr.test(n)&&n.startsWith(e)||t&&!wr(n)&&Object.prototype.hasOwnProperty.call(n,t)),Dr=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Cr);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Or=e=>vn(0,255,e),kr={...yr,transform:e=>Math.round(Or(e))},Ar={test:Er(`rgb`,`red`),parse:Dr(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+kr.transform(e)+`, `+kr.transform(t)+`, `+kr.transform(n)+`, `+Sr(br.transform(r))+`)`};function jr(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Mr={test:Er(`#`),parse:jr,transform:Ar.transform},Nr=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pr=Nr(`deg`),Fr=Nr(`%`),j=Nr(`px`),Ir=Nr(`vh`),Lr=Nr(`vw`),Rr={...Fr,parse:e=>Fr.parse(e)/100,transform:e=>Fr.transform(e*100)},zr={test:Er(`hsl`,`hue`),parse:Dr(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Fr.transform(Sr(t))+`, `+Fr.transform(Sr(n))+`, `+Sr(br.transform(r))+`)`},Br={test:e=>Ar.test(e)||Mr.test(e)||zr.test(e),parse:e=>Ar.test(e)?Ar.parse(e):zr.test(e)?zr.parse(e):Mr.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Ar.transform(e):zr.transform(e),getAnimatableNone:e=>{let t=Br.parse(e);return t.alpha=0,Br.transform(t)}},Vr=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Hr(e){return isNaN(e)&&typeof e==`string`&&(e.match(Cr)?.length||0)+(e.match(Vr)?.length||0)>0}var Ur=`number`,Wr=`color`,Gr=`var`,Kr=`var(`,qr="${}",Jr=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Yr(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Jr,e=>(Br.test(e)?(r.color.push(a),i.push(Wr),n.push(Br.parse(e))):e.startsWith(Kr)?(r.var.push(a),i.push(Gr),n.push(e)):(r.number.push(a),i.push(Ur),n.push(parseFloat(e))),++a,qr)).split(qr),indexes:r,types:i}}function Xr(e){return Yr(e).values}function Zr({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===Ur?i+=Sr(r[a]):e===Wr?i+=Br.transform(r[a]):i+=r[a]}return i}}function Qr(e){return Zr(Yr(e))}var $r=e=>typeof e==`number`?0:Br.test(e)?Br.getAnimatableNone(e):e,ei=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:$r(e);function ti(e){let t=Yr(e);return Zr(t)(t.values.map((e,n)=>ei(e,t.split[n])))}var ni={test:Hr,parse:Xr,createTransformer:Qr,getAnimatableNone:ti};function ri(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ii({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=ri(s,r,e+1/3),a=ri(s,r,e),o=ri(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function ai(e,t){return n=>n>0?t:e}var oi=(e,t,n)=>e+(t-e)*n,si=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},ci=[Mr,Ar,zr],li=e=>ci.find(t=>t.test(e));function ui(e){let t=li(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===zr&&(n=ii(n)),n}var di=(e,t)=>{let n=ui(e),r=ui(t);if(!n||!r)return ai(e,t);let i={...n};return e=>(i.red=si(n.red,r.red,e),i.green=si(n.green,r.green,e),i.blue=si(n.blue,r.blue,e),i.alpha=oi(n.alpha,r.alpha,e),Ar.transform(i))},fi=new Set([`none`,`hidden`]);function pi(e,t){return fi.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function mi(e,t){return n=>oi(e,t,n)}function hi(e){return typeof e==`number`?mi:typeof e==`string`?gr(e)?ai:Br.test(e)?di:yi:Array.isArray(e)?gi:typeof e==`object`?Br.test(e)?di:_i:ai}function gi(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>hi(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function _i(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=hi(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function vi(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var yi=(e,t)=>{let n=ni.createTransformer(t),r=Yr(e),i=Yr(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?fi.has(e)&&!i.values.length||fi.has(t)&&!r.values.length?pi(e,t):En(gi(vi(r,i),i.values),n):(`${e}${t}`,ai(e,t))};function bi(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?oi(e,t,n):hi(e)(e,t)}var xi=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>ar.update(t,e),stop:()=>or(t),now:()=>sr.isProcessing?sr.timestamp:dr.now()}},Si=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Ci=2e4;function wi(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function Ti(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(wi(r),Ci);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:An(i)}}var Ei={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Di(e,t){return e*Math.sqrt(1-t*t)}var Oi=12;function ki(e,t,n){let r=n;for(let n=1;n<Oi;n++)r-=e(r)/t(r);return r}var Ai=.001;function ji({duration:e=Ei.duration,bounce:t=Ei.bounce,velocity:n=Ei.velocity,mass:r=Ei.mass}){let i,a;kn(Ei.maxDuration);let o=1-t;o=vn(Ei.minDamping,Ei.maxDamping,o),e=vn(Ei.minDuration,Ei.maxDuration,An(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Di(t,o),c=Math.exp(-i);return Ai-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Di(t**2,o);return(-i(t)+Ai>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Ai+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=ki(i,a,s);if(e=kn(e),isNaN(c))return{stiffness:Ei.stiffness,damping:Ei.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Mi=[`duration`,`bounce`],Ni=[`stiffness`,`damping`,`mass`];function Pi(e,t){return t.some(t=>e[t]!==void 0)}function Fi(e){let t={velocity:Ei.velocity,stiffness:Ei.stiffness,damping:Ei.damping,mass:Ei.mass,isResolvedFromDuration:!1,...e};if(!Pi(e,Ni)&&Pi(e,Mi))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*vn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ei.mass,stiffness:i,damping:a}}else{let n=ji({...e,velocity:0});t={...t,...n,mass:Ei.mass},t.isResolvedFromDuration=!0}return t}function Ii(e=Ei.visualDuration,t=Ei.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Fi({...n,velocity:-An(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=An(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?Ei.restSpeed.granular:Ei.restSpeed.default,i||=v?Ei.restDelta.granular:Ei.restDelta.default;let y,b,x,S,C,w;if(h<1)x=Di(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>kn(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=kn(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=kn(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(wi(T),Ci),t=Si(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}Ii.applyToOptions=e=>{let t=Ti(e,100,Ii);return e.ease=t.ease,e.duration=kn(t.duration),e.type=`keyframes`,e};var Li=5;function Ri(e,t,n){let r=Math.max(t-Li,0);return jn(n-e(r),t-r)}function zi({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Ii({keyframes:[f.value,m(f.value)],velocity:Ri(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function Bi(e,t,n){let r=[],i=n||yn.mix||bi,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=En(Array.isArray(t)?t[n]||wn:t,a)),r.push(a)}return r}function Vi(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Bi(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=Dn(e[r],e[r+1],n);return s[r](i)};return n?t=>l(vn(e[0],e[a-1],t)):l}function Hi(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Dn(0,t,r);e.push(oi(n,1,i))}}function Ui(e){let t=[0];return Hi(t,e.length-1),t}function Wi(e,t){return e.map(e=>e*t)}function Gi(e,t){return e.map(()=>t||Jn).splice(0,e.length-1)}function Ki({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Yn(r)?r.map($n):$n(r),a={done:!1,value:t[0]},o=Vi(Wi(n&&n.length===t.length?n:Ui(t),e),t,{ease:Array.isArray(i)?i:Gi(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var nee=e=>e!==null;function qi(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(nee),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var ree={decay:zi,inertia:zi,tween:Ki,keyframes:Ki,spring:Ii};function Ji(e){typeof e.type==`string`&&(e.type=ree[e.type])}var Yi=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Xi=e=>e/100,Zi=class extends Yi{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==dr.now()&&this.tick(dr.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},fr.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Ji(e);let{type:t=Ki,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Ki;s!==Ki&&typeof o[0]!=`number`&&(this.mixKeyframes=En(Xi,bi(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=wi(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=vn(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==zi&&(b.value=qi(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return An(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+An(e)}get time(){return An(this.currentTime)}set time(e){e=kn(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Ri(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(dr.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=An(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=xi,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(dr.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,fr.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function Qi(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var $i=e=>e*180/Math.PI,ea=e=>na($i(Math.atan2(e[1],e[0]))),ta={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ea,rotateZ:ea,skewX:e=>$i(Math.atan(e[1])),skewY:e=>$i(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},na=e=>(e%=360,e<0&&(e+=360),e),ra=ea,ia=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),aa=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),oa={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ia,scaleY:aa,scale:e=>(ia(e)+aa(e))/2,rotateX:e=>na($i(Math.atan2(e[6],e[5]))),rotateY:e=>na($i(Math.atan2(-e[2],e[0]))),rotateZ:ra,rotate:ra,skewX:e=>$i(Math.atan(e[4])),skewY:e=>$i(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function sa(e){return e.includes(`scale`)?1:0}function ca(e,t){if(!e||e===`none`)return sa(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=oa,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ta,i=t}if(!i)return sa(t);let a=r[t],o=i[1].split(`,`).map(ua);return typeof a==`function`?a(o):o[a]}var la=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return ca(n,t)};function ua(e){return parseFloat(e.trim())}var da=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],fa=new Set(da),pa=e=>e===yr||e===j,ma=new Set([`x`,`y`,`z`]),ha=da.filter(e=>!ma.has(e));function ga(e){let t=[];return ha.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}var _a={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ca(t,`x`),y:(e,{transform:t})=>ca(t,`y`)};_a.translateX=_a.x,_a.translateY=_a.y;var va=new Set,ya=!1,ba=!1,xa=!1;function Sa(){if(ba){let e=Array.from(va).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=ga(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}ba=!1,ya=!1,va.forEach(e=>e.complete(xa)),va.clear()}function Ca(){va.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ba=!0)})}function wa(){xa=!0,Ca(),Sa(),xa=!1}var Ta=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(va.add(this),ya||(ya=!0,ar.read(Ca),ar.resolveKeyframes(Sa))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Qi(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),va.delete(this)}cancel(){this.state===`scheduled`&&(va.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Ea=e=>e.startsWith(`--`);function Da(e,t,n){Ea(t)?e.style.setProperty(t,n):e.style[t]=n}var Oa={};function ka(e,t){let n=Cn(e);return()=>Oa[t]??n()}var Aa=ka(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),ja=ka(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Ma=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Na={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Ma([0,.65,.55,1]),circOut:Ma([.55,0,1,.45]),backIn:Ma([.31,.01,.66,-.59]),backOut:Ma([.33,1.53,.69,.99])};function Pa(e,t){if(e)return typeof e==`function`?ja()?Si(e,t):`ease-out`:Xn(e)?Ma(e):Array.isArray(e)?e.map(e=>Pa(e,t)||Na.easeOut):Na[e]}function Fa(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Pa(s,i);Array.isArray(d)&&(u.easing=d),tr.value&&fr.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return tr.value&&p.finished.finally(()=>{fr.waapi--}),p}function Ia(e){return typeof e==`function`&&`applyToOptions`in e}function La({type:e,...t}){return Ia(e)&&ja()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Ra=class extends Yi{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=La(e);this.animation=Fa(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=qi(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Da(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return An(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+An(e)}get time(){return An(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=kn(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Aa()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),wn):r(this)}},za={anticipate:Hn,backInOut:Vn,circInOut:Gn};function Ba(e){return e in za}function Va(e){typeof e.ease==`string`&&Ba(e.ease)&&(e.ease=za[e.ease])}var Ha=10,Ua=class extends Ra{constructor(e){Va(e),Ji(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Zi({...a,autoplay:!1}),s=Math.max(Ha,dr.now()-this.startTime),c=vn(0,Ha,s-Ha),l=o.sample(s).value,{name:u}=this.options;i&&u&&Da(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Wa=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(ni.test(e)||e===`0`)&&!e.startsWith(`url(`));function Ga(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Ka(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Wa(i,t),s=Wa(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:Ga(e)||(n===`spring`||Ia(n))&&r}function qa(e){e.duration=0,e.type=`keyframes`}var Ja=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Ya=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Xa(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Ya.test(e[t]))return!0;return!1}var Za=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Qa=Cn(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function $a(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return Qa()&&n&&(Ja.has(n)||Za.has(n)&&Xa(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var eo=40,to=class extends Yi{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=dr.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||Ta)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=dr.now();let u=!0;Ka(e,i,a,o)||(u=!1,(yn.instantAnimations||!s)&&l?.(qi(e,n,t)),e[0]=e[e.length-1],qa(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>eo?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&$a(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new Ua({...d,element:p})}catch{m=new Zi(d)}else m=new Zi(d);m.finished.then(()=>{this.notifyFinished()}).catch(wn),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),wa()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function no(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var ro=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function io(e){let t=ro.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function ao(e,t,n=1){`${e}`;let[r,i]=io(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return bn(e)?parseFloat(e):e}return gr(i)?ao(i,t,n+1):i}var oo={type:`spring`,stiffness:500,damping:25,restSpeed:10},so=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),co={type:`keyframes`,duration:.8},lo={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},uo=(e,{keyframes:t})=>t.length>2?co:fa.has(e)?e.startsWith(`scale`)?so(t[1]):oo:lo;function fo(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function po(e,t){let n=e?.[t]??e?.default??e;return n===e?n:fo(n,e)}var iee=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function aee(e){for(let t in e)if(!iee.has(t))return!0;return!1}var mo=(e,t,n,r={},i,a)=>o=>{let s=po(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=kn(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};aee(s)||Object.assign(u,uo(e,u)),u.duration&&=kn(u.duration),u.repeatDelay&&=kn(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(qa(u),u.delay===0&&(d=!0)),(yn.instantAnimations||yn.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,qa(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=qi(u.keyframes,s);if(e!==void 0){ar.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Zi(u):new to(u)};function ho(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function go(e,t,n,r){if(typeof t==`function`){let[i,a]=ho(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=ho(r);t=t(n===void 0?e.custom:n,i,a)}return t}function _o(e,t,n){let r=e.getProps();return go(r,t,n===void 0?r.custom:n,e)}var vo=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...da]),yo=30,bo=e=>!isNaN(parseFloat(e)),xo={current:void 0},So=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=dr.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=dr.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=bo(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new On);let n=this.events[e].add(t);return e===`change`?()=>{n(),ar.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return xo.current&&xo.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=dr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>yo)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,yo);return jn(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Co(e,t){return new So(e,t)}var wo=e=>Array.isArray(e);function To(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Co(n))}function Eo(e){return wo(e)?e[e.length-1]||0:e}function Do(e,t){let{transitionEnd:n={},transition:r={},...i}=_o(e,t)||{};i={...i,...n};for(let t in i)To(e,t,Eo(i[t]))}var Oo=e=>!!(e&&e.getVelocity);function ko(e){return!!(Oo(e)&&e.add)}function Ao(e,t){let n=e.getValue(`willChange`);if(ko(n))return n.add(t);if(!n&&yn.WillChange){let n=new yn.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function jo(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Mo=`data-`+jo(`framerAppearId`);function No(e){return e.props[Mo]}function Po({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Fo(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?fo(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&Po(d,t))continue;let o={delay:n,...po(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){ar.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=No(e);if(n){let e=window.MotionHandoffAnimation(n,t,ar);e!==null&&(o.startTime=e,f=!0)}}Ao(e,t);let p=l??e.shouldReduceMotion;r.start(mo(t,r,i,p&&vo.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>ar.update(()=>{o&&Do(e,o)});u.length?Promise.all(u).then(t):t()}return u}function Io(e,t,n={}){let r=_o(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Fo(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Lo(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Lo(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Io(c,t,{...o,delay:n+(typeof r==`function`?0:r)+no(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Ro(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Io(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Io(e,t,n);else{let i=typeof t==`function`?_o(e,t,n.custom):t;r=Promise.all(Fo(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var zo={test:e=>e===`auto`,parse:e=>e},Bo=e=>t=>t.test(e),Vo=[yr,j,Fr,Pr,Lr,Ir,zo],Ho=e=>Vo.find(Bo(e));function Uo(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||Sn(e)}var Wo=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Go(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Cr)||[];if(!r)return e;let i=n.replace(r,``),a=Wo.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}var Ko=/\b([a-z-]*)\(.*?\)/gu,qo={...ni,getAnimatableNone:e=>{let t=e.match(Ko);return t?t.map(Go).join(` `):e}},Jo={...ni,getAnimatableNone:e=>{let t=ni.parse(e);return ni.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Yo={...yr,transform:Math.round},Xo={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,top:j,right:j,bottom:j,left:j,inset:j,insetBlock:j,insetBlockStart:j,insetBlockEnd:j,insetInline:j,insetInlineStart:j,insetInlineEnd:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,paddingBlock:j,paddingBlockStart:j,paddingBlockEnd:j,paddingInline:j,paddingInlineStart:j,paddingInlineEnd:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,marginBlock:j,marginBlockStart:j,marginBlockEnd:j,marginInline:j,marginInlineStart:j,marginInlineEnd:j,fontSize:j,backgroundPositionX:j,backgroundPositionY:j,rotate:Pr,rotateX:Pr,rotateY:Pr,rotateZ:Pr,scale:xr,scaleX:xr,scaleY:xr,scaleZ:xr,skew:Pr,skewX:Pr,skewY:Pr,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:br,originX:Rr,originY:Rr,originZ:j,zIndex:Yo,fillOpacity:br,strokeOpacity:br,numOctaves:Yo},Zo={...Xo,color:Br,backgroundColor:Br,outlineColor:Br,fill:Br,stroke:Br,borderColor:Br,borderTopColor:Br,borderRightColor:Br,borderBottomColor:Br,borderLeftColor:Br,filter:qo,WebkitFilter:qo,mask:Jo,WebkitMask:Jo},Qo=e=>Zo[e],$o=new Set([qo,Jo]);function es(e,t){let n=Qo(e);return $o.has(n)||(n=ni),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var ts=new Set([`auto`,`none`,`0`]);function ns(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!ts.has(t)&&Yr(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=es(n,i)}var rs=class extends Ta{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),gr(r))){let i=ao(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!vo.has(n)||e.length!==2)return;let[r,i]=e,a=Ho(r),o=Ho(i);if(vr(r)!==vr(i)&&_a[n]){this.needsMeasurement=!0;return}if(a!==o)if(pa(a)&&pa(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else _a[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Uo(e[t]))&&n.push(t);n.length&&ns(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=_a[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=_a[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function is(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var as=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function os(e){return xn(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:ss,cancel:oee}=ir(queueMicrotask,!1),cs={x:!1,y:!1};function ls(){return cs.x||cs.y}function us(e){return e===`x`||e===`y`?cs[e]?null:(cs[e]=!0,()=>{cs[e]=!1}):cs.x||cs.y?null:(cs.x=cs.y=!0,()=>{cs.x=cs.y=!1})}function ds(e,t){let n=is(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function fs(e){return!(e.pointerType===`touch`||ls())}function ps(e,t,n={}){let[r,i,a]=ds(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!fs(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var ms=(e,t)=>t?e===t?!0:ms(e,t.parentElement):!1,hs=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,gs=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function _s(e){return gs.has(e.tagName)||e.isContentEditable===!0}var vs=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function ys(e){return vs.has(e.tagName)||e.isContentEditable===!0}var bs=new WeakSet;function xs(e){return t=>{t.key===`Enter`&&e(t)}}function Ss(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Cs=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=xs(()=>{if(bs.has(n))return;Ss(n,`down`);let e=xs(()=>{Ss(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Ss(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function ws(e){return hs(e)&&!ls()}var Ts=new WeakSet;function Es(e,t,n={}){let[r,i,a]=ds(e,n),o=e=>{let r=e.currentTarget;if(!ws(e)||Ts.has(e))return;bs.add(r),n.stopPropagation&&Ts.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),bs.has(r)&&bs.delete(r),ws(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||ms(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),os(e)&&(e.addEventListener(`focus`,e=>Cs(e,i)),!_s(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Ds(e){return xn(e)&&`ownerSVGElement`in e}var Os=new WeakMap,ks,As=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Ds(r)&&`getBBox`in r?r.getBBox()[t]:r[n],js=As(`inline`,`width`,`offsetWidth`),Ms=As(`block`,`height`,`offsetHeight`);function Ns({target:e,borderBoxSize:t}){Os.get(e)?.forEach(n=>{n(e,{get width(){return js(e,t)},get height(){return Ms(e,t)}})})}function Ps(e){e.forEach(Ns)}function Fs(){typeof ResizeObserver>`u`||(ks=new ResizeObserver(Ps))}function Is(e,t){ks||Fs();let n=is(e);return n.forEach(e=>{let n=Os.get(e);n||(n=new Set,Os.set(e,n)),n.add(t),ks?.observe(e)}),()=>{n.forEach(e=>{let n=Os.get(e);n?.delete(t),n?.size||ks?.unobserve(e)})}}var Ls=new Set,Rs;function zs(){Rs=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ls.forEach(t=>t(e))},window.addEventListener(`resize`,Rs)}function Bs(e){return Ls.add(e),Rs||zs(),()=>{Ls.delete(e),!Ls.size&&typeof Rs==`function`&&(window.removeEventListener(`resize`,Rs),Rs=void 0)}}function Vs(e,t){return typeof e==`function`?Bs(e):Is(e,t)}function Hs(e){return Ds(e)&&e.tagName===`svg`}var Us=[...Vo,Br,ni],Ws=e=>Us.find(Bo(e)),Gs=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ks=()=>({x:Gs(),y:Gs()}),qs=()=>({min:0,max:0}),Js=()=>({x:qs(),y:qs()}),Ys=new WeakMap;function Xs(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Zs(e){return typeof e==`string`||Array.isArray(e)}var Qs=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],$s=[`initial`,...Qs];function ec(e){return Xs(e.animate)||$s.some(t=>Zs(e[t]))}function tc(e){return!!(ec(e)||e.variants)}function nc(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Oo(i))e.addValue(r,i);else if(Oo(a))e.addValue(r,Co(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Co(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var rc={current:null},ic={current:!1},ac=typeof window<`u`;function oc(){if(ic.current=!0,ac)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>rc.current=e.matches;e.addEventListener(`change`,t),t()}else rc.current=!1}var sc=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],cc={};function lc(e){cc=e}function uc(){return cc}var dc=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Ta,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=dr.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ar.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=ec(t),this.isVariantNode=tc(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Oo(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,Ys.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(ic.current||oc(),this.shouldReduceMotion=rc.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),or(this.notifyUpdate),or(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Ja.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Ra({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:kn(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=fa.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&ar.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in cc){let t=cc[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Js()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<sc.length;t++){let n=sc[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=nc(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Co(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(bn(n)||Sn(n))?n=parseFloat(n):!Ws(n)&&ni.test(t)&&(n=es(e,t)),this.setBaseTarget(e,Oo(n)?n.get():n)),Oo(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=go(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!Oo(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new On),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){ss.render(this.render)}},fc=class extends dc{constructor(){super(...arguments),this.KeyframeResolver=rs}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Oo(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},pc=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function mc({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hc({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function gc(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function _c(e){return e===void 0||e===1}function vc({scale:e,scaleX:t,scaleY:n}){return!_c(e)||!_c(t)||!_c(n)}function yc(e){return vc(e)||bc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function bc(e){return xc(e.x)||xc(e.y)}function xc(e){return e&&e!==`0%`}function Sc(e,t,n){return n+t*(e-n)}function Cc(e,t,n,r,i){return i!==void 0&&(e=Sc(e,i,r)),Sc(e,n,r)+t}function wc(e,t=0,n=1,r,i){e.min=Cc(e.min,t,n,r,i),e.max=Cc(e.max,t,n,r,i)}function Tc(e,{x:t,y:n}){wc(e.x,t.translate,t.scale,t.originPoint),wc(e.y,n.translate,n.scale,n.originPoint)}var Ec=.999999999999,Dc=1.0000000000001;function Oc(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(kc(e.x,-a.scroll.offset.x),kc(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Tc(e,o)),r&&yc(a.latestValues)&&Mc(e,a.latestValues,a.layout?.layoutBox))}t.x<Dc&&t.x>Ec&&(t.x=1),t.y<Dc&&t.y>Ec&&(t.y=1)}function kc(e,t){e.min+=t,e.max+=t}function Ac(e,t,n,r,i=.5){wc(e,t,n,oi(e.min,e.max,i),r)}function jc(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Mc(e,t,n){let r=n??e;Ac(e.x,jc(t.x,r.x),t.scaleX,t.scale,t.originX),Ac(e.y,jc(t.y,r.y),t.scaleY,t.scale,t.originY)}function Nc(e,t){return mc(gc(e.getBoundingClientRect(),t))}function Pc(e,t,n){let r=Nc(e,n),{scroll:i}=t;return i&&(kc(r.x,i.offset.x),kc(r.y,i.offset.y)),r}var Fc={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Ic=da.length;function Lc(e,t,n){let r=``,i=!0;for(let a=0;a<Ic;a++){let o=da[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===(o.startsWith(`scale`)?1:0);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=as(s,Xo[o]);if(!c){i=!1;let t=Fc[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Rc(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(fa.has(e)){o=!0;continue}else if(mr(e)){i[e]=n;continue}else{let t=as(n,Xo[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Lc(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function zc(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Bc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Vc={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(j.test(e))e=parseFloat(e);else return e;return`${Bc(e,t.target.x)}% ${Bc(e,t.target.y)}%`}},Hc={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=ni.parse(e);if(i.length>5)return r;let a=ni.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=oi(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Uc={borderRadius:{...Vc,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Vc,borderTopRightRadius:Vc,borderBottomLeftRadius:Vc,borderBottomRightRadius:Vc,boxShadow:Hc};function Wc(e,{layout:t,layoutId:n}){return fa.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Uc[e]||e===`opacity`)}function Gc(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Oo(r[t])||i&&Oo(i[t])||Wc(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Kc(e){return window.getComputedStyle(e)}var qc=class extends fc{constructor(){super(...arguments),this.type=`html`,this.renderInstance=zc}readValueFromInstance(e,t){if(fa.has(t))return this.projection?.isProjecting?sa(t):la(e,t);{let n=Kc(e),r=(mr(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Nc(e,t)}build(e,t,n){Rc(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Gc(e,t,n)}},Jc={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Yc={offset:`strokeDashoffset`,array:`strokeDasharray`};function Xc(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Jc:Yc;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Zc=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Qc(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Rc(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of Zc)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Xc(d,i,a,o,!1)}var $c=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),el=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function tl(e,t,n,r){zc(e,t,void 0,r);for(let n in t.attrs)e.setAttribute($c.has(n)?n:jo(n),t.attrs[n])}function nl(e,t,n){let r=Gc(e,t,n);for(let n in e)if(Oo(e[n])||Oo(t[n])){let t=da.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var rl=class extends fc{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Js}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(fa.has(t)){let e=Qo(t);return e&&e.default||0}return t=$c.has(t)?t:jo(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return nl(e,t,n)}build(e,t,n){Qc(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){tl(e,t,n,r)}mount(e){this.isSVGTag=el(e.tagName),super.mount(e)}},il=$s.length;function al(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&al(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<il;n++){let r=$s[n],i=e.props[r];(Zs(i)||i===!1)&&(t[r]=i)}return t}function ol(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var sl=[...Qs].reverse(),cl=Qs.length;function ll(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Ro(e,t,n)))}function ul(e){let t=ll(e),n=pl(),r=!0,i=!1,a=t=>(n,r)=>{let i=_o(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=al(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<cl;t++){let p=sl[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=Zs(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||Xs(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=dl(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=wo(t)&&wo(n)?!ol(t,n):t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let ee=v&&y;b&&(!ee||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!ee&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=_o(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=no(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=_o(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=pl(),i=!0}}}function dl(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!ol(t,e):!1}function fl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pl(){return{animate:fl(!0),whileInView:fl(),whileHover:fl(),whileTap:fl(),whileDrag:fl(),whileFocus:fl(),exit:fl()}}function ml(e,t){e.min=t.min,e.max=t.max}function hl(e,t){ml(e.x,t.x),ml(e.y,t.y)}function gl(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var _l=1e-4,vl=1-_l,yl=1+_l,bl=.01,xl=0-bl,Sl=0+bl;function Cl(e){return e.max-e.min}function wl(e,t,n){return Math.abs(e-t)<=n}function Tl(e,t,n,r=.5){e.origin=r,e.originPoint=oi(t.min,t.max,e.origin),e.scale=Cl(n)/Cl(t),e.translate=oi(n.min,n.max,e.origin)-e.originPoint,(e.scale>=vl&&e.scale<=yl||isNaN(e.scale))&&(e.scale=1),(e.translate>=xl&&e.translate<=Sl||isNaN(e.translate))&&(e.translate=0)}function El(e,t,n,r){Tl(e.x,t.x,n.x,r?r.originX:void 0),Tl(e.y,t.y,n.y,r?r.originY:void 0)}function Dl(e,t,n,r=0){e.min=(r?oi(n.min,n.max,r):n.min)+t.min,e.max=e.min+Cl(t)}function Ol(e,t,n,r){Dl(e.x,t.x,n.x,r?.x),Dl(e.y,t.y,n.y,r?.y)}function kl(e,t,n,r=0){let i=r?oi(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Cl(t)}function Al(e,t,n,r){kl(e.x,t.x,n.x,r?.x),kl(e.y,t.y,n.y,r?.y)}function jl(e,t,n,r,i){return e-=t,e=Sc(e,1/n,r),i!==void 0&&(e=Sc(e,1/i,r)),e}function Ml(e,t=0,n=1,r=.5,i,a=e,o=e){if(Fr.test(t)&&(t=parseFloat(t),t=oi(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=oi(a.min,a.max,r);e===a&&(s-=t),e.min=jl(e.min,t,n,s,i),e.max=jl(e.max,t,n,s,i)}function Nl(e,t,[n,r,i],a,o){Ml(e,t[n],t[r],t[i],t.scale,a,o)}var see=[`x`,`scaleX`,`originX`],cee=[`y`,`scaleY`,`originY`];function Pl(e,t,n,r){Nl(e.x,t,see,n?n.x:void 0,r?r.x:void 0),Nl(e.y,t,cee,n?n.y:void 0,r?r.y:void 0)}function Fl(e){return e.translate===0&&e.scale===1}function Il(e){return Fl(e.x)&&Fl(e.y)}function Ll(e,t){return e.min===t.min&&e.max===t.max}function Rl(e,t){return Ll(e.x,t.x)&&Ll(e.y,t.y)}function zl(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Bl(e,t){return zl(e.x,t.x)&&zl(e.y,t.y)}function Vl(e){return Cl(e.x)/Cl(e.y)}function Hl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ul(e){return[e(`x`),e(`y`)]}function Wl(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Gl=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],Kl=Gl.length,ql=e=>typeof e==`string`?parseFloat(e):e,Jl=e=>typeof e==`number`||j.test(e);function Yl(e,t,n,r,i,a){i?(e.opacity=oi(0,n.opacity??1,Zl(r)),e.opacityExit=oi(t.opacity??1,0,Ql(r))):a&&(e.opacity=oi(t.opacity??1,n.opacity??1,r));for(let i=0;i<Kl;i++){let a=Gl[i],o=Xl(t,a),s=Xl(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||Jl(o)===Jl(s)?(e[a]=Math.max(oi(ql(o),ql(s),r),0),(Fr.test(s)||Fr.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=oi(t.rotate||0,n.rotate||0,r))}function Xl(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Zl=$l(0,.5,Wn),Ql=$l(.5,.95,wn);function $l(e,t,n){return r=>r<e?0:r>t?1:n(Dn(e,t,r))}function eu(e,t,n){let r=Oo(e)?e:Co(e);return r.start(mo(``,r,t,n)),r.animation}function tu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var nu=(e,t)=>e.depth-t.depth,ru=class{constructor(){this.children=[],this.isDirty=!1}add(e){gn(this.children,e),this.isDirty=!0}remove(e){_n(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(nu),this.isDirty=!1,this.children.forEach(e)}};function iu(e,t){let n=dr.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(or(r),e(a-t))};return ar.setup(r,!0),()=>or(r)}function au(e){return Oo(e)?e.get():e}var ou=class{constructor(){this.members=[]}add(e){gn(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(_n(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(_n(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},su={hasAnimatedSinceResize:!0,hasEverUpdated:!1},cu={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},lu=[``,`X`,`Y`,`Z`],uu=1e3,du=0;function fu(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function pu(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=No(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,ar,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&pu(r)}function mu({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=du++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,tr.value&&(cu.nodes=cu.calculatedTargetDeltas=cu.calculatedProjections=0),this.nodes.forEach(_u),this.nodes.forEach(Eu),this.nodes.forEach(Du),this.nodes.forEach(vu),tr.addProjectionMetrics&&tr.addProjectionMetrics(cu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new ru)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new On),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Ds(t)&&!Hs(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;ar.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=iu(i,250),su.hasAnimatedSinceResize&&(su.hasAnimatedSinceResize=!1,this.nodes.forEach(Tu)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Pu,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Bl(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...po(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Tu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),or(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ou),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&pu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(xu),this.nodes.forEach(bu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Su);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Cu),this.nodes.forEach(wu),this.nodes.forEach(hu),this.nodes.forEach(gu)):this.nodes.forEach(Su),this.clearAllSnapshots();let e=dr.now();sr.delta=vn(0,1e3/60,e-sr.timestamp),sr.timestamp=e,sr.isProcessing=!0,cr.update.process(sr),cr.preRender.process(sr),cr.render.process(sr),sr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ss.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yu),this.sharedNodes.forEach(ku)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ar.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ar.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Cl(this.snapshot.measuredBox.x)&&!Cl(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=Js(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Il(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||yc(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Ru(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Js();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Bu))){let{scroll:e}=this.root;e&&(kc(t.x,e.offset.x),kc(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Js();if(hl(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&hl(t,e),kc(t.x,i.offset.x),kc(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Js();hl(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(kc(r.x,-n.scroll.offset.x),kc(r.y,-n.scroll.offset.y)),yc(n.latestValues)&&Mc(r,n.latestValues,n.layout?.layoutBox)}return yc(this.latestValues)&&Mc(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Js();hl(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!yc(n.latestValues))continue;let r;n.instance&&(vc(n.latestValues)&&n.updateSnapshot(),r=Js(),hl(r,n.measurePageBox())),Pl(t,n.latestValues,n.snapshot?.layoutBox,r)}return yc(this.latestValues)&&Pl(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==sr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=sr.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Js(),this.targetWithTransforms=Js()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ol(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):hl(this.target,this.layout.layoutBox),Tc(this.target,this.targetDelta)):hl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),tr.value&&cu.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||vc(this.parent.latestValues)||bc(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Js(),this.relativeTargetOrigin=Js(),Al(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),hl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===sr.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;hl(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Oc(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Js());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(gl(this.prevProjectionDelta.x,this.projectionDelta.x),gl(this.prevProjectionDelta.y,this.projectionDelta.y)),El(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Hl(this.projectionDelta.x,this.prevProjectionDelta.x)||!Hl(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),tr.value&&cu.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ks(),this.projectionDelta=Ks(),this.projectionDeltaWithTransform=Ks()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=Ks();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Js(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(Nu));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;Au(a.x,e.x,n),Au(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Al(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Mu(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Rl(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Js(),hl(d,this.relativeTarget)),s&&(this.animationValues=i,Yl(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(or(this.pendingAnimation),void 0),this.pendingAnimation=ar.update(()=>{su.hasAnimatedSinceResize=!0,fr.layout++,this.motionValue||=Co(0),this.motionValue.jump(0,!1),this.currentAnimation=eu(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{fr.layout--},onComplete:()=>{fr.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(uu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&zu(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Js();let t=Cl(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Cl(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}hl(t,n),Mc(t,i),El(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ou),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&fu(`z`,e,r,this.animationValues);for(let t=0;t<lu.length;t++)fu(`rotate${lu[t]}`,e,r,this.animationValues),fu(`skew${lu[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=au(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=au(t?.pointerEvents)||``),this.hasProjected&&!yc(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Wl(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Uc){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Uc[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?au(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(bu),this.root.sharedNodes.clear()}}}function hu(e){e.updateLayout()}function gu(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Ul(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Cl(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;ml(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else zu(i,t.layoutBox,n)&&Ul(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Cl(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Ks();El(o,n,t.layoutBox);let s=Ks();a?El(s,e.applyTransform(r,!0),t.measuredBox):El(s,n,t.layoutBox);let c=!Il(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Js();Al(s,t.layoutBox,i.layoutBox,o);let c=Js();Al(c,n,a.layoutBox,o),Bl(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function _u(e){tr.value&&cu.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function vu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yu(e){e.clearSnapshot()}function bu(e){e.clearMeasurements()}function xu(e){e.isLayoutDirty=!0,e.updateLayout()}function Su(e){e.isLayoutDirty=!1}function Cu(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function wu(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Tu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Eu(e){e.resolveTargetDelta()}function Du(e){e.calcProjection()}function Ou(e){e.resetSkewAndRotation()}function ku(e){e.removeLeadSnapshot()}function Au(e,t,n){e.translate=oi(t.translate,0,n),e.scale=oi(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ju(e,t,n,r){e.min=oi(t.min,n.min,r),e.max=oi(t.max,n.max,r)}function Mu(e,t,n,r){ju(e.x,t.x,n.x,r),ju(e.y,t.y,n.y,r)}function Nu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Pu={duration:.45,ease:[.4,0,.1,1]},Fu=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Iu=Fu(`applewebkit/`)&&!Fu(`chrome/`)?Math.round:wn;function Lu(e){e.min=Iu(e.min),e.max=Iu(e.max)}function Ru(e){Lu(e.x),Lu(e.y)}function zu(e,t,n){return e===`position`||e===`preserve-aspect`&&!wl(Vl(t),Vl(n),.2)}function Bu(e){return e!==e.root&&e.scroll?.wasRoot}var Vu=mu({attachResizeListener:(e,t)=>tu(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Hu={current:void 0},Uu=mu({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Hu.current){let e=new Vu({});e.mount(window),e.setOptions({layoutScroll:!0}),Hu.current=e}return Hu.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Wu=(0,k.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Gu(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Ku(...e){return t=>{let n=!1,r=e.map(e=>{let r=Gu(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Gu(e[t],null)}}}}function qu(...e){return k.useCallback(Ku(...e),e)}var Ju=class extends k.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(os(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=os(e)&&e.offsetWidth||0,r=os(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}};function Yu({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,k.useId)(),s=(0,k.useRef)(null),c=(0,k.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=(0,k.useContext)(Wu),u=qu(s,e.props?.ref??e?.ref);return(0,k.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m}=c.current;if(t||a===!1||!s.current||!e||!u)return;let h=n===`left`?`left: ${f}`:`right: ${p}`,g=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let _=document.createElement(`style`);l&&(_.nonce=l);let v=i??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(`
|
|
3
|
+
[data-motion-pop-id="${o}"] {
|
|
4
|
+
position: absolute !important;
|
|
5
|
+
width: ${e}px !important;
|
|
6
|
+
height: ${u}px !important;
|
|
7
|
+
${h}px !important;
|
|
8
|
+
${g}px !important;
|
|
9
|
+
}
|
|
10
|
+
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[t]),(0,A.jsx)(Ju,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:k.cloneElement(e,{ref:u})})}var Xu=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=pn(Zu),d=(0,k.useId)(),f=!0,p=(0,k.useMemo)(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return a&&f&&(p={...p}),(0,k.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),k.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,A.jsx)(Yu,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,A.jsx)(hn.Provider,{value:p,children:e})};function Zu(){return new Map}function Qu(e=!0){let t=(0,k.useContext)(hn);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,k.useId)();(0,k.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,k.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var $u=e=>e.key||``;function ed(e){let t=[];return k.Children.forEach(e,e=>{(0,k.isValidElement)(e)&&t.push(e)}),t}var td=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=Qu(o),f=(0,k.useMemo)(()=>ed(e),[e]),p=o&&!u?[]:f.map($u),m=(0,k.useRef)(!0),h=(0,k.useRef)(f),g=pn(()=>new Map),_=(0,k.useRef)(new Set),[v,y]=(0,k.useState)(f),[b,x]=(0,k.useState)(f);mn(()=>{m.current=!1,h.current=f;for(let e=0;e<b.length;e++){let t=$u(b[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[b,p.length,p.join(`-`)]);let S=[];if(f!==v){let e=[...f];for(let t=0;t<b.length;t++){let n=b[t],r=$u(n);p.includes(r)||(e.splice(t,0,n),S.push(n))}return a===`wait`&&S.length&&(e=S),x(ed(e)),y(f),null}let{forceRender:C}=(0,k.useContext)(fn);return(0,A.jsx)(A.Fragment,{children:b.map(e=>{let v=$u(e),y=o&&!u?!1:f===b||p.includes(v);return(0,A.jsx)(Xu,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(C?.(),x(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},nd=(0,k.createContext)({strict:!1}),rd={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},id=!1;function ad(){if(id)return;let e={};for(let t in rd)e[t]={isEnabled:e=>rd[t].some(t=>!!e[t])};lc(e),id=!0}function od(){return ad(),uc()}function sd(e){let t=od();for(let n in e)t[n]={...t[n],...e[n]};lc(t)}var cd=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function ld(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||cd.has(e)}var ud=i({default:()=>fd}),dd,fd,pd=e((()=>{dn(),dd=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,fd=un(function(e){return dd.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})})),md=e=>!ld(e);function hd(e){typeof e==`function`&&(md=t=>t.startsWith(`on`)?!ld(t):e(t))}try{hd((pd(),o(ud)).default)}catch{}function gd(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||Oo(e[i])||(md(i)||n===!0&&ld(i)||!t&&!ld(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var _d=(0,k.createContext)({});function vd(e,t){if(ec(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Zs(t)?t:void 0,animate:Zs(n)?n:void 0}}return e.inherit===!1?{}:t}function yd(e){let{initial:t,animate:n}=vd(e,(0,k.useContext)(_d));return(0,k.useMemo)(()=>({initial:t,animate:n}),[bd(t),bd(n)])}function bd(e){return Array.isArray(e)?e.join(` `):e}var xd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Sd(e,t,n){for(let r in t)!Oo(t[r])&&!Wc(r,n)&&(e[r]=t[r])}function Cd({transformTemplate:e},t){return(0,k.useMemo)(()=>{let n=xd();return Rc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function wd(e,t){let n=e.style||{},r={};return Sd(r,n,e),Object.assign(r,Cd(e,t)),r}function Td(e,t){let n={},r=wd(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Ed=()=>({...xd(),attrs:{}});function Dd(e,t,n,r){let i=(0,k.useMemo)(()=>{let n=Ed();return Qc(n,t,el(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Sd(t,e.style,e),i.style={...t,...i.style}}return i}var Od=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function kd(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Od.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ad(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??kd(e)?Dd:Td)(t,r,i,e),c=gd(t,typeof e==`string`,a),l=e===k.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,k.useMemo)(()=>Oo(u)?u.get():u,[u]);return(0,k.createElement)(e,{...l,children:d})}function jd({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Md(n,r,i,e),renderState:t()}}function Md(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=au(a[e]);let{initial:o,animate:s}=e,c=ec(e),l=tc(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Xs(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=go(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Nd=e=>(t,n)=>{let r=(0,k.useContext)(_d),i=(0,k.useContext)(hn),a=()=>jd(e,t,r,i);return n?a():pn(a)},Pd=Nd({scrapeMotionValuesFromProps:Gc,createRenderState:xd}),Fd=Nd({scrapeMotionValuesFromProps:nl,createRenderState:Ed}),Id=Symbol.for(`motionComponentSymbol`);function Ld(e,t,n){let r=(0,k.useRef)(n);(0,k.useInsertionEffect)(()=>{r.current=n});let i=(0,k.useRef)(null);return(0,k.useCallback)(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}var Rd=(0,k.createContext)({});function zd(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Bd(e,t,n,r,i,a){let{visualElement:o}=(0,k.useContext)(_d),s=(0,k.useContext)(nd),c=(0,k.useContext)(hn),l=(0,k.useContext)(Wu),u=l.reducedMotion,d=l.skipAnimations,f=(0,k.useRef)(null),p=(0,k.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,k.useContext)(Rd);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Vd(f.current,n,i,h);let g=(0,k.useRef)(!1);(0,k.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[Mo],v=(0,k.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return mn(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,k.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function Vd(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Hd(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&zd(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Hd(e){if(e)return e.options.allowProjection===!1?Hd(e.parent):e.projection}function Ud(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&sd(r);let a=n?n===`svg`:kd(e),o=a?Fd:Pd;function s(n,s){let c,l={...(0,k.useContext)(Wu),...n,layoutId:Wd(n)},{isStatic:u}=l,d=yd(n),f=o(n,u);if(!u&&typeof window<`u`){Gd(l,r);let t=Kd(l);c=t.MeasureLayout,d.visualElement=Bd(e,f,l,i,t.ProjectionNode,a)}return(0,A.jsxs)(_d.Provider,{value:d,children:[c&&d.visualElement?(0,A.jsx)(c,{visualElement:d.visualElement,...l}):null,Ad(e,n,Ld(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,k.forwardRef)(s);return c[Id]=e,c}function Wd({layoutId:e}){let t=(0,k.useContext)(fn).id;return t&&e!==void 0?t+`-`+e:e}function Gd(e,t){(0,k.useContext)(nd).strict}function Kd(e){let{drag:t,layout:n}=od();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function qd(e,t){if(typeof Proxy>`u`)return Ud;let n=new Map,r=(n,r)=>Ud(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Ud(a,void 0,e,t)),n.get(a))})}var Jd=(e,t)=>t.isSVG??kd(e)?new rl(t):new qc(t,{allowProjection:e!==k.Fragment}),Yd=class extends pc{constructor(e){super(e),e.animationState||=ul(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Xs(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Xd=0,Zd={animation:{Feature:Yd},exit:{Feature:class extends pc{constructor(){super(...arguments),this.id=Xd++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=_o(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Qd(e){return{point:{x:e.pageX,y:e.pageY}}}var $d=e=>t=>hs(t)&&e(t,Qd(t));function ef(e,t,n,r){return tu(e,t,$d(n),r)}var tf=({current:e})=>e?e.ownerDocument.defaultView:null,nf=(e,t)=>Math.abs(e-t);function rf(e,t){let n=nf(e.x,t.x),r=nf(e.y,t.y);return Math.sqrt(n**2+r**2)}var af=new Set([`auto`,`scroll`]),of=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=sf(this.lastRawMoveEventInfo,this.transformPagePoint));let e=lf(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=rf(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=sr;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=sf(t,this.transformPagePoint),ar.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=lf(e.type===`pointercancel`?this.lastMoveEventInfo:sf(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!hs(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=sf(Qd(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=sr;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,lf(s,this.history)),this.removeListeners=En(ef(this.contextWindow,`pointermove`,this.handlePointerMove),ef(this.contextWindow,`pointerup`,this.handlePointerUp),ef(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(af.has(e.overflowX)||af.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),ar.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),or(this.updatePoint)}};function sf(e,t){return t?{point:t(e.point)}:e}function cf(e,t){return{x:e.x-t.x,y:e.y-t.y}}function lf({point:e},t){return{point:e,delta:cf(e,df(t)),offset:cf(e,uf(t)),velocity:ff(t,.1)}}function uf(e){return e[0]}function df(e){return e[e.length-1]}function ff(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=df(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>kn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>kn(t)*2&&(r=e[1]);let a=An(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function pf(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?oi(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?oi(n,e,r.max):Math.min(e,n)),e}function mf(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function hf(e,{top:t,left:n,bottom:r,right:i}){return{x:mf(e.x,n,i),y:mf(e.y,t,r)}}function gf(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function _f(e,t){return{x:gf(e.x,t.x),y:gf(e.y,t.y)}}function vf(e,t){let n=.5,r=Cl(e),i=Cl(t);return i>r?n=Dn(t.min,t.max-r,e.min):r>i&&(n=Dn(e.min,e.max-i,t.min)),vn(0,1,n)}function yf(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var bf=.35;function xf(e=bf){return e===!1?e=0:e===!0&&(e=bf),{x:Sf(e,`left`,`right`),y:Sf(e,`top`,`bottom`)}}function Sf(e,t,n){return{min:Cf(e,t),max:Cf(e,n)}}function Cf(e,t){return typeof e==`number`?e:e[t]||0}var wf=new WeakMap,Tf=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Js(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(Qd(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=us(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ul(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Fr.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Cl(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&ar.update(()=>i(e,t),!1,!0),Ao(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=kf(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&ar.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new of(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:tf(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&ar.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Of(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=pf(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&zd(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=hf(n.layoutBox,e):this.constraints=!1,this.elastic=xf(t),r!==this.constraints&&!zd(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Ul(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=yf(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!zd(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Pc(n,r.root,this.visualElement.getTransformPagePoint()),a=_f(r.layout.layoutBox,i);if(t){let e=t(hc(a));this.hasMutatedConstraints=!!e,e&&(a=mc(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Ul(o=>{if(!Of(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Ao(this.visualElement,e),n.start(mo(e,n,0,t,this.visualElement,!1))}stopAnimation(){Ul(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Ul(t=>{let{drag:n}=this.getProps();if(!Of(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-oi(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!zd(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Ul(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=vf({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ul(t=>{if(!Of(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(oi(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;wf.set(this.visualElement,this);let e=this.visualElement.current,t=ef(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&ys(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();zd(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Df(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ar.read(r);let o=tu(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Ul(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=bf,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Ef(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Df(e,t,n){let r=Vs(e,Ef(n)),i=Vs(t,Ef(n));return()=>{r(),i()}}function Of(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function kf(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Af=class extends pc{constructor(e){super(e),this.removeGroupControls=wn,this.removeListeners=wn,this.controls=new Tf(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||wn}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},jf=e=>(t,n)=>{e&&ar.update(()=>e(t,n),!1,!0)},Mf=class extends pc{constructor(){super(...arguments),this.removePointerDownListener=wn}onPointerDown(e){this.session=new of(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:tf(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:jf(e),onStart:jf(t),onMove:jf(n),onEnd:(e,t)=>{delete this.session,r&&ar.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ef(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Nf=!1,Pf=class extends k.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Nf&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),su.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Nf=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||ar.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),ss.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Nf=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Ff(e){let[t,n]=Qu(),r=(0,k.useContext)(fn);return(0,A.jsx)(Pf,{...e,layoutGroup:r,switchLayoutGroup:(0,k.useContext)(Rd),isPresent:t,safeToRemove:n})}var If={pan:{Feature:Mf},drag:{Feature:Af,ProjectionNode:Uu,MeasureLayout:Ff}};function Lf(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&ar.postRender(()=>i(t,Qd(t)))}var Rf=class extends pc{mount(){let{current:e}=this.node;e&&(this.unmount=ps(e,(e,t)=>(Lf(this.node,t,`Start`),e=>Lf(this.node,e,`End`))))}unmount(){}},zf=class extends pc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=En(tu(this.node.current,`focus`,()=>this.onFocus()),tu(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Bf(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&ar.postRender(()=>i(t,Qd(t)))}var Vf=class extends pc{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Es(e,(e,t)=>(Bf(this.node,t,`Start`),(e,{success:t})=>Bf(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Hf=new WeakMap,Uf=new WeakMap,Wf=e=>{let t=Hf.get(e.target);t&&t(e)},Gf=e=>{e.forEach(Wf)};function Kf({root:e,...t}){let n=e||document;Uf.has(n)||Uf.set(n,{});let r=Uf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Gf,{root:e,...t})),r[i]}function qf(e,t,n){let r=Kf(t);return Hf.set(e,n),r.observe(e),()=>{Hf.delete(e),r.unobserve(e)}}var Jf={some:0,all:1},Yf=class extends pc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Jf[r]};this.stopObserver=qf(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Xf(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Xf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Zf={inView:{Feature:Yf},tap:{Feature:Vf},focus:{Feature:zf},hover:{Feature:Rf}},Qf={layout:{ProjectionNode:Uu,MeasureLayout:Ff}},$f=qd({...Zd,...Zf,...If,...Qf},Jd),ep=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function tp(e){return Array.from(e.match(ep)??[])}function np(e){return tp(e).map(e=>e.toLowerCase()).join(`-`)}function rp(){return typeof window<`u`}function ip(e){return sp(e)?(e.nodeName||``).toLowerCase():`#document`}function ap(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function op(e){return((sp(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function sp(e){return rp()?e instanceof Node||e instanceof ap(e).Node:!1}function cp(e){return rp()?e instanceof Element||e instanceof ap(e).Element:!1}function lp(e){return rp()?e instanceof HTMLElement||e instanceof ap(e).HTMLElement:!1}function up(e){return!rp()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ap(e).ShadowRoot}function dp(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Sp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function fp(e){return/^(table|td|th)$/.test(ip(e))}function pp(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var mp=/transform|translate|scale|rotate|perspective|filter/,hp=/paint|layout|strict|content/,gp=e=>!!e&&e!==`none`,_p;function vp(e){let t=cp(e)?Sp(e):e;return gp(t.transform)||gp(t.translate)||gp(t.scale)||gp(t.rotate)||gp(t.perspective)||!bp()&&(gp(t.backdropFilter)||gp(t.filter))||mp.test(t.willChange||``)||hp.test(t.contain||``)}function yp(e){let t=wp(e);for(;lp(t)&&!xp(t);){if(vp(t))return t;if(pp(t))return null;t=wp(t)}return null}function bp(){return _p??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),_p}function xp(e){return/^(html|body|#document)$/.test(ip(e))}function Sp(e){return ap(e).getComputedStyle(e)}function Cp(e){return cp(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wp(e){if(ip(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||up(e)&&e.host||op(e);return up(t)?t.host:t}function Tp(e){let t=wp(e);return xp(t)?e.ownerDocument?e.ownerDocument.body:e.body:lp(t)&&dp(t)?t:Tp(t)}function Ep(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Tp(e),i=r===e.ownerDocument?.body,a=ap(r);if(i){let e=Dp(a);return t.concat(a,a.visualViewport||[],dp(r)?r:[],e&&n?Ep(e):[])}else return t.concat(r,Ep(r,[],n))}function Dp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Op=[`top`,`right`,`bottom`,`left`],kp=Math.min,Ap=Math.max,jp=Math.round,Mp=Math.floor,Np=e=>({x:e,y:e}),Pp={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Fp(e,t,n){return Ap(e,kp(t,n))}function Ip(e,t){return typeof e==`function`?e(t):e}function Lp(e){return e.split(`-`)[0]}function Rp(e){return e.split(`-`)[1]}function zp(e){return e===`x`?`y`:`x`}function Bp(e){return e===`y`?`height`:`width`}function Vp(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Hp(e){return zp(Vp(e))}function Up(e,t,n){n===void 0&&(n=!1);let r=Rp(e),i=Hp(e),a=Bp(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Qp(o)),[o,Qp(o)]}function Wp(e){let t=Qp(e);return[Gp(e),t,Gp(t)]}function Gp(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Kp=[`left`,`right`],qp=[`right`,`left`],Jp=[`top`,`bottom`],Yp=[`bottom`,`top`];function Xp(e,t,n){switch(e){case`top`:case`bottom`:return n?t?qp:Kp:t?Kp:qp;case`left`:case`right`:return t?Jp:Yp;default:return[]}}function Zp(e,t,n,r){let i=Rp(e),a=Xp(Lp(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Gp)))),a}function Qp(e){let t=Lp(e);return Pp[t]+e.slice(t.length)}function $p(e){return{top:0,right:0,bottom:0,left:0,...e}}function em(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:$p(e)}function tm(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function nm(e,t,n){let{reference:r,floating:i}=e,a=Vp(t),o=Hp(t),s=Bp(o),c=Lp(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Rp(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function rm(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ip(t,e),p=em(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=tm(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=tm(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var im=50,am=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:rm},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=nm(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<im&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=nm(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},om=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Ip(e,t)||{};if(l==null)return{};let d=em(u),f={x:n,y:r},p=Hp(i),m=Bp(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=kp(d[_],T),ee=kp(d[v],T),te=E,D=C-h[m]-ee,ne=C/2-h[m]/2+w,re=Fp(te,ne,D),ie=!c.arrow&&Rp(i)!=null&&ne!==re&&a.reference[m]/2-(ne<te?E:ee)-h[m]/2<0,ae=ie?ne<te?ne-te:ne-D:0;return{[p]:f[p]+ae,data:{[p]:re,centerOffset:ne-re-ae,...ie&&{alignmentOffset:ae}},reset:ie}}}),sm=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Ip(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Lp(r),_=Vp(o),v=Lp(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Qp(o)]:Wp(o)),x=p!==`none`;!d&&x&&b.push(...Zp(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Up(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Vp(t))||T.every(e=>Vp(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Vp(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function cm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lm(e){return Op.some(t=>e[t]>=0)}var um=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ip(e,t);switch(i){case`referenceHidden`:{let e=cm(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:lm(e)}}}case`escaped`:{let e=cm(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:lm(e)}}}default:return{}}}}},dm=new Set([`left`,`top`]);async function fm(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Lp(n),s=Rp(n),c=Vp(n)===`y`,l=dm.has(o)?-1:1,u=a&&c?-1:1,d=Ip(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var pm=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await fm(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},mm=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ip(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Vp(Lp(i)),p=zp(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Fp(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Fp(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},hm=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ip(e,t),u={x:n,y:r},d=Vp(i),f=zp(d),p=u[f],m=u[d],h=Ip(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=dm.has(Lp(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},gm=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Ip(e,t),u=await o.detectOverflow(t,l),d=Lp(i),f=Rp(i),p=Vp(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=kp(h-u[g],v),x=kp(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Ap(u.left,0),t=Ap(u.right,0),n=Ap(u.top,0),r=Ap(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Ap(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Ap(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function _m(e){let t=Sp(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=lp(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=jp(n)!==a||jp(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function vm(e){return cp(e)?e:e.contextElement}function ym(e){let t=vm(e);if(!lp(t))return Np(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=_m(t),o=(a?jp(n.width):n.width)/r,s=(a?jp(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var bm=Np(0);function xm(e){let t=ap(e);return!bp()||!t.visualViewport?bm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sm(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ap(e)?!1:t}function Cm(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=vm(e),o=Np(1);t&&(r?cp(r)&&(o=ym(r)):o=ym(e));let s=Sm(a,n,r)?xm(a):Np(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=ap(a),t=r&&cp(r)?ap(r):r,n=e,i=Dp(n);for(;i&&r&&t!==n;){let e=ym(i),t=i.getBoundingClientRect(),r=Sp(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ap(i),i=Dp(n)}}return tm({width:u,height:d,x:c,y:l})}function wm(e,t){let n=Cp(e).scrollLeft;return t?t.left+n:Cm(op(e)).left+n}function Tm(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-wm(e,n),y:n.top+t.scrollTop}}function Em(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=op(r),s=t?pp(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Np(1),u=Np(0),d=lp(r);if((d||!d&&!a)&&((ip(r)!==`body`||dp(o))&&(c=Cp(r)),d)){let e=Cm(r);l=ym(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Tm(o,c):Np(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Dm(e){return Array.from(e.getClientRects())}function Om(e){let t=op(e),n=Cp(e),r=e.ownerDocument.body,i=Ap(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ap(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+wm(e),s=-n.scrollTop;return Sp(r).direction===`rtl`&&(o+=Ap(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var km=25;function Am(e,t){let n=ap(e),r=op(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=bp();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=wm(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=km&&(a-=o)}else l<=km&&(a+=l);return{width:a,height:o,x:s,y:c}}function jm(e,t){let n=Cm(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=lp(e)?ym(e):Np(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Mm(e,t,n){let r;if(t===`viewport`)r=Am(e,n);else if(t===`document`)r=Om(op(e));else if(cp(t))r=jm(t,n);else{let n=xm(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return tm(r)}function Nm(e,t){let n=wp(e);return n===t||!cp(n)||xp(n)?!1:Sp(n).position===`fixed`||Nm(n,t)}function Pm(e,t){let n=t.get(e);if(n)return n;let r=Ep(e,[],!1).filter(e=>cp(e)&&ip(e)!==`body`),i=null,a=Sp(e).position===`fixed`,o=a?wp(e):e;for(;cp(o)&&!xp(o);){let t=Sp(o),n=vp(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||dp(o)&&!n&&Nm(e,o))?r=r.filter(e=>e!==o):i=t,o=wp(o)}return t.set(e,r),r}function Fm(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?pp(t)?[]:Pm(t,this._c):[].concat(n),r],o=Mm(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Mm(t,a[e],i);s=Ap(n.top,s),c=kp(n.right,c),l=kp(n.bottom,l),u=Ap(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Im(e){let{width:t,height:n}=_m(e);return{width:t,height:n}}function Lm(e,t,n){let r=lp(t),i=op(t),a=n===`fixed`,o=Cm(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Np(0);function l(){c.x=wm(i)}if(r||!r&&!a)if((ip(t)!==`body`||dp(i))&&(s=Cp(t)),r){let e=Cm(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Tm(i,s):Np(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Rm(e){return Sp(e).position===`static`}function zm(e,t){if(!lp(e)||Sp(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return op(e)===n&&(n=n.ownerDocument.body),n}function Bm(e,t){let n=ap(e);if(pp(e))return n;if(!lp(e)){let t=wp(e);for(;t&&!xp(t);){if(cp(t)&&!Rm(t))return t;t=wp(t)}return n}let r=zm(e,t);for(;r&&fp(r)&&Rm(r);)r=zm(r,t);return r&&xp(r)&&Rm(r)&&!vp(r)?n:r||yp(e)||n}var Vm=async function(e){let t=this.getOffsetParent||Bm,n=this.getDimensions,r=await n(e.floating);return{reference:Lm(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Hm(e){return Sp(e).direction===`rtl`}var Um={convertOffsetParentRelativeRectToViewportRelativeRect:Em,getDocumentElement:op,getClippingRect:Fm,getOffsetParent:Bm,getElementRects:Vm,getClientRects:Dm,getDimensions:Im,getScale:ym,isElement:cp,isRTL:Hm};function Wm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Gm(e,t){let n=null,r,i=op(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Mp(d),h=Mp(i.clientWidth-(u+f)),g=Mp(i.clientHeight-(d+p)),_=Mp(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ap(0,kp(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Wm(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Km(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=vm(e),u=i||a?[...l?Ep(l):[],...t?Ep(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Gm(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Cm(e):null;c&&g();function g(){let t=Cm(e);h&&!Wm(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var qm=pm,Jm=mm,Ym=sm,Xm=gm,Zm=um,Qm=om,$m=hm,eh=(e,t,n)=>{let r=new Map,i={platform:Um,...n},a={...i.platform,_c:r};return am(e,t,{...i,platform:a})},th=t(r(),1),nh=typeof document<`u`?k.useLayoutEffect:function(){};function rh(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 n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!rh(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!rh(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ih(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ah(e,t){let n=ih(e);return Math.round(t*n)/n}function oh(e){let t=k.useRef(e);return nh(()=>{t.current=e}),t}function sh(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=k.useState(r);rh(f,r)||p(r);let[m,h]=k.useState(null),[g,_]=k.useState(null),v=k.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=k.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=k.useRef(null),C=k.useRef(null),w=k.useRef(u),T=c!=null,E=oh(c),ee=oh(i),te=oh(l),D=k.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};ee.current&&(e.platform=ee.current),eh(S.current,C.current,e).then(e=>{let t={...e,isPositioned:te.current!==!1};ne.current&&!rh(w.current,t)&&(w.current=t,th.flushSync(()=>{d(t)}))})},[f,t,n,ee,te]);nh(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let ne=k.useRef(!1);nh(()=>(ne.current=!0,()=>{ne.current=!1}),[]),nh(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,D);D()}},[b,x,D,E,T]);let re=k.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),ie=k.useMemo(()=>({reference:b,floating:x}),[b,x]),ae=k.useMemo(()=>{let e={position:n,left:0,top:0};if(!ie.floating)return e;let t=ah(ie.floating,u.x),r=ah(ie.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ih(ie.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ie.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:D,refs:re,elements:ie,floatingStyles:ae}),[u,D,re,ie,ae])}var ch=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Qm({element:r.current,padding:i}).fn(n):r?Qm({element:r,padding:i}).fn(n):{}}}},lh=(e,t)=>{let n=qm(e);return{name:n.name,fn:n.fn,options:[e,t]}},uh=(e,t)=>{let n=Jm(e);return{name:n.name,fn:n.fn,options:[e,t]}},dh=(e,t)=>({fn:$m(e).fn,options:[e,t]}),fh=(e,t)=>{let n=Ym(e);return{name:n.name,fn:n.fn,options:[e,t]}},ph=(e,t)=>{let n=Xm(e);return{name:n.name,fn:n.fn,options:[e,t]}},mh=(e,t)=>{let n=Zm(e);return{name:n.name,fn:n.fn,options:[e,t]}},hh=(e,t)=>{let n=ch(e);return{name:n.name,fn:n.fn,options:[e,t]}},gh=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function _h(e){return vh(e)}function vh(e){return Array.isArray(e)?yh(e):e instanceof RegExp?e:typeof e==`object`?bh(e):e}function yh(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=vh(e[n]);return t}function bh(e){let t={};for(let n in e)t[n]=vh(e[n]);return t}function xh(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Sh(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Sh(e.substring(0,e.length-1)):e.substr(~t+1)}var Ch=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,wh=class{static hasCaptures(e){return e===null?!1:(Ch.lastIndex=0,Ch.test(e))}static replaceCaptures(e,t,n){return e.replace(Ch,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Th(e,t){return e<t?-1:e>t?1:0}function Eh(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Th(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Dh(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Oh(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var kh=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Ah=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Fh(e),t)}static createFromParsedTheme(e,t){return Rh(e,t)}_cachedMatchRoot=new kh(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Mh(e.parent,t.parentScopes));return n?new Ph(n.fontStyle,n.foreground,n.background):null}},jh=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Mh(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Nh(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Nh(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Ph=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Fh(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&Dh(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Dh(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Ih(l,u,e,o,s,c)}}return n}var Ih=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Lh=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(Lh||{});function Rh(e,t){e.sort((e,t)=>{let n=Th(e.scope,t.scope);return n!==0||(n=Eh(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new zh(t),o=new Ph(n,a.getId(r),a.getId(i)),s=new Hh(new Vh(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Ah(a,o,s)}var zh=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Bh=Object.freeze([]),Vh=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Bh,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Hh=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Vh.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Eh(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Vh(e,t,n,r,i))}},Uh=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=e.containsBalancedBrackets(t)?1:0,d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Gh(r)),i!==null&&(u=i?1:0),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Wh(e){return e}function Gh(e){return e}function Kh(e,t){let n=[],r=Jh(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(qh(i)){let e=[];do e.push(i),i=r.next();while(qh(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function qh(e){return!!e&&!!e.match(/[\w\.:]+/)}function Jh(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Yh(e){typeof e.dispose==`function`&&e.dispose()}var Xh=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Zh=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Qh=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},$h=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Xh(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Qh;for(let n of e)eg(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Xh){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function eg(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Xh?ng({baseGrammar:a,selfGrammar:i},r):tg(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Xh(e))}function tg(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];rg([r],t,n)}}function ng(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&rg(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&rg(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function rg(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?xh({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&rg(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=lg(i);switch(a.kind){case 0:ng({...t,selfGrammar:t.baseGrammar},n);break;case 1:ng(t,n);break;case 2:tg(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?tg(a.ruleName,i,n):ng(i,n)}else a.kind===4?n.add(new Zh(a.scopeName,a.ruleName)):n.add(new Xh(a.scopeName));break}}}var ig=class{kind=0},ag=class{kind=1},og=class{constructor(e){this.ruleName=e}kind=2},sg=class{constructor(e){this.scopeName=e}kind=3},cg=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function lg(e){if(e===`$base`)return new ig;if(e===`$self`)return new ag;let t=e.indexOf(`#`);return t===-1?new sg(e):t===0?new og(e.substring(1)):new cg(e.substring(0,t),e.substring(t+1))}var ug=/\\(\d+)/,dg=/\\(\d+)/g,fg=-1,pg=-2;function mg(e){return e}function hg(e){return e}var gg=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=wh.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=wh.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Sh(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:wh.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:wh.replaceCaptures(this._contentName,e,t)}},_g=class extends gg{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},vg=class extends gg{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Cg(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new wg,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},yg=class extends gg{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new wg,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},bg=class extends gg{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Cg(i,this.id),this.beginCaptures=a,this._end=new Cg(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new wg;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},xg=class extends gg{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Cg(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Cg(o,pg),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new wg;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new wg,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},Sg=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new _g(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new vg(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=xh({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new yg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new xg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new bg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=lg(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof yg||e instanceof bg||e instanceof xg)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Cg=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=ug.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return dg.lastIndex=0,this.source.replace(dg,(e,t)=>Oh(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},wg=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){return this._cached||=new Tg(e,this._items.map(e=>e.source),this._items.map(e=>e.ruleId)),this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Tg(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Tg=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
11
|
+
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Eg=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Dg=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Eg(e,8),this._embeddedLanguagesMatcher=new Og(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Eg(0,0);_getBasicScopeAttributes=new kh(e=>new Eg(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Og=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Oh(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var kg=!1,Ag=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function jg(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Mg(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Ag(i,!0);f()}return new Ag(i,!1);function f(){let o=Ng(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===fg){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),zg(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof bg){let r=o;zg(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof xg){let r=o;zg(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(zg(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Mg(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof xg&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Lg(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==pg){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),zg(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function Ng(e,t,n,r,i,a){let o=Pg(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Fg(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function Pg(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Ig(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Fg(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Ig(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Ig(e,t,n,r,i){return kg?{ruleScanner:e.compile(t,n),findOptions:Rg(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Lg(e,t,n,r,i){return kg?{ruleScanner:e.compileWhile(t,n),findOptions:Rg(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Rg(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function zg(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));jg(e,p,n&&d.start===0,d.start,f,i,!1,0),Yh(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new Bg(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Bg=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Vg(e,t,n,r,i,a,o,s){return new Gg(e,t,n,r,i,a,o,s)}function Hg(e,t,n,r,i){let a=Kh(t,Ug),o=Sg.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function Ug(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(Wg(t[r],e))return n=r+1,!0;return!1})}function Wg(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var Gg=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Dg(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Kg(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Kh(e,Ug);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)Hg(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&Hg(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(mg(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[hg(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Kg(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Sg.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Jg.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Uh.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?qg.createRootAndLookUpScopeName(a,r,this):qg.createRoot(`unknown`,r),t=new Jg(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
12
|
+
`;let a=this.createOnigString(e),o=a.content.length,s=new Xg(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=jg(this,a,i,0,t,s,!0,r);return Yh(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Kg(e,t){return e=_h(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var qg=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=jh.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new jh(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new jh(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Uh.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Jg=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?qg.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:hg(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=qg.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,mg(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,qg.fromExtension(r,n.contentNameScopesList))}},Yg=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Kh(e,Ug).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Kh(e,Ug).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Xg=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Uh.set(n,0,Wh(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Uh.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},Zg=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,Vg(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Qg=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Zg(Ah.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Ah.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new Yg(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new $h(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},$g=Jg.NULL,e_=/["&'<>`]/g,t_=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,n_=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,r_=/[|\\{}()[\]^$+*?.]/g,i_=new WeakMap;function a_(e,t){if(e=e.replace(t.subset?o_(t.subset):e_,r),t.subset||t.escapeOnly)return e;return e.replace(t_,n).replace(n_,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function o_(e){let t=i_.get(e);return t||(t=s_(e),i_.set(e,t)),t}function s_(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(r_,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var c_=/[\dA-Fa-f]/;function lee(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!c_.test(String.fromCharCode(t))?r:r+`;`}var uee=/\d/;function dee(e,t,n){let r=`&#`+String(e);return n&&t&&!uee.test(String.fromCharCode(t))?r:r+`;`}var fee=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),l_={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},pee=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],u_={}.hasOwnProperty,d_={},f_;for(f_ in l_)u_.call(l_,f_)&&(d_[l_[f_]]=f_);var mee=/[^\dA-Za-z]/;function hee(e,t,n,r){let i=String.fromCharCode(e);if(u_.call(d_,i)){let e=d_[i],a=`&`+e;return n&&fee.includes(e)&&!pee.includes(e)&&(!r||t&&t!==61&&mee.test(String.fromCharCode(t)))?a:a+`;`}return``}function gee(e,t,n){let r=lee(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=hee(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=dee(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function p_(e,t){return a_(e,Object.assign({format:gee},t))}var _ee=/^>|^->|<!--|-->|--!>|<!-$/g,vee=[`>`],yee=[`<`,`>`];function bee(e,t,n,r){return r.settings.bogusComments?`<?`+p_(e.value,Object.assign({},r.settings.characterReferences,{subset:vee}))+`>`:`<!--`+e.value.replace(_ee,i)+`-->`;function i(e){return p_(e,Object.assign({},r.settings.characterReferences,{subset:yee}))}}function xee(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var m_=g_(1),h_=g_(-1),See=[];function g_(e){return t;function t(t,n,r){let i=t?t.children:See,a=(n||0)+e,o=i[a];if(!r)for(;o&&tt(o);)a+=e,o=i[a];return o}}var Cee={}.hasOwnProperty;function __(e){return t;function t(t,n,r){return Cee.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var v_=__({body:x_,caption:y_,colgroup:y_,dd:T_,dt:w_,head:y_,html:b_,li:C_,optgroup:D_,option:O_,p:S_,rp:E_,rt:E_,tbody:A_,td:N_,tfoot:j_,th:N_,thead:k_,tr:M_});function y_(e,t,n){let r=m_(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&tt(r.value.charAt(0)))}function b_(e,t,n){let r=m_(n,t);return!r||r.type!==`comment`}function x_(e,t,n){let r=m_(n,t);return!r||r.type!==`comment`}function S_(e,t,n){let r=m_(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function C_(e,t,n){let r=m_(n,t);return!r||r.type===`element`&&r.tagName===`li`}function w_(e,t,n){let r=m_(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function T_(e,t,n){let r=m_(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function E_(e,t,n){let r=m_(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function D_(e,t,n){let r=m_(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function O_(e,t,n){let r=m_(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function k_(e,t,n){let r=m_(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function A_(e,t,n){let r=m_(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function j_(e,t,n){return!m_(n,t)}function M_(e,t,n){let r=m_(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function N_(e,t,n){let r=m_(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var P_=__({body:L_,colgroup:R_,head:I_,html:F_,tbody:z_});function F_(e){let t=m_(e,-1);return!t||t.type!==`comment`}function I_(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function L_(e){let t=m_(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&tt(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function R_(e,t,n){let r=h_(n,t),i=m_(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&v_(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function z_(e,t,n){let r=h_(n,t),i=m_(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&v_(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var B_={name:[[`
|
|
13
|
+
\f\r &/=>`.split(``),`
|
|
14
|
+
\f\r "&'/=>\``.split(``)],[`\0
|
|
15
|
+
\f\r "&'/<=>`.split(``),`\0
|
|
16
|
+
\f\r "&'/<=>\``.split(``)]],unquoted:[[`
|
|
17
|
+
\f\r &>`.split(``),`\0
|
|
18
|
+
\f\r "&'<=>\``.split(``)],[`\0
|
|
19
|
+
\f\r "&'<=>\``.split(``),`\0
|
|
20
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function V_(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=Ye);let l=H_(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!P_(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!v_(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function H_(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=U_(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function U_(e,t,n){let r=Je(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=e.settings.allowDangerousCharacters?0:1,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=p_(r.attribute,Object.assign({},e.settings.characterReferences,{subset:B_.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?ut:Xe)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=p_(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:B_.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&pt(n,o)>pt(n,e.alternative)&&(o=e.alternative),s=o+p_(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?B_.single:B_.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var W_=[`<`,`&`];function G_(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:p_(e.value,Object.assign({},r.settings.characterReferences,{subset:W_}))}function K_(e,t,n,r){return r.settings.allowDangerousHtml?e.value:G_(e,t,n,r)}function q_(e,t,n,r){return r.all(e)}var J_=Ze(`type`,{invalid:Y_,unknown:X_,handlers:{comment:bee,doctype:xee,element:V_,raw:K_,root:q_,text:G_}});function Y_(e){throw Error("Expected node, not `"+e+"`")}function X_(e){let t=e;throw Error("Cannot compile unknown node `"+t.type+"`")}var Z_={},Q_={},$_=[];function ev(e,t){let n=t||Z_,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:tv,all:nv,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||dt,characterReferences:n.characterReferences||Q_,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?Ye:ft,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function tv(e,t,n){return J_(e,t,n,this)}function nv(e){let t=[],n=e&&e.children||$_,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function rv(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function iv(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function av(e){return Array.isArray(e)?e:[e]}async function ov(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function sv(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function cv(e){return e===`ansi`||sv(e)}function lv(e){return e===`none`}function uv(e){return lv(e)}function dv(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function fv(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function pv(e){let t=fv(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function mv(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var hv=`light-dark()`,gv=[`color`,`background-color`];function _v(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function vv(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?_v(e,t):e})):e}function yv(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>bv(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&gv.includes(a))if(r===hv&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new gh('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function bv(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&Lh.Italic&&(t[`font-style`]=`italic`),e.fontStyle&Lh.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&Lh.Underline&&n.push(`underline`),e.fontStyle&Lh.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function xv(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var Sv=new WeakMap;function Cv(e,t){Sv.set(e,t)}function wv(e){return Sv.get(e)}var Tv=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(av(n).map(e=>[e,$g])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Ev(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Ev(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function Dv(e,t){if(!(e instanceof Tv))throw new gh(`Invalid grammar state`);return e.getInternalStack(t)}function Ov(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new gh(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}else{let t=r.lines[e.line];if(t===void 0)throw new gh(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new gh(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=pv(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));kv(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return vv(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new gh(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=Av(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new gh(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new gh(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&dv(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function kv(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new gh(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new gh(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function Av(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(Av).join(``):``}var jv=[Ov()];function Mv(e){let t=Nv(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...jv]}function Nv(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Pv=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Fv={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function Iv(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function Lv(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function Rv(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)Fv[r]&&t.push({type:`setDecoration`,value:Fv[r]});else if(r<=29){let e=Fv[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:Pv[r-30]}});else if(r===38){let n=Lv(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:Pv[r-40]}});else if(r===48){let n=Lv(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:Pv[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Pv[r-100+8]}})}return t}function zv(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=Iv(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=Rv(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var Bv={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function Vv(e=Bv){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<Pv.length;e++)r.push(t(Pv[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var Hv={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function wee(e,t,n){let r=rv(e,n),i=fv(t),a=Vv(Object.fromEntries(Pv.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Hv[t]]}))),o=zv();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=iv(i,r),o=iv(o,r),n.decorations.has(`dim`)&&(i=Uv(i));let s=Lh.None;return n.decorations.has(`bold`)&&(s|=Lh.Bold),n.decorations.has(`italic`)&&(s|=Lh.Italic),n.decorations.has(`underline`)&&(s|=Lh.Underline),n.decorations.has(`strikethrough`)&&(s|=Lh.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function Uv(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Wv(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||`text`);if(sv(i)||lv(r))return fv(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if(i===`ansi`)return wee(a,t,n);let s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new gh(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new gh(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return Kv(t,s,a,o,n)}function Gv(...e){if(e.length===2)return wv(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(sv(i)||lv(a))throw new gh(`Plain language does not have grammar state`);if(i===`ansi`)throw new gh(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new Tv(qv(n,c,o,s,r).stateStack,c.name,o.name)}function Kv(e,t,n,r,i){let a=qv(e,t,n,r,i),o=new Tv(a.stateStack,t.name,n.name);return Cv(a.tokens,o),a.tokens}function qv(e,t,n,r,i){let a=rv(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=fv(e),l=i.grammarState?Dv(i.grammarState,n.name)??$g:i.grammarContextCode==null?$g:qv(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=iv(r[Uh.getForeground(s)],a),l=Uh.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?Jv(t.scopes):Yv(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function Jv(e){return e.map(e=>({scopeName:e}))}function Yv(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Qv(e,i,t.slice(0,r))}}return n}function Xv(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Zv(e,t,n){if(!Xv(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Xv(e[r],n[i])&&--r,--i;return r===-1}function Qv(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Zv(e,t,n)){r.push(a);break}return r}function $v(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=Wv(e,t,{...n,theme:r.theme});return{tokens:i,state:wv(i),theme:typeof r.theme==`string`?r.theme:r.theme.name}}),a=ey(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:c,...l}=e[t][i];o.variants[r[n].color]=l}),o})),s=i[0].state?new Tv(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&Cv(o,s),o}function ey(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function ty(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:t.color===l?1:0);if(f.length===0)throw new gh("`themes` option must not be empty");let p=$v(e,t,n);if(c=wv(p),l&&hv!==l&&!f.find(e=>e.color===l))throw new gh(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>yv(e,h,u,l,d))),c&&Cv(a,c);let g=f.map(e=>rv(e.theme,n));i=ny(f,m,g,u,l,`fg`,d),r=ny(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=rv(n.theme,n);a=Wv(e,t,n);let l=e.getTheme(n.theme);r=iv(l.bg,s),i=iv(l.fg,s),o=l.name,c=wv(a)}else throw new gh("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function ny(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=iv(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===hv&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new gh('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${iv(t[r][a],n[r])||`inherit`}, ${iv(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function ry(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>ry(e,t,n),codeToTokens:(t,n)=>ty(e,t,n)}){let i=t;for(let e of Mv(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=ty(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=ay(a):d===`never`&&(a=oy(a)),f&&(a=sy(a));let p={...r,get source(){return i}};for(let e of Mv(n))a=e.tokens?.call(p,a)||a;return iy(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function iy(e,t,n,r=wv(e)){let i=Mv(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:dv,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
21
|
+
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=xv(a.htmlStyle||bv(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&Cv(m,r),m}function ay(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&Lh.Underline||i.fontStyle&Lh.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function oy(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function sy(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=xv(e.htmlStyle||bv(e)),i=xv(n.htmlStyle||bv(n)),a=e.fontStyle&&(e.fontStyle&Lh.Underline||e.fontStyle&Lh.Strikethrough),o=n.fontStyle&&(n.fontStyle&Lh.Underline||n.fontStyle&Lh.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var cy=ev;function ly(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>ry(e,t,n),codeToTokens:(t,n)=>ty(e,t,n)},i=cy(ry(e,t,n,r));for(let e of Mv(n))i=e.postprocess?.call(r,i,n)||i;return i}var uy={light:`#333333`,dark:`#bbbbbb`},dy={light:`#fffffe`,dark:`#1e1e1e`},fy=`__shiki_resolved`;function py(e){if(e?.[fy])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?uy.light:uy.dark,n||=t.type===`light`?dy.light:dy.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,fy,{enumerable:!1,writable:!1,value:!0}),t}async function my(e){return Array.from(new Set((await Promise.all(e.filter(e=>!cv(e)).map(async e=>await ov(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function hy(e){return(await Promise.all(e.map(async e=>uv(e)?null:py(await ov(e))))).filter(e=>!!e)}var gy=3,_y=!1;function vy(e,t=3){if(gy&&!(typeof gy==`number`&&t>gy)){if(_y)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var yy=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function by(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new yy(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var xy=class extends Qg{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=py(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Ah.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=by(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new yy(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Sy=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},Cy=0;function wy(e){Cy+=1,e.warnings!==!1&&Cy>=10&&Cy%10==0&&console.warn(`[Shiki] ${Cy} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new yy("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(py),i=new xy(new Sy(e.engine,n),r,n,e.langAlias),a;function o(t){return by(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new yy(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new yy(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await my(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await hy(e))}function g(){if(t)throw new yy(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--Cy)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function Ty(e){e.engine||vy("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([hy(e.themes||[]),my(e.langs||[]),e.engine]);return wy({...e,themes:t,langs:n,engine:r})}async function Ey(e){let t=await Ty(e);return{getLastGrammarState:(...e)=>Gv(t,...e),codeToTokensBase:(e,n)=>Wv(t,e,n),codeToTokensWithThemes:(e,n)=>$v(t,e,n),codeToTokens:(e,n)=>ty(t,e,n),codeToHast:(e,n)=>ry(t,e,n),codeToHtml:(e,n)=>ly(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Dy(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,cv(n))return[];let r=t[n];if(!r)throw new gh(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(uv(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new gh(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await Ey({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function Oy(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function ky(e,t){let n=Oy(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var Ay=[{id:`abap`,name:`ABAP`,import:(()=>O(()=>import(`./abap-BdvmRIgS.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>O(()=>import(`./actionscript-3-et0rQaqm.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>O(()=>import(`./ada-DPgrustg.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>O(()=>import(`./angular-html-Dm7s7tSx.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>O(()=>import(`./angular-ts-B_ywTULt.js`),__vite__mapDeps([5,0,1,2,3,4,6])))},{id:`apache`,name:`Apache Conf`,import:(()=>O(()=>import(`./apache-CFpsYX8S.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>O(()=>import(`./apex-CN5n6pbI.js`),[]))},{id:`apl`,name:`APL`,import:(()=>O(()=>import(`./apl-Dm11wHHc.js`),__vite__mapDeps([7,3,1,2,4,8,9,10])))},{id:`applescript`,name:`AppleScript`,import:(()=>O(()=>import(`./applescript-JrY23hsL.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>O(()=>import(`./ara-DR83hn3A.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>O(()=>import(`./asciidoc-Dpu9XLB1.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>O(()=>import(`./asm-BYI3A31V.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>O(()=>import(`./astro-DP1naDCT.js`),__vite__mapDeps([11,3,1,4,8,12,13,14])))},{id:`awk`,name:`AWK`,import:(()=>O(()=>import(`./awk-BIoTx_w6.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>O(()=>import(`./ballerina-BFvDNd4T.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>O(()=>import(`./bat-DtQkx7Ny.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>O(()=>import(`./beancount-BIjKALa1.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>O(()=>import(`./berry-BPkDN_EZ.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>O(()=>import(`./bibtex-Dur2CNW6.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>O(()=>import(`./bicep-BMz1bZ7m.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>O(()=>import(`./bird2-91rdr9s7.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>O(()=>import(`./blade-DD5O596X.js`),__vite__mapDeps([15,3,1,16,2,4,8,17,9,10])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>O(()=>import(`./bsl-FmB7U2qd.js`),__vite__mapDeps([18,19])))},{id:`c`,name:`C`,import:(()=>O(()=>import(`./c-DqqBLLyl.js`).then(e=>e.n),__vite__mapDeps([20,1])))},{id:`c3`,name:`C3`,import:(()=>O(()=>import(`./c3-CJTbEooS.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>O(()=>import(`./cadence-C0GI7BZZ.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>O(()=>import(`./cairo-B5JMmIC0.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>O(()=>import(`./clarity-KgUVrNfC.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>O(()=>import(`./clojure-BhQuoGIG.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>O(()=>import(`./cmake-CA59gUFQ.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>O(()=>import(`./cobol-CCFShgGZ.js`),__vite__mapDeps([23,2,1,3,4,10])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>O(()=>import(`./codeowners-CD36YqjJ.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>O(()=>import(`./codeql-CrMosKUt.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>O(()=>import(`./coffee-C-Mn3tBT.js`),__vite__mapDeps([24,4,1])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>O(()=>import(`./common-lisp-DYnOjAFz.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>O(()=>import(`./coq-BaHtq3Qt.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>O(()=>import(`./cpp-D8Y73ItU.js`).then(e=>e.n),__vite__mapDeps([25,1,26,20,27,17])))},{id:`crystal`,name:`Crystal`,import:(()=>O(()=>import(`./crystal-CnXWqbxx.js`),__vite__mapDeps([28,20,1,3,2,4,29,17])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>O(()=>import(`./csharp-D6sghVPa.js`),[]))},{id:`css`,name:`CSS`,import:(()=>O(()=>import(`./css-CUGjdPw_.js`).then(e=>e.n),__vite__mapDeps([3,1])))},{id:`csv`,name:`CSV`,import:(()=>O(()=>import(`./csv-DuxyxUAI.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>O(()=>import(`./cue-D9NRAX0_.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>O(()=>import(`./cypher-HJRdtilF.js`),[]))},{id:`d`,name:`D`,import:(()=>O(()=>import(`./d-B4Ont7_X.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>O(()=>import(`./dart-Dp4asavE.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>O(()=>import(`./dax-DBUubp6S.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>O(()=>import(`./desktop-DQ0n6zIQ.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>O(()=>import(`./diff-CFHlrffC.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>O(()=>import(`./docker-BuefmsF5.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>O(()=>import(`./dotenv-BKTsUQ_r.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>O(()=>import(`./dream-maker-BNdv5lLS.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>O(()=>import(`./edge-C-Mi8Oda.js`),__vite__mapDeps([30,16,2,1,3,4,14])))},{id:`elixir`,name:`Elixir`,import:(()=>O(()=>import(`./elixir-CTS5wQtX.js`),__vite__mapDeps([31,2,1,3,4])))},{id:`elm`,name:`Elm`,import:(()=>O(()=>import(`./elm-rM310x8D.js`),__vite__mapDeps([32,26,1,20])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>O(()=>import(`./emacs-lisp-D9FIGRtM.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>O(()=>import(`./erb-oaGjGVGO.js`),__vite__mapDeps([33,2,1,3,4,34,20,25,26,27,17,35,36,13,14,37,38,29,9,10,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>O(()=>import(`./erlang-q4Mkyw3m.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>O(()=>import(`./fennel-DpqQTaVZ.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>O(()=>import(`./fish-hyk5x6Q4.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>O(()=>import(`./fluent-DMll-MGX.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>O(()=>import(`./fortran-fixed-form-BmdfKovV.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>O(()=>import(`./fortran-free-form-MCAifii4.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>O(()=>import(`./fsharp-DLlBn9Nl.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>O(()=>import(`./gdresource-BzFzBRli.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>O(()=>import(`./gdscript-D3R4J0Cv.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>O(()=>import(`./gdshader-BAubtqqN.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>O(()=>import(`./genie-BnIIX2pC.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>O(()=>import(`./gherkin-CL3NUuB1.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>O(()=>import(`./git-commit-BYPE8h85.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>O(()=>import(`./git-rebase-Bmmgf6eN.js`),__vite__mapDeps([50,29,1])))},{id:`gleam`,name:`Gleam`,import:(()=>O(()=>import(`./gleam-Cvj8QRtQ.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>O(()=>import(`./glimmer-js-CahbROb1.js`),__vite__mapDeps([51,3,1,2,4,14])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>O(()=>import(`./glimmer-ts-JMFYNbot.js`),__vite__mapDeps([52,3,1,2,4,14])))},{id:`glsl`,name:`GLSL`,import:(()=>O(()=>import(`./glsl-BCuCNM3V.js`).then(e=>e.n),__vite__mapDeps([26,1,20])))},{id:`gn`,name:`GN`,import:(()=>O(()=>import(`./gn-DxCHSEMl.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>O(()=>import(`./gnuplot-CkGXHK7B.js`),[]))},{id:`go`,name:`Go`,import:(()=>O(()=>import(`./go-B_NLCuTj.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>O(()=>import(`./graphql-RXOfHGfI.js`).then(e=>e.n),__vite__mapDeps([35,1,4,36,13,14])))},{id:`groovy`,name:`Groovy`,import:(()=>O(()=>import(`./groovy-DVge8oRs.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>O(()=>import(`./hack-BBQpwyf_.js`),__vite__mapDeps([53,2,1,3,4,17])))},{id:`haml`,name:`Ruby Haml`,import:(()=>O(()=>import(`./haml-mWELc9kh.js`).then(e=>e.n),__vite__mapDeps([37,1,3,4])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>O(()=>import(`./handlebars-COrUo8cC.js`),__vite__mapDeps([54,3,1,2,4,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>O(()=>import(`./haskell-DRmM8XlQ.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>O(()=>import(`./haxe-BEhq8ZEr.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>O(()=>import(`./hcl-B5ZIaGS0.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>O(()=>import(`./hjson-B9uRLqIO.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>O(()=>import(`./hlsl-Hv1kKjrS.js`),[]))},{id:`html`,name:`HTML`,import:(()=>O(()=>import(`./html-cmigv1ou.js`).then(e=>e.n),__vite__mapDeps([2,1,3,4])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>O(()=>import(`./html-derivative-B3me0pSu.js`),__vite__mapDeps([16,2,1,3,4])))},{id:`http`,name:`HTTP`,import:(()=>O(()=>import(`./http-BojM9cyU.js`),__vite__mapDeps([55,35,1,4,36,13,14,8,29,9,10])))},{id:`hurl`,name:`Hurl`,import:(()=>O(()=>import(`./hurl-BxEmMiGP.js`),__vite__mapDeps([56,57,35,1,4,36,13,14,9,10])))},{id:`hxml`,name:`HXML`,import:(()=>O(()=>import(`./hxml-CoBuVbfs.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>O(()=>import(`./hy-CeISYGGU.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>O(()=>import(`./imba-xjcDFXUW.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>O(()=>import(`./ini-D0ZCSj6e.js`),[]))},{id:`java`,name:`Java`,import:(()=>O(()=>import(`./java-BvheClGI.js`).then(e=>e.n),__vite__mapDeps([10,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>O(()=>import(`./javascript-DjlJORDg.js`).then(e=>e.n),__vite__mapDeps([4,1])))},{id:`jinja`,name:`Jinja`,import:(()=>O(()=>import(`./jinja-Bi4sG72X.js`),__vite__mapDeps([60,2,1,3,4])))},{id:`jison`,name:`Jison`,import:(()=>O(()=>import(`./jison-BTz5Ik2Y.js`),__vite__mapDeps([61,4,1])))},{id:`json`,name:`JSON`,import:(()=>O(()=>import(`./json-CiTd40Rg.js`).then(e=>e.n),__vite__mapDeps([8,1])))},{id:`json5`,name:`JSON5`,import:(()=>O(()=>import(`./json5-FR9EyF7a.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>O(()=>import(`./jsonc-CHIeFfsD.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>O(()=>import(`./jsonl-B4WQkwTf.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>O(()=>import(`./jsonnet-vd-gzGkL.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>O(()=>import(`./jssm-C_bj1LkZ.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>O(()=>import(`./jsx-Bx-RZMFH.js`).then(e=>e.n),__vite__mapDeps([36,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>O(()=>import(`./julia-BKcIfSxk.js`),__vite__mapDeps([62,25,1,26,20,27,17,4,22,63])))},{id:`just`,name:`Just`,import:(()=>O(()=>import(`./just-IkZCagAs.js`),__vite__mapDeps([64,4,1,65,3,2,17,9,10,22,34,20,25,26,27,35,36,13,14,37,38,29,39])))},{id:`kdl`,name:`KDL`,import:(()=>O(()=>import(`./kdl-BzL_Ak31.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>O(()=>import(`./kotlin-BQQFk6ql.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>O(()=>import(`./kusto-vWe6OLKV.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>O(()=>import(`./latex-9N90_WFU.js`),__vite__mapDeps([66,67,63,1])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>O(()=>import(`./lean-CaqenOqv.js`),[]))},{id:`less`,name:`Less`,import:(()=>O(()=>import(`./less-CERnPzn6.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>O(()=>import(`./liquid-CQLPDP7m.js`),__vite__mapDeps([68,3,1,2,4,8])))},{id:`llvm`,name:`LLVM IR`,import:(()=>O(()=>import(`./llvm-BylJXvm7.js`),[]))},{id:`log`,name:`Log file`,import:(()=>O(()=>import(`./log-CBBcNcbO.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>O(()=>import(`./logo-r-8Jc8Xk.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>O(()=>import(`./lua-BBL6LXKd.js`).then(e=>e.n),__vite__mapDeps([38,1,20])))},{id:`luau`,name:`Luau`,import:(()=>O(()=>import(`./luau-B2g7L-zP.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>O(()=>import(`./make-DK-HzJ2w.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>O(()=>import(`./markdown-FgdsukgR.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>O(()=>import(`./marko-CLZwt2N2.js`),__vite__mapDeps([69,3,1,70,6,14])))},{id:`matlab`,name:`MATLAB`,import:(()=>O(()=>import(`./matlab-DwyUVNXd.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>O(()=>import(`./mdc-Bo8CRPg4.js`),__vite__mapDeps([71,16,2,1,3,4,41,39])))},{id:`mdx`,name:`MDX`,import:(()=>O(()=>import(`./mdx-3EBShbsD.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>O(()=>import(`./mermaid-ByG2-SLz.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>O(()=>import(`./mipsasm-BKDtQCf3.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>O(()=>import(`./mojo-DmEAK7iv.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>O(()=>import(`./moonbit-Qm8v_cKN.js`),[]))},{id:`move`,name:`Move`,import:(()=>O(()=>import(`./move-CMectUPk.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>O(()=>import(`./narrat-Bdm8NaK8.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>O(()=>import(`./nextflow-BpSt05nC.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>O(()=>import(`./nextflow-groovy-BZ-bqJ-u.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>O(()=>import(`./nginx-ChZL5FWE.js`),__vite__mapDeps([74,38,1,20])))},{id:`nim`,name:`Nim`,import:(()=>O(()=>import(`./nim-5JnPAJWa.js`),__vite__mapDeps([75,20,1,3,26,2,4,41,9,10])))},{id:`nix`,name:`Nix`,import:(()=>O(()=>import(`./nix-P5P-2qHs.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>O(()=>import(`./nushell-DKPnC5RG.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>O(()=>import(`./objective-c-BPwXtM0v.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>O(()=>import(`./objective-cpp-CWYEdWNG.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>O(()=>import(`./ocaml-CL7OJ02v.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>O(()=>import(`./odin-Dtay25eA.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>O(()=>import(`./openscad-WD4sXUUp.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>O(()=>import(`./pascal-A6-MZnZ8.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>O(()=>import(`./perl-Yq3AfnVV.js`),__vite__mapDeps([65,3,1,2,4,17,9,10])))},{id:`php`,name:`PHP`,import:(()=>O(()=>import(`./php-CCj0foPx.js`),__vite__mapDeps([76,3,1,2,4,8,17,9,10])))},{id:`pkl`,name:`Pkl`,import:(()=>O(()=>import(`./pkl-cmPbg8fI.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>O(()=>import(`./plsql-DwmuVd7q.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>O(()=>import(`./po-CkVxkZaj.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>O(()=>import(`./polar-hStNz_W2.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>O(()=>import(`./postcss-ZIk0AQ7M.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>O(()=>import(`./powerquery-D0gqoHHD.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>O(()=>import(`./powershell-DXB5HoVh.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>O(()=>import(`./prisma-DmTrfxC0.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>O(()=>import(`./prolog-CdoyriEj.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>O(()=>import(`./proto-4MrN11dS.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>O(()=>import(`./pug-svYJKDOQ.js`),__vite__mapDeps([77,3,1,2,4])))},{id:`puppet`,name:`Puppet`,import:(()=>O(()=>import(`./puppet-MEaLGpAP.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>O(()=>import(`./purescript-CPxCorqB.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>O(()=>import(`./python-f4fp5z0z.js`),[]))},{id:`qml`,name:`QML`,import:(()=>O(()=>import(`./qml-BzEtWdqI.js`),__vite__mapDeps([78,4,1])))},{id:`qmldir`,name:`QML Directory`,import:(()=>O(()=>import(`./qmldir-DCjSceJ_.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>O(()=>import(`./qss-BdM02NUc.js`),[]))},{id:`r`,name:`R`,import:(()=>O(()=>import(`./r-luosIeJH.js`).then(e=>e.n),__vite__mapDeps([63,1])))},{id:`racket`,name:`Racket`,import:(()=>O(()=>import(`./racket-D2tfa8Zc.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>O(()=>import(`./raku-KeGPJVZg.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>O(()=>import(`./razor-Bokxs4Qx.js`),__vite__mapDeps([79,80,2,1,3,4])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>O(()=>import(`./reg-DdnswvOj.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>O(()=>import(`./regexp-CYC8h6V9.js`).then(e=>e.n),__vite__mapDeps([27,1])))},{id:`rel`,name:`Rel`,import:(()=>O(()=>import(`./rel-RhzEfSRc.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>O(()=>import(`./riscv-dS5TzX10.js`),[]))},{id:`ron`,name:`RON`,import:(()=>O(()=>import(`./ron-CQjQSCVp.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>O(()=>import(`./rosmsg-nvjuSIGu.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>O(()=>import(`./rst-1xwvVGf7.js`),__vite__mapDeps([81,82,25,1,26,20,27,17,16,2,3,4,22,34,35,36,13,14,37,38,29,9,10,39])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>O(()=>import(`./ruby-Blad-eDx.js`),__vite__mapDeps([34,20,1,25,26,27,17,3,35,4,36,13,14,37,2,38,29,9,10,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>O(()=>import(`./rust-rV8q_xyI.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>O(()=>import(`./sas-DUPWtptg.js`),__vite__mapDeps([83,17,1])))},{id:`sass`,name:`Sass`,import:(()=>O(()=>import(`./sass-CuxdoNN0.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>O(()=>import(`./scala-Df4L7N3R.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>O(()=>import(`./scheme-DalRmAPH.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>O(()=>import(`./scss-CYQ8LEwP.js`).then(e=>e.n),__vite__mapDeps([6,1,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>O(()=>import(`./sdbl-B_TmFnGf.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>O(()=>import(`./shaderlab-DYEMDY3e.js`),__vite__mapDeps([84,85])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>O(()=>import(`./shellscript-DjKZ34ac.js`).then(e=>e.n),__vite__mapDeps([29,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>O(()=>import(`./shellsession-C3kcnBnh.js`),__vite__mapDeps([86,29,1])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>O(()=>import(`./smalltalk-DTTnjjZJ.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>O(()=>import(`./solidity-CSIHEQ2t.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>O(()=>import(`./soy-BN0uzUAI.js`),__vite__mapDeps([87,2,1,3,4])))},{id:`sparql`,name:`SPARQL`,import:(()=>O(()=>import(`./sparql-B6k9tA6Q.js`),__vite__mapDeps([88,89])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>O(()=>import(`./splunk-DkRzN7V_.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>O(()=>import(`./sql-Bx-WX28V.js`).then(e=>e.n),__vite__mapDeps([17,1])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>O(()=>import(`./ssh-config-Bqp7ng33.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>O(()=>import(`./stata-HAj7doU8.js`),__vite__mapDeps([90,17,1])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>O(()=>import(`./stylus-CdbCxDLX.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>O(()=>import(`./surrealql-BkGf0I3k.js`),__vite__mapDeps([91,4,1])))},{id:`svelte`,name:`Svelte`,import:(()=>O(()=>import(`./svelte-DtWg6ssL.js`),__vite__mapDeps([92,3,1,4,12,14])))},{id:`swift`,name:`Swift`,import:(()=>O(()=>import(`./swift-yRu2dtgr.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>O(()=>import(`./system-verilog-GUE_oP1V.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>O(()=>import(`./systemd-FLIJAQZV.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>O(()=>import(`./talonscript-DTR-8ILs.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>O(()=>import(`./tasl-WHNWP-1F.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>O(()=>import(`./tcl-BaBXNNp6.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>O(()=>import(`./templ-Dc9vj00n.js`),__vite__mapDeps([93,3,1,94,4])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>O(()=>import(`./terraform-uJUFpr8t.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>O(()=>import(`./tex-DA3dAz55.js`),__vite__mapDeps([67,63,1])))},{id:`toml`,name:`TOML`,import:(()=>O(()=>import(`./toml-CyR4Gqq1.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>O(()=>import(`./ts-tags-BD1j21LH.js`),__vite__mapDeps([95,3,1,26,20,2,4,17,14,9,10])))},{id:`tsv`,name:`TSV`,import:(()=>O(()=>import(`./tsv-COLVYI6A.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>O(()=>import(`./tsx-CFm2E6uK.js`).then(e=>e.n),__vite__mapDeps([13,1])))},{id:`turtle`,name:`Turtle`,import:(()=>O(()=>import(`./turtle-PQwt4gkb.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>O(()=>import(`./twig-DrUXy85s.js`),__vite__mapDeps([96,3,1,4,76,2,8,17,9,10,22,34,20,25,26,27,35,36,13,14,37,38,29,39,6])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>O(()=>import(`./typescript-Dy-5sXFx.js`).then(e=>e.n),__vite__mapDeps([14,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>O(()=>import(`./typespec-Bb7qHV0g.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>O(()=>import(`./typst-Bj_JElGz.js`),[]))},{id:`v`,name:`V`,import:(()=>O(()=>import(`./v-BTkrtik4.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>O(()=>import(`./vala-AXT1CI9v.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>O(()=>import(`./vb-DzTKUgW8.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>O(()=>import(`./verilog-aI3j5Xj8.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>O(()=>import(`./vhdl-4IgBB7vO.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>O(()=>import(`./viml-D_XMKSR6.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>O(()=>import(`./vue-DC_yTvy2.js`),__vite__mapDeps([97,3,1,16,2,4,8,14])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>O(()=>import(`./vue-html-Bp8x4gdt.js`),__vite__mapDeps([98,4,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>O(()=>import(`./vue-vine-ZcUkuUUp.js`),__vite__mapDeps([99,3,1,4,70,12,6,100])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>O(()=>import(`./vyper-Dz2f7-FK.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>O(()=>import(`./wasm-DHkXUMsP.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>O(()=>import(`./wenyan-BRAtM0Iv.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>O(()=>import(`./wgsl-CMpn9jTa.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>O(()=>import(`./wikitext-DRmBVmVA.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>O(()=>import(`./wit-Drp_HLqJ.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>O(()=>import(`./wolfram-C33umj7M.js`),[]))},{id:`xml`,name:`XML`,import:(()=>O(()=>import(`./xml-BHoOtGbO.js`).then(e=>e.n),__vite__mapDeps([9,1,10])))},{id:`xsl`,name:`XSL`,import:(()=>O(()=>import(`./xsl-CN1PlFqm.js`),__vite__mapDeps([101,9,1,10])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>O(()=>import(`./yaml-DT0mpn8u.js`).then(e=>e.n),__vite__mapDeps([39,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>O(()=>import(`./zenscript-BlYQ_Frf.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>O(()=>import(`./zig-Buk7I0y-.js`),[]))}],jy=Object.fromEntries(Ay.map(e=>[e.id,e.import])),My=Object.fromEntries(Ay.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Ny={...jy,...My},Py=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>O(()=>import(`./andromeeda-DJl1yeV_.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>O(()=>import(`./aurora-x-Nav5jnoQ.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>O(()=>import(`./ayu-dark-H5QV5J7K.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>O(()=>import(`./ayu-light-BrwTNGnU.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>O(()=>import(`./ayu-mirage-Bg6FpF5w.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>O(()=>import(`./catppuccin-frappe-D76-cUjK.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>O(()=>import(`./catppuccin-latte-DUHNJ_6_.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>O(()=>import(`./catppuccin-macchiato-CFhPH2wd.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>O(()=>import(`./catppuccin-mocha-BRD0cvUW.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>O(()=>import(`./dark-plus-DZSBycyp.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>O(()=>import(`./dracula-MOn9qacs.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>O(()=>import(`./dracula-soft-C4r_sC_D.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>O(()=>import(`./everforest-dark-CNa2QFRn.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>O(()=>import(`./everforest-light-DRbUDqJT.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>O(()=>import(`./github-dark-oLN6SDKl.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>O(()=>import(`./github-dark-default-C6I2oE4c.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>O(()=>import(`./github-dark-dimmed-DEqwxg6D.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>O(()=>import(`./github-dark-high-contrast-DDt3j0cs.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>O(()=>import(`./github-light-DaN-N2Gj.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>O(()=>import(`./github-light-default-B3EwMbS7.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>O(()=>import(`./github-light-high-contrast-Cl9D0f_e.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>O(()=>import(`./gruvbox-dark-hard-BwZz1yni.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>O(()=>import(`./gruvbox-dark-medium-Bqy6jkuO.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>O(()=>import(`./gruvbox-dark-soft-DjUvyUfH.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>O(()=>import(`./gruvbox-light-hard-BTLmfPdm.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>O(()=>import(`./gruvbox-light-medium-DeWqsWs6.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>O(()=>import(`./gruvbox-light-soft-BL8ld-1F.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>O(()=>import(`./horizon-ClXGBjWw.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>O(()=>import(`./horizon-bright-CvUCr3ux.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>O(()=>import(`./houston-NqkqG60q.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>O(()=>import(`./kanagawa-dragon-B3Cz89vt.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>O(()=>import(`./kanagawa-lotus-CRe_W5Ft.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>O(()=>import(`./kanagawa-wave-BPqZ5XB7.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>O(()=>import(`./laserwave-CwtvEUcj.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>O(()=>import(`./light-plus-B9_M_OKq.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>O(()=>import(`./material-theme-DOJ9PS4O.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>O(()=>import(`./material-theme-darker-DOurH5jT.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>O(()=>import(`./material-theme-lighter-BfPWxCP6.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>O(()=>import(`./material-theme-ocean-BcO5PKoq.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>O(()=>import(`./material-theme-palenight-ClWQBDDd.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>O(()=>import(`./min-dark-ClJ2x5pc.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>O(()=>import(`./min-light-BsOUz5iE.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>O(()=>import(`./monokai-BKc3VADO.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>O(()=>import(`./night-owl-CbFc5pXO.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>O(()=>import(`./night-owl-light-zYbVCVuz.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>O(()=>import(`./nord-C7hKGudV.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>O(()=>import(`./one-dark-pro-CrdFNNwF.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>O(()=>import(`./one-light-BUiz8X4B.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>O(()=>import(`./plastic-DtQ_LnDB.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>O(()=>import(`./poimandres-Dt0xZuaa.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>O(()=>import(`./red-C0qZ-1lN.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>O(()=>import(`./rose-pine-C89ViLdr.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>O(()=>import(`./rose-pine-dawn-Dq2gf0yi.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>O(()=>import(`./rose-pine-moon-CBDvXVs_.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>O(()=>import(`./slack-dark-ak_jOeLl.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>O(()=>import(`./slack-ochin-ByiYhLwu.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>O(()=>import(`./snazzy-light-BBRYeY60.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>O(()=>import(`./solarized-dark-BtoLnWkw.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>O(()=>import(`./solarized-light-CtzUA7GI.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>O(()=>import(`./synthwave-84-2WIu6MHX.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>O(()=>import(`./tokyo-night-BbogFqAr.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>O(()=>import(`./vesper-BmnwIC_B.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>O(()=>import(`./vitesse-black-DhmxIXiA.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>O(()=>import(`./vitesse-dark-dvEH_9qt.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>O(()=>import(`./vitesse-light-Ca0W2L1O.js`),[]))}].map(e=>[e.id,e.import])),Fy=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Iy(){return 2147483648}function Ly(){return typeof performance<`u`?performance.now():Date.now()}var Ry=(e,t)=>e+(t-e%t)%t;async function zy(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=Iy();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,Ry(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:Ly,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var By=Object.defineProperty,Vy=(e,t,n)=>t in e?By(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hy=(e,t,n)=>Vy(e,typeof t==`symbol`?t:t+``,n),Uy=null;function Wy(e){throw new Fy(e.UTF8ToString(e.getLastOnigError()))}var Gy=class e{constructor(t){Hy(this,`utf16Length`),Hy(this,`utf8Length`),Hy(this,`utf16Value`),Hy(this,`utf8Value`),Hy(this,`utf16OffsetToUtf8`),Hy(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Ky=class e{constructor(t){if(Hy(this,`id`,++e.LAST_ID),Hy(this,`_onigBinding`),Hy(this,`content`),Hy(this,`utf16Length`),Hy(this,`utf8Length`),Hy(this,`utf16OffsetToUtf8`),Hy(this,`utf8OffsetToUtf16`),Hy(this,`ptr`),!Uy)throw new Fy(`Must invoke loadWasm first.`);this._onigBinding=Uy,this.content=t;let n=new Gy(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=Uy.omalloc(1e4),e._sharedPtrInUse=!0,Uy.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(Uy)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Hy(Ky,`LAST_ID`,0),Hy(Ky,`_sharedPtr`,0),Hy(Ky,`_sharedPtrInUse`,!1);var qy=Ky,Jy=class{constructor(e){if(Hy(this,`_onigBinding`),Hy(this,`_ptr`),!Uy)throw new Fy(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Gy(e[r]);t[r]=i.createString(Uy),n[r]=i.utf8Length}let r=Uy.omalloc(4*e.length);Uy.HEAPU32.set(t,r/4);let i=Uy.omalloc(4*e.length);Uy.HEAPU32.set(n,i/4);let a=Uy.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)Uy.ofree(t[n]);Uy.ofree(i),Uy.ofree(r),a===0&&Wy(Uy),this._onigBinding=Uy,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new qy(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Yy(e){return typeof e.instantiator==`function`}function Xy(e){return typeof e.default==`function`}function Zy(e){return e.data!==void 0}function Qy(e){return typeof Response<`u`&&e instanceof Response}function $y(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var eb;function tb(e){if(eb)return eb;async function t(){Uy=await zy(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Yy(n)?n=await n.instantiator(t):Xy(n)?n=await n.default(t):(Zy(n)&&(n=n.data),Qy(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await rb(n)(t):await ib(n)(t):$y(n)||n instanceof WebAssembly.Module?n=await nb(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await nb(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return eb=t(),eb}function nb(e){return t=>WebAssembly.instantiate(e,t)}function rb(e){return t=>WebAssembly.instantiateStreaming(e,t)}function ib(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function ab(e){return e&&await tb(e),{createScanner(e){return new Jy(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new qy(e)}}}var ob=Dy({langs:Ny,themes:Py,engine:()=>ab(O(()=>import(`./wasm-CuXPCj65.js`),[]))}),{codeToHtml:Tee,codeToHast:Eee,codeToTokens:Dee,codeToTokensBase:Oee,codeToTokensWithThemes:kee,getSingletonHighlighter:Aee,getLastGrammarState:jee}=ky(ob,{guessEmbeddedLanguages:mv});function sb(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function cb(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var lb=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),ub=String.raw;function db(e,t){if(e==null)throw Error(t??`Value expected`);return e}var fb=ub`\[\^?`,pb=`c.? | C(?:-.?)?|${ub`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${ub`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${ub`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${ub`o\{[^\}]*\}?`}|${ub`\d{1,3}`}`,mb=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,hb=new RegExp(ub`
|
|
22
|
+
\\ (?:
|
|
23
|
+
${pb}
|
|
24
|
+
| [gk]<[^>]*>?
|
|
25
|
+
| [gk]'[^']*'?
|
|
26
|
+
| .
|
|
27
|
+
)
|
|
28
|
+
| \( (?:
|
|
29
|
+
\? (?:
|
|
30
|
+
[:=!>({]
|
|
31
|
+
| <[=!]
|
|
32
|
+
| <[^>]*>
|
|
33
|
+
| '[^']*'
|
|
34
|
+
| ~\|?
|
|
35
|
+
| #(?:[^)\\]|\\.?)*
|
|
36
|
+
| [^:)]*[:)]
|
|
37
|
+
)?
|
|
38
|
+
| \*[^\)]*\)?
|
|
39
|
+
)?
|
|
40
|
+
| (?:${mb.source})+
|
|
41
|
+
| ${fb}
|
|
42
|
+
| .
|
|
43
|
+
`.replace(/\s+/g,``),`gsu`),gb=new RegExp(ub`
|
|
44
|
+
\\ (?:
|
|
45
|
+
${pb}
|
|
46
|
+
| .
|
|
47
|
+
)
|
|
48
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
49
|
+
| ${fb}
|
|
50
|
+
| &&
|
|
51
|
+
| .
|
|
52
|
+
`.replace(/\s+/g,``),`gsu`);function _b(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=qb(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(hb.lastIndex=0;s=hb.exec(e);){let t=vb(a,e,s[0],hb.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(hb.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?Yb(e,u):e).flat(),flags:r}}function vb(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=yb(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:Cb(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:Lb(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:wb(n)}}if(a===`K`)return{token:jb(`keep`,n)};if(a===`N`||a===`R`)return{token:Ab(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:Ab(`any`,n)};if(a===`X`)return{token:Ab(`text_segment`,n)};let e=xb(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:Hb(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:Vb(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:Pb(`group`,n)};if(n===`(?>`)return{token:Pb(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:Pb(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:Pb(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:Pb(`absence_repeater`,n)}}throw n===`(?(`?Error(`Unsupported conditional "${n}"`):Error(`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:Nb(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
|
|
53
|
+
`,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:Ab(`dot`,n)}:n===`^`||n===`$`?{token:Cb(e.singleline?{"^":ub`\A`,$:ub`\Z`}[n]:n,n)}:n===`|`?{token:Sb(n)}:mb.test(n)?{tokens:Xb(n)}:{token:Tb(sb(n),n)}}function yb(e,t,n){let r=[kb(t[1]===`^`,t)],i=1,a;for(gb.lastIndex=n;a=gb.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(kb(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(Tb(93,e));else if(i--,r.push(Eb(e)),!i)break}else{let t=bb(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:gb.lastIndex||e.length}}function bb(e){if(e[0]===`\\`)return xb(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!lb.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return Ab(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?Db(e):e===`&&`?Ob(e):Tb(sb(e),e)}function xb(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return Bb(e);if(`dDhHsSwW`.includes(n))return Wb(e);if(e.startsWith(ub`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return Gb(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return Tb(sb(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return Tb(Jb(e),e);if(zb.has(n))return Tb(zb.get(n),e);if(/\d/.test(n))return Mb(t,e);if(e===`\\`)throw Error(ub`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return Tb(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function Sb(e){return{type:`Alternator`,raw:e}}function Cb(e,t){return{type:`Assertion`,kind:e,raw:t}}function wb(e){return{type:`Backreference`,raw:e}}function Tb(e,t){return{type:`Character`,value:e,raw:t}}function Eb(e){return{type:`CharacterClassClose`,raw:e}}function Db(e){return{type:`CharacterClassHyphen`,raw:e}}function Ob(e){return{type:`CharacterClassIntersector`,raw:e}}function kb(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function Ab(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function jb(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:db(n.flags),raw:t}}function Mb(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function Nb(e){return{type:`GroupClose`,raw:e}}function Pb(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function Fb(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function Ib(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function Lb(e){return{type:`Subroutine`,raw:e}}var Rb=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),zb=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function Bb(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return Tb(sb(t.toUpperCase())-64,e)}function Vb(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=Kb(n),o=Kb(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),jb(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,Pb(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function Hb(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=Rb.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return Fb(l,r??null,i?.split(`,`)??null,e)}function Ub(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=e[0]===`+`?1:0,r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return Ib(t,n,r,e)}function Wb(e){let t=e[1].toLowerCase();return Ab({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function Gb(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Ab(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function Kb(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function qb(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function Jb(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function Yb(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[wb(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(ub`Octal encoded byte above 177 unsupported "${n}"`)}else r=sb(t);a.push(Tb(r,(e===0?`\\`:``)+t))}return a}function Xb(e){let t=[],n=new RegExp(mb,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(Ub(e.slice(0,-1)));continue}}}t.push(Ub(e))}return t}function Zb(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function Qb(e){return $b.has(e.type)}var $b=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function ex(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=_b(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return ux();case`Assertion`:return tx(n);case`Backreference`:return nx(n,a);case`Character`:return mx(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return rx(n,a,t);case`CharacterClassOpen`:return ix(n,a,t);case`CharacterSet`:return ax(n,a);case`Directive`:return vx(n.kind,{flags:n.flags});case`GroupOpen`:return ox(n,a,t);case`NamedCallout`:return Sx(n.kind,n.tag,n.arguments);case`Quantifier`:return sx(n,a);case`Subroutine`:return cx(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=Tx(yx(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(ub`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(ub`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function tx({kind:e}){return dx(db({"^":`line_start`,$:`line_end`,"\\A":`string_start`,"\\b":`word_boundary`,"\\B":`word_boundary`,"\\G":`search_start`,"\\y":`text_segment_boundary`,"\\Y":`text_segment_boundary`,"\\z":`string_end`,"\\Z":`string_end_newline`}[e],`Unexpected assertion kind "${e}"`),{negate:e===ub`\B`||e===ub`\Y`})}function nx({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,fx(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return fx(r)}return i(+r)}function rx(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),gx(o,e);throw Error(`Invalid character class range`)}return mx(sb(`-`))}function ix({negate:e},t,n){let{tokens:r,walk:i}=t,a=r[t.nextIndex],o=[hx()],s=Ix(a);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)o.push(hx()),t.nextIndex++;else{let e=o.at(-1);e.body.push(i(e,n))}s=Ix(r[t.nextIndex],a)}let c=hx({negate:e});return o.length===1?c.body=o[0].body:(c.kind=`intersection`,c.body=o.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function ax({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=Fx(n);if(lb.has(r)&&!o?.has(r))e=`posix`,n=r;else return Dx(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?Cx(n,{negate:t}):_x(e,{negate:t})}function ox(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=Ox(e),l=c.type===`AbsenceFunction`,u=Mx(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&cb(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=Lx(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(ux()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(jx(t)||t.type===`CapturingGroup`)throw Error(e)}else if(jx(t)||Mx(t)&&t.negate)throw Error(e)}}f=Lx(r[t.nextIndex])}return t.nextIndex++,c}function sx({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!Qb(a))throw Error(`Quantifier requires a repeatable token`);let o=wx(e,t,n,a);return i.body.pop(),o}function cx({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=Ex(i);return r.push(o),o}function lx(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:kx(t?.body)}}function ux(e){return{type:`Alternative`,body:Ax(e?.body)}}function dx(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function fx(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function px(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!Nx(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:kx(t?.body)}}function mx(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?Error(`Invalid code point out of range "\\x{${t}}"`):Error(`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function hx(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:Ax(e?.body)}}function gx(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function _x(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function vx(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:db(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function yx(e){return{type:`Flags`,...e}}function bx(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:kx(e?.body)}}function xx(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:kx(e?.body)}}function Sx(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function Cx(e,t){let n=!!t?.negate;if(!lb.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function wx(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function Tx(e,t){return{type:`Regex`,body:kx(t?.body),flags:e}}function Ex(e){return{type:`Subroutine`,ref:e}}function Dx(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(Fx(e));if(!r){if(n.normalizeUnknownPropertyNames)r=Px(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(ub`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function Ox({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return lx(`repeater`);case`atomic`:return bx({atomic:!0});case`capturing`:return px(i,{name:n});case`group`:return bx({flags:e});case`lookahead`:case`lookbehind`:return xx({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function kx(e){if(e===void 0)e=[ux()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function Ax(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function jx(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function Mx(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function Nx(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function Px(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function Fx(e){return e.replace(/[- _]+/g,``).toLowerCase()}function Ix(e,t){return db(e,`${t?.type===`Character`&&t.value===93?`Empty`:`Unclosed`} character class`)}function Lx(e){return db(e,`Unclosed group`)}function Rx(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){zx(c).splice(Math.max(0,Bx(s)+l),1),l--,u=!0},removeAllNextSiblings(){return zx(c).splice(Bx(s)+1)},removeAllPrevSiblings(){let e=Bx(s)+l;return l-=e,zx(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,Bx(s)+l)]=e:db(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(zx(c).splice(Math.max(0,Bx(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,Bx(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`CapturingGroup`:case`Group`:r(a.body,a);break;case`Alternative`:case`CharacterClass`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`LookaroundAssertion`:r(a.body,a);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function zx(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function Bx(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var Vx=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Hx(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Ux(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var Wx=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function Gx(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===Wx.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?Wx.CHAR_CLASS:Wx.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function Kx(e,t,n,r){Gx(e,t,n,r)}function qx(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===Wx.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function Jx(e,t,n){return!!qx(e,t,0,n)}function Yx(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var Xx=new RegExp(String.raw`(?<noncapturingStart>${Vx})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function Zx(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(Xx.lastIndex=Number.isNaN(c)?0:c+7;f=Xx.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),Hx(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=Gx(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},Wx.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var Qx=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,$x=new RegExp(String.raw`
|
|
54
|
+
\\(?: \d+
|
|
55
|
+
| c[A-Za-z]
|
|
56
|
+
| [gk]<[^>]+>
|
|
57
|
+
| [pPu]\{[^\}]+\}
|
|
58
|
+
| u[A-Fa-f\d]{4}
|
|
59
|
+
| x[A-Fa-f\d]{2}
|
|
60
|
+
)
|
|
61
|
+
| \((?: \? (?: [:=!>]
|
|
62
|
+
| <(?:[=!]|[^>]+>)
|
|
63
|
+
| [A-Za-z\-]+:
|
|
64
|
+
| \(DEFINE\)
|
|
65
|
+
))?
|
|
66
|
+
| (?<qBase>${Qx})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
67
|
+
| \\?.
|
|
68
|
+
`.replace(/\s+/g,``),`gsu`);function eS(e){if(!RegExp(`${Qx}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for($x.lastIndex=0;o=$x.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a)if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=Ux(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}$x.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null);i=s}return{pattern:e}}var tS=String.raw,nS=tS`\(\?R=(?<rDepth>[^\)]+)\)|${tS`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,rS=tS`\(\?<(?![=!])(?<captureName>[^>]+)>`,iS=tS`${rS}|(?<unnamed>\()(?!\?)`,aS=new RegExp(tS`${rS}|${nS}|\(\?|\\?.`,`gsu`),oS=`Cannot use multiple overlapping recursions`;function sS(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(nS,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&Jx(e,tS`\(\?\(DEFINE\)`,Wx.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=Jx(e,tS`\\[1-9]`,Wx.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(aS.lastIndex=0;f=aS.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else if(m){if(cS(m),l)throw Error(oS);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(aS.lastIndex);if(Jx(s,nS,Wx.DEFAULT))throw Error(oS);let c=m-1;e=lS(t,s,c,!1,n,a,d),i=fS(i,t,c,a.length,0,d);break}else if(h){cS(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(oS);break}if(!u)throw Error(tS`Recursive \g cannot be used outside the referenced group "${r===`external`?h:tS`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=Yx(e,p);if(o&&Jx(m,tS`${rS}|\((?!\?)`,Wx.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=lS(_,v,b,!0,n,a,d);i=fS(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,aS.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),aS.lastIndex),s.set(p,aS.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),aS.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function cS(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function lS(e,t,n,r,i,a,o){let s=new Set;r&&Kx(e+t,rS,({groups:{captureName:e}})=>{s.add(e)},Wx.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${uS(`(?:${e}`,`forward`,...c)}(?:)${uS(`${t})`,`backward`,...c)}${t}`}function uS(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=Gx(e,tS`${iS}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),dS(i,n),s?e:`(?<${t}${l}>`}return tS`\k<${c}${l}>`},Wx.DEFAULT)}return c}function dS(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function fS(e,t,n,r,i,a){if(e.size&&r){let o=0;Kx(t,iS,()=>o++,Wx.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var pS=String.fromCodePoint,mS=String.raw,hS={flagGroups:!0,unicodeSets:!0};hS.bugFlagVLiteralHyphenIsRange=hS.unicodeSets?(()=>{try{new RegExp(mS`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,hS.bugNestedClassIgnoresNegation=hS.unicodeSets&&RegExp(`[[^a]]`,`v`).test(`a`);function gS(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function _S(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function vS(e,t){return bS[e]>=bS[t]}function yS(e,t){if(e==null)throw Error(t??`Value expected`);return e}var bS={ES2025:2025,ES2024:2024,ES2018:2018},xS={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function SS(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!xS[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:`default`,avoidSubclass:!1,flags:``,global:!1,hasIndices:!1,lazyCompileLength:1/0,target:`auto`,verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target===`auto`&&(t.target=hS.flagGroups?`ES2025`:hS.unicodeSets?`ES2024`:`ES2018`),t}var CS=`[ -\r ]`,wS=new Set([pS(304),pS(305)]),TS=mS`[\p{L}\p{M}\p{N}\p{Pc}]`;function ES(e){if(wS.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=Mee.get(n),a=OS.get(n),o=kS.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var DS=new Map(`C Other
|
|
69
|
+
Cc Control cntrl
|
|
70
|
+
Cf Format
|
|
71
|
+
Cn Unassigned
|
|
72
|
+
Co Private_Use
|
|
73
|
+
Cs Surrogate
|
|
74
|
+
L Letter
|
|
75
|
+
LC Cased_Letter
|
|
76
|
+
Ll Lowercase_Letter
|
|
77
|
+
Lm Modifier_Letter
|
|
78
|
+
Lo Other_Letter
|
|
79
|
+
Lt Titlecase_Letter
|
|
80
|
+
Lu Uppercase_Letter
|
|
81
|
+
M Mark Combining_Mark
|
|
82
|
+
Mc Spacing_Mark
|
|
83
|
+
Me Enclosing_Mark
|
|
84
|
+
Mn Nonspacing_Mark
|
|
85
|
+
N Number
|
|
86
|
+
Nd Decimal_Number digit
|
|
87
|
+
Nl Letter_Number
|
|
88
|
+
No Other_Number
|
|
89
|
+
P Punctuation punct
|
|
90
|
+
Pc Connector_Punctuation
|
|
91
|
+
Pd Dash_Punctuation
|
|
92
|
+
Pe Close_Punctuation
|
|
93
|
+
Pf Final_Punctuation
|
|
94
|
+
Pi Initial_Punctuation
|
|
95
|
+
Po Other_Punctuation
|
|
96
|
+
Ps Open_Punctuation
|
|
97
|
+
S Symbol
|
|
98
|
+
Sc Currency_Symbol
|
|
99
|
+
Sk Modifier_Symbol
|
|
100
|
+
Sm Math_Symbol
|
|
101
|
+
So Other_Symbol
|
|
102
|
+
Z Separator
|
|
103
|
+
Zl Line_Separator
|
|
104
|
+
Zp Paragraph_Separator
|
|
105
|
+
Zs Space_Separator
|
|
106
|
+
ASCII
|
|
107
|
+
ASCII_Hex_Digit AHex
|
|
108
|
+
Alphabetic Alpha
|
|
109
|
+
Any
|
|
110
|
+
Assigned
|
|
111
|
+
Bidi_Control Bidi_C
|
|
112
|
+
Bidi_Mirrored Bidi_M
|
|
113
|
+
Case_Ignorable CI
|
|
114
|
+
Cased
|
|
115
|
+
Changes_When_Casefolded CWCF
|
|
116
|
+
Changes_When_Casemapped CWCM
|
|
117
|
+
Changes_When_Lowercased CWL
|
|
118
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
119
|
+
Changes_When_Titlecased CWT
|
|
120
|
+
Changes_When_Uppercased CWU
|
|
121
|
+
Dash
|
|
122
|
+
Default_Ignorable_Code_Point DI
|
|
123
|
+
Deprecated Dep
|
|
124
|
+
Diacritic Dia
|
|
125
|
+
Emoji
|
|
126
|
+
Emoji_Component EComp
|
|
127
|
+
Emoji_Modifier EMod
|
|
128
|
+
Emoji_Modifier_Base EBase
|
|
129
|
+
Emoji_Presentation EPres
|
|
130
|
+
Extended_Pictographic ExtPict
|
|
131
|
+
Extender Ext
|
|
132
|
+
Grapheme_Base Gr_Base
|
|
133
|
+
Grapheme_Extend Gr_Ext
|
|
134
|
+
Hex_Digit Hex
|
|
135
|
+
IDS_Binary_Operator IDSB
|
|
136
|
+
IDS_Trinary_Operator IDST
|
|
137
|
+
ID_Continue IDC
|
|
138
|
+
ID_Start IDS
|
|
139
|
+
Ideographic Ideo
|
|
140
|
+
Join_Control Join_C
|
|
141
|
+
Logical_Order_Exception LOE
|
|
142
|
+
Lowercase Lower
|
|
143
|
+
Math
|
|
144
|
+
Noncharacter_Code_Point NChar
|
|
145
|
+
Pattern_Syntax Pat_Syn
|
|
146
|
+
Pattern_White_Space Pat_WS
|
|
147
|
+
Quotation_Mark QMark
|
|
148
|
+
Radical
|
|
149
|
+
Regional_Indicator RI
|
|
150
|
+
Sentence_Terminal STerm
|
|
151
|
+
Soft_Dotted SD
|
|
152
|
+
Terminal_Punctuation Term
|
|
153
|
+
Unified_Ideograph UIdeo
|
|
154
|
+
Uppercase Upper
|
|
155
|
+
Variation_Selector VS
|
|
156
|
+
White_Space space
|
|
157
|
+
XID_Continue XIDC
|
|
158
|
+
XID_Start XIDS`.split(/\s/).map(e=>[Fx(e),e])),OS=new Map([[`s`,pS(383)],[pS(383),`s`]]),kS=new Map([[pS(223),pS(7838)],[pS(107),pS(8490)],[pS(229),pS(8491)],[pS(969),pS(8486)]]),Mee=new Map([AS(453),AS(456),AS(459),AS(498),...jS(8072,8079),...jS(8088,8095),...jS(8104,8111),AS(8124),AS(8140),AS(8188)]),Nee=new Map([[`alnum`,mS`[\p{Alpha}\p{Nd}]`],[`alpha`,mS`\p{Alpha}`],[`ascii`,mS`\p{ASCII}`],[`blank`,mS`[\p{Zs}\t]`],[`cntrl`,mS`\p{Cc}`],[`digit`,mS`\p{Nd}`],[`graph`,mS`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,mS`\p{Lower}`],[`print`,mS`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,mS`[\p{P}\p{S}]`],[`space`,mS`\p{space}`],[`upper`,mS`\p{Upper}`],[`word`,mS`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,mS`\p{AHex}`]]);function Pee(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function AS(e){let t=pS(e);return[t.toLowerCase(),t]}function jS(e,t){return Pee(e,t).map(e=>AS(e))}var MS=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function Fee(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};FS(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:vS(n.bestEffortTarget,`ES2024`),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Rx(e,Iee,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return Rx(e,NS,a),Rx(e,PS,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var Iee={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=bx();e.body[0].body.push(xx({negate:!0,body:r}),Dx(`Any`));let i=bx();i.body[0].body.push(wx(`greedy`,0,1/0,e)),n(eC(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];_S(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=HS(t.get(e));if(n){let t=bx({flags:n});t.body[0].body=e.body,e.body=[eC(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(eC(xx({body:[ux({body:[dx(`string_end`)]}),ux({body:[mx(10)]})]}),t));else if(c===`line_start`)o(eC(ZS(mS`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`)if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&JS(e))o(eC(xx({negate:!0}),t));else if(d)throw Error(mS`Uses "\G" in a way that requires a subclass`);else o($S(dx(`string_start`),t)),s.strategy=`clip_search`}else if(!(c===`string_end`||c===`string_start`))if(c===`string_end_newline`)o(eC(ZS(mS`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${TS})(?!${TS})|(?<!${TS})(?=${TS}))`,n=`(?:(?<=${TS})(?=${TS})|(?<!${TS})(?!${TS}))`;o(eC(ZS(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!XS(n)&&(n=VS(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!XS(r)&&(r=VS(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(eC(hx({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`)){n($S(_x(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(eC(QS(ZS(CS),l),t));return}if(s&&(c===`word`||u===`word`)){n($S(_x(`word`,{negate:l}),t));return}if(c===`any`)n($S(Dx(`Any`),t));else if(c===`digit`)n($S(Dx(`Nd`,{negate:l}),t));else if(c!==`dot`)if(c===`text_segment`){if(r===`strict`)throw Error(mS`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=mS`\p{RI}{2}|${e}(?:\u200D${e})*`;n(eC(ZS(mS`(?>\r\n|${i?mS`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n($S(Dx(`AHex`,{negate:l}),t));else if(c===`newline`)n(eC(ZS(l?`[^
|
|
159
|
+
]`:`(?>\r
|
|
160
|
+
?|[
|
|
161
|
+
\v\f
\u2028\u2029])`),t));else if(c===`posix`)if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${pS(e.codePointAt(0)-1)}${pS(e.codePointAt(2)+1)}-\u{10FFFF}`),n(eC(ZS(`[${e}]`),t))}else n(eC(QS(ZS(Nee.get(u)),l),t));else if(c===`property`)DS.has(Fx(u))||(e.key=`sc`);else if(c===`space`)n($S(Dx(`space`,{negate:l}),t));else if(c===`word`)n(eC(QS(ZS(TS),l),t));else throw Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`)if(!c.enable&&!c.disable)r();else{let e=bx({flags:c});e.body[0].body=o(),i(eC(e,t),{traverse:!0})}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&Zb(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(mS`Uses "\K" in a way that's unsupported`);let o=xx({behind:!0});o.body[0].body=a(),i(eC(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(eC(xx({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=bx();t.body[0].body.push(e.body),e.body=eC(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=GS(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error(mS`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!XS(n)&&(n=VS(n,t),e.ref=n)}},NS={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=$S(zS(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&_S(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=_S(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=gS(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&!(n.type===`CapturingGroup`&&(n.name===a||n.number===a)););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?zS(0):RS(o,r.groupOriginByCopy,null),l=c;if(!s){let e=HS(BS(o,e=>e.type===`Group`&&!!e.flags)),t=e?gS(r.globalFlags,e):r.globalFlags;IS(t,r.currentFlags)||(l=bx({flags:US(t)}),l.body[0].body.push(c))}n(eC(l,t),{traverse:!s})}},PS={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>LS(t,e));i.length?i.length>1?n(eC(bx({atomic:!0,body:i.reverse().map(e=>ux({body:[fx(e.number)]}))}),t)):e.ref=i[0].number:n(eC(xx({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=px();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function FS(e){Rx(e,{"*"({node:e,parent:t}){e.parent=t}})}function IS(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function LS(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=WS(n.parent);for(let r of t){if(r===n)break;if(r===e||KS(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function RS(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=RS(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function zS(e){let t=Ex(e);return t.isRecursive=!0,t}function BS(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function VS(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function HS(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function US({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function WS(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function GS(e){let t=e.find(e=>e.kind===`search_start`||YS(e,{negate:!1})||!qS(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=GS(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function KS(e,t){let n=WS(e)??[];for(let e of n)if(e===t||KS(e,t))return!0;return!1}function qS({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function JS(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function YS(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Zb(e.body[0],{type:`Assertion`,kind:`search_start`})}function XS(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function ZS(e,t){let n=ex(e,{...t,unicodePropertyMap:DS}).body;return n.length>1||n[0].body.length>1?bx({body:n}):n[0].body[0]}function QS(e,t){return e.negate=t,e}function $S(e,t){return e.parent=t,e}function eC(e,t){return FS(e),e.parent=t,e}function tC(e,t){let n=SS(t),r=vS(n.target,`ES2024`),i=vS(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];Rx(e,nC,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,yS(rC[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&_S(f._captureTransfers,e.transferTo,[]).push(t)}),f}var nC={"*":{enter({node:e},t){if(hC(e)){let n=t.getCurrentModI();t.pushModI(e.flags?gS({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){hC(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){lC(pS(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),uC(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&MS.has(e.value)&&t.setHasCasedChar()}},rC={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?mS`\B`:mS`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=pS(e),r=dC(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&lC(n)){let e=ES(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);hS.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(_C)&&(o=[mx(45),...o.filter(e=>!_C(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||hS.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=bx(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=ux({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(hS.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=dC(n,i),o=dC(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&fC(uC(e)).forEach(e=>{s.add(Array.isArray(e)?`${dC(e[0],i)}-${dC(e[1],i)}`:dC(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:mS`[^\n]`;if(e===`digit`)return t?mS`\D`:mS`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&MS.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?mS`\P`:mS`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?mS`\W`:mS`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=gS(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${pC(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+mC(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:mS`\g<${t}&R=${r}>`}},iC=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),aC=new Set([`-`,`\\`,`]`,`^`,`[`]),oC=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),sC=new Map([[9,mS`\t`],[10,mS`\n`],[11,mS`\v`],[12,mS`\f`],[13,mS`\r`],[8232,mS`\u2028`],[8233,mS`\u2029`],[65279,mS`\uFEFF`]]),cC=/^\p{Cased}$/u;function lC(e){return cC.test(e)}function uC(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=pS(e);if(!lC(t))continue;let o=ES(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function dC(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(sC.has(e))return sC.get(e);if(e<32||e>126&&e<160||e>262143||t&&gC(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?oC:aC:iC,a=pS(e);return(i.has(a)?`\\`:``)+a}function fC(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function pC(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function mC({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function hC({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function gC(e){return e>47&&e<58}function _C({type:e,value:t}){return e===`Character`&&t===45}var vC=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=bC(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(yC(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=xC(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function yC(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function bC(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)_S(n,t,{}).transferTo=e;return n}function xC(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function SC(e,t){let n=CC(e,t);return n.options?new vC(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function CC(e,t){let n=SS(t),r=Fee(ex(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:DS}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=tC(r,n),a=sS(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=Zx(eS(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}var wC=4294967295,TC=class{constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}regexps;findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:wC,end:wC,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function EC(e,t){return SC(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function DC(e={}){let t=Object.assign({target:`auto`,cache:new Map},e);return t.regexConstructor||=e=>EC(e,{target:t.target}),{createScanner(e){return new TC(e,t)},createString(e){return{content:e}}}}var OC=function(){return OC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},OC.apply(this,arguments)};function kC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function AC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var M=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},jC=/([A-Z])/g,MC=e=>e.replace(jC,`-$1`).toLowerCase(),NC={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},PC=/[&><"']/g,FC=e=>String(e).replace(PC,e=>NC[e]),IC=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?IC(e.body[0]):e:e.type===`font`?IC(e.body):e,LC=new Set([`mathord`,`textord`,`atom`]),RC=e=>LC.has(IC(e).type),zC=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},BC={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function VC(e){if(`default`in e)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if(typeof n!=`string`)return n.enum[0];switch(n){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{}}}var HC=class{constructor(e){e===void 0&&(e={}),e||={};for(var t of Object.keys(BC)){var n=BC[t],r=e[t];this[t]=r===void 0?VC(n):n.processor?n.processor(r):r}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),!(!r||r===`ignore`)){if(r===!0||r===`error`)throw new M(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=zC(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},UC=class{constructor(e,t,n){this.id=e,this.size=t,this.cramped=n}sup(){return QC[$C[this.id]]}sub(){return QC[ew[this.id]]}fracNum(){return QC[tw[this.id]]}fracDen(){return QC[nw[this.id]]}cramp(){return QC[rw[this.id]]}text(){return QC[iw[this.id]]}isTight(){return this.size>=2}},WC=0,GC=1,KC=2,qC=3,JC=4,YC=5,XC=6,ZC=7,QC=[new UC(WC,0,!1),new UC(GC,0,!0),new UC(KC,1,!1),new UC(qC,1,!0),new UC(JC,2,!1),new UC(YC,2,!0),new UC(XC,3,!1),new UC(ZC,3,!0)],$C=[JC,YC,JC,YC,XC,ZC,XC,ZC],ew=[YC,YC,YC,YC,ZC,ZC,ZC,ZC],tw=[KC,qC,JC,YC,XC,ZC,XC,ZC],nw=[qC,qC,YC,YC,ZC,ZC,ZC,ZC],rw=[GC,GC,qC,qC,YC,YC,ZC,ZC],iw=[WC,GC,KC,qC,KC,qC,KC,qC],aw={DISPLAY:QC[WC],TEXT:QC[KC],SCRIPT:QC[JC],SCRIPTSCRIPT:QC[XC]},ow=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function sw(e){for(var t=0;t<ow.length;t++)for(var n=ow[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var cw=[];ow.forEach(e=>e.blocks.forEach(e=>cw.push(...e)));function lw(e){for(var t=0;t<cw.length;t+=2)if(e>=cw[t]&&e<=cw[t+1])return!0;return!1}var uw=80,dw=function(e,t){return`M95,`+(622+e+t)+`
|
|
162
|
+
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
163
|
+
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
164
|
+
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
165
|
+
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
166
|
+
c69,-144,104.5,-217.7,106.5,-221
|
|
167
|
+
l`+e/2.075+` -`+e+`
|
|
168
|
+
c5.3,-9.3,12,-14,20,-14
|
|
169
|
+
H400000v`+(40+e)+`H845.2724
|
|
170
|
+
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
171
|
+
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
172
|
+
M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},fw=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119
|
|
173
|
+
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
174
|
+
c340,-704.7,510.7,-1060.3,512,-1067
|
|
175
|
+
l`+e/2.084+` -`+e+`
|
|
176
|
+
c4.7,-7.3,11,-11,19,-11
|
|
177
|
+
H40000v`+(40+e)+`H1012.3
|
|
178
|
+
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
179
|
+
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
180
|
+
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
181
|
+
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
182
|
+
M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},pw=function(e,t){return`M983 `+(10+e+t)+`
|
|
183
|
+
l`+e/3.13+` -`+e+`
|
|
184
|
+
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
|
|
185
|
+
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
186
|
+
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
187
|
+
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
188
|
+
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
189
|
+
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
190
|
+
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
191
|
+
M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},mw=function(e,t){return`M424,`+(2398+e+t)+`
|
|
192
|
+
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
193
|
+
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
194
|
+
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
195
|
+
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
196
|
+
l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000
|
|
197
|
+
v`+(40+e)+`H1014.6
|
|
198
|
+
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
199
|
+
c-2,6,-10,9,-24,9
|
|
200
|
+
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+`
|
|
201
|
+
h400000v`+(40+e)+`h-400000z`},hw=function(e,t){return`M473,`+(2713+e+t)+`
|
|
202
|
+
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+`
|
|
203
|
+
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
|
|
204
|
+
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
205
|
+
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
206
|
+
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
207
|
+
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
208
|
+
606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},gw=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},_w=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+`
|
|
209
|
+
H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
210
|
+
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
211
|
+
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
212
|
+
219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},vw=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=dw(t,uw);break;case`sqrtSize1`:r=fw(t,uw);break;case`sqrtSize2`:r=pw(t,uw);break;case`sqrtSize3`:r=mw(t,uw);break;case`sqrtSize4`:r=hw(t,uw);break;case`sqrtTall`:r=_w(t,uw,n)}return r},yw=function(e,t){switch(e){case`⎜`:return`M291 0 H417 V`+t+` H291z M291 0 H417 V`+t+` H291z`;case`∣`:return`M145 0 H188 V`+t+` H145z M145 0 H188 V`+t+` H145z`;case`∥`:return`M145 0 H188 V`+t+` H145z M145 0 H188 V`+t+` H145z`+(`M367 0 H410 V`+t+` H367z M367 0 H410 V`+t+` H367z`);case`⎟`:return`M457 0 H583 V`+t+` H457z M457 0 H583 V`+t+` H457z`;case`⎢`:return`M319 0 H403 V`+t+` H319z M319 0 H403 V`+t+` H319z`;case`⎥`:return`M263 0 H347 V`+t+` H263z M263 0 H347 V`+t+` H263z`;case`⎪`:return`M384 0 H504 V`+t+` H384z M384 0 H504 V`+t+` H384z`;case`⏐`:return`M312 0 H355 V`+t+` H312z M312 0 H355 V`+t+` H312z`;case`‖`:return`M257 0 H300 V`+t+` H257z M257 0 H300 V`+t+` H257z`+(`M478 0 H521 V`+t+` H478z M478 0 H521 V`+t+` H478z`);default:return``}},bw={doubleleftarrow:`M262 157
|
|
213
|
+
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
214
|
+
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
215
|
+
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
216
|
+
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
217
|
+
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
218
|
+
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
219
|
+
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
220
|
+
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
221
|
+
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
222
|
+
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
223
|
+
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
224
|
+
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
225
|
+
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
226
|
+
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
227
|
+
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
228
|
+
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
229
|
+
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
230
|
+
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
231
|
+
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
232
|
+
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
233
|
+
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
234
|
+
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
235
|
+
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
236
|
+
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
237
|
+
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
238
|
+
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
239
|
+
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
240
|
+
435 0h399565z`,leftgroupunder:`M400000 262
|
|
241
|
+
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
242
|
+
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
243
|
+
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
244
|
+
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
245
|
+
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
246
|
+
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
247
|
+
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
248
|
+
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
249
|
+
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
250
|
+
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
251
|
+
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
252
|
+
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
253
|
+
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
254
|
+
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
255
|
+
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
256
|
+
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
257
|
+
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
258
|
+
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
259
|
+
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
260
|
+
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
261
|
+
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
262
|
+
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
263
|
+
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
264
|
+
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
265
|
+
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
266
|
+
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
267
|
+
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
268
|
+
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
269
|
+
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
270
|
+
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
271
|
+
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
272
|
+
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
273
|
+
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
274
|
+
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
275
|
+
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
276
|
+
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
277
|
+
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
278
|
+
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
279
|
+
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
280
|
+
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
281
|
+
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
282
|
+
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
283
|
+
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
284
|
+
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
285
|
+
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
286
|
+
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
287
|
+
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
288
|
+
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
289
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
290
|
+
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
291
|
+
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
292
|
+
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
293
|
+
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
294
|
+
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
295
|
+
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
296
|
+
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
297
|
+
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
298
|
+
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
299
|
+
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
300
|
+
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
301
|
+
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
302
|
+
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
303
|
+
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
304
|
+
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
305
|
+
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
306
|
+
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
307
|
+
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
308
|
+
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
309
|
+
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
310
|
+
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
311
|
+
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
312
|
+
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
313
|
+
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
|
314
|
+
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
315
|
+
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
316
|
+
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
317
|
+
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
318
|
+
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
319
|
+
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
320
|
+
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
321
|
+
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
322
|
+
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
323
|
+
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
324
|
+
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
325
|
+
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
326
|
+
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
327
|
+
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
328
|
+
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
329
|
+
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
330
|
+
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
331
|
+
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
332
|
+
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
333
|
+
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
334
|
+
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
335
|
+
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
336
|
+
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
337
|
+
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
338
|
+
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
339
|
+
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
340
|
+
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
341
|
+
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
342
|
+
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
343
|
+
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
344
|
+
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
345
|
+
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
346
|
+
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
347
|
+
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
348
|
+
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
349
|
+
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
350
|
+
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
351
|
+
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
352
|
+
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
353
|
+
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
354
|
+
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
355
|
+
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
356
|
+
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
357
|
+
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
358
|
+
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
359
|
+
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
360
|
+
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
361
|
+
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
362
|
+
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
363
|
+
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
364
|
+
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
365
|
+
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
366
|
+
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
367
|
+
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
368
|
+
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
369
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
370
|
+
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
371
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
372
|
+
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
373
|
+
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
374
|
+
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
375
|
+
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
376
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
377
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
378
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
379
|
+
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
380
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
381
|
+
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
382
|
+
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
383
|
+
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
384
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
385
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
386
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
387
|
+
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},xw=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 h347 v-84
|
|
388
|
+
H403z M403 1759 V0 H319 V1759 v`+t+` v1759 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z
|
|
389
|
+
M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
390
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
391
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
392
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
393
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
|
|
394
|
+
M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
395
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
396
|
+
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z
|
|
397
|
+
MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z
|
|
398
|
+
MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z
|
|
399
|
+
M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z
|
|
400
|
+
M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
401
|
+
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
402
|
+
-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
403
|
+
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
404
|
+
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
405
|
+
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
406
|
+
l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
407
|
+
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
408
|
+
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
409
|
+
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
|
|
410
|
+
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
411
|
+
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
412
|
+
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
413
|
+
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
414
|
+
l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
415
|
+
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}},Sw=class{constructor(e){this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e=``,t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>e.toText()).join(``)}},Cw={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},ww={ex:!0,em:!0,mu:!0},Tw=function(e){return typeof e!=`string`&&(e=e.unit),e in Cw||e in ww||e===`ex`},Ew=function(e,t){var n;if(e.unit in Cw)n=Cw[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new M(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},N=function(e){return+e.toFixed(4)+`em`},Dw=function(e){return e.filter(e=>e).join(` `)},Ow=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},kw=function(e){var t=document.createElement(e);t.className=Dw(this.classes);for(var n of Object.keys(this.style))t.style[n]=this.style[n];for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var i=0;i<this.children.length;i++)t.appendChild(this.children[i].toNode());return t},Aw=/[\s"'>/=\x00-\x1f]/,jw=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+FC(Dw(this.classes))+`"`);var n=``;for(var r of Object.keys(this.style))n+=MC(r)+`:`+this.style[r]+`;`;n&&(t+=` style="`+FC(n)+`"`);for(var i of Object.keys(this.attributes)){if(Aw.test(i))throw new M(`Invalid attribute name '`+i+`'`);t+=` `+i+`="`+FC(this.attributes[i])+`"`}t+=`>`;for(var a=0;a<this.children.length;a++)t+=this.children[a].toMarkup();return t+=`</`+e+`>`,t},Mw=class{constructor(e,t,n,r){Ow.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return kw.call(this,`span`)}toMarkup(){return jw.call(this,`span`)}},Nw=class{constructor(e,t,n,r){Ow.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return kw.call(this,`a`)}toMarkup(){return jw.call(this,`a`)}},Pw=class{constructor(e,t,n){this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);e.src=this.src,e.alt=this.alt,e.className=`mord`;for(var t of Object.keys(this.style))e.style[t]=this.style[t];return e}toMarkup(){var e=`<img src="`+FC(this.src)+`"`+(` alt="`+FC(this.alt)+`"`),t=``;for(var n of Object.keys(this.style))t+=MC(n)+`:`+this.style[n]+`;`;return t&&(e+=` style="`+FC(t)+`"`),e+=`'/>`,e}},Fw={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},Iw=class{constructor(e,t,n,r,i,a,o,s){this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=sw(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=Fw[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=N(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=Dw(this.classes));for(var n of Object.keys(this.style))t||=document.createElement(`span`),t.style[n]=this.style[n];return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=FC(Dw(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+this.italic+`em;`);for(var r of Object.keys(this.style))n+=MC(r)+`:`+this.style[r]+`;`;n&&(e=!0,t+=` style="`+FC(n)+`"`);var i=FC(this.text);return e?(t+=`>`,t+=i,t+=`</span>`,t):i}},Lw=class{constructor(e,t){this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+FC(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},Rw=class{constructor(e,t){this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,bw[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+FC(this.alternate)+`"/>`:`<path d="`+FC(bw[this.pathName])+`"/>`}},zw=class{constructor(e){this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+FC(this.attributes[t])+`"`;return e+=`/>`,e}};function Bw(e){if(e instanceof Iw)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Vw(e){if(e instanceof Mw)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}var Hw=e=>e instanceof Mw||e instanceof Nw||e instanceof Sw,Uw={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Ww={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Gw={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function Kw(e,t){Uw[e]=t}function qw(e,t,n){if(!Uw[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=Uw[t][r];if(!i&&e[0]in Gw&&(r=Gw[e[0]].charCodeAt(0),i=Uw[t][r]),!i&&n===`text`&&lw(r)&&(i=Uw[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Jw={};function Yw(e){var t=e>=5?0:e>=3?1:2;if(!Jw[t]){var n=Jw[t]={cssEmPerMu:Ww.quad[t]/18};for(var r in Ww)Ww.hasOwnProperty(r)&&(n[r]=Ww[r][t])}return Jw[t]}var Xw={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Zw={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Qw={math:{},text:{}};function P(e,t,n,r,i,a){Qw[e][i]={font:t,group:n,replace:r},a&&r&&(Qw[e][r]=Qw[e][i])}var F=`math`,I=`text`,L=`main`,R=`ams`,$w=`accent-token`,z=`bin`,eT=`close`,tT=`inner`,nT=`mathord`,rT=`op-token`,iT=`open`,aT=`punct`,B=`rel`,oT=`spacing`,V=`textord`;P(F,L,B,`≡`,`\\equiv`,!0),P(F,L,B,`≺`,`\\prec`,!0),P(F,L,B,`≻`,`\\succ`,!0),P(F,L,B,`∼`,`\\sim`,!0),P(F,L,B,`⊥`,`\\perp`),P(F,L,B,`⪯`,`\\preceq`,!0),P(F,L,B,`⪰`,`\\succeq`,!0),P(F,L,B,`≃`,`\\simeq`,!0),P(F,L,B,`∣`,`\\mid`,!0),P(F,L,B,`≪`,`\\ll`,!0),P(F,L,B,`≫`,`\\gg`,!0),P(F,L,B,`≍`,`\\asymp`,!0),P(F,L,B,`∥`,`\\parallel`),P(F,L,B,`⋈`,`\\bowtie`,!0),P(F,L,B,`⌣`,`\\smile`,!0),P(F,L,B,`⊑`,`\\sqsubseteq`,!0),P(F,L,B,`⊒`,`\\sqsupseteq`,!0),P(F,L,B,`≐`,`\\doteq`,!0),P(F,L,B,`⌢`,`\\frown`,!0),P(F,L,B,`∋`,`\\ni`,!0),P(F,L,B,`∝`,`\\propto`,!0),P(F,L,B,`⊢`,`\\vdash`,!0),P(F,L,B,`⊣`,`\\dashv`,!0),P(F,L,B,`∋`,`\\owns`),P(F,L,aT,`.`,`\\ldotp`),P(F,L,aT,`⋅`,`\\cdotp`),P(F,L,V,`#`,`\\#`),P(I,L,V,`#`,`\\#`),P(F,L,V,`&`,`\\&`),P(I,L,V,`&`,`\\&`),P(F,L,V,`ℵ`,`\\aleph`,!0),P(F,L,V,`∀`,`\\forall`,!0),P(F,L,V,`ℏ`,`\\hbar`,!0),P(F,L,V,`∃`,`\\exists`,!0),P(F,L,V,`∇`,`\\nabla`,!0),P(F,L,V,`♭`,`\\flat`,!0),P(F,L,V,`ℓ`,`\\ell`,!0),P(F,L,V,`♮`,`\\natural`,!0),P(F,L,V,`♣`,`\\clubsuit`,!0),P(F,L,V,`℘`,`\\wp`,!0),P(F,L,V,`♯`,`\\sharp`,!0),P(F,L,V,`♢`,`\\diamondsuit`,!0),P(F,L,V,`ℜ`,`\\Re`,!0),P(F,L,V,`♡`,`\\heartsuit`,!0),P(F,L,V,`ℑ`,`\\Im`,!0),P(F,L,V,`♠`,`\\spadesuit`,!0),P(F,L,V,`§`,`\\S`,!0),P(I,L,V,`§`,`\\S`),P(F,L,V,`¶`,`\\P`,!0),P(I,L,V,`¶`,`\\P`),P(F,L,V,`†`,`\\dag`),P(I,L,V,`†`,`\\dag`),P(I,L,V,`†`,`\\textdagger`),P(F,L,V,`‡`,`\\ddag`),P(I,L,V,`‡`,`\\ddag`),P(I,L,V,`‡`,`\\textdaggerdbl`),P(F,L,eT,`⎱`,`\\rmoustache`,!0),P(F,L,iT,`⎰`,`\\lmoustache`,!0),P(F,L,eT,`⟯`,`\\rgroup`,!0),P(F,L,iT,`⟮`,`\\lgroup`,!0),P(F,L,z,`∓`,`\\mp`,!0),P(F,L,z,`⊖`,`\\ominus`,!0),P(F,L,z,`⊎`,`\\uplus`,!0),P(F,L,z,`⊓`,`\\sqcap`,!0),P(F,L,z,`∗`,`\\ast`),P(F,L,z,`⊔`,`\\sqcup`,!0),P(F,L,z,`◯`,`\\bigcirc`,!0),P(F,L,z,`∙`,`\\bullet`,!0),P(F,L,z,`‡`,`\\ddagger`),P(F,L,z,`≀`,`\\wr`,!0),P(F,L,z,`⨿`,`\\amalg`),P(F,L,z,`&`,`\\And`),P(F,L,B,`⟵`,`\\longleftarrow`,!0),P(F,L,B,`⇐`,`\\Leftarrow`,!0),P(F,L,B,`⟸`,`\\Longleftarrow`,!0),P(F,L,B,`⟶`,`\\longrightarrow`,!0),P(F,L,B,`⇒`,`\\Rightarrow`,!0),P(F,L,B,`⟹`,`\\Longrightarrow`,!0),P(F,L,B,`↔`,`\\leftrightarrow`,!0),P(F,L,B,`⟷`,`\\longleftrightarrow`,!0),P(F,L,B,`⇔`,`\\Leftrightarrow`,!0),P(F,L,B,`⟺`,`\\Longleftrightarrow`,!0),P(F,L,B,`↦`,`\\mapsto`,!0),P(F,L,B,`⟼`,`\\longmapsto`,!0),P(F,L,B,`↗`,`\\nearrow`,!0),P(F,L,B,`↩`,`\\hookleftarrow`,!0),P(F,L,B,`↪`,`\\hookrightarrow`,!0),P(F,L,B,`↘`,`\\searrow`,!0),P(F,L,B,`↼`,`\\leftharpoonup`,!0),P(F,L,B,`⇀`,`\\rightharpoonup`,!0),P(F,L,B,`↙`,`\\swarrow`,!0),P(F,L,B,`↽`,`\\leftharpoondown`,!0),P(F,L,B,`⇁`,`\\rightharpoondown`,!0),P(F,L,B,`↖`,`\\nwarrow`,!0),P(F,L,B,`⇌`,`\\rightleftharpoons`,!0),P(F,R,B,`≮`,`\\nless`,!0),P(F,R,B,``,`\\@nleqslant`),P(F,R,B,``,`\\@nleqq`),P(F,R,B,`⪇`,`\\lneq`,!0),P(F,R,B,`≨`,`\\lneqq`,!0),P(F,R,B,``,`\\@lvertneqq`),P(F,R,B,`⋦`,`\\lnsim`,!0),P(F,R,B,`⪉`,`\\lnapprox`,!0),P(F,R,B,`⊀`,`\\nprec`,!0),P(F,R,B,`⋠`,`\\npreceq`,!0),P(F,R,B,`⋨`,`\\precnsim`,!0),P(F,R,B,`⪹`,`\\precnapprox`,!0),P(F,R,B,`≁`,`\\nsim`,!0),P(F,R,B,``,`\\@nshortmid`),P(F,R,B,`∤`,`\\nmid`,!0),P(F,R,B,`⊬`,`\\nvdash`,!0),P(F,R,B,`⊭`,`\\nvDash`,!0),P(F,R,B,`⋪`,`\\ntriangleleft`),P(F,R,B,`⋬`,`\\ntrianglelefteq`,!0),P(F,R,B,`⊊`,`\\subsetneq`,!0),P(F,R,B,``,`\\@varsubsetneq`),P(F,R,B,`⫋`,`\\subsetneqq`,!0),P(F,R,B,``,`\\@varsubsetneqq`),P(F,R,B,`≯`,`\\ngtr`,!0),P(F,R,B,``,`\\@ngeqslant`),P(F,R,B,``,`\\@ngeqq`),P(F,R,B,`⪈`,`\\gneq`,!0),P(F,R,B,`≩`,`\\gneqq`,!0),P(F,R,B,``,`\\@gvertneqq`),P(F,R,B,`⋧`,`\\gnsim`,!0),P(F,R,B,`⪊`,`\\gnapprox`,!0),P(F,R,B,`⊁`,`\\nsucc`,!0),P(F,R,B,`⋡`,`\\nsucceq`,!0),P(F,R,B,`⋩`,`\\succnsim`,!0),P(F,R,B,`⪺`,`\\succnapprox`,!0),P(F,R,B,`≆`,`\\ncong`,!0),P(F,R,B,``,`\\@nshortparallel`),P(F,R,B,`∦`,`\\nparallel`,!0),P(F,R,B,`⊯`,`\\nVDash`,!0),P(F,R,B,`⋫`,`\\ntriangleright`),P(F,R,B,`⋭`,`\\ntrianglerighteq`,!0),P(F,R,B,``,`\\@nsupseteqq`),P(F,R,B,`⊋`,`\\supsetneq`,!0),P(F,R,B,``,`\\@varsupsetneq`),P(F,R,B,`⫌`,`\\supsetneqq`,!0),P(F,R,B,``,`\\@varsupsetneqq`),P(F,R,B,`⊮`,`\\nVdash`,!0),P(F,R,B,`⪵`,`\\precneqq`,!0),P(F,R,B,`⪶`,`\\succneqq`,!0),P(F,R,B,``,`\\@nsubseteqq`),P(F,R,z,`⊴`,`\\unlhd`),P(F,R,z,`⊵`,`\\unrhd`),P(F,R,B,`↚`,`\\nleftarrow`,!0),P(F,R,B,`↛`,`\\nrightarrow`,!0),P(F,R,B,`⇍`,`\\nLeftarrow`,!0),P(F,R,B,`⇏`,`\\nRightarrow`,!0),P(F,R,B,`↮`,`\\nleftrightarrow`,!0),P(F,R,B,`⇎`,`\\nLeftrightarrow`,!0),P(F,R,B,`△`,`\\vartriangle`),P(F,R,V,`ℏ`,`\\hslash`),P(F,R,V,`▽`,`\\triangledown`),P(F,R,V,`◊`,`\\lozenge`),P(F,R,V,`Ⓢ`,`\\circledS`),P(F,R,V,`®`,`\\circledR`),P(I,R,V,`®`,`\\circledR`),P(F,R,V,`∡`,`\\measuredangle`,!0),P(F,R,V,`∄`,`\\nexists`),P(F,R,V,`℧`,`\\mho`),P(F,R,V,`Ⅎ`,`\\Finv`,!0),P(F,R,V,`⅁`,`\\Game`,!0),P(F,R,V,`‵`,`\\backprime`),P(F,R,V,`▲`,`\\blacktriangle`),P(F,R,V,`▼`,`\\blacktriangledown`),P(F,R,V,`■`,`\\blacksquare`),P(F,R,V,`⧫`,`\\blacklozenge`),P(F,R,V,`★`,`\\bigstar`),P(F,R,V,`∢`,`\\sphericalangle`,!0),P(F,R,V,`∁`,`\\complement`,!0),P(F,R,V,`ð`,`\\eth`,!0),P(I,L,V,`ð`,`ð`),P(F,R,V,`╱`,`\\diagup`),P(F,R,V,`╲`,`\\diagdown`),P(F,R,V,`□`,`\\square`),P(F,R,V,`□`,`\\Box`),P(F,R,V,`◊`,`\\Diamond`),P(F,R,V,`¥`,`\\yen`,!0),P(I,R,V,`¥`,`\\yen`,!0),P(F,R,V,`✓`,`\\checkmark`,!0),P(I,R,V,`✓`,`\\checkmark`),P(F,R,V,`ℶ`,`\\beth`,!0),P(F,R,V,`ℸ`,`\\daleth`,!0),P(F,R,V,`ℷ`,`\\gimel`,!0),P(F,R,V,`ϝ`,`\\digamma`,!0),P(F,R,V,`ϰ`,`\\varkappa`),P(F,R,iT,`┌`,`\\@ulcorner`,!0),P(F,R,eT,`┐`,`\\@urcorner`,!0),P(F,R,iT,`└`,`\\@llcorner`,!0),P(F,R,eT,`┘`,`\\@lrcorner`,!0),P(F,R,B,`≦`,`\\leqq`,!0),P(F,R,B,`⩽`,`\\leqslant`,!0),P(F,R,B,`⪕`,`\\eqslantless`,!0),P(F,R,B,`≲`,`\\lesssim`,!0),P(F,R,B,`⪅`,`\\lessapprox`,!0),P(F,R,B,`≊`,`\\approxeq`,!0),P(F,R,z,`⋖`,`\\lessdot`),P(F,R,B,`⋘`,`\\lll`,!0),P(F,R,B,`≶`,`\\lessgtr`,!0),P(F,R,B,`⋚`,`\\lesseqgtr`,!0),P(F,R,B,`⪋`,`\\lesseqqgtr`,!0),P(F,R,B,`≑`,`\\doteqdot`),P(F,R,B,`≓`,`\\risingdotseq`,!0),P(F,R,B,`≒`,`\\fallingdotseq`,!0),P(F,R,B,`∽`,`\\backsim`,!0),P(F,R,B,`⋍`,`\\backsimeq`,!0),P(F,R,B,`⫅`,`\\subseteqq`,!0),P(F,R,B,`⋐`,`\\Subset`,!0),P(F,R,B,`⊏`,`\\sqsubset`,!0),P(F,R,B,`≼`,`\\preccurlyeq`,!0),P(F,R,B,`⋞`,`\\curlyeqprec`,!0),P(F,R,B,`≾`,`\\precsim`,!0),P(F,R,B,`⪷`,`\\precapprox`,!0),P(F,R,B,`⊲`,`\\vartriangleleft`),P(F,R,B,`⊴`,`\\trianglelefteq`),P(F,R,B,`⊨`,`\\vDash`,!0),P(F,R,B,`⊪`,`\\Vvdash`,!0),P(F,R,B,`⌣`,`\\smallsmile`),P(F,R,B,`⌢`,`\\smallfrown`),P(F,R,B,`≏`,`\\bumpeq`,!0),P(F,R,B,`≎`,`\\Bumpeq`,!0),P(F,R,B,`≧`,`\\geqq`,!0),P(F,R,B,`⩾`,`\\geqslant`,!0),P(F,R,B,`⪖`,`\\eqslantgtr`,!0),P(F,R,B,`≳`,`\\gtrsim`,!0),P(F,R,B,`⪆`,`\\gtrapprox`,!0),P(F,R,z,`⋗`,`\\gtrdot`),P(F,R,B,`⋙`,`\\ggg`,!0),P(F,R,B,`≷`,`\\gtrless`,!0),P(F,R,B,`⋛`,`\\gtreqless`,!0),P(F,R,B,`⪌`,`\\gtreqqless`,!0),P(F,R,B,`≖`,`\\eqcirc`,!0),P(F,R,B,`≗`,`\\circeq`,!0),P(F,R,B,`≜`,`\\triangleq`,!0),P(F,R,B,`∼`,`\\thicksim`),P(F,R,B,`≈`,`\\thickapprox`),P(F,R,B,`⫆`,`\\supseteqq`,!0),P(F,R,B,`⋑`,`\\Supset`,!0),P(F,R,B,`⊐`,`\\sqsupset`,!0),P(F,R,B,`≽`,`\\succcurlyeq`,!0),P(F,R,B,`⋟`,`\\curlyeqsucc`,!0),P(F,R,B,`≿`,`\\succsim`,!0),P(F,R,B,`⪸`,`\\succapprox`,!0),P(F,R,B,`⊳`,`\\vartriangleright`),P(F,R,B,`⊵`,`\\trianglerighteq`),P(F,R,B,`⊩`,`\\Vdash`,!0),P(F,R,B,`∣`,`\\shortmid`),P(F,R,B,`∥`,`\\shortparallel`),P(F,R,B,`≬`,`\\between`,!0),P(F,R,B,`⋔`,`\\pitchfork`,!0),P(F,R,B,`∝`,`\\varpropto`),P(F,R,B,`◀`,`\\blacktriangleleft`),P(F,R,B,`∴`,`\\therefore`,!0),P(F,R,B,`∍`,`\\backepsilon`),P(F,R,B,`▶`,`\\blacktriangleright`),P(F,R,B,`∵`,`\\because`,!0),P(F,R,B,`⋘`,`\\llless`),P(F,R,B,`⋙`,`\\gggtr`),P(F,R,z,`⊲`,`\\lhd`),P(F,R,z,`⊳`,`\\rhd`),P(F,R,B,`≂`,`\\eqsim`,!0),P(F,L,B,`⋈`,`\\Join`),P(F,R,B,`≑`,`\\Doteq`,!0),P(F,R,z,`∔`,`\\dotplus`,!0),P(F,R,z,`∖`,`\\smallsetminus`),P(F,R,z,`⋒`,`\\Cap`,!0),P(F,R,z,`⋓`,`\\Cup`,!0),P(F,R,z,`⩞`,`\\doublebarwedge`,!0),P(F,R,z,`⊟`,`\\boxminus`,!0),P(F,R,z,`⊞`,`\\boxplus`,!0),P(F,R,z,`⋇`,`\\divideontimes`,!0),P(F,R,z,`⋉`,`\\ltimes`,!0),P(F,R,z,`⋊`,`\\rtimes`,!0),P(F,R,z,`⋋`,`\\leftthreetimes`,!0),P(F,R,z,`⋌`,`\\rightthreetimes`,!0),P(F,R,z,`⋏`,`\\curlywedge`,!0),P(F,R,z,`⋎`,`\\curlyvee`,!0),P(F,R,z,`⊝`,`\\circleddash`,!0),P(F,R,z,`⊛`,`\\circledast`,!0),P(F,R,z,`⋅`,`\\centerdot`),P(F,R,z,`⊺`,`\\intercal`,!0),P(F,R,z,`⋒`,`\\doublecap`),P(F,R,z,`⋓`,`\\doublecup`),P(F,R,z,`⊠`,`\\boxtimes`,!0),P(F,R,B,`⇢`,`\\dashrightarrow`,!0),P(F,R,B,`⇠`,`\\dashleftarrow`,!0),P(F,R,B,`⇇`,`\\leftleftarrows`,!0),P(F,R,B,`⇆`,`\\leftrightarrows`,!0),P(F,R,B,`⇚`,`\\Lleftarrow`,!0),P(F,R,B,`↞`,`\\twoheadleftarrow`,!0),P(F,R,B,`↢`,`\\leftarrowtail`,!0),P(F,R,B,`↫`,`\\looparrowleft`,!0),P(F,R,B,`⇋`,`\\leftrightharpoons`,!0),P(F,R,B,`↶`,`\\curvearrowleft`,!0),P(F,R,B,`↺`,`\\circlearrowleft`,!0),P(F,R,B,`↰`,`\\Lsh`,!0),P(F,R,B,`⇈`,`\\upuparrows`,!0),P(F,R,B,`↿`,`\\upharpoonleft`,!0),P(F,R,B,`⇃`,`\\downharpoonleft`,!0),P(F,L,B,`⊶`,`\\origof`,!0),P(F,L,B,`⊷`,`\\imageof`,!0),P(F,R,B,`⊸`,`\\multimap`,!0),P(F,R,B,`↭`,`\\leftrightsquigarrow`,!0),P(F,R,B,`⇉`,`\\rightrightarrows`,!0),P(F,R,B,`⇄`,`\\rightleftarrows`,!0),P(F,R,B,`↠`,`\\twoheadrightarrow`,!0),P(F,R,B,`↣`,`\\rightarrowtail`,!0),P(F,R,B,`↬`,`\\looparrowright`,!0),P(F,R,B,`↷`,`\\curvearrowright`,!0),P(F,R,B,`↻`,`\\circlearrowright`,!0),P(F,R,B,`↱`,`\\Rsh`,!0),P(F,R,B,`⇊`,`\\downdownarrows`,!0),P(F,R,B,`↾`,`\\upharpoonright`,!0),P(F,R,B,`⇂`,`\\downharpoonright`,!0),P(F,R,B,`⇝`,`\\rightsquigarrow`,!0),P(F,R,B,`⇝`,`\\leadsto`),P(F,R,B,`⇛`,`\\Rrightarrow`,!0),P(F,R,B,`↾`,`\\restriction`),P(F,L,V,`‘`,"`"),P(F,L,V,`$`,`\\$`),P(I,L,V,`$`,`\\$`),P(I,L,V,`$`,`\\textdollar`),P(F,L,V,`%`,`\\%`),P(I,L,V,`%`,`\\%`),P(F,L,V,`_`,`\\_`),P(I,L,V,`_`,`\\_`),P(I,L,V,`_`,`\\textunderscore`),P(F,L,V,`∠`,`\\angle`,!0),P(F,L,V,`∞`,`\\infty`,!0),P(F,L,V,`′`,`\\prime`),P(F,L,V,`△`,`\\triangle`),P(F,L,V,`Γ`,`\\Gamma`,!0),P(F,L,V,`Δ`,`\\Delta`,!0),P(F,L,V,`Θ`,`\\Theta`,!0),P(F,L,V,`Λ`,`\\Lambda`,!0),P(F,L,V,`Ξ`,`\\Xi`,!0),P(F,L,V,`Π`,`\\Pi`,!0),P(F,L,V,`Σ`,`\\Sigma`,!0),P(F,L,V,`Υ`,`\\Upsilon`,!0),P(F,L,V,`Φ`,`\\Phi`,!0),P(F,L,V,`Ψ`,`\\Psi`,!0),P(F,L,V,`Ω`,`\\Omega`,!0),P(F,L,V,`A`,`Α`),P(F,L,V,`B`,`Β`),P(F,L,V,`E`,`Ε`),P(F,L,V,`Z`,`Ζ`),P(F,L,V,`H`,`Η`),P(F,L,V,`I`,`Ι`),P(F,L,V,`K`,`Κ`),P(F,L,V,`M`,`Μ`),P(F,L,V,`N`,`Ν`),P(F,L,V,`O`,`Ο`),P(F,L,V,`P`,`Ρ`),P(F,L,V,`T`,`Τ`),P(F,L,V,`X`,`Χ`),P(F,L,V,`¬`,`\\neg`,!0),P(F,L,V,`¬`,`\\lnot`),P(F,L,V,`⊤`,`\\top`),P(F,L,V,`⊥`,`\\bot`),P(F,L,V,`∅`,`\\emptyset`),P(F,R,V,`∅`,`\\varnothing`),P(F,L,nT,`α`,`\\alpha`,!0),P(F,L,nT,`β`,`\\beta`,!0),P(F,L,nT,`γ`,`\\gamma`,!0),P(F,L,nT,`δ`,`\\delta`,!0),P(F,L,nT,`ϵ`,`\\epsilon`,!0),P(F,L,nT,`ζ`,`\\zeta`,!0),P(F,L,nT,`η`,`\\eta`,!0),P(F,L,nT,`θ`,`\\theta`,!0),P(F,L,nT,`ι`,`\\iota`,!0),P(F,L,nT,`κ`,`\\kappa`,!0),P(F,L,nT,`λ`,`\\lambda`,!0),P(F,L,nT,`μ`,`\\mu`,!0),P(F,L,nT,`ν`,`\\nu`,!0),P(F,L,nT,`ξ`,`\\xi`,!0),P(F,L,nT,`ο`,`\\omicron`,!0),P(F,L,nT,`π`,`\\pi`,!0),P(F,L,nT,`ρ`,`\\rho`,!0),P(F,L,nT,`σ`,`\\sigma`,!0),P(F,L,nT,`τ`,`\\tau`,!0),P(F,L,nT,`υ`,`\\upsilon`,!0),P(F,L,nT,`ϕ`,`\\phi`,!0),P(F,L,nT,`χ`,`\\chi`,!0),P(F,L,nT,`ψ`,`\\psi`,!0),P(F,L,nT,`ω`,`\\omega`,!0),P(F,L,nT,`ε`,`\\varepsilon`,!0),P(F,L,nT,`ϑ`,`\\vartheta`,!0),P(F,L,nT,`ϖ`,`\\varpi`,!0),P(F,L,nT,`ϱ`,`\\varrho`,!0),P(F,L,nT,`ς`,`\\varsigma`,!0),P(F,L,nT,`φ`,`\\varphi`,!0),P(F,L,z,`∗`,`*`,!0),P(F,L,z,`+`,`+`),P(F,L,z,`−`,`-`,!0),P(F,L,z,`⋅`,`\\cdot`,!0),P(F,L,z,`∘`,`\\circ`,!0),P(F,L,z,`÷`,`\\div`,!0),P(F,L,z,`±`,`\\pm`,!0),P(F,L,z,`×`,`\\times`,!0),P(F,L,z,`∩`,`\\cap`,!0),P(F,L,z,`∪`,`\\cup`,!0),P(F,L,z,`∖`,`\\setminus`,!0),P(F,L,z,`∧`,`\\land`),P(F,L,z,`∨`,`\\lor`),P(F,L,z,`∧`,`\\wedge`,!0),P(F,L,z,`∨`,`\\vee`,!0),P(F,L,V,`√`,`\\surd`),P(F,L,iT,`⟨`,`\\langle`,!0),P(F,L,iT,`∣`,`\\lvert`),P(F,L,iT,`∥`,`\\lVert`),P(F,L,eT,`?`,`?`),P(F,L,eT,`!`,`!`),P(F,L,eT,`⟩`,`\\rangle`,!0),P(F,L,eT,`∣`,`\\rvert`),P(F,L,eT,`∥`,`\\rVert`),P(F,L,B,`=`,`=`),P(F,L,B,`:`,`:`),P(F,L,B,`≈`,`\\approx`,!0),P(F,L,B,`≅`,`\\cong`,!0),P(F,L,B,`≥`,`\\ge`),P(F,L,B,`≥`,`\\geq`,!0),P(F,L,B,`←`,`\\gets`),P(F,L,B,`>`,`\\gt`,!0),P(F,L,B,`∈`,`\\in`,!0),P(F,L,B,``,`\\@not`),P(F,L,B,`⊂`,`\\subset`,!0),P(F,L,B,`⊃`,`\\supset`,!0),P(F,L,B,`⊆`,`\\subseteq`,!0),P(F,L,B,`⊇`,`\\supseteq`,!0),P(F,R,B,`⊈`,`\\nsubseteq`,!0),P(F,R,B,`⊉`,`\\nsupseteq`,!0),P(F,L,B,`⊨`,`\\models`),P(F,L,B,`←`,`\\leftarrow`,!0),P(F,L,B,`≤`,`\\le`),P(F,L,B,`≤`,`\\leq`,!0),P(F,L,B,`<`,`\\lt`,!0),P(F,L,B,`→`,`\\rightarrow`,!0),P(F,L,B,`→`,`\\to`),P(F,R,B,`≱`,`\\ngeq`,!0),P(F,R,B,`≰`,`\\nleq`,!0),P(F,L,oT,`\xA0`,`\\ `),P(F,L,oT,`\xA0`,`\\space`),P(F,L,oT,`\xA0`,`\\nobreakspace`),P(I,L,oT,`\xA0`,`\\ `),P(I,L,oT,`\xA0`,` `),P(I,L,oT,`\xA0`,`\\space`),P(I,L,oT,`\xA0`,`\\nobreakspace`),P(F,L,oT,null,`\\nobreak`),P(F,L,oT,null,`\\allowbreak`),P(F,L,aT,`,`,`,`),P(F,L,aT,`;`,`;`),P(F,R,z,`⊼`,`\\barwedge`,!0),P(F,R,z,`⊻`,`\\veebar`,!0),P(F,L,z,`⊙`,`\\odot`,!0),P(F,L,z,`⊕`,`\\oplus`,!0),P(F,L,z,`⊗`,`\\otimes`,!0),P(F,L,V,`∂`,`\\partial`,!0),P(F,L,z,`⊘`,`\\oslash`,!0),P(F,R,z,`⊚`,`\\circledcirc`,!0),P(F,R,z,`⊡`,`\\boxdot`,!0),P(F,L,z,`△`,`\\bigtriangleup`),P(F,L,z,`▽`,`\\bigtriangledown`),P(F,L,z,`†`,`\\dagger`),P(F,L,z,`⋄`,`\\diamond`),P(F,L,z,`⋆`,`\\star`),P(F,L,z,`◃`,`\\triangleleft`),P(F,L,z,`▹`,`\\triangleright`),P(F,L,iT,`{`,`\\{`),P(I,L,V,`{`,`\\{`),P(I,L,V,`{`,`\\textbraceleft`),P(F,L,eT,`}`,`\\}`),P(I,L,V,`}`,`\\}`),P(I,L,V,`}`,`\\textbraceright`),P(F,L,iT,`{`,`\\lbrace`),P(F,L,eT,`}`,`\\rbrace`),P(F,L,iT,`[`,`\\lbrack`,!0),P(I,L,V,`[`,`\\lbrack`,!0),P(F,L,eT,`]`,`\\rbrack`,!0),P(I,L,V,`]`,`\\rbrack`,!0),P(F,L,iT,`(`,`\\lparen`,!0),P(F,L,eT,`)`,`\\rparen`,!0),P(I,L,V,`<`,`\\textless`,!0),P(I,L,V,`>`,`\\textgreater`,!0),P(F,L,iT,`⌊`,`\\lfloor`,!0),P(F,L,eT,`⌋`,`\\rfloor`,!0),P(F,L,iT,`⌈`,`\\lceil`,!0),P(F,L,eT,`⌉`,`\\rceil`,!0),P(F,L,V,`\\`,`\\backslash`),P(F,L,V,`∣`,`|`),P(F,L,V,`∣`,`\\vert`),P(I,L,V,`|`,`\\textbar`,!0),P(F,L,V,`∥`,`\\|`),P(F,L,V,`∥`,`\\Vert`),P(I,L,V,`∥`,`\\textbardbl`),P(I,L,V,`~`,`\\textasciitilde`),P(I,L,V,`\\`,`\\textbackslash`),P(I,L,V,`^`,`\\textasciicircum`),P(F,L,B,`↑`,`\\uparrow`,!0),P(F,L,B,`⇑`,`\\Uparrow`,!0),P(F,L,B,`↓`,`\\downarrow`,!0),P(F,L,B,`⇓`,`\\Downarrow`,!0),P(F,L,B,`↕`,`\\updownarrow`,!0),P(F,L,B,`⇕`,`\\Updownarrow`,!0),P(F,L,rT,`∐`,`\\coprod`),P(F,L,rT,`⋁`,`\\bigvee`),P(F,L,rT,`⋀`,`\\bigwedge`),P(F,L,rT,`⨄`,`\\biguplus`),P(F,L,rT,`⋂`,`\\bigcap`),P(F,L,rT,`⋃`,`\\bigcup`),P(F,L,rT,`∫`,`\\int`),P(F,L,rT,`∫`,`\\intop`),P(F,L,rT,`∬`,`\\iint`),P(F,L,rT,`∭`,`\\iiint`),P(F,L,rT,`∏`,`\\prod`),P(F,L,rT,`∑`,`\\sum`),P(F,L,rT,`⨂`,`\\bigotimes`),P(F,L,rT,`⨁`,`\\bigoplus`),P(F,L,rT,`⨀`,`\\bigodot`),P(F,L,rT,`∮`,`\\oint`),P(F,L,rT,`∯`,`\\oiint`),P(F,L,rT,`∰`,`\\oiiint`),P(F,L,rT,`⨆`,`\\bigsqcup`),P(F,L,rT,`∫`,`\\smallint`),P(I,L,tT,`…`,`\\textellipsis`),P(F,L,tT,`…`,`\\mathellipsis`),P(I,L,tT,`…`,`\\ldots`,!0),P(F,L,tT,`…`,`\\ldots`,!0),P(F,L,tT,`⋯`,`\\@cdots`,!0),P(F,L,tT,`⋱`,`\\ddots`,!0),P(F,L,V,`⋮`,`\\varvdots`),P(I,L,V,`⋮`,`\\varvdots`),P(F,L,$w,`ˊ`,`\\acute`),P(F,L,$w,`ˋ`,`\\grave`),P(F,L,$w,`¨`,`\\ddot`),P(F,L,$w,`~`,`\\tilde`),P(F,L,$w,`ˉ`,`\\bar`),P(F,L,$w,`˘`,`\\breve`),P(F,L,$w,`ˇ`,`\\check`),P(F,L,$w,`^`,`\\hat`),P(F,L,$w,`⃗`,`\\vec`),P(F,L,$w,`˙`,`\\dot`),P(F,L,$w,`˚`,`\\mathring`),P(F,L,nT,``,`\\@imath`),P(F,L,nT,``,`\\@jmath`),P(F,L,V,`ı`,`ı`),P(F,L,V,`ȷ`,`ȷ`),P(I,L,V,`ı`,`\\i`,!0),P(I,L,V,`ȷ`,`\\j`,!0),P(I,L,V,`ß`,`\\ss`,!0),P(I,L,V,`æ`,`\\ae`,!0),P(I,L,V,`œ`,`\\oe`,!0),P(I,L,V,`ø`,`\\o`,!0),P(I,L,V,`Æ`,`\\AE`,!0),P(I,L,V,`Œ`,`\\OE`,!0),P(I,L,V,`Ø`,`\\O`,!0),P(I,L,$w,`ˊ`,`\\'`),P(I,L,$w,`ˋ`,"\\`"),P(I,L,$w,`ˆ`,`\\^`),P(I,L,$w,`˜`,`\\~`),P(I,L,$w,`ˉ`,`\\=`),P(I,L,$w,`˘`,`\\u`),P(I,L,$w,`˙`,`\\.`),P(I,L,$w,`¸`,`\\c`),P(I,L,$w,`˚`,`\\r`),P(I,L,$w,`ˇ`,`\\v`),P(I,L,$w,`¨`,`\\"`),P(I,L,$w,`˝`,`\\H`),P(I,L,$w,`◯`,`\\textcircled`);var sT={"--":!0,"---":!0,"``":!0,"''":!0};P(I,L,V,`–`,`--`,!0),P(I,L,V,`–`,`\\textendash`),P(I,L,V,`—`,`---`,!0),P(I,L,V,`—`,`\\textemdash`),P(I,L,V,`‘`,"`",!0),P(I,L,V,`‘`,`\\textquoteleft`),P(I,L,V,`’`,`'`,!0),P(I,L,V,`’`,`\\textquoteright`),P(I,L,V,`“`,"``",!0),P(I,L,V,`“`,`\\textquotedblleft`),P(I,L,V,`”`,`''`,!0),P(I,L,V,`”`,`\\textquotedblright`),P(F,L,V,`°`,`\\degree`,!0),P(I,L,V,`°`,`\\degree`),P(I,L,V,`°`,`\\textdegree`,!0),P(F,L,V,`£`,`\\pounds`),P(F,L,V,`£`,`\\mathsterling`,!0),P(I,L,V,`£`,`\\pounds`),P(I,L,V,`£`,`\\textsterling`,!0),P(F,R,V,`✠`,`\\maltese`),P(I,R,V,`✠`,`\\maltese`);for(var cT=`0123456789/@."`,lT=0;lT<cT.length;lT++){var uT=cT.charAt(lT);P(F,L,V,uT,uT)}for(var dT=`0123456789!@*()-=+";:?/.,`,fT=0;fT<dT.length;fT++){var pT=dT.charAt(fT);P(I,L,V,pT,pT)}for(var mT=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,hT=0;hT<mT.length;hT++){var gT=mT.charAt(hT);P(F,L,nT,gT,gT),P(I,L,V,gT,gT)}P(F,R,V,`C`,`ℂ`),P(I,R,V,`C`,`ℂ`),P(F,R,V,`H`,`ℍ`),P(I,R,V,`H`,`ℍ`),P(F,R,V,`N`,`ℕ`),P(I,R,V,`N`,`ℕ`),P(F,R,V,`P`,`ℙ`),P(I,R,V,`P`,`ℙ`),P(F,R,V,`Q`,`ℚ`),P(I,R,V,`Q`,`ℚ`),P(F,R,V,`R`,`ℝ`),P(I,R,V,`R`,`ℝ`),P(F,R,V,`Z`,`ℤ`),P(I,R,V,`Z`,`ℤ`),P(F,L,nT,`h`,`ℎ`),P(I,L,nT,`h`,`ℎ`);for(var _T=``,vT=0;vT<mT.length;vT++){var yT=mT.charAt(vT);_T=String.fromCharCode(55349,56320+vT),P(F,L,nT,yT,_T),P(I,L,V,yT,_T),_T=String.fromCharCode(55349,56372+vT),P(F,L,nT,yT,_T),P(I,L,V,yT,_T),_T=String.fromCharCode(55349,56424+vT),P(F,L,nT,yT,_T),P(I,L,V,yT,_T),_T=String.fromCharCode(55349,56580+vT),P(F,L,nT,yT,_T),P(I,L,V,yT,_T),_T=String.fromCharCode(55349,56684+vT),P(F,L,nT,yT,_T),P(I,L,V,yT,_T),_T=String.fromCharCode(55349,56736+vT),P(F,L,nT,yT,_T),P(I,L,V,yT,_T),_T=String.fromCharCode(55349,56788+vT),P(F,L,nT,yT,_T),P(I,L,V,yT,_T),_T=String.fromCharCode(55349,56840+vT),P(F,L,nT,yT,_T),P(I,L,V,yT,_T),_T=String.fromCharCode(55349,56944+vT),P(F,L,nT,yT,_T),P(I,L,V,yT,_T),vT<26&&(_T=String.fromCharCode(55349,56632+vT),P(F,L,nT,yT,_T),P(I,L,V,yT,_T),_T=String.fromCharCode(55349,56476+vT),P(F,L,nT,yT,_T),P(I,L,V,yT,_T))}_T=String.fromCharCode(55349,56668),P(F,L,nT,`k`,_T),P(I,L,V,`k`,_T);for(var bT=0;bT<10;bT++){var xT=bT.toString();_T=String.fromCharCode(55349,57294+bT),P(F,L,nT,xT,_T),P(I,L,V,xT,_T),_T=String.fromCharCode(55349,57314+bT),P(F,L,nT,xT,_T),P(I,L,V,xT,_T),_T=String.fromCharCode(55349,57324+bT),P(F,L,nT,xT,_T),P(I,L,V,xT,_T),_T=String.fromCharCode(55349,57334+bT),P(F,L,nT,xT,_T),P(I,L,V,xT,_T)}for(var ST=`ÐÞþ`,CT=0;CT<ST.length;CT++){var wT=ST.charAt(CT);P(F,L,nT,wT,wT),P(I,L,V,wT,wT)}var TT=[[`mathbf`,`textbf`,`Main-Bold`],[`mathbf`,`textbf`,`Main-Bold`],[`mathnormal`,`textit`,`Math-Italic`],[`mathnormal`,`textit`,`Math-Italic`],[`boldsymbol`,`boldsymbol`,`Main-BoldItalic`],[`boldsymbol`,`boldsymbol`,`Main-BoldItalic`],[`mathscr`,`textscr`,`Script-Regular`],[``,``,``],[``,``,``],[``,``,``],[`mathfrak`,`textfrak`,`Fraktur-Regular`],[`mathfrak`,`textfrak`,`Fraktur-Regular`],[`mathbb`,`textbb`,`AMS-Regular`],[`mathbb`,`textbb`,`AMS-Regular`],[`mathboldfrak`,`textboldfrak`,`Fraktur-Regular`],[`mathboldfrak`,`textboldfrak`,`Fraktur-Regular`],[`mathsf`,`textsf`,`SansSerif-Regular`],[`mathsf`,`textsf`,`SansSerif-Regular`],[`mathboldsf`,`textboldsf`,`SansSerif-Bold`],[`mathboldsf`,`textboldsf`,`SansSerif-Bold`],[`mathitsf`,`textitsf`,`SansSerif-Italic`],[`mathitsf`,`textitsf`,`SansSerif-Italic`],[``,``,``],[``,``,``],[`mathtt`,`texttt`,`Typewriter-Regular`],[`mathtt`,`texttt`,`Typewriter-Regular`]],ET=[[`mathbf`,`textbf`,`Main-Bold`],[``,``,``],[`mathsf`,`textsf`,`SansSerif-Regular`],[`mathboldsf`,`textboldsf`,`SansSerif-Bold`],[`mathtt`,`texttt`,`Typewriter-Regular`]],DT=(e,t)=>{var n=e.charCodeAt(0),r=e.charCodeAt(1),i=(n-55296)*1024+(r-56320)+65536,a=t===`math`?0:1;if(119808<=i&&i<120484){var o=Math.floor((i-119808)/26);return[TT[o][2],TT[o][a]]}else if(120782<=i&&i<=120831){var s=Math.floor((i-120782)/10);return[ET[s][2],ET[s][a]]}else if(i===120485||i===120486)return[TT[0][2],TT[0][a]];else if(120486<i&&i<120782)return[``,``];else throw new M(`Unsupported character: `+e)},OT=function(e,t,n){if(Qw[n][e]){var r=Qw[n][e].replace;r&&(e=r)}return{value:e,metrics:qw(e,t,n)}},kT=function(e,t,n,r,i){var a=OT(e,t,n),o=a.metrics;e=a.value;var s;if(o){var c=o.italic;(n===`text`||r&&r.font===`mathit`)&&(c=0),s=new Iw(e,o.height,o.depth,c,o.skew,o.width,i)}else typeof console<`u`&&console.warn(`No character metrics `+(`for '`+e+`' in style '`+t+`' and mode '`+n+`'`)),s=new Iw(e,0,0,0,0,0,i);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var l=r.getColor();l&&(s.style.color=l)}return s},AT=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&OT(e,`Main-Bold`,t).metrics?kT(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||Qw[t][e].font===`main`?kT(e,`Main-Regular`,t,n,r):kT(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},jT=function(e,t,n,r,i){return i!==`textord`&&OT(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},MT=function(e,t,n){var r=e.mode,i=e.text,a=[`mord`],o=r===`math`||r===`text`&&t.font,s=o?t.font:t.fontFamily,c=``,l=``;if(i.charCodeAt(0)===55349&&([c,l]=DT(i,r)),c.length>0)return kT(i,c,r,t,a.concat(l));if(s){var u,d;if(s===`boldsymbol`){var f=jT(i,r,t,a,n);u=f.fontName,d=[f.fontClass]}else o?(u=GT[s].fontName,d=[s]):(u=WT(s,t.fontWeight,t.fontShape),d=[s,t.fontWeight,t.fontShape]);if(OT(i,u,r).metrics)return kT(i,u,r,t,a.concat(d));if(sT.hasOwnProperty(i)&&u.slice(0,10)===`Typewriter`){for(var p=[],m=0;m<i.length;m++)p.push(kT(i[m],u,r,t,a.concat(d)));return zT(p)}}if(n===`mathord`)return kT(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var h=Qw[r][i]&&Qw[r][i].font;if(h===`ams`)return kT(i,WT(`amsrm`,t.fontWeight,t.fontShape),r,t,a.concat(`amsrm`,t.fontWeight,t.fontShape));if(h===`main`||!h)return kT(i,WT(`textrm`,t.fontWeight,t.fontShape),r,t,a.concat(t.fontWeight,t.fontShape));var g=WT(h,t.fontWeight,t.fontShape);return kT(i,g,r,t,a.concat(g,t.fontWeight,t.fontShape))}else throw Error(`unexpected type: `+n+` in makeOrd`)},NT=(e,t)=>{if(Dw(e.classes)!==Dw(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},PT=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof Iw&&r instanceof Iw&&NT(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},FT=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},H=function(e,t,n,r){var i=new Mw(e,t,n,r);return FT(i),i},IT=(e,t,n,r)=>new Mw(e,t,n,r),LT=function(e,t,n){var r=H([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=N(r.height),r.maxFontSize=1,r},RT=function(e,t,n,r){var i=new Nw(e,t,n,r);return FT(i),i},zT=function(e){var t=new Sw(e);return FT(t),t},BT=function(e,t){return e instanceof Sw?H([],[e],t):e},VT=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var c;if(e.positionType===`top`){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-=d.type===`kern`?d.size:d.elem.height+d.elem.depth}c=l}else if(e.positionType===`bottom`)c=-e.positionData;else{var f=e.children[0];if(f.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)c=-f.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)c=-f.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:c}},HT=function(e,t){for(var{children:n,depth:r}=VT(e),i=0,a=0;a<n.length;a++){var o=n[a];if(o.type===`elem`){var s=o.elem;i=Math.max(i,s.maxFontSize,s.height)}}i+=2;var c=H([`pstrut`],[]);c.style.height=N(i);for(var l=[],u=r,d=r,f=r,p=0;p<n.length;p++){var m=n[p];if(m.type===`kern`)f+=m.size;else{var h=m.elem,g=m.wrapperClasses||[],_=m.wrapperStyle||{},v=H(g,[c,h],void 0,_);v.style.top=N(-i-f-h.depth),m.marginLeft&&(v.style.marginLeft=m.marginLeft),m.marginRight&&(v.style.marginRight=m.marginRight),l.push(v),f+=h.height+h.depth}u=Math.min(u,f),d=Math.max(d,f)}var y=H([`vlist`],l);y.style.height=N(d);var b;if(u<0){var x=H([`vlist`],[H([],[])]);x.style.height=N(-u),b=[H([`vlist-r`],[y,H([`vlist-s`],[new Iw(``)])]),H([`vlist-r`],[x])]}else b=[H([`vlist-r`],[y])];var S=H([`vlist-t`],b);return b.length===2&&S.classes.push(`vlist-t2`),S.height=d,S.depth=-u,S},UT=(e,t)=>{var n=H([`mspace`],[],t),r=Ew(e,t);return n.style.marginRight=N(r),n},WT=function(e,t,n){var r=``;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}var i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:t===`textit`?`Italic`:`Regular`;return r+`-`+i},GT={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},KT={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},qT=function(e,t){var[n,r,i]=KT[e],a=IT([`overlay`],[new Lw([new Rw(n)],{width:N(r),height:N(i),style:`width:`+N(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return a.height=i,a.style.height=N(i),a.style.width=N(r),a},JT={number:3,unit:`mu`},YT={number:4,unit:`mu`},XT={number:5,unit:`mu`},ZT={mord:{mop:JT,mbin:YT,mrel:XT,minner:JT},mop:{mord:JT,mop:JT,mrel:XT,minner:JT},mbin:{mord:YT,mop:YT,mopen:YT,minner:YT},mrel:{mord:XT,mop:XT,mopen:XT,minner:XT},mopen:{},mclose:{mop:JT,mbin:YT,mrel:XT,minner:JT},mpunct:{mord:JT,mop:JT,mrel:XT,mopen:JT,mclose:JT,mpunct:JT,minner:JT},minner:{mord:JT,mop:JT,mbin:YT,mrel:XT,mopen:JT,mpunct:JT,minner:JT}},QT={mord:{mop:JT},mop:{mord:JT,mop:JT},mbin:{},mrel:{},mopen:{},mclose:{mop:JT},mpunct:{},minner:{mop:JT}},$T={},eE={},tE={};function U(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},c=0;c<n.length;++c)$T[n[c]]=s;t&&(a&&(eE[t]=a),o&&(tE[t]=o))}function nE(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;U({type:t,names:[],props:{numArgs:0},handler(){throw Error(`Should never be called.`)},htmlBuilder:n,mathmlBuilder:r})}var rE=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},iE=function(e){return e.type===`ordgroup`?e.body:[e]},aE=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),oE=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),sE={display:aw.DISPLAY,text:aw.TEXT,script:aw.SCRIPT,scriptscript:aw.SCRIPTSCRIPT},cE={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},lE=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=hE(e[a],t);if(o instanceof Sw){var s=o.children;i.push(...s)}else i.push(o)}if(PT(i),!n)return i;var c=t;if(e.length===1){var l=e[0];l.type===`sizing`?c=t.havingSize(l.size):l.type===`styling`&&(c=t.havingStyle(sE[l.style]))}var u=H([r[0]||`leftmost`],[],t),d=H([r[1]||`rightmost`],[],t),f=n===`root`;return uE(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&oE.has(r)?t.classes[0]=`mord`:r===`mbin`&&aE.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),uE(i,(e,t)=>{var n=pE(t),r=pE(e),i=n&&r?e.hasClass(`mtight`)?QT[n]?.[r]:ZT[n]?.[r]:null;if(i)return UT(i,c)},{node:u},d,f),i},uE=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=dE(o);if(s){uE(s.children,t,n,null,i);continue}var c=!o.hasClass(`mspace`);if(c){var l=t(o,n.node);l&&(n.insertAfter?n.insertAfter(l):(e.unshift(l),a++))}c?n.node=o:i&&o.hasClass(`newline`)&&(n.node=H([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},dE=function(e){return e instanceof Sw||e instanceof Nw||e instanceof Mw&&e.hasClass(`enclosing`)?e:null},fE=function(e,t){var n=dE(e);if(n){var r=n.children;if(r.length){if(t===`right`)return fE(r[r.length-1],`right`);if(t===`left`)return fE(r[0],`left`)}}return e},pE=function(e,t){return e?(t&&(e=fE(e,t)),cE[e.classes[0]]||null):null},mE=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return H(t.concat(n))},hE=function(e,t,n){if(!e)return H();if(eE[e.type]){var r=eE[e.type](e,t);if(n&&t.size!==n.size){r=H(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}else throw new M(`Got group of unknown type: '`+e.type+`'`)};function gE(e,t){var n=H([`base`],e,t),r=H([`strut`]);return r.style.height=N(n.height+n.depth),n.depth&&(r.style.verticalAlign=N(-n.depth)),n.children.unshift(r),n}function _E(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=lE(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s<r.length;s++)if(o.push(r[s]),r[s].hasClass(`mbin`)||r[s].hasClass(`mrel`)||r[s].hasClass(`allowbreak`)){for(var c=!1;s<r.length-1&&r[s+1].hasClass(`mspace`)&&!r[s+1].hasClass(`newline`);)s++,o.push(r[s]),r[s].hasClass(`nobreak`)&&(c=!0);c||(a.push(gE(o,t)),o=[])}else r[s].hasClass(`newline`)&&(o.pop(),o.length>0&&(a.push(gE(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(gE(o,t));var l;n?(l=gE(lE(n,t,!0),t),l.classes=[`tag`],a.push(l)):i&&a.push(i);var u=H([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=N(u.height+u.depth),u.depth&&(d.style.verticalAlign=N(-u.depth))}return u}function vE(e){return new Sw(e)}var W=class{constructor(e,t,n){this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Dw(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof yE&&this.children[n+1]instanceof yE){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof yE;)r+=this.children[++n].toText();e.appendChild(new yE(r).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<`+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=` `+t+`="`,e+=FC(this.attributes[t]),e+=`"`);this.classes.length>0&&(e+=` class ="`+FC(Dw(this.classes))+`"`),e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},yE=class{constructor(e){this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return FC(this.toText())}toText(){return this.text}},bE=class{constructor(e){this.width=e,e>=.05555&&e<=.05556?this.character=` `:e>=.1666&&e<=.1667?this.character=` `:e>=.2222&&e<=.2223?this.character=` `:e>=.2777&&e<=.2778?this.character=` `:e>=-.05556&&e<=-.05555?this.character=` `:e>=-.1667&&e<=-.1666?this.character=` `:e>=-.2223&&e<=-.2222?this.character=` `:e>=-.2778&&e<=-.2777?this.character=` `:this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,N(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+N(this.width)+`"/>`}toText(){return this.character?this.character:` `}},xE=new Set([`\\imath`,`\\jmath`]),SE=new Set([`mrow`,`mtable`]),CE=function(e,t,n){return Qw[t][e]&&Qw[t][e].replace&&e.charCodeAt(0)!==55349&&!(sT.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=Qw[t][e].replace),new yE(e)},wE=function(e){return e.length===1?e[0]:new W(`mrow`,e)},TE=function(e,t){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`;var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode;if(n===`mathit`)return`italic`;if(n===`boldsymbol`)return e.type===`textord`?`bold`:`bold-italic`;if(n===`mathbf`)return`bold`;if(n===`mathbb`)return`double-struck`;if(n===`mathsfit`)return`sans-serif-italic`;if(n===`mathfrak`)return`fraktur`;if(n===`mathscr`||n===`mathcal`)return`script`;if(n===`mathsf`)return`sans-serif`;if(n===`mathtt`)return`monospace`;var i=e.text;if(xE.has(i))return null;if(Qw[r][i]){var a=Qw[r][i].replace;a&&(i=a)}var o=GT[n].fontName;return qw(i,o,r)?GT[n].variant:null};function EE(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof yE&&t.text===`.`}else if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof yE&&n.text===`,`}else return!1}var DE=function(e,t,n){if(e.length===1){var r=kE(e[0],t);return n&&r instanceof W&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=kE(e[o],t);if(s instanceof W&&a instanceof W){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)){a.children.push(...s.children);continue}else if(s.type===`mn`&&a.type===`mn`){a.children.push(...s.children);continue}else if(EE(s)&&a.type===`mn`){a.children.push(...s.children);continue}else if(s.type===`mn`&&EE(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||EE(a))){var c=s.children[0];c instanceof W&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof yE&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof yE&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},OE=function(e,t,n){return wE(DE(e,t,n))},kE=function(e,t){if(!e)return new W(`mrow`);if(tE[e.type])return tE[e.type](e,t);throw new M(`Got group of unknown type: '`+e.type+`'`)};function AE(e,t,n,r,i){var a=DE(e,n),o=a.length===1&&a[0]instanceof W&&SE.has(a[0].type)?a[0]:new W(`mrow`,a),s=new W(`annotation`,[new yE(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new W(`math`,[new W(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),H([i?`katex`:`katex-mathml`],[c])}var jE=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],ME=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],NE=function(e,t){return t.size<2?e:jE[e-1][t.size-1]},PE=class e{constructor(t){this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=ME[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:NE(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:ME[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=NE(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=Yw(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};PE.BASESIZE=6;var FE=function(e){return new PE({style:e.displayMode?aw.DISPLAY:aw.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},IE=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=H(n,[e])}return e},LE=function(e,t,n){var r=FE(n),i;return n.output===`mathml`?AE(e,t,r,n.displayMode,!0):(i=n.output===`html`?H([`katex`],[_E(e,r)]):H([`katex`],[AE(e,t,r,n.displayMode,!1),_E(e,r)]),IE(i,n))},RE=function(e,t,n){return IE(H([`katex`],[_E(e,FE(n))]),n)},zE={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},BE=function(e){var t=new W(`mo`,[new yE(zE[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},VE={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},HE=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),UE=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(HE.has(r)){var i=e,a=i.base.type===`ordgroup`?i.base.body.length:1,o,s,c;if(a>5)r===`widehat`||r===`widecheck`?(o=420,n=2364,c=.42,s=r+`4`):(o=312,n=2340,c=.34,s=`tilde4`);else{var l=[1,1,2,2,3,3][a];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][l],o=[0,239,300,360,420][l],c=[0,.24,.3,.3,.36,.42][l],s=r+l):(n=[0,600,1033,2339,2340][l],o=[0,260,286,306,312][l],c=[0,.26,.286,.3,.306,.34][l],s=`tilde`+l)}return{span:IT([],[new Lw([new Rw(s)],{width:`100%`,height:N(c),viewBox:`0 0 `+n+` `+o,preserveAspectRatio:`none`})],t),minWidth:0,height:c}}else{var u=[],d=VE[r],[f,p,m]=d,h=m/1e3,g=f.length,_,v;if(g===1){var y=d[3];_=[`hide-tail`],v=[y]}else if(g===2)_=[`halfarrow-left`,`halfarrow-right`],v=[`xMinYMin`,`xMaxYMin`];else if(g===3)_=[`brace-left`,`brace-center`,`brace-right`],v=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
|
|
416
|
+
`+g+` children.`);for(var b=0;b<g;b++){var x=new Lw([new Rw(f[b])],{width:`400em`,height:N(h),viewBox:`0 0 `+n+` `+m,preserveAspectRatio:v[b]+` slice`}),S=IT([_[b]],[x],t);if(g===1)return{span:S,minWidth:p,height:h};S.style.height=N(h),u.push(S)}return{span:H([`stretchy`],u,t),minWidth:p,height:h}}}var{span:r,minWidth:i,height:a}=n();return r.height=a,r.style.height=N(a),i>0&&(r.style.minWidth=N(i)),r},WE=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=H([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new zw({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new zw({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=IT([],[new Lw(c,{width:`100%`,height:N(o)})],i)}return a.height=o,a.style.height=N(o),a};function GE(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function KE(e){var t=qE(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function qE(e){return e&&(e.type===`atom`||Zw.hasOwnProperty(e.type))?e:null}var JE=e=>{if(e instanceof Iw)return e;if(Hw(e)&&e.children.length===1)return JE(e.children[0])},YE=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=GE(e.base,`accent`),n=r.base,e.base=n,i=Vw(hE(e,t)),e.base=r):(r=GE(e,`accent`),n=r.base);var a=hE(n,t.havingCrampedStyle()),o=r.isShifty&&RC(n),s=0;o&&(s=JE(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=UE(r,t),u=HT({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+N(2*s)+`)`,marginLeft:N(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=qT(`vec`,t),f=KT.vec[1]):(d=MT({type:`textord`,mode:r.mode,text:r.label},t,`textord`),d=Bw(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=H([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=N(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=HT({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=H([`mord`,`accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},XE=(e,t)=>{var n=e.isStretchy?BE(e.label):new W(`mo`,[CE(e.label,e.mode)]),r=new W(`mover`,[kE(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},ZE=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));U({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],props:{numArgs:1},handler:(e,t)=>{var n=rE(t[0]),r=!ZE.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:YE,mathmlBuilder:XE}),U({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:YE,mathmlBuilder:XE}),U({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=hE(e.base,t),r=UE(e,t),i=e.label===`\\utilde`?.12:0;return H([`mord`,`accentunder`],[HT({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=BE(e.label),r=new W(`munder`,[kE(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var QE=e=>{var t=new W(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};U({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=BT(hE(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=BT(hE(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=UE(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=HT({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c},{type:`elem`,elem:o,shift:d}]})}else u=HT({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c}]});return u.children[0].children[0].children[1].classes.push(`svg-align`),H([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=BE(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=QE(kE(e.body,t));r=e.below?new W(`munderover`,[n,QE(kE(e.below,t)),i]):new W(`mover`,[n,i])}else e.below?r=new W(`munder`,[n,QE(kE(e.below,t))]):(r=QE(),r=new W(`mover`,[n,r]));return r}});function $E(e,t){var n=lE(e.body,t,!0);return H([e.mclass],n,t)}function eD(e,t){var n,r=DE(e.body,t);return e.mclass===`minner`?n=new W(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new W(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new W(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):e.mclass===`mopen`||e.mclass===`mclose`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`):e.mclass===`minner`&&(n.attributes.lspace=`0.0556em`,n.attributes.width=`+0.1111em`)),n}U({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:iE(i),isCharacterBox:RC(i)}},htmlBuilder:$E,mathmlBuilder:eD});var tD=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};U({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:tD(t[0]),body:iE(t[1]),isCharacterBox:RC(t[1])}}}),U({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:tD(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:iE(i)},c={type:`supsub`,mode:a.mode,base:s,sup:r===`\\underset`?null:a,sub:r===`\\underset`?a:null};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:RC(c)}},htmlBuilder:$E,mathmlBuilder:eD}),U({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:tD(t[0]),body:iE(t[0])}},htmlBuilder(e,t){var n=lE(e.body,t,!0),r=H([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new W(`mstyle`,DE(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var nD={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},rD=()=>({type:`styling`,body:[],mode:`math`,style:`display`}),iD=e=>e.type===`textord`&&e.text===`@`,aD=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function oD(e,t,n){var r=nD[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function sD(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new M(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=rD(),c=0;c<o.length;c++)if(!iD(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=KE(o[c]).text,u=[,,];if(u[0]={type:`ordgroup`,mode:`math`,body:[]},u[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(l))if(`<>AV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;p<o.length;p++){if(aD(o[p],l)){f=!1,c=p;break}if(iD(o[p]))throw new M(`Missing a `+l+` character to complete a CD arrow.`,o[p]);u[d].body.push(o[p])}if(f)throw new M(`Missing a `+l+` character to complete a CD arrow.`,o[c])}else throw new M(`Expected one of "<>AV=|." after @`,o[c]);var m={type:`styling`,body:[oD(l,u,e)],mode:`math`,style:`display`};r.push(m),s=rD()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}U({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=BT(hE(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=N(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new W(`mrow`,[kE(e.label,t)]);return n=new W(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new W(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),U({type:`cdlabelparent`,names:[`\\\\cdparent`],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=BT(hE(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new W(`mrow`,[kE(e.fragment,t)])}}),U({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=GE(t[0],`ordgroup`).body,i=``,a=0;a<r.length;a++){var o=GE(r[a],`textord`);i+=o.text}var s=parseInt(i),c;if(isNaN(s))throw new M(`\\@char has non-numeric argument `+i);if(s<0||s>=1114111)throw new M(`\\@char with invalid code point `+i);return s<=65535?c=String.fromCharCode(s):(s-=65536,c=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:`textord`,mode:n.mode,text:c}}});var cD=(e,t)=>zT(lE(e.body,t.withColor(e.color),!1)),lD=(e,t)=>{var n=new W(`mstyle`,DE(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n};U({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=GE(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:iE(i)}},htmlBuilder:cD,mathmlBuilder:lD}),U({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=GE(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}},htmlBuilder:cD,mathmlBuilder:lD}),U({type:`cr`,names:[`\\\\`],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&GE(i,`size`).value}},htmlBuilder(e,t){var n=H([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=N(Ew(e.size,t)))),n},mathmlBuilder(e,t){var n=new W(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,N(Ew(e.size,t)))),n}});var uD={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},dD=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new M(`Expected a control sequence`,e);return t},fD=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},pD=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};U({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(uD[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=uD[r.text]),GE(t.parseFunction(),`internal`);throw new M(`Invalid token after macro prefix`,r)}}),U({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new M(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new M(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new M(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new M(`Expected a macro definition`);else s[a].push(r.text);var{tokens:c}=t.gullet.consumeArg();return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===uD[n]),{type:`internal`,mode:t.mode}}}),U({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=dD(t.gullet.popToken());return t.gullet.consumeSpaces(),pD(t,r,fD(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),U({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=dD(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return pD(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var mD=function(e,t,n){var r=qw(Qw.math[e]&&Qw.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},hD=function(e,t,n,r){var i=n.havingBaseStyle(t),a=H(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},gD=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=N(i),e.height-=i,e.depth+=i},_D=function(e,t,n,r,i,a){var o=hD(kT(e,`Main-Regular`,i,r),t,r,a);return n&&gD(o,r,t),o},vD=function(e,t,n,r){return kT(e,`Size`+t+`-Regular`,n,r)},yD=function(e,t,n,r,i,a){var o=vD(e,t,i,r),s=hD(H([`delimsizing`,`size`+t],[o],r),aw.TEXT,r,a);return n&&gD(s,r,aw.TEXT),s},bD=function(e,t,n){return{type:`elem`,elem:H([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[H([],[kT(e,t,n)])])}},xD=function(e,t,n){var r=Uw[`Size4-Regular`][e.charCodeAt(0)]?Uw[`Size4-Regular`][e.charCodeAt(0)][4]:Uw[`Size1-Regular`][e.charCodeAt(0)][4],i=IT([],[new Lw([new Rw(`inner`,yw(e,Math.round(1e3*t)))],{width:N(r),height:N(t),style:`width:`+N(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=N(t),i.style.width=N(r),{type:`elem`,elem:i}},SD=.008,CD={type:`kern`,size:-1*SD},wD=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),TD=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),ED=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):wD.has(e)?(c=`∣`,u=`vert`,d=333):TD.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=mD(o,f,i),m=p.height+p.depth,h=mD(c,f,i),g=h.height+h.depth,_=mD(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=mD(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,w=r.fontMetrics().axisHeight;n&&(w*=r.sizeMultiplier);var T=C/2-w,E=[];if(u.length>0){var ee=C-m-v,te=Math.round(C*1e3),D=xw(u,Math.round(ee*1e3)),ne=new Rw(u,D),re=(d/1e3).toFixed(3)+`em`,ie=(te/1e3).toFixed(3)+`em`,ae=IT([],[new Lw([ne],{width:re,height:ie,viewBox:`0 0 `+d+` `+te})],r);ae.height=te/1e3,ae.style.width=re,ae.style.height=ie,E.push({type:`elem`,elem:ae})}else{if(E.push(bD(l,f,i)),E.push(CD),s===null){var oe=C-m-v+2*SD;E.push(xD(c,oe,r))}else{var se=(C-m-v-y)/2+2*SD;E.push(xD(c,se,r)),E.push(CD),E.push(bD(s,f,i)),E.push(CD),E.push(xD(c,se,r))}E.push(CD),E.push(bD(o,f,i))}var ce=r.havingBaseStyle(aw.TEXT);return hD(H([`delimsizing`,`mult`],[HT({positionType:`bottom`,positionData:T,children:E})],ce),aw.TEXT,r,a)},DD=80,OD=.08,kD=function(e,t,n,r,i){return IT([`hide-tail`],[new Lw([new Rw(e,vw(e,r,n))],{width:`400em`,height:N(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},AD=function(e,t){var n=t.havingBaseSizing(),r=BD(`\\surd`,e*n.sizeMultiplier,RD,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s=0,c=0,l=0,u;return r.type===`small`?(l=1e3+1e3*a+DD,e<1?i=1:e<1.4&&(i=.7),s=(1+a+OD)/i,c=(1+a)/i,o=kD(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+DD)*PD[r.size],c=(PD[r.size]+a)/i,s=(PD[r.size]+a+OD)/i,o=kD(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+OD,c=e+a,l=Math.floor(1e3*e+a)+DD,o=kD(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=N(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},jD=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),MD=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),ND=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),PD=[0,1.2,1.8,2.4,3],FD=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),jD.has(e)||ND.has(e))return yD(e,t,!1,n,r,i);if(MD.has(e))return ED(e,PD[t],!1,n,r,i);throw new M(`Illegal delimiter: '`+e+`'`)},ID=[{type:`small`,style:aw.SCRIPTSCRIPT},{type:`small`,style:aw.SCRIPT},{type:`small`,style:aw.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],LD=[{type:`small`,style:aw.SCRIPTSCRIPT},{type:`small`,style:aw.SCRIPT},{type:`small`,style:aw.TEXT},{type:`stack`}],RD=[{type:`small`,style:aw.SCRIPTSCRIPT},{type:`small`,style:aw.SCRIPT},{type:`small`,style:aw.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],zD=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},BD=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=mD(e,zD(a),`math`),s=o.height+o.depth;if(a.type===`small`){var c=r.havingBaseStyle(a.style);s*=c.sizeMultiplier}if(s>t)return a}return n[n.length-1]},VD=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=ND.has(e)?ID:jD.has(e)?RD:LD,s=BD(e,t,o,r);return s.type===`small`?_D(e,s.style,n,r,i,a):s.type===`large`?yD(e,s.size,n,r,i,a):ED(e,t,n,r,i,a)},HD=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return VD(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},UD={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},WD=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function GD(e,t){var n=qE(e);if(n&&WD.has(n.text))return n;throw n?new M(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new M(`Invalid delimiter type '`+e.type+`'`,e)}U({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],props:{numArgs:1,argTypes:[`primitive`]},handler:(e,t)=>{var n=GD(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:UD[e.funcName].size,mclass:UD[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?H([e.mclass]):FD(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(CE(e.delim,e.mode));var n=new W(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=N(PD[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function KD(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}U({type:`leftright-right`,names:[`\\right`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new M(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:GD(t[0],e).text,color:n}}}),U({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=GD(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=GE(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{KD(e);for(var n=lE(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++)n[o].isMiddle?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i));r*=t.sizeMultiplier,i*=t.sizeMultiplier;var s=e.left===`.`?mE(t,[`mopen`]):HD(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(s),a)for(var c=1;c<n.length;c++){var l=n[c].isMiddle;l&&(n[c]=HD(l.delim,r,i,l.options,e.mode,[]))}var u;if(e.right===`.`)u=mE(t,[`mclose`]);else{var d=e.rightColor?t.withColor(e.rightColor):t;u=HD(e.right,r,i,d,e.mode,[`mclose`])}return n.push(u),H([`minner`],n,t)},mathmlBuilder:(e,t)=>{KD(e);var n=DE(e.body,t);if(e.left!==`.`){var r=new W(`mo`,[CE(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new W(`mo`,[CE(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return wE(n)}}),U({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=GD(t[0],e);if(!e.parser.leftrightDepth)throw new M(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===`.`)n=mE(t,[]);else{n=FD(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n=new W(`mo`,[e.delim===`\\vert`||e.delim===`|`?CE(`|`,`text`):CE(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}});var qD=(e,t)=>{var n=BT(hE(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o=0,s=RC(e.body);if(r===`sout`)a=H([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=Ew({number:.6,unit:`pt`},t),l=Ew({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=N(d/2+c);var f=Math.floor(1e3*d*i);a=IT([`hide-tail`],[new Lw([new Rw(`phase`,gw(f))],{width:`400em`,height:N(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=N(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p=0,m=0,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=WE(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=N(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=N(h),a.style.borderRightWidth=N(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=HT({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=HT({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?H([`mord`,`cancel-lap`],[g],t):H([`mord`],[g],t)},JD=(e,t)=>{var n=0,r=new W(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[kE(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+i+`em solid `+String(e.borderColor))}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`);break}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r};U({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`text`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=GE(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:qD,mathmlBuilder:JD}),U({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`text`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=GE(t[0],`color-token`).color,o=GE(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:qD,mathmlBuilder:JD}),U({type:`enclose`,names:[`\\fbox`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),U({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\sout`,`\\phase`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:qD,mathmlBuilder:JD}),U({type:`enclose`,names:[`\\angl`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\angl`,body:t[0]}}});var YD={};function XD(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)YD[n[c]]=s;a&&(eE[t]=a),o&&(tE[t]=o)}var ZD={};function G(e,t){ZD[e]=t}var QD=class e{constructor(e,t,n){this.lexer=e,this.start=t,this.end=n}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new e(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},$D=class e{constructor(e,t){this.text=e,this.loc=t}range(t,n){return new e(n,QD.range(this,t))}};function eO(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}var tO=e=>{if(!e.parser.settings.displayMode)throw new M(`{`+e.envName+`} can be used only in display mode.`)},nO=new Set([`gather`,`gather*`]);function rO(e){if(!e.includes(`ed`))return!e.includes(`*`)}function iO(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:c,singleRow:l,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new M(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new $D(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(eO(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var S={type:`ordgroup`,mode:e.mode,body:x};n&&(S={type:`styling`,mode:e.mode,style:n,body:[S]}),m.push(S);var C=e.fetch().text;if(C===`&`){if(d&&m.length===d){if(l||s)throw new M(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(C===`\\end`){b(),m.length===1&&S.type===`styling`&&S.body.length===1&&S.body[0].type===`ordgroup`&&S.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(C===`\\\\`){e.consume();var w=void 0;e.gullet.future().text!==` `&&(w=e.parseSizeGroup(!0)),g.push(w?w.value:null),b(),_.push(eO(e)),m=[],h.push(m),y()}else throw new M(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:h,cols:a,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:s,tags:v,leqno:f}}function aO(e){return e.slice(0,1)===`d`?`display`:`text`}var oO=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),c=[],l=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&e.colSeparationType===`small`&&(d=.2778*(t.havingStyle(aw.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?Ew({number:3,unit:`ex`},t):12*u,p=3*u,m=e.arraystretch*f,h=.7*m,g=.3*m,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n<e.body.length;++n){var y=e.body[n],b=h,x=g;o<y.length&&(o=y.length);var S=Array(y.length);for(r=0;r<y.length;++r){var C=hE(y[r],t);x<C.depth&&(x=C.depth),b<C.height&&(b=C.height),S[r]=C}var w=e.rowGaps[n],T=0;w&&(T=Ew(w,t),T>0&&(T+=g,x<T&&(x=T),T=0)),e.addJot&&(x+=p),S.height=b,S.depth=x,_+=b,S.pos=_,_+=x+T,s[n]=S,v(a[n+1])}var E=_/2+t.fontMetrics().axisHeight,ee=e.cols||[],te=[],D,ne,re=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var ie=s[n],ae=ie.pos-E,oe=e.tags[n],se=void 0;se=oe===!0?H([`eqn-num`],[],t):oe===!1?H([],[],t):H([],lE(oe,t,!0),t),se.depth=ie.depth,se.height=ie.height,re.push({type:`elem`,elem:se,shift:ae})}for(r=0,ne=0;r<o||ne<ee.length;++r,++ne){for(var ce=ee[ne],le=!0;(ue=ce)?.type===`separator`;){var ue;if(le||(D=H([`arraycolsep`],[]),D.style.width=N(t.fontMetrics().doubleRuleSep),te.push(D)),ce.separator===`|`||ce.separator===`:`){var de=ce.separator===`|`?`solid`:`dashed`,fe=H([`vertical-separator`],[],t);fe.style.height=N(_),fe.style.borderRightWidth=N(l),fe.style.borderRightStyle=de,fe.style.margin=`0 `+N(-l/2);var pe=_-E;pe&&(fe.style.verticalAlign=N(-pe)),te.push(fe)}else throw new M(`Invalid separator type: `+ce.separator);ne++,ce=ee[ne],le=!1}if(!(r>=o)){var me=void 0;(r>0||e.hskipBeforeAndAfter)&&(me=ce?.pregap??d,me!==0&&(D=H([`arraycolsep`],[]),D.style.width=N(me),te.push(D)));var he=[];for(n=0;n<i;++n){var ge=s[n],_e=ge[r];if(_e){var ve=ge.pos-E;_e.depth=ge.depth,_e.height=ge.height,he.push({type:`elem`,elem:_e,shift:ve})}}var ye=HT({positionType:`individualShift`,children:he}),be=H([`col-align-`+(ce?.align||`c`)],[ye]);te.push(be),(r<o-1||e.hskipBeforeAndAfter)&&(me=ce?.postgap??d,me!==0&&(D=H([`arraycolsep`],[]),D.style.width=N(me),te.push(D)))}}var xe=H([`mtable`],te);if(c.length>0){for(var Se=LT(`hline`,t,l),Ce=LT(`hdashline`,t,l),we=[{type:`elem`,elem:xe,shift:0}];c.length>0;){var Te=c.pop(),Ee=Te.pos-E;Te.isDashed?we.push({type:`elem`,elem:Ce,shift:Ee}):we.push({type:`elem`,elem:Se,shift:Ee})}xe=HT({positionType:`individualShift`,children:we})}if(re.length===0)return H([`mord`],[xe],t);var De=H([`tag`],[HT({positionType:`individualShift`,children:re})],t);return zT([xe,De])},sO={c:`center `,l:`left `,r:`right `},cO=function(e,t){for(var n=[],r=new W(`mtd`,[],[`mtr-glue`]),i=new W(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],c=0;c<o.length;c++)s.push(new W(`mtd`,[kE(o[c],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new W(`mtr`,s))}var l=new W(`mtable`,n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);l.setAttribute(`rowspacing`,N(u));var d=``,f=``;if(e.cols&&e.cols.length>0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=sO[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S<b.length;S++)x+=S%2?`0em `:`1em `;l.setAttribute(`columnspacing`,x.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?l.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?l.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?l.setAttribute(`columnspacing`,`0.5em`):l.setAttribute(`columnspacing`,`1em`);var C=``,w=e.hLinesBeforeRow;d+=w[0].length>0?`left `:``,d+=w[w.length-1].length>0?`right `:``;for(var T=1;T<w.length-1;T++)C+=w[T].length===0?`none `:w[T][0]?`dashed `:`solid `;return/[sd]/.test(C)&&l.setAttribute(`rowlines`,C.trim()),d!==``&&(l=new W(`menclose`,[l]),l.setAttribute(`notation`,d.trim())),e.arraystretch&&e.arraystretch<1&&(l=new W(`mstyle`,[l]),l.setAttribute(`scriptlevel`,`1`)),l},lO=function(e,t){e.envName.includes(`ed`)||tO(e);var n=[],r=e.envName.includes(`at`)?`alignat`:`align`,i=e.envName===`split`,a=iO(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:rO(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},`display`),o=0,s=0,c={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){for(var l=``,u=0;u<t[0].body.length;u++){var d=GE(t[0].body[u],`textord`);l+=d.text}o=Number(l),s=o*2}var f=!s;a.body.forEach(function(e){for(var t=1;t<e.length;t+=2)GE(GE(e[t],`styling`).body[0],`ordgroup`).body.unshift(c);if(f)s<e.length&&(s=e.length);else{var n=e.length/2;if(o<n)throw new M(`Too many math in a row: `+(`expected `+o+`, but got `+n),e[0])}});for(var p=0;p<s;++p){var m=`r`,h=0;p%2==1?m=`l`:p>0&&f&&(h=1),n[p]={type:`align`,align:m,pregap:h,postgap:0}}return a.colSeparationType=f?`align`:`alignat`,a};XD({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(qE(t[0])?[t[0]]:GE(t[0],`ordgroup`).body).map(function(e){var t=KE(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new M(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return iO(e.parser,r,aO(e.envName))},htmlBuilder:oO,mathmlBuilder:cO}),XD({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new M(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=iO(e.parser,r,aO(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:oO,mathmlBuilder:cO}),XD({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=iO(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:oO,mathmlBuilder:cO}),XD({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(qE(t[0])?[t[0]]:GE(t[0],`ordgroup`).body).map(function(e){var t=KE(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new M(`Unknown column alignment: `+t,e)});if(n.length>1)throw new M(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=iO(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new M(`{subarray} can contain only one column`);return i},htmlBuilder:oO,mathmlBuilder:cO}),XD({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=iO(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},aO(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:oO,mathmlBuilder:cO}),XD({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:lO,htmlBuilder:oO,mathmlBuilder:cO}),XD({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){nO.has(e.envName)&&tO(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:rO(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return iO(e.parser,t,`display`)},htmlBuilder:oO,mathmlBuilder:cO}),XD({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:lO,htmlBuilder:oO,mathmlBuilder:cO}),XD({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){tO(e);var t={autoTag:rO(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return iO(e.parser,t,`display`)},htmlBuilder:oO,mathmlBuilder:cO}),XD({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return tO(e),sD(e.parser)},htmlBuilder:oO,mathmlBuilder:cO}),G(`\\nonumber`,`\\gdef\\@eqnsw{0}`),G(`\\notag`,`\\nonumber`),U({type:`text`,names:[`\\hline`,`\\hdashline`],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new M(e.funcName+` valid only within array environment`)}});var uO=YD;U({type:`environment`,names:[`\\begin`,`\\end`],props:{numArgs:1,argTypes:[`text`]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!==`ordgroup`)throw new M(`Invalid environment name`,i);for(var a=``,o=0;o<i.body.length;++o)a+=GE(i.body[o],`textord`).text;if(r===`\\begin`){if(!uO.hasOwnProperty(a))throw new M(`No such environment: `+a,i);var s=uO[a],{args:c,optArgs:l}=n.parseArguments(`\\begin{`+a+`}`,s),u={mode:n.mode,envName:a,parser:n},d=s.handler(u,c,l);n.expect(`\\end`,!1);var f=n.nextToken,p=GE(n.parseFunction(),`environment`);if(p.name!==a)throw new M(`Mismatch: \\begin{`+a+`} matched by \\end{`+p.name+`}`,f);return d}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}});var dO=(e,t)=>{var n=e.font,r=t.withFont(n);return hE(e.body,r)},fO=(e,t)=>{var n=e.font,r=t.withFont(n);return kE(e.body,r)},pO={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`,"\\bm":`\\boldsymbol`};U({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=rE(t[0]),a=r;return a in pO&&(a=pO[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:dO,mathmlBuilder:fO}),U({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`mclass`,mode:n.mode,mclass:tD(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:RC(r)}}}),U({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}},htmlBuilder:dO,mathmlBuilder:fO});var mO=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=hE(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}a=t.havingStyle(i);var l=hE(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=Ew(e.barSize,t),u=LT(`frac-line`,t,d)):u=LT(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===aw.DISPLAY.size?(p=t.fontMetrics().num1,m=d>0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d)<m&&(p+=m-(p-o.depth-(_+.5*d))),_-.5*d-(l.height-h)<m&&(h+=m-(_-.5*d-(l.height-h)));var v=-(_-.5*d);g=HT({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:u,shift:v},{type:`elem`,elem:o,shift:-p}]})}else{var y=p-o.depth-(l.height-h);y<m&&(p+=.5*(m-y),h+=.5*(m-y)),g=HT({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:o,shift:-p}]})}a=t.havingStyle(n),g.height*=a.sizeMultiplier/t.sizeMultiplier,g.depth*=a.sizeMultiplier/t.sizeMultiplier;var b=n.size===aw.DISPLAY.size?t.fontMetrics().delim1:n.size===aw.SCRIPTSCRIPT.size?t.havingStyle(aw.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,x=e.leftDelim==null?mE(t,[`mopen`]):VD(e.leftDelim,b,!0,t.havingStyle(n),e.mode,[`mopen`]),S=e.continued?H([]):e.rightDelim==null?mE(t,[`mclose`]):VD(e.rightDelim,b,!0,t.havingStyle(n),e.mode,[`mclose`]);return H([`mord`].concat(a.sizingClasses(t)),[x,H([`mfrac`],[g]),S],t)},hO=(e,t)=>{var n=new W(`mfrac`,[kE(e.numer,t),kE(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=Ew(e.barSize,t);n.setAttribute(`linethickness`,N(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new W(`mo`,[new yE(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new W(`mo`,[new yE(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return wE(i)}return n},gO=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;U({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),gO({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:mO,mathmlBuilder:hO}),U({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var _O=[`display`,`text`,`script`,`scriptscript`],vO=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};U({type:`genfrac`,names:[`\\genfrac`],props:{numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=rE(t[0]),o=a.type===`atom`&&a.family===`open`?vO(a.text):null,s=rE(t[1]),c=s.type===`atom`&&s.family===`close`?vO(s.text):null,l=GE(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=GE(p.body[0],`textord`);f=_O[Number(m.text)]}}else p=GE(p,`textord`),f=_O[Number(p.text)];return gO({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),U({type:`infix`,names:[`\\above`],props:{numArgs:1,argTypes:[`size`],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:GE(t[0],`size`).value,token:i}}}),U({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=GE(t[1],`infix`).size;if(!a)throw Error(`\\\\abovefrac expected size, but got `+String(a));var o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null}}});var yO=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?hE(e.sup,t.havingStyle(n.sup()),t):hE(e.sub,t.havingStyle(n.sub()),t),i=GE(e.base,`horizBrace`)):i=GE(e,`horizBrace`);var a=hE(i.base,t.havingBaseStyle(aw.DISPLAY)),o=UE(i,t),s;if(i.isOver?(s=HT({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o}]}),s.children[0].children[0].children[1].classes.push(`svg-align`)):(s=HT({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o},{type:`kern`,size:.1},{type:`elem`,elem:a}]}),s.children[0].children[0].children[0].classes.push(`svg-align`)),r){var c=H([`mord`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?HT({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):HT({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return H([`mord`,i.isOver?`mover`:`munder`],[s],t)};U({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:yO,mathmlBuilder:(e,t)=>{var n=BE(e.label);return new W(e.isOver?`mover`:`munder`,[kE(e.base,t),n])}}),U({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=GE(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:iE(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=lE(e.body,t,!1);return RT(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=OE(e.body,t);return n instanceof W||(n=new W(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),U({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=GE(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:iE(s)}}}),U({type:`hbox`,names:[`\\hbox`],props:{numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:`hbox`,mode:n.mode,body:iE(t[0])}},htmlBuilder(e,t){return zT(lE(e.body,t,!1))},mathmlBuilder(e,t){return new W(`mrow`,DE(e.body,t))}}),U({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],props:{numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,token:i}=e,a=GE(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var s,c={};switch(r){case`\\htmlClass`:c.class=a,s={command:`\\htmlClass`,class:a};break;case`\\htmlId`:c.id=a,s={command:`\\htmlId`,id:a};break;case`\\htmlStyle`:c.style=a,s={command:`\\htmlStyle`,style:a};break;case`\\htmlData`:for(var l=a.split(`,`),u=0;u<l.length;u++){var d=l[u],f=d.indexOf(`=`);if(f<0)throw new M(`\\htmlData key/value '`+d+`' missing equals sign`);var p=d.slice(0,f),m=d.slice(f+1);c[`data-`+p.trim()]=m}s={command:`\\htmlData`,attributes:c};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(s)?{type:`html`,mode:n.mode,attributes:c,body:iE(o)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=lE(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=H(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>OE(e.body,t)}),U({type:`htmlmathml`,names:[`\\html@mathml`],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:iE(t[0]),mathml:iE(t[1])}},htmlBuilder:(e,t)=>zT(lE(e.html,t,!1)),mathmlBuilder:(e,t)=>OE(e.mathml,t)});var bO=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new M(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!Tw(n))throw new M(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};U({type:`includegraphics`,names:[`\\includegraphics`],props:{numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=GE(n[0],`raw`).string.split(`,`),l=0;l<c.length;l++){var u=c[l].split(`=`);if(u.length===2){var d=u[1].trim();switch(u[0].trim()){case`alt`:s=d;break;case`width`:i=bO(d);break;case`height`:a=bO(d);break;case`totalheight`:o=bO(d);break;default:throw new M(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=GE(t[0],`url`).url;return s===``&&(s=f,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:f})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:f}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=Ew(e.height,t),r=0;e.totalheight.number>0&&(r=Ew(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=Ew(e.width,t));var a={height:N(n+r)};i>0&&(a.width=N(i)),r>0&&(a.verticalAlign=N(-r));var o=new Pw(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new W(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=Ew(e.height,t),i=0;if(e.totalheight.number>0&&(i=Ew(e.totalheight,t)-r,n.setAttribute(`valign`,N(-i))),n.setAttribute(`height`,N(r+i)),e.width.number>0){var a=Ew(e.width,t);n.setAttribute(`width`,N(a))}return n.setAttribute(`src`,e.src),n}}),U({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],props:{numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=GE(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return UT(e.dimension,t)},mathmlBuilder(e,t){return new bE(Ew(e.dimension,t))}}),U({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=H([],[hE(e.body,t)]),n=H([`inner`],[n],t)):n=H([`inner`],[hE(e.body,t)]);var r=H([`fix`],[]),i=H([e.alignment],[n,r],t),a=H([`strut`]);return a.style.height=N(i.height+i.depth),i.depth&&(a.style.verticalAlign=N(-i.depth)),i.children.unshift(a),i=H([`thinbox`],[i],t),H([`mord`,`vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new W(`mpadded`,[kE(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),U({type:`styling`,names:[`\\(`,`$`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,body:o}}}),U({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new M(`Mismatched `+e.funcName)}});var xO=(e,t)=>{switch(t.style.size){case aw.DISPLAY.size:return e.display;case aw.TEXT.size:return e.text;case aw.SCRIPT.size:return e.script;case aw.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};U({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:iE(t[0]),text:iE(t[1]),script:iE(t[2]),scriptscript:iE(t[3])}},htmlBuilder:(e,t)=>zT(lE(xO(e,t),t,!1)),mathmlBuilder:(e,t)=>OE(xO(e,t),t)});var SO=(e,t,n,r,i,a,o)=>{e=H([],[e]);var s=n&&RC(n),c,l;if(t){var u=hE(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=hE(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=HT({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:N(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:N(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=HT({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:N(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=HT({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:N(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=H([`mspace`],[],r);m.style.marginRight=N(a),p.unshift(m)}return H([`mop`,`op-limits`],p,r)},CO=new Set([`\\smallint`]),wO=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=GE(e.base,`op`),i=!0):a=GE(e,`op`);var o=t.style,s=!1;o.size===aw.DISPLAY.size&&a.symbol&&!CO.has(a.name)&&(s=!0);var c;if(a.symbol){var l=s?`Size2-Regular`:`Size1-Regular`,u=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(u=a.name.slice(1),a.name=u===`oiint`?`\\iint`:`\\iiint`),c=kT(a.name,l,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),u.length>0){var d=c.italic,f=qT(u+`Size`+(s?`2`:`1`),t);c=HT({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+u,c.classes.unshift(`mop`),c.italic=d}}else if(a.body){var p=lE(a.body,t,!0);p.length===1&&p[0]instanceof Iw?(c=p[0],c.classes[0]=`mop`):c=H([`mop`],p,t)}else{for(var m=[],h=1;h<a.name.length;h++)m.push(AT(a.name[h],a.mode,t));c=H([`mop`],m,t)}var g=0,_=0;return(c instanceof Iw||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic||0),i?SO(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=N(g)),c)},TO=(e,t)=>{var n;if(e.symbol)n=new W(`mo`,[CE(e.name,e.mode)]),CO.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new W(`mo`,DE(e.body,t));else{n=new W(`mi`,[new yE(e.name.slice(1))]);var r=new W(`mo`,[CE(``,`text`)]);n=e.parentIsSupSub?new W(`mrow`,[n,r]):vE([n,r])}return n},EO={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};U({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=EO[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:wO,mathmlBuilder:TO}),U({type:`op`,names:[`\\mathop`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:iE(r)}},htmlBuilder:wO,mathmlBuilder:TO});var DO={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};U({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:wO,mathmlBuilder:TO}),U({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:wO,mathmlBuilder:TO}),U({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=DO[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:wO,mathmlBuilder:TO});var OO=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=GE(e.base,`operatorname`),i=!0):a=GE(e,`operatorname`);var o;if(a.body.length>0){for(var s=lE(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c<s.length;c++){var l=s[c];l instanceof Iw&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=H([`mop`],s,t)}else o=H([`mop`],[],t);return i?SO(o,n,r,t,t.style,0,0):o};U({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:iE(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:OO,mathmlBuilder:(e,t)=>{for(var n=DE(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof bE))if(a instanceof W)switch(a.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:var o=a.children[0];a.children.length===1&&o instanceof yE?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}r&&(n=[new yE(n.map(e=>e.toText()).join(``))]);var s=new W(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new W(`mo`,[CE(``,`text`)]);return e.parentIsSupSub?new W(`mrow`,[s,c]):vE([s,c])}}),G(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),nE({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?zT(lE(e.body,t,!1)):H([`mord`],lE(e.body,t,!0),t)},mathmlBuilder(e,t){return OE(e.body,t,!0)}}),U({type:`overline`,names:[`\\overline`],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=hE(e.body,t.havingCrampedStyle()),r=LT(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return H([`mord`,`overline`],[HT({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new W(`mo`,[new yE(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new W(`mover`,[kE(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),U({type:`phantom`,names:[`\\phantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:iE(r)}},htmlBuilder:(e,t)=>zT(lE(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new W(`mphantom`,DE(e.body,t))}),G(`\\hphantom`,`\\smash{\\phantom{#1}}`),U({type:`vphantom`,names:[`\\vphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>H([`mord`,`rlap`],[H([`inner`],[hE(e.body,t.withPhantom())]),H([`fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new W(`mpadded`,[new W(`mphantom`,DE(iE(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),U({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=GE(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=hE(e.body,t);return HT({positionType:`shift`,positionData:-Ew(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new W(`mpadded`,[kE(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),U({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),U({type:`rule`,names:[`\\rule`],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`]},handler(e,t,n){var{parser:r}=e,i=n[0],a=GE(t[0],`size`),o=GE(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&GE(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=H([`mord`,`rule`],[],t),r=Ew(e.width,t),i=Ew(e.height,t),a=e.shift?Ew(e.shift,t):0;return n.style.borderRightWidth=N(r),n.style.borderTopWidth=N(i),n.style.bottom=N(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Ew(e.width,t),r=Ew(e.height,t),i=e.shift?Ew(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new W(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,N(n)),o.setAttribute(`height`,N(r));var s=new W(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,N(i)):(s.setAttribute(`height`,N(i)),s.setAttribute(`depth`,N(-i))),s.setAttribute(`voffset`,N(i)),s}});function kO(e,t,n){for(var r=lE(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`sizing`);o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]===`reset-size`+t.size&&(r[a].classes[o+1]=`reset-size`+n.size),r[a].height*=i,r[a].depth*=i}return zT(r)}var AO=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];U({type:`sizing`,names:AO,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:AO.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return kO(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new W(`mstyle`,DE(e.body,n));return r.setAttribute(`mathsize`,N(n.sizeMultiplier)),r}}),U({type:`smash`,names:[`\\smash`],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&GE(n[0],`ordgroup`);if(o)for(var s=``,c=0;c<o.body.length;++c){var l=o.body[c];if(s=KE(l).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:`smash`,mode:r.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=H([],[hE(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return H([`mord`,`smash`],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);return H([`mord`],[HT({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new W(`mpadded`,[kE(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),U({type:`sqrt`,names:[`\\sqrt`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=hE(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=BT(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<aw.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,{span:o,ruleWidth:s,advanceWidth:c}=AD(n.height+n.depth+a+r,t),l=o.height-s;l>n.height+n.depth+a&&(a=(a+l-n.height-n.depth)/2);var u=o.height-n.height-a-s;n.style.paddingLeft=N(c);var d=HT({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+u)},{type:`elem`,elem:o},{type:`kern`,size:s}]});if(e.index){var f=t.havingStyle(aw.SCRIPTSCRIPT),p=hE(e.index,f,t);return H([`mord`,`sqrt`],[H([`root`],[HT({positionType:`shift`,positionData:-(.6*(d.height-d.depth)),children:[{type:`elem`,elem:p}]})]),d],t)}else return H([`mord`,`sqrt`],[d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new W(`mroot`,[kE(n,t),kE(r,t)]):new W(`msqrt`,[kE(n,t)])}});var jO={display:aw.DISPLAY,text:aw.TEXT,script:aw.SCRIPT,scriptscript:aw.SCRIPTSCRIPT};U({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=jO[e.style],r=t.havingStyle(n).withFont(``);return kO(e.body,r,t)},mathmlBuilder(e,t){var n=jO[e.style],r=t.havingStyle(n),i=new W(`mstyle`,DE(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var MO=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===aw.DISPLAY.size||n.alwaysHandleSupSub)?wO:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===aw.DISPLAY.size||n.limits)?OO:null:n.type===`accent`?RC(n.base)?YE:null:n.type===`horizBrace`&&!e.sub===n.isOver?yO:null:null};nE({type:`supsub`,htmlBuilder(e,t){var n=MO(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=hE(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&RC(r);if(i){var p=t.havingStyle(t.style.sup());s=hE(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=hE(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===aw.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=N(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof Iw||y)&&(v=N(-o.italic))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)<x){d=x-(u-s.depth)+c.height;var S=.8*l.xHeight-(u-s.depth);S>0&&(u+=S,d-=S)}b=HT({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=HT({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=HT({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return H([pE(o,`right`)||`mord`],[o,H([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[kE(e.base,t)];e.sub&&a.push(kE(e.sub,t)),e.sup&&a.push(kE(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===aw.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===aw.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===aw.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===aw.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===aw.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===aw.DISPLAY)?`munder`:`msub`}return new W(o,a)}}),nE({type:`atom`,htmlBuilder(e,t){return AT(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new W(`mo`,[CE(e.text,e.mode)]);if(e.family===`bin`){var r=TE(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var NO={mi:`italic`,mn:`normal`,mtext:`normal`};nE({type:`mathord`,htmlBuilder(e,t){return MT(e,t,`mathord`)},mathmlBuilder(e,t){var n=new W(`mi`,[CE(e.text,e.mode,t)]),r=TE(e,t)||`italic`;return r!==NO[n.type]&&n.setAttribute(`mathvariant`,r),n}}),nE({type:`textord`,htmlBuilder(e,t){return MT(e,t,`textord`)},mathmlBuilder(e,t){var n=CE(e.text,e.mode,t),r=TE(e,t)||`normal`,i=e.mode===`text`?new W(`mtext`,[n]):/[0-9]/.test(e.text)?new W(`mn`,[n]):e.text===`\\prime`?new W(`mo`,[n]):new W(`mi`,[n]);return r!==NO[i.type]&&i.setAttribute(`mathvariant`,r),i}});var PO={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},FO={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}};nE({type:`spacing`,htmlBuilder(e,t){if(FO.hasOwnProperty(e.text)){var n=FO[e.text].className||``;if(e.mode===`text`){var r=MT(e,t,`textord`);return r.classes.push(n),r}else return H([`mspace`,n],[AT(e.text,e.mode,t)],t)}else if(PO.hasOwnProperty(e.text))return H([`mspace`,PO[e.text]],[],t);else throw new M(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(FO.hasOwnProperty(e.text))n=new W(`mtext`,[new yE(`\xA0`)]);else if(PO.hasOwnProperty(e.text))return new W(`mspace`);else throw new M(`Unknown type of space "`+e.text+`"`);return n}});var IO=()=>{var e=new W(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};nE({type:`tag`,mathmlBuilder(e,t){var n=new W(`mtable`,[new W(`mtr`,[IO(),new W(`mtd`,[OE(e.body,t)]),IO(),new W(`mtd`,[OE(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var LO={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},RO={"\\textbf":`textbf`,"\\textmd":`textmd`},zO={"\\textit":`textit`,"\\textup":`textup`},BO=(e,t)=>{var n=e.font;return n?LO[n]?t.withTextFontFamily(LO[n]):RO[n]?t.withTextFontWeight(RO[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(zO[n]):t};U({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],props:{numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`text`,mode:n.mode,body:iE(i),font:r}},htmlBuilder(e,t){var n=BO(e,t);return H([`mord`,`text`],lE(e.body,n,!0),n)},mathmlBuilder(e,t){var n=BO(e,t);return OE(e.body,n)}}),U({type:`underline`,names:[`\\underline`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`underline`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=hE(e.body,t),r=LT(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return H([`mord`,`underline`],[HT({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new W(`mo`,[new yE(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new W(`munder`,[kE(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),U({type:`vcenter`,names:[`\\vcenter`],props:{numArgs:1,argTypes:[`original`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`vcenter`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=hE(e.body,t),r=t.fontMetrics().axisHeight;return HT({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new W(`mpadded`,[kE(e.body,t)],[`vcenter`])}}),U({type:`verb`,names:[`\\verb`],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new M(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=VO(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(kT(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return H([`mord`,`text`].concat(i.sizingClasses(t)),PT(r),i)},mathmlBuilder(e,t){var n=new W(`mtext`,[new yE(VO(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}});var VO=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),HO=$T,UO=`[ \r
|
|
417
|
+
]`,WO=`\\\\[a-zA-Z@]+`,GO=`\\\\[^\ud800-\udfff]`,KO=`(`+WO+`)`+UO+`*`,qO=`\\\\(
|
|
418
|
+
|[ \r ]+
|
|
419
|
+
?)[ \r ]*`,JO=`[̀-ͯ]`,YO=RegExp(JO+`+$`),XO=`(`+UO+`+)|`+(qO+`|`)+`([!-\\[\\]-‧-豈-]`+(JO+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(JO+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+KO)+(`|`+GO+`)`),ZO=class{constructor(e,t){this.input=e,this.settings=t,this.tokenRegex=new RegExp(XO,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new $D(`EOF`,new QD(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new M(`Unexpected character: '`+e[t]+`'`,new $D(e[t],new QD(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`
|
|
420
|
+
`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=i+1,this.lex()}return new $D(r,new QD(this,t,this.tokenRegex.lastIndex))}},QO=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new M(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},$O=ZD;G(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),G(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),G(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),G(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),G(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),G(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),G(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var ek={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};G(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new M("\\char` missing argument");else r=t.text.charCodeAt(0);else n=10;if(n){if(r=ek[t.text],r==null||r>=n)throw new M(`Invalid base-`+n+` digit `+t.text);for(var i;(i=ek[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`});var tk=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new M(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new M(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new M(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new M(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};G(`\\newcommand`,e=>tk(e,!1,!0,!1)),G(`\\renewcommand`,e=>tk(e,!0,!1,!1)),G(`\\providecommand`,e=>tk(e,!0,!0,!0)),G(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),G(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),G(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),HO[n],Qw.math[n],Qw.text[n]),``}),G(`\\bgroup`,`{`),G(`\\egroup`,`}`),G(`~`,`\\nobreakspace`),G(`\\lq`,"`"),G(`\\rq`,`'`),G(`\\aa`,`\\r a`),G(`\\AA`,`\\r A`),G(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),G(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),G(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),G(`ℬ`,`\\mathscr{B}`),G(`ℰ`,`\\mathscr{E}`),G(`ℱ`,`\\mathscr{F}`),G(`ℋ`,`\\mathscr{H}`),G(`ℐ`,`\\mathscr{I}`),G(`ℒ`,`\\mathscr{L}`),G(`ℳ`,`\\mathscr{M}`),G(`ℛ`,`\\mathscr{R}`),G(`ℭ`,`\\mathfrak{C}`),G(`ℌ`,`\\mathfrak{H}`),G(`ℨ`,`\\mathfrak{Z}`),G(`\\Bbbk`,`\\Bbb{k}`),G(`·`,`\\cdotp`),G(`\\llap`,`\\mathllap{\\textrm{#1}}`),G(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),G(`\\clap`,`\\mathclap{\\textrm{#1}}`),G(`\\mathstrut`,`\\vphantom{(}`),G(`\\underbar`,`\\underline{\\text{#1}}`),G(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),G(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),G(`\\ne`,`\\neq`),G(`≠`,`\\neq`),G(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),G(`∉`,`\\notin`),G(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),G(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),G(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),G(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),G(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),G(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),G(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),G(`⟂`,`\\perp`),G(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),G(`∌`,`\\notni`),G(`⌜`,`\\ulcorner`),G(`⌝`,`\\urcorner`),G(`⌞`,`\\llcorner`),G(`⌟`,`\\lrcorner`),G(`©`,`\\copyright`),G(`®`,`\\textregistered`),G(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),G(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),G(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),G(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),G(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),G(`⋮`,`\\vdots`),G(`\\varGamma`,`\\mathit{\\Gamma}`),G(`\\varDelta`,`\\mathit{\\Delta}`),G(`\\varTheta`,`\\mathit{\\Theta}`),G(`\\varLambda`,`\\mathit{\\Lambda}`),G(`\\varXi`,`\\mathit{\\Xi}`),G(`\\varPi`,`\\mathit{\\Pi}`),G(`\\varSigma`,`\\mathit{\\Sigma}`),G(`\\varUpsilon`,`\\mathit{\\Upsilon}`),G(`\\varPhi`,`\\mathit{\\Phi}`),G(`\\varPsi`,`\\mathit{\\Psi}`),G(`\\varOmega`,`\\mathit{\\Omega}`),G(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),G(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),G(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),G(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),G(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),G(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),G(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),G(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var nk={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},rk=new Set([`bin`,`rel`]);G(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in nk?t=nk[n]:(n.slice(0,4)===`\\not`||n in Qw.math&&rk.has(Qw.math[n].group))&&(t=`\\dotsb`),t});var ik={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};G(`\\dotso`,function(e){return e.future().text in ik?`\\ldots\\,`:`\\ldots`}),G(`\\dotsc`,function(e){var t=e.future().text;return t in ik&&t!==`,`?`\\ldots\\,`:`\\ldots`}),G(`\\cdots`,function(e){return e.future().text in ik?`\\@cdots\\,`:`\\@cdots`}),G(`\\dotsb`,`\\cdots`),G(`\\dotsm`,`\\cdots`),G(`\\dotsi`,`\\!\\cdots`),G(`\\dotsx`,`\\ldots\\,`),G(`\\DOTSI`,`\\relax`),G(`\\DOTSB`,`\\relax`),G(`\\DOTSX`,`\\relax`),G(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),G(`\\,`,`\\tmspace+{3mu}{.1667em}`),G(`\\thinspace`,`\\,`),G(`\\>`,`\\mskip{4mu}`),G(`\\:`,`\\tmspace+{4mu}{.2222em}`),G(`\\medspace`,`\\:`),G(`\\;`,`\\tmspace+{5mu}{.2777em}`),G(`\\thickspace`,`\\;`),G(`\\!`,`\\tmspace-{3mu}{.1667em}`),G(`\\negthinspace`,`\\!`),G(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),G(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),G(`\\enspace`,`\\kern.5em `),G(`\\enskip`,`\\hskip.5em\\relax`),G(`\\quad`,`\\hskip1em\\relax`),G(`\\qquad`,`\\hskip2em\\relax`),G(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),G(`\\tag@paren`,`\\tag@literal{({#1})}`),G(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new M(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),G(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),G(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),G(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),G(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),G(`\\newline`,`\\\\\\relax`),G(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var ak=N(Uw[`Main-Regular`][84][1]-.7*Uw[`Main-Regular`][65][1]);G(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+ak+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),G(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+ak+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),G(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),G(`\\@hspace`,`\\hskip #1\\relax`),G(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),G(`\\ordinarycolon`,`:`),G(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),G(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),G(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),G(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),G(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),G(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),G(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),G(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),G(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),G(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),G(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),G(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),G(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),G(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),G(`∷`,`\\dblcolon`),G(`∹`,`\\eqcolon`),G(`≔`,`\\coloneqq`),G(`≕`,`\\eqqcolon`),G(`⩴`,`\\Coloneqq`),G(`\\ratio`,`\\vcentcolon`),G(`\\coloncolon`,`\\dblcolon`),G(`\\colonequals`,`\\coloneqq`),G(`\\coloncolonequals`,`\\Coloneqq`),G(`\\equalscolon`,`\\eqqcolon`),G(`\\equalscoloncolon`,`\\Eqqcolon`),G(`\\colonminus`,`\\coloneq`),G(`\\coloncolonminus`,`\\Coloneq`),G(`\\minuscolon`,`\\eqcolon`),G(`\\minuscoloncolon`,`\\Eqcolon`),G(`\\coloncolonapprox`,`\\Colonapprox`),G(`\\coloncolonsim`,`\\Colonsim`),G(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),G(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),G(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),G(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),G(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),G(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),G(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),G(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),G(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),G(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),G(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),G(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),G(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),G(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),G(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),G(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),G(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),G(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),G(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),G(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),G(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),G(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),G(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),G(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),G(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),G(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),G(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),G(`\\imath`,`\\html@mathml{\\@imath}{ı}`),G(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),G(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),G(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),G(`⟦`,`\\llbracket`),G(`⟧`,`\\rrbracket`),G(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),G(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),G(`⦃`,`\\lBrace`),G(`⦄`,`\\rBrace`),G(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),G(`⦵`,`\\minuso`),G(`\\darr`,`\\downarrow`),G(`\\dArr`,`\\Downarrow`),G(`\\Darr`,`\\Downarrow`),G(`\\lang`,`\\langle`),G(`\\rang`,`\\rangle`),G(`\\uarr`,`\\uparrow`),G(`\\uArr`,`\\Uparrow`),G(`\\Uarr`,`\\Uparrow`),G(`\\N`,`\\mathbb{N}`),G(`\\R`,`\\mathbb{R}`),G(`\\Z`,`\\mathbb{Z}`),G(`\\alef`,`\\aleph`),G(`\\alefsym`,`\\aleph`),G(`\\Alpha`,`\\mathrm{A}`),G(`\\Beta`,`\\mathrm{B}`),G(`\\bull`,`\\bullet`),G(`\\Chi`,`\\mathrm{X}`),G(`\\clubs`,`\\clubsuit`),G(`\\cnums`,`\\mathbb{C}`),G(`\\Complex`,`\\mathbb{C}`),G(`\\Dagger`,`\\ddagger`),G(`\\diamonds`,`\\diamondsuit`),G(`\\empty`,`\\emptyset`),G(`\\Epsilon`,`\\mathrm{E}`),G(`\\Eta`,`\\mathrm{H}`),G(`\\exist`,`\\exists`),G(`\\harr`,`\\leftrightarrow`),G(`\\hArr`,`\\Leftrightarrow`),G(`\\Harr`,`\\Leftrightarrow`),G(`\\hearts`,`\\heartsuit`),G(`\\image`,`\\Im`),G(`\\infin`,`\\infty`),G(`\\Iota`,`\\mathrm{I}`),G(`\\isin`,`\\in`),G(`\\Kappa`,`\\mathrm{K}`),G(`\\larr`,`\\leftarrow`),G(`\\lArr`,`\\Leftarrow`),G(`\\Larr`,`\\Leftarrow`),G(`\\lrarr`,`\\leftrightarrow`),G(`\\lrArr`,`\\Leftrightarrow`),G(`\\Lrarr`,`\\Leftrightarrow`),G(`\\Mu`,`\\mathrm{M}`),G(`\\natnums`,`\\mathbb{N}`),G(`\\Nu`,`\\mathrm{N}`),G(`\\Omicron`,`\\mathrm{O}`),G(`\\plusmn`,`\\pm`),G(`\\rarr`,`\\rightarrow`),G(`\\rArr`,`\\Rightarrow`),G(`\\Rarr`,`\\Rightarrow`),G(`\\real`,`\\Re`),G(`\\reals`,`\\mathbb{R}`),G(`\\Reals`,`\\mathbb{R}`),G(`\\Rho`,`\\mathrm{P}`),G(`\\sdot`,`\\cdot`),G(`\\sect`,`\\S`),G(`\\spades`,`\\spadesuit`),G(`\\sub`,`\\subset`),G(`\\sube`,`\\subseteq`),G(`\\supe`,`\\supseteq`),G(`\\Tau`,`\\mathrm{T}`),G(`\\thetasym`,`\\vartheta`),G(`\\weierp`,`\\wp`),G(`\\Zeta`,`\\mathrm{Z}`),G(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),G(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),G(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),G(`\\bra`,`\\mathinner{\\langle{#1}|}`),G(`\\ket`,`\\mathinner{|{#1}\\rangle}`),G(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),G(`\\Bra`,`\\left\\langle#1\\right|`),G(`\\Ket`,`\\left|#1\\right\\rangle`);var ok=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};G(`\\bra@ket`,ok(!1)),G(`\\bra@set`,ok(!0)),G(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),G(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),G(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),G(`\\angln`,`{\\angl n}`),G(`\\blue`,`\\textcolor{##6495ed}{#1}`),G(`\\orange`,`\\textcolor{##ffa500}{#1}`),G(`\\pink`,`\\textcolor{##ff00af}{#1}`),G(`\\red`,`\\textcolor{##df0030}{#1}`),G(`\\green`,`\\textcolor{##28ae7b}{#1}`),G(`\\gray`,`\\textcolor{gray}{#1}`),G(`\\purple`,`\\textcolor{##9d38bd}{#1}`),G(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),G(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),G(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),G(`\\blueD`,`\\textcolor{##11accd}{#1}`),G(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),G(`\\tealA`,`\\textcolor{##94fff5}{#1}`),G(`\\tealB`,`\\textcolor{##26edd5}{#1}`),G(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),G(`\\tealD`,`\\textcolor{##01a995}{#1}`),G(`\\tealE`,`\\textcolor{##208170}{#1}`),G(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),G(`\\greenB`,`\\textcolor{##8af281}{#1}`),G(`\\greenC`,`\\textcolor{##74cf70}{#1}`),G(`\\greenD`,`\\textcolor{##1fab54}{#1}`),G(`\\greenE`,`\\textcolor{##0d923f}{#1}`),G(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),G(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),G(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),G(`\\goldD`,`\\textcolor{##e07d10}{#1}`),G(`\\goldE`,`\\textcolor{##a75a05}{#1}`),G(`\\redA`,`\\textcolor{##fca9a9}{#1}`),G(`\\redB`,`\\textcolor{##ff8482}{#1}`),G(`\\redC`,`\\textcolor{##f9685d}{#1}`),G(`\\redD`,`\\textcolor{##e84d39}{#1}`),G(`\\redE`,`\\textcolor{##bc2612}{#1}`),G(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),G(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),G(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),G(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),G(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),G(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),G(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),G(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),G(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),G(`\\purpleE`,`\\textcolor{##543b78}{#1}`),G(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),G(`\\mintB`,`\\textcolor{##edf2df}{#1}`),G(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),G(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),G(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),G(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),G(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),G(`\\grayE`,`\\textcolor{##babec2}{#1}`),G(`\\grayF`,`\\textcolor{##888d93}{#1}`),G(`\\grayG`,`\\textcolor{##626569}{#1}`),G(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),G(`\\grayI`,`\\textcolor{##21242c}{#1}`),G(`\\kaBlue`,`\\textcolor{##314453}{#1}`),G(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var sk={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},ck=class{constructor(e,t,n){this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new QO($O,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new ZO(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg([`]`])}else ({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new $D(`EOF`,n.loc)),this.pushTokens(r),new $D(``,QD.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new M(`Extra }`,i)}else if(i.text===`EOF`)throw new M(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n)if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new M(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new M(`Use of the macro doesn't match its definition`,i)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new M(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new M(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new M(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new M(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new $D(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new ZO(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||HO.hasOwnProperty(e)||Qw.math.hasOwnProperty(e)||Qw.text.hasOwnProperty(e)||sk.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t==null?HO.hasOwnProperty(e)&&!HO[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},lk=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,uk=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),dk={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},fk={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},pk=class e{constructor(e,t){this.mode=`math`,this.gullet=new ck(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new M(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new $D(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&HO[i.text]&&HO[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new M(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),c=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s},o=c.length===1&&c[0].type===`ordgroup`?c[0]:{type:`ordgroup`,mode:this.mode,body:c},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}else return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new M(`Expected group after '`+n+`'`,t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});var r={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new M(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new M(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new M(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new M(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(uk[i.text]){var s=lk.test(i.text),c=[];for(c.push(new $D(uk[i.text])),this.consume();;){var l=this.fetch().text;if(!uk[l]||lk.test(l)!==s)break;c.unshift(new $D(uk[l])),this.consume()}var u=this.subparse(c);s?r={type:`ordgroup`,mode:`math`,body:u}:n={type:`ordgroup`,mode:`math`,body:u}}else break}return n||r?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,i=HO[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new M(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new M(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new M(`Can't use function '`+r+`' in math mode`,n);var{args:a,optArgs:o}=this.parseArguments(r,i);return this.callFunction(r,a,o,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=HO[e];if(o&&o.handler)return o.handler(a,t,n);throw new M(`No function handler for `+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var r=[],i=[],a=0;a<n;a++){var o=t.argTypes&&t.argTypes[a],s=a<t.numOptionalArgs;(`primitive`in t&&t.primitive&&o==null||t.type===`sqrt`&&a===1&&i[0]==null)&&(o=`primitive`);var c=this.parseGroupOfType(`argument to '`+e+`'`,o,s);if(s)i.push(c);else if(c!=null)r.push(c);else throw new M(`Null argument, please report this as a bug`)}return{args:r,optArgs:i}}parseGroupOfType(e,t,n){switch(t){case`color`:return this.parseColorGroup(n);case`size`:return this.parseSizeGroup(n);case`url`:return this.parseUrlGroup(n);case`math`:case`text`:return this.parseArgumentGroup(n,t);case`hbox`:var r=this.parseArgumentGroup(n,`text`);return r==null?null:{type:`styling`,mode:r.mode,body:[r],style:`text`};case`raw`:var i=this.parseStringGroup(`raw`,n);return i==null?null:{type:`raw`,mode:`text`,string:i.text};case`primitive`:if(n)throw new M(`A primitive argument cannot be optional`);var a=this.parseGroup(e);if(a==null)throw new M(`Expected group as `+e,this.fetch());return a;case`original`:case null:case void 0:return this.parseArgumentGroup(n);default:throw new M(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(n==null)return null;for(var r=``,i;(i=this.fetch()).text!==`EOF`;)r+=i.text,this.consume();return this.consume(),n.text=r,n}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new M(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}parseColorGroup(e){var t=this.parseStringGroup(`color`,e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new M(`Invalid color: '`+t.text+`'`,t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r=`#`+r),{type:`color-token`,mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),t=!e&&this.gullet.future().text!==`{`?this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):this.parseStringGroup(`size`,e),!t)return null;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new M(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!Tw(i))throw new M(`Invalid unit: '`+i.unit+`'`,t);return{type:`size`,mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);var t=this.parseStringGroup(`url`,e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();var a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:QD.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!sk.hasOwnProperty(r)){if(this.settings.throwOnError)throw new M(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(!(!a||a.type!==`textord`)){if(i===`-`&&a.text===`-`){var o=e[n+2];n+1<t&&o&&o.type===`textord`&&o.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:QD.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:QD.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:QD.range(r,a),text:i+i}),--t)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)===`*`;if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new M(`\\verb assertion failed --
|
|
421
|
+
please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}fk.hasOwnProperty(t[0])&&!Qw[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Accented Unicode text character "`+t[0]+`" used in math mode`,e),t=fk[t[0]]+t.slice(1));var i=YO.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(Qw[this.mode][t]){this.settings.strict&&this.mode===`math`&&ST.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=Qw[this.mode][t].group,s=QD.range(e),c;if(Xw.hasOwnProperty(o)){var l=o;c={type:`atom`,mode:this.mode,family:l,loc:s,text:t}}else c={type:o,mode:this.mode,loc:s,text:t};a=c}else if(t.charCodeAt(0)>=128)this.settings.strict&&(lw(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),a={type:`textord`,mode:`text`,loc:QD.range(e),text:t};else return null;if(this.consume(),i)for(var u=0;u<i[0].length;u++){var d=i[0][u];if(!dk[d])throw new M(`Unknown accent ' `+d+`'`,e);var f=dk[d][this.mode]||dk[d].text;if(!f)throw new M(`Accent `+d+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:QD.range(e),label:f,isStretchy:!1,isShifty:!0,base:a}}return a}};pk.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var mk=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new pk(e,t);delete n.gullet.macros.current[`\\df@tag`];var r=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new M(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new $D(`\\df@tag`)])}]}return r},hk=function(e,t,n){t.textContent=``;var r=yk(e,n).toNode();t.appendChild(r)};typeof document<`u`&&document.compatMode!==`CSS1Compat`&&(typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`),hk=function(){throw new M(`KaTeX doesn't work in quirks mode.`)});var gk=function(e,t){return yk(e,t).toMarkup()},_k=function(e,t){return mk(e,new HC(t))},vk=function(e,t,n){if(n.throwOnError||!(e instanceof M))throw e;var r=H([`katex-error`],[new Iw(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},yk=function(e,t){var n=new HC(t);try{return LE(mk(e,n),e,n)}catch(t){return vk(t,e,n)}},bk={version:`0.16.38`,render:hk,renderToString:gk,ParseError:M,SETTINGS_SCHEMA:BC,__parse:_k,__renderToDomTree:yk,__renderToHTMLTree:function(e,t){var n=new HC(t);try{return RE(mk(e,n),e,n)}catch(t){return vk(t,e,n)}},__setFontMetrics:Kw,__defineSymbol:P,__defineFunction:U,__defineMacro:G,__domTree:{Span:Mw,Anchor:Nw,SymbolNode:Iw,SvgNode:Lw,PathNode:Rw,LineNode:zw}},xk=(function(e){if(e==null)return Tk;if(typeof e==`string`)return Ck(e);if(typeof e==`object`)return Sk(e);if(typeof e==`function`)return wk(e);throw Error("Expected function, string, or array as `test`")});function Sk(e){let t=[],n=-1;for(;++n<e.length;)t[n]=xk(e[n]);return wk(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Ck(e){return wk(t);function t(t){return t.tagName===e}}function wk(e){return t;function t(t,n,r){return!!(Ek(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Tk(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function Ek(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}function Dk(e,t){return Ok(e,t||{})||{type:`root`,children:[]}}function Ok(e,t){let n=kk(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function kk(e,t){switch(e.nodeType){case 1:return Pk(e,t);case 3:return Mk(e);case 8:return Nk(e);case 9:return Ak(e,t);case 10:return jk();case 11:return Ak(e,t);default:return}}function Ak(e,t){return{type:`root`,children:Fk(e,t)}}function jk(){return{type:`doctype`}}function Mk(e){return{type:`text`,value:e.nodeValue||``}}function Nk(e){return{type:`comment`,value:e.nodeValue||``}}function Pk(e,t){let n=e.namespaceURI,r=n===it.svg?$e:lt,i=n===it.html?e.tagName.toLowerCase():e.tagName,a=n===it.html&&i===`template`?e.content:e,o=e.getAttributeNames(),s={},c=-1;for(;++c<o.length;)s[o[c]]=e.getAttribute(o[c])||``;return r(i,s,Fk(a,t))}function Fk(e,t){let n=e.childNodes,r=[],i=-1;for(;++i<n.length;){let e=Ok(n[i],t);e!==void 0&&r.push(e)}return r}var Ik=new DOMParser;function Lk(e,t){return Dk(t?.fragment?Rk(e):Ik.parseFromString(e,`text/html`))}function Rk(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content}var zk=(function(e,t,n){let r=nt(n);if(!e||!e.type||!e.children)throw Error(`Expected parent node`);if(typeof t==`number`){if(t<0||t===1/0)throw Error(`Expected positive finite number as index`)}else if(t=e.children.indexOf(t),t<0)throw Error(`Expected child node or index`);for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),Bk=/\n/g,Vk=/[\t ]+/g,Hk=xk(`br`),Uk=xk(nA),Wk=xk(`p`),Gk=xk(`tr`),Kk=xk([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,tA,rA]),qk=xk(`address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp`.split(`.`));function Jk(e,t){let n=t||{},r=`children`in e?e.children:[],i=qk(e),a=eA(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...Zk(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...Yk(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?Hk(r[s+1]):i}));let c=[],l;for(s=-1;++s<o.length;){let e=o[s];typeof e==`number`?l!==void 0&&e>l&&(l=e):e&&(l!==void 0&&l>-1&&c.push(`
|
|
422
|
+
`.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function Yk(e,t,n){return e.type===`element`?Xk(e,t,n):e.type===`text`?n.whitespace===`normal`?Zk(e,n):Qk(e):[]}function Xk(e,t,n){let r=eA(e,n),i=e.children||[],a=-1,o=[];if(Kk(e))return o;let s,c;for(Hk(e)||Gk(e)&&zk(t,e,Gk)?c=`
|
|
423
|
+
`:Wk(e)?(s=2,c=2):qk(e)&&(s=1,c=1);++a<i.length;)o=o.concat(Yk(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?Hk(i[a+1]):c}));return Uk(e)&&zk(t,e,Uk)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function Zk(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){Bk.lastIndex=a;let e=Bk.exec(n),i=e&&`index`in e?e.index:n.length;r.push($k(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a===0?t.breakBefore:!0,i===n.length?t.breakAfter:!0)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function Qk(e){return[String(e.value)]}function $k(e,t,n){let r=[],i=0,a;for(;i<e.length;){Vk.lastIndex=i;let n=Vk.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function eA(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}}return t.whitespace}function tA(e){return!!(e.properties||{}).hidden}function nA(e){return e.tagName===`td`||e.tagName===`th`}function rA(e){return e.tagName===`dialog`&&!(e.properties||{}).open}var iA={},aA=[];function oA(e){let t=e||iA;return function(e,n){at(e,`element`,function(e,r){let i=Array.isArray(e.properties.className)?e.properties.className:aA,a=i.includes(`language-math`),o=i.includes(`math-display`),s=i.includes(`math-inline`),c=o;if(!a&&!o&&!s)return;let l=r[r.length-1],u=e;if(e.tagName===`code`&&a&&l&&l.type===`element`&&l.tagName===`pre`&&(u=l,l=r[r.length-2],c=!0),!l)return;let d=Jk(u,{whitespace:`pre`}),f;try{f=bk.renderToString(d,{...t,displayMode:c,throwOnError:!0})}catch(i){let a=i,o=a.name.toLowerCase();n.message(`Could not render math with KaTeX`,{ancestors:[...r,e],cause:a,place:e.position,ruleId:o,source:`rehype-katex`});try{f=bk.renderToString(d,{...t,displayMode:c,strict:`ignore`,throwOnError:!1})}catch{f=[{type:`element`,tagName:`span`,properties:{className:[`katex-error`],style:`color:`+(t.errorColor||`#cc0000`),title:String(i)},children:[{type:`text`,value:d}]}]}}typeof f==`string`&&(f=Lk(f,{fragment:!0}).children);let p=l.children.indexOf(u);return l.children.splice(p,1,...f),st})}}function sA(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];et(t.type===`math`),t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];et(n.type===`math`),this.exit(e),n.value=t;let r=n.data.hChildren[0];et(r.type===`element`),et(r.tagName===`code`),r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];et(n.type===`inlineMath`),this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}function cA(e){let t=(e||{}).singleDollarTextMath;return t??=!0,r.peek=i,{unsafe:[{character:`\r`,inConstruct:`mathFlowMeta`},{character:`
|
|
424
|
+
`,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(ct(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:`
|
|
425
|
+
`,before:c,encode:[`$`],...a.current()})),t()}return c+=a.move(`
|
|
426
|
+
`),i&&(c+=a.move(i+`
|
|
427
|
+
`)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var lA={tokenize:dA,concrete:!0,name:`mathFlow`},uA={tokenize:fA,partial:!0};function dA(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),ot(e,l,`whitespace`)(t))}function l(t){return t===null||Qe(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||Qe(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(uA,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?ot(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):Qe(t)?e.attempt(uA,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||Qe(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return ot(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),ot(e,c,`whitespace`)(t))}function c(r){return r===null||Qe(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function fA(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function pA(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:mA,previous:hA,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):Qe(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||Qe(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function mA(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function hA(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function gA(e){return{flow:{36:lA},text:{36:pA(e)}}}var _A={};function vA(e){let t=this,n=e||_A,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(gA(n)),a.push(sA()),o.push(cA(n))}var yA=function(e,t){return(0,k.useMemo)(function(){return Array.from({length:t},function(t,n){var r=`lobe-icons-${np(e)}-fill-${n}`;return{fill:`url(#${r})`,id:r}})},[e,t])},bA=`Claude`,xA=.8,SA=.1,CA=`#D97757`,wA=CA,TA=`#fff`,EA=.75;function DA(e){"@babel/helpers - typeof";return DA=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},DA(e)}var OA=[`size`,`style`];function kA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kA(Object(n),!0).forEach(function(t){jA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jA(e,t,n){return t=MA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MA(e){var t=NA(e,`string`);return DA(t)==`symbol`?t:String(t)}function NA(e,t){if(DA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(DA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function PA(e,t){if(e==null)return{};var n=FA(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function FA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var IA=(0,k.memo)(function(e){var t=e.size,n=t===void 0?`1em`:t,r=e.style,i=PA(e,OA);return(0,A.jsxs)(`svg`,AA(AA({fill:`currentColor`,fillRule:`evenodd`,height:n,style:AA({flex:`none`,lineHeight:1},r),viewBox:`0 0 24 24`,width:n,xmlns:`http://www.w3.org/2000/svg`},i),{},{children:[(0,A.jsx)(`title`,{children:bA}),(0,A.jsx)(`path`,{d:`M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z`})]}))});function LA(e){"@babel/helpers - typeof";return LA=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},LA(e)}function RA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?RA(Object(n),!0).forEach(function(t){BA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BA(e,t,n){return t=VA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VA(e){var t=HA(e,`string`);return LA(t)==`symbol`?t:String(t)}function HA(e,t){if(LA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(LA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function UA(e){if(e==null)throw TypeError(`Cannot destructure `+e)}var WA=(0,k.memo)(function(e){var t=Object.assign({},(UA(e),e));return(0,A.jsx)(d,zA({Icon:IA,"aria-label":bA,background:wA,color:TA,iconMultiple:EA},t))});function GA(e){"@babel/helpers - typeof";return GA=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},GA(e)}var KA=[`size`,`style`];function qA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?qA(Object(n),!0).forEach(function(t){YA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YA(e,t,n){return t=XA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XA(e){var t=ZA(e,`string`);return GA(t)==`symbol`?t:String(t)}function ZA(e,t){if(GA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(GA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function QA(e,t){if(e==null)return{};var n=$A(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $A(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ej=(0,k.memo)(function(e){var t=e.size,n=t===void 0?`1em`:t,r=e.style,i=QA(e,KA);return(0,A.jsxs)(`svg`,JA(JA({height:n,style:JA({flex:`none`,lineHeight:1},r),viewBox:`0 0 24 24`,width:n,xmlns:`http://www.w3.org/2000/svg`},i),{},{children:[(0,A.jsx)(`title`,{children:bA}),(0,A.jsx)(`path`,{d:`M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z`,fill:`#D97757`,fillRule:`nonzero`})]}))});function tj(e){"@babel/helpers - typeof";return tj=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},tj(e)}var nj=[`size`,`style`];function rj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ij(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rj(Object(n),!0).forEach(function(t){aj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aj(e,t,n){return t=oj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oj(e){var t=sj(e,`string`);return tj(t)==`symbol`?t:String(t)}function sj(e,t){if(tj(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(tj(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function cj(e,t){if(e==null)return{};var n=lj(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var uj=(0,k.memo)(function(e){var t=e.size,n=t===void 0?`1em`:t,r=e.style,i=cj(e,nj);return(0,A.jsxs)(`svg`,ij(ij({fill:`currentColor`,fillRule:`nonzero`,height:n,style:ij({flex:`none`,lineHeight:1},r),viewBox:`0 0 97 24`,xmlns:`http://www.w3.org/2000/svg`},i),{},{children:[(0,A.jsx)(`title`,{children:bA}),(0,A.jsx)(`path`,{d:`M13.623 20.222c-3.417 0-5.753-1.901-6.855-4.827a12.992 12.992 0 01-.838-4.772c0-4.907 2.206-8.315 7.08-8.315 3.275 0 5.297 1.425 6.448 4.826h1.402l-.19-4.69C18.709 1.18 16.258.543 13.276.543c-4.2 0-7.775 1.874-9.763 5.254a11.357 11.357 0 00-1.511 5.872c0 3.753 1.777 7.08 5.113 8.926a11.95 11.95 0 005.943 1.398c3.254 0 5.835-.617 8.122-1.697l.593-5.172h-1.43c-.858 2.362-1.88 3.78-3.574 4.534-.831.373-1.88.564-3.146.564zm14.74-17.914L28.499 0h-.967L23.23 1.29v.699l1.907.882v16.142c0 1.1-.565 1.344-2.043 1.528v1.18h7.319v-1.18c-1.484-.184-2.042-.428-2.042-1.528V2.315l-.007-.007zm29.104 19.685h.565l4.95-.937v-1.208l-.695-.054c-1.157-.109-1.457-.346-1.457-1.29V9.897l.137-2.763h-.783l-4.678.672v1.181l.457.082c1.266.183 1.64.536 1.64 1.419v7.67c-1.212.937-2.369 1.527-3.744 1.527-1.525 0-2.471-.774-2.471-2.58V9.905l.136-2.763h-.804l-4.684.672v1.181l.484.082c1.266.183 1.64.536 1.64 1.418v7.08c0 3 1.703 4.426 4.412 4.426 2.07 0 3.765-1.1 5.038-2.627L57.474 22l-.007-.007zm-13.602-9.55c0-3.836-2.043-5.309-5.733-5.309-3.254 0-5.616 1.344-5.616 3.57 0 .666.238 1.175.721 1.528l2.478-.326c-.109-.746-.163-1.201-.163-1.391 0-1.263.674-1.901 2.042-1.901 2.022 0 3.044 1.419 3.044 3.7v.746l-5.106 1.527c-1.702.462-2.67.863-3.316 1.8a3.386 3.386 0 00-.476 1.9c0 2.172 1.497 3.706 4.057 3.706 1.852 0 3.493-.835 4.922-2.416.51 1.581 1.294 2.416 2.69 2.416 1.13 0 2.15-.455 3.063-1.344l-.272-.937a4.363 4.363 0 01-1.178.163c-.783 0-1.157-.617-1.157-1.826v-5.607zm-6.536 7.378c-1.396 0-2.26-.808-2.26-2.226 0-.964.456-1.528 1.43-1.854l4.139-1.31v3.965c-1.321.997-2.097 1.425-3.31 1.425zm43.095 1.235v-1.208l-.701-.054c-1.158-.109-1.45-.346-1.45-1.29V2.308L78.409 0h-.974l-4.302 1.29v.699l1.906.882V8.18a6.024 6.024 0 00-3.656-1.046c-4.276 0-7.612 3.245-7.612 8.098 0 3.998 2.397 6.761 6.346 6.761 2.042 0 3.819-.99 4.922-2.525l-.136 2.525h.571l4.95-.937zm-8.96-12.313c2.043 0 3.575 1.181 3.575 3.353v6.11a4.91 4.91 0 01-3.547 1.425c-2.928 0-4.412-2.308-4.412-5.39 0-3.462 1.695-5.498 4.385-5.498zm19.424 3.055c-.381-1.792-1.484-2.81-3.016-2.81-2.288 0-3.874 1.717-3.874 4.18 0 3.646 1.934 6.008 5.059 6.008a5.858 5.858 0 005.03-2.953l.913.245c-.408 3.163-3.281 5.525-6.808 5.525-4.14 0-6.992-3.054-6.992-7.399 0-4.378 3.098-7.46 7.237-7.46 3.09 0 5.27 1.853 5.97 5.07l-10.783 3.3V14.05l7.264-2.247v-.006z`})]}))});function dj(e){"@babel/helpers - typeof";return dj=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},dj(e)}var fj=[`type`];function pj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pj(Object(n),!0).forEach(function(t){hj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hj(e,t,n){return t=gj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gj(e){var t=_j(e,`string`);return dj(t)==`symbol`?t:String(t)}function _j(e,t){if(dj(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(dj(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function vj(e,t){if(e==null)return{};var n=yj(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var bj=(0,k.memo)(function(e){var t=e.type,n=t===void 0?`mono`:t,r=vj(e,fj);return(0,A.jsx)(m,mj({Icon:n===`color`?ej:IA,Text:uj,"aria-label":bA,spaceMultiple:SA,textMultiple:xA},r))}),xj=IA;xj.Color=ej,xj.Text=uj,xj.Combine=bj,xj.Avatar=WA,xj.colorPrimary=CA,xj.title=bA;var Sj=`Gemini`,Cj=.8,wj=.2,Tj=`#fff`,Ej=Tj,Dj=`#fff`,Oj=.8;function kj(e){"@babel/helpers - typeof";return kj=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},kj(e)}var Aj=[`size`,`style`];function jj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jj(Object(n),!0).forEach(function(t){Nj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nj(e,t,n){return t=Pj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pj(e){var t=Fj(e,`string`);return kj(t)==`symbol`?t:String(t)}function Fj(e,t){if(kj(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(kj(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ij(e,t){return Vj(e)||Bj(e,t)||Rj(e,t)||Lj()}function Lj(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
428
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rj(e,t){if(e){if(typeof e==`string`)return zj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zj(e,t)}}function zj(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Bj(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Vj(e){if(Array.isArray(e))return e}function Hj(e,t){if(e==null)return{};var n=Uj(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Uj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Wj=(0,k.memo)(function(e){var t=e.size,n=t===void 0?`1em`:t,r=e.style,i=Hj(e,Aj),a=Ij(yA(Sj,3),3),o=a[0],s=a[1],c=a[2];return(0,A.jsxs)(`svg`,Mj(Mj({height:n,style:Mj({flex:`none`,lineHeight:1},r),viewBox:`0 0 24 24`,width:n,xmlns:`http://www.w3.org/2000/svg`},i),{},{children:[(0,A.jsx)(`title`,{children:Sj}),(0,A.jsx)(`path`,{d:`M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z`,fill:`#3186FF`}),(0,A.jsx)(`path`,{d:`M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z`,fill:o.fill}),(0,A.jsx)(`path`,{d:`M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z`,fill:s.fill}),(0,A.jsx)(`path`,{d:`M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z`,fill:c.fill}),(0,A.jsxs)(`defs`,{children:[(0,A.jsxs)(`linearGradient`,{gradientUnits:`userSpaceOnUse`,id:o.id,x1:`7`,x2:`11`,y1:`15.5`,y2:`12`,children:[(0,A.jsx)(`stop`,{stopColor:`#08B962`}),(0,A.jsx)(`stop`,{offset:`1`,stopColor:`#08B962`,stopOpacity:`0`})]}),(0,A.jsxs)(`linearGradient`,{gradientUnits:`userSpaceOnUse`,id:s.id,x1:`8`,x2:`11.5`,y1:`5.5`,y2:`11`,children:[(0,A.jsx)(`stop`,{stopColor:`#F94543`}),(0,A.jsx)(`stop`,{offset:`1`,stopColor:`#F94543`,stopOpacity:`0`})]}),(0,A.jsxs)(`linearGradient`,{gradientUnits:`userSpaceOnUse`,id:c.id,x1:`3.5`,x2:`17.5`,y1:`13.5`,y2:`12`,children:[(0,A.jsx)(`stop`,{stopColor:`#FABC12`}),(0,A.jsx)(`stop`,{offset:`.46`,stopColor:`#FABC12`,stopOpacity:`0`})]})]})]}))});function Gj(e){"@babel/helpers - typeof";return Gj=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Gj(e)}function Kj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Kj(Object(n),!0).forEach(function(t){Jj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jj(e,t,n){return t=Yj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yj(e){var t=Xj(e,`string`);return Gj(t)==`symbol`?t:String(t)}function Xj(e,t){if(Gj(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Gj(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Zj(e){if(e==null)throw TypeError(`Cannot destructure `+e)}var Qj=(0,k.memo)(function(e){var t=Object.assign({},(Zj(e),e));return(0,A.jsx)(d,qj({Icon:Wj,"aria-label":Sj,background:Ej,color:Dj,iconMultiple:Oj},t))});function $j(e){"@babel/helpers - typeof";return $j=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},$j(e)}var eM=[`size`,`style`];function tM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?tM(Object(n),!0).forEach(function(t){rM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rM(e,t,n){return t=iM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iM(e){var t=aM(e,`string`);return $j(t)==`symbol`?t:String(t)}function aM(e,t){if($j(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if($j(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function oM(e,t){if(e==null)return{};var n=Lee(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var sM=(0,k.memo)(function(e){var t=e.size,n=t===void 0?`1em`:t,r=e.style,i=oM(e,eM);return(0,A.jsxs)(`svg`,nM(nM({fill:`currentColor`,fillRule:`evenodd`,height:n,style:nM({flex:`none`,lineHeight:1},r),viewBox:`0 0 24 24`,width:n,xmlns:`http://www.w3.org/2000/svg`},i),{},{children:[(0,A.jsx)(`title`,{children:Sj}),(0,A.jsx)(`path`,{d:`M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z`})]}))});function cM(e){"@babel/helpers - typeof";return cM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},cM(e)}var Ree=[`size`,`style`];function lM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?lM(Object(n),!0).forEach(function(t){zee(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zee(e,t,n){return t=Bee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bee(e){var t=Vee(e,`string`);return cM(t)==`symbol`?t:String(t)}function Vee(e,t){if(cM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(cM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Hee(e,t){if(e==null)return{};var n=Uee(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Uee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var dM=(0,k.memo)(function(e){var t=e.size,n=t===void 0?`1em`:t,r=e.style,i=Hee(e,Ree);return(0,A.jsxs)(`svg`,uM(uM({fill:`currentColor`,fillRule:`evenodd`,height:n,style:uM({flex:`none`,lineHeight:1},r),viewBox:`0 0 98 24`,xmlns:`http://www.w3.org/2000/svg`},i),{},{children:[(0,A.jsx)(`title`,{children:Sj}),(0,A.jsx)(`path`,{d:`M21.186 12.67c0 2.649-.786 4.759-2.359 6.33-1.766 1.87-4.09 2.806-6.969 2.806-2.756 0-5.088-.953-6.996-2.86C2.954 17.04 2 14.693 2 11.904c0-2.789.954-5.137 2.862-7.043C6.77 2.953 9.102 2 11.858 2c1.396 0 2.712.247 3.949.741 1.236.495 2.252 1.192 3.047 2.092l-1.749 1.748c-.583-.706-1.338-1.258-2.266-1.655a7.49 7.49 0 00-2.981-.596c-2.067 0-3.816.715-5.247 2.145-1.413 1.448-2.12 3.257-2.12 5.428s.707 3.98 2.12 5.428c1.431 1.43 3.18 2.145 5.247 2.145 1.89 0 3.463-.53 4.717-1.588 1.254-1.06 1.979-2.516 2.173-4.37h-6.89v-2.277h9.196c.088.495.132.971.132 1.43m7.652-4.633c1.946 0 3.494.629 4.645 1.886 1.15 1.257 1.726 3.018 1.726 5.282l-.027.268H24.877c.036 1.284.464 2.318 1.285 3.102.82.785 1.802 1.177 2.944 1.177 1.57 0 2.802-.784 3.694-2.354l2.195 1.07a6.54 6.54 0 01-2.45 2.595C31.503 21.688 30.32 22 29 22c-1.927 0-3.516-.66-4.765-1.98-1.249-1.319-1.873-2.986-1.873-5.001 0-1.997.606-3.66 1.82-4.988 1.213-1.329 2.766-1.993 4.657-1.993m-.053 2.247c-.928 0-1.727.285-2.396.856-.67.57-1.11 1.337-1.325 2.3h7.522c-.071-.91-.442-1.663-1.111-2.26-.67-.598-1.566-.896-2.69-.896M39.247 21.53h-2.455V8.465h2.348v1.813h.107c.374-.64.947-1.173 1.721-1.6.774-.427 1.544-.64 2.309-.64.96 0 1.806.222 2.535.667a3.931 3.931 0 011.601 1.84c1.085-1.671 2.589-2.507 4.51-2.507 1.513 0 2.678.462 3.496 1.387.819.924 1.228 2.24 1.228 3.946v8.16h-2.455v-7.786c0-1.227-.223-2.112-.668-2.654-.444-.542-1.192-.813-2.241-.813-.943 0-1.735.4-2.375 1.2-.64.8-.961 1.742-.961 2.826v7.227h-2.455v-7.786c0-1.227-.223-2.112-.668-2.654-.444-.542-1.191-.813-2.241-.813-.943 0-1.735.4-2.375 1.2-.64.8-.961 1.742-.961 2.826v7.227zM61.911 3.93c0 .48-.17.89-.508 1.228a1.675 1.675 0 01-1.23.508c-.48 0-.89-.17-1.229-.508a1.673 1.673 0 01-.508-1.228c0-.481.17-.89.508-1.229a1.675 1.675 0 011.23-.508c.48 0 .89.17 1.23.508.338.338.507.748.507 1.228m-.11 4.514v13.088h-2.857V8.443h2.857zM80 3.93c0 .48-.17.89-.508 1.228a1.675 1.675 0 01-1.23.508c-.48 0-.89-.17-1.229-.508a1.673 1.673 0 01-.508-1.228c0-.481.17-.89.508-1.229a1.675 1.675 0 011.23-.508c.48 0 .89.17 1.23.508.338.338.507.748.507 1.228m-.11 4.514v13.088h-2.857V8.443h2.857zm-16.343.022h2.349v1.813h.107c.373-.64.947-1.173 1.721-1.6a4.935 4.935 0 012.415-.64c1.601 0 2.833.458 3.696 1.373.863.916 1.294 2.218 1.294 3.907v8.213h-2.455v-8.053c-.053-2.133-1.13-3.2-3.229-3.2-.978 0-1.797.395-2.455 1.187-.658.79-.987 1.737-.987 2.84v7.226h-2.456V8.465z`})]}))});function fM(e){"@babel/helpers - typeof";return fM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},fM(e)}var Wee=[`type`];function pM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Gee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pM(Object(n),!0).forEach(function(t){Kee(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Kee(e,t,n){return t=qee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qee(e){var t=Jee(e,`string`);return fM(t)==`symbol`?t:String(t)}function Jee(e,t){if(fM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(fM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Yee(e,t){if(e==null)return{};var n=Xee(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Zee=(0,k.memo)(function(e){var t=e.type,n=t===void 0?`mono`:t,r=Yee(e,Wee);return(0,A.jsx)(m,Gee({Icon:n===`color`?Wj:sM,Text:dM,"aria-label":Sj,spaceMultiple:wj,textMultiple:Cj},r))}),mM=sM;mM.Color=Wj,mM.Text=dM,mM.Combine=Zee,mM.Avatar=Qj,mM.colorPrimary=Tj,mM.title=Sj;var hM=`Kimi`,Qee=.7,$ee=.25,gM=`#000`,ete=gM,tte=`#fff`,_M=.6;function vM(e){"@babel/helpers - typeof";return vM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vM(e)}var yM=[`size`,`style`];function bM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?bM(Object(n),!0).forEach(function(t){SM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SM(e,t,n){return t=CM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CM(e){var t=wM(e,`string`);return vM(t)==`symbol`?t:String(t)}function wM(e,t){if(vM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(vM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function TM(e,t){if(e==null)return{};var n=EM(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EM(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var DM=(0,k.memo)(function(e){var t=e.size,n=t===void 0?`1em`:t,r=e.style,i=TM(e,yM);return(0,A.jsxs)(`svg`,xM(xM({height:n,style:xM({flex:`none`,lineHeight:1},r),viewBox:`0 0 24 24`,width:n,xmlns:`http://www.w3.org/2000/svg`},i),{},{children:[(0,A.jsx)(`title`,{children:hM}),(0,A.jsx)(`path`,{d:`M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z`,fill:`#1783FF`}),(0,A.jsx)(`path`,{d:`M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z`,fill:`#fff`})]}))});function OM(e){"@babel/helpers - typeof";return OM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},OM(e)}function kM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kM(Object(n),!0).forEach(function(t){jM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jM(e,t,n){return t=MM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MM(e){var t=NM(e,`string`);return OM(t)==`symbol`?t:String(t)}function NM(e,t){if(OM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(OM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function PM(e){if(e==null)throw TypeError(`Cannot destructure `+e)}var FM=(0,k.memo)(function(e){var t=Object.assign({},(PM(e),e));return(0,A.jsx)(d,AM({Icon:DM,"aria-label":hM,background:ete,color:tte,iconMultiple:_M},t))});function IM(e){"@babel/helpers - typeof";return IM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},IM(e)}var LM=[`size`,`style`];function RM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?RM(Object(n),!0).forEach(function(t){BM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BM(e,t,n){return t=VM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VM(e){var t=HM(e,`string`);return IM(t)==`symbol`?t:String(t)}function HM(e,t){if(IM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(IM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function UM(e,t){if(e==null)return{};var n=WM(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WM(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var GM=(0,k.memo)(function(e){var t=e.size,n=t===void 0?`1em`:t,r=e.style,i=UM(e,LM);return(0,A.jsxs)(`svg`,zM(zM({fill:`currentColor`,fillRule:`evenodd`,height:n,style:zM({flex:`none`,lineHeight:1},r),viewBox:`0 0 64 24`,xmlns:`http://www.w3.org/2000/svg`},i),{},{children:[(0,A.jsx)(`title`,{children:hM}),(0,A.jsx)(`path`,{d:`M24.353 21.58c0 .232.188.42.42.42h2.69a.42.42 0 00.42-.42V2.42a.42.42 0 00-.42-.42h-2.69a.42.42 0 00-.42.42v19.16zM58.47 21.58c0 .232.188.42.42.42h2.691a.42.42 0 00.419-.42V2.42a.42.42 0 00-.419-.42H58.89a.42.42 0 00-.42.42v19.16zM47.786 2a.42.42 0 00-.408.32L43.4 18.633c-.066.267-.38.267-.444 0L38.976 2.32A.417.417 0 0038.57 2H31.83a.418.418 0 00-.418.42v19.16c0 .232.188.42.42.42h2.988c.231 0 .419-.182.419-.414V5.471c0-.322.378-.389.454-.079l3.974 16.288a.42.42 0 00.407.32h6.208a.42.42 0 00.407-.32L50.66 5.394c.076-.31.455-.243.455.079V21.58c0 .231.187.419.419.419h2.987a.42.42 0 00.42-.42V2.42a.42.42 0 00-.42-.42h-6.735zM11.55 11.273l8.115-8.565A.42.42 0 0019.36 2h-3.776a.42.42 0 00-.298.124l-9.303 9.39c-.144.146-.357.016-.357-.218V2.42a.42.42 0 00-.42-.42H2.42a.42.42 0 00-.42.42v19.16c0 .232.188.42.42.42h2.786a.42.42 0 00.42-.42v-3.82c0-.085.03-.166.081-.219l2.87-2.931c.07-.07.166-.081.243-.029l7.678 5.816c1.123.778 2.552 1.288 3.861 1.5a.403.403 0 00.464-.404v-3.461c0-.206-.15-.38-.35-.423-.76-.164-1.604-.474-2.244-.918l-6.647-4.953c-.138-.095-.155-.34-.033-.465z`})]}))});function KM(e){"@babel/helpers - typeof";return KM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},KM(e)}var qM=[`iconProps`];function JM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JM(Object(n),!0).forEach(function(t){XM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XM(e,t,n){return t=ZM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZM(e){var t=QM(e,`string`);return KM(t)==`symbol`?t:String(t)}function QM(e,t){if(KM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(KM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function $M(e,t){if(e==null)return{};var n=eN(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var tN=(0,k.memo)(function(e){var t=e.iconProps,n=$M(e,qM);return(0,A.jsx)(m,YM({Icon:FM,Text:GM,"aria-label":hM,iconProps:YM({shape:`square`},t),spaceMultiple:$ee,textMultiple:Qee},n))});function nN(e){"@babel/helpers - typeof";return nN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},nN(e)}var rN=[`size`,`style`];function iN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?iN(Object(n),!0).forEach(function(t){oN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oN(e,t,n){return t=sN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sN(e){var t=cN(e,`string`);return nN(t)==`symbol`?t:String(t)}function cN(e,t){if(nN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(nN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function lN(e,t){if(e==null)return{};var n=uN(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var dN=(0,k.memo)(function(e){var t=e.size,n=t===void 0?`1em`:t,r=e.style,i=lN(e,rN);return(0,A.jsxs)(`svg`,aN(aN({fill:`currentColor`,fillRule:`evenodd`,height:n,style:aN({flex:`none`,lineHeight:1},r),viewBox:`0 0 24 24`,width:n,xmlns:`http://www.w3.org/2000/svg`},i),{},{children:[(0,A.jsx)(`title`,{children:hM}),(0,A.jsx)(`path`,{d:`M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z`}),(0,A.jsx)(`path`,{d:`M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z`})]}))});dN.Color=DM,dN.Text=GM,dN.Combine=tN,dN.Avatar=FM,dN.colorPrimary=gM,dN.title=hM;var fN=`OpenAI`,pN=.75,mN=.1,hN=`#000`,gN=`#19C37D`,_N=`#AB68FF`,vN=`#F86AA4`,yN=`#F9C322`,bN=`#0099FF`,xN=`#0000FE`,SN=hN,CN=`#fff`,wN=.75;function TN(e){"@babel/helpers - typeof";return TN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},TN(e)}var EN=[`size`,`style`];function DN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ON(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?DN(Object(n),!0).forEach(function(t){kN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kN(e,t,n){return t=AN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AN(e){var t=jN(e,`string`);return TN(t)==`symbol`?t:String(t)}function jN(e,t){if(TN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(TN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function MN(e,t){if(e==null)return{};var n=NN(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var PN=(0,k.memo)(function(e){var t=e.size,n=t===void 0?`1em`:t,r=e.style,i=MN(e,EN);return(0,A.jsxs)(`svg`,ON(ON({fill:`currentColor`,fillRule:`evenodd`,height:n,style:ON({flex:`none`,lineHeight:1},r),viewBox:`0 0 24 24`,width:n,xmlns:`http://www.w3.org/2000/svg`},i),{},{children:[(0,A.jsx)(`title`,{children:fN}),(0,A.jsx)(`path`,{d:`M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z`})]}))});function FN(e){"@babel/helpers - typeof";return FN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},FN(e)}var IN=[`type`];function LN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?LN(Object(n),!0).forEach(function(t){zN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zN(e,t,n){return t=BN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BN(e){var t=VN(e,`string`);return FN(t)==`symbol`?t:String(t)}function VN(e,t){if(FN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(FN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function HN(e,t){if(e==null)return{};var n=UN(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var WN=(0,k.memo)(function(e){var t=e.type,n=t===void 0?`normal`:t,r=HN(e,IN),i=(0,k.useMemo)(function(){switch(n){case`gpt3`:return gN;case`gpt4`:return _N;case`gpt5`:return vN;case`o3`:case`o1`:return yN;case`oss`:return bN;case`platform`:return xN;default:return SN}},[n]);return(0,A.jsx)(d,RN({Icon:PN,"aria-label":fN,background:i,color:CN,iconMultiple:wN},r))});function GN(e){"@babel/helpers - typeof";return GN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},GN(e)}var KN=[`size`,`style`];function qN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?qN(Object(n),!0).forEach(function(t){YN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YN(e,t,n){return t=XN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XN(e){var t=ZN(e,`string`);return GN(t)==`symbol`?t:String(t)}function ZN(e,t){if(GN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(GN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function QN(e,t){if(e==null)return{};var n=$N(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $N(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var eP=(0,k.memo)(function(e){var t=e.size,n=t===void 0?`1em`:t,r=e.style,i=QN(e,KN);return(0,A.jsxs)(`svg`,JN(JN({fill:`currentColor`,fillRule:`evenodd`,height:n,style:JN({flex:`none`,lineHeight:1},r),viewBox:`0 0 86 24`,xmlns:`http://www.w3.org/2000/svg`},i),{},{children:[(0,A.jsx)(`title`,{children:fN}),(0,A.jsx)(`path`,{d:`M10.703 2C5.916 2 2 5.916 2 10.703c0 4.787 3.916 8.704 8.703 8.704 4.787 0 8.704-3.893 8.704-8.704A8.698 8.698 0 0010.703 2zm0 14.288c-2.973 0-5.367-2.442-5.367-5.585S7.73 5.12 10.703 5.12c2.974 0 5.367 2.441 5.367 5.584s-2.393 5.585-5.367 5.585zM28.206 6.835c-1.57 0-3.094.629-3.892 1.693v-1.45h-3.143V24h3.143v-6.116c.798.99 2.273 1.523 3.892 1.523 3.385 0 6.045-2.66 6.045-6.286 0-3.626-2.66-6.286-6.044-6.286zm-.531 9.84c-1.79 0-3.385-1.402-3.385-3.554s1.596-3.554 3.385-3.554c1.789 0 3.384 1.402 3.384 3.554s-1.595 3.554-3.384 3.554zM41.649 6.835c-3.433 0-6.141 2.684-6.141 6.286 0 3.602 2.37 6.286 6.237 6.286 3.167 0 5.198-1.91 5.827-4.062h-3.07c-.388.895-1.475 1.523-2.78 1.523-1.62 0-2.854-1.136-3.144-2.756h9.139V12.88c0-3.288-2.297-6.044-6.068-6.044zm-3.047 5.053c.339-1.523 1.596-2.514 3.12-2.514 1.619 0 2.852 1.064 2.997 2.514h-6.117zM56.081 6.835c-1.402 0-2.877.629-3.553 1.669V7.077h-3.143v12.088h3.143v-6.503c0-1.886 1.015-3.119 2.659-3.119 1.523 0 2.345 1.16 2.345 2.78v6.842h3.143v-7.35c0-2.997-1.838-4.98-4.594-4.98zM68.724 2.242l-6.841 16.923h3.36l1.45-3.699h7.785l1.45 3.7h3.41L72.543 2.241h-3.82zm-.943 10.42l2.805-7.084 2.78 7.084H67.78zM83.81 2.242h-3.191v16.923h3.19V2.242z`})]}))});function tP(e){"@babel/helpers - typeof";return tP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},tP(e)}var nP=[`extraStyle`];function rP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rP(Object(n),!0).forEach(function(t){aP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aP(e,t,n){return t=oP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oP(e){var t=sP(e,`string`);return tP(t)==`symbol`?t:String(t)}function sP(e,t){if(tP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(tP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function cP(e,t){if(e==null)return{};var n=lP(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var uP=(0,k.memo)(function(e){var t=e.extraStyle,n=cP(e,nP);return(0,A.jsx)(m,iP({Icon:PN,Text:eP,"aria-label":fN,extraStyle:iP({fontWeight:600},t),spaceMultiple:mN,textMultiple:pN},n))}),dP=PN;dP.Text=eP,dP.Combine=uP,dP.Avatar=WN,dP.colorPrimary=hN,dP.colorGpt3=gN,dP.colorGpt4=_N,dP.colorGpt5=vN,dP.colorO1=yN,dP.colorO3=yN,dP.colorOss=bN,dP.colorPlatform=xN,dP.title=fN;var fP=`Z.ai`,pP=.9,mP=.3,hP=`#000`,gP=hP,_P=`#fff`,vP=.6;function yP(e){"@babel/helpers - typeof";return yP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},yP(e)}var bP=[`size`,`style`];function xP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?xP(Object(n),!0).forEach(function(t){CP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function CP(e,t,n){return t=wP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wP(e){var t=TP(e,`string`);return yP(t)==`symbol`?t:String(t)}function TP(e,t){if(yP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(yP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function EP(e,t){if(e==null)return{};var n=DP(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var OP=(0,k.memo)(function(e){var t=e.size,n=t===void 0?`1em`:t,r=e.style,i=EP(e,bP);return(0,A.jsxs)(`svg`,SP(SP({fill:`currentColor`,fillRule:`evenodd`,height:n,style:SP({flex:`none`,lineHeight:1},r),viewBox:`0 0 24 24`,width:n,xmlns:`http://www.w3.org/2000/svg`},i),{},{children:[(0,A.jsx)(`title`,{children:fP}),(0,A.jsx)(`path`,{d:`M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z`})]}))});function kP(e){"@babel/helpers - typeof";return kP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},kP(e)}function AP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?AP(Object(n),!0).forEach(function(t){MP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MP(e,t,n){return t=NP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NP(e){var t=PP(e,`string`);return kP(t)==`symbol`?t:String(t)}function PP(e,t){if(kP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(kP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function FP(e){if(e==null)throw TypeError(`Cannot destructure `+e)}var IP=(0,k.memo)(function(e){var t=Object.assign({},(FP(e),e));return(0,A.jsx)(d,jP({Icon:OP,"aria-label":fP,background:gP,color:_P,iconMultiple:vP},t))});function LP(e){"@babel/helpers - typeof";return LP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},LP(e)}var RP=[`size`,`style`];function zP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zP(Object(n),!0).forEach(function(t){VP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VP(e,t,n){return t=HP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HP(e){var t=UP(e,`string`);return LP(t)==`symbol`?t:String(t)}function UP(e,t){if(LP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(LP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function WP(e,t){if(e==null)return{};var n=GP(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var KP=(0,k.memo)(function(e){var t=e.size,n=t===void 0?`1em`:t,r=e.style,i=WP(e,RP);return(0,A.jsxs)(`svg`,BP(BP({fill:`currentColor`,fillRule:`evenodd`,height:n,style:BP({flex:`none`,lineHeight:1},r),viewBox:`0 0 50 24`,xmlns:`http://www.w3.org/2000/svg`},i),{},{children:[(0,A.jsx)(`title`,{children:fP}),(0,A.jsx)(`path`,{d:`M43.794 21.722V7.02h4.078v14.702h-4.078zm2.048-16.597a2.215 2.215 0 01-1.56-.603c-.427-.408-.641-.896-.641-1.464 0-.562.214-1.043.641-1.445A2.196 2.196 0 0145.842 1c.607 0 1.123.204 1.55.613.435.402.652.883.652 1.445 0 .568-.217 1.056-.651 1.464a2.182 2.182 0 01-1.55.603zM32.351 22c-.938 0-1.773-.163-2.507-.488a4.037 4.037 0 01-1.742-1.465c-.422-.65-.632-1.46-.632-2.43 0-.818.15-1.504.45-2.059.3-.555.708-1.002 1.225-1.34a5.942 5.942 0 011.761-.765c.664-.173 1.36-.294 2.087-.364a52.88 52.88 0 002.067-.249c.523-.083.903-.204 1.14-.364.235-.16.353-.395.353-.708v-.057c0-.607-.191-1.076-.574-1.407-.376-.332-.912-.498-1.608-.498-.734 0-1.318.163-1.752.488a2.246 2.246 0 00-.861 1.206l-3.771-.306a5.124 5.124 0 011.13-2.317c.56-.657 1.285-1.16 2.172-1.512.893-.357 1.927-.536 3.101-.536.817 0 1.599.096 2.345.287.753.192 1.42.488 2 .89.588.402 1.05.92 1.389 1.551.338.625.507 1.375.507 2.25v9.915h-3.867v-2.038h-.115c-.236.46-.552.864-.947 1.215a4.387 4.387 0 01-1.427.814c-.555.191-1.196.287-1.924.287zm1.168-2.814c.6 0 1.13-.118 1.589-.354.46-.243.82-.568 1.082-.977.261-.408.392-.87.392-1.387v-1.56c-.128.082-.303.159-.526.23a9.587 9.587 0 01-.737.181 36.44 36.44 0 01-.824.144l-.746.105c-.479.07-.897.182-1.254.335-.357.153-.635.36-.833.622-.197.255-.296.574-.296.957 0 .555.2.98.603 1.273.408.287.925.43 1.55.43zM22.514 21.971a2.236 2.236 0 01-1.627-.67 2.236 2.236 0 01-.67-1.627c0-.625.223-1.161.67-1.608.453-.446.995-.67 1.627-.67.613 0 1.149.224 1.608.67.46.447.69.983.69 1.608 0 .421-.11.808-.326 1.158-.21.345-.489.623-.833.833a2.193 2.193 0 01-1.139.306zM2.02 21.722v-2.46L11.8 5.537H2V2.12h15.008v2.46L7.216 18.305h9.811v3.417H2.02z`})]}))});function qP(e){"@babel/helpers - typeof";return qP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},qP(e)}function JP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JP(Object(n),!0).forEach(function(t){XP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XP(e,t,n){return t=ZP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZP(e){var t=QP(e,`string`);return qP(t)==`symbol`?t:String(t)}function QP(e,t){if(qP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(qP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function $P(e){if(e==null)throw TypeError(`Cannot destructure `+e)}var eF=(0,k.memo)(function(e){var t=Object.assign({},($P(e),e));return(0,A.jsx)(m,YP({Icon:OP,Text:KP,"aria-label":fP,spaceMultiple:mP,textMultiple:pP},t))}),tF=OP;tF.Text=KP,tF.Combine=eF,tF.Avatar=IP,tF.colorPrimary=hP,tF.title=fP;var nF=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`}),rF=`VisuallyHidden`,iF=k.forwardRef((e,t)=>(0,A.jsx)(y.span,{...e,ref:t,style:{...nF,...e.style}}));iF.displayName=rF;var aF=iF;function oF(e){let t=e+`CollectionProvider`,[n,r]=S(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=k.useRef(null),a=k.useRef(new Map).current;return(0,A.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=ee(s),l=k.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,A.jsx)(c,{ref:D(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=ee(u),p=k.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=k.useRef(null),s=D(t,o),c=a(u,n);return k.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,A.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return k.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}typeof window<`u`&&window.document&&window.document.createElement;function K(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var sF=globalThis?.document?k.useLayoutEffect:()=>{},cF=k.useInsertionEffect||sF;function lF({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=uF({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=k.useRef(e!==void 0);k.useEffect(()=>{let e=t.current;if(e!==s){let t=e?`controlled`:`uncontrolled`,n=s?`controlled`:`uncontrolled`;console.warn(`${r} is changing from ${t} to ${n}. 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.`)}t.current=s},[s,r])}return[c,k.useCallback(t=>{if(s){let n=dF(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function uF({defaultProp:e,onChange:t}){let[n,r]=k.useState(e),i=k.useRef(n),a=k.useRef(t);return cF(()=>{a.current=t},[t]),k.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function dF(e){return typeof e==`function`}function fF(e,t){return k.useReducer((e,n)=>t[e][n]??e,e)}var pF=e=>{let{present:t,children:n}=e,r=mF(t),i=typeof n==`function`?n({present:r.isPresent}):k.Children.only(n),a=D(r.ref,gF(i));return typeof n==`function`||r.isPresent?k.cloneElement(i,{ref:a}):null};pF.displayName=`Presence`;function mF(e){let[t,n]=k.useState(),r=k.useRef(null),i=k.useRef(e),a=k.useRef(`none`),[o,s]=fF(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return k.useEffect(()=>{let e=hF(r.current);a.current=o===`mounted`?e:`none`},[o]),sF(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=hF(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),sF(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=hF(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=hF(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:k.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function hF(e){return e?.animationName||`none`}function gF(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _F=k.useId||(()=>void 0),vF=0;function yF(e){let[t,n]=k.useState(_F());return sF(()=>{e||n(e=>e??String(vF++))},[e]),e||(t?`radix-${t}`:``)}var bF=`Collapsible`,[xF,nte]=S(bF),[SF,CF]=xF(bF),wF=k.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=lF({prop:r,defaultProp:i??!1,onChange:o,caller:bF});return(0,A.jsx)(SF,{scope:n,disabled:a,contentId:yF(),open:c,onOpenToggle:k.useCallback(()=>l(e=>!e),[l]),children:(0,A.jsx)(y.div,{"data-state":AF(c),"data-disabled":a?``:void 0,...s,ref:t})})});wF.displayName=bF;var TF=`CollapsibleTrigger`,EF=k.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=CF(TF,n);return(0,A.jsx)(y.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":AF(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:K(e.onClick,i.onOpenToggle)})});EF.displayName=TF;var DF=`CollapsibleContent`,OF=k.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=CF(DF,e.__scopeCollapsible);return(0,A.jsx)(pF,{present:n||i.open,children:({present:e})=>(0,A.jsx)(kF,{...r,ref:t,present:e})})});OF.displayName=DF;var kF=k.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=CF(DF,n),[s,c]=k.useState(r),l=k.useRef(null),u=D(t,l),d=k.useRef(0),f=d.current,p=k.useRef(0),m=p.current,h=o.open||s,g=k.useRef(h),_=k.useRef(void 0);return k.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),sF(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,A.jsx)(y.div,{"data-state":AF(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function AF(e){return e?`open`:`closed`}var jF=wF,MF=k.createContext(void 0);function NF(e){let t=k.useContext(MF);return e||t||`ltr`}function PF(e){let t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...e)=>t.current?.(...e),[])}function FF(e,t=globalThis?.document){let n=PF(e);k.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var IF=`DismissableLayer`,LF=`dismissableLayer.update`,RF=`dismissableLayer.pointerDownOutside`,zF=`dismissableLayer.focusOutside`,BF,VF=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),HF=k.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=k.useContext(VF),[u,d]=k.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=k.useState({}),m=D(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,x=v>=_,S=GF(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=KF(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return FF(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),k.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(BF=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),qF(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=BF)}},[u,f,n,l]),k.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),qF())},[u,l]),k.useEffect(()=>{let e=()=>p({});return document.addEventListener(LF,e),()=>document.removeEventListener(LF,e)},[]),(0,A.jsx)(y.div,{...c,ref:m,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:K(e.onFocusCapture,C.onFocusCapture),onBlurCapture:K(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,S.onPointerDownCapture)})});HF.displayName=IF;var UF=`DismissableLayerBranch`,WF=k.forwardRef((e,t)=>{let n=k.useContext(VF),r=k.useRef(null),i=D(t,r);return k.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,A.jsx)(y.div,{...e,ref:i})});WF.displayName=UF;function GF(e,t=globalThis?.document){let n=PF(e),r=k.useRef(!1),i=k.useRef(()=>{});return k.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){JF(RF,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function KF(e,t=globalThis?.document){let n=PF(e),r=k.useRef(!1);return k.useEffect(()=>{let e=e=>{e.target&&!r.current&&JF(zF,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function qF(){let e=new CustomEvent(LF);document.dispatchEvent(e)}function JF(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?v(i,a):i.dispatchEvent(a)}var YF=`focusScope.autoFocusOnMount`,XF=`focusScope.autoFocusOnUnmount`,ZF={bubbles:!1,cancelable:!0},QF=`FocusScope`,$F=k.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=k.useState(null),l=PF(i),u=PF(a),d=k.useRef(null),f=D(t,e=>c(e)),p=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:oI(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||oI(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&oI(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),k.useEffect(()=>{if(s){sI.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(YF,ZF);s.addEventListener(YF,l),s.dispatchEvent(t),t.defaultPrevented||(eI(uI(nI(s)),{select:!0}),document.activeElement===e&&oI(s))}return()=>{s.removeEventListener(YF,l),setTimeout(()=>{let t=new CustomEvent(XF,ZF);s.addEventListener(XF,u),s.dispatchEvent(t),t.defaultPrevented||oI(e??document.body,{select:!0}),s.removeEventListener(XF,u),sI.remove(p)},0)}}},[s,l,u,p]);let m=k.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=tI(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&oI(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&oI(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,A.jsx)(y.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});$F.displayName=QF;function eI(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(oI(r,{select:t}),document.activeElement!==n)return}function tI(e){let t=nI(e);return[rI(t,e),rI(t.reverse(),e)]}function nI(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function rI(e,t){for(let n of e)if(!iI(n,{upTo:t}))return n}function iI(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 aI(e){return e instanceof HTMLInputElement&&`select`in e}function oI(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&aI(e)&&t&&e.select()}}var sI=cI();function cI(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=lI(e,t),e.unshift(t)},remove(t){e=lI(e,t),e[0]?.resume()}}}function lI(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function uI(e){return e.filter(e=>e.tagName!==`A`)}var dI=`Portal`,fI=k.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=k.useState(!1);sF(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?th.createPortal((0,A.jsx)(y.div,{...r,ref:t}),o):null});fI.displayName=dI;var pI=0;function mI(){k.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??hI()),document.body.insertAdjacentElement(`beforeend`,e[1]??hI()),pI++,()=>{pI===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),pI--}},[])}function hI(){let 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 gI=`right-scroll-bar-position`,_I=`width-before-scroll-bar`,vI=`with-scroll-bars-hidden`,yI=`--removed-body-scroll-bar-size`;function bI(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function xI(e,t){var n=(0,k.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var SI=typeof window<`u`?k.useLayoutEffect:k.useEffect,CI=new WeakMap;function wI(e,t){var n=xI(t||null,function(t){return e.forEach(function(e){return bI(e,t)})});return SI(function(){var t=CI.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||bI(e,null)}),i.forEach(function(e){r.has(e)||bI(e,a)})}CI.set(n,e)},[e]),n}function TI(e){return e}function EI(e,t){t===void 0&&(t=TI);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function DI(e){e===void 0&&(e={});var t=EI(null);return t.options=OC({async:!0,ssr:!1},e),t}var OI=function(e){var t=e.sideCar,n=kC(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return k.createElement(r,OC({},n))};OI.isSideCarExport=!0;function kI(e,t){return e.useMedium(t),OI}var AI=DI(),jI=function(){},MI=k.forwardRef(function(e,t){var n=k.useRef(null),r=k.useState({onScrollCapture:jI,onWheelCapture:jI,onTouchMoveCapture:jI}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=kC(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=wI([n,t]),C=OC(OC({},b),i);return k.createElement(k.Fragment,null,u&&k.createElement(x,{sideCar:AI,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?k.cloneElement(k.Children.only(s),OC(OC({},C),{ref:S})):k.createElement(v,OC({},C,{className:c,ref:S}),s))});MI.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},MI.classNames={fullWidth:_I,zeroRight:gI};var NI,PI=function(){if(NI)return NI;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function FI(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=PI();return t&&e.setAttribute(`nonce`,t),e}function II(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function LI(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var RI=function(){var e=0,t=null;return{add:function(n){e==0&&(t=FI())&&(II(t,n),LI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zI=function(){var e=RI();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},BI=function(){var e=zI();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},VI={left:0,top:0,right:0,gap:0},HI=function(e){return parseInt(e||``,10)||0},UI=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[HI(n),HI(r),HI(i)]},WI=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return VI;var t=UI(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},GI=BI(),KI=`data-scroll-locked`,qI=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
429
|
+
.${vI} {
|
|
430
|
+
overflow: hidden ${r};
|
|
431
|
+
padding-right: ${s}px ${r};
|
|
432
|
+
}
|
|
433
|
+
body[${KI}] {
|
|
434
|
+
overflow: hidden ${r};
|
|
435
|
+
overscroll-behavior: contain;
|
|
436
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
437
|
+
padding-left: ${i}px;
|
|
438
|
+
padding-top: ${a}px;
|
|
439
|
+
padding-right: ${o}px;
|
|
440
|
+
margin-left:0;
|
|
441
|
+
margin-top:0;
|
|
442
|
+
margin-right: ${s}px ${r};
|
|
443
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.${gI} {
|
|
447
|
+
right: ${s}px ${r};
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.${_I} {
|
|
451
|
+
margin-right: ${s}px ${r};
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.${gI} .${gI} {
|
|
455
|
+
right: 0 ${r};
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.${_I} .${_I} {
|
|
459
|
+
margin-right: 0 ${r};
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
body[${KI}] {
|
|
463
|
+
${yI}: ${s}px;
|
|
464
|
+
}
|
|
465
|
+
`},JI=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},YI=function(){k.useEffect(function(){return document.body.setAttribute(KI,(JI()+1).toString()),function(){var e=JI()-1;e<=0?document.body.removeAttribute(KI):document.body.setAttribute(KI,e.toString())}},[])},XI=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;YI();var a=k.useMemo(function(){return WI(i)},[i]);return k.createElement(GI,{styles:qI(a,!t,i,n?``:`!important`)})},ZI=!1;if(typeof window<`u`)try{var QI=Object.defineProperty({},`passive`,{get:function(){return ZI=!0,!0}});window.addEventListener(`test`,QI,QI),window.removeEventListener(`test`,QI,QI)}catch{ZI=!1}var $I=ZI?{passive:!1}:!1,eL=function(e){return e.tagName===`TEXTAREA`},tL=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!eL(e)&&n[t]===`visible`)},nL=function(e){return tL(e,`overflowY`)},rL=function(e){return tL(e,`overflowX`)},iL=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),sL(e,r)){var i=cL(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},aL=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},oL=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},sL=function(e,t){return e===`v`?nL(t):rL(t)},cL=function(e,t){return e===`v`?aL(t):oL(t)},lL=function(e,t){return e===`h`&&t===`rtl`?-1:1},uL=function(e,t,n,r,i){var a=lL(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=cL(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&sL(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},dL=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fL=function(e){return[e.deltaX,e.deltaY]},pL=function(e){return e&&`current`in e?e.current:e},mL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},hL=function(e){return`
|
|
466
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
467
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
468
|
+
`},gL=0,_L=[];function vL(e){var t=k.useRef([]),n=k.useRef([0,0]),r=k.useRef(),i=k.useState(gL++)[0],a=k.useState(BI)[0],o=k.useRef(e);k.useEffect(function(){o.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=AC([e.lockRef.current],(e.shards||[]).map(pL),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=k.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=dL(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=iL(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=iL(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return uL(h,t,e,h===`h`?s:c,!0)},[]),c=k.useCallback(function(e){var n=e;if(!(!_L.length||_L[_L.length-1]!==a)){var r=`deltaY`in n?fL(n):dL(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&mL(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(pL).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=k.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:yL(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=k.useCallback(function(e){n.current=dL(e),r.current=void 0},[]),d=k.useCallback(function(t){l(t.type,fL(t),t.target,s(t,e.lockRef.current))},[]),f=k.useCallback(function(t){l(t.type,dL(t),t.target,s(t,e.lockRef.current))},[]);k.useEffect(function(){return _L.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,$I),document.addEventListener(`touchmove`,c,$I),document.addEventListener(`touchstart`,u,$I),function(){_L=_L.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,$I),document.removeEventListener(`touchmove`,c,$I),document.removeEventListener(`touchstart`,u,$I)}},[]);var p=e.removeScrollBar,m=e.inert;return k.createElement(k.Fragment,null,m?k.createElement(a,{styles:hL(i)}):null,p?k.createElement(XI,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function yL(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var bL=kI(AI,vL),xL=k.forwardRef(function(e,t){return k.createElement(MI,OC({},e,{ref:t,sideCar:bL}))});xL.classNames=MI.classNames;var SL=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},CL=new WeakMap,wL=new WeakMap,TL={},EL=0,DL=function(e){return e&&(e.host||DL(e.parentNode))},OL=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=DL(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},kL=function(e,t,n,r){var i=OL(t,Array.isArray(e)?e:[e]);TL[n]||(TL[n]=new WeakMap);var a=TL[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(CL.get(e)||0)+1,l=(a.get(e)||0)+1;CL.set(e,c),a.set(e,l),o.push(e),c===1&&i&&wL.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),EL++,function(){o.forEach(function(e){var t=CL.get(e)-1,i=a.get(e)-1;CL.set(e,t),a.set(e,i),t||(wL.has(e)||e.removeAttribute(r),wL.delete(e)),i||e.removeAttribute(n)}),EL--,EL||(CL=new WeakMap,CL=new WeakMap,wL=new WeakMap,TL={})}},AL=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||SL(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),kL(r,i,n,`aria-hidden`)):function(){return null}},jL=`Dialog`,[ML,rte]=S(jL),[NL,PL]=ML(jL),FL=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=k.useRef(null),c=k.useRef(null),[l,u]=lF({prop:r,defaultProp:i??!1,onChange:a,caller:jL});return(0,A.jsx)(NL,{scope:t,triggerRef:s,contentRef:c,contentId:yF(),titleId:yF(),descriptionId:yF(),open:l,onOpenChange:u,onOpenToggle:k.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};FL.displayName=jL;var IL=`DialogTrigger`,LL=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=PL(IL,n),a=D(t,i.triggerRef);return(0,A.jsx)(y.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":rR(i.open),...r,ref:a,onClick:K(e.onClick,i.onOpenToggle)})});LL.displayName=IL;var RL=`DialogPortal`,[zL,BL]=ML(RL,{forceMount:void 0}),VL=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=PL(RL,t);return(0,A.jsx)(zL,{scope:t,forceMount:n,children:k.Children.map(r,e=>(0,A.jsx)(pF,{present:n||a.open,children:(0,A.jsx)(fI,{asChild:!0,container:i,children:e})}))})};VL.displayName=RL;var HL=`DialogOverlay`,UL=k.forwardRef((e,t)=>{let n=BL(HL,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=PL(HL,e.__scopeDialog);return a.modal?(0,A.jsx)(pF,{present:r||a.open,children:(0,A.jsx)(GL,{...i,ref:t})}):null});UL.displayName=HL;var WL=ee(`DialogOverlay.RemoveScroll`),GL=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=PL(HL,n);return(0,A.jsx)(xL,{as:WL,allowPinchZoom:!0,shards:[i.contentRef],children:(0,A.jsx)(y.div,{"data-state":rR(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),KL=`DialogContent`,qL=k.forwardRef((e,t)=>{let n=BL(KL,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=PL(KL,e.__scopeDialog);return(0,A.jsx)(pF,{present:r||a.open,children:a.modal?(0,A.jsx)(JL,{...i,ref:t}):(0,A.jsx)(YL,{...i,ref:t})})});qL.displayName=KL;var JL=k.forwardRef((e,t)=>{let n=PL(KL,e.__scopeDialog),r=k.useRef(null),i=D(t,n.contentRef,r);return k.useEffect(()=>{let e=r.current;if(e)return AL(e)},[]),(0,A.jsx)(XL,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault())})}),YL=k.forwardRef((e,t)=>{let n=PL(KL,e.__scopeDialog),r=k.useRef(!1),i=k.useRef(!1);return(0,A.jsx)(XL,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),XL=k.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=PL(KL,n),c=k.useRef(null),l=D(t,c);return mI(),(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)($F,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,A.jsx)(HF,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":rR(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(oR,{titleId:s.titleId}),(0,A.jsx)(cR,{contentRef:c,descriptionId:s.descriptionId})]})]})}),ZL=`DialogTitle`,QL=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=PL(ZL,n);return(0,A.jsx)(y.h2,{id:i.titleId,...r,ref:t})});QL.displayName=ZL;var $L=`DialogDescription`,eR=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=PL($L,n);return(0,A.jsx)(y.p,{id:i.descriptionId,...r,ref:t})});eR.displayName=$L;var tR=`DialogClose`,nR=k.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=PL(tR,n);return(0,A.jsx)(y.button,{type:`button`,...r,ref:t,onClick:K(e.onClick,()=>i.onOpenChange(!1))})});nR.displayName=tR;function rR(e){return e?`open`:`closed`}var iR=`DialogTitleWarning`,[ite,aR]=C(iR,{contentName:KL,titleName:ZL,docsSlug:`dialog`}),oR=({titleId:e})=>{let t=aR(iR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
469
|
+
|
|
470
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
471
|
+
|
|
472
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return k.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},sR=`DialogDescriptionWarning`,cR=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${aR(sR).contentName}}.`;return k.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},lR=FL,uR=LL,dR=VL,fR=UL,pR=qL,mR=QL,hR=eR,gR=nR;function _R(e){let t=k.useRef({value:e,previous:e});return k.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function vR(e){let[t,n]=k.useState(void 0);return sF(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var yR=`Arrow`,bR=k.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,A.jsx)(y.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,A.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});bR.displayName=yR;var xR=bR,SR=`Popper`,[CR,wR]=S(SR),[TR,ER]=CR(SR),DR=e=>{let{__scopePopper:t,children:n}=e,[r,i]=k.useState(null);return(0,A.jsx)(TR,{scope:t,anchor:r,onAnchorChange:i,children:n})};DR.displayName=SR;var OR=`PopperAnchor`,kR=k.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=ER(OR,n),o=k.useRef(null),s=D(t,o),c=k.useRef(null);return k.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,A.jsx)(y.div,{...i,ref:s})});kR.displayName=OR;var AR=`PopperContent`,[jR,MR]=CR(AR),NR=k.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=ER(AR,n),[_,v]=k.useState(null),b=D(t,e=>v(e)),[x,S]=k.useState(null),C=vR(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),ee=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},te=Array.isArray(l)?l:[l],ne=te.length>0,re={padding:ee,boundary:te.filter(LR),altBoundary:ne},{refs:ie,floatingStyles:ae,placement:oe,isPositioned:se,middlewareData:ce}=sh({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>Km(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[lh({mainAxis:i+T,alignmentAxis:o}),c&&uh({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?dh():void 0,...re}),c&&fh({...re}),ph({...re,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),x&&hh({element:x,padding:s}),RR({arrowWidth:w,arrowHeight:T}),f&&mh({strategy:`referenceHidden`,...re})]}),[le,ue]=zR(oe),de=PF(m);sF(()=>{se&&de?.()},[se,de]);let fe=ce.arrow?.x,pe=ce.arrow?.y,me=ce.arrow?.centerOffset!==0,[he,ge]=k.useState();return sF(()=>{_&&ge(window.getComputedStyle(_).zIndex)},[_]),(0,A.jsx)(`div`,{ref:ie.setFloating,"data-radix-popper-content-wrapper":``,style:{...ae,transform:se?ae.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:he,"--radix-popper-transform-origin":[ce.transformOrigin?.x,ce.transformOrigin?.y].join(` `),...ce.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,A.jsx)(jR,{scope:n,placedSide:le,onArrowChange:S,arrowX:fe,arrowY:pe,shouldHideArrow:me,children:(0,A.jsx)(y.div,{"data-side":le,"data-align":ue,...h,ref:b,style:{...h.style,animation:se?void 0:`none`}})})})});NR.displayName=AR;var PR=`PopperArrow`,FR={top:`bottom`,right:`left`,bottom:`top`,left:`right`},IR=k.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=MR(PR,n),a=FR[i.placedSide];return(0,A.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,A.jsx)(xR,{...r,ref:t,style:{...r.style,display:`block`}})})});IR.displayName=PR;function LR(e){return e!==null}var RR=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=zR(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function zR(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var BR=DR,VR=kR,HR=NR,UR=IR,WR=`rovingFocusGroup.onEntryFocus`,GR={bubbles:!1,cancelable:!0},KR=`RovingFocusGroup`,[qR,JR,YR]=oF(KR),[XR,ZR]=S(KR,[YR]),[QR,$R]=XR(KR),ez=k.forwardRef((e,t)=>(0,A.jsx)(qR.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,A.jsx)(qR.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,A.jsx)(tz,{...e,ref:t})})}));ez.displayName=KR;var tz=k.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=k.useRef(null),p=D(t,f),m=NF(a),[h,g]=lF({prop:o,defaultProp:s??null,onChange:c,caller:KR}),[_,v]=k.useState(!1),b=PF(l),x=JR(n),S=k.useRef(!1),[C,w]=k.useState(0);return k.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(WR,b),()=>e.removeEventListener(WR,b)},[b]),(0,A.jsx)(QR,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:k.useCallback(e=>g(e),[g]),onItemShiftTab:k.useCallback(()=>v(!0),[]),onFocusableItemAdd:k.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:k.useCallback(()=>w(e=>e-1),[]),children:(0,A.jsx)(y.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:K(e.onMouseDown,()=>{S.current=!0}),onFocus:K(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(WR,GR);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);sz([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:K(e.onBlur,()=>v(!1))})})}),nz=`RovingFocusGroupItem`,rz=k.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=yF(),l=a||c,u=$R(nz,n),d=u.currentTabStopId===l,f=JR(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return k.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,A.jsx)(qR.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,A.jsx)(y.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:K(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:K(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:K(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=oz(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?cz(n,r+1):n.slice(r+1)}setTimeout(()=>sz(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});rz.displayName=nz;var iz={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function az(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function oz(e,t,n){let r=az(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return iz[r]}function sz(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function cz(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var lz=ez,uz=rz,dz=[`Enter`,` `],fz=[`ArrowDown`,`PageUp`,`Home`],pz=[`ArrowUp`,`PageDown`,`End`],mz=[...fz,...pz],hz={ltr:[...dz,`ArrowRight`],rtl:[...dz,`ArrowLeft`]},gz={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},_z=`Menu`,[vz,yz,bz]=oF(_z),[xz,Sz]=S(_z,[bz,wR,ZR]),Cz=wR(),wz=ZR(),[Tz,Ez]=xz(_z),[Dz,Oz]=xz(_z),kz=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Cz(t),[c,l]=k.useState(null),u=k.useRef(!1),d=PF(a),f=NF(i);return k.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,A.jsx)(BR,{...s,children:(0,A.jsx)(Tz,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,A.jsx)(Dz,{scope:t,onClose:k.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};kz.displayName=_z;var Az=`MenuAnchor`,jz=k.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Cz(n);return(0,A.jsx)(VR,{...i,...r,ref:t})});jz.displayName=Az;var Mz=`MenuPortal`,[Nz,Pz]=xz(Mz,{forceMount:void 0}),Fz=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Ez(Mz,t);return(0,A.jsx)(Nz,{scope:t,forceMount:n,children:(0,A.jsx)(pF,{present:n||a.open,children:(0,A.jsx)(fI,{asChild:!0,container:i,children:r})})})};Fz.displayName=Mz;var Iz=`MenuContent`,[Lz,Rz]=xz(Iz),zz=k.forwardRef((e,t)=>{let n=Pz(Iz,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Ez(Iz,e.__scopeMenu),o=Oz(Iz,e.__scopeMenu);return(0,A.jsx)(vz.Provider,{scope:e.__scopeMenu,children:(0,A.jsx)(pF,{present:r||a.open,children:(0,A.jsx)(vz.Slot,{scope:e.__scopeMenu,children:o.modal?(0,A.jsx)(Bz,{...i,ref:t}):(0,A.jsx)(Vz,{...i,ref:t})})})})}),Bz=k.forwardRef((e,t)=>{let n=Ez(Iz,e.__scopeMenu),r=k.useRef(null),i=D(t,r);return k.useEffect(()=>{let e=r.current;if(e)return AL(e)},[]),(0,A.jsx)(Uz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Vz=k.forwardRef((e,t)=>{let n=Ez(Iz,e.__scopeMenu);return(0,A.jsx)(Uz,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Hz=ee(`MenuContent.ScrollLock`),Uz=k.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=Ez(Iz,n),_=Oz(Iz,n),v=Cz(n),y=wz(n),b=yz(n),[x,S]=k.useState(null),C=k.useRef(null),w=D(t,C,g.onContentChange),T=k.useRef(0),E=k.useRef(``),ee=k.useRef(0),te=k.useRef(null),ne=k.useRef(`right`),re=k.useRef(0),ie=m?xL:k.Fragment,ae=m?{as:Hz,allowPinchZoom:!0}:void 0,oe=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=DB(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};k.useEffect(()=>()=>window.clearTimeout(T.current),[]),mI();let se=k.useCallback(e=>ne.current===te.current?.side&&kB(e,te.current?.area),[]);return(0,A.jsx)(Lz,{scope:n,searchRef:E,onItemEnter:k.useCallback(e=>{se(e)&&e.preventDefault()},[se]),onItemLeave:k.useCallback(e=>{se(e)||(C.current?.focus(),S(null))},[se]),onTriggerLeave:k.useCallback(e=>{se(e)&&e.preventDefault()},[se]),pointerGraceTimerRef:ee,onPointerGraceIntentChange:k.useCallback(e=>{te.current=e},[]),children:(0,A.jsx)(ie,{...ae,children:(0,A.jsx)($F,{asChild:!0,trapped:i,onMountAutoFocus:K(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,A.jsx)(HF,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,A.jsx)(lz,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:K(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,A.jsx)(HR,{role:`menu`,"aria-orientation":`vertical`,"data-state":SB(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:K(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&oe(e.key));let i=C.current;if(e.target!==i||!mz.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);pz.includes(e.key)&&a.reverse(),TB(a)}),onBlur:K(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:K(e.onPointerMove,AB(e=>{let t=e.target,n=re.current!==e.clientX;e.currentTarget.contains(t)&&n&&(ne.current=e.clientX>re.current?`right`:`left`,re.current=e.clientX)}))})})})})})})});zz.displayName=Iz;var Wz=`MenuGroup`,Gz=k.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,A.jsx)(y.div,{role:`group`,...r,ref:t})});Gz.displayName=Wz;var Kz=`MenuLabel`,qz=k.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,A.jsx)(y.div,{...r,ref:t})});qz.displayName=Kz;var Jz=`MenuItem`,Yz=`menu.itemSelect`,Xz=k.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=k.useRef(null),o=Oz(Jz,e.__scopeMenu),s=Rz(Jz,e.__scopeMenu),c=D(t,a),l=k.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Yz,{bubbles:!0,cancelable:!0});e.addEventListener(Yz,e=>r?.(e),{once:!0}),v(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,A.jsx)(Zz,{...i,ref:c,disabled:n,onClick:K(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:K(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:K(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||dz.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Xz.displayName=Jz;var Zz=k.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Rz(Jz,n),s=wz(n),c=k.useRef(null),l=D(t,c),[u,d]=k.useState(!1),[f,p]=k.useState(``);return k.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,A.jsx)(vz.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,A.jsx)(uz,{asChild:!0,...s,focusable:!r,children:(0,A.jsx)(y.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:K(e.onPointerMove,AB(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,AB(e=>o.onItemLeave(e))),onFocus:K(e.onFocus,()=>d(!0)),onBlur:K(e.onBlur,()=>d(!1))})})})}),Qz=`MenuCheckboxItem`,$z=k.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,A.jsx)(sB,{scope:e.__scopeMenu,checked:n,children:(0,A.jsx)(Xz,{role:`menuitemcheckbox`,"aria-checked":CB(n)?`mixed`:n,...i,ref:t,"data-state":wB(n),onSelect:K(i.onSelect,()=>r?.(CB(n)?!0:!n),{checkForDefaultPrevented:!1})})})});$z.displayName=Qz;var eB=`MenuRadioGroup`,[tB,nB]=xz(eB,{value:void 0,onValueChange:()=>{}}),rB=k.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=PF(r);return(0,A.jsx)(tB,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,A.jsx)(Gz,{...i,ref:t})})});rB.displayName=eB;var iB=`MenuRadioItem`,aB=k.forwardRef((e,t)=>{let{value:n,...r}=e,i=nB(iB,e.__scopeMenu),a=n===i.value;return(0,A.jsx)(sB,{scope:e.__scopeMenu,checked:a,children:(0,A.jsx)(Xz,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":wB(a),onSelect:K(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});aB.displayName=iB;var oB=`MenuItemIndicator`,[sB,cB]=xz(oB,{checked:!1}),lB=k.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=cB(oB,n);return(0,A.jsx)(pF,{present:r||CB(a.checked)||a.checked===!0,children:(0,A.jsx)(y.span,{...i,ref:t,"data-state":wB(a.checked)})})});lB.displayName=oB;var uB=`MenuSeparator`,dB=k.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,A.jsx)(y.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});dB.displayName=uB;var fB=`MenuArrow`,pB=k.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Cz(n);return(0,A.jsx)(UR,{...i,...r,ref:t})});pB.displayName=fB;var mB=`MenuSub`,[hB,gB]=xz(mB),_B=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=Ez(mB,t),o=Cz(t),[s,c]=k.useState(null),[l,u]=k.useState(null),d=PF(i);return k.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,A.jsx)(BR,{...o,children:(0,A.jsx)(Tz,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,A.jsx)(hB,{scope:t,contentId:yF(),triggerId:yF(),trigger:s,onTriggerChange:c,children:n})})})};_B.displayName=mB;var vB=`MenuSubTrigger`,yB=k.forwardRef((e,t)=>{let n=Ez(vB,e.__scopeMenu),r=Oz(vB,e.__scopeMenu),i=gB(vB,e.__scopeMenu),a=Rz(vB,e.__scopeMenu),o=k.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=k.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return k.useEffect(()=>u,[u]),k.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,A.jsx)(jz,{asChild:!0,...l,children:(0,A.jsx)(Zz,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":SB(n.open),...e,ref:h(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,AB(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:K(e.onPointerLeave,AB(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:K(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||hz[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});yB.displayName=vB;var bB=`MenuSubContent`,xB=k.forwardRef((e,t)=>{let n=Pz(Iz,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Ez(Iz,e.__scopeMenu),o=Oz(Iz,e.__scopeMenu),s=gB(bB,e.__scopeMenu),c=k.useRef(null),l=D(t,c);return(0,A.jsx)(vz.Provider,{scope:e.__scopeMenu,children:(0,A.jsx)(pF,{present:r||a.open,children:(0,A.jsx)(vz.Slot,{scope:e.__scopeMenu,children:(0,A.jsx)(Uz,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:K(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:K(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:K(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=gz[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});xB.displayName=bB;function SB(e){return e?`open`:`closed`}function CB(e){return e===`indeterminate`}function wB(e){return CB(e)?`indeterminate`:e?`checked`:`unchecked`}function TB(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function EB(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function DB(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=EB(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function OB(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function kB(e,t){return t?OB({x:e.clientX,y:e.clientY},t):!1}function AB(e){return t=>t.pointerType===`mouse`?e(t):void 0}var jB=kz,MB=jz,NB=Fz,PB=zz,FB=Gz,IB=qz,LB=Xz,RB=$z,zB=rB,BB=aB,VB=lB,HB=dB,UB=pB,WB=_B,GB=yB,KB=xB,qB=`Menubar`,[JB,YB,XB]=oF(qB),[ZB,ate]=S(qB,[XB,ZR]),QB=Sz(),$B=ZR(),[eV,tV]=ZB(qB),nV=k.forwardRef((e,t)=>{let{__scopeMenubar:n,value:r,onValueChange:i,defaultValue:a,loop:o=!0,dir:s,...c}=e,l=NF(s),u=$B(n),[d,f]=lF({prop:r,onChange:i,defaultProp:a??``,caller:qB}),[p,m]=k.useState(null);return(0,A.jsx)(eV,{scope:n,value:d,onMenuOpen:k.useCallback(e=>{f(e),m(e)},[f]),onMenuClose:k.useCallback(()=>f(``),[f]),onMenuToggle:k.useCallback(e=>{f(t=>t?``:e),m(e)},[f]),dir:l,loop:o,children:(0,A.jsx)(JB.Provider,{scope:n,children:(0,A.jsx)(JB.Slot,{scope:n,children:(0,A.jsx)(lz,{asChild:!0,...u,orientation:`horizontal`,loop:o,dir:l,currentTabStopId:p,onCurrentTabStopIdChange:m,children:(0,A.jsx)(y.div,{role:`menubar`,...c,ref:t})})})})})});nV.displayName=qB;var rV=`MenubarMenu`,[iV,aV]=ZB(rV),oV=e=>{let{__scopeMenubar:t,value:n,...r}=e,i=yF(),a=n||i||`LEGACY_REACT_AUTO_VALUE`,o=tV(rV,t),s=QB(t),c=k.useRef(null),l=k.useRef(!1),u=o.value===a;return k.useEffect(()=>{u||(l.current=!1)},[u]),(0,A.jsx)(iV,{scope:t,value:a,triggerId:yF(),triggerRef:c,contentId:yF(),wasKeyboardTriggerOpenRef:l,children:(0,A.jsx)(jB,{...s,open:u,onOpenChange:e=>{e||o.onMenuClose()},modal:!1,dir:o.dir,...r})})};oV.displayName=rV;var sV=`MenubarTrigger`,cV=k.forwardRef((e,t)=>{let{__scopeMenubar:n,disabled:r=!1,...i}=e,a=$B(n),o=QB(n),s=tV(sV,n),c=aV(sV,n),l=k.useRef(null),u=D(t,l,c.triggerRef),[d,f]=k.useState(!1),p=s.value===c.value;return(0,A.jsx)(JB.ItemSlot,{scope:n,value:c.value,disabled:r,children:(0,A.jsx)(uz,{asChild:!0,...a,focusable:!r,tabStopId:c.value,children:(0,A.jsx)(MB,{asChild:!0,...o,children:(0,A.jsx)(y.button,{type:`button`,role:`menuitem`,id:c.triggerId,"aria-haspopup":`menu`,"aria-expanded":p,"aria-controls":p?c.contentId:void 0,"data-highlighted":d?``:void 0,"data-state":p?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:u,onPointerDown:K(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(s.onMenuOpen(c.value),p||e.preventDefault())}),onPointerEnter:K(e.onPointerEnter,()=>{s.value&&!p&&(s.onMenuOpen(c.value),l.current?.focus())}),onKeyDown:K(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&s.onMenuToggle(c.value),e.key===`ArrowDown`&&s.onMenuOpen(c.value),[`Enter`,` `,`ArrowDown`].includes(e.key)&&(c.wasKeyboardTriggerOpenRef.current=!0,e.preventDefault()))}),onFocus:K(e.onFocus,()=>f(!0)),onBlur:K(e.onBlur,()=>f(!1))})})})})});cV.displayName=sV;var lV=`MenubarPortal`,uV=e=>{let{__scopeMenubar:t,...n}=e,r=QB(t);return(0,A.jsx)(NB,{...r,...n})};uV.displayName=lV;var dV=`MenubarContent`,fV=k.forwardRef((e,t)=>{let{__scopeMenubar:n,align:r=`start`,...i}=e,a=QB(n),o=tV(dV,n),s=aV(dV,n),c=YB(n),l=k.useRef(!1);return(0,A.jsx)(PB,{id:s.contentId,"aria-labelledby":s.triggerId,"data-radix-menubar-content":``,...a,...i,ref:t,align:r,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{!o.value&&!l.current&&s.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onFocusOutside:K(e.onFocusOutside,e=>{let t=e.target;c().some(e=>e.ref.current?.contains(t))&&e.preventDefault()}),onInteractOutside:K(e.onInteractOutside,()=>{l.current=!0}),onEntryFocus:e=>{s.wasKeyboardTriggerOpenRef.current||e.preventDefault()},onKeyDown:K(e.onKeyDown,e=>{if([`ArrowRight`,`ArrowLeft`].includes(e.key)){let t=e.target,n=t.hasAttribute(`data-radix-menubar-subtrigger`),r=t.closest(`[data-radix-menubar-content]`)!==e.currentTarget,i=(o.dir===`rtl`?`ArrowRight`:`ArrowLeft`)===e.key;if(!i&&n||r&&i)return;let a=c().filter(e=>!e.disabled).map(e=>e.value);i&&a.reverse();let l=a.indexOf(s.value);a=o.loop?LV(a,l+1):a.slice(l+1);let[u]=a;u&&o.onMenuOpen(u)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-menubar-content-available-width":`var(--radix-popper-available-width)`,"--radix-menubar-content-available-height":`var(--radix-popper-available-height)`,"--radix-menubar-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-menubar-trigger-height":`var(--radix-popper-anchor-height)`}})});fV.displayName=dV;var pV=`MenubarGroup`,mV=k.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=QB(n);return(0,A.jsx)(FB,{...i,...r,ref:t})});mV.displayName=pV;var hV=`MenubarLabel`,gV=k.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=QB(n);return(0,A.jsx)(IB,{...i,...r,ref:t})});gV.displayName=hV;var _V=`MenubarItem`,vV=k.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=QB(n);return(0,A.jsx)(LB,{...i,...r,ref:t})});vV.displayName=_V;var yV=`MenubarCheckboxItem`,bV=k.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=QB(n);return(0,A.jsx)(RB,{...i,...r,ref:t})});bV.displayName=yV;var xV=`MenubarRadioGroup`,SV=k.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=QB(n);return(0,A.jsx)(zB,{...i,...r,ref:t})});SV.displayName=xV;var CV=`MenubarRadioItem`,wV=k.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=QB(n);return(0,A.jsx)(BB,{...i,...r,ref:t})});wV.displayName=CV;var TV=`MenubarItemIndicator`,EV=k.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=QB(n);return(0,A.jsx)(VB,{...i,...r,ref:t})});EV.displayName=TV;var DV=`MenubarSeparator`,OV=k.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=QB(n);return(0,A.jsx)(HB,{...i,...r,ref:t})});OV.displayName=DV;var kV=`MenubarArrow`,AV=k.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=QB(n);return(0,A.jsx)(UB,{...i,...r,ref:t})});AV.displayName=kV;var jV=`MenubarSub`,MV=e=>{let{__scopeMenubar:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=QB(t),[s,c]=lF({prop:r,defaultProp:a??!1,onChange:i,caller:jV});return(0,A.jsx)(WB,{...o,open:s,onOpenChange:c,children:n})};MV.displayName=jV;var NV=`MenubarSubTrigger`,PV=k.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=QB(n);return(0,A.jsx)(GB,{"data-radix-menubar-subtrigger":``,...i,...r,ref:t})});PV.displayName=NV;var FV=`MenubarSubContent`,IV=k.forwardRef((e,t)=>{let{__scopeMenubar:n,...r}=e,i=QB(n);return(0,A.jsx)(KB,{...i,"data-radix-menubar-content":``,...r,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-menubar-content-available-width":`var(--radix-popper-available-width)`,"--radix-menubar-content-available-height":`var(--radix-popper-available-height)`,"--radix-menubar-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-menubar-trigger-height":`var(--radix-popper-anchor-height)`}})});IV.displayName=FV;function LV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var RV=nV,zV=oV,BV=cV,VV=uV,HV=fV,UV=vV,WV=MV,GV=PV,KV=IV;function qV(e,[t,n]){return Math.min(n,Math.max(t,e))}var JV=`Popover`,[YV,ote]=S(JV,[wR]),XV=wR(),[ZV,QV]=YV(JV),$V=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=XV(t),c=k.useRef(null),[l,u]=k.useState(!1),[d,f]=lF({prop:r,defaultProp:i??!1,onChange:a,caller:JV});return(0,A.jsx)(BR,{...s,children:(0,A.jsx)(ZV,{scope:t,contentId:yF(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:k.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:k.useCallback(()=>u(!0),[]),onCustomAnchorRemove:k.useCallback(()=>u(!1),[]),modal:o,children:n})})};$V.displayName=JV;var eH=`PopoverAnchor`,tH=k.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=QV(eH,n),a=XV(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return k.useEffect(()=>(o(),()=>s()),[o,s]),(0,A.jsx)(VR,{...a,...r,ref:t})});tH.displayName=eH;var nH=`PopoverTrigger`,rH=k.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=QV(nH,n),a=XV(n),o=D(t,i.triggerRef),s=(0,A.jsx)(y.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":vH(i.open),...r,ref:o,onClick:K(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,A.jsx)(VR,{asChild:!0,...a,children:s})});rH.displayName=nH;var iH=`PopoverPortal`,[aH,oH]=YV(iH,{forceMount:void 0}),sH=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=QV(iH,t);return(0,A.jsx)(aH,{scope:t,forceMount:n,children:(0,A.jsx)(pF,{present:n||a.open,children:(0,A.jsx)(fI,{asChild:!0,container:i,children:r})})})};sH.displayName=iH;var cH=`PopoverContent`,lH=k.forwardRef((e,t)=>{let n=oH(cH,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=QV(cH,e.__scopePopover);return(0,A.jsx)(pF,{present:r||a.open,children:a.modal?(0,A.jsx)(dH,{...i,ref:t}):(0,A.jsx)(fH,{...i,ref:t})})});lH.displayName=cH;var uH=ee(`PopoverContent.RemoveScroll`),dH=k.forwardRef((e,t)=>{let n=QV(cH,e.__scopePopover),r=k.useRef(null),i=D(t,r),a=k.useRef(!1);return k.useEffect(()=>{let e=r.current;if(e)return AL(e)},[]),(0,A.jsx)(xL,{as:uH,allowPinchZoom:!0,children:(0,A.jsx)(pH,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),fH=k.forwardRef((e,t)=>{let n=QV(cH,e.__scopePopover),r=k.useRef(!1),i=k.useRef(!1);return(0,A.jsx)(pH,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),pH=k.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=QV(cH,n),p=XV(n);return mI(),(0,A.jsx)($F,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,A.jsx)(HF,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,A.jsx)(HR,{"data-state":vH(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),mH=`PopoverClose`,hH=k.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=QV(mH,n);return(0,A.jsx)(y.button,{type:`button`,...r,ref:t,onClick:K(e.onClick,()=>i.onOpenChange(!1))})});hH.displayName=mH;var gH=`PopoverArrow`,_H=k.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=XV(n);return(0,A.jsx)(UR,{...i,...r,ref:t})});_H.displayName=gH;function vH(e){return e?`open`:`closed`}var yH=$V,bH=rH,xH=sH,SH=lH;function CH(e,t){return k.useReducer((e,n)=>t[e][n]??e,e)}var wH=`ScrollArea`,[TH,ste]=S(wH),[EH,DH]=TH(wH),OH=k.forwardRef((e,t)=>{let{__scopeScrollArea:n,type:r=`hover`,dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=k.useState(null),[l,u]=k.useState(null),[d,f]=k.useState(null),[p,m]=k.useState(null),[h,g]=k.useState(null),[_,v]=k.useState(0),[b,x]=k.useState(0),[S,C]=k.useState(!1),[w,T]=k.useState(!1),E=D(t,e=>c(e)),ee=NF(i);return(0,A.jsx)(EH,{scope:n,type:r,dir:ee,scrollHideDelay:a,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:S,onScrollbarXEnabledChange:C,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:w,onScrollbarYEnabledChange:T,onCornerWidthChange:v,onCornerHeightChange:x,children:(0,A.jsx)(y.div,{dir:ee,...o,ref:E,style:{position:`relative`,"--radix-scroll-area-corner-width":_+`px`,"--radix-scroll-area-corner-height":b+`px`,...e.style}})})});OH.displayName=wH;var kH=`ScrollAreaViewport`,AH=k.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=DH(kH,n),s=D(t,k.useRef(null),o.onViewportChange);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:i}),(0,A.jsx)(y.div,{"data-radix-scroll-area-viewport":``,...a,ref:s,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,A.jsx)(`div`,{ref:o.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})});AH.displayName=kH;var jH=`ScrollAreaScrollbar`,MH=k.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=DH(jH,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return k.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,A.jsx)(NH,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,A.jsx)(PH,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,A.jsx)(FH,{...r,ref:t,forceMount:n}):i.type===`always`?(0,A.jsx)(IH,{...r,ref:t}):null});MH.displayName=jH;var NH=k.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=DH(jH,e.__scopeScrollArea),[a,o]=k.useState(!1);return k.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),o(!0)},r=()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,A.jsx)(pF,{present:n||a,children:(0,A.jsx)(FH,{"data-state":a?`visible`:`hidden`,...r,ref:t})})}),PH=k.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=DH(jH,e.__scopeScrollArea),a=e.orientation===`horizontal`,o=nU(()=>c(`SCROLL_END`),100),[s,c]=CH(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return k.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>c(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,c]),k.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(c(`SCROLL`),o()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c,o]),(0,A.jsx)(pF,{present:n||s!==`hidden`,children:(0,A.jsx)(IH,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:K(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:K(e.onPointerLeave,()=>c(`POINTER_LEAVE`))})})}),FH=k.forwardRef((e,t)=>{let n=DH(jH,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=k.useState(!1),s=e.orientation===`horizontal`,c=nU(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return rU(n.viewport,c),rU(n.content,c),(0,A.jsx)(pF,{present:r||a,children:(0,A.jsx)(IH,{"data-state":a?`visible`:`hidden`,...i,ref:t})})}),IH=k.forwardRef((e,t)=>{let{orientation:n=`vertical`,...r}=e,i=DH(jH,e.__scopeScrollArea),a=k.useRef(null),o=k.useRef(0),[s,c]=k.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=YH(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>a.current=e,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:e=>o.current=e};function d(e,t){return ZH(e,o.current,s,t)}return n===`horizontal`?(0,A.jsx)(LH,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=QH(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}}):n===`vertical`?(0,A.jsx)(RH,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=QH(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}),LH=k.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=DH(jH,e.__scopeScrollArea),[o,s]=k.useState(),c=k.useRef(null),l=D(t,c,a.onScrollbarXChange);return k.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,A.jsx)(VH,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":XH(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),eU(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:JH(o.paddingLeft),paddingEnd:JH(o.paddingRight)}})}})}),RH=k.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=DH(jH,e.__scopeScrollArea),[o,s]=k.useState(),c=k.useRef(null),l=D(t,c,a.onScrollbarYChange);return k.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,A.jsx)(VH,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":XH(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),eU(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:JH(o.paddingTop),paddingEnd:JH(o.paddingBottom)}})}})}),[zH,BH]=TH(jH),VH=k.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:l,onWheelScroll:u,onResize:d,...f}=e,p=DH(jH,n),[m,h]=k.useState(null),g=D(t,e=>h(e)),_=k.useRef(null),v=k.useRef(``),b=p.viewport,x=r.content-r.viewport,S=PF(u),C=PF(c),w=nU(d,10);function T(e){_.current&&l({x:e.clientX-_.current.left,y:e.clientY-_.current.top})}return k.useEffect(()=>{let e=e=>{let t=e.target;m?.contains(t)&&S(e,x)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[b,m,x,S]),k.useEffect(C,[r,C]),rU(m,w),rU(p.content,w),(0,A.jsx)(zH,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:PF(a),onThumbPointerUp:PF(o),onThumbPositionChange:C,onThumbPointerDown:PF(s),children:(0,A.jsx)(y.div,{...f,ref:g,style:{position:`absolute`,...f.style},onPointerDown:K(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),_.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,p.viewport&&(p.viewport.style.scrollBehavior=`auto`),T(e))}),onPointerMove:K(e.onPointerMove,T),onPointerUp:K(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=``),_.current=null})})})}),HH=`ScrollAreaThumb`,UH=k.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=BH(HH,e.__scopeScrollArea);return(0,A.jsx)(pF,{present:n||i.hasThumb,children:(0,A.jsx)(WH,{ref:t,...r})})}),WH=k.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:r,...i}=e,a=DH(HH,n),o=BH(HH,n),{onThumbPositionChange:s}=o,c=D(t,e=>o.onThumbChange(e)),l=k.useRef(void 0),u=nU(()=>{l.current&&=(l.current(),void 0)},100);return k.useEffect(()=>{let e=a.viewport;if(e){let t=()=>{u(),l.current||(l.current=tU(e,s),s())};return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,A.jsx)(y.div,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:K(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:K(e.onPointerUp,o.onThumbPointerUp)})});UH.displayName=HH;var GH=`ScrollAreaCorner`,KH=k.forwardRef((e,t)=>{let n=DH(GH,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,A.jsx)(qH,{...e,ref:t}):null});KH.displayName=GH;var qH=k.forwardRef((e,t)=>{let{__scopeScrollArea:n,...r}=e,i=DH(GH,n),[a,o]=k.useState(0),[s,c]=k.useState(0),l=!!(a&&s);return rU(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),rU(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),l?(0,A.jsx)(y.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===`ltr`?0:void 0,left:i.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null});function JH(e){return e?parseInt(e,10):0}function YH(e,t){let n=e/t;return isNaN(n)?0:n}function XH(e){let t=YH(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function ZH(e,t,n,r=`ltr`){let i=XH(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return $H([c,l],d)(e)}function QH(e,t,n=`ltr`){let r=XH(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=qV(e,n===`ltr`?[0,o]:[o*-1,0]);return $H([0,o],[0,s])(c)}function $H(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function eU(e,t){return e>0&&e<t}var tU=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function nU(e,t){let n=PF(e),r=k.useRef(0);return k.useEffect(()=>()=>window.clearTimeout(r.current),[]),k.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function rU(e,t){let n=PF(t);sF(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var iU=OH,aU=AH,oU=KH,sU=[` `,`Enter`,`ArrowUp`,`ArrowDown`],cU=[` `,`Enter`],lU=`Select`,[uU,dU,fU]=oF(lU),[pU,cte]=S(lU,[fU,wR]),mU=wR(),[hU,gU]=pU(lU),[_U,vU]=pU(lU),yU=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=mU(t),[g,_]=k.useState(null),[v,y]=k.useState(null),[b,x]=k.useState(!1),S=NF(l),[C,w]=lF({prop:r,defaultProp:i??!1,onChange:a,caller:lU}),[T,E]=lF({prop:o,defaultProp:s,onChange:c,caller:lU}),ee=k.useRef(null),te=g?m||!!g.closest(`form`):!0,[D,ne]=k.useState(new Set),re=Array.from(D).map(e=>e.props.value).join(`;`);return(0,A.jsx)(BR,{...h,children:(0,A.jsxs)(hU,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:yF(),value:T,onValueChange:E,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:ee,disabled:f,children:[(0,A.jsx)(uU.Provider,{scope:t,children:(0,A.jsx)(_U,{scope:e.__scopeSelect,onNativeOptionAdd:k.useCallback(e=>{ne(t=>new Set(t).add(e))},[]),onNativeOptionRemove:k.useCallback(e=>{ne(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),te?(0,A.jsxs)(mW,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:e=>E(e.target.value),disabled:f,form:m,children:[T===void 0?(0,A.jsx)(`option`,{value:``}):null,Array.from(D)]},re):null]})})};yU.displayName=lU;var bU=`SelectTrigger`,xU=k.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=mU(n),o=gU(bU,n),s=o.disabled||r,c=D(t,o.onTriggerChange),l=dU(n),u=k.useRef(`touch`),[d,f,p]=gW(e=>{let t=l().filter(e=>!e.disabled),n=_W(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,A.jsx)(VR,{asChild:!0,...a,children:(0,A.jsx)(y.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":hW(o.value)?``:void 0,...i,ref:c,onClick:K(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:K(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:K(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&sU.includes(e.key)&&(m(),e.preventDefault())})})})});xU.displayName=bU;var SU=`SelectValue`,CU=k.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=gU(SU,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=D(t,c.onValueNodeChange);return sF(()=>{l(u)},[l,u]),(0,A.jsx)(y.span,{...s,ref:d,style:{pointerEvents:`none`},children:hW(c.value)?(0,A.jsx)(A.Fragment,{children:o}):a})});CU.displayName=SU;var wU=`SelectIcon`,TU=k.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,A.jsx)(y.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});TU.displayName=wU;var EU=`SelectPortal`,DU=e=>(0,A.jsx)(fI,{asChild:!0,...e});DU.displayName=EU;var OU=`SelectContent`,kU=k.forwardRef((e,t)=>{let n=gU(OU,e.__scopeSelect),[r,i]=k.useState();if(sF(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?th.createPortal((0,A.jsx)(jU,{scope:e.__scopeSelect,children:(0,A.jsx)(uU.Slot,{scope:e.__scopeSelect,children:(0,A.jsx)(`div`,{children:e.children})})}),t):null}return(0,A.jsx)(FU,{...e,ref:t})});kU.displayName=OU;var AU=10,[jU,MU]=pU(OU),NU=`SelectContentImpl`,PU=ee(`SelectContent.RemoveScroll`),FU=k.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=gU(OU,n),[y,b]=k.useState(null),[x,S]=k.useState(null),C=D(t,e=>b(e)),[w,T]=k.useState(null),[E,ee]=k.useState(null),te=dU(n),[ne,re]=k.useState(!1),ie=k.useRef(!1);k.useEffect(()=>{if(y)return AL(y)},[y]),mI();let ae=k.useCallback(e=>{let[t,...n]=te().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[te,x]),oe=k.useCallback(()=>ae([w,y]),[ae,w,y]);k.useEffect(()=>{ne&&oe()},[ne,oe]);let{onOpenChange:se,triggerPointerDownPosRef:ce}=v;k.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(ce.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ce.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||se(!1),document.removeEventListener(`pointermove`,t),ce.current=null};return ce.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,se,ce]),k.useEffect(()=>{let e=()=>se(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[se]);let[le,ue]=gW(e=>{let t=te().filter(e=>!e.disabled),n=_W(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),de=k.useCallback((e,t,n)=>{let r=!ie.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(ie.current=!0))},[v.value]),fe=k.useCallback(()=>y?.focus(),[y]),pe=k.useCallback((e,t,n)=>{let r=!ie.current&&!n;(v.value!==void 0&&v.value===t||r)&&ee(e)},[v.value]),me=r===`popper`?zU:LU,he=me===zU?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,A.jsx)(jU,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:de,selectedItem:w,onItemLeave:fe,itemTextRefCallback:pe,focusSelectedItem:oe,selectedItemText:E,position:r,isPositioned:ne,searchRef:le,children:(0,A.jsx)(xL,{as:PU,allowPinchZoom:!0,children:(0,A.jsx)($F,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:K(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,A.jsx)(HF,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,A.jsx)(me,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...he,onPlaced:()=>re(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:K(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ue(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=te().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>ae(t)),e.preventDefault()}})})})})})})});FU.displayName=NU;var IU=`SelectItemAlignedPosition`,LU=k.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=gU(OU,n),o=MU(OU,n),[s,c]=k.useState(null),[l,u]=k.useState(null),d=D(t,e=>u(e)),f=dU(n),p=k.useRef(!1),m=k.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,b=k.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-AU,d=qV(a,[AU,Math.max(AU,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-AU,d=qV(a,[AU,Math.max(AU,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-AU*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-AU,ee=c-E,te=g.offsetHeight/2,D=g.offsetTop+te,ne=m+v+D,re=x-ne;if(ne<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=ne+Math.max(ee,te+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+te)+re;s.style.height=t+`px`,h.scrollTop=ne-E+h.offsetTop}s.style.margin=`${AU}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);sF(()=>b(),[b]);let[x,S]=k.useState();return sF(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,A.jsx)(BU,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:k.useCallback(e=>{e&&m.current===!0&&(b(),v?.(),m.current=!1)},[b,v]),children:(0,A.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,A.jsx)(y.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});LU.displayName=IU;var RU=`SelectPopperPosition`,zU=k.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=AU,...a}=e,o=mU(n);return(0,A.jsx)(HR,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.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)`}})});zU.displayName=RU;var[BU,VU]=pU(OU,{}),HU=`SelectViewport`,UU=k.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=MU(HU,n),o=VU(HU,n),s=D(t,a.onViewportChange),c=k.useRef(0);return(0,A.jsxs)(A.Fragment,{children:[(0,A.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:r}),(0,A.jsx)(uU.Slot,{scope:n,children:(0,A.jsx)(y.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:K(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-AU*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});UU.displayName=HU;var WU=`SelectGroup`,[GU,KU]=pU(WU),qU=k.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=yF();return(0,A.jsx)(GU,{scope:n,id:i,children:(0,A.jsx)(y.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});qU.displayName=WU;var JU=`SelectLabel`,YU=k.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=KU(JU,n);return(0,A.jsx)(y.div,{id:i.id,...r,ref:t})});YU.displayName=JU;var XU=`SelectItem`,[ZU,QU]=pU(XU),$U=k.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=gU(XU,n),c=MU(XU,n),l=s.value===r,[u,d]=k.useState(a??``),[f,p]=k.useState(!1),m=D(t,e=>c.itemRefCallback?.(e,r,i)),h=yF(),g=k.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw 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(0,A.jsx)(ZU,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:k.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,A.jsx)(uU.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,A.jsx)(y.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:K(o.onFocus,()=>p(!0)),onBlur:K(o.onBlur,()=>p(!1)),onClick:K(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:K(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:K(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:K(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:K(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:K(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(cU.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});$U.displayName=XU;var eW=`SelectItemText`,tW=k.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=gU(eW,n),s=MU(eW,n),c=QU(eW,n),l=vU(eW,n),[u,d]=k.useState(null),f=D(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=k.useMemo(()=>(0,A.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return sF(()=>(h(m),()=>g(m)),[h,g,m]),(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(y.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?th.createPortal(a.children,o.valueNode):null]})});tW.displayName=eW;var nW=`SelectItemIndicator`,rW=k.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return QU(nW,n).isSelected?(0,A.jsx)(y.span,{"aria-hidden":!0,...r,ref:t}):null});rW.displayName=nW;var iW=`SelectScrollUpButton`,aW=k.forwardRef((e,t)=>{let n=MU(iW,e.__scopeSelect),r=VU(iW,e.__scopeSelect),[i,a]=k.useState(!1),o=D(t,r.onScrollButtonChange);return sF(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,A.jsx)(cW,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});aW.displayName=iW;var oW=`SelectScrollDownButton`,sW=k.forwardRef((e,t)=>{let n=MU(oW,e.__scopeSelect),r=VU(oW,e.__scopeSelect),[i,a]=k.useState(!1),o=D(t,r.onScrollButtonChange);return sF(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,A.jsx)(cW,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});sW.displayName=oW;var cW=k.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=MU(`SelectScrollButton`,n),o=k.useRef(null),s=dU(n),c=k.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return k.useEffect(()=>()=>c(),[c]),sF(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,A.jsx)(y.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:K(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:K(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:K(i.onPointerLeave,()=>{c()})})}),lW=`SelectSeparator`,uW=k.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,A.jsx)(y.div,{"aria-hidden":!0,...r,ref:t})});uW.displayName=lW;var dW=`SelectArrow`,fW=k.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=mU(n),a=gU(dW,n),o=MU(dW,n);return a.open&&o.position===`popper`?(0,A.jsx)(UR,{...i,...r,ref:t}):null});fW.displayName=dW;var pW=`SelectBubbleInput`,mW=k.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=k.useRef(null),a=D(r,i),o=_R(t);return k.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,A.jsx)(y.select,{...n,style:{...nF,...n.style},ref:a,defaultValue:t})});mW.displayName=pW;function hW(e){return e===``||e===void 0}function gW(e){let t=PF(e),n=k.useRef(``),r=k.useRef(0),i=k.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=k.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return k.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function _W(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=vW(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function vW(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var yW=yU,bW=xU,xW=CU,SW=TU,CW=DU,wW=kU,TW=UU,EW=$U,DW=tW,OW=rW,kW=aW,AW=sW,jW=i({Range:()=>gG,Root:()=>mG,Slider:()=>UW,SliderRange:()=>QW,SliderThumb:()=>eG,SliderTrack:()=>XW,Thumb:()=>_G,Track:()=>hG,createSliderScope:()=>BW}),MW=[`PageUp`,`PageDown`],NW=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],PW={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},FW=`Slider`,[IW,LW,RW]=oF(FW),[zW,BW]=S(FW,[RW]),[VW,HW]=zW(FW),UW=k.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=k.useRef(new Set),_=k.useRef(0),v=o===`horizontal`?KW:qW,[y=[],b]=lF({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),x=k.useRef(y);function S(e){T(e,sG(y,e))}function C(e){T(e,_.current)}function w(){let e=x.current[_.current];y[_.current]!==e&&f(y)}function T(e,t,{commit:n}={commit:!1}){let o=fG(a),s=qV(pG(Math.round((e-r)/a)*a+r,o),[r,i]);b((e=[])=>{let r=iG(e,s,t);if(uG(r,c*a)){_.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}else return e})}return(0,A.jsx)(VW,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,A.jsx)(IW.Provider,{scope:e.__scopeSlider,children:(0,A.jsx)(IW.Slot,{scope:e.__scopeSlider,children:(0,A.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:K(h.onPointerDown,()=>{s||(x.current=y)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:S,onSlideMove:s?void 0:C,onSlideEnd:s?void 0:w,onHomeKeyDown:()=>!s&&T(r,0,{commit:!0}),onEndKeyDown:()=>!s&&T(i,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){let n=MW.includes(e.key)||e.shiftKey&&NW.includes(e.key)?10:1,r=_.current,i=y[r];T(i+a*n*t,r,{commit:!0})}}})})})})});UW.displayName=FW;var[WW,GW]=zW(FW,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),KW=k.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=k.useState(null),p=D(t,e=>f(e)),m=k.useRef(void 0),h=NF(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=dG([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,A.jsx)(WW,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,A.jsx)(JW,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=PW[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),qW=k.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=k.useRef(null),d=D(t,u),f=k.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=dG([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,A.jsx)(WW,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,A.jsx)(JW,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=PW[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),JW=k.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=HW(FW,n);return(0,A.jsx)(y.span,{...l,ref:t,onKeyDown:K(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):MW.concat(NW).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:K(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:K(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:K(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),YW=`SliderTrack`,XW=k.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=HW(YW,n);return(0,A.jsx)(y.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});XW.displayName=YW;var ZW=`SliderRange`,QW=k.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=HW(ZW,n),a=GW(ZW,n),o=D(t,k.useRef(null)),s=i.values.length,c=i.values.map(e=>aG(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,A.jsx)(y.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});QW.displayName=ZW;var $W=`SliderThumb`,eG=k.forwardRef((e,t)=>{let n=LW(e.__scopeSlider),[r,i]=k.useState(null),a=D(t,e=>i(e)),o=k.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,A.jsx)(tG,{...e,ref:a,index:o})}),tG=k.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=HW($W,n),s=GW($W,n),[c,l]=k.useState(null),u=D(t,e=>l(e)),d=c?o.form||!!c.closest(`form`):!0,f=vR(c),p=o.values[r],m=p===void 0?0:aG(p,o.min,o.max),h=oG(r,o.values.length),g=f?.[s.size],_=g?cG(g,m,s.direction):0;return k.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,A.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,A.jsx)(IW.ItemSlot,{scope:e.__scopeSlider,children:(0,A.jsx)(y.span,{role:`slider`,"aria-label":e[`aria-label`]||h,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:p===void 0?{display:`none`}:e.style,onFocus:K(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,A.jsx)(rG,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});eG.displayName=$W;var nG=`RadioBubbleInput`,rG=k.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=k.useRef(null),a=D(i,r),o=_R(t);return k.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`input`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,A.jsx)(y.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});rG.displayName=nG;function iG(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function aG(e,t,n){return qV(100/(n-t)*(e-t),[0,100])}function oG(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function sG(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function cG(e,t,n){let r=e/2;return(r-dG([0,50],[0,r])(t)*n)*n}function lG(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function uG(e,t){if(t>0){let n=lG(e);return Math.min(...n)>=t}return!0}function dG(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function fG(e){return(String(e).split(`.`)[1]||``).length}function pG(e,t){let n=10**t;return Math.round(e*n)/n}var mG=UW,hG=XW,gG=QW,_G=eG,vG=`Switch`,[yG,lte]=S(vG),[bG,xG]=yG(vG),SG=k.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,form:u,...d}=e,[f,p]=k.useState(null),m=D(t,e=>p(e)),h=k.useRef(!1),g=f?u||!!f.closest(`form`):!0,[_,v]=lF({prop:i,defaultProp:a??!1,onChange:l,caller:vG});return(0,A.jsxs)(bG,{scope:n,checked:_,disabled:s,children:[(0,A.jsx)(y.button,{type:`button`,role:`switch`,"aria-checked":_,"aria-required":o,"data-state":DG(_),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:K(e.onClick,e=>{v(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&(0,A.jsx)(EG,{control:f,bubbles:!h.current,name:r,value:c,checked:_,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});SG.displayName=vG;var CG=`SwitchThumb`,wG=k.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=xG(CG,n);return(0,A.jsx)(y.span,{"data-state":DG(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});wG.displayName=CG;var TG=`SwitchBubbleInput`,EG=k.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=k.useRef(null),s=D(o,a),c=_R(n),l=vR(t);return k.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,A.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});EG.displayName=TG;function DG(e){return e?`checked`:`unchecked`}var OG=SG,kG=wG,AG=`Tabs`,[jG,ute]=S(AG,[ZR]),MG=ZR(),[NG,PG]=jG(AG),FG=k.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=NF(s),[d,f]=lF({prop:r,onChange:i,defaultProp:a??``,caller:AG});return(0,A.jsx)(NG,{scope:n,baseId:yF(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,A.jsx)(y.div,{dir:u,"data-orientation":o,...l,ref:t})})});FG.displayName=AG;var IG=`TabsList`,LG=k.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=PG(IG,n),o=MG(n);return(0,A.jsx)(lz,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,A.jsx)(y.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});LG.displayName=IG;var RG=`TabsTrigger`,zG=k.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=PG(RG,n),s=MG(n),c=HG(o.baseId,r),l=UG(o.baseId,r),u=r===o.value;return(0,A.jsx)(uz,{asChild:!0,...s,focusable:!i,active:u,children:(0,A.jsx)(y.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:K(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:K(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:K(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});zG.displayName=RG;var BG=`TabsContent`,VG=k.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=PG(BG,n),c=HG(s.baseId,r),l=UG(s.baseId,r),u=r===s.value,d=k.useRef(u);return k.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,A.jsx)(pF,{present:i||u,children:({present:n})=>(0,A.jsx)(y.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});VG.displayName=BG;function HG(e,t){return`${e}-trigger-${t}`}function UG(e,t){return`${e}-content-${t}`}var WG=FG,GG=LG,KG=zG,qG=VG,[JG,dte]=S(`Tooltip`,[wR]),YG=wR(),XG=`TooltipProvider`,ZG=700,QG=`tooltip.open`,[$G,eK]=JG(XG),tK=e=>{let{__scopeTooltip:t,delayDuration:n=ZG,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=k.useRef(!0),s=k.useRef(!1),c=k.useRef(0);return k.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,A.jsx)($G,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:k.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:k.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:k.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};tK.displayName=XG;var nK=`Tooltip`,[rK,iK]=JG(nK),aK=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=eK(nK,e.__scopeTooltip),l=YG(t),[u,d]=k.useState(null),f=yF(),p=k.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=k.useRef(!1),[_,v]=lF({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(QG))):c.onClose(),a?.(e)},caller:nK}),y=k.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=k.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),x=k.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),S=k.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return k.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,A.jsx)(BR,{...l,children:(0,A.jsx)(rK,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:k.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:k.useCallback(()=>{m?x():(window.clearTimeout(p.current),p.current=0)},[x,m]),onOpen:b,onClose:x,disableHoverableContent:m,children:n})})};aK.displayName=nK;var oK=`TooltipTrigger`,sK=k.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=iK(oK,n),a=eK(oK,n),o=YG(n),s=D(t,k.useRef(null),i.onTriggerChange),c=k.useRef(!1),l=k.useRef(!1),u=k.useCallback(()=>c.current=!1,[]);return k.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,A.jsx)(VR,{asChild:!0,...o,children:(0,A.jsx)(y.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:K(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:K(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:K(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:K(e.onBlur,i.onClose),onClick:K(e.onClick,i.onClose)})})});sK.displayName=oK;var cK=`TooltipPortal`,[lK,uK]=JG(cK,{forceMount:void 0}),dK=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=iK(cK,t);return(0,A.jsx)(lK,{scope:t,forceMount:n,children:(0,A.jsx)(pF,{present:n||a.open,children:(0,A.jsx)(fI,{asChild:!0,container:i,children:r})})})};dK.displayName=cK;var fK=`TooltipContent`,pK=k.forwardRef((e,t)=>{let n=uK(fK,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=iK(fK,e.__scopeTooltip);return(0,A.jsx)(pF,{present:r||o.open,children:o.disableHoverableContent?(0,A.jsx)(vK,{side:i,...a,ref:t}):(0,A.jsx)(mK,{side:i,...a,ref:t})})}),mK=k.forwardRef((e,t)=>{let n=iK(fK,e.__scopeTooltip),r=eK(fK,e.__scopeTooltip),i=k.useRef(null),a=D(t,i),[o,s]=k.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=k.useCallback(()=>{s(null),d(!1)},[d]),p=k.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=SK(r,xK(r,n.getBoundingClientRect())),a=CK(t.getBoundingClientRect());s(TK([...i,...a])),d(!0)},[d]);return k.useEffect(()=>()=>f(),[f]),k.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),k.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!wK(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,A.jsx)(vK,{...e,ref:a})}),[hK,gK]=JG(nK,{isInside:!1}),_K=ne(`TooltipContent`),vK=k.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=iK(fK,n),l=YG(n),{onClose:u}=c;return k.useEffect(()=>(document.addEventListener(QG,u),()=>document.removeEventListener(QG,u)),[u]),k.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,A.jsx)(HF,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,A.jsxs)(HR,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.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:[(0,A.jsx)(_K,{children:r}),(0,A.jsx)(hK,{scope:n,isInside:!0,children:(0,A.jsx)(aF,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});pK.displayName=fK;var yK=`TooltipArrow`,bK=k.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=YG(n);return gK(yK,n).isInside?null:(0,A.jsx)(UR,{...i,...r,ref:t})});bK.displayName=yK;function xK(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function SK(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function CK(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function wK(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function TK(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),EK(t)}function EK(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var DK=tK,OK=aK,kK=sK,AK=dK,jK=pK,MK=bK;function NK(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function PK(e,t){let n=getComputedStyle(e.ownerDocument.body);return t*parseFloat(n.fontSize)}function FK(e){return e/100*window.innerHeight}function IK(e){return e/100*window.innerWidth}function LK(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let t=parseFloat(e);return e.endsWith(`%`)?[t,`%`]:e.endsWith(`px`)?[t,`px`]:e.endsWith(`rem`)?[t,`rem`]:e.endsWith(`em`)?[t,`em`]:e.endsWith(`vh`)?[t,`vh`]:e.endsWith(`vw`)?[t,`vw`]:[t,`%`]}}}function RK({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=LK(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=PK(t,i);break;case`em`:r=NK(t,i);break;case`vh`:r=FK(i);break;case`vw`:r=IK(i);break}return r}function zK(e){return parseFloat(e.toFixed(3))}function BK({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function VK(e){let{panels:t}=e,n=BK({group:e});return n===0?t.map(e=>({groupResizeBehavior:e.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:e.panelConstraints.disabled,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize!==void 0&&(i=zK(RK({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=zK(RK({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=zK(RK({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=zK(RK({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{groupResizeBehavior:r.groupResizeBehavior,collapsedSize:i,collapsible:r.collapsible===!0,defaultSize:a,disabled:r.disabled,minSize:o,maxSize:s,panelId:e.id}})}function HK(e,t=`Assertion error`){if(!e)throw Error(t)}function UK(e,t){return Array.from(t).sort(e===`horizontal`?WK:GK)}function WK(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function GK(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function KK(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function qK(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function JK({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=qK(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return HK(i,`No rect found`),i}var YK;function XK(){return YK===void 0&&(YK=typeof matchMedia==`function`?!!matchMedia(`(pointer:coarse)`).matches:!1),YK}function ZK(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=UK(n,Array.from(t.children).filter(KK).map(e=>({element:e}))).map(({element:e})=>e),o=[],s=!1,c=!1,l=-1,u=-1,d=0,f,p=[];{let e=-1;for(let t of a)t.hasAttribute(`data-panel`)&&(e++,t.ariaDisabled===null&&(d++,l===-1&&(l=e),u=e))}if(d>1){let t=-1;for(let d of a)if(d.hasAttribute(`data-panel`)){t++;let i=r.find(e=>e.element===d);if(i){if(f){let r=f.element.getBoundingClientRect(),a=d.getBoundingClientRect(),m;if(c){let e=n===`horizontal`?new DOMRect(r.right,r.top,0,r.height):new DOMRect(r.left,r.bottom,r.width,0),t=n===`horizontal`?new DOMRect(a.left,a.top,0,a.height):new DOMRect(a.left,a.top,a.width,0);switch(p.length){case 0:m=[e,t];break;case 1:{let i=p[0];m=[i,JK({orientation:n,rects:[r,a],targetRect:i.element.getBoundingClientRect()})===r?t:e];break}default:m=p;break}}else m=p.length?p:[n===`horizontal`?new DOMRect(r.right,a.top,a.left-r.right,a.height):new DOMRect(a.left,r.bottom,a.width,a.top-r.bottom)];for(let n of m){let r=`width`in n?n:n.element.getBoundingClientRect(),a=XK()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(r.width<a){let e=a-r.width;r=new DOMRect(r.x-e/2,r.y,r.width+e,r.height)}if(r.height<a){let e=a-r.height;r=new DOMRect(r.x,r.y-e/2,r.width,r.height+e)}!s&&!(t<=l||t>u)&&o.push({group:e,groupSize:BK({group:e}),panels:[f,i],separator:`width`in n?void 0:n,rect:r}),s=!1}}c=!1,f=i,p=[]}}else if(d.hasAttribute(`data-separator`)){d.ariaDisabled!==null&&(s=!0);let e=i.find(e=>e.element===d);e?p.push(e):(f=void 0,p=[])}else c=!0}return o}var QK=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0)if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}},$K=new Map,eq=new QK;function tq(e){$K=new Map($K),$K.delete(e)}function nq(e,t){for(let[t]of $K)if(t.id===e)return t}function rq(e,t){for(let[t,n]of $K)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function iq(){return $K}function aq(e,t){return eq.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function oq(e,t){let n=$K.get(e);$K=new Map($K),$K.set(e,t),eq.emit(`groupChange`,{group:e,prev:n,next:t})}function sq(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=qK(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t);break}}return r?{distance:i,hitRegion:r}:void 0}function cq(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function lq(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:hq(e),b:hq(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();HK(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:mq(pq(n.a)),b:mq(pq(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var uq=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function dq(e){let t=getComputedStyle(gq(e)??e).display;return t===`flex`||t===`inline-flex`}function fq(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||dq(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||uq.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function pq(e){let t=e.length;for(;t--;){let n=e[t];if(HK(n,`Missing node`),fq(n))return n}return null}function mq(e){return e&&Number(getComputedStyle(e).zIndex)||0}function hq(e){let t=[];for(;e;)t.push(e),e=gq(e);return t}function gq(e){let{parentNode:t}=e;return cq(t)?t.host:t}function _q(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function vq({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!KK(n)||n.contains(e)||e.contains(n))return!0;if(lq(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(_q(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function yq(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=ZK(r),a=sq(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&vq({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function bq(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function xq(e,t,n=0){return Math.abs(zK(e)-zK(t))<=n}function Sq(e,t){return xq(e,t)?0:e>t?1:-1}function Cq({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){let{collapsedSize:i=0,collapsible:a,disabled:o,maxSize:s=100,minSize:c=0}=t;if(o&&!e)return n;if(Sq(r,c)<0)if(a){let e=(i+c)/2;r=Sq(r,e)<0?i:c}else r=c;return r=Math.min(s,r),r=zK(r),r}function wq({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(xq(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;HK(u!=null,`Invalid first pivot index`),HK(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];HK(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(HK(n!=null,`Previous layout not found for panel index ${t}`),xq(n,i)){let t=o-n;Sq(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];HK(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(HK(n!=null,`Previous layout not found for panel index ${t}`),xq(n,o)){let t=n-i;Sq(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];HK(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&Sq(i,c)<0)if(e>0){let t=c-o,n=t/2;Sq(i+e,c)<0&&(e=Sq(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;Sq(i-e,c)<0&&(e=Sq(100+e,n)>0?0:-t)}break}}{let t=e<0?1:-1,r=e<0?d:u,i=0;for(;;){let e=s[r];HK(e!=null,`Previous layout not found for panel index ${r}`);let a=Cq({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:e,size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?u:d;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(f),i=s[t];HK(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=Cq({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!xq(i,c)&&(f+=i-c,l[t]=c,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(bq(c,l))return i;{let t=e<0?d:u,r=s[t];HK(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=Cq({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!xq(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];HK(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=Cq({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(xq(i,s)||(t-=s-i,l[r]=s),xq(t,0))break;e>0?r--:r++}}}if(!xq(Object.values(l).reduce((e,t)=>t+e,0),100,.1))return i;let p=Object.keys(i);return l.reduce((e,t,n)=>(e[p[n]]=t,e),{})}function Tq(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||Sq(e[n],t[n])!==0)return!1;return!0}function Eq({layout:e,panelConstraints:t}){let n=Object.values(e),r=[...n],i=r.reduce((e,t)=>e+t,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(e=>`${e}%`).join(`, `)}`);if(!xq(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];HK(t!=null,`No layout data found for index ${e}`),r[e]=100/i*t}let a=0;for(let e=0;e<t.length;e++){let i=n[e];HK(i!=null,`No layout data found for index ${e}`);let o=r[e];HK(o!=null,`No layout data found for index ${e}`);let s=Cq({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!xq(a,0))for(let e=0;e<t.length;e++){let n=r[e];HK(n!=null,`No layout data found for index ${e}`);let i=n+a,o=Cq({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,xq(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function Dq({groupId:e,panelId:t}){let n=()=>{let t=iq();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,groupSize:o,separatorToPanels:s}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,groupSize:o,layout:a,separatorToPanels:s};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=e=>{let r=a();if(e===r)return;let{defaultLayoutDeferred:i,derivedPanelConstraints:o,group:s,groupSize:c,layout:l,separatorToPanels:u}=n(),d=s.panels.findIndex(e=>e.id===t),f=d===s.panels.length-1,p=Eq({layout:wq({delta:f?r-e:e-r,initialLayout:l,panelConstraints:o,pivotIndices:f?[d-1,d]:[d,d+1],prevLayout:l,trigger:`imperative-api`}),panelConstraints:o});Tq(l,p)||oq(s,{defaultLayoutDeferred:i,derivedPanelConstraints:o,groupSize:c,layout:p,separatorToPanels:u})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),s=a();e&&s!==t&&(n.expandToSize=s,o(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:s}=i(),c=a();if(e&&c===t){let e=s.expandToSize??n;e===0&&(e=1),o(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&xq(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=BK({group:t});o(zK(RK({groupSize:a,panelElement:r,styleProp:e})/a*100))}}}function Oq(e){e.defaultPrevented||yq(e,iq()).forEach(t=>{if(t.separator){let n=t.panels.find(e=>e.panelConstraints.defaultSize!==void 0);if(n){let r=n.panelConstraints.defaultSize,i=Dq({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function kq(e){let t=iq();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function Aq({groupId:e}){let t=()=>{let t=iq();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,groupSize:a,layout:o,separatorToPanels:s}=t(),c=Eq({layout:e,panelConstraints:r});return n?o:(Tq(o,c)||oq(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function jq(e,t){let n=kq(e),r=rq(n.id,!0),i=n.separators.find(t=>t.element===e);HK(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);HK(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=Aq({groupId:n.id}).getLayout(),c=Eq({layout:wq({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});Tq(s,c)||oq(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels})}function Mq(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=kq(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&jq(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&jq(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&jq(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&jq(t,-5);break;case`End`:e.preventDefault(),jq(t,100);break;case`Enter`:{e.preventDefault();let n=kq(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=rq(n.id,!0),o=n.separators.find(e=>e.element===t);HK(o,`Matching separator not found`);let s=a.get(o);HK(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(HK(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];jq(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=kq(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);HK(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus({preventScroll:!0});break}case`Home`:e.preventDefault(),jq(t,-100);break}}var Nq={cursorFlags:0,state:`inactive`},Pq=new QK;function Fq(){return Nq}function Iq(e){return Pq.addListener(`change`,e)}function Lq(e){let t=Nq,n={...Nq};n.cursorFlags=e,Nq=n,Pq.emit(`change`,{prev:t,next:n})}function Rq(e){let t=Nq;Nq=e,Pq.emit(`change`,{prev:t,next:e})}function zq(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=iq(),n=yq(e,t),r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)}),Rq({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}var Bq=e=>e,Vq=()=>{},Hq=1,Uq=2,Wq=4,Gq=8,Kq=3,qq=12,Jq;function Yq(){return Jq===void 0&&(Jq=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(Jq=!0)),Jq}function Xq({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.mutableState.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++;break}})}if(!(r===0&&i===0)){switch(n){case`active`:if(e&&Yq()){let t=(e&Hq)!==0,n=(e&Uq)!==0,r=(e&Wq)!==0,i=(e&Gq)!==0;if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}break}return Yq()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var Zq=new WeakMap;function Qq(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=Zq.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&e.adoptedStyleSheets.push(n));let r=Fq();switch(r.state){case`active`:case`hover`:{let e=Xq({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(e=>e.group),state:r.state}),i=`*, *:hover {cursor: ${e} !important; }`;if(t===i)return;t=i,e?n.cssRules.length===0?n.insertRule(i):n.replaceSync(i):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}Zq.set(e,{prevStyle:t,styleSheet:n})}function $q({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:a,prevCursorFlags:o}){let s=0;n.forEach(e=>{let{group:n,groupSize:o}=e,{orientation:c,panels:l}=n,{disableCursor:u}=n.mutableState,d=0;d=a?c===`horizontal`?(t.clientX-a.x)/o*100:(t.clientY-a.y)/o*100:c===`horizontal`?t.clientX<0?-100:100:t.clientY<0?-100:100;let f=r.get(n),p=i.get(n);if(!f||!p)return;let{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:_,separatorToPanels:v}=p;if(h&&_&&v){let t=wq({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(Tq(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?Hq:Uq;break;case`vertical`:s|=d<0?Wq:Gq;break}}else oq(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&Kq:c|=s&Kq,t.movementY===0?c|=o&qq:c|=s&qq,Lq(c),Qq(e)}function eJ(e){let t=iq(),n=Fq();switch(n.state){case`active`:$q({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function tJ(e){if(e.defaultPrevented)return;let t=Fq(),n=iq();switch(t.state){case`active`:if(e.buttons===0){Rq({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{let t=rq(e.group.id,!0);oq(e.group,t)});return}$q({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=yq(e,n);r.length===0?t.state!==`inactive`&&Rq({cursorFlags:0,state:`inactive`}):Rq({cursorFlags:0,hitRegions:r,state:`hover`}),Qq(e.currentTarget);break}}}function nJ(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(Fq().state){case`hover`:Rq({cursorFlags:0,state:`inactive`})}}function rJ(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=Fq();switch(t.state){case`active`:Rq({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(Qq(e.currentTarget),t.hitRegions.forEach(e=>{let t=rq(e.group.id,!0);oq(e.group,t)}),e.preventDefault())}}function iJ(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=zK(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=zK((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function aJ(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=BK({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:zK(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function oJ(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function sJ({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let i=0,a=0,o=!1,s=new Map,c=[];for(let l of e.panels){let e=r[l.id]??0;switch(l.panelConstraints.groupResizeBehavior){case`preserve-pixel-size`:{o=!0;let r=zK(e/100*n/t*100);s.set(l.id,r),i+=r;break}default:c.push(l.id),a+=e;break}}if(!o||c.length===0)return r;let l=100-i,u={...r};if(s.forEach((e,t)=>{u[t]=e}),a>0)for(let e of c)u[e]=zK((r[e]??0)/a*l);else{let e=zK(l/c.length);for(let t of c)u[t]=e}return u}function cJ(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}var lJ=new Map;function uJ(e){let t=!0;HK(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){let t=BK({group:e});if(t===0)return;let n=rq(e.id);if(!n)return;let r=VK(e),i=n.defaultLayoutDeferred?iJ(r):n.layout,a=Eq({layout:sJ({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&Tq(n.layout,a)&&oJ(n.derivedPanelConstraints,r)&&n.groupSize===t)return;oq(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else aJ(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{HK(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=BK({group:e}),s=VK(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(cJ(e.panels,l)||(l=void 0));let u=Eq({layout:e.mutableState.layouts[c]??l??iJ(s),panelConstraints:s}),d=e.element.ownerDocument;lJ.set(d,(lJ.get(d)??0)+1);let f=new Map;return ZK(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),oq(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{HK(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,Mq)}),lJ.get(d)===1&&(d.addEventListener(`dblclick`,Oq,!0),d.addEventListener(`pointerdown`,zq,!0),d.addEventListener(`pointerleave`,eJ),d.addEventListener(`pointermove`,tJ),d.addEventListener(`pointerout`,nJ),d.addEventListener(`pointerup`,rJ,!0)),function(){t=!1,lJ.set(d,Math.max(0,(lJ.get(d)??0)-1)),tq(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,Mq)}),lJ.get(d)||(d.removeEventListener(`dblclick`,Oq,!0),d.removeEventListener(`pointerdown`,zq,!0),d.removeEventListener(`pointerleave`,eJ),d.removeEventListener(`pointermove`,tJ),d.removeEventListener(`pointerout`,nJ),d.removeEventListener(`pointerup`,rJ,!0)),a.disconnect()}}function dJ(){let[e,t]=(0,k.useState)({});return[e,(0,k.useCallback)(()=>t({}),[])]}function fJ(e){let t=(0,k.useId)();return`${e??t}`}var pJ=typeof window<`u`?k.useLayoutEffect:k.useEffect;function mJ(e){let t=(0,k.useRef)(e);return pJ(()=>{t.current=e},[e]),(0,k.useCallback)((...e)=>t.current?.(...e),[t])}function hJ(...e){return mJ(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function gJ(e){let t=(0,k.useRef)({...e});return pJ(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var _J=(0,k.createContext)(null);function vJ(e,t){let n=(0,k.useRef)({getLayout:()=>({}),setLayout:Bq});(0,k.useImperativeHandle)(t,()=>n.current,[]),pJ(()=>{Object.assign(n.current,Aq({groupId:e}))})}function yJ({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:a,groupRef:o,id:s,onLayoutChange:c,onLayoutChanged:l,orientation:u=`horizontal`,resizeTargetMinimumSize:d={coarse:20,fine:10},style:f,...p}){let m=(0,k.useRef)({onLayoutChange:{},onLayoutChanged:{}}),h=mJ(e=>{Tq(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=mJ(e=>{Tq(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e))}),_=fJ(s),v=(0,k.useRef)(null),[y,b]=dJ(),x=(0,k.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),S=hJ(v,a);vJ(_,o);let C=mJ((e,t)=>{let r=Fq(),i=nq(e),a=rq(e);if(a){let e=!1;switch(r.state){case`active`:e=r.hitRegions.some(e=>e.group===i);break}return{flexGrow:a.layout[t]??1,pointerEvents:e?`none`:void 0}}return{flexGrow:n?.[t]??1}}),w=gJ({defaultLayout:n,disableCursor:r}),T=(0,k.useMemo)(()=>({get disableCursor(){return!!w.disableCursor},getPanelStyles:C,id:_,orientation:u,registerPanel:e=>{let t=x.current;return t.panels=UK(u,[...t.panels,e]),b(),()=>{t.panels=t.panels.filter(t=>t!==e),b()}},registerSeparator:e=>{let t=x.current;return t.separators=UK(u,[...t.separators,e]),b(),()=>{t.separators=t.separators.filter(t=>t!==e),b()}},togglePanelDisabled:(e,t)=>{let n=x.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=nq(_),i=rq(_);r&&i&&oq(r,{...i,derivedPanelConstraints:VK(r)})},toggleSeparatorDisabled:(e,t)=>{let n=x.current.separators.find(t=>t.id===e);n&&(n.disabled=t)}}),[C,_,b,u,w]),E=(0,k.useRef)(null);return pJ(()=>{let e=v.current;if(e===null)return;let t=x.current,n;if(w.defaultLayout!==void 0&&Object.keys(w.defaultLayout).length===t.panels.length){n={};for(let e of t.panels){let t=w.defaultLayout[e.id];t!==void 0&&(n[e.id]=t)}}let r={disabled:!!i,element:e,id:_,mutableState:{defaultLayout:n,disableCursor:!!w.disableCursor,expandedPanelSizes:x.current.lastExpandedPanelSizes,layouts:x.current.layouts},orientation:u,panels:t.panels,resizeTargetMinimumSize:t.resizeTargetMinimumSize,separators:t.separators};E.current=r;let a=uJ(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=rq(r.id,!0);!o&&s.length>0&&(h(c),g(c));let l=aq(_,e=>{let{defaultLayoutDeferred:t,derivedPanelConstraints:n,layout:i}=e.next;if(t||n.length===0)return;let a=r.panels.map(({id:e})=>e).join(`,`);r.mutableState.layouts[a]=i,n.forEach(t=>{if(t.collapsible){let{layout:n}=e.prev??{};if(n){let e=xq(t.collapsedSize,i[t.panelId]),a=xq(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=Fq().state!==`active`;h(i),o&&g(i)});return()=>{E.current=null,a(),l()}},[i,_,g,h,u,y,w]),(0,k.useEffect)(()=>{let e=E.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!r)}),(0,A.jsx)(_J.Provider,{value:T,children:(0,A.jsx)(`div`,{...p,className:t,"data-group":!0,"data-testid":_,id:_,ref:S,style:{height:`100%`,width:`100%`,overflow:`hidden`,...f,display:`flex`,flexDirection:u===`horizontal`?`row`:`column`,flexWrap:`nowrap`,touchAction:u===`horizontal`?`pan-y`:`pan-x`},children:e})})}yJ.displayName=`Group`;function bJ(){let e=(0,k.useContext)(_J);return HK(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function xJ(e,t){let{id:n}=bJ(),r=(0,k.useRef)({collapse:Vq,expand:Vq,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Vq});(0,k.useImperativeHandle)(t,()=>r.current,[]),pJ(()=>{Object.assign(r.current,Dq({groupId:n,panelId:e}))})}function SJ({children:e,className:t,collapsedSize:n=`0%`,collapsible:r=!1,defaultSize:i,disabled:a,elementRef:o,groupResizeBehavior:s=`preserve-relative-size`,id:c,maxSize:l=`100%`,minSize:u=`0%`,onResize:d,panelRef:f,style:p,...m}){let h=!!c,g=fJ(c),_=gJ({disabled:a}),v=(0,k.useRef)(null),y=hJ(v,o),{getPanelStyles:b,id:x,orientation:S,registerPanel:C,togglePanelDisabled:w}=bJ(),T=d!==null,E=mJ((e,t,n)=>{d?.(e,c,n)});pJ(()=>{let e=v.current;if(e!==null)return C({element:e,id:g,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:T?E:void 0,panelConstraints:{groupResizeBehavior:s,collapsedSize:n,collapsible:r,defaultSize:i,disabled:_.disabled,maxSize:l,minSize:u}})},[s,n,r,i,T,g,h,l,u,E,C,_]),(0,k.useEffect)(()=>{w(g,!!a)},[a,g,w]),xJ(g,f);let ee=(0,k.useSyncExternalStore)(e=>aq(x,e),()=>JSON.stringify(b(x,g)),()=>JSON.stringify(b(x,g)));return(0,A.jsx)(`div`,{...m,"aria-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:y,style:{...CJ,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...JSON.parse(ee)},children:(0,A.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...p,touchAction:S===`horizontal`?`pan-y`:`pan-x`},children:e})})}SJ.displayName=`Panel`;var CJ={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function wJ({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=Eq({layout:wq({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=Eq({layout:wq({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function TJ({children:e,className:t,disabled:n,elementRef:r,id:i,style:a,...o}){let s=fJ(i),c=gJ({disabled:n}),[l,u]=(0,k.useState)({}),[d,f]=(0,k.useState)(`inactive`),p=(0,k.useRef)(null),m=hJ(p,r),{disableCursor:h,id:g,orientation:_,registerSeparator:v,toggleSeparatorDisabled:y}=bJ(),b=_===`horizontal`?`vertical`:`horizontal`;pJ(()=>{let e=p.current;if(e!==null){let t={disabled:c.disabled,element:e,id:s},n=v(t),r=Iq(e=>{f(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=aq(g,e=>{let{derivedPanelConstraints:n,layout:r,separatorToPanels:i}=e.next,a=i.get(t);if(a){let e=a[0],t=a.indexOf(e);u(wJ({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{r(),i(),n()}}},[g,s,v,c]),(0,k.useEffect)(()=>{y(s,!!n)},[n,s,y]);let x;return n&&!h&&(x=`not-allowed`),(0,A.jsx)(`div`,{...o,"aria-controls":l.valueControls,"aria-disabled":n||void 0,"aria-orientation":b,"aria-valuemax":l.valueMax,"aria-valuemin":l.valueMin,"aria-valuenow":l.valueNow,children:e,className:t,"data-separator":n?`disabled`:d,"data-testid":s,id:s,ref:m,role:`separator`,style:{flexBasis:`auto`,cursor:x,...a,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}TJ.displayName=`Separator`;function EJ({className:e,...t}){return(0,A.jsx)(yJ,{"data-slot":`resizable-panel-group`,className:p(`flex h-full w-full data-[panel-group-direction=vertical]:flex-col`,e),...t})}function DJ({...e}){return(0,A.jsx)(SJ,{"data-slot":`resizable-panel`,...e})}function OJ({withHandle:e,className:t,...n}){return(0,A.jsx)(TJ,{"data-slot":`resizable-handle`,className:p(`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90`,t),...n,children:e&&(0,A.jsx)(`div`,{className:`bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border`,children:(0,A.jsx)(Tt,{className:`size-2.5`})})})}function kJ({className:e,...t}){return(0,A.jsx)(WG,{"data-slot":`tabs`,className:p(`flex flex-col gap-2`,e),...t})}function AJ({className:e,...t}){return(0,A.jsx)(GG,{"data-slot":`tabs-list`,className:p(`bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]`,e),...t})}function jJ({className:e,...t}){return(0,A.jsx)(KG,{"data-slot":`tabs-trigger`,className:p(`data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...t})}function MJ({className:e,...t}){return(0,A.jsx)(qG,{"data-slot":`tabs-content`,className:p(`flex-1 outline-none`,e),...t})}var NJ=`vercel.ai.error`,PJ=Symbol.for(NJ),FJ,IJ,LJ=class e extends (IJ=Error,FJ=PJ,IJ){constructor({name:e,message:t,cause:n}){super(t),this[FJ]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,NJ)}static hasMarker(e,t){let n=Symbol.for(t);return typeof e==`object`&&!!e&&n in e&&typeof e[n]==`boolean`&&e[n]===!0}};function RJ(e){return e==null?`unknown error`:typeof e==`string`?e:e instanceof Error?e.message:JSON.stringify(e)}var zJ=`AI_InvalidArgumentError`,BJ=`vercel.ai.error.${zJ}`,VJ=Symbol.for(BJ),HJ,UJ,WJ=class extends (UJ=LJ,HJ=VJ,UJ){constructor({message:e,cause:t,argument:n}){super({name:zJ,message:e,cause:t}),this[HJ]=!0,this.argument=n}static isInstance(e){return LJ.hasMarker(e,BJ)}},GJ=`AI_JSONParseError`,KJ=`vercel.ai.error.${GJ}`,qJ=Symbol.for(KJ),JJ,YJ,XJ=class extends (YJ=LJ,JJ=qJ,YJ){constructor({text:e,cause:t}){super({name:GJ,message:`JSON parsing failed: Text: ${e}.
|
|
473
|
+
Error message: ${RJ(t)}`,cause:t}),this[JJ]=!0,this.text=e}static isInstance(e){return LJ.hasMarker(e,KJ)}},ZJ=`AI_TypeValidationError`,QJ=`vercel.ai.error.${ZJ}`,$J=Symbol.for(QJ),eY,tY,nY=class e extends (tY=LJ,eY=$J,tY){constructor({value:e,cause:t,context:n}){let r=`Type validation failed`;if(n?.field&&(r+=` for ${n.field}`),n?.entityName||n?.entityId){r+=` (`;let e=[];n.entityName&&e.push(n.entityName),n.entityId&&e.push(`id: "${n.entityId}"`),r+=e.join(`, `),r+=`)`}super({name:ZJ,message:`${r}: Value: ${JSON.stringify(e)}.
|
|
474
|
+
Error message: ${RJ(t)}`,cause:t}),this[eY]=!0,this.value=e,this.context=n}static isInstance(e){return LJ.hasMarker(e,QJ)}static wrap({value:t,cause:n,context:r}){return e.isInstance(n)&&n.value===t&&n.context?.field===r?.field&&n.context?.entityName===r?.entityName&&n.context?.entityId===r?.entityId?n:new e({value:t,cause:n,context:r})}};Object.freeze({status:`aborted`});function q(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var rY=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},iY=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},aY={};function oY(e){return e&&Object.assign(aY,e),aY}function sY(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function cY(e,t){return typeof t==`bigint`?t.toString():t}function lY(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function uY(e){return e==null}function dY(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function fY(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var pY=Symbol(`evaluating`);function mY(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==pY)return r===void 0&&(r=pY,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function hY(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function gY(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function _Y(e){return JSON.stringify(e)}function vY(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var yY=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function bY(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var xY=lY(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function SY(e){if(bY(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(bY(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function CY(e){return SY(e)?{...e}:Array.isArray(e)?[...e]:e}var wY=new Set([`string`,`number`,`symbol`]);function TY(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function EY(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function J(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function DY(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var OY={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function kY(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return EY(e,gY(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return hY(this,`shape`,e),e},checks:[]}))}function AY(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return EY(e,gY(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return hY(this,`shape`,r),r},checks:[]}))}function jY(e,t){if(!SY(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return EY(e,gY(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return hY(this,`shape`,n),n}}))}function MY(e,t){if(!SY(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return EY(e,gY(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return hY(this,`shape`,n),n}}))}function NY(e,t){return EY(e,gY(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return hY(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function PY(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return EY(t,gY(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return hY(this,`shape`,i),i},checks:[]}))}function FY(e,t,n){return EY(t,gY(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return hY(this,`shape`,i),i}}))}function IY(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function LY(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function RY(e){return typeof e==`string`?e:e?.message}function zY(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=RY(e.inst?._zod.def?.error?.(e))??RY(t?.error?.(e))??RY(n.customError?.(e))??RY(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function BY(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function VY(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var HY=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,cY,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},UY=q(`$ZodError`,HY),WY=q(`$ZodError`,HY,{Parent:Error});function GY(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function KY(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var qY=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new rY;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>zY(e,a,oY())));throw yY(t,i?.callee),t}return o.value},JY=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>zY(e,a,oY())));throw yY(t,i?.callee),t}return o.value},YY=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new rY;return a.issues.length?{success:!1,error:new(e??UY)(a.issues.map(e=>zY(e,i,oY())))}:{success:!0,data:a.value}},XY=YY(WY),ZY=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>zY(e,i,oY())))}:{success:!0,data:a.value}},QY=ZY(WY),$Y=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return qY(e)(t,n,i)},eX=e=>(t,n,r)=>qY(e)(t,n,r),tX=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return JY(e)(t,n,i)},nX=e=>async(t,n,r)=>JY(e)(t,n,r),rX=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return YY(e)(t,n,i)},iX=e=>(t,n,r)=>YY(e)(t,n,r),aX=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return ZY(e)(t,n,i)},oX=e=>async(t,n,r)=>ZY(e)(t,n,r),sX=/^[cC][^\s-]{8,}$/,cX=/^[0-9a-z]+$/,lX=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,uX=/^[0-9a-vA-V]{20}$/,dX=/^[A-Za-z0-9]{27}$/,fX=/^[a-zA-Z0-9_-]{21}$/,pX=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,mX=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,hX=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,gX=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_X=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function vX(){return new RegExp(_X,`u`)}var yX=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,bX=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,xX=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,SX=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,CX=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,wX=/^[A-Za-z0-9_-]*$/,TX=/^\+[1-9]\d{6,14}$/,EX=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,DX=RegExp(`^${EX}$`);function OX(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function kX(e){return RegExp(`^${OX(e)}$`)}function AX(e){let t=OX({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${EX}T(?:${r})$`)}var jX=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},MX=/^-?\d+$/,NX=/^-?\d+(?:\.\d+)?$/,PX=/^(?:true|false)$/i,FX=/^null$/i,IX=/^[^A-Z]*$/,LX=/^[^a-z]*$/,RX=q(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),zX={number:`number`,bigint:`bigint`,object:`date`},BX=q(`$ZodCheckLessThan`,(e,t)=>{RX.init(e,t);let n=zX[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),VX=q(`$ZodCheckGreaterThan`,(e,t)=>{RX.init(e,t);let n=zX[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),HX=q(`$ZodCheckMultipleOf`,(e,t)=>{RX.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):fY(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),UX=q(`$ZodCheckNumberFormat`,(e,t)=>{RX.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=OY[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=MX)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),WX=q(`$ZodCheckMaxLength`,(e,t)=>{var n;RX.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!uY(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=BY(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),GX=q(`$ZodCheckMinLength`,(e,t)=>{var n;RX.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!uY(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=BY(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),KX=q(`$ZodCheckLengthEquals`,(e,t)=>{var n;RX.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!uY(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=BY(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),qX=q(`$ZodCheckStringFormat`,(e,t)=>{var n,r;RX.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),JX=q(`$ZodCheckRegex`,(e,t)=>{qX.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),YX=q(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=IX,qX.init(e,t)}),XX=q(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=LX,qX.init(e,t)}),fte=q(`$ZodCheckIncludes`,(e,t)=>{RX.init(e,t);let n=TY(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ZX=q(`$ZodCheckStartsWith`,(e,t)=>{RX.init(e,t);let n=RegExp(`^${TY(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),QX=q(`$ZodCheckEndsWith`,(e,t)=>{RX.init(e,t);let n=RegExp(`.*${TY(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),$X=q(`$ZodCheckOverwrite`,(e,t)=>{RX.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),eZ=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
475
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
476
|
+
`))}},tZ={major:4,minor:3,patch:6},nZ=q(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=tZ;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=IY(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new rY;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=IY(e,t))});else{if(e.issues.length===t)continue;r||=IY(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(IY(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new rY;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new rY;return o.then(e=>t(e,r,a))}return t(o,r,a)}}mY(e,`~standard`,()=>({validate:t=>{try{let n=XY(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return QY(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),rZ=q(`$ZodString`,(e,t)=>{nZ.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??jX(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),iZ=q(`$ZodStringFormat`,(e,t)=>{qX.init(e,t),rZ.init(e,t)}),aZ=q(`$ZodGUID`,(e,t)=>{t.pattern??=mX,iZ.init(e,t)}),oZ=q(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=hX(e)}else t.pattern??=hX();iZ.init(e,t)}),sZ=q(`$ZodEmail`,(e,t)=>{t.pattern??=gX,iZ.init(e,t)}),cZ=q(`$ZodURL`,(e,t)=>{iZ.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),lZ=q(`$ZodEmoji`,(e,t)=>{t.pattern??=vX(),iZ.init(e,t)}),uZ=q(`$ZodNanoID`,(e,t)=>{t.pattern??=fX,iZ.init(e,t)}),dZ=q(`$ZodCUID`,(e,t)=>{t.pattern??=sX,iZ.init(e,t)}),fZ=q(`$ZodCUID2`,(e,t)=>{t.pattern??=cX,iZ.init(e,t)}),pZ=q(`$ZodULID`,(e,t)=>{t.pattern??=lX,iZ.init(e,t)}),mZ=q(`$ZodXID`,(e,t)=>{t.pattern??=uX,iZ.init(e,t)}),hZ=q(`$ZodKSUID`,(e,t)=>{t.pattern??=dX,iZ.init(e,t)}),gZ=q(`$ZodISODateTime`,(e,t)=>{t.pattern??=AX(t),iZ.init(e,t)}),_Z=q(`$ZodISODate`,(e,t)=>{t.pattern??=DX,iZ.init(e,t)}),vZ=q(`$ZodISOTime`,(e,t)=>{t.pattern??=kX(t),iZ.init(e,t)}),yZ=q(`$ZodISODuration`,(e,t)=>{t.pattern??=pX,iZ.init(e,t)}),bZ=q(`$ZodIPv4`,(e,t)=>{t.pattern??=yX,iZ.init(e,t),e._zod.bag.format=`ipv4`}),xZ=q(`$ZodIPv6`,(e,t)=>{t.pattern??=bX,iZ.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),SZ=q(`$ZodCIDRv4`,(e,t)=>{t.pattern??=xX,iZ.init(e,t)}),CZ=q(`$ZodCIDRv6`,(e,t)=>{t.pattern??=SX,iZ.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function wZ(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var TZ=q(`$ZodBase64`,(e,t)=>{t.pattern??=CX,iZ.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{wZ(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function EZ(e){if(!wX.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return wZ(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var DZ=q(`$ZodBase64URL`,(e,t)=>{t.pattern??=wX,iZ.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{EZ(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),OZ=q(`$ZodE164`,(e,t)=>{t.pattern??=TX,iZ.init(e,t)});function kZ(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var AZ=q(`$ZodJWT`,(e,t)=>{iZ.init(e,t),e._zod.check=n=>{kZ(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),jZ=q(`$ZodNumber`,(e,t)=>{nZ.init(e,t),e._zod.pattern=e._zod.bag.pattern??NX,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),MZ=q(`$ZodNumberFormat`,(e,t)=>{UX.init(e,t),jZ.init(e,t)}),NZ=q(`$ZodBoolean`,(e,t)=>{nZ.init(e,t),e._zod.pattern=PX,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),PZ=q(`$ZodNull`,(e,t)=>{nZ.init(e,t),e._zod.pattern=FX,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),FZ=q(`$ZodUnknown`,(e,t)=>{nZ.init(e,t),e._zod.parse=e=>e}),IZ=q(`$ZodNever`,(e,t)=>{nZ.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function LZ(e,t,n){e.issues.length&&t.issues.push(...LY(n,e.issues)),t.value[n]=e.value}var RZ=q(`$ZodArray`,(e,t)=>{nZ.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>LZ(t,n,e))):LZ(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function zZ(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...LY(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function BZ(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=DY(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function VZ(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>zZ(e,n,i,t,u))):zZ(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var HZ=q(`$ZodObject`,(e,t)=>{if(nZ.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=lY(()=>BZ(t));mY(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=bY,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>zZ(n,t,e,s,r))):zZ(i,t,e,s,r)}return i?VZ(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),UZ=q(`$ZodObjectJIT`,(e,t)=>{HZ.init(e,t);let n=e._zod.parse,r=lY(()=>BZ(t)),i=e=>{let t=new eZ([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=_Y(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=_Y(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
|
|
477
|
+
if (${n}.issues.length) {
|
|
478
|
+
if (${o} in input) {
|
|
479
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
480
|
+
...iss,
|
|
481
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
482
|
+
})));
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
if (${n}.value === undefined) {
|
|
487
|
+
if (${o} in input) {
|
|
488
|
+
newResult[${o}] = undefined;
|
|
489
|
+
}
|
|
490
|
+
} else {
|
|
491
|
+
newResult[${o}] = ${n}.value;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
`):t.write(`
|
|
495
|
+
if (${n}.issues.length) {
|
|
496
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
497
|
+
...iss,
|
|
498
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
499
|
+
})));
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
if (${n}.value === undefined) {
|
|
503
|
+
if (${o} in input) {
|
|
504
|
+
newResult[${o}] = undefined;
|
|
505
|
+
}
|
|
506
|
+
} else {
|
|
507
|
+
newResult[${o}] = ${n}.value;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=bY,s=!aY.jitless,c=s&&xY.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?VZ([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function WZ(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!IY(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>zY(e,r,oY())))}),t)}var GZ=q(`$ZodUnion`,(e,t)=>{nZ.init(e,t),mY(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),mY(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),mY(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),mY(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>dY(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>WZ(t,i,e,a)):WZ(s,i,e,a)}}),KZ=q(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,GZ.init(e,t);let n=e._zod.parse;mY(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=lY(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!bY(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),qZ=q(`$ZodIntersection`,(e,t)=>{nZ.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>YZ(e,t,n)):YZ(e,i,a)}});function JZ(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(SY(e)&&SY(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=JZ(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=JZ(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function YZ(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),IY(e))return e;let o=JZ(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var XZ=q(`$ZodRecord`,(e,t)=>{nZ.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!SY(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...LY(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...LY(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&NX.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>zY(e,r,oY())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...LY(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...LY(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),ZZ=q(`$ZodEnum`,(e,t)=>{nZ.init(e,t);let n=sY(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>wY.has(typeof e)).map(e=>typeof e==`string`?TY(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),QZ=q(`$ZodLiteral`,(e,t)=>{if(nZ.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?TY(e):e?TY(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),$Z=q(`$ZodTransform`,(e,t)=>{nZ.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new iY(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new rY;return n.value=i,n}});function eQ(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var tQ=q(`$ZodOptional`,(e,t)=>{nZ.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,mY(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),mY(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${dY(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>eQ(t,e.value)):eQ(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),nQ=q(`$ZodExactOptional`,(e,t)=>{tQ.init(e,t),mY(e._zod,`values`,()=>t.innerType._zod.values),mY(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),rQ=q(`$ZodNullable`,(e,t)=>{nZ.init(e,t),mY(e._zod,`optin`,()=>t.innerType._zod.optin),mY(e._zod,`optout`,()=>t.innerType._zod.optout),mY(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${dY(e.source)}|null)$`):void 0}),mY(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),iQ=q(`$ZodDefault`,(e,t)=>{nZ.init(e,t),e._zod.optin=`optional`,mY(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>aQ(e,t)):aQ(r,t)}});function aQ(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var oQ=q(`$ZodPrefault`,(e,t)=>{nZ.init(e,t),e._zod.optin=`optional`,mY(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),sQ=q(`$ZodNonOptional`,(e,t)=>{nZ.init(e,t),mY(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>cQ(t,e)):cQ(i,e)}});function cQ(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var lQ=q(`$ZodCatch`,(e,t)=>{nZ.init(e,t),mY(e._zod,`optin`,()=>t.innerType._zod.optin),mY(e._zod,`optout`,()=>t.innerType._zod.optout),mY(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>zY(e,n,oY()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>zY(e,n,oY()))},input:e.value}),e.issues=[]),e)}}),uQ=q(`$ZodPipe`,(e,t)=>{nZ.init(e,t),mY(e._zod,`values`,()=>t.in._zod.values),mY(e._zod,`optin`,()=>t.in._zod.optin),mY(e._zod,`optout`,()=>t.out._zod.optout),mY(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>dQ(e,t.in,n)):dQ(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>dQ(e,t.out,n)):dQ(r,t.out,n)}});function dQ(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var fQ=q(`$ZodReadonly`,(e,t)=>{nZ.init(e,t),mY(e._zod,`propValues`,()=>t.innerType._zod.propValues),mY(e._zod,`values`,()=>t.innerType._zod.values),mY(e._zod,`optin`,()=>t.innerType?._zod?.optin),mY(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(pQ):pQ(r)}});function pQ(e){return e.value=Object.freeze(e.value),e}var mQ=q(`$ZodLazy`,(e,t)=>{nZ.init(e,t),mY(e._zod,`innerType`,()=>t.getter()),mY(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),mY(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),mY(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),mY(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),hQ=q(`$ZodCustom`,(e,t)=>{RX.init(e,t),nZ.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>gQ(t,n,r,e));gQ(i,n,r,e)}});function gQ(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(VY(e))}}var _Q,vQ=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function yQ(){return new vQ}(_Q=globalThis).__zod_globalRegistry??(_Q.__zod_globalRegistry=yQ());var bQ=globalThis.__zod_globalRegistry;function xQ(e,t){return new e({type:`string`,...J(t)})}function SQ(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...J(t)})}function CQ(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...J(t)})}function wQ(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...J(t)})}function TQ(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...J(t)})}function EQ(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...J(t)})}function DQ(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...J(t)})}function OQ(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...J(t)})}function kQ(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...J(t)})}function AQ(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...J(t)})}function jQ(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...J(t)})}function MQ(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...J(t)})}function NQ(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...J(t)})}function PQ(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...J(t)})}function FQ(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...J(t)})}function IQ(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...J(t)})}function LQ(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...J(t)})}function RQ(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...J(t)})}function zQ(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...J(t)})}function BQ(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...J(t)})}function VQ(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...J(t)})}function HQ(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...J(t)})}function UQ(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...J(t)})}function WQ(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...J(t)})}function GQ(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...J(t)})}function KQ(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...J(t)})}function qQ(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...J(t)})}function JQ(e,t){return new e({type:`number`,checks:[],...J(t)})}function YQ(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...J(t)})}function XQ(e,t){return new e({type:`boolean`,...J(t)})}function ZQ(e,t){return new e({type:`null`,...J(t)})}function QQ(e){return new e({type:`unknown`})}function $Q(e,t){return new e({type:`never`,...J(t)})}function e$(e,t){return new BX({check:`less_than`,...J(t),value:e,inclusive:!1})}function t$(e,t){return new BX({check:`less_than`,...J(t),value:e,inclusive:!0})}function n$(e,t){return new VX({check:`greater_than`,...J(t),value:e,inclusive:!1})}function r$(e,t){return new VX({check:`greater_than`,...J(t),value:e,inclusive:!0})}function i$(e,t){return new HX({check:`multiple_of`,...J(t),value:e})}function a$(e,t){return new WX({check:`max_length`,...J(t),maximum:e})}function o$(e,t){return new GX({check:`min_length`,...J(t),minimum:e})}function s$(e,t){return new KX({check:`length_equals`,...J(t),length:e})}function c$(e,t){return new JX({check:`string_format`,format:`regex`,...J(t),pattern:e})}function l$(e){return new YX({check:`string_format`,format:`lowercase`,...J(e)})}function u$(e){return new XX({check:`string_format`,format:`uppercase`,...J(e)})}function d$(e,t){return new fte({check:`string_format`,format:`includes`,...J(t),includes:e})}function f$(e,t){return new ZX({check:`string_format`,format:`starts_with`,...J(t),prefix:e})}function p$(e,t){return new QX({check:`string_format`,format:`ends_with`,...J(t),suffix:e})}function m$(e){return new $X({check:`overwrite`,tx:e})}function h$(e){return m$(t=>t.normalize(e))}function g$(){return m$(e=>e.trim())}function _$(){return m$(e=>e.toLowerCase())}function v$(){return m$(e=>e.toUpperCase())}function y$(){return m$(e=>vY(e))}function b$(e,t,n){return new e({type:`array`,element:t,...J(n)})}function x$(e,t,n){let r=J(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function S$(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...J(n)})}function C$(e){let t=w$(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(VY(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(VY(r))}},e(n.value,n)));return t}function w$(e,t){let n=new RX({check:`custom`,...J(t)});return n._zod.check=e,n}function T$(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??bQ,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function E$(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,E$(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&k$(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function D$(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
511
|
+
|
|
512
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function O$(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:j$(t,`input`,e.processors),output:j$(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function k$(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return k$(r.element,n);if(r.type===`set`)return k$(r.valueType,n);if(r.type===`lazy`)return k$(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return k$(r.innerType,n);if(r.type===`intersection`)return k$(r.left,n)||k$(r.right,n);if(r.type===`record`||r.type===`map`)return k$(r.keyType,n)||k$(r.valueType,n);if(r.type===`pipe`)return k$(r.in,n)||k$(r.out,n);if(r.type===`object`){for(let e in r.shape)if(k$(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(k$(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(k$(e,n))return!0;return!!(r.rest&&k$(r.rest,n))}return!1}var A$=(e,t={})=>n=>{let r=T$({...n,processors:t});return E$(e,r),D$(r,e),O$(r,e)},j$=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=T$({...i??{},target:a,io:t,processors:n});return E$(e,o),D$(o,e),O$(o,e)},M$={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},N$=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=M$[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},P$=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},F$=(e,t,n,r)=>{n.type=`boolean`},I$=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},L$=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},R$=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},z$=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},B$=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},V$=(e,t,n,r)=>{n.not={}},H$=(e,t,n,r)=>{},U$=(e,t,n,r)=>{},W$=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},G$=(e,t,n,r)=>{let i=e._zod.def,a=sY(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},K$=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},q$=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},J$=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Y$=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},X$=(e,t,n,r)=>{n.type=`boolean`},Z$=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Q$=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},$$=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},e1=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},t1=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},n1=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=E$(a.element,t,{...r,path:[...r.path,`items`]})},r1=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=E$(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=E$(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},i1=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>E$(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},a1=(e,t,n,r)=>{let i=e._zod.def,a=E$(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=E$(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},o1=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>E$(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?E$(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},s1=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=E$(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=E$(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=E$(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},c1=(e,t,n,r)=>{let i=e._zod.def,a=E$(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},l1=(e,t,n,r)=>{let i=e._zod.def;E$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},u1=(e,t,n,r)=>{let i=e._zod.def;E$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},d1=(e,t,n,r)=>{let i=e._zod.def;E$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},f1=(e,t,n,r)=>{let i=e._zod.def;E$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},p1=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;E$(a,t,r);let o=t.seen.get(e);o.ref=a},m1=(e,t,n,r)=>{let i=e._zod.def;E$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},h1=(e,t,n,r)=>{let i=e._zod.def;E$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},g1=(e,t,n,r)=>{let i=e._zod.def;E$(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},_1=(e,t,n,r)=>{let i=e._zod.innerType;E$(i,t,r);let a=t.seen.get(e);a.ref=i},v1={string:N$,number:P$,boolean:F$,bigint:I$,symbol:L$,null:R$,undefined:z$,void:B$,never:V$,any:H$,unknown:U$,date:W$,enum:G$,literal:K$,nan:q$,template_literal:J$,file:Y$,success:X$,custom:Z$,function:Q$,transform:$$,map:e1,set:t1,array:n1,object:r1,union:i1,intersection:a1,tuple:o1,record:s1,nullable:c1,nonoptional:l1,default:u1,prefault:d1,catch:f1,pipe:p1,readonly:m1,promise:h1,optional:g1,lazy:_1};function y1(e,t){if(`_idmap`in e){let n=e,r=T$({...t,processors:v1}),i={};for(let e of n._idmap.entries()){let[t,n]=e;E$(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;D$(r,n),a[t]=O$(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=T$({...t,processors:v1});return E$(e,n),D$(n,e),O$(n,e)}var b1=q(`ZodISODateTime`,(e,t)=>{gZ.init(e,t),G1.init(e,t)});function x1(e){return WQ(b1,e)}var S1=q(`ZodISODate`,(e,t)=>{_Z.init(e,t),G1.init(e,t)});function C1(e){return GQ(S1,e)}var w1=q(`ZodISOTime`,(e,t)=>{vZ.init(e,t),G1.init(e,t)});function T1(e){return KQ(w1,e)}var E1=q(`ZodISODuration`,(e,t)=>{yZ.init(e,t),G1.init(e,t)});function D1(e){return qQ(E1,e)}var O1=(e,t)=>{UY.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>KY(e,t)},flatten:{value:t=>GY(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,cY,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,cY,2)}},isEmpty:{get(){return e.issues.length===0}}})};q(`ZodError`,O1);var k1=q(`ZodError`,O1,{Parent:Error}),A1=qY(k1),j1=JY(k1),M1=YY(k1),N1=ZY(k1),P1=$Y(k1),F1=eX(k1),I1=tX(k1),L1=nX(k1),R1=rX(k1),z1=iX(k1),B1=aX(k1),V1=oX(k1),H1=q(`ZodType`,(e,t)=>(nZ.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:j$(e,`input`),output:j$(e,`output`)}}),e.toJSONSchema=A$(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(gY(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>EY(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>A1(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>M1(e,t,n),e.parseAsync=async(t,n)=>j1(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>N1(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>P1(e,t,n),e.decode=(t,n)=>F1(e,t,n),e.encodeAsync=async(t,n)=>I1(e,t,n),e.decodeAsync=async(t,n)=>L1(e,t,n),e.safeEncode=(t,n)=>R1(e,t,n),e.safeDecode=(t,n)=>z1(e,t,n),e.safeEncodeAsync=async(t,n)=>B1(e,t,n),e.safeDecodeAsync=async(t,n)=>V1(e,t,n),e.refine=(t,n)=>e.check(u2(t,n)),e.superRefine=t=>e.check(d2(t)),e.overwrite=t=>e.check(m$(t)),e.optional=()=>U0(e),e.exactOptional=()=>G0(e),e.nullable=()=>q0(e),e.nullish=()=>U0(q0(e)),e.nonoptional=t=>$0(e,t),e.array=()=>w0(e),e.or=t=>k0([e,t]),e.and=t=>N0(e,t),e.transform=t=>r2(e,V0(t)),e.default=t=>Y0(e,t),e.prefault=t=>Z0(e,t),e.catch=t=>t2(e,t),e.pipe=t=>r2(e,t),e.readonly=()=>a2(e),e.describe=t=>{let n=e.clone();return bQ.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return bQ.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return bQ.get(e);let n=e.clone();return bQ.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),U1=q(`_ZodString`,(e,t)=>{rZ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>N$(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(c$(...t)),e.includes=(...t)=>e.check(d$(...t)),e.startsWith=(...t)=>e.check(f$(...t)),e.endsWith=(...t)=>e.check(p$(...t)),e.min=(...t)=>e.check(o$(...t)),e.max=(...t)=>e.check(a$(...t)),e.length=(...t)=>e.check(s$(...t)),e.nonempty=(...t)=>e.check(o$(1,...t)),e.lowercase=t=>e.check(l$(t)),e.uppercase=t=>e.check(u$(t)),e.trim=()=>e.check(g$()),e.normalize=(...t)=>e.check(h$(...t)),e.toLowerCase=()=>e.check(_$()),e.toUpperCase=()=>e.check(v$()),e.slugify=()=>e.check(y$())}),W1=q(`ZodString`,(e,t)=>{rZ.init(e,t),U1.init(e,t),e.email=t=>e.check(SQ(K1,t)),e.url=t=>e.check(OQ(Y1,t)),e.jwt=t=>e.check(UQ(u0,t)),e.emoji=t=>e.check(kQ(X1,t)),e.guid=t=>e.check(CQ(q1,t)),e.uuid=t=>e.check(wQ(J1,t)),e.uuidv4=t=>e.check(TQ(J1,t)),e.uuidv6=t=>e.check(EQ(J1,t)),e.uuidv7=t=>e.check(DQ(J1,t)),e.nanoid=t=>e.check(AQ(Z1,t)),e.guid=t=>e.check(CQ(q1,t)),e.cuid=t=>e.check(jQ(Q1,t)),e.cuid2=t=>e.check(MQ($1,t)),e.ulid=t=>e.check(NQ(e0,t)),e.base64=t=>e.check(BQ(s0,t)),e.base64url=t=>e.check(VQ(c0,t)),e.xid=t=>e.check(PQ(t0,t)),e.ksuid=t=>e.check(FQ(n0,t)),e.ipv4=t=>e.check(IQ(r0,t)),e.ipv6=t=>e.check(LQ(i0,t)),e.cidrv4=t=>e.check(RQ(a0,t)),e.cidrv6=t=>e.check(zQ(o0,t)),e.e164=t=>e.check(HQ(l0,t)),e.datetime=t=>e.check(x1(t)),e.date=t=>e.check(C1(t)),e.time=t=>e.check(T1(t)),e.duration=t=>e.check(D1(t))});function Y(e){return xQ(W1,e)}var G1=q(`ZodStringFormat`,(e,t)=>{iZ.init(e,t),U1.init(e,t)}),K1=q(`ZodEmail`,(e,t)=>{sZ.init(e,t),G1.init(e,t)}),q1=q(`ZodGUID`,(e,t)=>{aZ.init(e,t),G1.init(e,t)}),J1=q(`ZodUUID`,(e,t)=>{oZ.init(e,t),G1.init(e,t)}),Y1=q(`ZodURL`,(e,t)=>{cZ.init(e,t),G1.init(e,t)}),X1=q(`ZodEmoji`,(e,t)=>{lZ.init(e,t),G1.init(e,t)}),Z1=q(`ZodNanoID`,(e,t)=>{uZ.init(e,t),G1.init(e,t)}),Q1=q(`ZodCUID`,(e,t)=>{dZ.init(e,t),G1.init(e,t)}),$1=q(`ZodCUID2`,(e,t)=>{fZ.init(e,t),G1.init(e,t)}),e0=q(`ZodULID`,(e,t)=>{pZ.init(e,t),G1.init(e,t)}),t0=q(`ZodXID`,(e,t)=>{mZ.init(e,t),G1.init(e,t)}),n0=q(`ZodKSUID`,(e,t)=>{hZ.init(e,t),G1.init(e,t)}),r0=q(`ZodIPv4`,(e,t)=>{bZ.init(e,t),G1.init(e,t)}),i0=q(`ZodIPv6`,(e,t)=>{xZ.init(e,t),G1.init(e,t)}),a0=q(`ZodCIDRv4`,(e,t)=>{SZ.init(e,t),G1.init(e,t)}),o0=q(`ZodCIDRv6`,(e,t)=>{CZ.init(e,t),G1.init(e,t)}),s0=q(`ZodBase64`,(e,t)=>{TZ.init(e,t),G1.init(e,t)}),c0=q(`ZodBase64URL`,(e,t)=>{DZ.init(e,t),G1.init(e,t)}),l0=q(`ZodE164`,(e,t)=>{OZ.init(e,t),G1.init(e,t)}),u0=q(`ZodJWT`,(e,t)=>{AZ.init(e,t),G1.init(e,t)}),d0=q(`ZodNumber`,(e,t)=>{jZ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>P$(e,t,n,r),e.gt=(t,n)=>e.check(n$(t,n)),e.gte=(t,n)=>e.check(r$(t,n)),e.min=(t,n)=>e.check(r$(t,n)),e.lt=(t,n)=>e.check(e$(t,n)),e.lte=(t,n)=>e.check(t$(t,n)),e.max=(t,n)=>e.check(t$(t,n)),e.int=t=>e.check(m0(t)),e.safe=t=>e.check(m0(t)),e.positive=t=>e.check(n$(0,t)),e.nonnegative=t=>e.check(r$(0,t)),e.negative=t=>e.check(e$(0,t)),e.nonpositive=t=>e.check(t$(0,t)),e.multipleOf=(t,n)=>e.check(i$(t,n)),e.step=(t,n)=>e.check(i$(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function f0(e){return JQ(d0,e)}var p0=q(`ZodNumberFormat`,(e,t)=>{MZ.init(e,t),d0.init(e,t)});function m0(e){return YQ(p0,e)}var h0=q(`ZodBoolean`,(e,t)=>{NZ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>F$(e,t,n,r)});function g0(e){return XQ(h0,e)}var _0=q(`ZodNull`,(e,t)=>{PZ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R$(e,t,n,r)});function v0(e){return ZQ(_0,e)}var y0=q(`ZodUnknown`,(e,t)=>{FZ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function b0(){return QQ(y0)}var x0=q(`ZodNever`,(e,t)=>{IZ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V$(e,t,n,r)});function S0(e){return $Q(x0,e)}var C0=q(`ZodArray`,(e,t)=>{RZ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n1(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(o$(t,n)),e.nonempty=t=>e.check(o$(1,t)),e.max=(t,n)=>e.check(a$(t,n)),e.length=(t,n)=>e.check(s$(t,n)),e.unwrap=()=>e.element});function w0(e,t){return b$(C0,e,t)}var T0=q(`ZodObject`,(e,t)=>{UZ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r1(e,t,n,r),mY(e,`shape`,()=>t.shape),e.keyof=()=>L0(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:b0()}),e.loose=()=>e.clone({...e._zod.def,catchall:b0()}),e.strict=()=>e.clone({...e._zod.def,catchall:S0()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>jY(e,t),e.safeExtend=t=>MY(e,t),e.merge=t=>NY(e,t),e.pick=t=>kY(e,t),e.omit=t=>AY(e,t),e.partial=(...t)=>PY(H0,e,t[0]),e.required=(...t)=>FY(Q0,e,t[0])});function E0(e,t){return new T0({type:`object`,shape:e??{},...J(t)})}function D0(e,t){return new T0({type:`object`,shape:e,catchall:S0(),...J(t)})}var O0=q(`ZodUnion`,(e,t)=>{GZ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i1(e,t,n,r),e.options=t.options});function k0(e,t){return new O0({type:`union`,options:e,...J(t)})}var A0=q(`ZodDiscriminatedUnion`,(e,t)=>{O0.init(e,t),KZ.init(e,t)});function j0(e,t,n){return new A0({type:`union`,options:t,discriminator:e,...J(n)})}var M0=q(`ZodIntersection`,(e,t)=>{qZ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a1(e,t,n,r)});function N0(e,t){return new M0({type:`intersection`,left:e,right:t})}var P0=q(`ZodRecord`,(e,t)=>{XZ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>s1(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function F0(e,t,n){return new P0({type:`record`,keyType:e,valueType:t,...J(n)})}var I0=q(`ZodEnum`,(e,t)=>{ZZ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>G$(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new I0({...t,checks:[],...J(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new I0({...t,checks:[],...J(r),entries:i})}});function L0(e,t){return new I0({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...J(t)})}var R0=q(`ZodLiteral`,(e,t)=>{QZ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K$(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function z0(e,t){return new R0({type:`literal`,values:Array.isArray(e)?e:[e],...J(t)})}var B0=q(`ZodTransform`,(e,t)=>{$Z.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$$(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new iY(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(VY(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(VY(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function V0(e){return new B0({type:`transform`,transform:e})}var H0=q(`ZodOptional`,(e,t)=>{tQ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>g1(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function U0(e){return new H0({type:`optional`,innerType:e})}var W0=q(`ZodExactOptional`,(e,t)=>{nQ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>g1(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function G0(e){return new W0({type:`optional`,innerType:e})}var K0=q(`ZodNullable`,(e,t)=>{rQ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c1(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function q0(e){return new K0({type:`nullable`,innerType:e})}var J0=q(`ZodDefault`,(e,t)=>{iQ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>u1(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Y0(e,t){return new J0({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():CY(t)}})}var X0=q(`ZodPrefault`,(e,t)=>{oQ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>d1(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Z0(e,t){return new X0({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():CY(t)}})}var Q0=q(`ZodNonOptional`,(e,t)=>{sQ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>l1(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function $0(e,t){return new Q0({type:`nonoptional`,innerType:e,...J(t)})}var e2=q(`ZodCatch`,(e,t)=>{lQ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>f1(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function t2(e,t){return new e2({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var n2=q(`ZodPipe`,(e,t)=>{uQ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>p1(e,t,n,r),e.in=t.in,e.out=t.out});function r2(e,t){return new n2({type:`pipe`,in:e,out:t})}var i2=q(`ZodReadonly`,(e,t)=>{fQ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>m1(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function a2(e){return new i2({type:`readonly`,innerType:e})}var o2=q(`ZodLazy`,(e,t)=>{mQ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_1(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function s2(e){return new o2({type:`lazy`,getter:e})}var c2=q(`ZodCustom`,(e,t)=>{hQ.init(e,t),H1.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z$(e,t,n,r)});function l2(e,t){return x$(c2,e??(()=>!0),t)}function u2(e,t={}){return S$(c2,e,t)}function d2(e){return C$(e)}function f2(e,t={}){let n=new c2({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...J(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}var p2;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(p2||={});var m2;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(m2||={});var X=p2.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),h2=e=>{switch(typeof e){case`undefined`:return X.undefined;case`string`:return X.string;case`number`:return Number.isNaN(e)?X.nan:X.number;case`boolean`:return X.boolean;case`function`:return X.function;case`bigint`:return X.bigint;case`symbol`:return X.symbol;case`object`:return Array.isArray(e)?X.array:e===null?X.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?X.promise:typeof Map<`u`&&e instanceof Map?X.map:typeof Set<`u`&&e instanceof Set?X.set:typeof Date<`u`&&e instanceof Date?X.date:X.object;default:return X.unknown}},Z=p2.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),g2=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,p2.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t=Object.create(null),n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};g2.create=e=>new g2(e);var _2=(e,t)=>{let n;switch(e.code){case Z.invalid_type:n=e.received===X.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case Z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,p2.jsonStringifyReplacer)}`;break;case Z.unrecognized_keys:n=`Unrecognized key(s) in object: ${p2.joinValues(e.keys,`, `)}`;break;case Z.invalid_union:n=`Invalid input`;break;case Z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${p2.joinValues(e.options)}`;break;case Z.invalid_enum_value:n=`Invalid enum value. Expected ${p2.joinValues(e.options)}, received '${e.received}'`;break;case Z.invalid_arguments:n=`Invalid function arguments`;break;case Z.invalid_return_type:n=`Invalid function return type`;break;case Z.invalid_date:n=`Invalid date`;break;case Z.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:p2.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case Z.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case Z.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case Z.custom:n=`Invalid input`;break;case Z.invalid_intersection_types:n=`Intersection results could not be merged`;break;case Z.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Z.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,p2.assertNever(e)}return{message:n}},v2=_2;function y2(){return v2}var b2=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function Q(e,t){let n=y2(),r=b2({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===_2?void 0:_2].filter(e=>!!e)});e.common.issues.push(r)}var x2=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return S2;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return S2;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},S2=Object.freeze({status:`aborted`}),C2=e=>({status:`dirty`,value:e}),w2=e=>({status:`valid`,value:e}),T2=e=>e.status===`aborted`,E2=e=>e.status===`dirty`,D2=e=>e.status===`valid`,O2=e=>typeof Promise<`u`&&e instanceof Promise,k2;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(k2||={});var A2=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},j2=(e,t)=>{if(D2(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){return this._error||=new g2(e.common.issues),this._error}}};function M2(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var N2=class{get description(){return this._def.description}_getType(e){return h2(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:h2(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new x2,ctx:{common:e.parent.common,data:e.data,parsedType:h2(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(O2(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:h2(e)};return j2(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:h2(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return D2(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>D2(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:h2(e)},r=this._parse({data:e,path:n.path,parent:n});return j2(n,await(O2(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:Z.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new I4({schema:this,typeName:$.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return L4.create(this,this._def)}nullable(){return R4.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _4.create(this)}promise(){return F4.create(this,this._def)}or(e){return b4.create([this,e],this._def)}and(e){return w4.create(this,e,this._def)}transform(e){return new I4({...M2(this._def),schema:this,typeName:$.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new z4({...M2(this._def),innerType:this,defaultValue:t,typeName:$.ZodDefault})}brand(){return new H4({typeName:$.ZodBranded,type:this,...M2(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new B4({...M2(this._def),innerType:this,catchValue:t,typeName:$.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return U4.create(this,e)}readonly(){return W4.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},P2=/^c[^\s-]{8,}$/i,F2=/^[0-9a-z]+$/,I2=/^[0-9A-HJKMNP-TV-Z]{26}$/i,L2=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,R2=/^[a-z0-9_-]{21}$/i,z2=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,B2=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,V2=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,H2=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,U2,W2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,G2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,K2=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,q2=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,J2=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Y2=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,X2=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,Z2=RegExp(`^${X2}$`);function Q2(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function $2(e){return RegExp(`^${Q2(e)}$`)}function e4(e){let t=`${X2}T${Q2(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function t4(e,t){return!!((t===`v4`||!t)&&W2.test(e)||(t===`v6`||!t)&&K2.test(e))}function n4(e,t){if(!z2.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function r4(e,t){return!!((t===`v4`||!t)&&G2.test(e)||(t===`v6`||!t)&&q2.test(e))}var i4=class e extends N2{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==X.string){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.string,received:t.parsedType}),S2}let t=new x2,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?Q(n,{code:Z.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&Q(n,{code:Z.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)V2.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`email`,code:Z.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)U2||=new RegExp(H2,`u`),U2.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`emoji`,code:Z.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)L2.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`uuid`,code:Z.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)R2.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`nanoid`,code:Z.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)P2.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`cuid`,code:Z.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)F2.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`cuid2`,code:Z.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)I2.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`ulid`,code:Z.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),Q(n,{validation:`url`,code:Z.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`regex`,code:Z.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?e4(r).test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?Z2.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?$2(r).test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?B2.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`duration`,code:Z.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?t4(e.data,r.version)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`ip`,code:Z.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?n4(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`jwt`,code:Z.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?r4(e.data,r.version)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`cidr`,code:Z.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?J2.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`base64`,code:Z.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?Y2.test(e.data)||(n=this._getOrReturnCtx(e,n),Q(n,{validation:`base64url`,code:Z.invalid_string,message:r.message}),t.dirty()):p2.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:Z.invalid_string,...k2.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...k2.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...k2.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...k2.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...k2.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...k2.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...k2.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...k2.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...k2.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...k2.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...k2.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...k2.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...k2.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...k2.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...k2.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...k2.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...k2.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...k2.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...k2.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...k2.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...k2.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...k2.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...k2.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...k2.errToObj(t)})}nonempty(e){return this.min(1,k2.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};i4.create=e=>new i4({checks:[],typeName:$.ZodString,coerce:e?.coerce??!1,...M2(e)});function a4(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var o4=class e extends N2{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==X.number){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.number,received:t.parsedType}),S2}let t,n=new x2;for(let r of this._def.checks)r.kind===`int`?p2.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?a4(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.not_finite,message:r.message}),n.dirty()):p2.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,k2.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,k2.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,k2.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,k2.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:k2.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:k2.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:k2.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:k2.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:k2.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:k2.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:k2.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:k2.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:k2.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:k2.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&p2.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};o4.create=e=>new o4({checks:[],typeName:$.ZodNumber,coerce:e?.coerce||!1,...M2(e)});var s4=class e extends N2{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==X.bigint)return this._getInvalidInput(e);let t,n=new x2;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Q(t,{code:Z.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):p2.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.bigint,received:t.parsedType}),S2}gte(e,t){return this.setLimit(`min`,e,!0,k2.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,k2.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,k2.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,k2.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:k2.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:k2.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:k2.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:k2.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:k2.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:k2.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};s4.create=e=>new s4({checks:[],typeName:$.ZodBigInt,coerce:e?.coerce??!1,...M2(e)});var c4=class extends N2{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==X.boolean){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.boolean,received:t.parsedType}),S2}return w2(e.data)}};c4.create=e=>new c4({typeName:$.ZodBoolean,coerce:e?.coerce||!1,...M2(e)});var l4=class e extends N2{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==X.date){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.date,received:t.parsedType}),S2}if(Number.isNaN(e.data.getTime()))return Q(this._getOrReturnCtx(e),{code:Z.invalid_date}),S2;let t=new x2,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),Q(n,{code:Z.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):p2.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:k2.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:k2.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};l4.create=e=>new l4({checks:[],coerce:e?.coerce||!1,typeName:$.ZodDate,...M2(e)});var u4=class extends N2{_parse(e){if(this._getType(e)!==X.symbol){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.symbol,received:t.parsedType}),S2}return w2(e.data)}};u4.create=e=>new u4({typeName:$.ZodSymbol,...M2(e)});var d4=class extends N2{_parse(e){if(this._getType(e)!==X.undefined){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.undefined,received:t.parsedType}),S2}return w2(e.data)}};d4.create=e=>new d4({typeName:$.ZodUndefined,...M2(e)});var f4=class extends N2{_parse(e){if(this._getType(e)!==X.null){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.null,received:t.parsedType}),S2}return w2(e.data)}};f4.create=e=>new f4({typeName:$.ZodNull,...M2(e)});var p4=class extends N2{constructor(){super(...arguments),this._any=!0}_parse(e){return w2(e.data)}};p4.create=e=>new p4({typeName:$.ZodAny,...M2(e)});var m4=class extends N2{constructor(){super(...arguments),this._unknown=!0}_parse(e){return w2(e.data)}};m4.create=e=>new m4({typeName:$.ZodUnknown,...M2(e)});var h4=class extends N2{_parse(e){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.never,received:t.parsedType}),S2}};h4.create=e=>new h4({typeName:$.ZodNever,...M2(e)});var g4=class extends N2{_parse(e){if(this._getType(e)!==X.undefined){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.void,received:t.parsedType}),S2}return w2(e.data)}};g4.create=e=>new g4({typeName:$.ZodVoid,...M2(e)});var _4=class e extends N2{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==X.array)return Q(t,{code:Z.invalid_type,expected:X.array,received:t.parsedType}),S2;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(Q(t,{code:e?Z.too_big:Z.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(Q(t,{code:Z.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(Q(t,{code:Z.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new A2(t,e,t.path,n)))).then(e=>x2.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new A2(t,e,t.path,n)));return x2.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:k2.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:k2.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:k2.toString(n)}})}nonempty(e){return this.min(1,e)}};_4.create=(e,t)=>new _4({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...M2(t)});function v4(e){if(e instanceof y4){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=L4.create(v4(r))}return new y4({...e._def,shape:()=>t})}else if(e instanceof _4)return new _4({...e._def,type:v4(e.element)});else if(e instanceof L4)return L4.create(v4(e.unwrap()));else if(e instanceof R4)return R4.create(v4(e.unwrap()));else if(e instanceof T4)return T4.create(e.items.map(e=>v4(e)));else return e}var y4=class e extends N2{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape();return this._cached={shape:e,keys:p2.objectKeys(e)},this._cached}_parse(e){if(this._getType(e)!==X.object){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.object,received:t.parsedType}),S2}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof h4&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new A2(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof h4){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(Q(n,{code:Z.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new A2(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>x2.mergeObjectSync(t,e)):x2.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return k2.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:k2.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of p2.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of p2.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return v4(this)}partial(t){let n={};for(let e of p2.objectKeys(this.shape)){let r=this.shape[e];t&&!t[e]?n[e]=r:n[e]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of p2.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof L4;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return M4(p2.objectKeys(this.shape))}};y4.create=(e,t)=>new y4({shape:()=>e,unknownKeys:`strip`,catchall:h4.create(),typeName:$.ZodObject,...M2(t)}),y4.strictCreate=(e,t)=>new y4({shape:()=>e,unknownKeys:`strict`,catchall:h4.create(),typeName:$.ZodObject,...M2(t)}),y4.lazycreate=(e,t)=>new y4({shape:e,unknownKeys:`strip`,catchall:h4.create(),typeName:$.ZodObject,...M2(t)});var b4=class extends N2{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new g2(e.ctx.common.issues));return Q(t,{code:Z.invalid_union,unionErrors:n}),S2}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new g2(e));return Q(t,{code:Z.invalid_union,unionErrors:i}),S2}}get options(){return this._def.options}};b4.create=(e,t)=>new b4({options:e,typeName:$.ZodUnion,...M2(t)});var x4=e=>e instanceof A4?x4(e.schema):e instanceof I4?x4(e.innerType()):e instanceof j4?[e.value]:e instanceof N4?e.options:e instanceof P4?p2.objectValues(e.enum):e instanceof z4?x4(e._def.innerType):e instanceof d4?[void 0]:e instanceof f4?[null]:e instanceof L4?[void 0,...x4(e.unwrap())]:e instanceof R4?[null,...x4(e.unwrap())]:e instanceof H4||e instanceof W4?x4(e.unwrap()):e instanceof B4?x4(e._def.innerType):[],S4=class e extends N2{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==X.object)return Q(t,{code:Z.invalid_type,expected:X.object,received:t.parsedType}),S2;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(Q(t,{code:Z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),S2)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=x4(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:$.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...M2(r)})}};function C4(e,t){let n=h2(e),r=h2(t);if(e===t)return{valid:!0,data:e};if(n===X.object&&r===X.object){let n=p2.objectKeys(t),r=p2.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=C4(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}else if(n===X.array&&r===X.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=C4(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}else if(n===X.date&&r===X.date&&+e==+t)return{valid:!0,data:e};else return{valid:!1}}var w4=class extends N2{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(T2(e)||T2(r))return S2;let i=C4(e.value,r.value);return i.valid?((E2(e)||E2(r))&&t.dirty(),{status:t.value,value:i.data}):(Q(n,{code:Z.invalid_intersection_types}),S2)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};w4.create=(e,t,n)=>new w4({left:e,right:t,typeName:$.ZodIntersection,...M2(n)});var T4=class e extends N2{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==X.array)return Q(n,{code:Z.invalid_type,expected:X.array,received:n.parsedType}),S2;if(n.data.length<this._def.items.length)return Q(n,{code:Z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),S2;!this._def.rest&&n.data.length>this._def.items.length&&(Q(n,{code:Z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new A2(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>x2.mergeArray(t,e)):x2.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};T4.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new T4({items:e,typeName:$.ZodTuple,rest:null,...M2(t)})};var E4=class e extends N2{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==X.object)return Q(n,{code:Z.invalid_type,expected:X.object,received:n.parsedType}),S2;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new A2(n,e,n.path,e)),value:a._parse(new A2(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?x2.mergeObjectAsync(t,r):x2.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof N2?new e({keyType:t,valueType:n,typeName:$.ZodRecord,...M2(r)}):new e({keyType:i4.create(),valueType:t,typeName:$.ZodRecord,...M2(n)})}},D4=class extends N2{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==X.map)return Q(n,{code:Z.invalid_type,expected:X.map,received:n.parsedType}),S2;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new A2(n,e,n.path,[a,`key`])),value:i._parse(new A2(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return S2;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}else{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return S2;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};D4.create=(e,t,n)=>new D4({valueType:t,keyType:e,typeName:$.ZodMap,...M2(n)});var O4=class e extends N2{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==X.set)return Q(n,{code:Z.invalid_type,expected:X.set,received:n.parsedType}),S2;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(Q(n,{code:Z.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(Q(n,{code:Z.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return S2;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new A2(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:k2.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:k2.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};O4.create=(e,t)=>new O4({valueType:e,minSize:null,maxSize:null,typeName:$.ZodSet,...M2(t)});var k4=class e extends N2{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==X.function)return Q(t,{code:Z.invalid_type,expected:X.function,received:t.parsedType}),S2;function n(e,n){return b2({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,y2(),_2].filter(e=>!!e),issueData:{code:Z.invalid_arguments,argumentsError:n}})}function r(e,n){return b2({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,y2(),_2].filter(e=>!!e),issueData:{code:Z.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof F4){let e=this;return w2(async function(...t){let o=new g2([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}else{let e=this;return w2(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new g2([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new g2([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:T4.create(t).rest(m4.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||T4.create([]).rest(m4.create()),returns:n||m4.create(),typeName:$.ZodFunction,...M2(r)})}},A4=class extends N2{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};A4.create=(e,t)=>new A4({getter:e,typeName:$.ZodLazy,...M2(t)});var j4=class extends N2{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return Q(t,{received:t.data,code:Z.invalid_literal,expected:this._def.value}),S2}return{status:`valid`,value:e.data}}get value(){return this._def.value}};j4.create=(e,t)=>new j4({value:e,typeName:$.ZodLiteral,...M2(t)});function M4(e,t){return new N4({values:e,typeName:$.ZodEnum,...M2(t)})}var N4=class e extends N2{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return Q(t,{expected:p2.joinValues(n),received:t.parsedType,code:Z.invalid_type}),S2}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return Q(t,{received:t.data,code:Z.invalid_enum_value,options:n}),S2}return w2(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};N4.create=M4;var P4=class extends N2{_parse(e){let t=p2.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==X.string&&n.parsedType!==X.number){let e=p2.objectValues(t);return Q(n,{expected:p2.joinValues(e),received:n.parsedType,code:Z.invalid_type}),S2}if(this._cache||=new Set(p2.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=p2.objectValues(t);return Q(n,{received:n.data,code:Z.invalid_enum_value,options:e}),S2}return w2(e.data)}get enum(){return this._def.values}};P4.create=(e,t)=>new P4({values:e,typeName:$.ZodNativeEnum,...M2(t)});var F4=class extends N2{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==X.promise&&t.common.async===!1?(Q(t,{code:Z.invalid_type,expected:X.promise,received:t.parsedType}),S2):w2((t.parsedType===X.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};F4.create=(e,t)=>new F4({type:e,typeName:$.ZodPromise,...M2(t)});var I4=class extends N2{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{Q(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return S2;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?S2:r.status===`dirty`||t.value===`dirty`?C2(r.value):r});{if(t.value===`aborted`)return S2;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?S2:r.status===`dirty`||t.value===`dirty`?C2(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?S2:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?S2:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`)if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!D2(e))return S2;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>D2(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):S2);p2.assertNever(r)}};I4.create=(e,t,n)=>new I4({schema:e,typeName:$.ZodEffects,effect:t,...M2(n)}),I4.createWithPreprocess=(e,t,n)=>new I4({schema:t,effect:{type:`preprocess`,transform:e},typeName:$.ZodEffects,...M2(n)});var L4=class extends N2{_parse(e){return this._getType(e)===X.undefined?w2(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};L4.create=(e,t)=>new L4({innerType:e,typeName:$.ZodOptional,...M2(t)});var R4=class extends N2{_parse(e){return this._getType(e)===X.null?w2(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};R4.create=(e,t)=>new R4({innerType:e,typeName:$.ZodNullable,...M2(t)});var z4=class extends N2{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===X.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};z4.create=(e,t)=>new z4({innerType:e,typeName:$.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...M2(t)});var B4=class extends N2{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return O2(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new g2(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new g2(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};B4.create=(e,t)=>new B4({innerType:e,typeName:$.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...M2(t)});var V4=class extends N2{_parse(e){if(this._getType(e)!==X.nan){let t=this._getOrReturnCtx(e);return Q(t,{code:Z.invalid_type,expected:X.nan,received:t.parsedType}),S2}return{status:`valid`,value:e.data}}};V4.create=e=>new V4({typeName:$.ZodNaN,...M2(e)});var H4=class extends N2{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},U4=class e extends N2{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?S2:e.status===`dirty`?(t.dirty(),C2(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?S2:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:$.ZodPipeline})}},W4=class extends N2{_parse(e){let t=this._def.innerType._parse(e),n=e=>(D2(e)&&(e.value=Object.freeze(e.value)),e);return O2(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};W4.create=(e,t)=>new W4({innerType:e,typeName:$.ZodReadonly,...M2(t)}),y4.lazycreate;var $;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})($||={}),i4.create,o4.create,V4.create,s4.create,c4.create,l4.create,u4.create,d4.create,f4.create,p4.create,m4.create,h4.create,g4.create,_4.create,y4.create,y4.strictCreate,b4.create,S4.create,w4.create,T4.create,E4.create,D4.create,O4.create,k4.create,A4.create,j4.create,N4.create,P4.create,F4.create,I4.create,L4.create,R4.create,I4.createWithPreprocess,U4.create;var G4=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}};function K4(e){}function q4(e){if(typeof e==`function`)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=K4,onError:n=K4,onRetry:r=K4,onComment:i}=e,a=``,o=!0,s,c=``,l=``;function u(e){let t=o?e.replace(/^\xEF\xBB\xBF/,``):e,[n,r]=J4(`${a}${t}`);for(let e of n)d(e);a=r,o=!1}function d(e){if(e===``){p();return}if(e.startsWith(`:`)){i&&i(e.slice(e.startsWith(`: `)?2:1));return}let t=e.indexOf(`:`);if(t!==-1){let n=e.slice(0,t),r=e[t+1]===` `?2:1;f(n,e.slice(t+r),e);return}f(e,``,e)}function f(e,t,i){switch(e){case`event`:l=t;break;case`data`:c=`${c}${t}
|
|
513
|
+
`;break;case`id`:s=t.includes(`\0`)?void 0:t;break;case`retry`:/^\d+$/.test(t)?r(parseInt(t,10)):n(new G4(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new G4(`Unknown field "${e.length>20?`${e.slice(0,20)}\u2026`:e}"`,{type:`unknown-field`,field:e,value:t,line:i}));break}}function p(){c.length>0&&t({id:s,event:l||void 0,data:c.endsWith(`
|
|
514
|
+
`)?c.slice(0,-1):c}),s=void 0,c=``,l=``}function m(e={}){a&&e.consume&&d(a),o=!0,s=void 0,c=``,l=``,a=``}return{feed:u,reset:m}}function J4(e){let t=[],n=``,r=0;for(;r<e.length;){let i=e.indexOf(`\r`,r),a=e.indexOf(`
|
|
515
|
+
`,r),o=-1;if(i!==-1&&a!==-1?o=Math.min(i,a):i===-1?a!==-1&&(o=a):o=i===e.length-1?-1:i,o===-1){n=e.slice(r);break}else{let n=e.slice(r,o);t.push(n),r=o+1,e[r-1]===`\r`&&e[r]===`
|
|
516
|
+
`&&r++}}return[t,n]}var Y4=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n}={}){let r;super({start(i){r=q4({onEvent:e=>{i.enqueue(e)},onError(t){e===`terminate`?i.error(t):typeof e==`function`&&e(t)},onRetry:t,onComment:n})},transform(e){r.feed(e)}})}},{btoa:pte,atob:mte}=globalThis,X4=({prefix:e,size:t=16,alphabet:n=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,separator:r=`-`}={})=>{let i=()=>{let e=n.length,r=Array(t);for(let i=0;i<t;i++)r[i]=n[Math.random()*e|0];return r.join(``)};if(e==null)return i;if(n.includes(r))throw new WJ({argument:`separator`,message:`The separator "${r}" must not be part of the alphabet "${n}".`});return()=>`${e}${r}${i()}`},Z4=X4();function Q4(e=globalThis){return e.window?`runtime/browser`:e.navigator?.userAgent?`runtime/${e.navigator.userAgent.toLowerCase()}`:e.process?.versions?.node?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?`runtime/vercel-edge`:`runtime/unknown`}function $4(e){if(e==null)return{};let t={};if(e instanceof Headers)e.forEach((e,n)=>{t[n.toLowerCase()]=e});else{Array.isArray(e)||(e=Object.entries(e));for(let[n,r]of e)r!=null&&(t[n.toLowerCase()]=r)}return t}function e3(e,...t){let n=new Headers($4(e)),r=n.get(`user-agent`)||``;return n.set(`user-agent`,[r,...t].filter(Boolean).join(` `)),Object.fromEntries(n.entries())}var t3=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,n3=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function r3(e){let t=JSON.parse(e);return typeof t!=`object`||!t||t3.test(e)===!1&&n3.test(e)===!1?t:i3(t)}function i3(e){let t=[e];for(;t.length;){let e=t;t=[];for(let n of e){if(Object.prototype.hasOwnProperty.call(n,`__proto__`)||Object.prototype.hasOwnProperty.call(n,`constructor`)&&n.constructor!==null&&typeof n.constructor==`object`&&Object.prototype.hasOwnProperty.call(n.constructor,`prototype`))throw SyntaxError(`Object contains forbidden prototype property`);for(let e in n){let r=n[e];r&&typeof r==`object`&&t.push(r)}}}return e}function a3(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return r3(e)}try{return r3(e)}finally{Error.stackTraceLimit=t}}function o3(e){if(e.type===`object`||Array.isArray(e.type)&&e.type.includes(`object`)){e.additionalProperties=!1;let{properties:t}=e;if(t!=null)for(let e of Object.keys(t))t[e]=s3(t[e])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(s3):s3(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(s3)),e.allOf!=null&&(e.allOf=e.allOf.map(s3)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(s3));let{definitions:t}=e;if(t!=null)for(let e of Object.keys(t))t[e]=s3(t[e]);return e}function s3(e){return typeof e==`boolean`?e:o3(e)}var c3=Symbol(`Let zodToJsonSchema decide on which parser to use`),l3={name:void 0,$refStrategy:`root`,basePath:[`#`],effectStrategy:`input`,pipeStrategy:`all`,dateStrategy:`format:date-time`,mapStrategy:`entries`,removeAdditionalStrategy:`passthrough`,allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:`definitions`,strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:`escape`,applyRegexFlags:!1,emailStrategy:`format:email`,base64Strategy:`contentEncoding:base64`,nameStrategy:`ref`},u3=e=>typeof e==`string`?{...l3,name:e}:{...l3,...e};function d3(){return{}}function f3(e,t){let n={type:`array`};return e.type?._def&&e.type?._def?.typeName!==$.ZodAny&&(n.items=r6(e.type._def,{...t,currentPath:[...t.currentPath,`items`]})),e.minLength&&(n.minItems=e.minLength.value),e.maxLength&&(n.maxItems=e.maxLength.value),e.exactLength&&(n.minItems=e.exactLength.value,n.maxItems=e.exactLength.value),n}function p3(e){let t={type:`integer`,format:`int64`};if(!e.checks)return t;for(let n of e.checks)switch(n.kind){case`min`:n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case`max`:n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case`multipleOf`:t.multipleOf=n.value;break}return t}function m3(){return{type:`boolean`}}function h3(e,t){return r6(e.type._def,t)}var g3=(e,t)=>r6(e.innerType._def,t);function _3(e,t,n){let r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((n,r)=>_3(e,t,n))};switch(r){case`string`:case`format:date-time`:return{type:`string`,format:`date-time`};case`format:date`:return{type:`string`,format:`date`};case`integer`:return v3(e)}}var v3=e=>{let t={type:`integer`,format:`unix-time`};for(let n of e.checks)switch(n.kind){case`min`:t.minimum=n.value;break;case`max`:t.maximum=n.value;break}return t};function y3(e,t){return{...r6(e.innerType._def,t),default:e.defaultValue()}}function b3(e,t){return t.effectStrategy===`input`?r6(e.schema._def,t):d3()}function x3(e){return{type:`string`,enum:Array.from(e.values)}}var S3=e=>`type`in e&&e.type===`string`?!1:`allOf`in e;function C3(e,t){let n=[r6(e.left._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]}),r6(e.right._def,{...t,currentPath:[...t.currentPath,`allOf`,`1`]})].filter(e=>!!e),r=[];return n.forEach(e=>{if(S3(e))r.push(...e.allOf);else{let t=e;if(`additionalProperties`in e&&e.additionalProperties===!1){let{additionalProperties:n,...r}=e;t=r}r.push(t)}}),r.length?{allOf:r}:void 0}function w3(e){let t=typeof e.value;return t!==`bigint`&&t!==`number`&&t!==`boolean`&&t!==`string`?{type:Array.isArray(e.value)?`array`:`object`}:{type:t===`bigint`?`integer`:t,const:e.value}}var T3=void 0,E3={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(T3===void 0&&(T3=RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)),T3),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function D3(e,t){let n={type:`string`};if(e.checks)for(let r of e.checks)switch(r.kind){case`min`:n.minLength=typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value;break;case`max`:n.maxLength=typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value;break;case`email`:switch(t.emailStrategy){case`format:email`:j3(n,`email`,r.message,t);break;case`format:idn-email`:j3(n,`idn-email`,r.message,t);break;case`pattern:zod`:M3(n,E3.email,r.message,t);break}break;case`url`:j3(n,`uri`,r.message,t);break;case`uuid`:j3(n,`uuid`,r.message,t);break;case`regex`:M3(n,r.regex,r.message,t);break;case`cuid`:M3(n,E3.cuid,r.message,t);break;case`cuid2`:M3(n,E3.cuid2,r.message,t);break;case`startsWith`:M3(n,RegExp(`^${O3(r.value,t)}`),r.message,t);break;case`endsWith`:M3(n,RegExp(`${O3(r.value,t)}$`),r.message,t);break;case`datetime`:j3(n,`date-time`,r.message,t);break;case`date`:j3(n,`date`,r.message,t);break;case`time`:j3(n,`time`,r.message,t);break;case`duration`:j3(n,`duration`,r.message,t);break;case`length`:n.minLength=typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value,n.maxLength=typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value;break;case`includes`:M3(n,RegExp(O3(r.value,t)),r.message,t);break;case`ip`:r.version!==`v6`&&j3(n,`ipv4`,r.message,t),r.version!==`v4`&&j3(n,`ipv6`,r.message,t);break;case`base64url`:M3(n,E3.base64url,r.message,t);break;case`jwt`:M3(n,E3.jwt,r.message,t);break;case`cidr`:r.version!==`v6`&&M3(n,E3.ipv4Cidr,r.message,t),r.version!==`v4`&&M3(n,E3.ipv6Cidr,r.message,t);break;case`emoji`:M3(n,E3.emoji(),r.message,t);break;case`ulid`:M3(n,E3.ulid,r.message,t);break;case`base64`:switch(t.base64Strategy){case`format:binary`:j3(n,`binary`,r.message,t);break;case`contentEncoding:base64`:n.contentEncoding=`base64`;break;case`pattern:zod`:M3(n,E3.base64,r.message,t);break}break;case`nanoid`:M3(n,E3.nanoid,r.message,t);case`toLowerCase`:case`toUpperCase`:case`trim`:break;default:}return n}function O3(e,t){return t.patternStrategy===`escape`?A3(e):e}var k3=new Set(`ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789`);function A3(e){let t=``;for(let n=0;n<e.length;n++)k3.has(e[n])||(t+=`\\`),t+=e[n];return t}function j3(e,t,n,r){e.format||e.anyOf?.some(e=>e.format)?(e.anyOf||=[],e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):e.format=t}function M3(e,t,n,r){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||=[],e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:N3(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=N3(t,r)}function N3(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes(`i`),m:e.flags.includes(`m`),s:e.flags.includes(`s`)},r=n.i?e.source.toLowerCase():e.source,i=``,a=!1,o=!1,s=!1;for(let e=0;e<r.length;e++){if(a){i+=r[e],a=!1;continue}if(n.i){if(o){if(r[e].match(/[a-z]/)){s?(i+=r[e],i+=`${r[e-2]}-${r[e]}`.toUpperCase(),s=!1):r[e+1]===`-`&&r[e+2]?.match(/[a-z]/)?(i+=r[e],s=!0):i+=`${r[e]}${r[e].toUpperCase()}`;continue}}else if(r[e].match(/[a-z]/)){i+=`[${r[e]}${r[e].toUpperCase()}]`;continue}}if(n.m){if(r[e]===`^`){i+=`(^|(?<=[\r
|
|
517
|
+
]))`;continue}else if(r[e]===`$`){i+=`($|(?=[\r
|
|
518
|
+
]))`;continue}}if(n.s&&r[e]===`.`){i+=o?`${r[e]}\r
|
|
519
|
+
`:`[${r[e]}\r
|
|
520
|
+
]`;continue}i+=r[e],r[e]===`\\`?a=!0:o&&r[e]===`]`?o=!1:!o&&r[e]===`[`&&(o=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join(`/`)} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function P3(e,t){let n={type:`object`,additionalProperties:r6(e.valueType._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]})??t.allowedAdditionalProperties};if(e.keyType?._def.typeName===$.ZodString&&e.keyType._def.checks?.length){let{type:r,...i}=D3(e.keyType._def,t);return{...n,propertyNames:i}}else if(e.keyType?._def.typeName===$.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};else if(e.keyType?._def.typeName===$.ZodBranded&&e.keyType._def.type._def.typeName===$.ZodString&&e.keyType._def.type._def.checks?.length){let{type:r,...i}=h3(e.keyType._def,t);return{...n,propertyNames:i}}return n}function F3(e,t){return t.mapStrategy===`record`?P3(e,t):{type:`array`,maxItems:125,items:{type:`array`,items:[r6(e.keyType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`0`]})||d3(),r6(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`1`]})||d3()],minItems:2,maxItems:2}}}function I3(e){let t=e.values,n=Object.keys(e.values).filter(e=>typeof t[t[e]]!=`number`).map(e=>t[e]),r=Array.from(new Set(n.map(e=>typeof e)));return{type:r.length===1?r[0]===`string`?`string`:`number`:[`string`,`number`],enum:n}}function L3(){return{not:d3()}}function R3(){return{type:`null`}}var z3={ZodString:`string`,ZodNumber:`number`,ZodBigInt:`integer`,ZodBoolean:`boolean`,ZodNull:`null`};function B3(e,t){let n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(e=>e._def.typeName in z3&&(!e._def.checks||!e._def.checks.length))){let e=n.reduce((e,t)=>{let n=z3[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e},[]);return{type:e.length>1?e:e[0]}}else if(n.every(e=>e._def.typeName===`ZodLiteral`&&!e.description)){let e=n.reduce((e,t)=>{let n=typeof t._def.value;switch(n){case`string`:case`number`:case`boolean`:return[...e,n];case`bigint`:return[...e,`integer`];case`object`:if(t._def.value===null)return[...e,`null`];default:return e}},[]);if(e.length===n.length){let t=e.filter((e,t,n)=>n.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:n.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(n.every(e=>e._def.typeName===`ZodEnum`))return{type:`string`,enum:n.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return V3(e,t)}var V3=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,n)=>r6(e._def,{...t,currentPath:[...t.currentPath,`anyOf`,`${n}`]})).filter(e=>!!e&&(!t.strictUnions||typeof e==`object`&&Object.keys(e).length>0));return n.length?{anyOf:n}:void 0};function H3(e,t){if([`ZodString`,`ZodNumber`,`ZodBigInt`,`ZodBoolean`,`ZodNull`].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[z3[e.innerType._def.typeName],`null`]};let n=r6(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`0`]});return n&&{anyOf:[n,{type:`null`}]}}function U3(e){let t={type:`number`};if(!e.checks)return t;for(let n of e.checks)switch(n.kind){case`int`:t.type=`integer`;break;case`min`:n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case`max`:n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case`multipleOf`:t.multipleOf=n.value;break}return t}function W3(e,t){let n={type:`object`,properties:{}},r=[],i=e.shape();for(let e in i){let a=i[e];if(a===void 0||a._def===void 0)continue;let o=K3(a),s=r6(a._def,{...t,currentPath:[...t.currentPath,`properties`,e],propertyPath:[...t.currentPath,`properties`,e]});s!==void 0&&(n.properties[e]=s,o||r.push(e))}r.length&&(n.required=r);let a=G3(e,t);return a!==void 0&&(n.additionalProperties=a),n}function G3(e,t){if(e.catchall._def.typeName!==`ZodNever`)return r6(e.catchall._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]});switch(e.unknownKeys){case`passthrough`:return t.allowedAdditionalProperties;case`strict`:return t.rejectedAdditionalProperties;case`strip`:return t.removeAdditionalStrategy===`strict`?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function K3(e){try{return e.isOptional()}catch{return!0}}var q3=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return r6(e.innerType._def,t);let n=r6(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`1`]});return n?{anyOf:[{not:d3()},n]}:d3()},J3=(e,t)=>{if(t.pipeStrategy===`input`)return r6(e.in._def,t);if(t.pipeStrategy===`output`)return r6(e.out._def,t);let n=r6(e.in._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]});return{allOf:[n,r6(e.out._def,{...t,currentPath:[...t.currentPath,`allOf`,n?`1`:`0`]})].filter(e=>e!==void 0)}};function Y3(e,t){return r6(e.type._def,t)}function X3(e,t){let n={type:`array`,uniqueItems:!0,items:r6(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function Z3(e,t){return e.rest?{type:`array`,minItems:e.items.length,items:e.items.map((e,n)=>r6(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[]),additionalItems:r6(e.rest._def,{...t,currentPath:[...t.currentPath,`additionalItems`]})}:{type:`array`,minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,n)=>r6(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[])}}function Q3(){return{not:d3()}}function $3(){return d3()}var e6=(e,t)=>r6(e.innerType._def,t),t6=(e,t,n)=>{switch(t){case $.ZodString:return D3(e,n);case $.ZodNumber:return U3(e);case $.ZodObject:return W3(e,n);case $.ZodBigInt:return p3(e);case $.ZodBoolean:return m3();case $.ZodDate:return _3(e,n);case $.ZodUndefined:return Q3();case $.ZodNull:return R3();case $.ZodArray:return f3(e,n);case $.ZodUnion:case $.ZodDiscriminatedUnion:return B3(e,n);case $.ZodIntersection:return C3(e,n);case $.ZodTuple:return Z3(e,n);case $.ZodRecord:return P3(e,n);case $.ZodLiteral:return w3(e);case $.ZodEnum:return x3(e);case $.ZodNativeEnum:return I3(e);case $.ZodNullable:return H3(e,n);case $.ZodOptional:return q3(e,n);case $.ZodMap:return F3(e,n);case $.ZodSet:return X3(e,n);case $.ZodLazy:return()=>e.getter()._def;case $.ZodPromise:return Y3(e,n);case $.ZodNaN:case $.ZodNever:return L3();case $.ZodEffects:return b3(e,n);case $.ZodAny:return d3();case $.ZodUnknown:return $3();case $.ZodDefault:return y3(e,n);case $.ZodBranded:return h3(e,n);case $.ZodReadonly:return e6(e,n);case $.ZodCatch:return g3(e,n);case $.ZodPipeline:return J3(e,n);case $.ZodFunction:case $.ZodVoid:case $.ZodSymbol:return;default:return(e=>void 0)(t)}},n6=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join(`/`)};function r6(e,t,n=!1){let r=t.seen.get(e);if(t.override){let i=t.override?.call(t,e,t,r,n);if(i!==c3)return i}if(r&&!n){let e=i6(r,t);if(e!==void 0)return e}let i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);let a=t6(e,e.typeName,t),o=typeof a==`function`?r6(a(),t):a;if(o&&a6(e,t,o),t.postProcess){let n=t.postProcess(o,e,t);return i.jsonSchema=o,n}return i.jsonSchema=o,o}var i6=(e,t)=>{switch(t.$refStrategy){case`root`:return{$ref:e.path.join(`/`)};case`relative`:return{$ref:n6(t.currentPath,e.path)};case`none`:case`seen`:return e.path.length<t.currentPath.length&&e.path.every((e,n)=>t.currentPath[n]===e)?(console.warn(`Recursive reference detected at ${t.currentPath.join(`/`)}! Defaulting to any`),d3()):t.$refStrategy===`seen`?d3():void 0}},a6=(e,t,n)=>(e.description&&(n.description=e.description),n),o6=e=>{let t=u3(e),n=t.name===void 0?t.basePath:[...t.basePath,t.definitionPath,t.name];return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}},s6=(e,t)=>{let n=o6(t),r=typeof t==`object`&&t.definitions?Object.entries(t.definitions).reduce((e,[t,r])=>({...e,[t]:r6(r._def,{...n,currentPath:[...n.basePath,n.definitionPath,t]},!0)??d3()}),{}):void 0,i=typeof t==`string`?t:t?.nameStrategy===`title`?void 0:t?.name,a=r6(e._def,i===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,i]},!1)??d3(),o=typeof t==`object`&&t.name!==void 0&&t.nameStrategy===`title`?t.name:void 0;o!==void 0&&(a.title=o);let s=i===void 0?r?{...a,[n.definitionPath]:r}:a:{$ref:[...n.$refStrategy===`relative`?[]:n.basePath,n.definitionPath,i].join(`/`),[n.definitionPath]:{...r,[i]:a}};return s.$schema=`http://json-schema.org/draft-07/schema#`,s},c6=Symbol.for(`vercel.ai.schema`);function l6(e){let t;return()=>(t??=e(),t)}function u6(e,{validate:t}={}){return{[c6]:!0,_type:void 0,get jsonSchema(){return typeof e==`function`&&(e=e()),e},validate:t}}function d6(e){return typeof e==`object`&&!!e&&c6 in e&&e[c6]===!0&&`jsonSchema`in e&&`validate`in e}function f6(e){return e==null?u6({properties:{},additionalProperties:!1}):d6(e)?e:`~standard`in e?e[`~standard`].vendor===`zod`?_6(e):p6(e):e()}function p6(e){return u6(()=>o3(e[`~standard`].jsonSchema.input({target:`draft-07`})),{validate:async t=>{let n=await e[`~standard`].validate(t);return`value`in n?{success:!0,value:n.value}:{success:!1,error:new nY({value:t,cause:n.issues})}}})}function m6(e,t){let n=t?.useReferences??!1;return u6(()=>s6(e,{$refStrategy:n?`root`:`none`}),{validate:async t=>{let n=await e.safeParseAsync(t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function h6(e,t){let n=t?.useReferences??!1;return u6(()=>o3(y1(e,{target:`draft-7`,io:`input`,reused:n?`ref`:`inline`})),{validate:async t=>{let n=await N1(e,t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function g6(e){return`_zod`in e}function _6(e,t){return g6(e)?h6(e,t):m6(e,t)}async function v6({value:e,schema:t,context:n}){let r=await y6({value:e,schema:t,context:n});if(!r.success)throw nY.wrap({value:e,cause:r.error,context:n});return r.value}async function y6({value:e,schema:t,context:n}){let r=f6(t);try{if(r.validate==null)return{success:!0,value:e,rawValue:e};let t=await r.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:nY.wrap({value:e,cause:t.error,context:n}),rawValue:e}}catch(t){return{success:!1,error:nY.wrap({value:e,cause:t,context:n}),rawValue:e}}}async function b6({text:e,schema:t}){try{let n=a3(e);return t==null?{success:!0,value:n,rawValue:n}:await y6({value:n,schema:t})}catch(t){return{success:!1,error:XJ.isInstance(t)?t:new XJ({text:e,cause:t}),rawValue:void 0}}}function x6({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new Y4).pipeThrough(new TransformStream({async transform({data:e},n){e!==`[DONE]`&&n.enqueue(await b6({text:e,schema:t}))}}))}async function S6(e){return typeof e==`function`&&(e=e()),Promise.resolve(e)}var C6=Object.defineProperty,w6=(e,t)=>{for(var n in t)C6(e,n,{get:t[n],enumerable:!0})},T6=`AI_NoObjectGeneratedError`,E6=`vercel.ai.error.${T6}`,D6=Symbol.for(E6),O6,k6=class extends LJ{constructor({message:e=`No object generated.`,cause:t,text:n,response:r,usage:i,finishReason:a}){super({name:T6,message:e,cause:t}),this[O6]=!0,this.text=n,this.response=r,this.usage=i,this.finishReason=a}static isInstance(e){return LJ.hasMarker(e,E6)}};O6=D6;var A6=`AI_UIMessageStreamError`,j6=`vercel.ai.error.${A6}`,M6=Symbol.for(j6),N6,P6=class extends LJ{constructor({chunkType:e,chunkId:t,message:n}){super({name:A6,message:n}),this[N6]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return LJ.hasMarker(e,j6)}};N6=M6;var F6=`6.0.116`,I6=k0([Y(),f2(Uint8Array),f2(ArrayBuffer),l2(e=>globalThis.Buffer?.isBuffer(e)??!1,{message:`Must be a Buffer`})]),L6=s2(()=>k0([v0(),Y(),f0(),g0(),F0(Y(),L6.optional()),w0(L6)])),R6=F0(Y(),F0(Y(),L6.optional())),z6=E0({type:z0(`text`),text:Y(),providerOptions:R6.optional()}),B6=E0({type:z0(`image`),image:k0([I6,f2(URL)]),mediaType:Y().optional(),providerOptions:R6.optional()}),V6=E0({type:z0(`file`),data:k0([I6,f2(URL)]),filename:Y().optional(),mediaType:Y(),providerOptions:R6.optional()}),H6=E0({type:z0(`reasoning`),text:Y(),providerOptions:R6.optional()}),U6=E0({type:z0(`tool-call`),toolCallId:Y(),toolName:Y(),input:b0(),providerOptions:R6.optional(),providerExecuted:g0().optional()}),W6=j0(`type`,[E0({type:z0(`text`),value:Y(),providerOptions:R6.optional()}),E0({type:z0(`json`),value:L6,providerOptions:R6.optional()}),E0({type:z0(`execution-denied`),reason:Y().optional(),providerOptions:R6.optional()}),E0({type:z0(`error-text`),value:Y(),providerOptions:R6.optional()}),E0({type:z0(`error-json`),value:L6,providerOptions:R6.optional()}),E0({type:z0(`content`),value:w0(k0([E0({type:z0(`text`),text:Y(),providerOptions:R6.optional()}),E0({type:z0(`media`),data:Y(),mediaType:Y()}),E0({type:z0(`file-data`),data:Y(),mediaType:Y(),filename:Y().optional(),providerOptions:R6.optional()}),E0({type:z0(`file-url`),url:Y(),providerOptions:R6.optional()}),E0({type:z0(`file-id`),fileId:k0([Y(),F0(Y(),Y())]),providerOptions:R6.optional()}),E0({type:z0(`image-data`),data:Y(),mediaType:Y(),providerOptions:R6.optional()}),E0({type:z0(`image-url`),url:Y(),providerOptions:R6.optional()}),E0({type:z0(`image-file-id`),fileId:k0([Y(),F0(Y(),Y())]),providerOptions:R6.optional()}),E0({type:z0(`custom`),providerOptions:R6.optional()})]))})]),G6=E0({type:z0(`tool-result`),toolCallId:Y(),toolName:Y(),output:W6,providerOptions:R6.optional()}),K6=E0({type:z0(`tool-approval-request`),approvalId:Y(),toolCallId:Y()}),q6=E0({type:z0(`tool-approval-response`),approvalId:Y(),approved:g0(),reason:Y().optional()});k0([E0({role:z0(`system`),content:Y(),providerOptions:R6.optional()}),E0({role:z0(`user`),content:k0([Y(),w0(k0([z6,B6,V6]))]),providerOptions:R6.optional()}),E0({role:z0(`assistant`),content:k0([Y(),w0(k0([z6,V6,H6,U6,G6,K6]))]),providerOptions:R6.optional()}),E0({role:z0(`tool`),content:w0(k0([G6,q6])),providerOptions:R6.optional()})]);function J6(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;let n={...e};for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let i=t[r];if(i===void 0)continue;let a=r in e?e[r]:void 0,o=typeof i==`object`&&!!i&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp),s=typeof a==`object`&&!!a&&!Array.isArray(a)&&!(a instanceof Date)&&!(a instanceof RegExp);o&&s?n[r]=J6(a,i):n[r]=i}return n}w6({},{array:()=>$6,choice:()=>e8,json:()=>t8,object:()=>Q6,text:()=>Z6});function Y6(e){let t=[`ROOT`],n=-1,r=null;function i(e,i,a){switch(e){case`"`:n=i,t.pop(),t.push(a),t.push(`INSIDE_STRING`);break;case`f`:case`t`:case`n`:n=i,r=i,t.pop(),t.push(a),t.push(`INSIDE_LITERAL`);break;case`-`:t.pop(),t.push(a),t.push(`INSIDE_NUMBER`);break;case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=i,t.pop(),t.push(a),t.push(`INSIDE_NUMBER`);break;case`{`:n=i,t.pop(),t.push(a),t.push(`INSIDE_OBJECT_START`);break;case`[`:n=i,t.pop(),t.push(a),t.push(`INSIDE_ARRAY_START`);break}}function a(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_COMMA`);break;case`}`:n=r,t.pop();break}}function o(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`);break;case`]`:n=r,t.pop();break}}for(let s=0;s<e.length;s++){let c=e[s];switch(t[t.length-1]){case`ROOT`:i(c,s,`FINISH`);break;case`INSIDE_OBJECT_START`:switch(c){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`);break;case`}`:n=s,t.pop();break}break;case`INSIDE_OBJECT_AFTER_COMMA`:switch(c){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`);break}break;case`INSIDE_OBJECT_KEY`:switch(c){case`"`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_KEY`);break}break;case`INSIDE_OBJECT_AFTER_KEY`:switch(c){case`:`:t.pop(),t.push(`INSIDE_OBJECT_BEFORE_VALUE`);break}break;case`INSIDE_OBJECT_BEFORE_VALUE`:i(c,s,`INSIDE_OBJECT_AFTER_VALUE`);break;case`INSIDE_OBJECT_AFTER_VALUE`:a(c,s);break;case`INSIDE_STRING`:switch(c){case`"`:t.pop(),n=s;break;case`\\`:t.push(`INSIDE_STRING_ESCAPE`);break;default:n=s}break;case`INSIDE_ARRAY_START`:switch(c){case`]`:n=s,t.pop();break;default:n=s,i(c,s,`INSIDE_ARRAY_AFTER_VALUE`);break}break;case`INSIDE_ARRAY_AFTER_VALUE`:switch(c){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`);break;case`]`:n=s,t.pop();break;default:n=s;break}break;case`INSIDE_ARRAY_AFTER_COMMA`:i(c,s,`INSIDE_ARRAY_AFTER_VALUE`);break;case`INSIDE_STRING_ESCAPE`:t.pop(),n=s;break;case`INSIDE_NUMBER`:switch(c){case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=s;break;case`e`:case`E`:case`-`:case`.`:break;case`,`:t.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&o(c,s),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&a(c,s);break;case`}`:t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&a(c,s);break;case`]`:t.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&o(c,s);break;default:t.pop();break}break;case`INSIDE_LITERAL`:{let i=e.substring(r,s+1);!`false`.startsWith(i)&&!`true`.startsWith(i)&&!`null`.startsWith(i)?(t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`?a(c,s):t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&o(c,s)):n=s;break}}}let s=e.slice(0,n+1);for(let n=t.length-1;n>=0;n--)switch(t[n]){case`INSIDE_STRING`:s+=`"`;break;case`INSIDE_OBJECT_KEY`:case`INSIDE_OBJECT_AFTER_KEY`:case`INSIDE_OBJECT_AFTER_COMMA`:case`INSIDE_OBJECT_START`:case`INSIDE_OBJECT_BEFORE_VALUE`:case`INSIDE_OBJECT_AFTER_VALUE`:s+=`}`;break;case`INSIDE_ARRAY_START`:case`INSIDE_ARRAY_AFTER_COMMA`:case`INSIDE_ARRAY_AFTER_VALUE`:s+=`]`;break;case`INSIDE_LITERAL`:{let t=e.substring(r,e.length);`true`.startsWith(t)?s+=`true`.slice(t.length):`false`.startsWith(t)?s+=`false`.slice(t.length):`null`.startsWith(t)&&(s+=`null`.slice(t.length))}}return s}async function X6(e){if(e===void 0)return{value:void 0,state:`undefined-input`};let t=await b6({text:e});return t.success?{value:t.value,state:`successful-parse`}:(t=await b6({text:Y6(e)}),t.success?{value:t.value,state:`repaired-parse`}:{value:void 0,state:`failed-parse`})}var Z6=()=>({name:`text`,responseFormat:Promise.resolve({type:`text`}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),Q6=({schema:e,name:t,description:n})=>{let r=f6(e);return{name:`object`,responseFormat:S6(r.jsonSchema).then(e=>({type:`json`,schema:e,...t!=null&&{name:t},...n!=null&&{description:n}})),async parseCompleteOutput({text:e},t){let n=await b6({text:e});if(!n.success)throw new k6({message:`No object generated: could not parse the response.`,cause:n.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});let i=await y6({value:n.value,schema:r});if(!i.success)throw new k6({message:`No object generated: response did not match schema.`,cause:i.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});return i.value},async parsePartialOutput({text:e}){let t=await X6(e);switch(t.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:return{partial:t.value}}},createElementStreamTransform(){}}},$6=({element:e,name:t,description:n})=>{let r=f6(e);return{name:`array`,responseFormat:S6(r.jsonSchema).then(e=>{let{$schema:r,...i}=e;return{type:`json`,schema:{$schema:`http://json-schema.org/draft-07/schema#`,type:`object`,properties:{elements:{type:`array`,items:i}},required:[`elements`],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}}),async parseCompleteOutput({text:e},t){let n=await b6({text:e});if(!n.success)throw new k6({message:`No object generated: could not parse the response.`,cause:n.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});let i=n.value;if(typeof i!=`object`||!i||!(`elements`in i)||!Array.isArray(i.elements))throw new k6({message:`No object generated: response did not match schema.`,cause:new nY({value:i,cause:`response must be an object with an elements array`}),text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});for(let n of i.elements){let i=await y6({value:n,schema:r});if(!i.success)throw new k6({message:`No object generated: response did not match schema.`,cause:i.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason})}return i.elements},async parsePartialOutput({text:e}){let t=await X6(e);switch(t.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:{let e=t.value;if(typeof e!=`object`||!e||!(`elements`in e)||!Array.isArray(e.elements))return;let n=t.state===`repaired-parse`&&e.elements.length>0?e.elements.slice(0,-1):e.elements,i=[];for(let e of n){let t=await y6({value:e,schema:r});t.success&&i.push(t.value)}return{partial:i}}}},createElementStreamTransform(){let e=0;return new TransformStream({transform({partialOutput:t},n){if(t!=null)for(;e<t.length;e++)n.enqueue(t[e])}})}}},e8=({options:e,name:t,description:n})=>({name:`choice`,responseFormat:Promise.resolve({type:`json`,schema:{$schema:`http://json-schema.org/draft-07/schema#`,type:`object`,properties:{result:{type:`string`,enum:e}},required:[`result`],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}),async parseCompleteOutput({text:t},n){let r=await b6({text:t});if(!r.success)throw new k6({message:`No object generated: could not parse the response.`,cause:r.error,text:t,response:n.response,usage:n.usage,finishReason:n.finishReason});let i=r.value;if(typeof i!=`object`||!i||!(`result`in i)||typeof i.result!=`string`||!e.includes(i.result))throw new k6({message:`No object generated: response did not match schema.`,cause:new nY({value:i,cause:`response must be an object that contains a choice value.`}),text:t,response:n.response,usage:n.usage,finishReason:n.finishReason});return i.result},async parsePartialOutput({text:t}){let n=await X6(t);switch(n.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:{let t=n.value;if(typeof t!=`object`||!t||!(`result`in t)||typeof t.result!=`string`)return;let r=e.filter(e=>e.startsWith(t.result));return n.state===`successful-parse`?r.includes(t.result)?{partial:t.result}:void 0:r.length===1?{partial:r[0]}:void 0}}},createElementStreamTransform(){}}),t8=({name:e,description:t}={})=>({name:`json`,responseFormat:Promise.resolve({type:`json`,...e!=null&&{name:e},...t!=null&&{description:t}}),async parseCompleteOutput({text:e},t){let n=await b6({text:e});if(!n.success)throw new k6({message:`No object generated: could not parse the response.`,cause:n.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});return n.value},async parsePartialOutput({text:e}){let t=await X6(e);switch(t.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:return t.value===void 0?void 0:{partial:t.value}}},createElementStreamTransform(){}});X4({prefix:`aitxt`,size:24});var n8=l6(()=>_6(k0([D0({type:z0(`text-start`),id:Y(),providerMetadata:R6.optional()}),D0({type:z0(`text-delta`),id:Y(),delta:Y(),providerMetadata:R6.optional()}),D0({type:z0(`text-end`),id:Y(),providerMetadata:R6.optional()}),D0({type:z0(`error`),errorText:Y()}),D0({type:z0(`tool-input-start`),toolCallId:Y(),toolName:Y(),providerExecuted:g0().optional(),providerMetadata:R6.optional(),dynamic:g0().optional(),title:Y().optional()}),D0({type:z0(`tool-input-delta`),toolCallId:Y(),inputTextDelta:Y()}),D0({type:z0(`tool-input-available`),toolCallId:Y(),toolName:Y(),input:b0(),providerExecuted:g0().optional(),providerMetadata:R6.optional(),dynamic:g0().optional(),title:Y().optional()}),D0({type:z0(`tool-input-error`),toolCallId:Y(),toolName:Y(),input:b0(),providerExecuted:g0().optional(),providerMetadata:R6.optional(),dynamic:g0().optional(),errorText:Y(),title:Y().optional()}),D0({type:z0(`tool-approval-request`),approvalId:Y(),toolCallId:Y()}),D0({type:z0(`tool-output-available`),toolCallId:Y(),output:b0(),providerExecuted:g0().optional(),dynamic:g0().optional(),preliminary:g0().optional()}),D0({type:z0(`tool-output-error`),toolCallId:Y(),errorText:Y(),providerExecuted:g0().optional(),dynamic:g0().optional()}),D0({type:z0(`tool-output-denied`),toolCallId:Y()}),D0({type:z0(`reasoning-start`),id:Y(),providerMetadata:R6.optional()}),D0({type:z0(`reasoning-delta`),id:Y(),delta:Y(),providerMetadata:R6.optional()}),D0({type:z0(`reasoning-end`),id:Y(),providerMetadata:R6.optional()}),D0({type:z0(`source-url`),sourceId:Y(),url:Y(),title:Y().optional(),providerMetadata:R6.optional()}),D0({type:z0(`source-document`),sourceId:Y(),mediaType:Y(),title:Y(),filename:Y().optional(),providerMetadata:R6.optional()}),D0({type:z0(`file`),url:Y(),mediaType:Y(),providerMetadata:R6.optional()}),D0({type:l2(e=>typeof e==`string`&&e.startsWith(`data-`),{message:`Type must start with "data-"`}),id:Y().optional(),data:b0(),transient:g0().optional()}),D0({type:z0(`start-step`)}),D0({type:z0(`finish-step`)}),D0({type:z0(`start`),messageId:Y().optional(),messageMetadata:b0().optional()}),D0({type:z0(`finish`),finishReason:L0([`stop`,`length`,`content-filter`,`tool-calls`,`error`,`other`]).optional(),messageMetadata:b0().optional()}),D0({type:z0(`abort`),reason:Y().optional()}),D0({type:z0(`message-metadata`),messageMetadata:b0()})])));function r8(e){return e.type.startsWith(`data-`)}function i8(e){return e.type.startsWith(`tool-`)}function a8(e){return e.type===`dynamic-tool`}function o8(e){return i8(e)||a8(e)}function s8(e){return e.type.split(`-`).slice(1).join(`-`)}function c8({lastMessage:e,messageId:t}){return{message:e?.role===`assistant`?e:{id:t,metadata:void 0,role:`assistant`,parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function l8({stream:e,messageMetadataSchema:t,dataPartSchemas:n,runUpdateMessageJob:r,onError:i,onToolCall:a,onData:o}){return e.pipeThrough(new TransformStream({async transform(e,s){await r(async({state:r,write:c})=>{function l(e){let t=r.message.parts.filter(o8).find(t=>t.toolCallId===e);if(t==null)throw new P6({chunkType:`tool-invocation`,chunkId:e,message:`No tool invocation found for tool call ID "${e}".`});return t}function u(e){let t=r.message.parts.find(t=>i8(t)&&t.toolCallId===e.toolCallId),n=e,i=t;t==null?r.message.parts.push({type:`tool-${e.toolName}`,toolCallId:e.toolCallId,state:e.state,title:e.title,input:n.input,output:n.output,rawInput:n.rawInput,errorText:n.errorText,providerExecuted:n.providerExecuted,preliminary:n.preliminary,...n.providerMetadata==null?{}:{callProviderMetadata:n.providerMetadata}}):(t.state=e.state,i.input=n.input,i.output=n.output,i.errorText=n.errorText,i.rawInput=n.rawInput,i.preliminary=n.preliminary,e.title!==void 0&&(i.title=e.title),i.providerExecuted=n.providerExecuted??t.providerExecuted,n.providerMetadata!=null&&(t.callProviderMetadata=n.providerMetadata))}function d(e){let t=r.message.parts.find(t=>t.type===`dynamic-tool`&&t.toolCallId===e.toolCallId),n=e,i=t;t==null?r.message.parts.push({type:`dynamic-tool`,toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:n.input,output:n.output,errorText:n.errorText,preliminary:n.preliminary,providerExecuted:n.providerExecuted,title:e.title,...n.providerMetadata==null?{}:{callProviderMetadata:n.providerMetadata}}):(t.state=e.state,i.toolName=e.toolName,i.input=n.input,i.output=n.output,i.errorText=n.errorText,i.rawInput=n.rawInput??i.rawInput,i.preliminary=n.preliminary,e.title!==void 0&&(i.title=e.title),i.providerExecuted=n.providerExecuted??t.providerExecuted,n.providerMetadata!=null&&(t.callProviderMetadata=n.providerMetadata))}async function f(e){if(e!=null){let n=r.message.metadata==null?e:J6(r.message.metadata,e);t!=null&&await v6({value:n,schema:t,context:{field:`message.metadata`,entityId:r.message.id}}),r.message.metadata=n}}switch(e.type){case`text-start`:{let t={type:`text`,text:``,providerMetadata:e.providerMetadata,state:`streaming`};r.activeTextParts[e.id]=t,r.message.parts.push(t),c();break}case`text-delta`:{let t=r.activeTextParts[e.id];if(t==null)throw new P6({chunkType:`text-delta`,chunkId:e.id,message:`Received text-delta for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});t.text+=e.delta,t.providerMetadata=e.providerMetadata??t.providerMetadata,c();break}case`text-end`:{let t=r.activeTextParts[e.id];if(t==null)throw new P6({chunkType:`text-end`,chunkId:e.id,message:`Received text-end for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});t.state=`done`,t.providerMetadata=e.providerMetadata??t.providerMetadata,delete r.activeTextParts[e.id],c();break}case`reasoning-start`:{let t={type:`reasoning`,text:``,providerMetadata:e.providerMetadata,state:`streaming`};r.activeReasoningParts[e.id]=t,r.message.parts.push(t),c();break}case`reasoning-delta`:{let t=r.activeReasoningParts[e.id];if(t==null)throw new P6({chunkType:`reasoning-delta`,chunkId:e.id,message:`Received reasoning-delta for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});t.text+=e.delta,t.providerMetadata=e.providerMetadata??t.providerMetadata,c();break}case`reasoning-end`:{let t=r.activeReasoningParts[e.id];if(t==null)throw new P6({chunkType:`reasoning-end`,chunkId:e.id,message:`Received reasoning-end for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});t.providerMetadata=e.providerMetadata??t.providerMetadata,t.state=`done`,delete r.activeReasoningParts[e.id],c();break}case`file`:r.message.parts.push({type:`file`,mediaType:e.mediaType,url:e.url,...e.providerMetadata==null?{}:{providerMetadata:e.providerMetadata}}),c();break;case`source-url`:r.message.parts.push({type:`source-url`,sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),c();break;case`source-document`:r.message.parts.push({type:`source-document`,sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),c();break;case`tool-input-start`:{let t=r.message.parts.filter(i8);r.partialToolCalls[e.toolCallId]={text:``,toolName:e.toolName,index:t.length,dynamic:e.dynamic,title:e.title},e.dynamic?d({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-streaming`,input:void 0,providerExecuted:e.providerExecuted,title:e.title,providerMetadata:e.providerMetadata}):u({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-streaming`,input:void 0,providerExecuted:e.providerExecuted,title:e.title,providerMetadata:e.providerMetadata}),c();break}case`tool-input-delta`:{let t=r.partialToolCalls[e.toolCallId];if(t==null)throw new P6({chunkType:`tool-input-delta`,chunkId:e.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${e.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});t.text+=e.inputTextDelta;let{value:n}=await X6(t.text);t.dynamic?d({toolCallId:e.toolCallId,toolName:t.toolName,state:`input-streaming`,input:n,title:t.title}):u({toolCallId:e.toolCallId,toolName:t.toolName,state:`input-streaming`,input:n,title:t.title}),c();break}case`tool-input-available`:e.dynamic?d({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-available`,input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title}):u({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-available`,input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title}),c(),a&&!e.providerExecuted&&await a({toolCall:e});break;case`tool-input-error`:{let t=r.message.parts.filter(o8).find(t=>t.toolCallId===e.toolCallId);(t==null?e.dynamic:t.type===`dynamic-tool`)?d({toolCallId:e.toolCallId,toolName:e.toolName,state:`output-error`,input:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}):u({toolCallId:e.toolCallId,toolName:e.toolName,state:`output-error`,input:void 0,rawInput:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),c();break}case`tool-approval-request`:{let t=l(e.toolCallId);t.state=`approval-requested`,t.approval={id:e.approvalId},c();break}case`tool-output-denied`:{let t=l(e.toolCallId);t.state=`output-denied`,c();break}case`tool-output-available`:{let t=l(e.toolCallId);t.type===`dynamic-tool`?d({toolCallId:e.toolCallId,toolName:t.toolName,state:`output-available`,input:t.input,output:e.output,preliminary:e.preliminary,providerExecuted:e.providerExecuted,title:t.title}):u({toolCallId:e.toolCallId,toolName:s8(t),state:`output-available`,input:t.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary,title:t.title}),c();break}case`tool-output-error`:{let t=l(e.toolCallId);t.type===`dynamic-tool`?d({toolCallId:e.toolCallId,toolName:t.toolName,state:`output-error`,input:t.input,errorText:e.errorText,providerExecuted:e.providerExecuted,title:t.title}):u({toolCallId:e.toolCallId,toolName:s8(t),state:`output-error`,input:t.input,rawInput:t.rawInput,errorText:e.errorText,providerExecuted:e.providerExecuted,title:t.title}),c();break}case`start-step`:r.message.parts.push({type:`step-start`});break;case`finish-step`:r.activeTextParts={},r.activeReasoningParts={};break;case`start`:e.messageId!=null&&(r.message.id=e.messageId),await f(e.messageMetadata),(e.messageId!=null||e.messageMetadata!=null)&&c();break;case`finish`:e.finishReason!=null&&(r.finishReason=e.finishReason),await f(e.messageMetadata),e.messageMetadata!=null&&c();break;case`message-metadata`:await f(e.messageMetadata),e.messageMetadata!=null&&c();break;case`error`:i?.(Error(e.errorText));break;default:if(r8(e)){if(n?.[e.type]!=null){let t=r.message.parts.findIndex(t=>`id`in t&&`data`in t&&t.id===e.id&&t.type===e.type),i=t>=0?t:r.message.parts.length;await v6({value:e.data,schema:n[e.type],context:{field:`message.parts[${i}].data`,entityName:e.type,entityId:e.id}})}let t=e;if(t.transient){o?.(t);break}let i=t.id==null?void 0:r.message.parts.find(e=>t.type===e.type&&t.id===e.id);i==null?r.message.parts.push(t):i.data=t.data,o?.(t),c()}}s.enqueue(e)})}}))}async function u8({stream:e,onError:t}){let n=e.getReader();try{for(;;){let{done:e}=await n.read();if(e)break}}catch(e){t?.(e)}finally{n.releaseLock()}}X4({prefix:`aitxt`,size:24}),X4({prefix:`aiobj`,size:24});var d8=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,n)=>{this.queue.push(async()=>{try{await e(),t()}catch(e){n(e)}}),this.processQueue()})}};X4({prefix:`aiobj`,size:24});async function f8(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw Error(`FileList is not supported in the current environment`);return Promise.all(Array.from(e).map(async e=>{let{name:t,type:n}=e;return{type:`file`,mediaType:n,filename:t,url:await new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{t(e.target?.result)},r.onerror=e=>n(e),r.readAsDataURL(e)})}}))}var p8=class{constructor({api:e=`/api/chat`,credentials:t,headers:n,body:r,fetch:i,prepareSendMessagesRequest:a,prepareReconnectToStreamRequest:o}){this.api=e,this.credentials=t,this.headers=n,this.body=r,this.fetch=i,this.prepareSendMessagesRequest=a,this.prepareReconnectToStreamRequest=o}async sendMessages({abortSignal:e,...t}){let n=await S6(this.body),r=await S6(this.headers),i=await S6(this.credentials),a={...$4(r),...$4(t.headers)},o=await this.prepareSendMessagesRequest?.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...n,...t.body},headers:a,credentials:i,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId}),s=o?.api??this.api,c=o?.headers===void 0?a:$4(o.headers),l=o?.body===void 0?{...n,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId}:o.body,u=o?.credentials??i,d=await(this.fetch??globalThis.fetch)(s,{method:`POST`,headers:e3({"Content-Type":`application/json`,...c},`ai-sdk/${F6}`,Q4()),body:JSON.stringify(l),credentials:u,signal:e});if(!d.ok)throw Error(await d.text()??`Failed to fetch the chat response.`);if(!d.body)throw Error(`The response body is empty.`);return this.processResponseStream(d.body)}async reconnectToStream(e){let t=await S6(this.body),n=await S6(this.headers),r=await S6(this.credentials),i={...$4(n),...$4(e.headers)},a=await this.prepareReconnectToStreamRequest?.call(this,{api:this.api,id:e.chatId,body:{...t,...e.body},headers:i,credentials:r,requestMetadata:e.metadata}),o=a?.api??`${this.api}/${e.chatId}/stream`,s=a?.headers===void 0?i:$4(a.headers),c=a?.credentials??r,l=await(this.fetch??globalThis.fetch)(o,{method:`GET`,headers:e3(s,`ai-sdk/${F6}`,Q4()),credentials:c});if(l.status===204)return null;if(!l.ok)throw Error(await l.text()??`Failed to fetch the chat response.`);if(!l.body)throw Error(`The response body is empty.`);return this.processResponseStream(l.body)}},m8=class extends p8{constructor(e={}){super(e)}processResponseStream(e){return x6({stream:e,schema:n8}).pipeThrough(new TransformStream({async transform(e,t){if(!e.success)throw e.error;t.enqueue(e.value)}}))}},h8=class{constructor({generateId:e=Z4,id:t=e(),transport:n=new m8,messageMetadataSchema:r,dataPartSchemas:i,state:a,onError:o,onToolCall:s,onFinish:c,onData:l,sendAutomaticallyWhen:u}){this.activeResponse=void 0,this.jobExecutor=new d8,this.sendMessage=async(e,t)=>{if(e==null){await this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,...t});return}let n;if(n=`text`in e||`files`in e?{parts:[...Array.isArray(e.files)?e.files:await f8(e.files),...`text`in e&&e.text!=null?[{type:`text`,text:e.text}]:[]]}:e,e.messageId!=null){let t=this.state.messages.findIndex(t=>t.id===e.messageId);if(t===-1)throw Error(`message with id ${e.messageId} not found`);if(this.state.messages[t].role!==`user`)throw Error(`message with id ${e.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,t+1),this.state.replaceMessage(t,{...n,id:e.messageId,role:n.role??`user`,metadata:e.metadata})}else this.state.pushMessage({...n,id:n.id??this.generateId(),role:n.role??`user`,metadata:e.metadata});await this.makeRequest({trigger:`submit-message`,messageId:e.messageId,...t})},this.regenerate=async({messageId:e,...t}={})=>{let n=e==null?this.state.messages.length-1:this.state.messages.findIndex(t=>t.id===e);if(n===-1)throw Error(`message ${e} not found`);this.state.messages=this.state.messages.slice(0,this.messages[n].role===`assistant`?n:n+1),await this.makeRequest({trigger:`regenerate-message`,messageId:e,...t})},this.resumeStream=async(e={})=>{await this.makeRequest({trigger:`resume-stream`,...e})},this.clearError=()=>{this.status===`error`&&(this.state.error=void 0,this.setStatus({status:`ready`}))},this.addToolApprovalResponse=async({id:e,approved:t,reason:n})=>this.jobExecutor.run(async()=>{let r=this.state.messages,i=r[r.length-1],a=r=>o8(r)&&r.state===`approval-requested`&&r.approval.id===e?{...r,state:`approval-responded`,approval:{id:e,approved:t,reason:n}}:r;this.state.replaceMessage(r.length-1,{...i,parts:i.parts.map(a)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(a)),this.status!==`streaming`&&this.status!==`submitted`&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(e=>{e&&this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id})})}),this.addToolOutput=async({state:e=`output-available`,tool:t,toolCallId:n,output:r,errorText:i})=>this.jobExecutor.run(async()=>{let t=this.state.messages,a=t[t.length-1],o=t=>o8(t)&&t.toolCallId===n?{...t,state:e,output:r,errorText:i}:t;this.state.replaceMessage(t.length-1,{...a,parts:a.parts.map(o)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(o)),this.status!==`streaming`&&this.status!==`submitted`&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(e=>{e&&this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id})})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{this.status!==`streaming`&&this.status!==`submitted`||this.activeResponse?.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=n,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=i,this.state=a,this.onError=o,this.onToolCall=s,this.onFinish=c,this.onData=l,this.sendAutomaticallyWhen=u}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;let e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&typeof e==`object`&&`then`in e?await e:e}async makeRequest({trigger:e,metadata:t,headers:n,body:r,messageId:i}){var a;let o;if(e===`resume-stream`)try{let e=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:n,body:r});if(e==null)return;o=e}catch(e){this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:`error`,error:e});return}this.setStatus({status:`submitted`,error:void 0});let s=this.lastMessage,c=!1,l=!1,u=!1;try{let a={state:c8({lastMessage:this.state.snapshot(s),messageId:this.generateId()}),abortController:new AbortController};a.abortController.signal.addEventListener(`abort`,()=>{c=!0}),this.activeResponse=a;let l;l=e===`resume-stream`?o:await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:a.abortController.signal,metadata:t,headers:n,body:r,trigger:e,messageId:i}),await u8({stream:l8({stream:l,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:e=>this.jobExecutor.run(()=>e({state:a.state,write:()=>{this.setStatus({status:`streaming`}),a.state.message.id===this.lastMessage?.id?this.state.replaceMessage(this.state.messages.length-1,a.state.message):this.state.pushMessage(a.state.message)}})),onError:e=>{throw e}}),onError:e=>{throw e}}),this.setStatus({status:`ready`})}catch(e){if(c||e.name===`AbortError`)return c=!0,this.setStatus({status:`ready`}),null;u=!0,e instanceof TypeError&&(e.message.toLowerCase().includes(`fetch`)||e.message.toLowerCase().includes(`network`))&&(l=!0),this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:`error`,error:e})}finally{try{(a=this.onFinish)==null||a.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:c,isDisconnect:l,isError:u,finishReason:this.activeResponse?.state.finishReason})}catch(e){console.error(e)}this.activeResponse=void 0}!u&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,metadata:t,headers:n,body:r})}},g8=t(n(((e,t)=>{function n(e,t){if(typeof e!=`function`)throw TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let n,r=0;return function(...i){clearTimeout(n);let a=Date.now(),o=t-(a-r);o<=0?(r=a,e.apply(this,i)):n=setTimeout(()=>{r=Date.now(),e.apply(this,i)},o)}}t.exports=n}))(),1),_8=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},v8=(e,t,n)=>(_8(e,t,`read from private field`),n?n.call(e):t.get(e)),y8=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},b8=(e,t,n,r)=>(_8(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n);function x8(e,t){return t==null?e:(0,g8.default)(e,t)}var S8,C8,w8,T8,E8,D8,O8,k8,A8,j8=class{constructor(e=[]){y8(this,S8,void 0),y8(this,C8,`ready`),y8(this,w8,void 0),y8(this,T8,new Set),y8(this,E8,new Set),y8(this,D8,new Set),this.pushMessage=e=>{b8(this,S8,v8(this,S8).concat(e)),v8(this,O8).call(this)},this.popMessage=()=>{b8(this,S8,v8(this,S8).slice(0,-1)),v8(this,O8).call(this)},this.replaceMessage=(e,t)=>{b8(this,S8,[...v8(this,S8).slice(0,e),this.snapshot(t),...v8(this,S8).slice(e+1)]),v8(this,O8).call(this)},this.snapshot=e=>structuredClone(e),this[`~registerMessagesCallback`]=(e,t)=>{let n=t?x8(e,t):e;return v8(this,T8).add(n),()=>{v8(this,T8).delete(n)}},this[`~registerStatusCallback`]=e=>(v8(this,E8).add(e),()=>{v8(this,E8).delete(e)}),this[`~registerErrorCallback`]=e=>(v8(this,D8).add(e),()=>{v8(this,D8).delete(e)}),y8(this,O8,()=>{v8(this,T8).forEach(e=>e())}),y8(this,k8,()=>{v8(this,E8).forEach(e=>e())}),y8(this,A8,()=>{v8(this,D8).forEach(e=>e())}),b8(this,S8,e)}get status(){return v8(this,C8)}set status(e){b8(this,C8,e),v8(this,k8).call(this)}get error(){return v8(this,w8)}set error(e){b8(this,w8,e),v8(this,A8).call(this)}get messages(){return v8(this,S8)}set messages(e){b8(this,S8,[...e]),v8(this,O8).call(this)}};S8=new WeakMap,C8=new WeakMap,w8=new WeakMap,T8=new WeakMap,E8=new WeakMap,D8=new WeakMap,O8=new WeakMap,k8=new WeakMap,A8=new WeakMap;var M8,N8=class extends h8{constructor({messages:e,...t}){let n=new j8(e);super({...t,state:n}),y8(this,M8,void 0),this[`~registerMessagesCallback`]=(e,t)=>v8(this,M8)[`~registerMessagesCallback`](e,t),this[`~registerStatusCallback`]=e=>v8(this,M8)[`~registerStatusCallback`](e),this[`~registerErrorCallback`]=e=>v8(this,M8)[`~registerErrorCallback`](e),b8(this,M8,n)}};M8=new WeakMap;function P8({experimental_throttle:e,resume:t=!1,...n}={}){let r=(0,k.useRef)(`chat`in n?{}:{onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});`chat`in n||(r.current={onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});let i={...n,onToolCall:e=>{var t;return(t=r.current).onToolCall?.call(t,e)},onData:e=>{var t;return(t=r.current).onData?.call(t,e)},onFinish:e=>{var t;return(t=r.current).onFinish?.call(t,e)},onError:e=>{var t;return(t=r.current).onError?.call(t,e)},sendAutomaticallyWhen:e=>{var t;return(t=r.current).sendAutomaticallyWhen?.call(t,e)??!1}},a=(0,k.useRef)(`chat`in n?n.chat:new N8(i));(`chat`in n&&n.chat!==a.current||`id`in n&&a.current.id!==n.id)&&(a.current=`chat`in n?n.chat:new N8(i));let o=(0,k.useSyncExternalStore)((0,k.useCallback)(t=>a.current[`~registerMessagesCallback`](t,e),[e,a.current.id]),()=>a.current.messages,()=>a.current.messages),s=(0,k.useSyncExternalStore)(a.current[`~registerStatusCallback`],()=>a.current.status,()=>a.current.status),c=(0,k.useSyncExternalStore)(a.current[`~registerErrorCallback`],()=>a.current.error,()=>a.current.error),l=(0,k.useCallback)(e=>{typeof e==`function`&&(e=e(a.current.messages)),a.current.messages=e},[a]);return(0,k.useEffect)(()=>{t&&a.current.resumeStream()},[t,a]),{id:a.current.id,messages:o,setMessages:l,sendMessage:a.current.sendMessage,regenerate:a.current.regenerate,clearError:a.current.clearError,stop:a.current.stop,error:c,resumeStream:a.current.resumeStream,status:s,addToolResult:a.current.addToolOutput,addToolOutput:a.current.addToolOutput,addToolApprovalResponse:a.current.addToolApprovalResponse}}function F8(e,{target:t=document.body}={}){if(typeof e!=`string`)throw TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);let n=document.createElement(`textarea`),r=document.activeElement;n.value=e,n.setAttribute(`readonly`,``),n.style.all=`unset`,n.style.contain=`strict`,n.style.position=`absolute`,n.style.left=`-9999px`,n.style.width=`2em`,n.style.height=`2em`,n.style.padding=`0`,n.style.border=`none`,n.style.outline=`none`,n.style.boxShadow=`none`,n.style.background=`transparent`,n.style.fontSize=`12pt`,n.style.whiteSpace=`pre`;let i=document.getSelection(),a=i.rangeCount>0&&i.getRangeAt(0);t.append(n),n.select(),n.selectionStart=0,n.selectionEnd=e.length;let o=!1;try{o=document.execCommand(`copy`)}catch{}return n.remove(),a&&(i.removeAllRanges(),i.addRange(a)),r&&r.focus(),o}var I8=DC({forgiving:!0}),L8=Object.fromEntries(Ay.flatMap(e=>(e.aliases??[]).map(t=>[t,e.id]))),R8=new Set(Object.keys(Ny)),z8=e=>{let t=e.trim().toLowerCase();return L8[t]||(R8.has(t),t)},B8=new Map,V8=new Map,H8=new Map,U8=e=>typeof e==`string`?e:e.name??`custom`,W8=(e,t)=>`${e}-${U8(t[0])}-${U8(t[1])}`,G8=(e,t,n)=>{let r=e.slice(0,100),i=e.length>100?e.slice(-100):``;return`${t}:${n[0]}:${n[1]}:${e.length}:${r}:${i}`},K8=(e,t)=>{let n=W8(e,t);if(B8.has(n))return B8.get(n);let r=ob({themes:t,langs:[e],engine:I8});return B8.set(n,r),r};function q8(e={}){let t=e.themes??[`github-light`,`github-dark`];return{name:`shiki`,type:`code-highlighter`,supportsLanguage(e){let t=z8(e);return R8.has(t)},getSupportedLanguages(){return Array.from(R8)},getThemes(){return t},highlight({code:e,language:t,themes:n},r){let i=z8(t),a=[U8(n[0]),U8(n[1])],o=G8(e,i,a);return V8.has(o)?V8.get(o):(r&&(H8.has(o)||H8.set(o,new Set),H8.get(o).add(r)),K8(i,n).then(t=>{let n=t.getLoadedLanguages().includes(i)?i:`text`,r=t.codeToTokens(e,{lang:n,themes:{light:a[0],dark:a[1]}});V8.set(o,r);let s=H8.get(o);if(s){for(let e of s)e(r);H8.delete(o)}}).catch(e=>{console.error(`[Streamdown Code] Failed to highlight code:`,e),H8.delete(o)}),null)}}}var J8=q8();function Y8(e={}){return{name:`katex`,type:`math`,remarkPlugin:[vA,{singleDollarTextMath:e.singleDollarTextMath??!1}],rehypePlugin:[oA,{errorColor:e.errorColor??`var(--color-muted-foreground)`}],getStyles(){return`katex/dist/katex.min.css`}}}var X8=Y8(),Z8=(0,k.memo)(({children:e,as:t=`p`,className:n,duration:r=2,spread:i=2})=>{let a=$f.create(t),o=(0,k.useMemo)(()=>(e?.length??0)*i,[e,i]);return(0,A.jsx)(a,{animate:{backgroundPosition:`0% center`},className:p(`relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent`,`[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]`,n),initial:{backgroundPosition:`100% center`},style:{"--spread":`${o}px`,backgroundImage:`var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))`},transition:{repeat:1/0,duration:r,ease:`linear`},children:e})});function Q8({...e}){return(0,A.jsx)(jF,{"data-slot":`collapsible`,...e})}function $8({...e}){return(0,A.jsx)(EF,{"data-slot":`collapsible-trigger`,...e})}function e5({className:e,children:t,...n}){return(0,A.jsx)(OF,{"data-slot":`collapsible-content`,className:p(`overflow-hidden data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up`,e),...n,children:t})}var t5=(0,k.createContext)(null),n5=()=>{let e=(0,k.use)(t5);if(!e)throw Error(`Reasoning components must be used within Reasoning`);return e},r5=1e3,i5=1e3,a5=(0,k.memo)(({className:e,isStreaming:t=!1,open:n,defaultOpen:r=!0,onOpenChange:i,duration:a,children:o,...s})=>{let[c,l]=lF({prop:n,defaultProp:r,onChange:i}),[u,d]=lF({prop:a,defaultProp:void 0}),[f,m]=(0,k.useState)(!1),[h,g]=(0,k.useState)(null);return(0,k.useEffect)(()=>{t?h===null&&g(Date.now()):h!==null&&(d(Math.ceil((Date.now()-h)/i5)),g(null))},[t,h,d]),(0,k.useEffect)(()=>{if(r&&!t&&c&&!f){let e=setTimeout(()=>{l(!1),m(!0)},r5);return()=>clearTimeout(e)}},[t,c,r,l,f]),(0,A.jsx)(t5,{value:{isStreaming:t,isOpen:c,setIsOpen:l,duration:u},children:(0,A.jsx)(Q8,{className:p(`not-prose mb-4`,e),onOpenChange:e=>{l(e)},open:c,...s,children:o})})}),o5=(e,t)=>e||t===0?(0,A.jsx)(Z8,{duration:1,children:`Thinking...`}):t===void 0?(0,A.jsx)(`p`,{children:`Thought for a few seconds`}):(0,A.jsxs)(`p`,{children:[`Thought for `,t,` seconds`]}),s5=(0,k.memo)(({className:e,children:t,getThinkingMessage:n=o5,...r})=>{let{isStreaming:i,isOpen:a,duration:o}=n5();return(0,A.jsx)($8,{className:p(`flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground`,e),...r,children:t??(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(_t,{className:`size-4`}),n(i,o),(0,A.jsx)(yt,{className:p(`size-4 transition-transform`,a?`rotate-180`:`rotate-0`)})]})})}),c5=(0,k.memo)(({className:e,children:t,...n})=>(0,A.jsx)(e5,{className:p(`mt-4 text-sm`,`data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in`,e),...n,children:(0,A.jsx)(rt,{plugins:{code:J8,math:X8},...n,children:t})}));a5.displayName=`Reasoning`,s5.displayName=`ReasoningTrigger`,c5.displayName=`ReasoningContent`;function l5({className:e,...t}){return(0,A.jsx)(`svg`,{className:p(`size-4 text-muted-foreground`,e),fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,...t,children:(0,A.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636`})})}function u5({part:e,streamedData:t}){if(e.type!==`tool-generateTheme`)return null;let{theme:n}=ue(),{colorMode:r,currentTheme:i,setCurrentTheme:a}=Be(),[o,s]=(0,k.useState)(!1),c=e.state!==`output-available`,l=e.output||t,u=i?.id===l?.id,d=l?.[n===`dark`?`dark`:`light`];function f(){s(!0),F8(Ve(l)),setTimeout(()=>s(!1),3e3)}return(0,A.jsx)(Q8,{children:(0,A.jsxs)(`div`,{className:`rounded-lg border bg-sidebar p-2 relative`,children:[!!l?.name&&(0,A.jsx)($f.p,{initial:{y:30},animate:{y:0},transition:{duration:.5},className:`capitalize absolute text-xs -top-5 @sm/sidebar:left-4 left-2 -z-1 py-0.5 px-2 border bg-muted rounded-t-sm`,children:l?.name}),(0,A.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,A.jsx)($8,{asChild:!0,children:(0,A.jsxs)(_,{variant:`ghost`,className:`flex @sm/sidebar:gap-2 gap-1 p-2!`,children:[Te.map(e=>(0,A.jsx)(`div`,{style:{backgroundColor:d?.[e]??`transparent`},className:`rounded-md border size-5 flex items-center justify-center`,children:!d?.[e]&&(0,A.jsx)(`div`,{className:`size-full rounded-md bg-muted flex items-center justify-center`,children:(0,A.jsx)(l5,{})})},e)),(0,A.jsx)(yt,{className:`transition-transform in-data-[state="open"]:rotate-180`,size:16})]})}),(0,A.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,A.jsx)(_,{className:qe(c&&`pointer-events-none`),size:`sm`,variant:`ghost`,onClick:()=>{a(l)},disabled:u,children:c?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Z8,{children:`Generating`}),(0,A.jsx)(x,{})]}):u?(0,A.jsxs)(A.Fragment,{children:[`Applied `,(0,A.jsx)(Dt,{})]}):(0,A.jsxs)(A.Fragment,{children:[`Apply `,(0,A.jsx)(Mt,{})]})}),(0,A.jsx)(_,{size:`icon-sm`,variant:`ghost`,disabled:c||o,onClick:f,children:o?(0,A.jsx)(vt,{}):(0,A.jsx)(Ct,{})})]})]}),(0,A.jsx)(e5,{children:(0,A.jsx)(`div`,{className:`my-4 mx-2 space-y-4 max-h-52 overflow-y-auto`,children:Object.keys(Ae).map(e=>{let t=Ae[e];return t.every(e=>!d?.[e])?null:(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`h1`,{className:`text-lg`,children:e}),(0,A.jsx)(`div`,{className:`flex flex-wrap gap-3`,children:t.map(e=>{let t=d?.[e];if(!t)return null;let n=Pe(t,r);return(0,A.jsxs)(`div`,{className:`flex w-52 items-center gap-2 overflow-hidden text-ellipsis`,children:[(0,A.jsx)(`div`,{style:{backgroundColor:t},className:`border-2 rounded-sm size-12 min-w-10`}),(0,A.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,A.jsx)(`h1`,{className:`text-sm text-ellipsis`,children:He(e)}),(0,A.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-2`,children:[(0,A.jsx)(`p`,{className:`text-xs font-mono`,children:n}),(0,A.jsx)(Ct,{size:16,onClick:()=>F8(n),className:`hover:opacity-90 cursor-pointer`})]})]})]})})})]},e)})})})]})})}function d5({className:e,children:t,...n}){return(0,A.jsxs)(iU,{"data-slot":`scroll-area`,className:p(`relative`,e),...n,children:[(0,A.jsx)(aU,{"data-slot":`scroll-area-viewport`,className:`size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1`,children:t}),(0,A.jsx)(f5,{}),(0,A.jsx)(oU,{})]})}function f5({className:e,orientation:t=`vertical`,...n}){return(0,A.jsx)(MH,{"data-slot":`scroll-area-scrollbar`,"data-orientation":t,orientation:t,className:p(`data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none`,e),...n,children:(0,A.jsx)(UH,{"data-slot":`scroll-area-thumb`,className:`rounded-full relative flex-1 bg-border`})})}var p5=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,m5=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=p5[n[e]&63];return t};function h5({...e}){return(0,A.jsx)(lR,{"data-slot":`dialog`,...e})}function g5({...e}){return(0,A.jsx)(uR,{"data-slot":`dialog-trigger`,...e})}function _5({...e}){return(0,A.jsx)(dR,{"data-slot":`dialog-portal`,...e})}function v5({className:e,...t}){return(0,A.jsx)(fR,{"data-slot":`dialog-overlay`,className:p(`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50`,e),...t})}function y5({className:e,children:t,showCloseButton:n=!0,...r}){return(0,A.jsxs)(_5,{children:[(0,A.jsx)(v5,{}),(0,A.jsxs)(pR,{"data-slot":`dialog-content`,className:p(`bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-xl p-4 text-sm ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none`,e),...r,children:[t,n&&(0,A.jsx)(gR,{"data-slot":`dialog-close`,asChild:!0,children:(0,A.jsxs)(_,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`,children:[(0,A.jsx)(Bt,{}),(0,A.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function b5({className:e,...t}){return(0,A.jsx)(mR,{"data-slot":`dialog-title`,className:p(`text-base leading-none font-medium`,e),...t})}function x5({className:e,...t}){return(0,A.jsx)(hR,{"data-slot":`dialog-description`,className:p(`text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3`,e),...t})}function S5({className:e,...t}){return(0,A.jsx)(`textarea`,{"data-slot":`textarea`,className:p(`border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),...t})}function C5({className:e,...t}){return(0,A.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:p(`group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none`,`h-9 min-w-0 has-[>textarea]:h-auto`,`has-[>[data-align=inline-start]]:[&>input]:pl-2`,`has-[>[data-align=inline-end]]:[&>input]:pr-2`,`has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3`,`has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3`,`has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]`,`has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40`,e),...t})}var w5=u(`text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50`,{variants:{align:{"inline-start":`order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]`,"inline-end":`order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]`,"block-start":`order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5`,"block-end":`order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5`}},defaultVariants:{align:`inline-start`}});function T5({className:e,align:t=`inline-start`,...n}){return(0,A.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:p(w5({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var E5=u(`text-sm shadow-none flex gap-2 items-center`,{variants:{size:{xs:`h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2`,sm:`h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5`,"icon-xs":`size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function D5({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,A.jsx)(_,{type:t,"data-size":r,variant:n,className:p(E5({size:r}),e),...i})}function O5({className:e,...t}){return(0,A.jsx)(S5,{"data-slot":`input-group-control`,className:p(`flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent`,e),...t})}function k5({...e}){return(0,A.jsx)(yW,{"data-slot":`select`,...e})}function A5({...e}){return(0,A.jsx)(xW,{"data-slot":`select-value`,...e})}function j5({className:e,size:t=`default`,children:n,...r}){return(0,A.jsxs)(bW,{"data-slot":`select-trigger`,"data-size":t,className:p(`border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,A.jsx)(SW,{asChild:!0,children:(0,A.jsx)(yt,{className:`size-4 opacity-50`})})]})}function M5({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,A.jsx)(CW,{children:(0,A.jsxs)(wW,{"data-slot":`select-content`,className:p(`bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md`,n===`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:n,align:r,...i,children:[(0,A.jsx)(P5,{}),(0,A.jsx)(TW,{className:p(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,A.jsx)(F5,{})]})})}function N5({className:e,children:t,...n}){return(0,A.jsxs)(EW,{"data-slot":`select-item`,className:p(`focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,A.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,A.jsx)(OW,{children:(0,A.jsx)(vt,{className:`size-4`})})}),(0,A.jsx)(DW,{children:t})]})}function P5({className:e,...t}){return(0,A.jsx)(kW,{"data-slot":`select-scroll-up-button`,className:p(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,A.jsx)(bt,{className:`size-4`})})}function F5({className:e,...t}){return(0,A.jsx)(AW,{"data-slot":`select-scroll-down-button`,className:p(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,A.jsx)(yt,{className:`size-4`})})}var I5=(0,k.createContext)(null),L5=(0,k.createContext)(null),R5=()=>(0,k.use)(I5),z5=()=>(0,k.use)(L5),B5=(0,k.createContext)(null),V5=()=>{let e=z5(),t=(0,k.use)(B5),n=e??t;if(!n)throw Error(`usePromptInputAttachments must be used within a PromptInput or PromptInputProvider`);return n},H5=({className:e,accept:t,multiple:n,globalDrop:r,syncHiddenInput:i,maxFiles:a,maxFileSize:o,onError:s,onSubmit:c,children:l,...u})=>{let d=R5(),f=!!d,m=(0,k.useRef)(null),h=(0,k.useRef)(null),[g,_]=(0,k.useState)([]),v=f?d.attachments.files:g,y=(0,k.useRef)(v);y.current=v;let b=(0,k.useCallback)(()=>{m.current?.click()},[]),x=(0,k.useCallback)(e=>!t||t.trim()===``?!0:t.split(`,`).map(e=>e.trim()).filter(Boolean).some(t=>{if(t.endsWith(`/*`)){let n=t.slice(0,-1);return e.type.startsWith(n)}return e.type===t}),[t]),S=(0,k.useCallback)(e=>{let t=Array.from(e),n=t.filter(e=>x(e));if(t.length&&n.length===0){s?.({code:`accept`,message:`No files match the accepted types.`});return}let r=n.filter(e=>o?e.size<=o:!0);if(n.length>0&&r.length===0){s?.({code:`max_file_size`,message:`All files exceed the maximum size.`});return}_(e=>{let t=typeof a==`number`?Math.max(0,a-e.length):void 0,n=typeof t==`number`?r.slice(0,t):r;typeof t==`number`&&r.length>t&&s?.({code:`max_files`,message:`Too many files. Some were not added.`});let i=[];for(let e of n)i.push({id:m5(),type:`file`,url:URL.createObjectURL(e),mediaType:e.type,filename:e.name});return e.concat(i)})},[x,a,o,s]),C=(0,k.useCallback)(e=>_(t=>{let n=t.find(t=>t.id===e);return n?.url&&URL.revokeObjectURL(n.url),t.filter(t=>t.id!==e)}),[]),w=(0,k.useCallback)(()=>_(e=>{for(let t of e)t.url&&URL.revokeObjectURL(t.url);return[]}),[]),T=f?d.attachments.add:S,E=f?d.attachments.remove:C,ee=f?d.attachments.clear:w,te=f?d.attachments.openFileDialog:b;(0,k.useEffect)(()=>{f&&d.__registerFileInput(m,()=>m.current?.click())},[f,d]),(0,k.useEffect)(()=>{i&&m.current&&v.length===0&&(m.current.value=``)},[v,i]),(0,k.useEffect)(()=>{let e=h.current;if(!e||r)return;let t=e=>{e.dataTransfer?.types?.includes(`Files`)&&e.preventDefault()},n=e=>{e.dataTransfer?.types?.includes(`Files`)&&e.preventDefault(),e.dataTransfer?.files&&e.dataTransfer.files.length>0&&T(e.dataTransfer.files)};return e.addEventListener(`dragover`,t),e.addEventListener(`drop`,n),()=>{e.removeEventListener(`dragover`,t),e.removeEventListener(`drop`,n)}},[T,r]),(0,k.useEffect)(()=>{if(!r)return;let e=e=>{e.dataTransfer?.types?.includes(`Files`)&&e.preventDefault()},t=e=>{e.dataTransfer?.types?.includes(`Files`)&&e.preventDefault(),e.dataTransfer?.files&&e.dataTransfer.files.length>0&&T(e.dataTransfer.files)};return document.addEventListener(`dragover`,e),document.addEventListener(`drop`,t),()=>{document.removeEventListener(`dragover`,e),document.removeEventListener(`drop`,t)}},[T,r]),(0,k.useEffect)(()=>()=>{if(!f)for(let e of y.current)e.url&&URL.revokeObjectURL(e.url)},[f]);let D=e=>{e.currentTarget.files&&T(e.currentTarget.files),e.currentTarget.value=``},ne=async e=>{try{let t=await(await fetch(e)).blob();return new Promise(e=>{let n=new FileReader;n.onloadend=()=>e(n.result),n.onerror=()=>e(null),n.readAsDataURL(t)})}catch{return null}},re=(0,k.useMemo)(()=>({files:v.map(e=>({...e,id:e.id})),add:T,remove:E,clear:ee,openFileDialog:te,fileInputRef:m}),[v,T,E,ee,te]),ie=e=>{e.preventDefault();let t=e.currentTarget,n=f?d.textInput.value:new FormData(t).get(`message`)||``;f||t.reset(),Promise.all(v.map(async({id:e,...t})=>{if(t.url&&t.url.startsWith(`blob:`)){let e=await ne(t.url);return{...t,url:e??t.url}}return t})).then(t=>{try{let r=c({text:n,files:t},e);r instanceof Promise?r.then(()=>{ee(),f&&d.textInput.clear()}).catch(()=>{}):(ee(),f&&d.textInput.clear())}catch{}}).catch(()=>{})},ae=(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`input`,{accept:t,"aria-label":`Upload files`,className:`hidden`,multiple:n,onChange:D,ref:m,title:`Upload files`,type:`file`}),(0,A.jsx)(`form`,{className:p(`w-full`,e),onSubmit:ie,ref:h,...u,children:(0,A.jsx)(C5,{className:`overflow-hidden`,children:l})})]});return f?ae:(0,A.jsx)(B5,{value:re,children:ae})},U5=({onChange:e,className:t,placeholder:n=`What would you like to know?`,...r})=>{let i=R5(),a=V5(),[o,s]=(0,k.useState)(!1),c=e=>{if(e.key===`Enter`){if(o||e.nativeEvent.isComposing||e.shiftKey)return;e.preventDefault();let t=e.currentTarget.form;if(t?.querySelector(`button[type="submit"]`)?.disabled)return;t?.requestSubmit()}if(e.key===`Backspace`&&e.currentTarget.value===``&&a.files.length>0){e.preventDefault();let t=a.files.at(-1);t&&a.remove(t.id)}},l=e=>{let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e of t)if(e.kind===`file`){let t=e.getAsFile();t&&n.push(t)}n.length>0&&(e.preventDefault(),a.add(n))},u=i?{value:i.textInput.value,onChange:t=>{i.textInput.setInput(t.currentTarget.value),e?.(t)}}:{onChange:e};return(0,A.jsx)(O5,{className:p(`field-sizing-content max-h-48 min-h-16`,t),name:`message`,onCompositionEnd:()=>s(!1),onCompositionStart:()=>s(!0),onKeyDown:c,onPaste:l,placeholder:n,...r,...u})},W5=({className:e,...t})=>(0,A.jsx)(T5,{align:`block-end`,className:p(`justify-between gap-1`,e),...t}),G5=({className:e,variant:t=`default`,size:n=`icon-sm`,status:r,children:i,...a})=>{let o=(0,A.jsx)(wt,{className:`size-4`});return r===`submitted`?o=(0,A.jsx)(ie,{className:`size-4 animate-spin`}):r===`streaming`?o=(0,A.jsx)(Lt,{className:`size-4`}):r===`error`&&(o=(0,A.jsx)(Bt,{className:`size-4`})),(0,A.jsx)(D5,{"aria-label":`Submit`,className:p(e),size:n,type:`submit`,variant:t,...a,children:i??o})},K5={damping:.7,stiffness:.05,mass:1.25},q5=70,J5=1e3/60,Y5=350,X5=!1;globalThis.document?.addEventListener(`mousedown`,()=>{X5=!0}),globalThis.document?.addEventListener(`mouseup`,()=>{X5=!1}),globalThis.document?.addEventListener(`click`,()=>{X5=!1});var Z5=(e={})=>{let[t,n]=(0,k.useState)(!1),[r,i]=(0,k.useState)(e.initial!==!1),[a,o]=(0,k.useState)(!1),s=(0,k.useRef)(null);s.current=e;let c=(0,k.useCallback)(()=>{if(!X5)return!1;let e=window.getSelection();if(!e||!e.rangeCount)return!1;let t=e.getRangeAt(0);return t.commonAncestorContainer.contains(g.current)||g.current?.contains(t.commonAncestorContainer)},[]),l=(0,k.useCallback)(e=>{d.isAtBottom=e,i(e)},[]),u=(0,k.useCallback)(e=>{d.escapedFromLock=e,n(e)},[]),d=(0,k.useMemo)(()=>{let n;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return g.current?.scrollTop??0},set scrollTop(e){g.current&&(g.current.scrollTop=e,d.ignoreScrollToTop=g.current.scrollTop)},get targetScrollTop(){return!g.current||!_.current?0:g.current.scrollHeight-1-g.current.clientHeight},get calculatedTargetScrollTop(){if(!g.current||!_.current)return 0;let{targetScrollTop:t}=this;if(!e.targetScrollTop)return t;if(n?.targetScrollTop===t)return n.calculatedScrollTop;let r=Math.max(Math.min(e.targetScrollTop(t,{scrollElement:g.current,contentElement:_.current}),t),0);return n={targetScrollTop:t,calculatedScrollTop:r},requestAnimationFrame(()=>{n=void 0}),r},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=q5}}},[]),f=(0,k.useCallback)((e={})=>{typeof e==`string`&&(e={animation:e}),e.preserveScrollPosition||l(!0);let t=Date.now()+(Number(e.wait)||0),n=e7(s.current,e.animation),{ignoreEscapes:r=!1}=e,i,a=d.calculatedTargetScrollTop;e.duration instanceof Promise?e.duration.finally(()=>{i=Date.now()}):i=t+(e.duration??0);let o=async()=>{let e=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;let{scrollTop:l}=d,u=performance.now(),p=(u-(d.lastTick??u))/J5;if(d.animation||={behavior:n,promise:e,ignoreEscapes:r},d.animation.behavior===n&&(d.lastTick=u),c()||t>Date.now())return o();if(l<Math.min(a,d.calculatedTargetScrollTop)){if(d.animation?.behavior===n){if(n===`instant`)return d.scrollTop=d.calculatedTargetScrollTop,o();d.velocity=(n.damping*d.velocity+n.stiffness*d.scrollDifference)/n.mass,d.accumulated+=d.velocity*p,d.scrollTop+=d.accumulated,d.scrollTop!==l&&(d.accumulated=0)}return o()}return i>Date.now()?(a=d.calculatedTargetScrollTop,o()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:e7(s.current,s.current.resize),ignoreEscapes:r,duration:Math.max(0,i-Date.now())||void 0}):d.isAtBottom)});return e.then(e=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),e))};return e.wait!==!0&&(d.animation=void 0),d.animation?.behavior===n?d.animation.promise:o()},[l,c,d]),p=(0,k.useCallback)(()=>{u(!0),l(!1)},[u,l]),m=(0,k.useCallback)(({target:e})=>{if(e!==g.current)return;let{scrollTop:t,ignoreScrollToTop:n}=d,{lastScrollTop:r=t}=d;d.lastScrollTop=t,d.ignoreScrollToTop=void 0,n&&n>t&&(r=n),o(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||t===n)return;if(c()){u(!0),l(!1);return}let e=t>r,i=t<r;if(d.animation?.ignoreEscapes){d.scrollTop=r;return}i&&(u(!0),l(!1)),e&&u(!1),!d.escapedFromLock&&d.isNearBottom&&l(!0)},1)},[u,l,c,d]),h=(0,k.useCallback)(({target:e,deltaY:t})=>{let n=e;for(;![`scroll`,`auto`].includes(getComputedStyle(n).overflow);){if(!n.parentElement)return;n=n.parentElement}n===g.current&&t<0&&g.current.scrollHeight>g.current.clientHeight&&!d.animation?.ignoreEscapes&&(u(!0),l(!1))},[u,l,d]),g=Q5(e=>{g.current?.removeEventListener(`scroll`,m),g.current?.removeEventListener(`wheel`,h),e?.addEventListener(`scroll`,m,{passive:!0}),e?.addEventListener(`wheel`,h,{passive:!0})},[]),_=Q5(e=>{if(d.resizeObserver?.disconnect(),!e)return;let t;d.resizeObserver=new ResizeObserver(([e])=>{let{height:n}=e.contentRect,r=n-(t??n);if(d.resizeDifference=r,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),o(d.isNearBottom),r>=0){let e=e7(s.current,t?s.current.resize:s.current.initial);f({animation:e,wait:!0,preserveScrollPosition:!0,duration:e===`instant`?void 0:Y5})}else d.isNearBottom&&(u(!1),l(!0));t=n,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===r&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(e)},[]);return{contentRef:_,scrollRef:g,scrollToBottom:f,stopScroll:p,isAtBottom:r||a,isNearBottom:a,escapedFromLock:t,state:d}};function Q5(e,t){let n=(0,k.useCallback)(t=>(n.current=t,e(t)),t);return n}var $5=new Map;function e7(...e){let t={...K5},n=!1;for(let r of e){if(r===`instant`){n=!0;continue}typeof r==`object`&&(n=!1,t.damping=r.damping??t.damping,t.stiffness=r.stiffness??t.stiffness,t.mass=r.mass??t.mass)}let r=JSON.stringify(t);return $5.has(r)||$5.set(r,Object.freeze(t)),n?`instant`:$5.get(r)}var t7=(0,k.createContext)(null),n7=typeof window<`u`?k.useLayoutEffect:k.useEffect;function r7({instance:e,children:t,resize:n,initial:r,mass:i,damping:a,stiffness:o,targetScrollTop:s,contextRef:c,...l}){let u=(0,k.useRef)(null),d=Z5({mass:i,damping:a,stiffness:o,resize:n,initial:r,targetScrollTop:k.useCallback((e,t)=>(y?.targetScrollTop??s)?.(e,t)??e,[s])}),{scrollRef:f,contentRef:p,scrollToBottom:m,stopScroll:h,isAtBottom:g,escapedFromLock:_,state:v}=e??d,y=(0,k.useMemo)(()=>({scrollToBottom:m,stopScroll:h,scrollRef:f,isAtBottom:g,escapedFromLock:_,contentRef:p,state:v,get targetScrollTop(){return u.current},set targetScrollTop(e){u.current=e}}),[m,g,p,f,h,_,v]);return(0,k.useImperativeHandle)(c,()=>y,[y]),n7(()=>{f.current&&getComputedStyle(f.current).overflow===`visible`&&(f.current.style.overflow=`auto`)},[]),k.createElement(t7.Provider,{value:y},k.createElement(`div`,{...l},typeof t==`function`?t(y):t))}(function(e){function t({children:e,scrollClassName:t,...n}){let r=i7();return k.createElement(`div`,{ref:r.scrollRef,style:{height:`100%`,width:`100%`,scrollbarGutter:`stable both-edges`},className:t},k.createElement(`div`,{...n,ref:r.contentRef},typeof e==`function`?e(r):e))}e.Content=t})(r7||={});function i7(){let e=(0,k.useContext)(t7);if(!e)throw Error(`use-stick-to-bottom component context must be used within a StickToBottom component`);return e}var a7=({className:e,...t})=>(0,A.jsx)(r7,{className:p(`relative flex-1 overflow-y-hidden`,e),initial:`smooth`,resize:`smooth`,role:`log`,...t}),o7=({className:e,...t})=>(0,A.jsx)(r7.Content,{className:p(`flex flex-col gap-8 p-4`,e),...t}),s7=({className:e,...t})=>{let{isAtBottom:n,scrollToBottom:r}=i7(),i=(0,k.useCallback)(()=>{r()},[r]);return!n&&(0,A.jsx)(_,{className:p(`absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full`,e),onClick:i,size:`icon`,type:`button`,variant:`outline`,...t,children:(0,A.jsx)(mt,{className:`size-4`})})};u(`flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2`,{variants:{orientation:{horizontal:`[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none`,vertical:`flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none`}},defaultVariants:{orientation:`horizontal`}});function c7({delayDuration:e=0,...t}){return(0,A.jsx)(DK,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function l7({...e}){return(0,A.jsx)(OK,{"data-slot":`tooltip`,...e})}function u7({...e}){return(0,A.jsx)(kK,{"data-slot":`tooltip-trigger`,...e})}function d7({className:e,sideOffset:t=0,children:n,...r}){return(0,A.jsx)(AK,{children:(0,A.jsxs)(jK,{"data-slot":`tooltip-content`,sideOffset:t,className:p(`data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-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 inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm z-50 w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) bg-foreground text-background`,e),...r,children:[n,(0,A.jsx)(MK,{className:`size-2.5 rotate-45 rounded-[2px] z-50 translate-y-[calc(-50%_-_2px)] bg-foreground fill-foreground`})]})})}var f7=({className:e,from:t,...n})=>(0,A.jsx)(`div`,{className:p(`group flex w-full max-w-[95%] flex-col gap-2`,t===`user`?`is-user ml-auto justify-end`:`is-assistant`,e),...n}),p7=({children:e,className:t,...n})=>(0,A.jsx)(`div`,{className:p(`is-user:dark flex w-fit max-w-full min-w-0 flex-col gap-2 overflow-hidden text-sm`,`group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground`,`group-[.is-assistant]:text-foreground`,t),...n,children:e}),m7=({className:e,children:t,...n})=>(0,A.jsx)(`div`,{className:p(`flex items-center gap-1`,e),...n,children:t}),h7=({tooltip:e,children:t,label:n,variant:r=`ghost`,size:i=`icon-sm`,...a})=>{let o=(0,A.jsxs)(_,{size:i,type:`button`,variant:r,...a,children:[t,(0,A.jsx)(`span`,{className:`sr-only`,children:n||e})]});return e?(0,A.jsx)(c7,{children:(0,A.jsxs)(l7,{children:[(0,A.jsx)(u7,{asChild:!0,children:o}),(0,A.jsx)(d7,{children:(0,A.jsx)(`p`,{children:e})})]})}):o};(0,k.createContext)(null);var g7=(0,k.memo)(({className:e,...t})=>(0,A.jsx)(rt,{className:p(`size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,e),...t}),(e,t)=>e.children===t.children);g7.displayName=`MessageResponse`;var _7=we({method:`POST`}).handler(Se(`74c0f93931f897f2d57d57ff71eece1b1d31f77b934ce83ff1dcab0015ddfee6`));function v7({className:e,...t}){return(0,A.jsx)(RV,{"data-slot":`menubar`,className:p(`flex h-9 items-center gap-1 rounded-md border bg-background p-1 shadow-xs`,e),...t})}function y7({...e}){return(0,A.jsx)(zV,{"data-slot":`menubar-menu`,...e})}function b7({...e}){return(0,A.jsx)(VV,{"data-slot":`menubar-portal`,...e})}function x7({className:e,...t}){return(0,A.jsx)(BV,{"data-slot":`menubar-trigger`,className:p(`flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground`,e),...t})}function S7({className:e,align:t=`start`,alignOffset:n=-4,sideOffset:r=8,...i}){return(0,A.jsx)(b7,{children:(0,A.jsx)(HV,{"data-slot":`menubar-content`,align:t,alignOffset:n,sideOffset:r,className:p(`z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...i})})}function C7({className:e,inset:t,variant:n=`default`,...r}){return(0,A.jsx)(UV,{"data-slot":`menubar-item`,"data-inset":t,"data-variant":n,className:p(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!`,e),...r})}function w7({className:e,...t}){return(0,A.jsx)(`span`,{"data-slot":`menubar-shortcut`,className:p(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t})}function T7({...e}){return(0,A.jsx)(WV,{"data-slot":`menubar-sub`,...e})}function E7({className:e,inset:t,children:n,...r}){return(0,A.jsxs)(GV,{"data-slot":`menubar-sub-trigger`,"data-inset":t,className:p(`flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground`,e),...r,children:[n,(0,A.jsx)(c,{className:`ml-auto h-4 w-4`})]})}function D7({className:e,...t}){return(0,A.jsx)(KV,{"data-slot":`menubar-sub-content`,className:p(`z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...t})}var O7=we().handler(Se(`834a951965bf50d49d9a1f848390ddb1ddef4f162422cf43f1e7fd82726bbe90`)),k7={chatgpt:dP,claude:xj,gemini:mM,glm:tF,kimi:dN};function A7(){let[e,t]=(0,k.useState)(),{providers:n,updateProvider:r,selectedModel:i,setSelectedModel:a}=Ie(),{mutate:o,isPending:s,isError:c,error:l}=cn({mutationKey:[`submitApiKey`,e],mutationFn:async n=>{if(!e)return;let{models:i}=await O7({data:{apiKey:n,provider:e}});r(e,{isActive:!0,models:i}),t(void 0),Ke(`API key for ${ze[e]} saved.`)},retry:1}),u=(0,k.useMemo)(()=>{let e=Object.keys(n);if(e.length)for(let t of e){let e=n[t];if(e.isActive){let t=e.models.find(e=>e.id===i);if(t)return t}}},[n]);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(h5,{open:!!e,onOpenChange:e=>t(t=>e?t:void 0),children:(0,A.jsxs)(y5,{children:[(0,A.jsxs)(b5,{children:[`Setup `,ze[e]]}),(0,A.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),o(new FormData(e.target).get(`apiKey`))},className:`size-full space-y-2`,children:[(0,A.jsxs)(T,{"data-invalid":c,children:[(0,A.jsx)(E,{id:`apiKey`,name:`apiKey`,type:`password`,placeholder:`API key`,"aria-invalid":c,disabled:s,required:!0}),c&&(0,A.jsx)(w,{children:l.message})]}),(0,A.jsx)(_,{type:`submit`,className:`w-full`,disabled:s,children:`Submit`})]})]})}),(0,A.jsx)(v7,{asChild:!0,children:(0,A.jsxs)(y7,{children:[(0,A.jsx)(x7,{asChild:!0,children:(0,A.jsxs)(_,{variant:`ghost`,size:`sm`,className:`flex items-center gap-x-1`,children:[u?u.name:`Select model`,(0,A.jsx)(bt,{size:16})]})}),(0,A.jsx)(S7,{children:je.map(e=>{let r=k7[e],o=ze[e],s=n?.[e];return(0,A.jsxs)(T7,{children:[(0,A.jsxs)(E7,{className:`capitalize space-x-1`,children:[(0,A.jsx)(r,{}),o]}),(0,A.jsx)(D7,{children:s?.isActive?(0,A.jsxs)(A.Fragment,{children:[[...s.models].reverse().map((t,n)=>(0,A.jsxs)(C7,{onClick:()=>a(t.id,e),children:[t.name,t.id===i&&(0,A.jsx)(w7,{children:(0,A.jsx)(vt,{size:16})})]},n)),(0,A.jsxs)(C7,{onClick:()=>t(e),children:[`Edit `,o,` `,(0,A.jsx)(w7,{children:`API KEY`})]})]}):(0,A.jsxs)(C7,{onClick:()=>t(e),children:[`Setup `,o,` `,(0,A.jsx)(w7,{children:`API KEY`})]})})]},e)})})]})})]})}var j7=[`Minimalist, high-contrast monochrome`,`Midnight executive, deep indigo with soft muted accents`,`Autumn forest with browns and burnt orange accents`,`Electric lime greens against a dark slate background`],M7=({ref:e})=>{let{selectedModel:t,selectedProvider:n}=Ie(),{currentTheme:r,setCurrentTheme:i,appendThemes:a,setIsGenerating:o}=Be(),[s,c]=(0,k.useState)(``),[l,u]=(0,k.useState)(),[d,f]=(0,k.useState)(),p=ln(_7),{messages:m,sendMessage:h,status:g,regenerate:v,setMessages:y}=P8({transport:new m8({prepareSendMessagesRequest(e){return u([]),{body:{id:e.id,messages:e.messages,provider:n,model:t,...e.body}}},api:`/api/chat`}),onData:e=>{e.type===`data-theme`&&e.data.styles.id?.length===16&&(a(e.data.styles),i(e.data.styles),f(e.data.styles))},onFinish(){!n||!t||(p({data:{shadcn:r||d,provider:n,model:t}}).then(u),f(void 0))}});return(0,k.useImperativeHandle)(e,()=>({resetChat:()=>y([])})),(0,k.useEffect)(()=>{m.at(-1)?.parts.at(-1)?.type===`data-theme`&&d?.id&&(a(d),i(d,!1),f(void 0))},[m]),(0,k.useEffect)(()=>{o(!!d)},[d]),(0,A.jsx)(`div`,{className:`mx-auto relative flex flex-col justify-end size-full p-4`,children:(0,A.jsxs)(`div`,{className:`flex flex-col size-full`,children:[!m.length&&(0,A.jsxs)($f.div,{className:`flex flex-col justify-center sm:mx-8 gap-y-4 flex-1`,initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2 ml-4`,children:[(0,A.jsx)(Le,{className:`size-6 text-primary`}),(0,A.jsx)(`p`,{className:`font-medium`,children:`What's on your mind?`})]}),(0,A.jsx)(`div`,{className:`flex flex-col gap-y-1`,children:j7?.map((e,t)=>(0,A.jsx)(`button`,{className:`p-2 text-left opacity-90 hover:text-primary cursor-pointer border-b`,onClick:()=>h({text:e}),children:(0,A.jsx)(`p`,{className:`text-xs`,children:e})},t))})]}),(0,A.jsxs)(a7,{className:`flex-1 h-full min-h-0`,children:[(0,A.jsx)(o7,{children:m.map((e,t)=>(0,A.jsx)(k.Fragment,{children:e.parts.map((n,r)=>{let i=t===m.length-1;switch(n.type){case`reasoning`:return(0,A.jsxs)(a5,{className:`w-full`,isStreaming:g===`streaming`&&r===e.parts.length-1&&e.id===m.at(-1)?.id,children:[(0,A.jsx)(s5,{}),(0,A.jsx)(c5,{children:n.text})]},`r-${e.id}-${r}`);case`text`:return n.text.trim()?(0,A.jsxs)(k.Fragment,{children:[(0,A.jsx)(f7,{from:e.role,children:(0,A.jsx)(p7,{children:(0,A.jsx)(g7,{children:n.text})})}),e.role===`assistant`&&i&&(0,A.jsxs)(m7,{children:[(0,A.jsx)(h7,{onClick:()=>v(),label:`Retry`,children:(0,A.jsx)(Nt,{className:`size-3`})}),(0,A.jsx)(h7,{onClick:()=>F8(n.text),label:`Copy`,children:(0,A.jsx)(Ct,{className:`size-3`})})]})]},`${e.id}-${r}`):null;case`tool-generateTheme`:return(0,A.jsx)(u5,{streamedData:d,part:n},`${e.id}-${r}`);default:return(0,A.jsx)(k.Fragment,{},`${e.id}-${r}`)}})},e.id))}),(0,A.jsx)(s7,{})]}),(0,A.jsx)(d5,{children:(0,A.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:l?.map((e,t)=>(0,A.jsx)(_,{variant:`outline`,className:`rounded-full cursor-pointer dark:bg-input dark:backdrop-blur-xl text-xs h-auto py-1 px-3`,onClick:()=>h({text:e}),children:e},t))})}),(0,A.jsxs)(H5,{multiple:!0,globalDrop:!0,className:`mt-4 w-full mx-auto relative flex-col`,onSubmit:(e,t)=>{t.preventDefault(),e.text.trim()&&(h({text:e.text}),c(``))},children:[(0,A.jsx)(U5,{value:s,placeholder:`Say something...`,onChange:e=>c(e.currentTarget.value),className:`pr-12`}),(0,A.jsxs)(W5,{children:[(0,A.jsx)(A7,{}),(0,A.jsx)(G5,{status:g===`streaming`?`streaming`:`ready`,disabled:!s.trim()||!t||!n})]})]})]})})};function N7({className:e,size:t=`default`,...n}){return(0,A.jsx)(OG,{"data-slot":`switch`,"data-size":t,className:p(`data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50`,e),...n,children:(0,A.jsx)(kG,{"data-slot":`switch-thumb`,className:`bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform`})})}var P7=({className:e,...t})=>{let{resolvedTheme:n,setTheme:r}=ue(),i=Be(e=>e.setCurrentTheme),[a,o]=(0,k.useState)(!1),[s,c]=(0,k.useState)(!1);(0,k.useEffect)(()=>c(!0),[]),(0,k.useEffect)(()=>o(n===`dark`),[n]);let l=(0,k.useCallback)(e=>{let t=e?`dark`:`light`;o(e),r(t),i(Be.getState().currentTheme,!0,t)},[r]);return s?(0,A.jsxs)(`div`,{className:p(`relative flex items-center justify-center`,`h-7 w-14`,e),...t,children:[(0,A.jsx)(N7,{checked:a,onCheckedChange:l,className:qe(`peer absolute inset-0 size-full min-w-14 min-h-7 rounded-full bg-input! transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,`[&>span]:size-5! [&>span]:rounded-full [&>span]:bg-background [&>span]:shadow [&>span]:z-10`,`data-[state=unchecked]:[&>span]:translate-x-1.5`,`data-[state=checked]:[&>span]:translate-x-[28px]`)}),(0,A.jsx)(`span`,{className:p(`pointer-events-none absolute left-2 inset-y-0 z-0`,`flex items-center justify-center`),children:(0,A.jsx)(Rt,{size:16,className:p(`transition-all duration-200 ease-out`,a?`text-muted-foreground/70`:`text-foreground scale-110`)})}),(0,A.jsx)(`span`,{className:p(`pointer-events-none absolute right-2 inset-y-0 z-0`,`flex items-center justify-center`),children:(0,A.jsx)(Et,{size:16,className:p(`transition-all duration-200 ease-out`,a?`text-foreground scale-110`:`text-muted-foreground/70`)})})]}):null},F7=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function I7(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function L7(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function R7(e){return Array.isArray(e)?e:[e]}async function z7(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function B7(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function V7(e){return e===`ansi`||B7(e)}function H7(e){return e===`none`}function U7(e){return H7(e)}function W7(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var G7={light:`#333333`,dark:`#bbbbbb`},K7={light:`#fffffe`,dark:`#1e1e1e`},q7=`__shiki_resolved`;function J7(e){if(e?.[q7])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?G7.light:G7.dark,n||=t.type===`light`?K7.light:K7.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,q7,{enumerable:!1,writable:!1,value:!0}),t}async function Y7(e){return Array.from(new Set((await Promise.all(e.filter(e=>!V7(e)).map(async e=>await z7(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function X7(e){return(await Promise.all(e.map(async e=>U7(e)?null:J7(await z7(e))))).filter(e=>!!e)}function Z7(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new F7(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Q7=class extends Qg{_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=J7(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Ah.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Z7(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new F7(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},$7=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},e9=0;function t9(e){e9+=1,e.warnings!==!1&&e9>=10&&e9%10==0&&console.warn(`[Shiki] ${e9} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new F7("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(J7),i=new Q7(new $7(e.engine,n),r,n,e.langAlias),a;function o(t){return Z7(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new F7(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new F7(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await Y7(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await X7(e))}function g(){if(t)throw new F7(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--e9)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function n9(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([X7(e.themes||[]),Y7(e.langs||[]),e.engine]);return t9({...e,themes:t,langs:n,engine:r})}var r9=new WeakMap;function i9(e,t){r9.set(e,t)}function a9(e){return r9.get(e)}var o9=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(R7(n).map(e=>[e,$g])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return hte(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function hte(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function gte(e,t){if(!(e instanceof o9))throw new F7(`Invalid grammar state`);return e.getInternalStack(t)}function s9(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(B7(e.resolveLangAlias(n.lang||`text`))||H7(r))return W7(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new F7(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new F7(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return vte(t,o,i,a,n)}function _te(...e){if(e.length===2)return a9(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(B7(i)||H7(a))throw new F7(`Plain language does not have grammar state`);if(i===`ansi`)throw new F7(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new o9(c9(n,c,o,s,r).stateStack,c.name,o.name)}function vte(e,t,n,r,i){let a=c9(e,t,n,r,i),o=new o9(a.stateStack,t.name,n.name);return i9(a.tokens,o),a.tokens}function c9(e,t,n,r,i){let a=I7(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=W7(e),l=i.grammarState?gte(i.grammarState,n.name)??$g:i.grammarContextCode==null?$g:c9(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=L7(r[Uh.getForeground(s)],a),l=Uh.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?yte(t.scopes):bte(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function yte(e){return e.map(e=>({scopeName:e}))}function bte(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Ste(e,i,t.slice(0,r))}}return n}function l9(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function xte(e,t,n){if(!l9(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)l9(e[r],n[i])&&--r,--i;return r===-1}function Ste(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(xte(e,t,n)){r.push(a);break}return r}function u9(e,t,n,r=s9){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:a9(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=Cte(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new o9(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&i9(s,c),s}function Cte(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function d9(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function wte(e){let t=W7(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}var f9=`light-dark()`,Tte=[`color`,`background-color`];function Ete(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function Dte(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?Ete(e,t):e})):e}function Ote(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>p9(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&Tte.includes(a))if(r===f9&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new F7('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function p9(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&Lh.Italic&&(t[`font-style`]=`italic`),e.fontStyle&Lh.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&Lh.Underline&&n.push(`underline`),e.fontStyle&Lh.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function m9(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function kte(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=wte(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new F7(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}else{let t=n.lines[e.line];if(t===void 0)throw new F7(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new F7(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));Ate(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return Dte(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new F7(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=h9(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new F7(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new F7(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&d9(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function Ate(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new F7(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new F7(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function h9(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(h9).join(``):``}var jte=[kte()];function g9(e){let t=Mte(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...jte]}function Mte(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var _9=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],v9={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function Nte(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function y9(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function Pte(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)v9[r]&&t.push({type:`setDecoration`,value:v9[r]});else if(r<=29){let e=v9[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:_9[r-30]}});else if(r===38){let n=y9(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:_9[r-40]}});else if(r===48){let n=y9(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:_9[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:_9[r-100+8]}})}return t}function Fte(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=Nte(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=Pte(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var Ite={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function Lte(e=Ite){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<_9.length;e++)r.push(t(_9[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var Rte={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function zte(e,t,n){let r=I7(e,n),i=W7(t),a=Lte(Object.fromEntries(_9.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Rte[t]]}))),o=Fte();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=L7(i,r),o=L7(o,r),n.decorations.has(`dim`)&&(i=Bte(i));let s=Lh.None;return n.decorations.has(`bold`)&&(s|=Lh.Bold),n.decorations.has(`italic`)&&(s|=Lh.Italic),n.decorations.has(`underline`)&&(s|=Lh.Underline),n.decorations.has(`strikethrough`)&&(s|=Lh.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function Bte(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function b9(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!B7(r)&&!H7(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return zte(r,t,n)}return s9(e,t,n)}function x9(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:t.color===l?1:0);if(f.length===0)throw new F7("`themes` option must not be empty");let p=u9(e,t,n,b9);if(c=a9(p),l&&f9!==l&&!f.find(e=>e.color===l))throw new F7(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>Ote(e,h,u,l,d))),c&&i9(a,c);let g=f.map(e=>I7(e.theme,n));i=S9(f,m,g,u,l,`fg`,d),r=S9(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=I7(n.theme,n);a=b9(e,t,n);let l=e.getTheme(n.theme);r=L7(l.bg,s),i=L7(l.fg,s),o=l.name,c=a9(a)}else throw new F7("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function S9(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=L7(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===f9&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new F7('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${L7(t[r][a],n[r])||`inherit`}, ${L7(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function C9(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>C9(e,t,n),codeToTokens:(t,n)=>x9(e,t,n)}){let i=t;for(let e of g9(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=x9(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=Hte(a):d===`never`&&(a=Ute(a)),f&&(a=Wte(a));let p={...r,get source(){return i}};for(let e of g9(n))a=e.tokens?.call(p,a)||a;return Vte(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function Vte(e,t,n,r=a9(e)){let i=g9(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:d9,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
521
|
+
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=m9(a.htmlStyle||p9(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&i9(m,r),m}function Hte(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&Lh.Underline||i.fontStyle&Lh.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Ute(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function Wte(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=m9(e.htmlStyle||p9(e)),i=m9(n.htmlStyle||p9(n)),a=e.fontStyle&&(e.fontStyle&Lh.Underline||e.fontStyle&Lh.Strikethrough),o=n.fontStyle&&(n.fontStyle&Lh.Underline||n.fontStyle&Lh.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Gte=ev;function Kte(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>C9(e,t,n),codeToTokens:(t,n)=>x9(e,t,n)},i=Gte(C9(e,t,n,r));for(let e of g9(n))i=e.postprocess?.call(r,i,n)||i;return i}async function qte(e){let t=await n9(e);return{getLastGrammarState:(...e)=>_te(t,...e),codeToTokensBase:(e,n)=>b9(t,e,n),codeToTokensWithThemes:(e,n)=>u9(t,e,n),codeToTokens:(e,n)=>x9(t,e,n),codeToHast:(e,n)=>C9(t,e,n),codeToHtml:(e,n)=>Kte(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}var w9=4294967295,Jte=class{regexps;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:w9,end:w9,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function Yte(e,t){return SC(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Xte(e={}){let t=Object.assign({target:`auto`,cache:new Map},e);return t.regexConstructor||=e=>Yte(e,{target:t.target}),{createScanner(e){return new Jte(e,t)},createString(e){return{content:e}}}}var Zte=[Object.freeze(JSON.parse(`{"displayName":"CSS","name":"css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"include":"#combinators"},{"include":"#selector"},{"include":"#at-rules"},{"include":"#rule-list"}],"repository":{"at-rules":{"patterns":[{"begin":"\\\\A\\\\uFEFF?(?i:(?=\\\\s*@charset\\\\b))","end":";|(?=$)","endCaptures":{"0":{"name":"punctuation.terminator.rule.css"}},"name":"meta.at-rule.charset.css","patterns":[{"captures":{"1":{"name":"invalid.illegal.not-lowercase.charset.css"},"2":{"name":"invalid.illegal.leading-whitespace.charset.css"},"3":{"name":"invalid.illegal.no-whitespace.charset.css"},"4":{"name":"invalid.illegal.whitespace.charset.css"},"5":{"name":"invalid.illegal.not-double-quoted.charset.css"},"6":{"name":"invalid.illegal.unclosed-string.charset.css"},"7":{"name":"invalid.illegal.unexpected-characters.charset.css"}},"match":"\\\\G((?!@charset)@\\\\w+)|\\\\G(\\\\s+)|(@charset\\\\S[^;]*)|(?<=@charset)( {2,}|\\\\t+)|(?<=@charset )([^\\";]+)|(\\"[^\\"]+)$|(?<=\\")([^;]+)"},{"captures":{"1":{"name":"keyword.control.at-rule.charset.css"},"2":{"name":"punctuation.definition.keyword.css"}},"match":"((@)charset)(?=\\\\s)"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.css"}},"end":"\\"|$","endCaptures":{"0":{"name":"punctuation.definition.string.end.css"}},"name":"string.quoted.double.css","patterns":[{"begin":"(?:\\\\G|^)(?=[^\\"]+$)","end":"$","name":"invalid.illegal.unclosed.string.css"}]}]},{"begin":"(?i)((@)import)(?:\\\\s+|$|(?=[\\"']|/\\\\*))","beginCaptures":{"1":{"name":"keyword.control.at-rule.import.css"},"2":{"name":"punctuation.definition.keyword.css"}},"end":";","endCaptures":{"0":{"name":"punctuation.terminator.rule.css"}},"name":"meta.at-rule.import.css","patterns":[{"begin":"\\\\G\\\\s*(?=/\\\\*)","end":"(?<=\\\\*/)\\\\s*","patterns":[{"include":"#comment-block"}]},{"include":"#string"},{"include":"#url"},{"include":"#media-query-list"}]},{"begin":"(?i)((@)font-face)(?=\\\\s*|\\\\{|/\\\\*|$)","beginCaptures":{"1":{"name":"keyword.control.at-rule.font-face.css"},"2":{"name":"punctuation.definition.keyword.css"}},"end":"(?!\\\\G)","name":"meta.at-rule.font-face.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"include":"#rule-list"}]},{"begin":"(?i)(@)page(?=[:{\\\\s]|/\\\\*|$)","captures":{"0":{"name":"keyword.control.at-rule.page.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*($|[:;{]))","name":"meta.at-rule.page.css","patterns":[{"include":"#rule-list"}]},{"begin":"(?i)(?=@media([(\\\\s]|/\\\\*|$))","end":"(?<=})(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)media","beginCaptures":{"0":{"name":"keyword.control.at-rule.media.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*[;{])","name":"meta.at-rule.media.header.css","patterns":[{"include":"#media-query-list"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.media.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.media.end.bracket.curly.css"}},"name":"meta.at-rule.media.body.css","patterns":[{"include":"$self"}]}]},{"begin":"(?i)(?=@counter-style([\\"';{\\\\s]|/\\\\*|$))","end":"(?<=})(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)counter-style","beginCaptures":{"0":{"name":"keyword.control.at-rule.counter-style.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*\\\\{)","name":"meta.at-rule.counter-style.header.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"captures":{"0":{"patterns":[{"include":"#escapes"}]}},"match":"[-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*","name":"variable.parameter.style-name.css"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.property-list.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.property-list.end.bracket.curly.css"}},"name":"meta.at-rule.counter-style.body.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"include":"#rule-list-innards"}]}]},{"begin":"(?i)(?=@document([\\"';{\\\\s]|/\\\\*|$))","end":"(?<=})(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)document","beginCaptures":{"0":{"name":"keyword.control.at-rule.document.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*[;{])","name":"meta.at-rule.document.header.css","patterns":[{"begin":"(?i)(?<![-\\\\w])(url-prefix|domain|regexp)(\\\\()","beginCaptures":{"1":{"name":"support.function.document-rule.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.document-rule.css","patterns":[{"include":"#string"},{"include":"#comment-block"},{"include":"#escapes"},{"match":"[^\\"')\\\\s]+","name":"variable.parameter.document-rule.css"}]},{"include":"#url"},{"include":"#commas"},{"include":"#comment-block"},{"include":"#escapes"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.document.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.document.end.bracket.curly.css"}},"name":"meta.at-rule.document.body.css","patterns":[{"include":"$self"}]}]},{"begin":"(?i)(?=@(?:-(?:webkit|moz|o|ms)-)?keyframes([\\"';{\\\\s]|/\\\\*|$))","end":"(?<=})(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)(?:-(?:webkit|moz|o|ms)-)?keyframes","beginCaptures":{"0":{"name":"keyword.control.at-rule.keyframes.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*\\\\{)","name":"meta.at-rule.keyframes.header.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"captures":{"0":{"patterns":[{"include":"#escapes"}]}},"match":"[-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*","name":"variable.parameter.keyframe-list.css"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.keyframes.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.keyframes.end.bracket.curly.css"}},"name":"meta.at-rule.keyframes.body.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"captures":{"1":{"name":"entity.other.keyframe-offset.css"},"2":{"name":"entity.other.keyframe-offset.percentage.css"}},"match":"(?i)(?<![-\\\\w])(from|to)(?![-\\\\w])|([-+]?(?:\\\\d+(?:\\\\.\\\\d+)?|\\\\.\\\\d+)%)"},{"include":"#rule-list"}]}]},{"begin":"(?i)(?=@supports([(\\\\s]|/\\\\*|$))","end":"(?<=})(?!\\\\G)|(?=;)","patterns":[{"begin":"(?i)\\\\G(@)supports","beginCaptures":{"0":{"name":"keyword.control.at-rule.supports.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*[;{])","name":"meta.at-rule.supports.header.css","patterns":[{"include":"#feature-query-operators"},{"include":"#feature-query"},{"include":"#comment-block"},{"include":"#escapes"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.supports.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.supports.end.bracket.curly.css"}},"name":"meta.at-rule.supports.body.css","patterns":[{"include":"$self"}]}]},{"begin":"(?i)((@)(-(ms|o)-)?viewport)(?=[\\"';{\\\\s]|/\\\\*|$)","beginCaptures":{"1":{"name":"keyword.control.at-rule.viewport.css"},"2":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*[;@{])","name":"meta.at-rule.viewport.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"}]},{"begin":"(?i)((@)font-feature-values)(?=[\\"';{\\\\s]|/\\\\*|$)\\\\s*","beginCaptures":{"1":{"name":"keyword.control.at-rule.font-feature-values.css"},"2":{"name":"punctuation.definition.keyword.css"}},"contentName":"variable.parameter.font-name.css","end":"(?=\\\\s*[;@{])","name":"meta.at-rule.font-features.css","patterns":[{"include":"#comment-block"},{"include":"#escapes"}]},{"include":"#font-features"},{"begin":"(?i)((@)namespace)(?=[\\"';\\\\s]|/\\\\*|$)","beginCaptures":{"1":{"name":"keyword.control.at-rule.namespace.css"},"2":{"name":"punctuation.definition.keyword.css"}},"end":";|(?=[@{])","endCaptures":{"0":{"name":"punctuation.terminator.rule.css"}},"name":"meta.at-rule.namespace.css","patterns":[{"include":"#url"},{"captures":{"1":{"patterns":[{"include":"#comment-block"}]},"2":{"name":"entity.name.function.namespace-prefix.css","patterns":[{"include":"#escapes"}]}},"match":"(?i)(?:\\\\G|^|(?<=\\\\s))(?=(?<=\\\\s|^)[-A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\s*/\\\\*(?:[^*]|\\\\*[^/])*\\\\*/)(.*?)([-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*)"},{"include":"#comment-block"},{"include":"#escapes"},{"include":"#string"}]},{"begin":"(?i)(?=@[-\\\\w]+[^;]+;s*$)","end":"(?<=;)(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)[-\\\\w]+","beginCaptures":{"0":{"name":"keyword.control.at-rule.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":";","endCaptures":{"0":{"name":"punctuation.terminator.rule.css"}},"name":"meta.at-rule.header.css"}]},{"begin":"(?i)(?=@[-\\\\w]+([({\\\\s]|/\\\\*|$))","end":"(?<=})(?!\\\\G)","patterns":[{"begin":"(?i)\\\\G(@)[-\\\\w]+","beginCaptures":{"0":{"name":"keyword.control.at-rule.css"},"1":{"name":"punctuation.definition.keyword.css"}},"end":"(?=\\\\s*[;{])","name":"meta.at-rule.header.css"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.end.bracket.curly.css"}},"name":"meta.at-rule.body.css","patterns":[{"include":"$self"}]}]}]},"color-keywords":{"patterns":[{"match":"(?i)(?<![-\\\\w])(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)(?![-\\\\w])","name":"support.constant.color.w3c-standard-color-name.css"},{"match":"(?i)(?<![-\\\\w])(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rebeccapurple|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|transparent|turquoise|violet|wheat|whitesmoke|yellowgreen)(?![-\\\\w])","name":"support.constant.color.w3c-extended-color-name.css"},{"match":"(?i)(?<![-\\\\w])currentColor(?![-\\\\w])","name":"support.constant.color.current.css"},{"match":"(?i)(?<![-\\\\w])(ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText)(?![-\\\\w])","name":"invalid.deprecated.color.system.css"}]},"combinators":{"patterns":[{"match":"/deep/|>>>","name":"invalid.deprecated.combinator.css"},{"match":">>|[+>~]","name":"keyword.operator.combinator.css"}]},"commas":{"match":",","name":"punctuation.separator.list.comma.css"},"comment-block":{"begin":"/\\\\*","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.css"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.css"}},"name":"comment.block.css"},"escapes":{"patterns":[{"match":"\\\\\\\\\\\\h{1,6}","name":"constant.character.escape.codepoint.css"},{"begin":"\\\\\\\\$\\\\s*","end":"^(?<!\\\\G)","name":"constant.character.escape.newline.css"},{"match":"\\\\\\\\.","name":"constant.character.escape.css"}]},"feature-query":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.condition.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.condition.end.bracket.round.css"}},"name":"meta.feature-query.css","patterns":[{"include":"#feature-query-operators"},{"include":"#feature-query"}]},"feature-query-operators":{"patterns":[{"match":"(?i)(?<=[()\\\\s]|^|\\\\*/)(and|not|or)(?=[()\\\\s]|/\\\\*|$)","name":"keyword.operator.logical.feature.$1.css"},{"include":"#rule-list-innards"}]},"font-features":{"begin":"(?i)((@)(annotation|character-variant|ornaments|styleset|stylistic|swash))(?=[\\"';@{\\\\s]|/\\\\*|$)","beginCaptures":{"1":{"name":"keyword.control.at-rule.\${3:/downcase}.css"},"2":{"name":"punctuation.definition.keyword.css"}},"end":"(?<=})","name":"meta.at-rule.\${3:/downcase}.css","patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.property-list.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.property-list.end.bracket.curly.css"}},"name":"meta.property-list.font-feature.css","patterns":[{"captures":{"0":{"patterns":[{"include":"#escapes"}]}},"match":"[-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*","name":"variable.font-feature.css"},{"include":"#rule-list-innards"}]}]},"functional-pseudo-classes":{"patterns":[{"begin":"(?i)((:)dir)(\\\\()","beginCaptures":{"1":{"name":"entity.other.attribute-name.pseudo-class.css"},"2":{"name":"punctuation.definition.entity.css"},"3":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"match":"(?i)(?<![-\\\\w])(ltr|rtl)(?![-\\\\w])","name":"support.constant.text-direction.css"},{"include":"#property-values"}]},{"begin":"(?i)((:)lang)(\\\\()","beginCaptures":{"1":{"name":"entity.other.attribute-name.pseudo-class.css"},"2":{"name":"punctuation.definition.entity.css"},"3":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"patterns":[{"match":"(?<=[(,\\\\s])[A-Za-z]+(-[0-9A-Za-z]*|\\\\\\\\(?:\\\\h{1,6}|.))*(?=[),\\\\s])","name":"support.constant.language-range.css"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.css"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.css"}},"name":"string.quoted.double.css","patterns":[{"include":"#escapes"},{"match":"(?<=[\\"\\\\s])[*A-Za-z]+(-[*0-9A-Za-z]*)*(?=[\\"\\\\s])","name":"support.constant.language-range.css"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.css"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.css"}},"name":"string.quoted.single.css","patterns":[{"include":"#escapes"},{"match":"(?<=['\\\\s])[*A-Za-z]+(-[*0-9A-Za-z]*)*(?=['\\\\s])","name":"support.constant.language-range.css"}]},{"include":"#commas"}]},{"begin":"(?i)((:)(?:not|has|matches|where|is))(\\\\()","beginCaptures":{"1":{"name":"entity.other.attribute-name.pseudo-class.css"},"2":{"name":"punctuation.definition.entity.css"},"3":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"patterns":[{"include":"#selector-innards"}]},{"begin":"(?i)((:)nth-(?:last-)?(?:child|of-type))(\\\\()","beginCaptures":{"1":{"name":"entity.other.attribute-name.pseudo-class.css"},"2":{"name":"punctuation.definition.entity.css"},"3":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"patterns":[{"match":"(?i)[-+]?(\\\\d+n?|n)(\\\\s*[-+]\\\\s*\\\\d+)?","name":"constant.numeric.css"},{"match":"(?i)even|odd","name":"support.constant.parity.css"}]}]},"functions":{"patterns":[{"begin":"(?i)(?<![-\\\\w])(calc)(\\\\()","beginCaptures":{"1":{"name":"support.function.calc.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.calc.css","patterns":[{"match":"[*/]|(?<=\\\\s|^)[-+](?=\\\\s|$)","name":"keyword.operator.arithmetic.css"},{"include":"#property-values"}]},{"begin":"(?i)(?<![-\\\\w])(rgba?|hsla?|hwb|lab|oklab|lch|oklch|color)(\\\\()","beginCaptures":{"1":{"name":"support.function.misc.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.color.css","patterns":[{"include":"#property-values"}]},{"begin":"(?i)(?<![-\\\\w])((?:-(?:webkit-|moz-|o-))?(?:repeating-)?(?:linear|radial|conic)-gradient)(\\\\()","beginCaptures":{"1":{"name":"support.function.gradient.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.gradient.css","patterns":[{"match":"(?i)(?<![-\\\\w])(from|to|at|in|hue)(?![-\\\\w])","name":"keyword.operator.gradient.css"},{"include":"#property-values"}]},{"begin":"(?i)(?<![-\\\\w])(-webkit-gradient)(\\\\()","beginCaptures":{"1":{"name":"invalid.deprecated.gradient.function.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.gradient.invalid.deprecated.gradient.css","patterns":[{"begin":"(?i)(?<![-\\\\w])(from|to|color-stop)(\\\\()","beginCaptures":{"1":{"name":"invalid.deprecated.function.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"patterns":[{"include":"#property-values"}]},{"include":"#property-values"}]},{"begin":"(?i)(?<![-\\\\w])(annotation|attr|blur|brightness|character-variant|clamp|contrast|counters?|cross-fade|drop-shadow|element|fit-content|format|grayscale|hue-rotate|color-mix|image-set|invert|local|max|min|minmax|opacity|ornaments|repeat|saturate|sepia|styleset|stylistic|swash|symbols|cos|sin|tan|acos|asin|atan2??|hypot|sqrt|pow|log|exp|abs|sign)(\\\\()","beginCaptures":{"1":{"name":"support.function.misc.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.misc.css","patterns":[{"match":"(?i)(?<=[\\",\\\\s]|\\\\*/|^)\\\\d+x(?=[\\"'),\\\\s]|/\\\\*|$)","name":"constant.numeric.other.density.css"},{"include":"#property-values"},{"match":"[^\\"'),\\\\s]+","name":"variable.parameter.misc.css"}]},{"begin":"(?i)(?<![-\\\\w])(circle|ellipse|inset|polygon|rect)(\\\\()","beginCaptures":{"1":{"name":"support.function.shape.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.shape.css","patterns":[{"match":"(?i)(?<=\\\\s|^|\\\\*/)(at|round)(?=\\\\s|/\\\\*|$)","name":"keyword.operator.shape.css"},{"include":"#property-values"}]},{"begin":"(?i)(?<![-\\\\w])(cubic-bezier|steps)(\\\\()","beginCaptures":{"1":{"name":"support.function.timing-function.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.timing-function.css","patterns":[{"match":"(?i)(?<![-\\\\w])(start|end)(?=\\\\s*\\\\)|$)","name":"support.constant.step-direction.css"},{"include":"#property-values"}]},{"begin":"(?i)(?<![-\\\\w])((?:translate|scale|rotate)(?:[XYZ]|3D)?|matrix(?:3D)?|skew[XY]?|perspective)(\\\\()","beginCaptures":{"1":{"name":"support.function.transform.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"patterns":[{"include":"#property-values"}]},{"include":"#url"},{"begin":"(?i)(?<![-\\\\w])(var)(\\\\()","beginCaptures":{"1":{"name":"support.function.misc.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.variable.css","patterns":[{"match":"--[-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*","name":"variable.argument.css"},{"include":"#property-values"}]}]},"media-feature-keywords":{"match":"(?i)(?<=^|[:\\\\s]|\\\\*/)(?:portrait|landscape|progressive|interlace|fullscreen|standalone|minimal-ui|browser|hover)(?=[)\\\\s]|$)","name":"support.constant.property-value.css"},"media-features":{"captures":{"1":{"name":"support.type.property-name.media.css"},"2":{"name":"support.type.property-name.media.css"},"3":{"name":"support.type.vendored.property-name.media.css"}},"match":"(?i)(?<=^|[(\\\\s]|\\\\*/)(?:((?:m(?:in-|ax-))?(?:height|width|aspect-ratio|color|color-index|monochrome|resolution)|grid|scan|orientation|display-mode|hover)|((?:m(?:in-|ax-))?device-(?:height|width|aspect-ratio))|((?:[-_](?:webkit|apple|khtml|epub|moz|ms|o|xv|ah|rim|atsc|hp|tc|wap|ro)|(?:mso|prince))-[-\\\\w]+(?=\\\\s*(?:/\\\\*(?:[^*]|\\\\*[^/])*\\\\*/)?\\\\s*[):])))(?=\\\\s|$|[):<=>]|/\\\\*)"},"media-query":{"begin":"\\\\G","end":"(?=\\\\s*[;{])","patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"include":"#media-types"},{"match":"(?i)(?<=\\\\s|^|,|\\\\*/)(only|not)(?=[{\\\\s]|/\\\\*|$)","name":"keyword.operator.logical.$1.media.css"},{"match":"(?i)(?<=\\\\s|^|\\\\*/|\\\\))and(?=\\\\s|/\\\\*|$)","name":"keyword.operator.logical.and.media.css"},{"match":",(?:(?:\\\\s*,)+|(?=\\\\s*[);{]))","name":"invalid.illegal.comma.css"},{"include":"#commas"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.css"}},"patterns":[{"include":"#media-features"},{"include":"#media-feature-keywords"},{"match":":","name":"punctuation.separator.key-value.css"},{"match":">=|<=|[<=>]","name":"keyword.operator.comparison.css"},{"captures":{"1":{"name":"constant.numeric.css"},"2":{"name":"keyword.operator.arithmetic.css"},"3":{"name":"constant.numeric.css"}},"match":"(\\\\d+)\\\\s*(/)\\\\s*(\\\\d+)","name":"meta.ratio.css"},{"include":"#numeric-values"},{"include":"#comment-block"}]}]},"media-query-list":{"begin":"(?=\\\\s*[^;{])","end":"(?=\\\\s*[;{])","patterns":[{"include":"#media-query"}]},"media-types":{"captures":{"1":{"name":"support.constant.media.css"},"2":{"name":"invalid.deprecated.constant.media.css"}},"match":"(?i)(?<=^|[,\\\\s]|\\\\*/)(?:(all|print|screen|speech)|(aural|braille|embossed|handheld|projection|tty|tv))(?=$|[,;{\\\\s]|/\\\\*)"},"numeric-values":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.constant.css"}},"match":"(#)(?:\\\\h{3,4}|\\\\h{6}|\\\\h{8})\\\\b","name":"constant.other.color.rgb-value.hex.css"},{"captures":{"1":{"name":"keyword.other.unit.percentage.css"},"2":{"name":"keyword.other.unit.\${2:/downcase}.css"}},"match":"(?i)(?<![-\\\\w])[-+]?(?:[0-9]+(?:\\\\.[0-9]+)?|\\\\.[0-9]+)(?:(?<=[0-9])E[-+]?[0-9]+)?(?:(%)|(deg|grad|rad|turn|Hz|kHz|ch|cm|em|ex|fr|in|mm|mozmm|pc|pt|px|q|rem|rch|rex|rlh|ic|ric|rcap|vh|vw|vb|vi|svh|svw|svb|svi|dvh|dvw|dvb|dvi|lvh|lvw|lvb|lvi|vmax|vmin|cqw|cqi|cqh|cqb|cqmin|cqmax|dpi|dpcm|dppx|s|ms)\\\\b)?","name":"constant.numeric.css"}]},"property-keywords":{"patterns":[{"match":"(?i)(?<![-\\\\w])(above|absolute|active|add|additive|after-edge|alias|all|all-petite-caps|all-scroll|all-small-caps|alpha|alphabetic|alternate|alternate-reverse|always|antialiased|auto|auto-fill|auto-fit|auto-pos|available|avoid|avoid-column|avoid-page|avoid-region|backwards|balance|baseline|before-edge|below|bevel|bidi-override|blink|block|block-axis|block-start|block-end|bold|bolder|border|border-box|both|bottom|bottom-outside|break-all|break-word|bullets|butt|capitalize|caption|cell|center|central|char|circle|clip|clone|close-quote|closest-corner|closest-side|col-resize|collapse|color|color-burn|color-dodge|column|column-reverse|common-ligatures|compact|condensed|contain|content|content-box|contents|context-menu|contextual|copy|cover|crisp-edges|crispEdges|crosshair|cyclic|dark|darken|dashed|decimal|default|dense|diagonal-fractions|difference|digits|disabled|disc|discretionary-ligatures|distribute|distribute-all-lines|distribute-letter|distribute-space|dot|dotted|double|double-circle|downleft|downright|e-resize|each-line|ease|ease-in|ease-in-out|ease-out|economy|ellipse|ellipsis|embed|end|evenodd|ew-resize|exact|exclude|exclusion|expanded|extends|extra-condensed|extra-expanded|fallback|farthest-corner|farthest-side|fill|fill-available|fill-box|filled|fit-content|fixed|flat|flex|flex-end|flex-start|flip|flow|flow-root|forwards|freeze|from-image|full-width|geometricPrecision|georgian|grab|grabbing|grayscale|grid|groove|hand|hanging|hard-light|help|hidden|hide|historical-forms|historical-ligatures|horizontal|horizontal-tb|hue|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|infinite|inherit|initial|inline|inline-axis|inline-block|inline-end|inline-flex|inline-grid|inline-list-item|inline-start|inline-table|inset|inside|inter-character|inter-ideograph|inter-word|intersect|invert|isolate|isolate-override|italic|jis04|jis78|jis83|jis90|justify|justify-all|kannada|keep-all|landscape|larger??|left|light|lighten|lighter|line|line-edge|line-through|linear|linearRGB|lining-nums|list-item|local|loose|lowercase|lr|lr-tb|ltr|luminance|luminosity|main-size|mandatory|manipulation|manual|margin-box|match-parent|match-source|mathematical|max-content|medium|menu|message-box|middle|min-content|miter|mixed|move|multiply|n-resize|narrower|ne-resize|nearest-neighbor|nesw-resize|newspaper|no-change|no-clip|no-close-quote|no-common-ligatures|no-contextual|no-discretionary-ligatures|no-drop|no-historical-ligatures|no-open-quote|no-repeat|none|nonzero|normal|not-allowed|nowrap|ns-resize|numbers|numeric|nw-resize|nwse-resize|oblique|oldstyle-nums|open|open-quote|optimizeLegibility|optimizeQuality|optimizeSpeed|optional|ordinal|outset|outside|over|overlay|overline|padding|padding-box|page|painted|pan-down|pan-left|pan-right|pan-up|pan-x|pan-y|paused|petite-caps|pixelated|plaintext|pointer|portrait|pre|pre-line|pre-wrap|preserve-3d|progress|progressive|proportional-nums|proportional-width|proximity|radial|recto|region|relative|remove|repeat|repeat-[xy]|reset-size|reverse|revert|revert-layer|ridge|right|rl|rl-tb|round|row|row-resize|row-reverse|row-severse|rtl|ruby|ruby-base|ruby-base-container|ruby-text|ruby-text-container|run-in|running|s-resize|saturation|scale-down|screen|scroll|scroll-position|se-resize|semi-condensed|semi-expanded|separate|sesame|show|sideways|sideways-left|sideways-lr|sideways-right|sideways-rl|simplified|slashed-zero|slice|small|small-caps|small-caption|smaller|smooth|soft-light|solid|space|space-around|space-between|space-evenly|spell-out|square|sRGB|stacked-fractions|start|static|status-bar|swap|step-end|step-start|sticky|stretch|strict|stroke|stroke-box|style|sub|subgrid|subpixel-antialiased|subtract|super|sw-resize|symbolic|table|table-caption|table-cell|table-column|table-column-group|table-footer-group|table-header-group|table-row|table-row-group|tabular-nums|tb|tb-rl|text|text-after-edge|text-before-edge|text-bottom|text-top|thick|thin|titling-caps|top|top-outside|touch|traditional|transparent|triangle|ultra-condensed|ultra-expanded|under|underline|unicase|unset|upleft|uppercase|upright|use-glyph-orientation|use-script|verso|vertical|vertical-ideographic|vertical-lr|vertical-rl|vertical-text|view-box|visible|visibleFill|visiblePainted|visibleStroke|w-resize|wait|wavy|weight|whitespace|wider|words|wrap|wrap-reverse|x|x-large|x-small|xx-large|xx-small|y|zero|zoom-in|zoom-out)(?![-\\\\w])","name":"support.constant.property-value.css"},{"match":"(?i)(?<![-\\\\w])(arabic-indic|armenian|bengali|cambodian|circle|cjk-decimal|cjk-earthly-branch|cjk-heavenly-stem|cjk-ideographic|decimal|decimal-leading-zero|devanagari|disc|disclosure-closed|disclosure-open|ethiopic-halehame-am|ethiopic-halehame-ti-e[rt]|ethiopic-numeric|georgian|gujarati|gurmukhi|hangul|hangul-consonant|hebrew|hiragana|hiragana-iroha|japanese-formal|japanese-informal|kannada|katakana|katakana-iroha|khmer|korean-hangul-formal|korean-hanja-formal|korean-hanja-informal|lao|lower-alpha|lower-armenian|lower-greek|lower-latin|lower-roman|malayalam|mongolian|myanmar|oriya|persian|simp-chinese-formal|simp-chinese-informal|square|tamil|telugu|thai|tibetan|trad-chinese-formal|trad-chinese-informal|upper-alpha|upper-armenian|upper-latin|upper-roman|urdu)(?![-\\\\w])","name":"support.constant.property-value.list-style-type.css"},{"match":"(?<![-\\\\w])(?i:-(?:ah|apple|atsc|epub|hp|khtml|moz|ms|o|rim|ro|tc|wap|webkit|xv)|(?:mso|prince))-[-A-Za-z]+","name":"support.constant.vendored.property-value.css"},{"match":"(?<![-\\\\w])(?i:arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system-ui|system|tahoma|times|trebuchet|ui-monospace|ui-rounded|ui-sans-serif|ui-serif|utopia|verdana|webdings|sans-serif|serif|monospace)(?![-\\\\w])","name":"support.constant.font-name.css"}]},"property-names":{"patterns":[{"match":"(?i)(?<![-\\\\w])(?:accent-color|additive-symbols|align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|aspect-ratio|backdrop-filter|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-position-[xy]|background-repeat|background-size|bleed|block-size|border|border-block-end|border-block-end-color|border-block-end-style|border-block-end-width|border-block-start|border-block-start-color|border-block-start-style|border-block-start-width|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-end-end-radius|border-end-start-radius|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-inline-end|border-inline-end-color|border-inline-end-style|border-inline-end-width|border-inline-start|border-inline-start-color|border-inline-start-style|border-inline-start-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-start-end-radius|border-start-start-radius|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-decoration-break|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|caret-color|clear|clip|clip-path|clip-rule|color|color-adjust|color-interpolation-filters|color-scheme|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|contain|container|container-name|container-type|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|enable-background|fallback|fill|fill-opacity|fill-rule|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|flood-color|flood-opacity|font|font-display|font-family|font-feature-settings|font-kerning|font-language-override|font-optical-sizing|font-size|font-size-adjust|font-stretch|font-style|font-synthesis|font-variant|font-variant-alternates|font-variant-caps|font-variant-east-asian|font-variant-ligatures|font-variant-numeric|font-variant-position|font-variation-settings|font-weight|gap|glyph-orientation-horizontal|glyph-orientation-vertical|grid|grid-area|grid-auto-columns|grid-auto-flow|grid-auto-rows|grid-column|grid-column-end|grid-column-gap|grid-column-start|grid-gap|grid-row|grid-row-end|grid-row-gap|grid-row-start|grid-template|grid-template-areas|grid-template-columns|grid-template-rows|hanging-punctuation|height|hyphens|image-orientation|image-rendering|image-resolution|ime-mode|initial-letter|initial-letter-align|inline-size|inset|inset-block|inset-block-end|inset-block-start|inset-inline|inset-inline-end|inset-inline-start|isolation|justify-content|justify-items|justify-self|kerning|left|letter-spacing|lighting-color|line-break|line-clamp|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-block|margin-block-end|margin-block-start|margin-bottom|margin-inline|margin-inline-end|margin-inline-start|margin-left|margin-right|margin-top|marker-end|marker-mid|marker-start|marks|mask|mask-border|mask-border-mode|mask-border-outset|mask-border-repeat|mask-border-slice|mask-border-source|mask-border-width|mask-clip|mask-composite|mask-image|mask-mode|mask-origin|mask-position|mask-repeat|mask-size|mask-type|max-block-size|max-height|max-inline-size|max-lines|max-width|max-zoom|min-block-size|min-height|min-inline-size|min-width|min-zoom|mix-blend-mode|negative|object-fit|object-position|offset|offset-anchor|offset-distance|offset-path|offset-position|offset-rotation|opacity|order|orientation|orphans|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-anchor|overflow-block|overflow-inline|overflow-wrap|overflow-[xy]|overscroll-behavior|overscroll-behavior-block|overscroll-behavior-inline|overscroll-behavior-[xy]|pad|padding|padding-block|padding-block-end|padding-block-start|padding-bottom|padding-inline|padding-inline-end|padding-inline-start|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|paint-order|perspective|perspective-origin|place-content|place-items|place-self|pointer-events|position|prefix|quotes|range|resize|right|rotate|row-gap|ruby-align|ruby-merge|ruby-position|scale|scroll-behavior|scroll-margin|scroll-margin-block|scroll-margin-block-end|scroll-margin-block-start|scroll-margin-bottom|scroll-margin-inline|scroll-margin-inline-end|scroll-margin-inline-start|scroll-margin-left|scroll-margin-right|scroll-margin-top|scroll-padding|scroll-padding-block|scroll-padding-block-end|scroll-padding-block-start|scroll-padding-bottom|scroll-padding-inline|scroll-padding-inline-end|scroll-padding-inline-start|scroll-padding-left|scroll-padding-right|scroll-padding-top|scroll-snap-align|scroll-snap-coordinate|scroll-snap-destination|scroll-snap-stop|scroll-snap-type|scrollbar-color|scrollbar-gutter|scrollbar-width|shape-image-threshold|shape-margin|shape-outside|shape-rendering|size|speak-as|src|stop-color|stop-opacity|stroke|stroke-dasharray|stroke-dashoffset|stroke-linecap|stroke-linejoin|stroke-miterlimit|stroke-opacity|stroke-width|suffix|symbols|system|tab-size|table-layout|text-align|text-align-last|text-anchor|text-combine-upright|text-decoration|text-decoration-color|text-decoration-line|text-decoration-skip|text-decoration-skip-ink|text-decoration-style|text-decoration-thickness|text-emphasis|text-emphasis-color|text-emphasis-position|text-emphasis-style|text-indent|text-justify|text-orientation|text-overflow|text-rendering|text-shadow|text-size-adjust|text-transform|text-underline-offset|text-underline-position|top|touch-action|transform|transform-box|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|translate|unicode-bidi|unicode-range|user-select|user-zoom|vertical-align|visibility|white-space|widows|width|will-change|word-break|word-spacing|word-wrap|writing-mode|z-index|zoom|alignment-baseline|baseline-shift|clip-rule|color-interpolation|color-interpolation-filters|color-profile|color-rendering|cx|cy|dominant-baseline|enable-background|fill|fill-opacity|fill-rule|flood-color|flood-opacity|glyph-orientation-horizontal|glyph-orientation-vertical|height|kerning|lighting-color|marker-end|marker-mid|marker-start|rx??|ry|shape-rendering|stop-color|stop-opacity|stroke|stroke-dasharray|stroke-dashoffset|stroke-linecap|stroke-linejoin|stroke-miterlimit|stroke-opacity|stroke-width|text-anchor|width|[xy]|adjust|after|align|align-last|alignment|alignment-adjust|appearance|attachment|azimuth|background-break|balance|baseline|before|bidi|binding|bookmark|bookmark-label|bookmark-level|bookmark-target|border-length|bottom-color|bottom-left-radius|bottom-right-radius|bottom-style|bottom-width|box|box-align|box-direction|box-flex|box-flex-group|box-lines|box-ordinal-group|box-orient|box-pack|break|character|collapse|column|column-break-after|column-break-before|count|counter|crop|cue|cue-after|cue-before|decoration|decoration-break|delay|display-model|display-role|down|drop|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|duration|elevation|emphasis|family|fit|fit-position|flex-group|float-offset|gap|grid-columns|grid-rows|hanging-punctuation|header|hyphenate|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|icon|image|increment|indent|index|initial-after-adjust|initial-after-align|initial-before-adjust|initial-before-align|initial-size|initial-value|inline-box-align|iteration-count|justify|label|left-color|left-style|left-width|length|level|line|line-stacking|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|lines|list|mark|mark-after|mark-before|marks|marquee|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max|min|model|move-to|name|nav|nav-down|nav-index|nav-left|nav-right|nav-up|new|numeral|offset|ordinal-group|orient|origin|overflow-style|overhang|pack|page|page-policy|pause|pause-after|pause-before|phonemes|pitch|pitch-range|play-count|play-during|play-state|point|presentation|presentation-level|profile|property|punctuation|punctuation-trim|radius|rate|rendering-intent|repeat|replace|reset|resolution|resource|respond-to|rest|rest-after|rest-before|richness|right-color|right-style|right-width|role|rotation|rotation-point|rows|ruby|ruby-overhang|ruby-span|rule|rule-color|rule-style|rule-width|shadow|size|size-adjust|sizing|space|space-collapse|spacing|span|speak|speak-header|speak-numeral|speak-punctuation|speech|speech-rate|speed|stacking|stacking-ruby|stacking-shift|stacking-strategy|stress|stretch|string-set|style|style-image|style-position|style-type|target|target-name|target-new|target-position|text|text-height|text-justify|text-outline|text-replace|text-wrap|timing-function|top-color|top-left-radius|top-right-radius|top-style|top-width|trim|unicode|up|user-select|variant|voice|voice-balance|voice-duration|voice-family|voice-pitch|voice-pitch-range|voice-rate|voice-stress|voice-volume|volume|weight|white|white-space-collapse|word|wrap)(?![-\\\\w])","name":"support.type.property-name.css"},{"match":"(?<![-\\\\w])(?i:-(?:ah|apple|atsc|epub|hp|khtml|moz|ms|o|rim|ro|tc|wap|webkit|xv)|(?:mso|prince))-[-A-Za-z]+","name":"support.type.vendored.property-name.css"}]},"property-values":{"patterns":[{"include":"#commas"},{"include":"#comment-block"},{"include":"#escapes"},{"include":"#functions"},{"include":"#property-keywords"},{"include":"#unicode-range"},{"include":"#numeric-values"},{"include":"#color-keywords"},{"include":"#string"},{"match":"!\\\\s*important(?![-\\\\w])","name":"keyword.other.important.css"}]},"pseudo-classes":{"captures":{"1":{"name":"punctuation.definition.entity.css"},"2":{"name":"invalid.illegal.colon.css"}},"match":"(?i)(:)(:*)(?:active|any-link|checked|default|disabled|empty|enabled|first|(?:first|last|only)-(?:child|of-type)|focus|focus-visible|focus-within|fullscreen|host|hover|in-range|indeterminate|invalid|left|link|optional|out-of-range|read-only|read-write|required|right|root|scope|target|unresolved|valid|visited)(?![-\\\\w]|\\\\s*[;}])","name":"entity.other.attribute-name.pseudo-class.css"},"pseudo-elements":{"captures":{"1":{"name":"punctuation.definition.entity.css"},"2":{"name":"punctuation.definition.entity.css"}},"match":"(?i)(?:(::?)(?:after|before|first-letter|first-line|(?:-(?:ah|apple|atsc|epub|hp|khtml|moz|ms|o|rim|ro|tc|wap|webkit|xv)|(?:mso|prince))-[-a-z]+)|(::)(?:backdrop|content|grammar-error|marker|placeholder|selection|shadow|spelling-error))(?![-\\\\w]|\\\\s*[;}])","name":"entity.other.attribute-name.pseudo-element.css"},"rule-list":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.property-list.begin.bracket.curly.css"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.property-list.end.bracket.curly.css"}},"name":"meta.property-list.css","patterns":[{"include":"#rule-list-innards"}]},"rule-list-innards":{"patterns":[{"include":"#comment-block"},{"include":"#escapes"},{"include":"#font-features"},{"match":"(?<![-\\\\w])--[-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*","name":"variable.css"},{"begin":"(?<![-A-Za-z])(?=[-A-Za-z])","end":"$|(?![-A-Za-z])","name":"meta.property-name.css","patterns":[{"include":"#property-names"}]},{"begin":"(:)\\\\s*","beginCaptures":{"1":{"name":"punctuation.separator.key-value.css"}},"contentName":"meta.property-value.css","end":"\\\\s*(;)|\\\\s*(?=[)}])","endCaptures":{"1":{"name":"punctuation.terminator.rule.css"}},"patterns":[{"include":"#comment-block"},{"include":"#property-values"}]},{"match":";","name":"punctuation.terminator.rule.css"}]},"selector":{"begin":"(?=\\\\|?(?:[-#*.:A-\\\\[_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.)))","end":"(?=\\\\s*[)/@{])","name":"meta.selector.css","patterns":[{"include":"#selector-innards"}]},"selector-innards":{"patterns":[{"include":"#comment-block"},{"include":"#commas"},{"include":"#escapes"},{"include":"#combinators"},{"captures":{"1":{"name":"entity.other.namespace-prefix.css"},"2":{"name":"punctuation.separator.css"}},"match":"(?:^|(?<=[(,;}\\\\s]))(?![-*\\\\w]+\\\\|(?![-#*.:A-\\\\[_a-z[^\\\\x00-\\\\x7F]]))([-A-Z_a-z[^\\\\x00-\\\\x7F]](?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*|\\\\*)?(\\\\|)"},{"include":"#tag-names"},{"match":"\\\\*","name":"entity.name.tag.wildcard.css"},{"captures":{"1":{"name":"punctuation.definition.entity.css"},"2":{"patterns":[{"include":"#escapes"}]}},"match":"(?<![-@\\\\w])([#.])((?:-?[0-9]|-(?=$|[#)+,.:>\\\\[{|~\\\\s]|/\\\\*)|(?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*(?:[]!\\"%-(*;<?@^\`|}]|/(?!\\\\*))+)(?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))*)","name":"invalid.illegal.bad-identifier.css"},{"captures":{"1":{"name":"punctuation.definition.entity.css"},"2":{"patterns":[{"include":"#escapes"}]}},"match":"(\\\\.)((?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))+)(?=$|[#)+,.:>\\\\[{|~\\\\s]|/\\\\*)","name":"entity.other.attribute-name.class.css"},{"captures":{"1":{"name":"punctuation.definition.entity.css"},"2":{"patterns":[{"include":"#escapes"}]}},"match":"(#)(-?(?![0-9])(?:[-0-9A-Z_a-z[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))+)(?=$|[#)+,.:>\\\\[{|~\\\\s]|/\\\\*)","name":"entity.other.attribute-name.id.css"},{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.entity.begin.bracket.square.css"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.entity.end.bracket.square.css"}},"name":"meta.attribute-selector.css","patterns":[{"include":"#comment-block"},{"include":"#string"},{"captures":{"1":{"name":"storage.modifier.ignore-case.css"}},"match":"(?<=[\\"'\\\\s]|^|\\\\*/)\\\\s*([Ii])\\\\s*(?=[]\\\\s]|/\\\\*|$)"},{"captures":{"1":{"name":"string.unquoted.attribute-value.css","patterns":[{"include":"#escapes"}]}},"match":"(?<==)\\\\s*((?!/\\\\*)(?:[^]\\"'\\\\\\\\\\\\s]|\\\\\\\\.)+)"},{"include":"#escapes"},{"match":"[$*^|~]?=","name":"keyword.operator.pattern.css"},{"match":"\\\\|","name":"punctuation.separator.css"},{"captures":{"1":{"name":"entity.other.namespace-prefix.css","patterns":[{"include":"#escapes"}]}},"match":"(-?(?!\\\\d)(?:[-\\\\w[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))+|\\\\*)(?=\\\\|(?![=\\\\s]|$|])(?:-?(?!\\\\d)|[-\\\\\\\\\\\\w[^\\\\x00-\\\\x7F]]))"},{"captures":{"1":{"name":"entity.other.attribute-name.css","patterns":[{"include":"#escapes"}]}},"match":"(-?(?!\\\\d)(?>[-\\\\w[^\\\\x00-\\\\x7F]]|\\\\\\\\(?:\\\\h{1,6}|.))+)\\\\s*(?=[]$*=^|~]|/\\\\*)"}]},{"include":"#pseudo-classes"},{"include":"#pseudo-elements"},{"include":"#functional-pseudo-classes"},{"match":"(?<![-@\\\\w])(?=[a-z]\\\\w*-)(?:(?![A-Z])[-\\\\w])+(?![-(\\\\w])","name":"entity.name.tag.custom.css"}]},"string":{"patterns":[{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.css"}},"end":"\\"|(?<!\\\\\\\\)(?=$|\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.css"}},"name":"string.quoted.double.css","patterns":[{"begin":"(?:\\\\G|^)(?=(?:[^\\"\\\\\\\\]|\\\\\\\\.)+$)","end":"$","name":"invalid.illegal.unclosed.string.css","patterns":[{"include":"#escapes"}]},{"include":"#escapes"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.css"}},"end":"'|(?<!\\\\\\\\)(?=$|\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.css"}},"name":"string.quoted.single.css","patterns":[{"begin":"(?:\\\\G|^)(?=(?:[^'\\\\\\\\]|\\\\\\\\.)+$)","end":"$","name":"invalid.illegal.unclosed.string.css","patterns":[{"include":"#escapes"}]},{"include":"#escapes"}]}]},"tag-names":{"match":"(?i)(?<![-:\\\\w])(?:a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdi|bdo|bgsound|big|blink|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|content|data|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|element|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h[1-6]|head|header|hgroup|hr|html|i|iframe|image|img|input|ins|isindex|kbd|keygen|label|legend|li|link|listing|main|map|mark|marquee|math|menu|menuitem|meta|meter|multicol|nav|nextid|nobr|noembed|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|plaintext|pre|progress|q|rb|rp|rtc??|ruby|s|samp|script|section|select|shadow|slot|small|source|spacer|span|strike|strong|style|sub|summary|sup|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|tt|ul??|var|video|wbr|xmp|altGlyph|altGlyphDef|altGlyphItem|animate|animateColor|animateMotion|animateTransform|circle|clipPath|color-profile|cursor|defs|desc|discard|ellipse|feBlend|feColorMatrix|feComponentTransfer|feComposite|feConvolveMatrix|feDiffuseLighting|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feImage|feMerge|feMergeNode|feMorphology|feOffset|fePointLight|feSpecularLighting|feSpotLight|feTile|feTurbulence|filter|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|foreignObject|g|glyph|glyphRef|hatch|hatchpath|hkern|line|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|metadata|missing-glyph|mpath|path|pattern|polygon|polyline|radialGradient|rect|set|solidcolor|stop|svg|switch|symbol|text|textPath|tref|tspan|use|view|vkern|annotation|annotation-xml|maction|maligngroup|malignmark|math|menclose|merror|mfenced|mfrac|mglyph|mi|mlabeledtr|mlongdiv|mmultiscripts|mn|mo|mover|mpadded|mphantom|mroot|mrow|ms|mscarries|mscarry|msgroup|msline|mspace|msqrt|msrow|mstack|mstyle|msub|msubsup|msup|mtable|mtd|mtext|mtr|munder|munderover|semantics)(?=[#)+,.:>\\\\[{|~\\\\s]|/\\\\*|$)","name":"entity.name.tag.css"},"unicode-range":{"captures":{"0":{"name":"constant.other.unicode-range.css"},"1":{"name":"punctuation.separator.dash.unicode-range.css"}},"match":"(?<![-\\\\w])[Uu]\\\\+[?\\\\h]{1,6}(?:(-)\\\\h{1,6})?(?![-\\\\w])"},"url":{"begin":"(?i)(?<![-@\\\\w])(url)(\\\\()","beginCaptures":{"1":{"name":"support.function.url.css"},"2":{"name":"punctuation.section.function.begin.bracket.round.css"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.function.end.bracket.round.css"}},"name":"meta.function.url.css","patterns":[{"match":"[^\\"')\\\\s]+","name":"variable.parameter.url.css"},{"include":"#string"},{"include":"#comment-block"},{"include":"#escapes"}]}},"scopeName":"source.css"}`))],Qte=Object.freeze(JSON.parse(`{"colors":{"activityBar.activeBorder":"#4d9375","activityBar.background":"#000","activityBar.border":"#191919","activityBar.foreground":"#dbd7cacc","activityBar.inactiveForeground":"#dedcd550","activityBarBadge.background":"#bfbaaa","activityBarBadge.foreground":"#000","badge.background":"#dedcd590","badge.foreground":"#000","breadcrumb.activeSelectionForeground":"#eeeeee18","breadcrumb.background":"#121212","breadcrumb.focusForeground":"#dbd7cacc","breadcrumb.foreground":"#959da5","breadcrumbPicker.background":"#000","button.background":"#4d9375","button.foreground":"#000","button.hoverBackground":"#4d9375","checkbox.background":"#121212","checkbox.border":"#2f363d","debugToolBar.background":"#000","descriptionForeground":"#dedcd590","diffEditor.insertedTextBackground":"#4d937550","diffEditor.removedTextBackground":"#ab595950","dropdown.background":"#000","dropdown.border":"#191919","dropdown.foreground":"#dbd7cacc","dropdown.listBackground":"#121212","editor.background":"#000","editor.findMatchBackground":"#e6cc7722","editor.findMatchHighlightBackground":"#e6cc7744","editor.focusedStackFrameHighlightBackground":"#b808","editor.foldBackground":"#eeeeee10","editor.foreground":"#dbd7cacc","editor.inactiveSelectionBackground":"#eeeeee10","editor.lineHighlightBackground":"#121212","editor.selectionBackground":"#eeeeee18","editor.selectionHighlightBackground":"#eeeeee10","editor.stackFrameHighlightBackground":"#a707","editor.wordHighlightBackground":"#1c6b4805","editor.wordHighlightStrongBackground":"#1c6b4810","editorBracketHighlight.foreground1":"#5eaab5","editorBracketHighlight.foreground2":"#4d9375","editorBracketHighlight.foreground3":"#d4976c","editorBracketHighlight.foreground4":"#d9739f","editorBracketHighlight.foreground5":"#e6cc77","editorBracketHighlight.foreground6":"#6394bf","editorBracketMatch.background":"#4d937520","editorError.foreground":"#cb7676","editorGroup.border":"#191919","editorGroupHeader.tabsBackground":"#000","editorGroupHeader.tabsBorder":"#191919","editorGutter.addedBackground":"#4d9375","editorGutter.commentRangeForeground":"#dedcd550","editorGutter.deletedBackground":"#cb7676","editorGutter.foldingControlForeground":"#dedcd590","editorGutter.modifiedBackground":"#6394bf","editorHint.foreground":"#4d9375","editorIndentGuide.activeBackground":"#ffffff30","editorIndentGuide.background":"#ffffff15","editorInfo.foreground":"#6394bf","editorInlayHint.background":"#121212","editorInlayHint.foreground":"#444444","editorLineNumber.activeForeground":"#bfbaaa","editorLineNumber.foreground":"#dedcd550","editorOverviewRuler.border":"#111","editorStickyScroll.background":"#121212","editorStickyScrollHover.background":"#121212","editorWarning.foreground":"#d4976c","editorWhitespace.foreground":"#ffffff15","editorWidget.background":"#000","errorForeground":"#cb7676","focusBorder":"#00000000","foreground":"#dbd7cacc","gitDecoration.addedResourceForeground":"#4d9375","gitDecoration.conflictingResourceForeground":"#d4976c","gitDecoration.deletedResourceForeground":"#cb7676","gitDecoration.ignoredResourceForeground":"#dedcd550","gitDecoration.modifiedResourceForeground":"#6394bf","gitDecoration.submoduleResourceForeground":"#dedcd590","gitDecoration.untrackedResourceForeground":"#5eaab5","input.background":"#121212","input.border":"#191919","input.foreground":"#dbd7cacc","input.placeholderForeground":"#dedcd590","inputOption.activeBackground":"#dedcd550","list.activeSelectionBackground":"#121212","list.activeSelectionForeground":"#dbd7cacc","list.focusBackground":"#121212","list.highlightForeground":"#4d9375","list.hoverBackground":"#121212","list.hoverForeground":"#dbd7cacc","list.inactiveFocusBackground":"#000","list.inactiveSelectionBackground":"#121212","list.inactiveSelectionForeground":"#dbd7cacc","menu.separatorBackground":"#191919","notificationCenterHeader.background":"#000","notificationCenterHeader.foreground":"#959da5","notifications.background":"#000","notifications.border":"#191919","notifications.foreground":"#dbd7cacc","notificationsErrorIcon.foreground":"#cb7676","notificationsInfoIcon.foreground":"#6394bf","notificationsWarningIcon.foreground":"#d4976c","panel.background":"#000","panel.border":"#191919","panelInput.border":"#2f363d","panelTitle.activeBorder":"#4d9375","panelTitle.activeForeground":"#dbd7cacc","panelTitle.inactiveForeground":"#959da5","peekViewEditor.background":"#000","peekViewEditor.matchHighlightBackground":"#ffd33d33","peekViewResult.background":"#000","peekViewResult.matchHighlightBackground":"#ffd33d33","pickerGroup.border":"#191919","pickerGroup.foreground":"#dbd7cacc","problemsErrorIcon.foreground":"#cb7676","problemsInfoIcon.foreground":"#6394bf","problemsWarningIcon.foreground":"#d4976c","progressBar.background":"#4d9375","quickInput.background":"#000","quickInput.foreground":"#dbd7cacc","quickInputList.focusBackground":"#121212","scrollbar.shadow":"#0000","scrollbarSlider.activeBackground":"#dedcd550","scrollbarSlider.background":"#dedcd510","scrollbarSlider.hoverBackground":"#dedcd550","settings.headerForeground":"#dbd7cacc","settings.modifiedItemIndicator":"#4d9375","sideBar.background":"#000","sideBar.border":"#191919","sideBar.foreground":"#bfbaaa","sideBarSectionHeader.background":"#000","sideBarSectionHeader.border":"#191919","sideBarSectionHeader.foreground":"#dbd7cacc","sideBarTitle.foreground":"#dbd7cacc","statusBar.background":"#000","statusBar.border":"#191919","statusBar.debuggingBackground":"#121212","statusBar.debuggingForeground":"#bfbaaa","statusBar.foreground":"#bfbaaa","statusBar.noFolderBackground":"#000","statusBarItem.prominentBackground":"#121212","tab.activeBackground":"#000","tab.activeBorder":"#191919","tab.activeBorderTop":"#dedcd590","tab.activeForeground":"#dbd7cacc","tab.border":"#191919","tab.hoverBackground":"#121212","tab.inactiveBackground":"#000","tab.inactiveForeground":"#959da5","tab.unfocusedActiveBorder":"#191919","tab.unfocusedActiveBorderTop":"#191919","tab.unfocusedHoverBackground":"#000","terminal.ansiBlack":"#393a34","terminal.ansiBlue":"#6394bf","terminal.ansiBrightBlack":"#777777","terminal.ansiBrightBlue":"#6394bf","terminal.ansiBrightCyan":"#5eaab5","terminal.ansiBrightGreen":"#4d9375","terminal.ansiBrightMagenta":"#d9739f","terminal.ansiBrightRed":"#cb7676","terminal.ansiBrightWhite":"#ffffff","terminal.ansiBrightYellow":"#e6cc77","terminal.ansiCyan":"#5eaab5","terminal.ansiGreen":"#4d9375","terminal.ansiMagenta":"#d9739f","terminal.ansiRed":"#cb7676","terminal.ansiWhite":"#dbd7ca","terminal.ansiYellow":"#e6cc77","terminal.foreground":"#dbd7cacc","terminal.selectionBackground":"#eeeeee18","textBlockQuote.background":"#000","textBlockQuote.border":"#191919","textCodeBlock.background":"#000","textLink.activeForeground":"#4d9375","textLink.foreground":"#4d9375","textPreformat.foreground":"#d1d5da","textSeparator.foreground":"#586069","titleBar.activeBackground":"#000","titleBar.activeForeground":"#bfbaaa","titleBar.border":"#121212","titleBar.inactiveBackground":"#000","titleBar.inactiveForeground":"#959da5","tree.indentGuidesStroke":"#2f363d","welcomePage.buttonBackground":"#2f363d","welcomePage.buttonHoverBackground":"#444d56"},"displayName":"Vitesse Black","name":"vitesse-black","semanticHighlighting":true,"semanticTokenColors":{"class":"#6872ab","interface":"#5d99a9","namespace":"#db889a","property":"#b8a965","type":"#5d99a9"},"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#758575dd"}},{"scope":["delimiter.bracket","delimiter","invalid.illegal.character-not-allowed-here.html","keyword.operator.rest","keyword.operator.spread","keyword.operator.type.annotation","keyword.operator.relational","keyword.operator.assignment","keyword.operator.type","meta.brace","meta.tag.block.any.html","meta.tag.inline.any.html","meta.tag.structure.input.void.html","meta.type.annotation","meta.embedded.block.github-actions-expression","storage.type.function.arrow","meta.objectliteral.ts","punctuation","punctuation.definition.string.begin.html.vue","punctuation.definition.string.end.html.vue"],"settings":{"foreground":"#444444"}},{"scope":["constant","entity.name.constant","variable.language","meta.definition.variable"],"settings":{"foreground":"#c99076"}},{"scope":["entity","entity.name"],"settings":{"foreground":"#80a665"}},{"scope":"variable.parameter.function","settings":{"foreground":"#dbd7cacc"}},{"scope":["entity.name.tag","tag.html"],"settings":{"foreground":"#4d9375"}},{"scope":"entity.name.function","settings":{"foreground":"#80a665"}},{"scope":["keyword","storage.type.class.jsdoc","punctuation.definition.template-expression"],"settings":{"foreground":"#4d9375"}},{"scope":["storage","storage.type","support.type.builtin","constant.language.undefined","constant.language.null","constant.language.import-export-all.ts"],"settings":{"foreground":"#cb7676"}},{"scope":["text.html.derivative","storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#dbd7cacc"}},{"scope":["string","string punctuation.section.embedded source","attribute.value"],"settings":{"foreground":"#c98a7d"}},{"scope":["punctuation.definition.string"],"settings":{"foreground":"#c98a7d77"}},{"scope":["punctuation.support.type.property-name"],"settings":{"foreground":"#b8a96577"}},{"scope":"support","settings":{"foreground":"#b8a965"}},{"scope":["property","meta.property-name","meta.object-literal.key","entity.name.tag.yaml","attribute.name"],"settings":{"foreground":"#b8a965"}},{"scope":["entity.other.attribute-name","invalid.deprecated.entity.other.attribute-name.html"],"settings":{"foreground":"#bd976a"}},{"scope":["variable","identifier"],"settings":{"foreground":"#bd976a"}},{"scope":["support.type.primitive","entity.name.type"],"settings":{"foreground":"#5DA994"}},{"scope":"namespace","settings":{"foreground":"#db889a"}},{"scope":["keyword.operator","keyword.operator.assignment.compound","meta.var.expr.ts"],"settings":{"foreground":"#cb7676"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"carriage-return","settings":{"background":"#f97583","content":"^M","fontStyle":"italic underline","foreground":"#24292e"}},{"scope":"message.error","settings":{"foreground":"#fdaeb7"}},{"scope":"string variable","settings":{"foreground":"#c98a7d"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#c4704f"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#c98a7d"}},{"scope":"string.regexp constant.character.escape","settings":{"foreground":"#e6cc77"}},{"scope":["support.constant"],"settings":{"foreground":"#c99076"}},{"scope":["keyword.operator.quantifier.regexp","constant.numeric","number"],"settings":{"foreground":"#4C9A91"}},{"scope":["keyword.other.unit"],"settings":{"foreground":"#cb7676"}},{"scope":["constant.language.boolean","constant.language"],"settings":{"foreground":"#4d9375"}},{"scope":"meta.module-reference","settings":{"foreground":"#4d9375"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#d4976c"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#4d9375"}},{"scope":"markup.quote","settings":{"foreground":"#5d99a9"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#dbd7cacc"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#dbd7cacc"}},{"scope":"markup.raw","settings":{"foreground":"#4d9375"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#86181d","foreground":"#fdaeb7"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#144620","foreground":"#85e89d"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#c24e00","foreground":"#ffab70"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#79b8ff","foreground":"#2f363d"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#b392f0"}},{"scope":"meta.diff.header","settings":{"foreground":"#79b8ff"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#79b8ff"}},{"scope":"meta.output","settings":{"foreground":"#79b8ff"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#d1d5da"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#fdaeb7"}},{"scope":["constant.other.reference.link","string.other.link","punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown"],"settings":{"foreground":"#c98a7d"}},{"scope":["markup.underline.link.markdown","markup.underline.link.image.markdown"],"settings":{"fontStyle":"underline","foreground":"#dedcd590"}},{"scope":["type.identifier","constant.other.character-class.regexp"],"settings":{"foreground":"#6872ab"}},{"scope":["entity.other.attribute-name.html.vue"],"settings":{"foreground":"#80a665"}},{"scope":["invalid.illegal.unrecognized-tag.html"],"settings":{"fontStyle":"normal"}}],"type":"dark"}`)),$te=Object.freeze(JSON.parse(`{"colors":{"activityBar.activeBorder":"#1c6b48","activityBar.background":"#ffffff","activityBar.border":"#f0f0f0","activityBar.foreground":"#393a34","activityBar.inactiveForeground":"#393a3450","activityBarBadge.background":"#4e4f47","activityBarBadge.foreground":"#ffffff","badge.background":"#393a3490","badge.foreground":"#ffffff","breadcrumb.activeSelectionForeground":"#22222218","breadcrumb.background":"#f7f7f7","breadcrumb.focusForeground":"#393a34","breadcrumb.foreground":"#6a737d","breadcrumbPicker.background":"#ffffff","button.background":"#1c6b48","button.foreground":"#ffffff","button.hoverBackground":"#1c6b48","checkbox.background":"#f7f7f7","checkbox.border":"#d1d5da","debugToolBar.background":"#ffffff","descriptionForeground":"#393a3490","diffEditor.insertedTextBackground":"#1c6b4830","diffEditor.removedTextBackground":"#ab595940","dropdown.background":"#ffffff","dropdown.border":"#f0f0f0","dropdown.foreground":"#393a34","dropdown.listBackground":"#f7f7f7","editor.background":"#ffffff","editor.findMatchBackground":"#e6cc7744","editor.findMatchHighlightBackground":"#e6cc7766","editor.focusedStackFrameHighlightBackground":"#fff5b1","editor.foldBackground":"#22222210","editor.foreground":"#393a34","editor.inactiveSelectionBackground":"#22222210","editor.lineHighlightBackground":"#f7f7f7","editor.selectionBackground":"#22222218","editor.selectionHighlightBackground":"#22222210","editor.stackFrameHighlightBackground":"#fffbdd","editor.wordHighlightBackground":"#1c6b4805","editor.wordHighlightStrongBackground":"#1c6b4810","editorBracketHighlight.foreground1":"#2993a3","editorBracketHighlight.foreground2":"#1e754f","editorBracketHighlight.foreground3":"#a65e2b","editorBracketHighlight.foreground4":"#a13865","editorBracketHighlight.foreground5":"#bda437","editorBracketHighlight.foreground6":"#296aa3","editorBracketMatch.background":"#1c6b4820","editorError.foreground":"#ab5959","editorGroup.border":"#f0f0f0","editorGroupHeader.tabsBackground":"#ffffff","editorGroupHeader.tabsBorder":"#f0f0f0","editorGutter.addedBackground":"#1e754f","editorGutter.commentRangeForeground":"#393a3450","editorGutter.deletedBackground":"#ab5959","editorGutter.foldingControlForeground":"#393a3490","editorGutter.modifiedBackground":"#296aa3","editorHint.foreground":"#1e754f","editorIndentGuide.activeBackground":"#00000030","editorIndentGuide.background":"#00000015","editorInfo.foreground":"#296aa3","editorInlayHint.background":"#f7f7f7","editorInlayHint.foreground":"#999999","editorLineNumber.activeForeground":"#4e4f47","editorLineNumber.foreground":"#393a3450","editorOverviewRuler.border":"#fff","editorStickyScroll.background":"#f7f7f7","editorStickyScrollHover.background":"#f7f7f7","editorWarning.foreground":"#a65e2b","editorWhitespace.foreground":"#00000015","editorWidget.background":"#ffffff","errorForeground":"#ab5959","focusBorder":"#00000000","foreground":"#393a34","gitDecoration.addedResourceForeground":"#1e754f","gitDecoration.conflictingResourceForeground":"#a65e2b","gitDecoration.deletedResourceForeground":"#ab5959","gitDecoration.ignoredResourceForeground":"#393a3450","gitDecoration.modifiedResourceForeground":"#296aa3","gitDecoration.submoduleResourceForeground":"#393a3490","gitDecoration.untrackedResourceForeground":"#2993a3","input.background":"#f7f7f7","input.border":"#f0f0f0","input.foreground":"#393a34","input.placeholderForeground":"#393a3490","inputOption.activeBackground":"#393a3450","list.activeSelectionBackground":"#f7f7f7","list.activeSelectionForeground":"#393a34","list.focusBackground":"#f7f7f7","list.highlightForeground":"#1c6b48","list.hoverBackground":"#f7f7f7","list.hoverForeground":"#393a34","list.inactiveFocusBackground":"#ffffff","list.inactiveSelectionBackground":"#f7f7f7","list.inactiveSelectionForeground":"#393a34","menu.separatorBackground":"#f0f0f0","notificationCenterHeader.background":"#ffffff","notificationCenterHeader.foreground":"#6a737d","notifications.background":"#ffffff","notifications.border":"#f0f0f0","notifications.foreground":"#393a34","notificationsErrorIcon.foreground":"#ab5959","notificationsInfoIcon.foreground":"#296aa3","notificationsWarningIcon.foreground":"#a65e2b","panel.background":"#ffffff","panel.border":"#f0f0f0","panelInput.border":"#e1e4e8","panelTitle.activeBorder":"#1c6b48","panelTitle.activeForeground":"#393a34","panelTitle.inactiveForeground":"#6a737d","peekViewEditor.background":"#ffffff","peekViewResult.background":"#ffffff","pickerGroup.border":"#f0f0f0","pickerGroup.foreground":"#393a34","problemsErrorIcon.foreground":"#ab5959","problemsInfoIcon.foreground":"#296aa3","problemsWarningIcon.foreground":"#a65e2b","progressBar.background":"#1c6b48","quickInput.background":"#ffffff","quickInput.foreground":"#393a34","quickInputList.focusBackground":"#f7f7f7","scrollbar.shadow":"#6a737d33","scrollbarSlider.activeBackground":"#393a3450","scrollbarSlider.background":"#393a3410","scrollbarSlider.hoverBackground":"#393a3450","settings.headerForeground":"#393a34","settings.modifiedItemIndicator":"#1c6b48","sideBar.background":"#ffffff","sideBar.border":"#f0f0f0","sideBar.foreground":"#4e4f47","sideBarSectionHeader.background":"#ffffff","sideBarSectionHeader.border":"#f0f0f0","sideBarSectionHeader.foreground":"#393a34","sideBarTitle.foreground":"#393a34","statusBar.background":"#ffffff","statusBar.border":"#f0f0f0","statusBar.debuggingBackground":"#f7f7f7","statusBar.debuggingForeground":"#4e4f47","statusBar.foreground":"#4e4f47","statusBar.noFolderBackground":"#ffffff","statusBarItem.prominentBackground":"#f7f7f7","tab.activeBackground":"#ffffff","tab.activeBorder":"#f0f0f0","tab.activeBorderTop":"#393a3490","tab.activeForeground":"#393a34","tab.border":"#f0f0f0","tab.hoverBackground":"#f7f7f7","tab.inactiveBackground":"#ffffff","tab.inactiveForeground":"#6a737d","tab.unfocusedActiveBorder":"#f0f0f0","tab.unfocusedActiveBorderTop":"#f0f0f0","tab.unfocusedHoverBackground":"#ffffff","terminal.ansiBlack":"#121212","terminal.ansiBlue":"#296aa3","terminal.ansiBrightBlack":"#aaaaaa","terminal.ansiBrightBlue":"#296aa3","terminal.ansiBrightCyan":"#2993a3","terminal.ansiBrightGreen":"#1e754f","terminal.ansiBrightMagenta":"#a13865","terminal.ansiBrightRed":"#ab5959","terminal.ansiBrightWhite":"#dddddd","terminal.ansiBrightYellow":"#bda437","terminal.ansiCyan":"#2993a3","terminal.ansiGreen":"#1e754f","terminal.ansiMagenta":"#a13865","terminal.ansiRed":"#ab5959","terminal.ansiWhite":"#dbd7ca","terminal.ansiYellow":"#bda437","terminal.foreground":"#393a34","terminal.selectionBackground":"#22222218","textBlockQuote.background":"#ffffff","textBlockQuote.border":"#f0f0f0","textCodeBlock.background":"#ffffff","textLink.activeForeground":"#1c6b48","textLink.foreground":"#1c6b48","textPreformat.foreground":"#586069","textSeparator.foreground":"#d1d5da","titleBar.activeBackground":"#ffffff","titleBar.activeForeground":"#4e4f47","titleBar.border":"#f7f7f7","titleBar.inactiveBackground":"#ffffff","titleBar.inactiveForeground":"#6a737d","tree.indentGuidesStroke":"#e1e4e8","welcomePage.buttonBackground":"#f6f8fa","welcomePage.buttonHoverBackground":"#e1e4e8"},"displayName":"Vitesse Light","name":"vitesse-light","semanticHighlighting":true,"semanticTokenColors":{"class":"#5a6aa6","interface":"#2e808f","namespace":"#b05a78","property":"#998418","type":"#2e808f"},"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#a0ada0"}},{"scope":["delimiter.bracket","delimiter","invalid.illegal.character-not-allowed-here.html","keyword.operator.rest","keyword.operator.spread","keyword.operator.type.annotation","keyword.operator.relational","keyword.operator.assignment","keyword.operator.type","meta.brace","meta.tag.block.any.html","meta.tag.inline.any.html","meta.tag.structure.input.void.html","meta.type.annotation","meta.embedded.block.github-actions-expression","storage.type.function.arrow","meta.objectliteral.ts","punctuation","punctuation.definition.string.begin.html.vue","punctuation.definition.string.end.html.vue"],"settings":{"foreground":"#999999"}},{"scope":["constant","entity.name.constant","variable.language","meta.definition.variable"],"settings":{"foreground":"#a65e2b"}},{"scope":["entity","entity.name"],"settings":{"foreground":"#59873a"}},{"scope":"variable.parameter.function","settings":{"foreground":"#393a34"}},{"scope":["entity.name.tag","tag.html"],"settings":{"foreground":"#1e754f"}},{"scope":"entity.name.function","settings":{"foreground":"#59873a"}},{"scope":["keyword","storage.type.class.jsdoc","punctuation.definition.template-expression"],"settings":{"foreground":"#1e754f"}},{"scope":["storage","storage.type","support.type.builtin","constant.language.undefined","constant.language.null","constant.language.import-export-all.ts"],"settings":{"foreground":"#ab5959"}},{"scope":["text.html.derivative","storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#393a34"}},{"scope":["string","string punctuation.section.embedded source","attribute.value"],"settings":{"foreground":"#b56959"}},{"scope":["punctuation.definition.string"],"settings":{"foreground":"#b5695977"}},{"scope":["punctuation.support.type.property-name"],"settings":{"foreground":"#99841877"}},{"scope":"support","settings":{"foreground":"#998418"}},{"scope":["property","meta.property-name","meta.object-literal.key","entity.name.tag.yaml","attribute.name"],"settings":{"foreground":"#998418"}},{"scope":["entity.other.attribute-name","invalid.deprecated.entity.other.attribute-name.html"],"settings":{"foreground":"#b07d48"}},{"scope":["variable","identifier"],"settings":{"foreground":"#b07d48"}},{"scope":["support.type.primitive","entity.name.type"],"settings":{"foreground":"#2e8f82"}},{"scope":"namespace","settings":{"foreground":"#b05a78"}},{"scope":["keyword.operator","keyword.operator.assignment.compound","meta.var.expr.ts"],"settings":{"foreground":"#ab5959"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"carriage-return","settings":{"background":"#d73a49","content":"^M","fontStyle":"italic underline","foreground":"#fafbfc"}},{"scope":"message.error","settings":{"foreground":"#b31d28"}},{"scope":"string variable","settings":{"foreground":"#b56959"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#ab5e3f"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#b56959"}},{"scope":"string.regexp constant.character.escape","settings":{"foreground":"#bda437"}},{"scope":["support.constant"],"settings":{"foreground":"#a65e2b"}},{"scope":["keyword.operator.quantifier.regexp","constant.numeric","number"],"settings":{"foreground":"#2f798a"}},{"scope":["keyword.other.unit"],"settings":{"foreground":"#ab5959"}},{"scope":["constant.language.boolean","constant.language"],"settings":{"foreground":"#1e754f"}},{"scope":"meta.module-reference","settings":{"foreground":"#1c6b48"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#a65e2b"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#1c6b48"}},{"scope":"markup.quote","settings":{"foreground":"#2e808f"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#393a34"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#393a34"}},{"scope":"markup.raw","settings":{"foreground":"#1c6b48"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#ffeef0","foreground":"#b31d28"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#f0fff4","foreground":"#22863a"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#ffebda","foreground":"#e36209"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#005cc5","foreground":"#f6f8fa"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#6f42c1"}},{"scope":"meta.diff.header","settings":{"foreground":"#005cc5"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#005cc5"}},{"scope":"meta.output","settings":{"foreground":"#005cc5"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#586069"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#b31d28"}},{"scope":["constant.other.reference.link","string.other.link","punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown"],"settings":{"foreground":"#b56959"}},{"scope":["markup.underline.link.markdown","markup.underline.link.image.markdown"],"settings":{"fontStyle":"underline","foreground":"#393a3490"}},{"scope":["type.identifier","constant.other.character-class.regexp"],"settings":{"foreground":"#5a6aa6"}},{"scope":["entity.other.attribute-name.html.vue"],"settings":{"foreground":"#59873a"}},{"scope":["invalid.illegal.unrecognized-tag.html"],"settings":{"fontStyle":"normal"}}],"type":"light"}`));function T9(e){let{currentTheme:t,isGenerating:n}=Be(),[r,i]=(0,k.useState)(!1);function a(){let e=Ve(t);i(!0),F8(e),setTimeout(()=>i(!1),3e3)}return(0,A.jsxs)(_,{size:`sm`,variant:`secondary`,onClick:a,disabled:n,...e,children:[`Copy code`,r?(0,A.jsx)(vt,{}):(0,A.jsx)(Ct,{})]})}function ene(){let{theme:e}=ue(),{currentTheme:t,colorMode:n,setColorMode:r}=Be(),[i,a]=(0,k.useState)(``);return(0,k.useEffect)(()=>{if(!t)return;let n=Ve(t);(async()=>{let t=await qte({themes:[Qte,$te],langs:[Zte],engine:Xte()});a(t.codeToHtml(n,{lang:`css`,theme:e===`dark`?`vitesse-black`:`vitesse-light`})),t.dispose()})()},[t,e,n]),t?(0,A.jsxs)(d5,{className:`size-full relative pb-6`,children:[(0,A.jsxs)(`div`,{className:`sticky top-2 w-full flex items-center gap-2 justify-end z-10 pr-4`,children:[(0,A.jsxs)(k5,{value:n,onValueChange:r,children:[(0,A.jsx)(j5,{className:`uppercase backdrop-blur-md`,children:(0,A.jsx)(A5,{})}),(0,A.jsx)(M5,{children:[`oklch`,`hex`,`rgb`,`hsl`].map(e=>(0,A.jsx)(N5,{value:e,className:`uppercase`,children:e},e))})]}),(0,A.jsx)(T9,{size:`default`})]}),(0,A.jsx)(`div`,{className:`w-full sm:pb-20 mt-4 text-[13px] [&>pre]:px-4 [&>pre]:py-4 **:bg-transparent! [&>pre]:whitespace-pre-wrap [&>pre]:break-words`,dangerouslySetInnerHTML:{__html:i}})]}):null}var E9=({className:e,...t})=>(0,A.jsx)(jJ,{className:qe(`p-2! border-none hover:text-foreground! data-[state="active"]:bg-muted! shadow-none!`,e),...t}),tne=({className:e,particleCount:t=500,colors:n=[`#00b8a9`,`#f8f3d4`,`#f6416c`,`#ffde7d`],animationDuration:r=[1,2],perspective:i=`10vmin`,particleWidth:a=`30%`,particleHeight:o=`1px`})=>{let[s,c]=(0,k.useState)([]),l=(e,t)=>Math.random()*(t-e)+e,u=()=>n[Math.floor(Math.random()*n.length)],d=()=>l(-180,180);return(0,k.useEffect)(()=>{c(Array.from({length:t},(e,t)=>({id:t,duration:l(r[0],r[1]),delay:-l(.1,2),rotateX:d(),rotateY:d(),rotateZ:d(),gradientStops:Math.floor(l(2,5)),color:u(),transparentStop:l(50,100)})))},[t,r,n]),(0,A.jsxs)(`div`,{className:`relative size-full flex items-center justify-center`,style:{perspective:i},children:[(0,A.jsx)(`div`,{className:p(`relative flex items-end justify-center`,e),children:s.map(e=>(0,A.jsx)(`div`,{className:`absolute`,style:{width:a,height:o,willChange:`transform, opacity`,transformStyle:`preserve-3d`,background:`linear-gradient(to left, ${e.color}, transparent ${e.transparentStop}%)`,animation:`move-${e.id} ${e.duration}s linear infinite`,animationDelay:`${e.delay}s`,transformOrigin:`0 center`,"--rotateX":`${e.rotateX}deg`,"--rotateY":`${e.rotateY}deg`,"--rotateZ":`${e.rotateZ}deg`}},e.id))}),(0,A.jsx)(`style`,{children:`
|
|
522
|
+
${s.map(e=>`
|
|
523
|
+
@keyframes move-${e.id} {
|
|
524
|
+
0% {
|
|
525
|
+
transform: translateX(50%) rotateX(${e.rotateX}deg) rotateY(${e.rotateY}deg) rotateZ(${e.rotateZ}deg) scale(2);
|
|
526
|
+
opacity: 0;
|
|
527
|
+
}
|
|
528
|
+
20% {
|
|
529
|
+
opacity: 1;
|
|
530
|
+
}
|
|
531
|
+
100% {
|
|
532
|
+
transform: translateX(50%) rotateX(${e.rotateX}deg) rotateY(${e.rotateY}deg) rotateZ(${e.rotateZ}deg) scale(0);
|
|
533
|
+
opacity: 1;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
`).join(`
|
|
537
|
+
`)}
|
|
538
|
+
`})]})};function nne({words:e,duration:t=2500,framerProps:n={initial:{opacity:0,y:-50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},transition:{duration:.25,ease:`easeOut`}},className:r}){let[i,a]=(0,k.useState)(0);return(0,k.useEffect)(()=>{let n=setInterval(()=>{a(t=>(t+1)%e.length)},t);return()=>clearInterval(n)},[e,t]),(0,A.jsx)(`div`,{className:`overflow-hidden py-2 inline-flex`,children:(0,A.jsx)(td,{mode:`wait`,children:(0,A.jsx)($f.h1,{className:p(r),...n,children:e[i]},e[i])})})}var D9=({className:e,text:t,width:n=`100%`,onCopy:r,prompt:i=!0})=>{let[a,o]=(0,k.useState)(!1),s=(0,k.useRef)(null),c=typeof t==`string`?[t]:t;return(0,A.jsxs)(`div`,{className:p(`flex items-start gap-3 px-3 py-2.5 rounded-md border border-border bg-muted`,e),style:{width:n},children:[(0,A.jsx)(`div`,{className:`flex-1`,children:c.map(e=>(0,A.jsx)(`div`,{className:qe(`font-mono text-[13px] text-muted-foreground`,i&&`before:content-['$_']`),children:e},e))}),(0,A.jsx)(`button`,{onClick:()=>{s.current&&clearTimeout(s.current),o(!0),s.current=setTimeout(()=>o(!1),2e3),F8(c.join(`
|
|
539
|
+
`)),r?.()},className:`cursor-pointer mt-0.5 text-muted-foreground hover:text-foreground transition-colors`,children:a?(0,A.jsx)(vt,{size:16}):(0,A.jsx)(Ct,{size:16})})]})},O9=`npx palettecn`;function rne(){let{theme:e}=ue(),{appendThemes:t,setCurrentTheme:n,setIsSidebarCollapsed:r}=Be(),[i,a]=(0,k.useState)(!1);function o(){r(!1),l||a(!0)}return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(h5,{open:i,onOpenChange:a,children:(0,A.jsxs)(y5,{children:[(0,A.jsx)(b5,{children:`Setup palettecn`}),(0,A.jsx)(x5,{children:`You must run palettecn locally. Run it using the following command:`}),(0,A.jsx)(D9,{text:O9})]})}),(0,A.jsxs)(`div`,{className:`relative size-full`,children:[(0,A.jsx)(`div`,{className:`size-full overflow-hidden -z-1 absolute inset-0`,children:(0,A.jsx)(tne,{particleCount:500,colors:[`#fff200`,`#a855f7`,`#f43f5e`,`#22c55e`],animationDuration:[1,20],className:`size-full opacity-20`})}),(0,A.jsxs)(`div`,{className:`flex items-center flex-col mt-24 gap-y-2 overflow-hidden`,children:[(0,A.jsxs)(`h1`,{className:`font-extrabold text-3xl sm:text-5xl sm:mr-8 inline text-center`,children:[(0,A.jsx)(nne,{duration:4e3,words:[`Design`,`Create`,`Generate`],className:`sm:w-68 w-40 text-right`}),` `,(0,A.jsx)(`span`,{className:`text-primary mr-12 sm:mr-0`,children:`shadcn/ui`}),` themes with`,` `,(0,A.jsx)(`span`,{className:`bg-primary text-primary-foreground px-2 rounded-sm`,children:`AI`})]}),(0,A.jsx)(`p`,{className:`text-muted-foreground text-center px-12 mt-4`,children:`Build stunning shadcn themes using premade color palettes and AI.`}),(0,A.jsxs)(`div`,{className:`flex gap-2 [&_button]:px-8! mt-4`,children:[(0,A.jsx)(_,{onClick:o,className:`font-bold`,children:`Get started`}),(0,A.jsx)(`a`,{href:`https://github.com/mrozio13pl/palettecn`,children:(0,A.jsxs)(_,{className:`font-bold backdrop-blur-sm`,variant:`outline`,children:[`View on `,(0,A.jsx)(te,{})]})})]}),(0,A.jsxs)(`div`,{className:`flex flex-col items-center gap-y-4 mt-4`,children:[(0,A.jsx)(`p`,{className:`text-muted-foreground text-center px-12`,children:`Run palettecn locally and use your own AI providers.`}),(0,A.jsx)(D9,{text:O9,className:`max-w-74`})]}),(0,A.jsxs)(`div`,{className:`opacity-50 sm:w-xl w-3xs flex justify-center items-center [&_svg]:min-w-6 [&_svg]:fill-border text-border my-8`,children:[(0,A.jsx)(xt,{className:`-rotate-135`}),(0,A.jsx)(g,{className:`py-px w-full`}),(0,A.jsx)(xt,{className:`rotate-45`})]}),(0,A.jsx)(`div`,{className:`sm:px-20 flex justify-center`,children:(0,A.jsx)(`div`,{className:`max-w-5xl flex flex-wrap justify-center items-center gap-4`,children:Ge.map(r=>(0,A.jsxs)(_,{size:`sm`,className:`opacity-80 hover:opacity-100 px-1.5`,style:{backgroundColor:r[e===`dark`?`dark`:`light`].background,color:r[e===`dark`?`dark`:`light`].foreground},onClick:()=>{t(r),n(r,!0,e)},children:[Te.slice(0,3).map(t=>(0,A.jsx)(`div`,{className:`size-6 border rounded-sm`,style:{backgroundColor:r?.[e===`dark`?`dark`:`light`]?.[t]}},t)),(0,A.jsx)(`h3`,{className:`ml-2 font-semibold`,children:r?.name||`Untitled`})]},r.id))})})]})]})]})}var ine=(0,k.lazy)(()=>O(()=>import(`./components-DiZ1dSl3.js`).then(e=>({default:e.ComponentsPage})),__vite__mapDeps([102,1,103,104,105,106]))),ane=(0,A.jsx)(`div`,{className:`h-full flex justify-center items-center`,children:(0,A.jsx)(x,{className:`size-12 -mt-12`})});function one(){let{isSidebarCollapsed:e}=Be();return(0,A.jsxs)(kJ,{defaultValue:`landing`,className:`size-full flex-col overflow-hidden`,children:[!e&&(0,A.jsxs)(AJ,{className:`bg-transparent! m-2 gap-4`,children:[(0,A.jsx)(E9,{value:`landing`,children:`Landing Page`}),(0,A.jsx)(E9,{value:`components`,children:`Components`})]}),(0,A.jsx)(MJ,{value:`landing`,className:`size-full overflow-x-hidden sm:overflow-hidden`,children:(0,A.jsx)(rne,{})}),(0,A.jsx)(MJ,{value:`components`,className:`h-full overflow-y-auto sm:pb-20 @container`,children:(0,A.jsx)(k.Suspense,{fallback:ane,children:(0,A.jsx)(ine,{})})})]})}var sne=t(n(((e,t)=>{((e,n)=>{typeof define==`function`&&define.amd?define([],n):typeof t==`object`&&t.exports?t.exports=n():e.fuzzysort=n()})(e,e=>{var t=(e,t)=>{if(!e||!t)return se;var n=p(e);re(t)||(t=f(t));var r=n.bitflags;return(r&t._bitflags)===r?h(n,t):se},n=(e,t,n)=>{if(!e)return n?.all?m(t,n):oe;var r=p(e),i=r.bitflags,a=r.containsSpace,o=u(n?.threshold||0),c=n?.limit||ie,l=0,d=0,g=t.length;function _(e){l<c?(le.add(e),++l):(++d,e._score>le.peek()._score&&le.replaceTop(e))}if(n?.key)for(var v=n.key,y=0;y<g;++y){var b=t[y],x=ne(b,v);if(x&&(re(x)||(x=f(x)),(i&x._bitflags)===i)){var S=h(r,x);S!==se&&(S._score<o||(S.obj=b,_(S)))}}else if(n?.keys){var C=n.keys,w=C.length;outer:for(var y=0;y<g;++y){for(var b=t[y],T=0,ue=0;ue<w;++ue){var v=C[ue],x=ne(b,v);if(!x){te[ue]=ce;continue}re(x)||(x=f(x)),te[ue]=x,T|=x._bitflags}if((i&T)===i){if(a)for(let e=0;e<r.spaceSearches.length;e++)E[e]=ae;for(var ue=0;ue<w;++ue){if(x=te[ue],x===ce){D[ue]=ce;continue}if(D[ue]=h(r,x,!1,a),D[ue]===se){D[ue]=ce;continue}if(a)for(let e=0;e<r.spaceSearches.length;e++){if(ee[e]>-1e3&&E[e]>ae){var de=(E[e]+ee[e])/4;de>E[e]&&(E[e]=de)}ee[e]>E[e]&&(E[e]=ee[e])}}if(a){for(let e=0;e<r.spaceSearches.length;e++)if(E[e]===ae)continue outer}else{var fe=!1;for(let e=0;e<w;e++)if(D[e]._score!==ae){fe=!0;break}if(!fe)continue}var pe=new s(w);for(let e=0;e<w;e++)pe[e]=D[e];if(a){var me=0;for(let e=0;e<r.spaceSearches.length;e++)me+=E[e]}else{var me=ae;for(let e=0;e<w;e++){var S=pe[e];if(S._score>-1e3&&me>ae){var de=(me+S._score)/4;de>me&&(me=de)}S._score>me&&(me=S._score)}}if(pe.obj=b,pe._score=me,n?.scoreFn){if(me=n.scoreFn(pe),!me)continue;me=u(me),pe._score=me}me<o||_(pe)}}}else for(var y=0;y<g;++y){var x=t[y];if(x&&(re(x)||(x=f(x)),(i&x._bitflags)===i)){var S=h(r,x);S!==se&&(S._score<o||_(S))}}if(l===0)return oe;for(var he=Array(l),y=l-1;y>=0;--y)he[y]=le.poll();return he.total=l+d,he},r=(e,t=`<b>`,n=`</b>`)=>{for(var r=typeof t==`function`?t:void 0,i=e.target,a=i.length,o=e.indexes,s=``,c=0,l=0,u=!1,d=[],f=0;f<a;++f){var p=i[f];if(o[l]===f){if(++l,u||(u=!0,r?(d.push(s),s=``):s+=t),l===o.length){r?(s+=p,d.push(r(s,c++)),s=``,d.push(i.substr(f+1))):s+=p+n+i.substr(f+1);break}}else u&&(u=!1,r?(d.push(r(s,c++)),s=``):s+=n);s+=p}return r?d:s},i=e=>{typeof e==`number`?e=``+e:typeof e!=`string`&&(e=``);var t=v(e);return c(e,{_targetLower:t._lower,_targetLowerCodes:t.lowerCodes,_bitflags:t.bitflags})},a=()=>{x.clear(),S.clear()};class o{get indexes(){return this._indexes.slice(0,this._indexes.len).sort((e,t)=>e-t)}set indexes(e){return this._indexes=e}highlight(e,t){return r(this,e,t)}get score(){return l(this._score)}set score(e){this._score=u(e)}}class s extends Array{get score(){return l(this._score)}set score(e){this._score=u(e)}}var c=(e,t)=>{let n=new o;return n.target=e,n.obj=t.obj??se,n._score=t._score??ae,n._indexes=t._indexes??[],n._targetLower=t._targetLower??``,n._targetLowerCodes=t._targetLowerCodes??se,n._nextBeginningIndexes=t._nextBeginningIndexes??se,n._bitflags=t._bitflags??0,n},l=e=>e===ae?0:e>1?e:Math.E**(((-e+1)**.04307-1)*-2),u=e=>e===0?ae:e>1?e:1-(Math.log(e)/-2+1)**(1/.04307),d=e=>{typeof e==`number`?e=``+e:typeof e!=`string`&&(e=``),e=e.trim();var t=v(e),n=[];if(t.containsSpace){var r=e.split(/\s+/);r=[...new Set(r)];for(var i=0;i<r.length;i++)if(r[i]!==``){var a=v(r[i]);n.push({lowerCodes:a.lowerCodes,_lower:r[i].toLowerCase(),containsSpace:!1})}}return{lowerCodes:t.lowerCodes,_lower:t._lower,containsSpace:t.containsSpace,bitflags:t.bitflags,spaceSearches:n}},f=e=>{if(e.length>999)return i(e);var t=x.get(e);return t===void 0?(t=i(e),x.set(e,t),t):t},p=e=>{if(e.length>999)return d(e);var t=S.get(e);return t===void 0?(t=d(e),S.set(e,t),t):t},m=(e,t)=>{var n=[];n.total=e.length;var r=t?.limit||ie;if(t?.key)for(var i=0;i<e.length;i++){var a=e[i],o=ne(a,t.key);if(o!=se){re(o)||(o=f(o));var l=c(o.target,{_score:o._score,obj:a});if(n.push(l),n.length>=r)return n}}else if(t?.keys)for(var i=0;i<e.length;i++){for(var a=e[i],u=new s(t.keys.length),d=t.keys.length-1;d>=0;--d){var o=ne(a,t.keys[d]);if(!o){u[d]=ce;continue}re(o)||(o=f(o)),o._score=ae,o._indexes.len=0,u[d]=o}if(u.obj=a,u._score=ae,n.push(u),n.length>=r)return n}else for(var i=0;i<e.length;i++){var o=e[i];if(o!=se&&(re(o)||(o=f(o)),o._score=ae,o._indexes.len=0,n.push(o),n.length>=r))return n}return n},h=(e,t,n=!1,r=!1)=>{if(n===!1&&e.containsSpace)return g(e,t,r);for(var i=e._lower,a=e.lowerCodes,s=a[0],c=t._targetLowerCodes,l=a.length,u=c.length,d=0,f=0,p=0;;){var m=s===c[f];if(m){if(C[p++]=f,++d,d===l)break;s=a[d]}if(++f,f>=u)return se}var d=0,h=!1,_=0,v=t._nextBeginningIndexes;v===se&&(v=t._nextBeginningIndexes=b(t.target)),f=C[0]===0?0:v[C[0]-1];var y=0;if(f!==u)for(;;)if(f>=u){if(d<=0||(++y,y>200))break;--d;var x=w[--_];f=v[x]}else{var m=a[d]===c[f];if(m){if(w[_++]=f,++d,d===l){h=!0;break}++f}else f=v[f]}var S=l<=1?-1:t._targetLower.indexOf(i,C[0]),T=!!~S,E=T?S===0||t._nextBeginningIndexes[S-1]===S:!1;if(T&&!E){for(var ee=0;ee<v.length;ee=v[ee])if(!(ee<=S)){for(var te=0;te<l&&a[te]===t._targetLowerCodes[ee+te];te++);if(te===l){S=ee,E=!0;break}}}var D=e=>{for(var t=0,n=0,r=1;r<l;++r)e[r]-e[r-1]!==1&&(t-=e[r],++n);var i=e[l-1]-e[0]-(l-1);if(t-=(12+i)*n,e[0]!==0&&(t-=e[0]*e[0]*.2),!h)t*=1e3;else{for(var a=1,r=v[0];r<u;r=v[r])++a;a>24&&(t*=(a-24)*10)}return t-=(u-l)/2,T&&(t/=1+l*l*1),E&&(t/=1+l*l*1),t-=(u-l)/2,t};if(!h){if(T)for(var ee=0;ee<l;++ee)C[ee]=S+ee;var ne=C,re=D(ne)}else if(E){for(var ee=0;ee<l;++ee)C[ee]=S+ee;var ne=C,re=D(C)}else var ne=w,re=D(w);t._score=re;for(var ee=0;ee<l;++ee)t._indexes[ee]=ne[ee];t._indexes.len=l;let ie=new o;return ie.target=t.target,ie._score=t._score,ie._indexes=t._indexes,ie},g=(e,t,n)=>{for(var r=new Set,i=0,a=se,o=0,s=e.spaceSearches,c=s.length,l=0,u=()=>{for(let e=l-1;e>=0;e--)t._nextBeginningIndexes[T[e*2+0]]=T[e*2+1]},d=!1,f=0;f<c;++f){ee[f]=ae;var p=s[f];if(a=h(p,t),n){if(a===se)continue;d=!0}else if(a===se)return u(),se;if(f!==c-1){var m=a._indexes,g=!0;for(let e=0;e<m.len-1;e++)if(m[e+1]-m[e]!==1){g=!1;break}if(g){var _=m[m.len-1]+1,v=t._nextBeginningIndexes[_-1];for(let e=_-1;e>=0&&v===t._nextBeginningIndexes[e];e--)t._nextBeginningIndexes[e]=_,T[l*2+0]=e,T[l*2+1]=v,l++}}i+=a._score/c,ee[f]=a._score/c,a._indexes[0]<o&&(i-=(o-a._indexes[0])*2),o=a._indexes[0];for(var y=0;y<a._indexes.len;++y)r.add(a._indexes[y])}if(n&&!d)return se;u();var b=h(e,t,!0);if(b!==se&&b._score>i){if(n)for(var f=0;f<c;++f)ee[f]=b._score/c;return b}n&&(a=t),a._score=i;var f=0;for(let e of r)a._indexes[f++]=e;return a._indexes.len=f,a},_=e=>e.replace(/\p{Script=Latin}+/gu,e=>e.normalize(`NFD`)).replace(/[\u0300-\u036f]/g,``),v=e=>{e=_(e);for(var t=e.length,n=e.toLowerCase(),r=[],i=0,a=!1,o=0;o<t;++o){var s=r[o]=n.charCodeAt(o);if(s===32){a=!0;continue}var c=s>=97&&s<=122?s-97:s>=48&&s<=57?26:s<=127?30:31;i|=1<<c}return{lowerCodes:r,bitflags:i,containsSpace:a,_lower:n}},y=e=>{for(var t=e.length,n=[],r=0,i=!1,a=!1,o=0;o<t;++o){var s=e.charCodeAt(o),c=s>=65&&s<=90,l=c||s>=97&&s<=122||s>=48&&s<=57,u=c&&!i||!a||!l;i=c,a=l,u&&(n[r++]=o)}return n},b=e=>{e=_(e);for(var t=e.length,n=y(e),r=[],i=n[0],a=0,o=0;o<t;++o)i>o?r[o]=i:(i=n[++a],r[o]=i===void 0?t:i);return r},x=new Map,S=new Map,C=[],w=[],T=[],E=[],ee=[],te=[],D=[],ne=(e,t)=>{var n=e[t];if(n!==void 0)return n;if(typeof t==`function`)return t(e);var r=t;Array.isArray(t)||(r=t.split(`.`));for(var i=r.length,a=-1;e&&++a<i;)e=e[r[a]];return e},re=e=>typeof e==`object`&&typeof e._bitflags==`number`,ie=1/0,ae=-ie,oe=[];oe.total=0;var se=null,ce=i(``),le=(e=>{var t=[],n=0,r={},i=e=>{for(var r=0,i=t[r],a=1;a<n;){var o=a+1;r=a,o<n&&t[o]._score<t[a]._score&&(r=o),t[r-1>>1]=t[r],a=1+(r<<1)}for(var s=r-1>>1;r>0&&i._score<t[s]._score;s=(r=s)-1>>1)t[r]=t[s];t[r]=i};return r.add=(e=>{var r=n;t[n++]=e;for(var i=r-1>>1;r>0&&e._score<t[i]._score;i=(r=i)-1>>1)t[r]=t[i];t[r]=e}),r.poll=(e=>{if(n!==0){var r=t[0];return t[0]=t[--n],i(),r}}),r.peek=(e=>{if(n!==0)return t[0]}),r.replaceTop=(e=>{t[0]=e,i()}),r})();return{single:t,go:n,prepare:i,cleanup:a}})}))(),1);function k9({...e}){return(0,A.jsx)(yH,{"data-slot":`popover`,...e})}function A9({...e}){return(0,A.jsx)(bH,{"data-slot":`popover-trigger`,...e})}function j9({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,A.jsx)(xH,{children:(0,A.jsx)(SH,{"data-slot":`popover-content`,align:t,sideOffset:n,className:p(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 flex flex-col gap-2.5 rounded-lg p-2.5 text-sm shadow-md ring-1 duration-100 z-50 w-72 origin-(--radix-popover-content-transform-origin) outline-hidden`,e),...r})})}var M9={all:`All Fonts`,display:`Display`,handwriting:`Handwriting`,monospace:`Monospace`,"sans-serif":`Sans Serif`,serif:`Serif`};function N9({font:e,onFontChange:t}){let[n,r]=(0,k.useState)(``),[i,a]=(0,k.useState)(`all`),{loadedFonts:o,fonts:s}=Oe(),c=(0,k.useRef)({}),l=(0,k.useMemo)(()=>{if(!s)return[];let e=s;return n.trim().length&&(e=sne.default.go(n,s,{keys:[`id`,`family`]}).map(({obj:e})=>e)),i!==`all`&&(e=e.filter(e=>e.category===i)),e},[s,n,i]),u=(e,t)=>{c.current[e]&&clearTimeout(c.current[e]),c.current[e]=setTimeout(()=>{De(e,t)},500)},d=e=>{c.current[e]&&(clearTimeout(c.current[e]),delete c.current[e])};return(0,k.useEffect)(()=>()=>{Object.values(c.current).forEach(clearTimeout)},[]),s?(0,A.jsxs)(k9,{children:[(0,A.jsx)(A9,{asChild:!0,children:(0,A.jsxs)(_,{className:`w-full justify-between`,variant:`outline`,children:[e?s.find(t=>e===t.id)?.family:(0,A.jsx)(`p`,{className:`text-muted-foreground`,children:`Select font`}),(0,A.jsx)(yt,{className:`size-4 opacity-50`})]})}),(0,A.jsxs)(j9,{className:`w-96 space-y-2`,children:[(0,A.jsx)(E,{placeholder:`Search fonts...`,value:n,onChange:e=>r(e.target.value)}),(0,A.jsxs)(k5,{value:i,onValueChange:a,children:[(0,A.jsx)(j5,{className:`w-full`,children:(0,A.jsx)(A5,{})}),(0,A.jsx)(M5,{children:Object.keys(M9).map(e=>(0,A.jsx)(N5,{value:e,children:M9[e]},e))})]}),(0,A.jsx)(d5,{className:`h-80 space-y-1`,children:l?.map(e=>(0,A.jsx)(hH,{asChild:!0,children:(0,A.jsxs)(_,{className:`w-full flex-col items-start gap-y-0! h-auto`,variant:`ghost`,onClick:()=>{De(e.id,e.family),t(e.id)},onMouseEnter:()=>u(e.id,e.family),onMouseLeave:()=>d(e.id),children:[(0,A.jsx)(`h3`,{className:`text-lg`,style:{fontFamily:o.has(e.id)?e.family:void 0},children:e.family}),(0,A.jsx)(`p`,{className:`text-muted-foreground text-xs font-normal`,children:e.category})]})},e.id))})]})]}):null}function cne(){let{themes:e,currentTheme:t,setThemes:n,setCurrentTheme:r}=Be(),{theme:i}=ue();return(0,A.jsxs)(`div`,{className:`flex flex-col gap-y-4`,children:[(0,A.jsxs)(`div`,{className:`space-y-1`,children:[(0,A.jsx)(`h4`,{children:`Sans-Serif`}),(0,A.jsx)(N9,{font:t?.fontSans,onFontChange:e=>{r({...t,fontSans:e})}})]}),(0,A.jsxs)(`div`,{className:`space-y-1`,children:[(0,A.jsx)(`h4`,{children:`Serif`}),(0,A.jsx)(N9,{font:t?.fontSerif,onFontChange:e=>{r({...t,fontSerif:e})}})]}),(0,A.jsxs)(`div`,{className:`space-y-1`,children:[(0,A.jsx)(`h4`,{children:`Monospace`}),(0,A.jsx)(N9,{font:t?.fontMono,onFontChange:e=>{r({...t,fontMono:e})}})]}),(0,A.jsxs)(`div`,{className:`space-y-1`,children:[(0,A.jsx)(`h4`,{children:`Border radius`}),(0,A.jsxs)(`div`,{className:`relative flex items-center`,children:[(0,A.jsx)(E,{type:`number`,value:t?.[i].radius.replace(`rem`,``),className:`pr-12`,onChange:i=>{let a=i.target.value;n(e.map(e=>{if(e.id===t?.id){let t={...e,dark:{...e.dark,radius:a+`rem`},light:{...e.light,radius:a+`rem`}};return r(t),t}return e}))}}),(0,A.jsx)(`span`,{className:`absolute right-3 select-none text-sm font-medium text-muted-foreground pointer-events-none`,children:`rem`})]})]})]})}var P9=Object.create(null);for(let e in Fe)Object.hasOwn(Fe,e)&&(P9[Fe[e]]=e);var F9={to:{},get:{}};F9.get=function(e){let t=e.slice(0,3).toLowerCase(),n,r;switch(t){case`hsl`:n=F9.get.hsl(e),r=`hsl`;break;case`hwb`:n=F9.get.hwb(e),r=`hwb`;break;default:n=F9.get.rgb(e),r=`rgb`;break}return n?{model:r,value:n}:null},F9.get.rgb=function(e){if(!e)return null;let t=/^#([a-f\d]{3,4})$/i,n=/^#([a-f\d]{6})([a-f\d]{2})?$/i,r=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,i=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,a=/^(\w+)$/,o=[0,0,0,1],s,c,l;if(s=e.match(n)){for(l=s[2],s=s[1],c=0;c<3;c++){let e=c*2;o[c]=Number.parseInt(s.slice(e,e+2),16)}l&&(o[3]=Number.parseInt(l,16)/255)}else if(s=e.match(t)){for(s=s[1],l=s[3],c=0;c<3;c++)o[c]=Number.parseInt(s[c]+s[c],16);l&&(o[3]=Number.parseInt(l+l,16)/255)}else if(s=e.match(r)){for(c=0;c<3;c++)o[c]=Number.parseFloat(s[c+1]);s[4]&&(o[3]=s[5]?Number.parseFloat(s[4])*.01:Number.parseFloat(s[4]))}else if(s=e.match(i)){for(c=0;c<3;c++)o[c]=Math.round(Number.parseFloat(s[c+1])*2.55);s[4]&&(o[3]=s[5]?Number.parseFloat(s[4])*.01:Number.parseFloat(s[4]))}else if(s=e.toLowerCase().match(a))return s[1]===`transparent`?[0,0,0,0]:Object.hasOwn(Fe,s[1])?(o=Fe[s[1]].slice(),o[3]=1,o):null;else return null;for(c=0;c<3;c++)o[c]=I9(o[c],0,255);return o[3]=I9(o[3],0,1),o},F9.get.hsl=function(e){if(!e)return null;let t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i);if(t){let e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,I9(Number.parseFloat(t[2]),0,100),I9(Number.parseFloat(t[3]),0,100),I9(Number.isNaN(e)?1:e,0,1)]}return null},F9.get.hwb=function(e){if(!e)return null;let t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i);if(t){let e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,I9(Number.parseFloat(t[2]),0,100),I9(Number.parseFloat(t[3]),0,100),I9(Number.isNaN(e)?1:e,0,1)]}return null},F9.to.hex=function(...e){return`#`+L9(e[0])+L9(e[1])+L9(e[2])+(e[3]<1?L9(Math.round(e[3]*255)):``)},F9.to.rgb=function(...e){return e.length<4||e[3]===1?`rgb(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`)`:`rgba(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`, `+e[3]+`)`},F9.to.rgb.percent=function(...e){let t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||e[3]===1?`rgb(`+t+`%, `+n+`%, `+r+`%)`:`rgba(`+t+`%, `+n+`%, `+r+`%, `+e[3]+`)`},F9.to.hsl=function(...e){return e.length<4||e[3]===1?`hsl(`+e[0]+`, `+e[1]+`%, `+e[2]+`%)`:`hsla(`+e[0]+`, `+e[1]+`%, `+e[2]+`%, `+e[3]+`)`},F9.to.hwb=function(...e){let t=``;return e.length>=4&&e[3]!==1&&(t=`, `+e[3]),`hwb(`+e[0]+`, `+e[1]+`%, `+e[2]+`%`+t+`)`},F9.to.keyword=function(...e){return P9[e.slice(0,3)]};function I9(e,t,n){return Math.min(Math.max(t,e),n)}function L9(e){let t=Math.round(e).toString(16).toUpperCase();return t.length<2?`0`+t:t}var R9=[`keyword`,`gray`,`hex`],z9={};for(let e of Object.keys(Re))z9[[...Re[e].labels].sort().join(``)]=e;var B9={};function V9(e,t){if(!(this instanceof V9))return new V9(e,t);if(t&&t in R9&&(t=null),t&&!(t in Re))throw Error(`Unknown model: `+t);let n,r;if(e==null)this.model=`rgb`,this.color=[0,0,0],this.valpha=1;else if(e instanceof V9)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==`string`){let t=F9.get(e);if(t===null)throw Error(`Unable to parse color from string: `+e);this.model=t.model,r=Re[this.model].channels,this.color=t.value.slice(0,r),this.valpha=typeof t.value[r]==`number`?t.value[r]:1}else if(e.length>0)this.model=t||`rgb`,r=Re[this.model].channels,this.color=W9(Array.prototype.slice.call(e,0,r),r),this.valpha=typeof e[r]==`number`?e[r]:1;else if(typeof e==`number`)this.model=`rgb`,this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let t=Object.keys(e);`alpha`in e&&(t.splice(t.indexOf(`alpha`),1),this.valpha=typeof e.alpha==`number`?e.alpha:0);let r=t.sort().join(``);if(!(r in z9))throw Error(`Unable to parse color from object: `+JSON.stringify(e));this.model=z9[r];let{labels:i}=Re[this.model],a=[];for(n=0;n<i.length;n++)a.push(e[i[n]]);this.color=W9(a)}if(B9[this.model])for(r=Re[this.model].channels,n=0;n<r;n++){let e=B9[this.model][n];e&&(this.color[n]=e(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}V9.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in F9.to?this:this.rgb();t=t.round(typeof e==`number`?e:1);let n=t.valpha===1?t.color:[...t.color,this.valpha];return F9.to[t.model](...n)},percentString(e){let t=this.rgb().round(typeof e==`number`?e:1),n=t.valpha===1?t.color:[...t.color,this.valpha];return F9.to.rgb.percent(...n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=Re[this.model],{labels:n}=Re[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new V9([...this.color.map(une(e)),this.valpha],this.model)},alpha(e){return e===void 0?this.valpha:new V9([...this.color,Math.max(0,Math.min(1,e))],this.model)},red:H9(`rgb`,0,U9(255)),green:H9(`rgb`,1,U9(255)),blue:H9(`rgb`,2,U9(255)),hue:H9([`hsl`,`hsv`,`hsl`,`hwb`,`hcg`],0,e=>(e%360+360)%360),saturationl:H9(`hsl`,1,U9(100)),lightness:H9(`hsl`,2,U9(100)),saturationv:H9(`hsv`,1,U9(100)),value:H9(`hsv`,2,U9(100)),chroma:H9(`hcg`,1,U9(100)),gray:H9(`hcg`,2,U9(100)),white:H9(`hwb`,1,U9(100)),wblack:H9(`hwb`,2,U9(100)),cyan:H9(`cmyk`,0,U9(100)),magenta:H9(`cmyk`,1,U9(100)),yellow:H9(`cmyk`,2,U9(100)),black:H9(`cmyk`,3,U9(100)),x:H9(`xyz`,0,U9(95.047)),y:H9(`xyz`,1,U9(100)),z:H9(`xyz`,2,U9(108.833)),l:H9(`lab`,0,U9(100)),a:H9(`lab`,1),b:H9(`lab`,2),keyword(e){return e===void 0?Re[this.model].keyword(this.color):new V9(e)},hex(e){return e===void 0?F9.to.hex(...this.rgb().round().color):new V9(e)},hexa(e){if(e!==void 0)return new V9(e);let t=this.rgb().round().color,n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n=`0`+n),F9.to.hex(...t)+n},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[n,r]of e.entries()){let e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?`AAA`:t>=4.5?`AA`:``},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return V9.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw Error(`Argument to "mix" was not a Color instance, but rather an instance of `+typeof e);let n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),s=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,c=1-s;return V9.rgb(s*n.red()+c*r.red(),s*n.green()+c*r.green(),s*n.blue()+c*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(let e of Object.keys(Re)){if(R9.includes(e))continue;let{channels:t}=Re[e];V9.prototype[e]=function(...t){return this.model===e?new V9(this):t.length>0?new V9(t,e):new V9([...dne(Re[this.model][e].raw(this.color)),this.valpha],e)},V9[e]=function(...n){let r=n[0];return typeof r==`number`&&(r=W9(n,t)),new V9(r,e)}}function lne(e,t){return Number(e.toFixed(t))}function une(e){return function(t){return lne(t,e)}}function H9(e,t,n){e=Array.isArray(e)?e:[e];for(let r of e)(B9[r]||=[])[t]=n;return e=e[0],function(r){let i;return r===void 0?(i=this[e]().color[t],n&&(i=n(i)),i):(n&&(r=n(r)),i=this[e](),i.color[t]=r,i)}}function U9(e){return function(t){return Math.max(0,Math.min(e,t))}}function dne(e){return Array.isArray(e)?e:[e]}function W9(e,t){for(let n=0;n<t;n++)typeof e[n]!=`number`&&(e[n]=0);return e}var G9=(0,k.createContext)(void 0),{Range:K9,Root:q9,Thumb:J9,Track:Y9}=jW,X9=()=>{let e=(0,k.use)(G9);if(!e)throw Error(`useColorPicker must be used within a ColorPickerProvider`);return e},fne=({value:e,defaultValue:t=`#000000`,onChange:n,className:r,...i})=>{let a=V9(e),o=V9(t),[s,c]=(0,k.useState)(a.hue()||o.hue()||0),[l,u]=(0,k.useState)(a.saturationl()||o.saturationl()||100),[d,f]=(0,k.useState)(a.lightness()||o.lightness()||50),[m,h]=(0,k.useState)(a.alpha()*100||o.alpha()*100),[g,_]=(0,k.useState)(`hex`);return(0,k.useEffect)(()=>{if(e){let t=V9.rgb(e).rgb().object();c(t.r),u(t.g),f(t.b),h(t.a)}},[e]),(0,k.useEffect)(()=>{n&&n(V9.hsl(s,l,d).alpha(m/100).rgb())},[s,l,d,m,n]),(0,A.jsx)(G9,{value:{hue:s,saturation:l,lightness:d,alpha:m,mode:g,setHue:c,setSaturation:u,setLightness:f,setAlpha:h,setMode:_},children:(0,A.jsx)(`div`,{className:p(`grid w-full gap-4`,r),...i})})},pne=({className:e,...t})=>{let n=(0,k.useRef)(null),[r,i]=(0,k.useState)(!1),{hue:a,saturation:o,lightness:s,setSaturation:c,setLightness:l}=X9(),[u,d]=(0,k.useState)({x:0,y:0});(0,k.useEffect)(()=>{if(r||!n.current)return;let e=V9.hsl(a,o,s).hsv();d({x:e.saturationv()/100,y:1-e.value()/100})},[n,a,o,s]);let f=(0,k.useCallback)(e=>{if(!r||!n.current)return;let t=n.current.getBoundingClientRect(),i=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width)),o=Math.max(0,Math.min(1,(e.clientY-t.top)/t.height)),s=V9.hsv(a,i*100,(1-o)*100).hsl();d({x:i,y:o}),c(s.saturationl()),l(s.lightness())},[r,a,c,l]);return(0,k.useEffect)(()=>{if(r){window.addEventListener(`pointermove`,f);let e=()=>i(!1);return window.addEventListener(`pointerup`,e),()=>{window.removeEventListener(`pointermove`,f),window.removeEventListener(`pointerup`,e)}}},[r,f]),(0,A.jsx)(`div`,{ref:n,className:p(`relative aspect-[4/3] w-full cursor-crosshair rounded overflow-hidden`,e),style:{background:`
|
|
540
|
+
linear-gradient(to top, #000, transparent),
|
|
541
|
+
linear-gradient(to right, #fff, hsl(${a}, 100%, 50%))
|
|
542
|
+
`},onPointerDown:e=>{e.preventDefault(),i(!0);let t=n.current.getBoundingClientRect(),r=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width)),o=Math.max(0,Math.min(1,(e.clientY-t.top)/t.height)),s=V9.hsv(a,r*100,(1-o)*100).hsl();c(s.saturationl()),l(s.lightness())},...t,children:(0,A.jsx)(`div`,{className:`-translate-x-1/2 -translate-y-1/2 pointer-events-none absolute h-4 w-4 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(0,0,0,0.5)]`,style:{left:`${u.x*100}%`,top:`${u.y*100}%`}})})},mne=({className:e,...t})=>{let{hue:n,setHue:r}=X9();return(0,A.jsxs)(q9,{value:[n],max:360,step:1,className:p(`relative flex h-4 w-full touch-none`,e),onValueChange:([e])=>r(e),...t,children:[(0,A.jsx)(Y9,{className:`relative my-0.5 h-3 w-full grow rounded-full bg-[linear-gradient(90deg,#FF0000,#FFFF00,#00FF00,#00FFFF,#0000FF,#FF00FF,#FF0000)]`,children:(0,A.jsx)(K9,{className:`absolute h-full`})}),(0,A.jsx)(J9,{className:`block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50`})]})},hne=({className:e,...t})=>{let{alpha:n,setAlpha:r}=X9();return(0,A.jsxs)(q9,{value:[n],max:100,step:1,className:p(`relative flex h-4 w-full touch-none`,e),onValueChange:([e])=>r(e),...t,children:[(0,A.jsxs)(Y9,{className:`relative my-0.5 h-3 w-full grow rounded-full`,style:{background:`url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==") left center`},children:[(0,A.jsx)(`div`,{className:`absolute inset-0 rounded-full bg-gradient-to-r from-transparent to-primary/50`}),(0,A.jsx)(K9,{className:`absolute h-full rounded-full bg-transparent`})]}),(0,A.jsx)(J9,{className:`block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50`})]})},gne=({className:e,...t})=>{let{setHue:n,setSaturation:r,setLightness:i,setAlpha:a}=X9();return(0,A.jsx)(_,{variant:`outline`,size:`icon`,onClick:async()=>{try{let[e,t,o]=V9((await new EyeDropper().open()).sRGBHex).hsl().array();n(e),r(t),i(o),a(100)}catch(e){console.error(`EyeDropper failed:`,e)}},className:p(`shrink-0 text-muted-foreground`,e),...t,children:(0,A.jsx)(jt,{size:16})})},_ne=[`oklch`,`hex`,`rgb`,`css`,`hsl`],vne=({className:e,...t})=>{let{mode:n,setMode:r}=X9();return(0,A.jsxs)(k5,{value:n,onValueChange:r,children:[(0,A.jsx)(j5,{className:`h-8 w-[4.5rem] shrink-0 text-xs`,...t,children:(0,A.jsx)(A5,{placeholder:`Mode`})}),(0,A.jsx)(M5,{children:_ne.map(e=>(0,A.jsx)(N5,{value:e,className:`text-xs`,children:e.toUpperCase()},e))})]})},Z9=({className:e,...t})=>(0,A.jsxs)(`div`,{className:`relative`,children:[(0,A.jsx)(E,{type:`text`,...t,className:p(`h-8 w-[3.25rem] rounded-l-none bg-secondary px-2 text-xs shadow-none`,e)}),(0,A.jsx)(`span`,{className:`-translate-y-1/2 absolute top-1/2 right-2 text-muted-foreground text-xs`,children:`%`})]}),yne=({className:e,...t})=>{let{hue:n,saturation:r,lightness:i,alpha:a,mode:o,setHue:s,setSaturation:c,setLightness:l}=X9(),u=V9.hsl(n,r,i,a/100);if(o===`hex`){let n=u.hex();return(0,A.jsxs)(`div`,{className:p(`-space-x-px relative flex items-center shadow-sm`,e),...t,children:[(0,A.jsx)(`span`,{className:`-translate-y-1/2 absolute top-1/2 left-3 text-xs text-muted-foreground`,children:`#`}),(0,A.jsx)(E,{type:`text`,value:n,className:`h-8 rounded-r-none bg-secondary px-2 text-xs shadow-none`}),(0,A.jsx)(Z9,{value:a})]})}if(o===`rgb`){let n=u.rgb().array().map(e=>Math.round(e));return(0,A.jsxs)(`div`,{className:p(`-space-x-px flex items-center shadow-sm`,e),...t,children:[n.map((t,n)=>(0,A.jsx)(E,{type:`text`,value:t,readOnly:!0,className:p(`h-8 rounded-r-none bg-secondary px-2 text-xs shadow-none`,n&&`rounded-l-none`,e)},n)),(0,A.jsx)(Z9,{value:a})]})}if(o===`css`){let n=u.rgb().array().map(e=>Math.round(e));return(0,A.jsx)(`div`,{className:p(`w-full shadow-sm`,e),...t,children:(0,A.jsx)(E,{type:`text`,className:`h-8 w-full bg-secondary px-2 text-xs shadow-none`,value:`rgba(${n.join(`, `)}, ${a}%)`,readOnly:!0,...t})})}if(o===`hsl`){let n=u.hsl().array().map(e=>Math.round(e));return(0,A.jsxs)(`div`,{className:p(`-space-x-px flex items-center shadow-sm`,e),...t,children:[n.map((t,n)=>(0,A.jsx)(E,{type:`text`,value:t,readOnly:!0,className:p(`h-8 rounded-r-none bg-secondary px-2 text-xs shadow-none`,n&&`rounded-l-none`,e)},n)),(0,A.jsx)(Z9,{value:a})]})}if(o===`oklch`){let n=u.rgb().array().map(e=>Math.round(e)),r=Re.rgb.lch(n[0],n[1],n[2]),[i,o,d]=r.map((e,t)=>t===1?Math.round(e*100)/100:Math.round(e)),f=(e,t)=>{try{let n=[...r];n[e]=parseFloat(t)||0;let i=Re.lch.rgb(n[0],n[1],n[2]),a=Re.rgb.hsl(i[0],i[1],i[2]);s(a[0]),c(a[1]),l(a[2])}catch(e){console.error(`Invalid OKLCH color:`,e)}};return(0,A.jsxs)(`div`,{className:p(`-space-x-px flex items-center shadow-sm`,e),...t,children:[(0,A.jsx)(E,{type:`text`,value:i,onChange:e=>f(0,e.target.value),className:`h-8 rounded-r-none bg-secondary px-2 text-xs shadow-none`,placeholder:`L`}),(0,A.jsx)(E,{type:`text`,value:o,onChange:e=>f(1,e.target.value),className:`h-8 rounded-none bg-secondary px-2 text-xs shadow-none`,placeholder:`C`}),(0,A.jsx)(E,{type:`text`,value:d,onChange:e=>f(2,e.target.value),className:`h-8 rounded-none bg-secondary px-2 text-xs shadow-none`,placeholder:`H`}),(0,A.jsx)(Z9,{value:a})]})}return null};function bne(){let{theme:e}=ue(),{colorMode:t,currentTheme:n,setCurrentTheme:r}=Be(),i=n?.[e===`dark`?`dark`:`light`],a=(0,k.useRef)(null);(0,k.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]);let o=(t,o)=>{!n||!i||i[t]===o||(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{if(!n||!i||i[t]===o)return;let a=n;a[e===`dark`?`dark`:`light`]={...i,[t]:o},r(a)},250))};return(0,A.jsx)(`div`,{className:`space-y-6 overflow-auto h-full pb-24`,children:Object.keys(Ae).map(e=>{let n=Ae[e];return(0,A.jsx)(`div`,{children:(0,A.jsxs)(Q8,{className:`border rounded-xl`,children:[(0,A.jsxs)($8,{className:`p-4 in-data-[state='open']:border-b flex justify-between items-center font-bold w-full`,children:[(0,A.jsx)(`p`,{children:e}),(0,A.jsx)(yt,{className:`transition-transform in-data-[state="open"]:rotate-180`,size:16})]}),(0,A.jsx)(e5,{className:`p-4 space-y-2`,children:n.map(e=>(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsxs)(k9,{children:[(0,A.jsx)(A9,{children:(0,A.jsx)(`div`,{className:`size-12 border-2 rounded-sm overflow-hidden`,children:(0,A.jsx)(`span`,{className:`text-muted-foreground size-full flex justify-center items-center`,style:{backgroundColor:i?.[e]},children:i?.[e]?(0,A.jsx)(At,{className:`size-6`}):(0,A.jsx)(l5,{className:`size-6`})})})}),!!i?.[e]&&(0,A.jsx)(j9,{align:`start`,className:`p-0`,children:(0,A.jsxs)(fne,{className:`w-full max-w-[300px] rounded-md border bg-background p-4 shadow-sm`,defaultValue:i[e]||`#ffffff`,onChange:t=>o(e,t.toString()),children:[(0,A.jsx)(pne,{}),(0,A.jsxs)(`div`,{className:`flex items-center gap-4`,children:[typeof EyeDropper<`u`&&(0,A.jsx)(gne,{}),(0,A.jsxs)(`div`,{className:`w-full grid gap-1`,children:[(0,A.jsx)(mne,{}),(0,A.jsx)(hne,{})]})]}),(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(vne,{}),(0,A.jsx)(yne,{})]})]})})]}),(0,A.jsxs)(`div`,{className:`space-y-1`,children:[(0,A.jsx)(`h3`,{children:He(e)}),(0,A.jsxs)(`div`,{className:`text-muted-foreground text-xs flex items-center gap-2`,children:[(0,A.jsx)(`p`,{children:Pe(i?.[e]||``,t)}),(0,A.jsx)(Ct,{className:`size-3 hover:opacity-90 cursor-pointer`})]})]})]},e))})]})},e)})})}function xne({theme:e}){let{theme:t}=ue();return(0,A.jsxs)(A.Fragment,{children:[Te.map((n,r)=>(0,A.jsx)(`div`,{className:qe(`sm:size-6 size-4 border`,r>=3&&`hidden sm:block`),style:{backgroundColor:e?.[t===`dark`?`dark`:`light`]?.[n]}},n)),(0,A.jsx)(`h3`,{className:`ml-2 font-semibold`,children:e?.name||`Untitled`})]})}function Sne(e=768){let[t,n]=(0,k.useState)(!1);return(0,k.useEffect)(()=>{let t=()=>{n(window.innerWidth<e)};return t(),window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[e]),t}function Q9(){let e=(0,k.useRef)(null),{theme:t}=ue(),{themes:n,currentTheme:r,setCurrentTheme:i}=Be(),a=(0,k.useMemo)(()=>n.findIndex(e=>e.id===r?.id),[r,t]);return(0,A.jsxs)(`div`,{className:`size-full flex flex-col overflow-hidden`,children:[(0,A.jsxs)(`div`,{className:`h-16 sm:flex justify-between border-b hidden`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2 p-4`,children:[(0,A.jsx)(Le,{className:`size-6 text-primary`}),(0,A.jsx)(`h1`,{className:`font-bold text-sm select-none`,children:`palettecn`})]}),(0,A.jsxs)(`div`,{className:`flex [&_button]:cursor-pointer [&_button]:rounded-none [&_button]:p-4 [&_button]:border-l [&_button]:h-full [&_button]:w-16`,children:[(0,A.jsx)(_,{variant:`ghost`,onClick:()=>{let e=n[a-1];i(e)},disabled:a===0,children:(0,A.jsx)(ht,{})}),(0,A.jsx)(_,{variant:`ghost`,onClick:()=>{let e=n[a+1];i(e)},disabled:a>=n.length-1||a===-1,children:(0,A.jsx)(gt,{})}),(0,A.jsx)(_,{variant:`ghost`,onClick:()=>e.current?.resetChat(),children:(0,A.jsx)(b,{})})]})]}),(0,A.jsxs)(kJ,{className:`flex-1 flex-col flex min-h-0`,defaultValue:`ai`,children:[(0,A.jsxs)(AJ,{className:`mb-4 sm:mt-4 px-2 w-full bg-transparent!`,children:[(0,A.jsxs)(E9,{value:`colors`,children:[(0,A.jsx)(Ot,{}),`Colors`]}),(0,A.jsxs)(E9,{value:`fonts`,children:[(0,A.jsx)(zt,{}),`Typography`]}),(0,A.jsxs)(E9,{value:`ai`,children:[(0,A.jsx)(It,{}),`Generate`]}),(0,A.jsxs)(E9,{value:`code`,children:[(0,A.jsx)(St,{}),`Code`]})]}),(0,A.jsx)(MJ,{forceMount:!0,className:`hidden w-full flex-1 min-h-0 data-[state=active]:flex flex-col m-0 border-none`,value:`ai`,children:(0,A.jsx)(M7,{ref:e})}),(0,A.jsx)(MJ,{className:`flex flex-col m-0 border-none size-full`,value:`code`,children:(0,A.jsx)(ene,{})}),(0,A.jsx)(MJ,{className:`flex flex-col border-none size-full px-6`,value:`fonts`,children:(0,A.jsx)(cne,{})}),(0,A.jsx)(MJ,{className:`flex flex-col border-none size-full px-6`,value:`colors`,children:(0,A.jsx)(bne,{})})]})]})}function $9(){let{isSidebarCollapsed:e,setIsSidebarCollapsed:t,themes:n,currentTheme:r,setCurrentTheme:i,setThemes:a}=Be();return(0,A.jsxs)(`div`,{className:`flex flex-col size-full h-full overflow-hidden`,children:[(0,A.jsxs)(`header`,{className:`size-full p-4 border-b h-16 -mt-2 sm:mt-0 flex items-center justify-between bg-background/20 backdrop-blur-sm`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e&&(0,A.jsx)(Le,{className:`size-6 text-primary`}),(0,A.jsx)(_,{size:`icon`,variant:`ghost`,className:`text-primary sm:flex hidden`,onClick:()=>t(!e),children:(0,A.jsx)(kt,{})}),(0,A.jsxs)(k5,{value:r?.id,onValueChange:e=>{let t=n.find(t=>t.id===e);t&&i(t)},children:[(0,A.jsx)(j5,{className:`w-auto border-none shadow-none focus:ring-0 sm:[&_h3]:block [&_h3]:hidden`,children:(0,A.jsx)(A5,{})}),(0,A.jsx)(M5,{position:`popper`,children:n.filter(e=>!!e?.id).map(e=>(0,A.jsx)(N5,{value:e.id,children:(0,A.jsx)(xne,{theme:e})},e.id))})]}),(0,A.jsxs)(h5,{children:[(0,A.jsx)(g5,{children:(0,A.jsx)(_,{size:`icon`,variant:`ghost`,children:(0,A.jsx)(At,{})})}),(0,A.jsxs)(y5,{children:[(0,A.jsx)(b5,{children:`Edit name`}),(0,A.jsx)(x5,{children:`Edit the name of the theme`}),(0,A.jsx)(E,{placeholder:`Untitled`,value:n.find(e=>e.id===r?.id)?.name,onChange:e=>{a(n.map(t=>t.id===r?.id?{...r,name:e.target.value}:t))}})]})]}),(0,A.jsx)(_,{size:`icon`,variant:`destructive`,onClick:()=>{let e=n.findIndex(e=>e.id===r?.id);a(n.filter((t,n)=>e!==n));let t=Be.getState().themes;t.length===0?(a([ke]),i(ke)):i(t[Math.max(0,e-1)])},disabled:n.length<=1&&!n.some(e=>e.id!==Ce),children:(0,A.jsx)(f,{})})]}),(0,A.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,A.jsx)(T9,{className:`sm:flex hidden`}),(0,A.jsx)(P7,{})]})]}),(0,A.jsx)(`div`,{className:`size-full p-2 overflow-hidden`,children:(0,A.jsx)(one,{})})]})}function Cne(){let{theme:e}=ue(),{setFonts:t}=Oe(),{initialized:n,isSidebarCollapsed:r,currentTheme:i}=Be(),a=Sne();return sn({queryKey:[`fonts`],queryFn:async()=>{t(await(await fetch(`https://api.fontsource.org/v1/fonts`)).json())},staleTime:1e3*60*60*24,gcTime:1e3*60*60*24,refetchOnWindowFocus:!1,refetchOnMount:!1}),(0,k.useEffect)(()=>{i&&Ee(i,e)},[i,e]),n?a?(0,A.jsxs)(kJ,{defaultValue:`editor`,className:`size-full`,children:[(0,A.jsxs)(AJ,{className:`bg-transparent! w-full`,children:[(0,A.jsxs)(E9,{value:`editor`,children:[(0,A.jsx)(Ft,{}),`Edit`]}),(0,A.jsxs)(E9,{value:`preview`,children:[(0,A.jsx)(Pt,{}),`Preview`]})]}),(0,A.jsx)(g,{}),(0,A.jsx)(MJ,{value:`editor`,className:`w-full @container/sidebar`,children:(0,A.jsx)(Q9,{})}),(0,A.jsx)(MJ,{value:`preview`,className:`w-full @container overflow-hidden`,children:(0,A.jsx)($9,{})})]}):(0,A.jsx)(`div`,{className:`size-full`,children:(0,A.jsxs)(EJ,{orientation:`horizontal`,className:`isolate`,children:[!r&&(0,A.jsx)(DJ,{defaultSize:25,minSize:400,maxSize:`50%`,children:(0,A.jsx)(Q9,{})}),(0,A.jsx)(OJ,{withHandle:!0}),(0,A.jsx)(DJ,{defaultSize:75,children:(0,A.jsx)($9,{})})]})}):(0,A.jsx)(`div`,{className:`flex justify-center items-center h-full`,children:(0,A.jsx)(x,{className:`size-12`})})}export{Cne as component};
|