grepmind-app 0.1.0-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/dist/context.d.ts +43 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +230 -0
- package/dist/context.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +120 -0
- package/dist/index.js.map +1 -0
- package/dist/middleware/secrets.d.ts +21 -0
- package/dist/middleware/secrets.d.ts.map +1 -0
- package/dist/middleware/secrets.js +38 -0
- package/dist/middleware/secrets.js.map +1 -0
- package/dist/routes/code.d.ts +61 -0
- package/dist/routes/code.d.ts.map +1 -0
- package/dist/routes/code.js +974 -0
- package/dist/routes/code.js.map +1 -0
- package/dist/routes/code.test.d.ts +7 -0
- package/dist/routes/code.test.d.ts.map +1 -0
- package/dist/routes/code.test.js +418 -0
- package/dist/routes/code.test.js.map +1 -0
- package/dist/routes/events.d.ts +30 -0
- package/dist/routes/events.d.ts.map +1 -0
- package/dist/routes/events.js +152 -0
- package/dist/routes/events.js.map +1 -0
- package/dist/routes/git.d.ts +47 -0
- package/dist/routes/git.d.ts.map +1 -0
- package/dist/routes/git.js +246 -0
- package/dist/routes/git.js.map +1 -0
- package/dist/routes/index.d.ts +6 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/index.js +6 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/notes.d.ts +38 -0
- package/dist/routes/notes.d.ts.map +1 -0
- package/dist/routes/notes.js +829 -0
- package/dist/routes/notes.js.map +1 -0
- package/dist/routes/project.d.ts +35 -0
- package/dist/routes/project.d.ts.map +1 -0
- package/dist/routes/project.js +675 -0
- package/dist/routes/project.js.map +1 -0
- package/dist/routes/sync-handler.d.ts +46 -0
- package/dist/routes/sync-handler.d.ts.map +1 -0
- package/dist/routes/sync-handler.js +178 -0
- package/dist/routes/sync-handler.js.map +1 -0
- package/dist/routes/sync.d.ts +31 -0
- package/dist/routes/sync.d.ts.map +1 -0
- package/dist/routes/sync.js +329 -0
- package/dist/routes/sync.js.map +1 -0
- package/dist/server.d.ts +28 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +93 -0
- package/dist/server.js.map +1 -0
- package/dist/tesst.d.ts +2 -0
- package/dist/tesst.d.ts.map +1 -0
- package/dist/tesst.js +2 -0
- package/dist/tesst.js.map +1 -0
- package/dist/web/assets/apl-B4CMkyY2.js +2 -0
- package/dist/web/assets/apl-B4CMkyY2.js.map +1 -0
- package/dist/web/assets/asciiarmor-Df11BRmG.js +2 -0
- package/dist/web/assets/asciiarmor-Df11BRmG.js.map +1 -0
- package/dist/web/assets/asn1-EdZsLKOL.js +2 -0
- package/dist/web/assets/asn1-EdZsLKOL.js.map +1 -0
- package/dist/web/assets/asterisk-B-8jnY81.js +2 -0
- package/dist/web/assets/asterisk-B-8jnY81.js.map +1 -0
- package/dist/web/assets/brainfuck-C4LP7Hcl.js +2 -0
- package/dist/web/assets/brainfuck-C4LP7Hcl.js.map +1 -0
- package/dist/web/assets/clike-B9uivgTg.js +2 -0
- package/dist/web/assets/clike-B9uivgTg.js.map +1 -0
- package/dist/web/assets/clojure-BMjYHr_A.js +2 -0
- package/dist/web/assets/clojure-BMjYHr_A.js.map +1 -0
- package/dist/web/assets/cmake-BQqOBYOt.js +2 -0
- package/dist/web/assets/cmake-BQqOBYOt.js.map +1 -0
- package/dist/web/assets/cobol-CWcv1MsR.js +2 -0
- package/dist/web/assets/cobol-CWcv1MsR.js.map +1 -0
- package/dist/web/assets/coffeescript-S37ZYGWr.js +2 -0
- package/dist/web/assets/coffeescript-S37ZYGWr.js.map +1 -0
- package/dist/web/assets/commonlisp-DBKNyK5s.js +2 -0
- package/dist/web/assets/commonlisp-DBKNyK5s.js.map +1 -0
- package/dist/web/assets/crystal-SjHAIU92.js +2 -0
- package/dist/web/assets/crystal-SjHAIU92.js.map +1 -0
- package/dist/web/assets/css-BnMrqG3P.js +2 -0
- package/dist/web/assets/css-BnMrqG3P.js.map +1 -0
- package/dist/web/assets/cypher-C_CwsFkJ.js +2 -0
- package/dist/web/assets/cypher-C_CwsFkJ.js.map +1 -0
- package/dist/web/assets/d-pRatUO7H.js +2 -0
- package/dist/web/assets/d-pRatUO7H.js.map +1 -0
- package/dist/web/assets/diff-DbItnlRl.js +2 -0
- package/dist/web/assets/diff-DbItnlRl.js.map +1 -0
- package/dist/web/assets/dockerfile-BKs6k2Af.js +2 -0
- package/dist/web/assets/dockerfile-BKs6k2Af.js.map +1 -0
- package/dist/web/assets/dtd-DF_7sFjM.js +2 -0
- package/dist/web/assets/dtd-DF_7sFjM.js.map +1 -0
- package/dist/web/assets/dylan-DwRh75JA.js +2 -0
- package/dist/web/assets/dylan-DwRh75JA.js.map +1 -0
- package/dist/web/assets/ebnf-CDyGwa7X.js +2 -0
- package/dist/web/assets/ebnf-CDyGwa7X.js.map +1 -0
- package/dist/web/assets/ecl-Cabwm37j.js +2 -0
- package/dist/web/assets/ecl-Cabwm37j.js.map +1 -0
- package/dist/web/assets/eiffel-CnydiIhH.js +2 -0
- package/dist/web/assets/eiffel-CnydiIhH.js.map +1 -0
- package/dist/web/assets/elm-vLlmbW-K.js +2 -0
- package/dist/web/assets/elm-vLlmbW-K.js.map +1 -0
- package/dist/web/assets/erlang-BNw1qcRV.js +2 -0
- package/dist/web/assets/erlang-BNw1qcRV.js.map +1 -0
- package/dist/web/assets/factor-kuTfRLto.js +2 -0
- package/dist/web/assets/factor-kuTfRLto.js.map +1 -0
- package/dist/web/assets/fcl-Kvtd6kyn.js +2 -0
- package/dist/web/assets/fcl-Kvtd6kyn.js.map +1 -0
- package/dist/web/assets/forth-Ffai-XNe.js +2 -0
- package/dist/web/assets/forth-Ffai-XNe.js.map +1 -0
- package/dist/web/assets/fortran-DYz_wnZ1.js +2 -0
- package/dist/web/assets/fortran-DYz_wnZ1.js.map +1 -0
- package/dist/web/assets/gas-Bneqetm1.js +2 -0
- package/dist/web/assets/gas-Bneqetm1.js.map +1 -0
- package/dist/web/assets/gherkin-heZmZLOM.js +2 -0
- package/dist/web/assets/gherkin-heZmZLOM.js.map +1 -0
- package/dist/web/assets/groovy-D9Dt4D0W.js +2 -0
- package/dist/web/assets/groovy-D9Dt4D0W.js.map +1 -0
- package/dist/web/assets/haskell-BWDZoCOh.js +2 -0
- package/dist/web/assets/haskell-BWDZoCOh.js.map +1 -0
- package/dist/web/assets/haxe-H-WmDvRZ.js +2 -0
- package/dist/web/assets/haxe-H-WmDvRZ.js.map +1 -0
- package/dist/web/assets/http-DBlCnlav.js +2 -0
- package/dist/web/assets/http-DBlCnlav.js.map +1 -0
- package/dist/web/assets/idl-BEugSyMb.js +2 -0
- package/dist/web/assets/idl-BEugSyMb.js.map +1 -0
- package/dist/web/assets/index-6L7rK6RK.js +2 -0
- package/dist/web/assets/index-6L7rK6RK.js.map +1 -0
- package/dist/web/assets/index-B1YTM6Ei.js +2 -0
- package/dist/web/assets/index-B1YTM6Ei.js.map +1 -0
- package/dist/web/assets/index-B7vcMomf.js +509 -0
- package/dist/web/assets/index-B7vcMomf.js.map +1 -0
- package/dist/web/assets/index-BcZ8RTQK.js +2 -0
- package/dist/web/assets/index-BcZ8RTQK.js.map +1 -0
- package/dist/web/assets/index-C7GrfZtu.js +2 -0
- package/dist/web/assets/index-C7GrfZtu.js.map +1 -0
- package/dist/web/assets/index-C7fIfqkz.js +2 -0
- package/dist/web/assets/index-C7fIfqkz.js.map +1 -0
- package/dist/web/assets/index-C9-Eilv-.js +2 -0
- package/dist/web/assets/index-C9-Eilv-.js.map +1 -0
- package/dist/web/assets/index-CC-t7RnM.js +4 -0
- package/dist/web/assets/index-CC-t7RnM.js.map +1 -0
- package/dist/web/assets/index-CLbc4ChH.js +2 -0
- package/dist/web/assets/index-CLbc4ChH.js.map +1 -0
- package/dist/web/assets/index-CMXahjWH.js +2 -0
- package/dist/web/assets/index-CMXahjWH.js.map +1 -0
- package/dist/web/assets/index-CfYzSHJA.css +1 -0
- package/dist/web/assets/index-ClDYe_wE.js +2 -0
- package/dist/web/assets/index-ClDYe_wE.js.map +1 -0
- package/dist/web/assets/index-CxykdbB_.js +2 -0
- package/dist/web/assets/index-CxykdbB_.js.map +1 -0
- package/dist/web/assets/index-D3WXxnT1.js +2 -0
- package/dist/web/assets/index-D3WXxnT1.js.map +1 -0
- package/dist/web/assets/index-D4qNbgAX.js +2 -0
- package/dist/web/assets/index-D4qNbgAX.js.map +1 -0
- package/dist/web/assets/index-DCiUPvZt.js +2 -0
- package/dist/web/assets/index-DCiUPvZt.js.map +1 -0
- package/dist/web/assets/index-DJpCPEwr.js +3 -0
- package/dist/web/assets/index-DJpCPEwr.js.map +1 -0
- package/dist/web/assets/index-EuUS3D16.js +8 -0
- package/dist/web/assets/index-EuUS3D16.js.map +1 -0
- package/dist/web/assets/index-WATjATUO.js +2 -0
- package/dist/web/assets/index-WATjATUO.js.map +1 -0
- package/dist/web/assets/javascript-qCveANmP.js +2 -0
- package/dist/web/assets/javascript-qCveANmP.js.map +1 -0
- package/dist/web/assets/julia-DuME0IfC.js +2 -0
- package/dist/web/assets/julia-DuME0IfC.js.map +1 -0
- package/dist/web/assets/livescript-BwQOo05w.js +2 -0
- package/dist/web/assets/livescript-BwQOo05w.js.map +1 -0
- package/dist/web/assets/lua-BgMRiT3U.js +2 -0
- package/dist/web/assets/lua-BgMRiT3U.js.map +1 -0
- package/dist/web/assets/mathematica-DTrFuWx2.js +2 -0
- package/dist/web/assets/mathematica-DTrFuWx2.js.map +1 -0
- package/dist/web/assets/mbox-CNhZ1qSd.js +2 -0
- package/dist/web/assets/mbox-CNhZ1qSd.js.map +1 -0
- package/dist/web/assets/mirc-CjQqDB4T.js +2 -0
- package/dist/web/assets/mirc-CjQqDB4T.js.map +1 -0
- package/dist/web/assets/mllike-CXdrOF99.js +2 -0
- package/dist/web/assets/mllike-CXdrOF99.js.map +1 -0
- package/dist/web/assets/modelica-Dc1JOy9r.js +2 -0
- package/dist/web/assets/modelica-Dc1JOy9r.js.map +1 -0
- package/dist/web/assets/mscgen-BA5vi2Kp.js +2 -0
- package/dist/web/assets/mscgen-BA5vi2Kp.js.map +1 -0
- package/dist/web/assets/mumps-BT43cFF4.js +2 -0
- package/dist/web/assets/mumps-BT43cFF4.js.map +1 -0
- package/dist/web/assets/nginx-DdIZxoE0.js +2 -0
- package/dist/web/assets/nginx-DdIZxoE0.js.map +1 -0
- package/dist/web/assets/nsis-LdVXkNf5.js +2 -0
- package/dist/web/assets/nsis-LdVXkNf5.js.map +1 -0
- package/dist/web/assets/ntriples-BfvgReVJ.js +2 -0
- package/dist/web/assets/ntriples-BfvgReVJ.js.map +1 -0
- package/dist/web/assets/octave-Ck1zUtKM.js +2 -0
- package/dist/web/assets/octave-Ck1zUtKM.js.map +1 -0
- package/dist/web/assets/oz-BzwKVEFT.js +2 -0
- package/dist/web/assets/oz-BzwKVEFT.js.map +1 -0
- package/dist/web/assets/pascal--L3eBynH.js +2 -0
- package/dist/web/assets/pascal--L3eBynH.js.map +1 -0
- package/dist/web/assets/perl-CdXCOZ3F.js +2 -0
- package/dist/web/assets/perl-CdXCOZ3F.js.map +1 -0
- package/dist/web/assets/pig-CevX1Tat.js +2 -0
- package/dist/web/assets/pig-CevX1Tat.js.map +1 -0
- package/dist/web/assets/powershell-CFHJl5sT.js +2 -0
- package/dist/web/assets/powershell-CFHJl5sT.js.map +1 -0
- package/dist/web/assets/properties-C78fOPTZ.js +2 -0
- package/dist/web/assets/properties-C78fOPTZ.js.map +1 -0
- package/dist/web/assets/protobuf-ChK-085T.js +2 -0
- package/dist/web/assets/protobuf-ChK-085T.js.map +1 -0
- package/dist/web/assets/pug-DukmZTjD.js +2 -0
- package/dist/web/assets/pug-DukmZTjD.js.map +1 -0
- package/dist/web/assets/puppet-DMA9R1ak.js +2 -0
- package/dist/web/assets/puppet-DMA9R1ak.js.map +1 -0
- package/dist/web/assets/python-BuPzkPfP.js +2 -0
- package/dist/web/assets/python-BuPzkPfP.js.map +1 -0
- package/dist/web/assets/q-pXgVlZs6.js +2 -0
- package/dist/web/assets/q-pXgVlZs6.js.map +1 -0
- package/dist/web/assets/r-DUYO_cvP.js +2 -0
- package/dist/web/assets/r-DUYO_cvP.js.map +1 -0
- package/dist/web/assets/rpm-CTu-6PCP.js +2 -0
- package/dist/web/assets/rpm-CTu-6PCP.js.map +1 -0
- package/dist/web/assets/ruby-B2Rjki9n.js +2 -0
- package/dist/web/assets/ruby-B2Rjki9n.js.map +1 -0
- package/dist/web/assets/sas-B4kiWyti.js +2 -0
- package/dist/web/assets/sas-B4kiWyti.js.map +1 -0
- package/dist/web/assets/scheme-C41bIUwD.js +2 -0
- package/dist/web/assets/scheme-C41bIUwD.js.map +1 -0
- package/dist/web/assets/shell-CjFT_Tl9.js +2 -0
- package/dist/web/assets/shell-CjFT_Tl9.js.map +1 -0
- package/dist/web/assets/sieve-C3Gn_uJK.js +2 -0
- package/dist/web/assets/sieve-C3Gn_uJK.js.map +1 -0
- package/dist/web/assets/simple-mode-GW_nhZxv.js +2 -0
- package/dist/web/assets/simple-mode-GW_nhZxv.js.map +1 -0
- package/dist/web/assets/smalltalk-CnHTOXQT.js +2 -0
- package/dist/web/assets/smalltalk-CnHTOXQT.js.map +1 -0
- package/dist/web/assets/solr-DehyRSwq.js +2 -0
- package/dist/web/assets/solr-DehyRSwq.js.map +1 -0
- package/dist/web/assets/sparql-DkYu6x3z.js +2 -0
- package/dist/web/assets/sparql-DkYu6x3z.js.map +1 -0
- package/dist/web/assets/spreadsheet-BCZA_wO0.js +2 -0
- package/dist/web/assets/spreadsheet-BCZA_wO0.js.map +1 -0
- package/dist/web/assets/sql-D0XecflT.js +2 -0
- package/dist/web/assets/sql-D0XecflT.js.map +1 -0
- package/dist/web/assets/stex-C3f8Ysf7.js +2 -0
- package/dist/web/assets/stex-C3f8Ysf7.js.map +1 -0
- package/dist/web/assets/stylus-B533Al4x.js +2 -0
- package/dist/web/assets/stylus-B533Al4x.js.map +1 -0
- package/dist/web/assets/swift-BzpIVaGY.js +2 -0
- package/dist/web/assets/swift-BzpIVaGY.js.map +1 -0
- package/dist/web/assets/tcl-DVfN8rqt.js +2 -0
- package/dist/web/assets/tcl-DVfN8rqt.js.map +1 -0
- package/dist/web/assets/textile-CnDTJFAw.js +2 -0
- package/dist/web/assets/textile-CnDTJFAw.js.map +1 -0
- package/dist/web/assets/tiddlywiki-DO-Gjzrf.js +2 -0
- package/dist/web/assets/tiddlywiki-DO-Gjzrf.js.map +1 -0
- package/dist/web/assets/tiki-DGYXhP31.js +2 -0
- package/dist/web/assets/tiki-DGYXhP31.js.map +1 -0
- package/dist/web/assets/toml-Bm5Em-hy.js +2 -0
- package/dist/web/assets/toml-Bm5Em-hy.js.map +1 -0
- package/dist/web/assets/troff-wAsdV37c.js +2 -0
- package/dist/web/assets/troff-wAsdV37c.js.map +1 -0
- package/dist/web/assets/ttcn-CfJYG6tj.js +2 -0
- package/dist/web/assets/ttcn-CfJYG6tj.js.map +1 -0
- package/dist/web/assets/ttcn-cfg-B9xdYoR4.js +2 -0
- package/dist/web/assets/ttcn-cfg-B9xdYoR4.js.map +1 -0
- package/dist/web/assets/turtle-B1tBg_DP.js +2 -0
- package/dist/web/assets/turtle-B1tBg_DP.js.map +1 -0
- package/dist/web/assets/vb-CmGdzxic.js +2 -0
- package/dist/web/assets/vb-CmGdzxic.js.map +1 -0
- package/dist/web/assets/vbscript-BuJXcnF6.js +2 -0
- package/dist/web/assets/vbscript-BuJXcnF6.js.map +1 -0
- package/dist/web/assets/velocity-D8B20fx6.js +2 -0
- package/dist/web/assets/velocity-D8B20fx6.js.map +1 -0
- package/dist/web/assets/verilog-C6RDOZhf.js +2 -0
- package/dist/web/assets/verilog-C6RDOZhf.js.map +1 -0
- package/dist/web/assets/vhdl-lSbBsy5d.js +2 -0
- package/dist/web/assets/vhdl-lSbBsy5d.js.map +1 -0
- package/dist/web/assets/webidl-ZXfAyPTL.js +2 -0
- package/dist/web/assets/webidl-ZXfAyPTL.js.map +1 -0
- package/dist/web/assets/xquery-CQfU5ijd.js +2 -0
- package/dist/web/assets/xquery-CQfU5ijd.js.map +1 -0
- package/dist/web/assets/yacas-BJ4BC0dw.js +2 -0
- package/dist/web/assets/yacas-BJ4BC0dw.js.map +1 -0
- package/dist/web/assets/z80-Hz9HOZM7.js +2 -0
- package/dist/web/assets/z80-Hz9HOZM7.js.map +1 -0
- package/dist/web/index.html +23 -0
- package/package.json +75 -0
- package/public/.gitkeep +0 -0
- package/public/assets/apl-B4CMkyY2.js +2 -0
- package/public/assets/apl-B4CMkyY2.js.map +1 -0
- package/public/assets/asciiarmor-Df11BRmG.js +2 -0
- package/public/assets/asciiarmor-Df11BRmG.js.map +1 -0
- package/public/assets/asn1-EdZsLKOL.js +2 -0
- package/public/assets/asn1-EdZsLKOL.js.map +1 -0
- package/public/assets/asterisk-B-8jnY81.js +2 -0
- package/public/assets/asterisk-B-8jnY81.js.map +1 -0
- package/public/assets/brainfuck-C4LP7Hcl.js +2 -0
- package/public/assets/brainfuck-C4LP7Hcl.js.map +1 -0
- package/public/assets/clike-B9uivgTg.js +2 -0
- package/public/assets/clike-B9uivgTg.js.map +1 -0
- package/public/assets/clojure-BMjYHr_A.js +2 -0
- package/public/assets/clojure-BMjYHr_A.js.map +1 -0
- package/public/assets/cmake-BQqOBYOt.js +2 -0
- package/public/assets/cmake-BQqOBYOt.js.map +1 -0
- package/public/assets/cobol-CWcv1MsR.js +2 -0
- package/public/assets/cobol-CWcv1MsR.js.map +1 -0
- package/public/assets/coffeescript-S37ZYGWr.js +2 -0
- package/public/assets/coffeescript-S37ZYGWr.js.map +1 -0
- package/public/assets/commonlisp-DBKNyK5s.js +2 -0
- package/public/assets/commonlisp-DBKNyK5s.js.map +1 -0
- package/public/assets/crystal-SjHAIU92.js +2 -0
- package/public/assets/crystal-SjHAIU92.js.map +1 -0
- package/public/assets/css-BnMrqG3P.js +2 -0
- package/public/assets/css-BnMrqG3P.js.map +1 -0
- package/public/assets/cypher-C_CwsFkJ.js +2 -0
- package/public/assets/cypher-C_CwsFkJ.js.map +1 -0
- package/public/assets/d-pRatUO7H.js +2 -0
- package/public/assets/d-pRatUO7H.js.map +1 -0
- package/public/assets/diff-DbItnlRl.js +2 -0
- package/public/assets/diff-DbItnlRl.js.map +1 -0
- package/public/assets/dockerfile-BKs6k2Af.js +2 -0
- package/public/assets/dockerfile-BKs6k2Af.js.map +1 -0
- package/public/assets/dtd-DF_7sFjM.js +2 -0
- package/public/assets/dtd-DF_7sFjM.js.map +1 -0
- package/public/assets/dylan-DwRh75JA.js +2 -0
- package/public/assets/dylan-DwRh75JA.js.map +1 -0
- package/public/assets/ebnf-CDyGwa7X.js +2 -0
- package/public/assets/ebnf-CDyGwa7X.js.map +1 -0
- package/public/assets/ecl-Cabwm37j.js +2 -0
- package/public/assets/ecl-Cabwm37j.js.map +1 -0
- package/public/assets/eiffel-CnydiIhH.js +2 -0
- package/public/assets/eiffel-CnydiIhH.js.map +1 -0
- package/public/assets/elm-vLlmbW-K.js +2 -0
- package/public/assets/elm-vLlmbW-K.js.map +1 -0
- package/public/assets/erlang-BNw1qcRV.js +2 -0
- package/public/assets/erlang-BNw1qcRV.js.map +1 -0
- package/public/assets/factor-kuTfRLto.js +2 -0
- package/public/assets/factor-kuTfRLto.js.map +1 -0
- package/public/assets/fcl-Kvtd6kyn.js +2 -0
- package/public/assets/fcl-Kvtd6kyn.js.map +1 -0
- package/public/assets/forth-Ffai-XNe.js +2 -0
- package/public/assets/forth-Ffai-XNe.js.map +1 -0
- package/public/assets/fortran-DYz_wnZ1.js +2 -0
- package/public/assets/fortran-DYz_wnZ1.js.map +1 -0
- package/public/assets/gas-Bneqetm1.js +2 -0
- package/public/assets/gas-Bneqetm1.js.map +1 -0
- package/public/assets/gherkin-heZmZLOM.js +2 -0
- package/public/assets/gherkin-heZmZLOM.js.map +1 -0
- package/public/assets/groovy-D9Dt4D0W.js +2 -0
- package/public/assets/groovy-D9Dt4D0W.js.map +1 -0
- package/public/assets/haskell-BWDZoCOh.js +2 -0
- package/public/assets/haskell-BWDZoCOh.js.map +1 -0
- package/public/assets/haxe-H-WmDvRZ.js +2 -0
- package/public/assets/haxe-H-WmDvRZ.js.map +1 -0
- package/public/assets/http-DBlCnlav.js +2 -0
- package/public/assets/http-DBlCnlav.js.map +1 -0
- package/public/assets/idl-BEugSyMb.js +2 -0
- package/public/assets/idl-BEugSyMb.js.map +1 -0
- package/public/assets/index-BHi_kGSi.js +8 -0
- package/public/assets/index-BHi_kGSi.js.map +1 -0
- package/public/assets/index-BMLAwwWL.js +2 -0
- package/public/assets/index-BMLAwwWL.js.map +1 -0
- package/public/assets/index-BNSDh5mD.js +2 -0
- package/public/assets/index-BNSDh5mD.js.map +1 -0
- package/public/assets/index-BR0D24wt.js +2 -0
- package/public/assets/index-BR0D24wt.js.map +1 -0
- package/public/assets/index-BdLsiQv5.js +2 -0
- package/public/assets/index-BdLsiQv5.js.map +1 -0
- package/public/assets/index-BjnJos4J.js +2 -0
- package/public/assets/index-BjnJos4J.js.map +1 -0
- package/public/assets/index-CM3gGvbH.js +509 -0
- package/public/assets/index-CM3gGvbH.js.map +1 -0
- package/public/assets/index-CV8De3J9.js +2 -0
- package/public/assets/index-CV8De3J9.js.map +1 -0
- package/public/assets/index-ChuKVzLw.js +2 -0
- package/public/assets/index-ChuKVzLw.js.map +1 -0
- package/public/assets/index-CpfmaE2d.js +2 -0
- package/public/assets/index-CpfmaE2d.js.map +1 -0
- package/public/assets/index-D90_xI0s.js +2 -0
- package/public/assets/index-D90_xI0s.js.map +1 -0
- package/public/assets/index-DR3bJemi.js +4 -0
- package/public/assets/index-DR3bJemi.js.map +1 -0
- package/public/assets/index-DlsEbLHk.css +1 -0
- package/public/assets/index-MR5aWKcm.js +2 -0
- package/public/assets/index-MR5aWKcm.js.map +1 -0
- package/public/assets/index-MrhuDMHQ.js +2 -0
- package/public/assets/index-MrhuDMHQ.js.map +1 -0
- package/public/assets/index-NbLWR4tH.js +2 -0
- package/public/assets/index-NbLWR4tH.js.map +1 -0
- package/public/assets/index-VnBXaSng.js +3 -0
- package/public/assets/index-VnBXaSng.js.map +1 -0
- package/public/assets/index-XEgqkWdk.js +2 -0
- package/public/assets/index-XEgqkWdk.js.map +1 -0
- package/public/assets/index-zHvewZlp.js +2 -0
- package/public/assets/index-zHvewZlp.js.map +1 -0
- package/public/assets/javascript-qCveANmP.js +2 -0
- package/public/assets/javascript-qCveANmP.js.map +1 -0
- package/public/assets/julia-DuME0IfC.js +2 -0
- package/public/assets/julia-DuME0IfC.js.map +1 -0
- package/public/assets/livescript-BwQOo05w.js +2 -0
- package/public/assets/livescript-BwQOo05w.js.map +1 -0
- package/public/assets/lua-BgMRiT3U.js +2 -0
- package/public/assets/lua-BgMRiT3U.js.map +1 -0
- package/public/assets/mathematica-DTrFuWx2.js +2 -0
- package/public/assets/mathematica-DTrFuWx2.js.map +1 -0
- package/public/assets/mbox-CNhZ1qSd.js +2 -0
- package/public/assets/mbox-CNhZ1qSd.js.map +1 -0
- package/public/assets/mirc-CjQqDB4T.js +2 -0
- package/public/assets/mirc-CjQqDB4T.js.map +1 -0
- package/public/assets/mllike-CXdrOF99.js +2 -0
- package/public/assets/mllike-CXdrOF99.js.map +1 -0
- package/public/assets/modelica-Dc1JOy9r.js +2 -0
- package/public/assets/modelica-Dc1JOy9r.js.map +1 -0
- package/public/assets/mscgen-BA5vi2Kp.js +2 -0
- package/public/assets/mscgen-BA5vi2Kp.js.map +1 -0
- package/public/assets/mumps-BT43cFF4.js +2 -0
- package/public/assets/mumps-BT43cFF4.js.map +1 -0
- package/public/assets/nginx-DdIZxoE0.js +2 -0
- package/public/assets/nginx-DdIZxoE0.js.map +1 -0
- package/public/assets/nsis-LdVXkNf5.js +2 -0
- package/public/assets/nsis-LdVXkNf5.js.map +1 -0
- package/public/assets/ntriples-BfvgReVJ.js +2 -0
- package/public/assets/ntriples-BfvgReVJ.js.map +1 -0
- package/public/assets/octave-Ck1zUtKM.js +2 -0
- package/public/assets/octave-Ck1zUtKM.js.map +1 -0
- package/public/assets/oz-BzwKVEFT.js +2 -0
- package/public/assets/oz-BzwKVEFT.js.map +1 -0
- package/public/assets/pascal--L3eBynH.js +2 -0
- package/public/assets/pascal--L3eBynH.js.map +1 -0
- package/public/assets/perl-CdXCOZ3F.js +2 -0
- package/public/assets/perl-CdXCOZ3F.js.map +1 -0
- package/public/assets/pig-CevX1Tat.js +2 -0
- package/public/assets/pig-CevX1Tat.js.map +1 -0
- package/public/assets/powershell-CFHJl5sT.js +2 -0
- package/public/assets/powershell-CFHJl5sT.js.map +1 -0
- package/public/assets/properties-C78fOPTZ.js +2 -0
- package/public/assets/properties-C78fOPTZ.js.map +1 -0
- package/public/assets/protobuf-ChK-085T.js +2 -0
- package/public/assets/protobuf-ChK-085T.js.map +1 -0
- package/public/assets/pug-DukmZTjD.js +2 -0
- package/public/assets/pug-DukmZTjD.js.map +1 -0
- package/public/assets/puppet-DMA9R1ak.js +2 -0
- package/public/assets/puppet-DMA9R1ak.js.map +1 -0
- package/public/assets/python-BuPzkPfP.js +2 -0
- package/public/assets/python-BuPzkPfP.js.map +1 -0
- package/public/assets/q-pXgVlZs6.js +2 -0
- package/public/assets/q-pXgVlZs6.js.map +1 -0
- package/public/assets/r-DUYO_cvP.js +2 -0
- package/public/assets/r-DUYO_cvP.js.map +1 -0
- package/public/assets/rpm-CTu-6PCP.js +2 -0
- package/public/assets/rpm-CTu-6PCP.js.map +1 -0
- package/public/assets/ruby-B2Rjki9n.js +2 -0
- package/public/assets/ruby-B2Rjki9n.js.map +1 -0
- package/public/assets/sas-B4kiWyti.js +2 -0
- package/public/assets/sas-B4kiWyti.js.map +1 -0
- package/public/assets/scheme-C41bIUwD.js +2 -0
- package/public/assets/scheme-C41bIUwD.js.map +1 -0
- package/public/assets/shell-CjFT_Tl9.js +2 -0
- package/public/assets/shell-CjFT_Tl9.js.map +1 -0
- package/public/assets/sieve-C3Gn_uJK.js +2 -0
- package/public/assets/sieve-C3Gn_uJK.js.map +1 -0
- package/public/assets/simple-mode-GW_nhZxv.js +2 -0
- package/public/assets/simple-mode-GW_nhZxv.js.map +1 -0
- package/public/assets/smalltalk-CnHTOXQT.js +2 -0
- package/public/assets/smalltalk-CnHTOXQT.js.map +1 -0
- package/public/assets/solr-DehyRSwq.js +2 -0
- package/public/assets/solr-DehyRSwq.js.map +1 -0
- package/public/assets/sparql-DkYu6x3z.js +2 -0
- package/public/assets/sparql-DkYu6x3z.js.map +1 -0
- package/public/assets/spreadsheet-BCZA_wO0.js +2 -0
- package/public/assets/spreadsheet-BCZA_wO0.js.map +1 -0
- package/public/assets/sql-D0XecflT.js +2 -0
- package/public/assets/sql-D0XecflT.js.map +1 -0
- package/public/assets/stex-C3f8Ysf7.js +2 -0
- package/public/assets/stex-C3f8Ysf7.js.map +1 -0
- package/public/assets/stylus-B533Al4x.js +2 -0
- package/public/assets/stylus-B533Al4x.js.map +1 -0
- package/public/assets/swift-BzpIVaGY.js +2 -0
- package/public/assets/swift-BzpIVaGY.js.map +1 -0
- package/public/assets/tcl-DVfN8rqt.js +2 -0
- package/public/assets/tcl-DVfN8rqt.js.map +1 -0
- package/public/assets/textile-CnDTJFAw.js +2 -0
- package/public/assets/textile-CnDTJFAw.js.map +1 -0
- package/public/assets/tiddlywiki-DO-Gjzrf.js +2 -0
- package/public/assets/tiddlywiki-DO-Gjzrf.js.map +1 -0
- package/public/assets/tiki-DGYXhP31.js +2 -0
- package/public/assets/tiki-DGYXhP31.js.map +1 -0
- package/public/assets/toml-Bm5Em-hy.js +2 -0
- package/public/assets/toml-Bm5Em-hy.js.map +1 -0
- package/public/assets/troff-wAsdV37c.js +2 -0
- package/public/assets/troff-wAsdV37c.js.map +1 -0
- package/public/assets/ttcn-CfJYG6tj.js +2 -0
- package/public/assets/ttcn-CfJYG6tj.js.map +1 -0
- package/public/assets/ttcn-cfg-B9xdYoR4.js +2 -0
- package/public/assets/ttcn-cfg-B9xdYoR4.js.map +1 -0
- package/public/assets/turtle-B1tBg_DP.js +2 -0
- package/public/assets/turtle-B1tBg_DP.js.map +1 -0
- package/public/assets/vb-CmGdzxic.js +2 -0
- package/public/assets/vb-CmGdzxic.js.map +1 -0
- package/public/assets/vbscript-BuJXcnF6.js +2 -0
- package/public/assets/vbscript-BuJXcnF6.js.map +1 -0
- package/public/assets/velocity-D8B20fx6.js +2 -0
- package/public/assets/velocity-D8B20fx6.js.map +1 -0
- package/public/assets/verilog-C6RDOZhf.js +2 -0
- package/public/assets/verilog-C6RDOZhf.js.map +1 -0
- package/public/assets/vhdl-lSbBsy5d.js +2 -0
- package/public/assets/vhdl-lSbBsy5d.js.map +1 -0
- package/public/assets/webidl-ZXfAyPTL.js +2 -0
- package/public/assets/webidl-ZXfAyPTL.js.map +1 -0
- package/public/assets/xquery-CQfU5ijd.js +2 -0
- package/public/assets/xquery-CQfU5ijd.js.map +1 -0
- package/public/assets/yacas-BJ4BC0dw.js +2 -0
- package/public/assets/yacas-BJ4BC0dw.js.map +1 -0
- package/public/assets/z80-Hz9HOZM7.js +2 -0
- package/public/assets/z80-Hz9HOZM7.js.map +1 -0
- package/public/index.html +15 -0
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dockerfile-BKs6k2Af.js","assets/simple-mode-GW_nhZxv.js","assets/factor-kuTfRLto.js","assets/nsis-LdVXkNf5.js","assets/pug-DukmZTjD.js","assets/javascript-qCveANmP.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function gz(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Gh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ql(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gR={exports:{}},km={},OR={exports:{}},Ne={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var Ef=Symbol.for("react.element"),Oz=Symbol.for("react.portal"),yz=Symbol.for("react.fragment"),vz=Symbol.for("react.strict_mode"),xz=Symbol.for("react.profiler"),bz=Symbol.for("react.provider"),wz=Symbol.for("react.context"),Sz=Symbol.for("react.forward_ref"),kz=Symbol.for("react.suspense"),Cz=Symbol.for("react.memo"),Pz=Symbol.for("react.lazy"),QS=Symbol.iterator;function Tz(t){return t===null||typeof t!="object"?null:(t=QS&&t[QS]||t["@@iterator"],typeof t=="function"?t:null)}var yR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},vR=Object.assign,xR={};function Yl(t,e,n){this.props=t,this.context=e,this.refs=xR,this.updater=n||yR}Yl.prototype.isReactComponent={};Yl.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Yl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function bR(){}bR.prototype=Yl.prototype;function H0(t,e,n){this.props=t,this.context=e,this.refs=xR,this.updater=n||yR}var G0=H0.prototype=new bR;G0.constructor=H0;vR(G0,Yl.prototype);G0.isPureReactComponent=!0;var IS=Array.isArray,wR=Object.prototype.hasOwnProperty,K0={current:null},SR={key:!0,ref:!0,__self:!0,__source:!0};function kR(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)wR.call(e,r)&&!SR.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Ef,type:t,key:s,ref:o,props:i,_owner:K0.current}}function Ez(t,e){return{$$typeof:Ef,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function J0(t){return typeof t=="object"&&t!==null&&t.$$typeof===Ef}function Rz(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var NS=/\/+/g;function Ug(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Rz(""+t.key):e.toString(36)}function ph(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Ef:case Oz:o=!0}}if(o)return o=t,i=i(o),t=r===""?"."+Ug(o,0):r,IS(i)?(n="",t!=null&&(n=t.replace(NS,"$&/")+"/"),ph(i,e,n,"",function(c){return c})):i!=null&&(J0(i)&&(i=Ez(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(NS,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",IS(t))for(var a=0;a<t.length;a++){s=t[a];var l=r+Ug(s,a);o+=ph(s,e,n,l,i)}else if(l=Tz(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=r+Ug(s,a++),o+=ph(s,e,n,l,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function ld(t,e,n){if(t==null)return t;var r=[],i=0;return ph(t,r,"","",function(s){return e.call(n,s,i++)}),r}function _z(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var on={current:null},mh={transition:null},$z={ReactCurrentDispatcher:on,ReactCurrentBatchConfig:mh,ReactCurrentOwner:K0};function CR(){throw Error("act(...) is not supported in production builds of React.")}Ne.Children={map:ld,forEach:function(t,e,n){ld(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return ld(t,function(){e++}),e},toArray:function(t){return ld(t,function(e){return e})||[]},only:function(t){if(!J0(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Ne.Component=Yl;Ne.Fragment=yz;Ne.Profiler=xz;Ne.PureComponent=H0;Ne.StrictMode=vz;Ne.Suspense=kz;Ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$z;Ne.act=CR;Ne.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=vR({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=K0.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)wR.call(e,l)&&!SR.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Ef,type:t.type,key:i,ref:s,props:r,_owner:o}};Ne.createContext=function(t){return t={$$typeof:wz,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:bz,_context:t},t.Consumer=t};Ne.createElement=kR;Ne.createFactory=function(t){var e=kR.bind(null,t);return e.type=t,e};Ne.createRef=function(){return{current:null}};Ne.forwardRef=function(t){return{$$typeof:Sz,render:t}};Ne.isValidElement=J0;Ne.lazy=function(t){return{$$typeof:Pz,_payload:{_status:-1,_result:t},_init:_z}};Ne.memo=function(t,e){return{$$typeof:Cz,type:t,compare:e===void 0?null:e}};Ne.startTransition=function(t){var e=mh.transition;mh.transition={};try{t()}finally{mh.transition=e}};Ne.unstable_act=CR;Ne.useCallback=function(t,e){return on.current.useCallback(t,e)};Ne.useContext=function(t){return on.current.useContext(t)};Ne.useDebugValue=function(){};Ne.useDeferredValue=function(t){return on.current.useDeferredValue(t)};Ne.useEffect=function(t,e){return on.current.useEffect(t,e)};Ne.useId=function(){return on.current.useId()};Ne.useImperativeHandle=function(t,e,n){return on.current.useImperativeHandle(t,e,n)};Ne.useInsertionEffect=function(t,e){return on.current.useInsertionEffect(t,e)};Ne.useLayoutEffect=function(t,e){return on.current.useLayoutEffect(t,e)};Ne.useMemo=function(t,e){return on.current.useMemo(t,e)};Ne.useReducer=function(t,e,n){return on.current.useReducer(t,e,n)};Ne.useRef=function(t){return on.current.useRef(t)};Ne.useState=function(t){return on.current.useState(t)};Ne.useSyncExternalStore=function(t,e,n){return on.current.useSyncExternalStore(t,e,n)};Ne.useTransition=function(){return on.current.useTransition()};Ne.version="18.3.1";OR.exports=Ne;var O=OR.exports;const ee=ql(O),eb=gz({__proto__:null,default:ee},[O]);/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var Az=O,Qz=Symbol.for("react.element"),Iz=Symbol.for("react.fragment"),Nz=Object.prototype.hasOwnProperty,jz=Az.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Mz={key:!0,ref:!0,__self:!0,__source:!0};function PR(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)Nz.call(e,r)&&!Mz.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:Qz,type:t,key:s,ref:o,props:i,_owner:jz.current}}km.Fragment=Iz;km.jsx=PR;km.jsxs=PR;gR.exports=km;var p=gR.exports,fv={},TR={exports:{}},Hn={},ER={exports:{}},RR={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.min.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/(function(t){function e(N,Q){var P=N.length;N.push(Q);e:for(;0<P;){var M=P-1>>>1,$=N[M];if(0<i($,Q))N[M]=Q,N[P]=$,P=M;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var Q=N[0],P=N.pop();if(P!==Q){N[0]=P;e:for(var M=0,$=N.length,R=$>>>1;M<R;){var q=2*(M+1)-1,H=N[q],ie=q+1,Y=N[ie];if(0>i(H,P))ie<$&&0>i(Y,H)?(N[M]=Y,N[ie]=P,M=ie):(N[M]=H,N[q]=P,M=q);else if(ie<$&&0>i(Y,P))N[M]=Y,N[ie]=P,M=ie;else break e}}return Q}function i(N,Q){var P=N.sortIndex-Q.sortIndex;return P!==0?P:N.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,f=null,d=3,h=!1,g=!1,m=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(N){for(var Q=n(c);Q!==null;){if(Q.callback===null)r(c);else if(Q.startTime<=N)r(c),Q.sortIndex=Q.expirationTime,e(l,Q);else break;Q=n(c)}}function k(N){if(m=!1,b(N),!g)if(n(l)!==null)g=!0,W(w);else{var Q=n(c);Q!==null&&F(k,Q.startTime-N)}}function w(N,Q){g=!1,m&&(m=!1,y(_),_=-1),h=!0;var P=d;try{for(b(Q),f=n(l);f!==null&&(!(f.expirationTime>Q)||N&&!j());){var M=f.callback;if(typeof M=="function"){f.callback=null,d=f.priorityLevel;var $=M(f.expirationTime<=Q);Q=t.unstable_now(),typeof $=="function"?f.callback=$:f===n(l)&&r(l),b(Q)}else r(l);f=n(l)}if(f!==null)var R=!0;else{var q=n(c);q!==null&&F(k,q.startTime-Q),R=!1}return R}finally{f=null,d=P,h=!1}}var S=!1,C=null,_=-1,I=5,E=-1;function j(){return!(t.unstable_now()-E<I)}function A(){if(C!==null){var N=t.unstable_now();E=N;var Q=!0;try{Q=C(!0,N)}finally{Q?L():(S=!1,C=null)}}else S=!1}var L;if(typeof x=="function")L=function(){x(A)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,X=z.port2;z.port1.onmessage=A,L=function(){X.postMessage(null)}}else L=function(){v(A,0)};function W(N){C=N,S||(S=!0,L())}function F(N,Q){_=v(function(){N(t.unstable_now())},Q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(N){N.callback=null},t.unstable_continueExecution=function(){g||h||(g=!0,W(w))},t.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<N?Math.floor(1e3/N):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(N){switch(d){case 1:case 2:case 3:var Q=3;break;default:Q=d}var P=d;d=Q;try{return N()}finally{d=P}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(N,Q){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var P=d;d=N;try{return Q()}finally{d=P}},t.unstable_scheduleCallback=function(N,Q,P){var M=t.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?M+P:M):P=M,N){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=P+$,N={id:u++,callback:Q,priorityLevel:N,startTime:P,expirationTime:$,sortIndex:-1},P>M?(N.sortIndex=P,e(c,N),n(l)===null&&N===n(c)&&(m?(y(_),_=-1):m=!0,F(k,P-M))):(N.sortIndex=$,e(l,N),g||h||(g=!0,W(w))),N},t.unstable_shouldYield=j,t.unstable_wrapCallback=function(N){var Q=d;return function(){var P=d;d=Q;try{return N.apply(this,arguments)}finally{d=P}}}})(RR);ER.exports=RR;var Dz=ER.exports;/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.min.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var Lz=O,Yn=Dz;function G(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var _R=new Set,Tu={};function ua(t,e){gl(t,e),gl(t+"Capture",e)}function gl(t,e){for(Tu[t]=e,t=0;t<e.length;t++)_R.add(e[t])}var qi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),dv=Object.prototype.hasOwnProperty,zz=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,jS={},MS={};function Bz(t){return dv.call(MS,t)?!0:dv.call(jS,t)?!1:zz.test(t)?MS[t]=!0:(jS[t]=!0,!1)}function Vz(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Fz(t,e,n,r){if(e===null||typeof e>"u"||Vz(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function an(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Lt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Lt[t]=new an(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Lt[e]=new an(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Lt[t]=new an(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Lt[t]=new an(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Lt[t]=new an(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Lt[t]=new an(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Lt[t]=new an(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Lt[t]=new an(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Lt[t]=new an(t,5,!1,t.toLowerCase(),null,!1,!1)});var tb=/[\-:]([a-z])/g;function nb(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(tb,nb);Lt[e]=new an(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(tb,nb);Lt[e]=new an(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(tb,nb);Lt[e]=new an(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Lt[t]=new an(t,1,!1,t.toLowerCase(),null,!1,!1)});Lt.xlinkHref=new an("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Lt[t]=new an(t,1,!1,t.toLowerCase(),null,!0,!0)});function rb(t,e,n,r){var i=Lt.hasOwnProperty(e)?Lt[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(Fz(e,n,i,r)&&(n=null),r||i===null?Bz(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var is=Lz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,cd=Symbol.for("react.element"),ja=Symbol.for("react.portal"),Ma=Symbol.for("react.fragment"),ib=Symbol.for("react.strict_mode"),hv=Symbol.for("react.profiler"),$R=Symbol.for("react.provider"),AR=Symbol.for("react.context"),sb=Symbol.for("react.forward_ref"),pv=Symbol.for("react.suspense"),mv=Symbol.for("react.suspense_list"),ob=Symbol.for("react.memo"),vs=Symbol.for("react.lazy"),QR=Symbol.for("react.offscreen"),DS=Symbol.iterator;function xc(t){return t===null||typeof t!="object"?null:(t=DS&&t[DS]||t["@@iterator"],typeof t=="function"?t:null)}var ct=Object.assign,Hg;function Xc(t){if(Hg===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Hg=e&&e[1]||""}return`
|
|
35
|
+
`+Hg+t}var Gg=!1;function Kg(t,e){if(!t||Gg)return"";Gg=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
|
|
36
|
+
`),s=r.stack.split(`
|
|
37
|
+
`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
|
|
38
|
+
`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Gg=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Xc(t):""}function Xz(t){switch(t.tag){case 5:return Xc(t.type);case 16:return Xc("Lazy");case 13:return Xc("Suspense");case 19:return Xc("SuspenseList");case 0:case 2:case 15:return t=Kg(t.type,!1),t;case 11:return t=Kg(t.type.render,!1),t;case 1:return t=Kg(t.type,!0),t;default:return""}}function gv(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ma:return"Fragment";case ja:return"Portal";case hv:return"Profiler";case ib:return"StrictMode";case pv:return"Suspense";case mv:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case AR:return(t.displayName||"Context")+".Consumer";case $R:return(t._context.displayName||"Context")+".Provider";case sb:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ob:return e=t.displayName||null,e!==null?e:gv(t.type)||"Memo";case vs:e=t._payload,t=t._init;try{return gv(t(e))}catch{}}return null}function Zz(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return gv(e);case 8:return e===ib?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Fs(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function IR(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Wz(t){var e=IR(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function ud(t){t._valueTracker||(t._valueTracker=Wz(t))}function NR(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=IR(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Kh(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Ov(t,e){var n=e.checked;return ct({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function LS(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Fs(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function jR(t,e){e=e.checked,e!=null&&rb(t,"checked",e,!1)}function yv(t,e){jR(t,e);var n=Fs(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?vv(t,e.type,n):e.hasOwnProperty("defaultValue")&&vv(t,e.type,Fs(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function zS(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function vv(t,e,n){(e!=="number"||Kh(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Zc=Array.isArray;function Ga(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Fs(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function xv(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(G(91));return ct({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function BS(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(G(92));if(Zc(n)){if(1<n.length)throw Error(G(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Fs(n)}}function MR(t,e){var n=Fs(e.value),r=Fs(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function VS(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function DR(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function bv(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?DR(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var fd,LR=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(fd=fd||document.createElement("div"),fd.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=fd.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Eu(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ru={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qz=["Webkit","ms","Moz","O"];Object.keys(ru).forEach(function(t){qz.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ru[e]=ru[t]})});function zR(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||ru.hasOwnProperty(t)&&ru[t]?(""+e).trim():e+"px"}function BR(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=zR(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var Yz=ct({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wv(t,e){if(e){if(Yz[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(G(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(G(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(G(61))}if(e.style!=null&&typeof e.style!="object")throw Error(G(62))}}function Sv(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var kv=null;function ab(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Cv=null,Ka=null,Ja=null;function FS(t){if(t=$f(t)){if(typeof Cv!="function")throw Error(G(280));var e=t.stateNode;e&&(e=Rm(e),Cv(t.stateNode,t.type,e))}}function VR(t){Ka?Ja?Ja.push(t):Ja=[t]:Ka=t}function FR(){if(Ka){var t=Ka,e=Ja;if(Ja=Ka=null,FS(t),e)for(t=0;t<e.length;t++)FS(e[t])}}function XR(t,e){return t(e)}function ZR(){}var Jg=!1;function WR(t,e,n){if(Jg)return t(e,n);Jg=!0;try{return XR(t,e,n)}finally{Jg=!1,(Ka!==null||Ja!==null)&&(ZR(),FR())}}function Ru(t,e){var n=t.stateNode;if(n===null)return null;var r=Rm(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(G(231,e,typeof n));return n}var Pv=!1;if(qi)try{var bc={};Object.defineProperty(bc,"passive",{get:function(){Pv=!0}}),window.addEventListener("test",bc,bc),window.removeEventListener("test",bc,bc)}catch{Pv=!1}function Uz(t,e,n,r,i,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(u){this.onError(u)}}var iu=!1,Jh=null,ep=!1,Tv=null,Hz={onError:function(t){iu=!0,Jh=t}};function Gz(t,e,n,r,i,s,o,a,l){iu=!1,Jh=null,Uz.apply(Hz,arguments)}function Kz(t,e,n,r,i,s,o,a,l){if(Gz.apply(this,arguments),iu){if(iu){var c=Jh;iu=!1,Jh=null}else throw Error(G(198));ep||(ep=!0,Tv=c)}}function fa(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function qR(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function XS(t){if(fa(t)!==t)throw Error(G(188))}function Jz(t){var e=t.alternate;if(!e){if(e=fa(t),e===null)throw Error(G(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return XS(i),t;if(s===r)return XS(i),e;s=s.sibling}throw Error(G(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(G(189))}}if(n.alternate!==r)throw Error(G(190))}if(n.tag!==3)throw Error(G(188));return n.stateNode.current===n?t:e}function YR(t){return t=Jz(t),t!==null?UR(t):null}function UR(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=UR(t);if(e!==null)return e;t=t.sibling}return null}var HR=Yn.unstable_scheduleCallback,ZS=Yn.unstable_cancelCallback,eB=Yn.unstable_shouldYield,tB=Yn.unstable_requestPaint,dt=Yn.unstable_now,nB=Yn.unstable_getCurrentPriorityLevel,lb=Yn.unstable_ImmediatePriority,GR=Yn.unstable_UserBlockingPriority,tp=Yn.unstable_NormalPriority,rB=Yn.unstable_LowPriority,KR=Yn.unstable_IdlePriority,Cm=null,xi=null;function iB(t){if(xi&&typeof xi.onCommitFiberRoot=="function")try{xi.onCommitFiberRoot(Cm,t,void 0,(t.current.flags&128)===128)}catch{}}var Dr=Math.clz32?Math.clz32:aB,sB=Math.log,oB=Math.LN2;function aB(t){return t>>>=0,t===0?32:31-(sB(t)/oB|0)|0}var dd=64,hd=4194304;function Wc(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function np(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Wc(a):(s&=o,s!==0&&(r=Wc(s)))}else o=n&~i,o!==0?r=Wc(o):s!==0&&(r=Wc(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Dr(e),i=1<<n,r|=t[n],e&=~i;return r}function lB(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function cB(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Dr(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=lB(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function Ev(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function JR(){var t=dd;return dd<<=1,!(dd&4194240)&&(dd=64),t}function eO(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Rf(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Dr(e),t[e]=n}function uB(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-Dr(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function cb(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Dr(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var Fe=0;function e_(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var t_,ub,n_,r_,i_,Rv=!1,pd=[],Qs=null,Is=null,Ns=null,_u=new Map,$u=new Map,Ss=[],fB="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function WS(t,e){switch(t){case"focusin":case"focusout":Qs=null;break;case"dragenter":case"dragleave":Is=null;break;case"mouseover":case"mouseout":Ns=null;break;case"pointerover":case"pointerout":_u.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":$u.delete(e.pointerId)}}function wc(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=$f(e),e!==null&&ub(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function dB(t,e,n,r,i){switch(e){case"focusin":return Qs=wc(Qs,t,e,n,r,i),!0;case"dragenter":return Is=wc(Is,t,e,n,r,i),!0;case"mouseover":return Ns=wc(Ns,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return _u.set(s,wc(_u.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,$u.set(s,wc($u.get(s)||null,t,e,n,r,i)),!0}return!1}function s_(t){var e=_o(t.target);if(e!==null){var n=fa(e);if(n!==null){if(e=n.tag,e===13){if(e=qR(n),e!==null){t.blockedOn=e,i_(t.priority,function(){n_(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function gh(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=_v(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);kv=r,n.target.dispatchEvent(r),kv=null}else return e=$f(n),e!==null&&ub(e),t.blockedOn=n,!1;e.shift()}return!0}function qS(t,e,n){gh(t)&&n.delete(e)}function hB(){Rv=!1,Qs!==null&&gh(Qs)&&(Qs=null),Is!==null&&gh(Is)&&(Is=null),Ns!==null&&gh(Ns)&&(Ns=null),_u.forEach(qS),$u.forEach(qS)}function Sc(t,e){t.blockedOn===e&&(t.blockedOn=null,Rv||(Rv=!0,Yn.unstable_scheduleCallback(Yn.unstable_NormalPriority,hB)))}function Au(t){function e(i){return Sc(i,t)}if(0<pd.length){Sc(pd[0],t);for(var n=1;n<pd.length;n++){var r=pd[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Qs!==null&&Sc(Qs,t),Is!==null&&Sc(Is,t),Ns!==null&&Sc(Ns,t),_u.forEach(e),$u.forEach(e),n=0;n<Ss.length;n++)r=Ss[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Ss.length&&(n=Ss[0],n.blockedOn===null);)s_(n),n.blockedOn===null&&Ss.shift()}var el=is.ReactCurrentBatchConfig,rp=!0;function pB(t,e,n,r){var i=Fe,s=el.transition;el.transition=null;try{Fe=1,fb(t,e,n,r)}finally{Fe=i,el.transition=s}}function mB(t,e,n,r){var i=Fe,s=el.transition;el.transition=null;try{Fe=4,fb(t,e,n,r)}finally{Fe=i,el.transition=s}}function fb(t,e,n,r){if(rp){var i=_v(t,e,n,r);if(i===null)uO(t,e,r,ip,n),WS(t,r);else if(dB(i,t,e,n,r))r.stopPropagation();else if(WS(t,r),e&4&&-1<fB.indexOf(t)){for(;i!==null;){var s=$f(i);if(s!==null&&t_(s),s=_v(t,e,n,r),s===null&&uO(t,e,r,ip,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else uO(t,e,r,null,n)}}var ip=null;function _v(t,e,n,r){if(ip=null,t=ab(r),t=_o(t),t!==null)if(e=fa(t),e===null)t=null;else if(n=e.tag,n===13){if(t=qR(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return ip=t,null}function o_(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(nB()){case lb:return 1;case GR:return 4;case tp:case rB:return 16;case KR:return 536870912;default:return 16}default:return 16}}var Es=null,db=null,Oh=null;function a_(){if(Oh)return Oh;var t,e=db,n=e.length,r,i="value"in Es?Es.value:Es.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return Oh=i.slice(t,1<r?1-r:void 0)}function yh(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function md(){return!0}function YS(){return!1}function Gn(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?md:YS,this.isPropagationStopped=YS,this}return ct(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=md)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=md)},persist:function(){},isPersistent:md}),e}var Ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hb=Gn(Ul),_f=ct({},Ul,{view:0,detail:0}),gB=Gn(_f),tO,nO,kc,Pm=ct({},_f,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pb,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==kc&&(kc&&t.type==="mousemove"?(tO=t.screenX-kc.screenX,nO=t.screenY-kc.screenY):nO=tO=0,kc=t),tO)},movementY:function(t){return"movementY"in t?t.movementY:nO}}),US=Gn(Pm),OB=ct({},Pm,{dataTransfer:0}),yB=Gn(OB),vB=ct({},_f,{relatedTarget:0}),rO=Gn(vB),xB=ct({},Ul,{animationName:0,elapsedTime:0,pseudoElement:0}),bB=Gn(xB),wB=ct({},Ul,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),SB=Gn(wB),kB=ct({},Ul,{data:0}),HS=Gn(kB),CB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},PB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},TB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function EB(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=TB[t])?!!e[t]:!1}function pb(){return EB}var RB=ct({},_f,{key:function(t){if(t.key){var e=CB[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=yh(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?PB[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pb,charCode:function(t){return t.type==="keypress"?yh(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?yh(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),_B=Gn(RB),$B=ct({},Pm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),GS=Gn($B),AB=ct({},_f,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pb}),QB=Gn(AB),IB=ct({},Ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),NB=Gn(IB),jB=ct({},Pm,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),MB=Gn(jB),DB=[9,13,27,32],mb=qi&&"CompositionEvent"in window,su=null;qi&&"documentMode"in document&&(su=document.documentMode);var LB=qi&&"TextEvent"in window&&!su,l_=qi&&(!mb||su&&8<su&&11>=su),KS=" ",JS=!1;function c_(t,e){switch(t){case"keyup":return DB.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function u_(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Da=!1;function zB(t,e){switch(t){case"compositionend":return u_(e);case"keypress":return e.which!==32?null:(JS=!0,KS);case"textInput":return t=e.data,t===KS&&JS?null:t;default:return null}}function BB(t,e){if(Da)return t==="compositionend"||!mb&&c_(t,e)?(t=a_(),Oh=db=Es=null,Da=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return l_&&e.locale!=="ko"?null:e.data;default:return null}}var VB={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ek(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!VB[t.type]:e==="textarea"}function f_(t,e,n,r){VR(r),e=sp(e,"onChange"),0<e.length&&(n=new hb("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var ou=null,Qu=null;function FB(t){w_(t,0)}function Tm(t){var e=Ba(t);if(NR(e))return t}function XB(t,e){if(t==="change")return e}var d_=!1;if(qi){var iO;if(qi){var sO="oninput"in document;if(!sO){var tk=document.createElement("div");tk.setAttribute("oninput","return;"),sO=typeof tk.oninput=="function"}iO=sO}else iO=!1;d_=iO&&(!document.documentMode||9<document.documentMode)}function nk(){ou&&(ou.detachEvent("onpropertychange",h_),Qu=ou=null)}function h_(t){if(t.propertyName==="value"&&Tm(Qu)){var e=[];f_(e,Qu,t,ab(t)),WR(FB,e)}}function ZB(t,e,n){t==="focusin"?(nk(),ou=e,Qu=n,ou.attachEvent("onpropertychange",h_)):t==="focusout"&&nk()}function WB(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Tm(Qu)}function qB(t,e){if(t==="click")return Tm(e)}function YB(t,e){if(t==="input"||t==="change")return Tm(e)}function UB(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Br=typeof Object.is=="function"?Object.is:UB;function Iu(t,e){if(Br(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!dv.call(e,i)||!Br(t[i],e[i]))return!1}return!0}function rk(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function ik(t,e){var n=rk(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=rk(n)}}function p_(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?p_(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function m_(){for(var t=window,e=Kh();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Kh(t.document)}return e}function gb(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function HB(t){var e=m_(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&p_(n.ownerDocument.documentElement,n)){if(r!==null&&gb(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=ik(n,s);var o=ik(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var GB=qi&&"documentMode"in document&&11>=document.documentMode,La=null,$v=null,au=null,Av=!1;function sk(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Av||La==null||La!==Kh(r)||(r=La,"selectionStart"in r&&gb(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),au&&Iu(au,r)||(au=r,r=sp($v,"onSelect"),0<r.length&&(e=new hb("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=La)))}function gd(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var za={animationend:gd("Animation","AnimationEnd"),animationiteration:gd("Animation","AnimationIteration"),animationstart:gd("Animation","AnimationStart"),transitionend:gd("Transition","TransitionEnd")},oO={},g_={};qi&&(g_=document.createElement("div").style,"AnimationEvent"in window||(delete za.animationend.animation,delete za.animationiteration.animation,delete za.animationstart.animation),"TransitionEvent"in window||delete za.transitionend.transition);function Em(t){if(oO[t])return oO[t];if(!za[t])return t;var e=za[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in g_)return oO[t]=e[n];return t}var O_=Em("animationend"),y_=Em("animationiteration"),v_=Em("animationstart"),x_=Em("transitionend"),b_=new Map,ok="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function no(t,e){b_.set(t,e),ua(e,[t])}for(var aO=0;aO<ok.length;aO++){var lO=ok[aO],KB=lO.toLowerCase(),JB=lO[0].toUpperCase()+lO.slice(1);no(KB,"on"+JB)}no(O_,"onAnimationEnd");no(y_,"onAnimationIteration");no(v_,"onAnimationStart");no("dblclick","onDoubleClick");no("focusin","onFocus");no("focusout","onBlur");no(x_,"onTransitionEnd");gl("onMouseEnter",["mouseout","mouseover"]);gl("onMouseLeave",["mouseout","mouseover"]);gl("onPointerEnter",["pointerout","pointerover"]);gl("onPointerLeave",["pointerout","pointerover"]);ua("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ua("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ua("onBeforeInput",["compositionend","keypress","textInput","paste"]);ua("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ua("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ua("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),eV=new Set("cancel close invalid load scroll toggle".split(" ").concat(qc));function ak(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,Kz(r,e,void 0,t),t.currentTarget=null}function w_(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;ak(i,a,c),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;ak(i,a,c),s=l}}}if(ep)throw t=Tv,ep=!1,Tv=null,t}function tt(t,e){var n=e[Mv];n===void 0&&(n=e[Mv]=new Set);var r=t+"__bubble";n.has(r)||(S_(e,t,2,!1),n.add(r))}function cO(t,e,n){var r=0;e&&(r|=4),S_(n,t,r,e)}var Od="_reactListening"+Math.random().toString(36).slice(2);function Nu(t){if(!t[Od]){t[Od]=!0,_R.forEach(function(n){n!=="selectionchange"&&(eV.has(n)||cO(n,!1,t),cO(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Od]||(e[Od]=!0,cO("selectionchange",!1,e))}}function S_(t,e,n,r){switch(o_(e)){case 1:var i=pB;break;case 4:i=mB;break;default:i=fb}n=i.bind(null,e,n,t),i=void 0,!Pv||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function uO(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=_o(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}WR(function(){var c=s,u=ab(n),f=[];e:{var d=b_.get(t);if(d!==void 0){var h=hb,g=t;switch(t){case"keypress":if(yh(n)===0)break e;case"keydown":case"keyup":h=_B;break;case"focusin":g="focus",h=rO;break;case"focusout":g="blur",h=rO;break;case"beforeblur":case"afterblur":h=rO;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=US;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=yB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=QB;break;case O_:case y_:case v_:h=bB;break;case x_:h=NB;break;case"scroll":h=gB;break;case"wheel":h=MB;break;case"copy":case"cut":case"paste":h=SB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=GS}var m=(e&4)!==0,v=!m&&t==="scroll",y=m?d!==null?d+"Capture":null:d;m=[];for(var x=c,b;x!==null;){b=x;var k=b.stateNode;if(b.tag===5&&k!==null&&(b=k,y!==null&&(k=Ru(x,y),k!=null&&m.push(ju(x,k,b)))),v)break;x=x.return}0<m.length&&(d=new h(d,g,null,n,u),f.push({event:d,listeners:m}))}}if(!(e&7)){e:{if(d=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",d&&n!==kv&&(g=n.relatedTarget||n.fromElement)&&(_o(g)||g[Yi]))break e;if((h||d)&&(d=u.window===u?u:(d=u.ownerDocument)?d.defaultView||d.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=c,g=g?_o(g):null,g!==null&&(v=fa(g),g!==v||g.tag!==5&&g.tag!==6)&&(g=null)):(h=null,g=c),h!==g)){if(m=US,k="onMouseLeave",y="onMouseEnter",x="mouse",(t==="pointerout"||t==="pointerover")&&(m=GS,k="onPointerLeave",y="onPointerEnter",x="pointer"),v=h==null?d:Ba(h),b=g==null?d:Ba(g),d=new m(k,x+"leave",h,n,u),d.target=v,d.relatedTarget=b,k=null,_o(u)===c&&(m=new m(y,x+"enter",g,n,u),m.target=b,m.relatedTarget=v,k=m),v=k,h&&g)t:{for(m=h,y=g,x=0,b=m;b;b=ba(b))x++;for(b=0,k=y;k;k=ba(k))b++;for(;0<x-b;)m=ba(m),x--;for(;0<b-x;)y=ba(y),b--;for(;x--;){if(m===y||y!==null&&m===y.alternate)break t;m=ba(m),y=ba(y)}m=null}else m=null;h!==null&&lk(f,d,h,m,!1),g!==null&&v!==null&&lk(f,v,g,m,!0)}}e:{if(d=c?Ba(c):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var w=XB;else if(ek(d))if(d_)w=YB;else{w=WB;var S=ZB}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(w=qB);if(w&&(w=w(t,c))){f_(f,w,n,u);break e}S&&S(t,d,c),t==="focusout"&&(S=d._wrapperState)&&S.controlled&&d.type==="number"&&vv(d,"number",d.value)}switch(S=c?Ba(c):window,t){case"focusin":(ek(S)||S.contentEditable==="true")&&(La=S,$v=c,au=null);break;case"focusout":au=$v=La=null;break;case"mousedown":Av=!0;break;case"contextmenu":case"mouseup":case"dragend":Av=!1,sk(f,n,u);break;case"selectionchange":if(GB)break;case"keydown":case"keyup":sk(f,n,u)}var C;if(mb)e:{switch(t){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else Da?c_(t,n)&&(_="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(l_&&n.locale!=="ko"&&(Da||_!=="onCompositionStart"?_==="onCompositionEnd"&&Da&&(C=a_()):(Es=u,db="value"in Es?Es.value:Es.textContent,Da=!0)),S=sp(c,_),0<S.length&&(_=new HS(_,t,null,n,u),f.push({event:_,listeners:S}),C?_.data=C:(C=u_(n),C!==null&&(_.data=C)))),(C=LB?zB(t,n):BB(t,n))&&(c=sp(c,"onBeforeInput"),0<c.length&&(u=new HS("onBeforeInput","beforeinput",null,n,u),f.push({event:u,listeners:c}),u.data=C))}w_(f,e)})}function ju(t,e,n){return{instance:t,listener:e,currentTarget:n}}function sp(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ru(t,n),s!=null&&r.unshift(ju(t,s,i)),s=Ru(t,e),s!=null&&r.push(ju(t,s,i))),t=t.return}return r}function ba(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function lk(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,i?(l=Ru(n,s),l!=null&&o.unshift(ju(n,l,a))):i||(l=Ru(n,s),l!=null&&o.push(ju(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var tV=/\r\n?/g,nV=/\u0000|\uFFFD/g;function ck(t){return(typeof t=="string"?t:""+t).replace(tV,`
|
|
39
|
+
`).replace(nV,"")}function yd(t,e,n){if(e=ck(e),ck(t)!==e&&n)throw Error(G(425))}function op(){}var Qv=null,Iv=null;function Nv(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var jv=typeof setTimeout=="function"?setTimeout:void 0,rV=typeof clearTimeout=="function"?clearTimeout:void 0,uk=typeof Promise=="function"?Promise:void 0,iV=typeof queueMicrotask=="function"?queueMicrotask:typeof uk<"u"?function(t){return uk.resolve(null).then(t).catch(sV)}:jv;function sV(t){setTimeout(function(){throw t})}function fO(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),Au(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Au(e)}function js(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function fk(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Hl=Math.random().toString(36).slice(2),ci="__reactFiber$"+Hl,Mu="__reactProps$"+Hl,Yi="__reactContainer$"+Hl,Mv="__reactEvents$"+Hl,oV="__reactListeners$"+Hl,aV="__reactHandles$"+Hl;function _o(t){var e=t[ci];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Yi]||n[ci]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=fk(t);t!==null;){if(n=t[ci])return n;t=fk(t)}return e}t=n,n=t.parentNode}return null}function $f(t){return t=t[ci]||t[Yi],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Ba(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(G(33))}function Rm(t){return t[Mu]||null}var Dv=[],Va=-1;function ro(t){return{current:t}}function nt(t){0>Va||(t.current=Dv[Va],Dv[Va]=null,Va--)}function Je(t,e){Va++,Dv[Va]=t.current,t.current=e}var Xs={},Ht=ro(Xs),xn=ro(!1),Vo=Xs;function Ol(t,e){var n=t.type.contextTypes;if(!n)return Xs;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function bn(t){return t=t.childContextTypes,t!=null}function ap(){nt(xn),nt(Ht)}function dk(t,e,n){if(Ht.current!==Xs)throw Error(G(168));Je(Ht,e),Je(xn,n)}function k_(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(G(108,Zz(t)||"Unknown",i));return ct({},n,r)}function lp(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Xs,Vo=Ht.current,Je(Ht,t),Je(xn,xn.current),!0}function hk(t,e,n){var r=t.stateNode;if(!r)throw Error(G(169));n?(t=k_(t,e,Vo),r.__reactInternalMemoizedMergedChildContext=t,nt(xn),nt(Ht),Je(Ht,t)):nt(xn),Je(xn,n)}var Di=null,_m=!1,dO=!1;function C_(t){Di===null?Di=[t]:Di.push(t)}function lV(t){_m=!0,C_(t)}function io(){if(!dO&&Di!==null){dO=!0;var t=0,e=Fe;try{var n=Di;for(Fe=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Di=null,_m=!1}catch(i){throw Di!==null&&(Di=Di.slice(t+1)),HR(lb,io),i}finally{Fe=e,dO=!1}}return null}var Fa=[],Xa=0,cp=null,up=0,rr=[],ir=0,Fo=null,Vi=1,Fi="";function xo(t,e){Fa[Xa++]=up,Fa[Xa++]=cp,cp=t,up=e}function P_(t,e,n){rr[ir++]=Vi,rr[ir++]=Fi,rr[ir++]=Fo,Fo=t;var r=Vi;t=Fi;var i=32-Dr(r)-1;r&=~(1<<i),n+=1;var s=32-Dr(e)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Vi=1<<32-Dr(e)+i|n<<i|r,Fi=s+t}else Vi=1<<s|n<<i|r,Fi=t}function Ob(t){t.return!==null&&(xo(t,1),P_(t,1,0))}function yb(t){for(;t===cp;)cp=Fa[--Xa],Fa[Xa]=null,up=Fa[--Xa],Fa[Xa]=null;for(;t===Fo;)Fo=rr[--ir],rr[ir]=null,Fi=rr[--ir],rr[ir]=null,Vi=rr[--ir],rr[ir]=null}var Zn=null,zn=null,it=!1,Nr=null;function T_(t,e){var n=ar(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function pk(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Zn=t,zn=js(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Zn=t,zn=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Fo!==null?{id:Vi,overflow:Fi}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=ar(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Zn=t,zn=null,!0):!1;default:return!1}}function Lv(t){return(t.mode&1)!==0&&(t.flags&128)===0}function zv(t){if(it){var e=zn;if(e){var n=e;if(!pk(t,e)){if(Lv(t))throw Error(G(418));e=js(n.nextSibling);var r=Zn;e&&pk(t,e)?T_(r,n):(t.flags=t.flags&-4097|2,it=!1,Zn=t)}}else{if(Lv(t))throw Error(G(418));t.flags=t.flags&-4097|2,it=!1,Zn=t}}}function mk(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Zn=t}function vd(t){if(t!==Zn)return!1;if(!it)return mk(t),it=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Nv(t.type,t.memoizedProps)),e&&(e=zn)){if(Lv(t))throw E_(),Error(G(418));for(;e;)T_(t,e),e=js(e.nextSibling)}if(mk(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(G(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){zn=js(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}zn=null}}else zn=Zn?js(t.stateNode.nextSibling):null;return!0}function E_(){for(var t=zn;t;)t=js(t.nextSibling)}function yl(){zn=Zn=null,it=!1}function vb(t){Nr===null?Nr=[t]:Nr.push(t)}var cV=is.ReactCurrentBatchConfig;function Cc(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(G(309));var r=n.stateNode}if(!r)throw Error(G(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(G(284));if(!n._owner)throw Error(G(290,t))}return t}function xd(t,e){throw t=Object.prototype.toString.call(e),Error(G(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function gk(t){var e=t._init;return e(t._payload)}function R_(t){function e(y,x){if(t){var b=y.deletions;b===null?(y.deletions=[x],y.flags|=16):b.push(x)}}function n(y,x){if(!t)return null;for(;x!==null;)e(y,x),x=x.sibling;return null}function r(y,x){for(y=new Map;x!==null;)x.key!==null?y.set(x.key,x):y.set(x.index,x),x=x.sibling;return y}function i(y,x){return y=zs(y,x),y.index=0,y.sibling=null,y}function s(y,x,b){return y.index=b,t?(b=y.alternate,b!==null?(b=b.index,b<x?(y.flags|=2,x):b):(y.flags|=2,x)):(y.flags|=1048576,x)}function o(y){return t&&y.alternate===null&&(y.flags|=2),y}function a(y,x,b,k){return x===null||x.tag!==6?(x=vO(b,y.mode,k),x.return=y,x):(x=i(x,b),x.return=y,x)}function l(y,x,b,k){var w=b.type;return w===Ma?u(y,x,b.props.children,k,b.key):x!==null&&(x.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===vs&&gk(w)===x.type)?(k=i(x,b.props),k.ref=Cc(y,x,b),k.return=y,k):(k=Ch(b.type,b.key,b.props,null,y.mode,k),k.ref=Cc(y,x,b),k.return=y,k)}function c(y,x,b,k){return x===null||x.tag!==4||x.stateNode.containerInfo!==b.containerInfo||x.stateNode.implementation!==b.implementation?(x=xO(b,y.mode,k),x.return=y,x):(x=i(x,b.children||[]),x.return=y,x)}function u(y,x,b,k,w){return x===null||x.tag!==7?(x=Do(b,y.mode,k,w),x.return=y,x):(x=i(x,b),x.return=y,x)}function f(y,x,b){if(typeof x=="string"&&x!==""||typeof x=="number")return x=vO(""+x,y.mode,b),x.return=y,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case cd:return b=Ch(x.type,x.key,x.props,null,y.mode,b),b.ref=Cc(y,null,x),b.return=y,b;case ja:return x=xO(x,y.mode,b),x.return=y,x;case vs:var k=x._init;return f(y,k(x._payload),b)}if(Zc(x)||xc(x))return x=Do(x,y.mode,b,null),x.return=y,x;xd(y,x)}return null}function d(y,x,b,k){var w=x!==null?x.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return w!==null?null:a(y,x,""+b,k);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case cd:return b.key===w?l(y,x,b,k):null;case ja:return b.key===w?c(y,x,b,k):null;case vs:return w=b._init,d(y,x,w(b._payload),k)}if(Zc(b)||xc(b))return w!==null?null:u(y,x,b,k,null);xd(y,b)}return null}function h(y,x,b,k,w){if(typeof k=="string"&&k!==""||typeof k=="number")return y=y.get(b)||null,a(x,y,""+k,w);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case cd:return y=y.get(k.key===null?b:k.key)||null,l(x,y,k,w);case ja:return y=y.get(k.key===null?b:k.key)||null,c(x,y,k,w);case vs:var S=k._init;return h(y,x,b,S(k._payload),w)}if(Zc(k)||xc(k))return y=y.get(b)||null,u(x,y,k,w,null);xd(x,k)}return null}function g(y,x,b,k){for(var w=null,S=null,C=x,_=x=0,I=null;C!==null&&_<b.length;_++){C.index>_?(I=C,C=null):I=C.sibling;var E=d(y,C,b[_],k);if(E===null){C===null&&(C=I);break}t&&C&&E.alternate===null&&e(y,C),x=s(E,x,_),S===null?w=E:S.sibling=E,S=E,C=I}if(_===b.length)return n(y,C),it&&xo(y,_),w;if(C===null){for(;_<b.length;_++)C=f(y,b[_],k),C!==null&&(x=s(C,x,_),S===null?w=C:S.sibling=C,S=C);return it&&xo(y,_),w}for(C=r(y,C);_<b.length;_++)I=h(C,y,_,b[_],k),I!==null&&(t&&I.alternate!==null&&C.delete(I.key===null?_:I.key),x=s(I,x,_),S===null?w=I:S.sibling=I,S=I);return t&&C.forEach(function(j){return e(y,j)}),it&&xo(y,_),w}function m(y,x,b,k){var w=xc(b);if(typeof w!="function")throw Error(G(150));if(b=w.call(b),b==null)throw Error(G(151));for(var S=w=null,C=x,_=x=0,I=null,E=b.next();C!==null&&!E.done;_++,E=b.next()){C.index>_?(I=C,C=null):I=C.sibling;var j=d(y,C,E.value,k);if(j===null){C===null&&(C=I);break}t&&C&&j.alternate===null&&e(y,C),x=s(j,x,_),S===null?w=j:S.sibling=j,S=j,C=I}if(E.done)return n(y,C),it&&xo(y,_),w;if(C===null){for(;!E.done;_++,E=b.next())E=f(y,E.value,k),E!==null&&(x=s(E,x,_),S===null?w=E:S.sibling=E,S=E);return it&&xo(y,_),w}for(C=r(y,C);!E.done;_++,E=b.next())E=h(C,y,_,E.value,k),E!==null&&(t&&E.alternate!==null&&C.delete(E.key===null?_:E.key),x=s(E,x,_),S===null?w=E:S.sibling=E,S=E);return t&&C.forEach(function(A){return e(y,A)}),it&&xo(y,_),w}function v(y,x,b,k){if(typeof b=="object"&&b!==null&&b.type===Ma&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case cd:e:{for(var w=b.key,S=x;S!==null;){if(S.key===w){if(w=b.type,w===Ma){if(S.tag===7){n(y,S.sibling),x=i(S,b.props.children),x.return=y,y=x;break e}}else if(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===vs&&gk(w)===S.type){n(y,S.sibling),x=i(S,b.props),x.ref=Cc(y,S,b),x.return=y,y=x;break e}n(y,S);break}else e(y,S);S=S.sibling}b.type===Ma?(x=Do(b.props.children,y.mode,k,b.key),x.return=y,y=x):(k=Ch(b.type,b.key,b.props,null,y.mode,k),k.ref=Cc(y,x,b),k.return=y,y=k)}return o(y);case ja:e:{for(S=b.key;x!==null;){if(x.key===S)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){n(y,x.sibling),x=i(x,b.children||[]),x.return=y,y=x;break e}else{n(y,x);break}else e(y,x);x=x.sibling}x=xO(b,y.mode,k),x.return=y,y=x}return o(y);case vs:return S=b._init,v(y,x,S(b._payload),k)}if(Zc(b))return g(y,x,b,k);if(xc(b))return m(y,x,b,k);xd(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,x!==null&&x.tag===6?(n(y,x.sibling),x=i(x,b),x.return=y,y=x):(n(y,x),x=vO(b,y.mode,k),x.return=y,y=x),o(y)):n(y,x)}return v}var vl=R_(!0),__=R_(!1),fp=ro(null),dp=null,Za=null,xb=null;function bb(){xb=Za=dp=null}function wb(t){var e=fp.current;nt(fp),t._currentValue=e}function Bv(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function tl(t,e){dp=t,xb=Za=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(gn=!0),t.firstContext=null)}function mr(t){var e=t._currentValue;if(xb!==t)if(t={context:t,memoizedValue:e,next:null},Za===null){if(dp===null)throw Error(G(308));Za=t,dp.dependencies={lanes:0,firstContext:t}}else Za=Za.next=t;return e}var $o=null;function Sb(t){$o===null?$o=[t]:$o.push(t)}function $_(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,Sb(e)):(n.next=i.next,i.next=n),e.interleaved=n,Ui(t,r)}function Ui(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var xs=!1;function kb(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function A_(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Xi(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Ms(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,ze&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Ui(t,n)}return i=r.interleaved,i===null?(e.next=e,Sb(r)):(e.next=i.next,i.next=e),r.interleaved=e,Ui(t,n)}function vh(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,cb(t,n)}}function Ok(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function hp(t,e,n,r){var i=t.updateQueue;xs=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,u=c=l=null,a=s;do{var d=a.lane,h=a.eventTime;if((r&d)===d){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=t,m=a;switch(d=e,h=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){f=g.call(h,f,d);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,d=typeof g=="function"?g.call(h,f,d):g,d==null)break e;f=ct({},f,d);break e;case 2:xs=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=h,l=f):u=u.next=h,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(u===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Zo|=o,t.lanes=o,t.memoizedState=f}}function yk(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(G(191,i));i.call(r)}}}var Af={},bi=ro(Af),Du=ro(Af),Lu=ro(Af);function Ao(t){if(t===Af)throw Error(G(174));return t}function Cb(t,e){switch(Je(Lu,e),Je(Du,t),Je(bi,Af),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:bv(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=bv(e,t)}nt(bi),Je(bi,e)}function xl(){nt(bi),nt(Du),nt(Lu)}function Q_(t){Ao(Lu.current);var e=Ao(bi.current),n=bv(e,t.type);e!==n&&(Je(Du,t),Je(bi,n))}function Pb(t){Du.current===t&&(nt(bi),nt(Du))}var ot=ro(0);function pp(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var hO=[];function Tb(){for(var t=0;t<hO.length;t++)hO[t]._workInProgressVersionPrimary=null;hO.length=0}var xh=is.ReactCurrentDispatcher,pO=is.ReactCurrentBatchConfig,Xo=0,at=null,bt=null,Pt=null,mp=!1,lu=!1,zu=0,uV=0;function zt(){throw Error(G(321))}function Eb(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Br(t[n],e[n]))return!1;return!0}function Rb(t,e,n,r,i,s){if(Xo=s,at=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,xh.current=t===null||t.memoizedState===null?pV:mV,t=n(r,i),lu){s=0;do{if(lu=!1,zu=0,25<=s)throw Error(G(301));s+=1,Pt=bt=null,e.updateQueue=null,xh.current=gV,t=n(r,i)}while(lu)}if(xh.current=gp,e=bt!==null&&bt.next!==null,Xo=0,Pt=bt=at=null,mp=!1,e)throw Error(G(300));return t}function _b(){var t=zu!==0;return zu=0,t}function ai(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pt===null?at.memoizedState=Pt=t:Pt=Pt.next=t,Pt}function gr(){if(bt===null){var t=at.alternate;t=t!==null?t.memoizedState:null}else t=bt.next;var e=Pt===null?at.memoizedState:Pt.next;if(e!==null)Pt=e,bt=t;else{if(t===null)throw Error(G(310));bt=t,t={memoizedState:bt.memoizedState,baseState:bt.baseState,baseQueue:bt.baseQueue,queue:bt.queue,next:null},Pt===null?at.memoizedState=Pt=t:Pt=Pt.next=t}return Pt}function Bu(t,e){return typeof e=="function"?e(t):e}function mO(t){var e=gr(),n=e.queue;if(n===null)throw Error(G(311));n.lastRenderedReducer=t;var r=bt,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,c=s;do{var u=c.lane;if((Xo&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var f={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,at.lanes|=u,Zo|=u}c=c.next}while(c!==null&&c!==s);l===null?o=r:l.next=a,Br(r,e.memoizedState)||(gn=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,at.lanes|=s,Zo|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function gO(t){var e=gr(),n=e.queue;if(n===null)throw Error(G(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);Br(s,e.memoizedState)||(gn=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function I_(){}function N_(t,e){var n=at,r=gr(),i=e(),s=!Br(r.memoizedState,i);if(s&&(r.memoizedState=i,gn=!0),r=r.queue,$b(D_.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||Pt!==null&&Pt.memoizedState.tag&1){if(n.flags|=2048,Vu(9,M_.bind(null,n,r,i,e),void 0,null),Rt===null)throw Error(G(349));Xo&30||j_(n,e,i)}return i}function j_(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=at.updateQueue,e===null?(e={lastEffect:null,stores:null},at.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function M_(t,e,n,r){e.value=n,e.getSnapshot=r,L_(e)&&z_(t)}function D_(t,e,n){return n(function(){L_(e)&&z_(t)})}function L_(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Br(t,n)}catch{return!0}}function z_(t){var e=Ui(t,1);e!==null&&Lr(e,t,1,-1)}function vk(t){var e=ai();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Bu,lastRenderedState:t},e.queue=t,t=t.dispatch=hV.bind(null,at,t),[e.memoizedState,t]}function Vu(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=at.updateQueue,e===null?(e={lastEffect:null,stores:null},at.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function B_(){return gr().memoizedState}function bh(t,e,n,r){var i=ai();at.flags|=t,i.memoizedState=Vu(1|e,n,void 0,r===void 0?null:r)}function $m(t,e,n,r){var i=gr();r=r===void 0?null:r;var s=void 0;if(bt!==null){var o=bt.memoizedState;if(s=o.destroy,r!==null&&Eb(r,o.deps)){i.memoizedState=Vu(e,n,s,r);return}}at.flags|=t,i.memoizedState=Vu(1|e,n,s,r)}function xk(t,e){return bh(8390656,8,t,e)}function $b(t,e){return $m(2048,8,t,e)}function V_(t,e){return $m(4,2,t,e)}function F_(t,e){return $m(4,4,t,e)}function X_(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Z_(t,e,n){return n=n!=null?n.concat([t]):null,$m(4,4,X_.bind(null,e,t),n)}function Ab(){}function W_(t,e){var n=gr();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Eb(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function q_(t,e){var n=gr();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Eb(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function Y_(t,e,n){return Xo&21?(Br(n,e)||(n=JR(),at.lanes|=n,Zo|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,gn=!0),t.memoizedState=n)}function fV(t,e){var n=Fe;Fe=n!==0&&4>n?n:4,t(!0);var r=pO.transition;pO.transition={};try{t(!1),e()}finally{Fe=n,pO.transition=r}}function U_(){return gr().memoizedState}function dV(t,e,n){var r=Ls(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},H_(t))G_(e,n);else if(n=$_(t,e,n,r),n!==null){var i=nn();Lr(n,t,r,i),K_(n,e,r)}}function hV(t,e,n){var r=Ls(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(H_(t))G_(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Br(a,o)){var l=e.interleaved;l===null?(i.next=i,Sb(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=$_(t,e,i,r),n!==null&&(i=nn(),Lr(n,t,r,i),K_(n,e,r))}}function H_(t){var e=t.alternate;return t===at||e!==null&&e===at}function G_(t,e){lu=mp=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function K_(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,cb(t,n)}}var gp={readContext:mr,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useInsertionEffect:zt,useLayoutEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useMutableSource:zt,useSyncExternalStore:zt,useId:zt,unstable_isNewReconciler:!1},pV={readContext:mr,useCallback:function(t,e){return ai().memoizedState=[t,e===void 0?null:e],t},useContext:mr,useEffect:xk,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,bh(4194308,4,X_.bind(null,e,t),n)},useLayoutEffect:function(t,e){return bh(4194308,4,t,e)},useInsertionEffect:function(t,e){return bh(4,2,t,e)},useMemo:function(t,e){var n=ai();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=ai();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=dV.bind(null,at,t),[r.memoizedState,t]},useRef:function(t){var e=ai();return t={current:t},e.memoizedState=t},useState:vk,useDebugValue:Ab,useDeferredValue:function(t){return ai().memoizedState=t},useTransition:function(){var t=vk(!1),e=t[0];return t=fV.bind(null,t[1]),ai().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=at,i=ai();if(it){if(n===void 0)throw Error(G(407));n=n()}else{if(n=e(),Rt===null)throw Error(G(349));Xo&30||j_(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,xk(D_.bind(null,r,s,t),[t]),r.flags|=2048,Vu(9,M_.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=ai(),e=Rt.identifierPrefix;if(it){var n=Fi,r=Vi;n=(r&~(1<<32-Dr(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=zu++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=uV++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},mV={readContext:mr,useCallback:W_,useContext:mr,useEffect:$b,useImperativeHandle:Z_,useInsertionEffect:V_,useLayoutEffect:F_,useMemo:q_,useReducer:mO,useRef:B_,useState:function(){return mO(Bu)},useDebugValue:Ab,useDeferredValue:function(t){var e=gr();return Y_(e,bt.memoizedState,t)},useTransition:function(){var t=mO(Bu)[0],e=gr().memoizedState;return[t,e]},useMutableSource:I_,useSyncExternalStore:N_,useId:U_,unstable_isNewReconciler:!1},gV={readContext:mr,useCallback:W_,useContext:mr,useEffect:$b,useImperativeHandle:Z_,useInsertionEffect:V_,useLayoutEffect:F_,useMemo:q_,useReducer:gO,useRef:B_,useState:function(){return gO(Bu)},useDebugValue:Ab,useDeferredValue:function(t){var e=gr();return bt===null?e.memoizedState=t:Y_(e,bt.memoizedState,t)},useTransition:function(){var t=gO(Bu)[0],e=gr().memoizedState;return[t,e]},useMutableSource:I_,useSyncExternalStore:N_,useId:U_,unstable_isNewReconciler:!1};function Qr(t,e){if(t&&t.defaultProps){e=ct({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function Vv(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:ct({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Am={isMounted:function(t){return(t=t._reactInternals)?fa(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=nn(),i=Ls(t),s=Xi(r,i);s.payload=e,n!=null&&(s.callback=n),e=Ms(t,s,i),e!==null&&(Lr(e,t,i,r),vh(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=nn(),i=Ls(t),s=Xi(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=Ms(t,s,i),e!==null&&(Lr(e,t,i,r),vh(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=nn(),r=Ls(t),i=Xi(n,r);i.tag=2,e!=null&&(i.callback=e),e=Ms(t,i,r),e!==null&&(Lr(e,t,r,n),vh(e,t,r))}};function bk(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!Iu(n,r)||!Iu(i,s):!0}function J_(t,e,n){var r=!1,i=Xs,s=e.contextType;return typeof s=="object"&&s!==null?s=mr(s):(i=bn(e)?Vo:Ht.current,r=e.contextTypes,s=(r=r!=null)?Ol(t,i):Xs),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Am,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function wk(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&Am.enqueueReplaceState(e,e.state,null)}function Fv(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},kb(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=mr(s):(s=bn(e)?Vo:Ht.current,i.context=Ol(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(Vv(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&Am.enqueueReplaceState(i,i.state,null),hp(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function bl(t,e){try{var n="",r=e;do n+=Xz(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
40
|
+
Error generating stack: `+s.message+`
|
|
41
|
+
`+s.stack}return{value:t,source:e,stack:i,digest:null}}function OO(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Xv(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var OV=typeof WeakMap=="function"?WeakMap:Map;function e$(t,e,n){n=Xi(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){yp||(yp=!0,ex=r),Xv(t,e)},n}function t$(t,e,n){n=Xi(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Xv(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Xv(t,e),typeof r!="function"&&(Ds===null?Ds=new Set([this]):Ds.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Sk(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new OV;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=$V.bind(null,t,e,n),e.then(t,t))}function kk(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Ck(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Xi(-1,1),e.tag=2,Ms(n,e,1))),n.lanes|=1),t)}var yV=is.ReactCurrentOwner,gn=!1;function Jt(t,e,n,r){e.child=t===null?__(e,null,n,r):vl(e,t.child,n,r)}function Pk(t,e,n,r,i){n=n.render;var s=e.ref;return tl(e,i),r=Rb(t,e,n,r,s,i),n=_b(),t!==null&&!gn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Hi(t,e,i)):(it&&n&&Ob(e),e.flags|=1,Jt(t,e,r,i),e.child)}function Tk(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!zb(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,n$(t,e,s,r,i)):(t=Ch(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Iu,n(o,r)&&t.ref===e.ref)return Hi(t,e,i)}return e.flags|=1,t=zs(s,r),t.ref=e.ref,t.return=e,e.child=t}function n$(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(Iu(s,r)&&t.ref===e.ref)if(gn=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(gn=!0);else return e.lanes=t.lanes,Hi(t,e,i)}return Zv(t,e,n,r,i)}function r$(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Je(qa,Nn),Nn|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Je(qa,Nn),Nn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Je(qa,Nn),Nn|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,Je(qa,Nn),Nn|=r;return Jt(t,e,i,n),e.child}function i$(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Zv(t,e,n,r,i){var s=bn(n)?Vo:Ht.current;return s=Ol(e,s),tl(e,i),n=Rb(t,e,n,r,s,i),r=_b(),t!==null&&!gn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Hi(t,e,i)):(it&&r&&Ob(e),e.flags|=1,Jt(t,e,n,i),e.child)}function Ek(t,e,n,r,i){if(bn(n)){var s=!0;lp(e)}else s=!1;if(tl(e,i),e.stateNode===null)wh(t,e),J_(e,n,r),Fv(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=mr(c):(c=bn(n)?Vo:Ht.current,c=Ol(e,c));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&wk(e,o,r,c),xs=!1;var d=e.memoizedState;o.state=d,hp(e,r,o,i),l=e.memoizedState,a!==r||d!==l||xn.current||xs?(typeof u=="function"&&(Vv(e,n,u,r),l=e.memoizedState),(a=xs||bk(e,n,a,r,d,l,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,A_(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Qr(e.type,a),o.props=c,f=e.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=mr(l):(l=bn(n)?Vo:Ht.current,l=Ol(e,l));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||d!==l)&&wk(e,o,r,l),xs=!1,d=e.memoizedState,o.state=d,hp(e,r,o,i);var g=e.memoizedState;a!==f||d!==g||xn.current||xs?(typeof h=="function"&&(Vv(e,n,h,r),g=e.memoizedState),(c=xs||bk(e,n,c,r,d,g,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,g,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=g),o.props=r,o.state=g,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),r=!1)}return Wv(t,e,n,r,s,i)}function Wv(t,e,n,r,i,s){i$(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&hk(e,n,!1),Hi(t,e,s);r=e.stateNode,yV.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=vl(e,t.child,null,s),e.child=vl(e,null,a,s)):Jt(t,e,a,s),e.memoizedState=r.state,i&&hk(e,n,!0),e.child}function s$(t){var e=t.stateNode;e.pendingContext?dk(t,e.pendingContext,e.pendingContext!==e.context):e.context&&dk(t,e.context,!1),Cb(t,e.containerInfo)}function Rk(t,e,n,r,i){return yl(),vb(i),e.flags|=256,Jt(t,e,n,r),e.child}var qv={dehydrated:null,treeContext:null,retryLane:0};function Yv(t){return{baseLanes:t,cachePool:null,transitions:null}}function o$(t,e,n){var r=e.pendingProps,i=ot.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Je(ot,i&1),t===null)return zv(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Nm(o,r,0,null),t=Do(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Yv(n),e.memoizedState=qv,t):Qb(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return vV(t,e,o,r,a,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=zs(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=zs(a,s):(s=Do(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?Yv(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=qv,r}return s=t.child,t=s.sibling,r=zs(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Qb(t,e){return e=Nm({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function bd(t,e,n,r){return r!==null&&vb(r),vl(e,t.child,null,n),t=Qb(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function vV(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=OO(Error(G(422))),bd(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=Nm({mode:"visible",children:r.children},i,0,null),s=Do(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&vl(e,t.child,null,o),e.child.memoizedState=Yv(o),e.memoizedState=qv,s);if(!(e.mode&1))return bd(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(G(419)),r=OO(s,r,void 0),bd(t,e,o,r)}if(a=(o&t.childLanes)!==0,gn||a){if(r=Rt,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Ui(t,i),Lr(r,t,i,-1))}return Lb(),r=OO(Error(G(421))),bd(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=AV.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,zn=js(i.nextSibling),Zn=e,it=!0,Nr=null,t!==null&&(rr[ir++]=Vi,rr[ir++]=Fi,rr[ir++]=Fo,Vi=t.id,Fi=t.overflow,Fo=e),e=Qb(e,r.children),e.flags|=4096,e)}function _k(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Bv(t.return,e,n)}function yO(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function a$(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(Jt(t,e,r.children,n),r=ot.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&_k(t,n,e);else if(t.tag===19)_k(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Je(ot,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&pp(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),yO(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&pp(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}yO(e,!0,n,null,s);break;case"together":yO(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function wh(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Hi(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Zo|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(G(153));if(e.child!==null){for(t=e.child,n=zs(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=zs(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function xV(t,e,n){switch(e.tag){case 3:s$(e),yl();break;case 5:Q_(e);break;case 1:bn(e.type)&&lp(e);break;case 4:Cb(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Je(fp,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Je(ot,ot.current&1),e.flags|=128,null):n&e.child.childLanes?o$(t,e,n):(Je(ot,ot.current&1),t=Hi(t,e,n),t!==null?t.sibling:null);Je(ot,ot.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return a$(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Je(ot,ot.current),r)break;return null;case 22:case 23:return e.lanes=0,r$(t,e,n)}return Hi(t,e,n)}var l$,Uv,c$,u$;l$=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Uv=function(){};c$=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,Ao(bi.current);var s=null;switch(n){case"input":i=Ov(t,i),r=Ov(t,r),s=[];break;case"select":i=ct({},i,{value:void 0}),r=ct({},r,{value:void 0}),s=[];break;case"textarea":i=xv(t,i),r=xv(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=op)}wv(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Tu.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Tu.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&tt("scroll",t),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};u$=function(t,e,n,r){n!==r&&(e.flags|=4)};function Pc(t,e){if(!it)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Bt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function bV(t,e,n){var r=e.pendingProps;switch(yb(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bt(e),null;case 1:return bn(e.type)&&ap(),Bt(e),null;case 3:return r=e.stateNode,xl(),nt(xn),nt(Ht),Tb(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(vd(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Nr!==null&&(rx(Nr),Nr=null))),Uv(t,e),Bt(e),null;case 5:Pb(e);var i=Ao(Lu.current);if(n=e.type,t!==null&&e.stateNode!=null)c$(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(G(166));return Bt(e),null}if(t=Ao(bi.current),vd(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[ci]=e,r[Mu]=s,t=(e.mode&1)!==0,n){case"dialog":tt("cancel",r),tt("close",r);break;case"iframe":case"object":case"embed":tt("load",r);break;case"video":case"audio":for(i=0;i<qc.length;i++)tt(qc[i],r);break;case"source":tt("error",r);break;case"img":case"image":case"link":tt("error",r),tt("load",r);break;case"details":tt("toggle",r);break;case"input":LS(r,s),tt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},tt("invalid",r);break;case"textarea":BS(r,s),tt("invalid",r)}wv(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&yd(r.textContent,a,t),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&yd(r.textContent,a,t),i=["children",""+a]):Tu.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&tt("scroll",r)}switch(n){case"input":ud(r),zS(r,s,!0);break;case"textarea":ud(r),VS(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=op)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=DR(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[ci]=e,t[Mu]=r,l$(t,e,!1,!1),e.stateNode=t;e:{switch(o=Sv(n,r),n){case"dialog":tt("cancel",t),tt("close",t),i=r;break;case"iframe":case"object":case"embed":tt("load",t),i=r;break;case"video":case"audio":for(i=0;i<qc.length;i++)tt(qc[i],t);i=r;break;case"source":tt("error",t),i=r;break;case"img":case"image":case"link":tt("error",t),tt("load",t),i=r;break;case"details":tt("toggle",t),i=r;break;case"input":LS(t,r),i=Ov(t,r),tt("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=ct({},r,{value:void 0}),tt("invalid",t);break;case"textarea":BS(t,r),i=xv(t,r),tt("invalid",t);break;default:i=r}wv(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?BR(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&LR(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Eu(t,l):typeof l=="number"&&Eu(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Tu.hasOwnProperty(s)?l!=null&&s==="onScroll"&&tt("scroll",t):l!=null&&rb(t,s,l,o))}switch(n){case"input":ud(t),zS(t,r,!1);break;case"textarea":ud(t),VS(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Fs(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?Ga(t,!!r.multiple,s,!1):r.defaultValue!=null&&Ga(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=op)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Bt(e),null;case 6:if(t&&e.stateNode!=null)u$(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(G(166));if(n=Ao(Lu.current),Ao(bi.current),vd(e)){if(r=e.stateNode,n=e.memoizedProps,r[ci]=e,(s=r.nodeValue!==n)&&(t=Zn,t!==null))switch(t.tag){case 3:yd(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&yd(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ci]=e,e.stateNode=r}return Bt(e),null;case 13:if(nt(ot),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(it&&zn!==null&&e.mode&1&&!(e.flags&128))E_(),yl(),e.flags|=98560,s=!1;else if(s=vd(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(G(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(G(317));s[ci]=e}else yl(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Bt(e),s=!1}else Nr!==null&&(rx(Nr),Nr=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||ot.current&1?St===0&&(St=3):Lb())),e.updateQueue!==null&&(e.flags|=4),Bt(e),null);case 4:return xl(),Uv(t,e),t===null&&Nu(e.stateNode.containerInfo),Bt(e),null;case 10:return wb(e.type._context),Bt(e),null;case 17:return bn(e.type)&&ap(),Bt(e),null;case 19:if(nt(ot),s=e.memoizedState,s===null)return Bt(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)Pc(s,!1);else{if(St!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=pp(t),o!==null){for(e.flags|=128,Pc(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Je(ot,ot.current&1|2),e.child}t=t.sibling}s.tail!==null&&dt()>wl&&(e.flags|=128,r=!0,Pc(s,!1),e.lanes=4194304)}else{if(!r)if(t=pp(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Pc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!it)return Bt(e),null}else 2*dt()-s.renderingStartTime>wl&&n!==1073741824&&(e.flags|=128,r=!0,Pc(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=dt(),e.sibling=null,n=ot.current,Je(ot,r?n&1|2:n&1),e):(Bt(e),null);case 22:case 23:return Db(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Nn&1073741824&&(Bt(e),e.subtreeFlags&6&&(e.flags|=8192)):Bt(e),null;case 24:return null;case 25:return null}throw Error(G(156,e.tag))}function wV(t,e){switch(yb(e),e.tag){case 1:return bn(e.type)&&ap(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return xl(),nt(xn),nt(Ht),Tb(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Pb(e),null;case 13:if(nt(ot),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(G(340));yl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return nt(ot),null;case 4:return xl(),null;case 10:return wb(e.type._context),null;case 22:case 23:return Db(),null;case 24:return null;default:return null}}var wd=!1,Zt=!1,SV=typeof WeakSet=="function"?WeakSet:Set,ce=null;function Wa(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ut(t,e,r)}else n.current=null}function Hv(t,e,n){try{n()}catch(r){ut(t,e,r)}}var $k=!1;function kV(t,e){if(Qv=rp,t=m_(),gb(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,f=t,d=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break t;if(d===n&&++c===i&&(a=o),d===s&&++u===r&&(l=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Iv={focusedElem:t,selectionRange:n},rp=!1,ce=e;ce!==null;)if(e=ce,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ce=t;else for(;ce!==null;){e=ce;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,v=g.memoizedState,y=e.stateNode,x=y.getSnapshotBeforeUpdate(e.elementType===e.type?m:Qr(e.type,m),v);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(G(163))}}catch(k){ut(e,e.return,k)}if(t=e.sibling,t!==null){t.return=e.return,ce=t;break}ce=e.return}return g=$k,$k=!1,g}function cu(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Hv(e,n,s)}i=i.next}while(i!==r)}}function Qm(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Gv(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function f$(t){var e=t.alternate;e!==null&&(t.alternate=null,f$(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ci],delete e[Mu],delete e[Mv],delete e[oV],delete e[aV])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function d$(t){return t.tag===5||t.tag===3||t.tag===4}function Ak(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||d$(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Kv(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=op));else if(r!==4&&(t=t.child,t!==null))for(Kv(t,e,n),t=t.sibling;t!==null;)Kv(t,e,n),t=t.sibling}function Jv(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Jv(t,e,n),t=t.sibling;t!==null;)Jv(t,e,n),t=t.sibling}var Qt=null,Ir=!1;function ds(t,e,n){for(n=n.child;n!==null;)h$(t,e,n),n=n.sibling}function h$(t,e,n){if(xi&&typeof xi.onCommitFiberUnmount=="function")try{xi.onCommitFiberUnmount(Cm,n)}catch{}switch(n.tag){case 5:Zt||Wa(n,e);case 6:var r=Qt,i=Ir;Qt=null,ds(t,e,n),Qt=r,Ir=i,Qt!==null&&(Ir?(t=Qt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Qt.removeChild(n.stateNode));break;case 18:Qt!==null&&(Ir?(t=Qt,n=n.stateNode,t.nodeType===8?fO(t.parentNode,n):t.nodeType===1&&fO(t,n),Au(t)):fO(Qt,n.stateNode));break;case 4:r=Qt,i=Ir,Qt=n.stateNode.containerInfo,Ir=!0,ds(t,e,n),Qt=r,Ir=i;break;case 0:case 11:case 14:case 15:if(!Zt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Hv(n,e,o),i=i.next}while(i!==r)}ds(t,e,n);break;case 1:if(!Zt&&(Wa(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ut(n,e,a)}ds(t,e,n);break;case 21:ds(t,e,n);break;case 22:n.mode&1?(Zt=(r=Zt)||n.memoizedState!==null,ds(t,e,n),Zt=r):ds(t,e,n);break;default:ds(t,e,n)}}function Qk(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new SV),e.forEach(function(r){var i=QV.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Er(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Qt=a.stateNode,Ir=!1;break e;case 3:Qt=a.stateNode.containerInfo,Ir=!0;break e;case 4:Qt=a.stateNode.containerInfo,Ir=!0;break e}a=a.return}if(Qt===null)throw Error(G(160));h$(s,o,i),Qt=null,Ir=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){ut(i,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)p$(e,t),e=e.sibling}function p$(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Er(e,t),ei(t),r&4){try{cu(3,t,t.return),Qm(3,t)}catch(m){ut(t,t.return,m)}try{cu(5,t,t.return)}catch(m){ut(t,t.return,m)}}break;case 1:Er(e,t),ei(t),r&512&&n!==null&&Wa(n,n.return);break;case 5:if(Er(e,t),ei(t),r&512&&n!==null&&Wa(n,n.return),t.flags&32){var i=t.stateNode;try{Eu(i,"")}catch(m){ut(t,t.return,m)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&jR(i,s),Sv(a,o);var c=Sv(a,s);for(o=0;o<l.length;o+=2){var u=l[o],f=l[o+1];u==="style"?BR(i,f):u==="dangerouslySetInnerHTML"?LR(i,f):u==="children"?Eu(i,f):rb(i,u,f,c)}switch(a){case"input":yv(i,s);break;case"textarea":MR(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Ga(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?Ga(i,!!s.multiple,s.defaultValue,!0):Ga(i,!!s.multiple,s.multiple?[]:"",!1))}i[Mu]=s}catch(m){ut(t,t.return,m)}}break;case 6:if(Er(e,t),ei(t),r&4){if(t.stateNode===null)throw Error(G(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(m){ut(t,t.return,m)}}break;case 3:if(Er(e,t),ei(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Au(e.containerInfo)}catch(m){ut(t,t.return,m)}break;case 4:Er(e,t),ei(t);break;case 13:Er(e,t),ei(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(jb=dt())),r&4&&Qk(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(Zt=(c=Zt)||u,Er(e,t),Zt=c):Er(e,t),ei(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(ce=t,u=t.child;u!==null;){for(f=ce=u;ce!==null;){switch(d=ce,h=d.child,d.tag){case 0:case 11:case 14:case 15:cu(4,d,d.return);break;case 1:Wa(d,d.return);var g=d.stateNode;if(typeof g.componentWillUnmount=="function"){r=d,n=d.return;try{e=r,g.props=e.memoizedProps,g.state=e.memoizedState,g.componentWillUnmount()}catch(m){ut(r,n,m)}}break;case 5:Wa(d,d.return);break;case 22:if(d.memoizedState!==null){Nk(f);continue}}h!==null?(h.return=d,ce=h):Nk(f)}u=u.sibling}e:for(u=null,f=t;;){if(f.tag===5){if(u===null){u=f;try{i=f.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=zR("display",o))}catch(m){ut(t,t.return,m)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(m){ut(t,t.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Er(e,t),ei(t),r&4&&Qk(t);break;case 21:break;default:Er(e,t),ei(t)}}function ei(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(d$(n)){var r=n;break e}n=n.return}throw Error(G(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Eu(i,""),r.flags&=-33);var s=Ak(t);Jv(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Ak(t);Kv(t,a,o);break;default:throw Error(G(161))}}catch(l){ut(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function CV(t,e,n){ce=t,m$(t)}function m$(t,e,n){for(var r=(t.mode&1)!==0;ce!==null;){var i=ce,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||wd;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||Zt;a=wd;var c=Zt;if(wd=o,(Zt=l)&&!c)for(ce=i;ce!==null;)o=ce,l=o.child,o.tag===22&&o.memoizedState!==null?jk(i):l!==null?(l.return=o,ce=l):jk(i);for(;s!==null;)ce=s,m$(s),s=s.sibling;ce=i,wd=a,Zt=c}Ik(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,ce=s):Ik(t)}}function Ik(t){for(;ce!==null;){var e=ce;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Zt||Qm(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Zt)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Qr(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&yk(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}yk(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&Au(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(G(163))}Zt||e.flags&512&&Gv(e)}catch(d){ut(e,e.return,d)}}if(e===t){ce=null;break}if(n=e.sibling,n!==null){n.return=e.return,ce=n;break}ce=e.return}}function Nk(t){for(;ce!==null;){var e=ce;if(e===t){ce=null;break}var n=e.sibling;if(n!==null){n.return=e.return,ce=n;break}ce=e.return}}function jk(t){for(;ce!==null;){var e=ce;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Qm(4,e)}catch(l){ut(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(l){ut(e,i,l)}}var s=e.return;try{Gv(e)}catch(l){ut(e,s,l)}break;case 5:var o=e.return;try{Gv(e)}catch(l){ut(e,o,l)}}}catch(l){ut(e,e.return,l)}if(e===t){ce=null;break}var a=e.sibling;if(a!==null){a.return=e.return,ce=a;break}ce=e.return}}var PV=Math.ceil,Op=is.ReactCurrentDispatcher,Ib=is.ReactCurrentOwner,dr=is.ReactCurrentBatchConfig,ze=0,Rt=null,gt=null,Mt=0,Nn=0,qa=ro(0),St=0,Fu=null,Zo=0,Im=0,Nb=0,uu=null,dn=null,jb=0,wl=1/0,Mi=null,yp=!1,ex=null,Ds=null,Sd=!1,Rs=null,vp=0,fu=0,tx=null,Sh=-1,kh=0;function nn(){return ze&6?dt():Sh!==-1?Sh:Sh=dt()}function Ls(t){return t.mode&1?ze&2&&Mt!==0?Mt&-Mt:cV.transition!==null?(kh===0&&(kh=JR()),kh):(t=Fe,t!==0||(t=window.event,t=t===void 0?16:o_(t.type)),t):1}function Lr(t,e,n,r){if(50<fu)throw fu=0,tx=null,Error(G(185));Rf(t,n,r),(!(ze&2)||t!==Rt)&&(t===Rt&&(!(ze&2)&&(Im|=n),St===4&&ks(t,Mt)),wn(t,r),n===1&&ze===0&&!(e.mode&1)&&(wl=dt()+500,_m&&io()))}function wn(t,e){var n=t.callbackNode;cB(t,e);var r=np(t,t===Rt?Mt:0);if(r===0)n!==null&&ZS(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&ZS(n),e===1)t.tag===0?lV(Mk.bind(null,t)):C_(Mk.bind(null,t)),iV(function(){!(ze&6)&&io()}),n=null;else{switch(e_(r)){case 1:n=lb;break;case 4:n=GR;break;case 16:n=tp;break;case 536870912:n=KR;break;default:n=tp}n=S$(n,g$.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function g$(t,e){if(Sh=-1,kh=0,ze&6)throw Error(G(327));var n=t.callbackNode;if(nl()&&t.callbackNode!==n)return null;var r=np(t,t===Rt?Mt:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=xp(t,r);else{e=r;var i=ze;ze|=2;var s=y$();(Rt!==t||Mt!==e)&&(Mi=null,wl=dt()+500,Mo(t,e));do try{RV();break}catch(a){O$(t,a)}while(!0);bb(),Op.current=s,ze=i,gt!==null?e=0:(Rt=null,Mt=0,e=St)}if(e!==0){if(e===2&&(i=Ev(t),i!==0&&(r=i,e=nx(t,i))),e===1)throw n=Fu,Mo(t,0),ks(t,r),wn(t,dt()),n;if(e===6)ks(t,r);else{if(i=t.current.alternate,!(r&30)&&!TV(i)&&(e=xp(t,r),e===2&&(s=Ev(t),s!==0&&(r=s,e=nx(t,s))),e===1))throw n=Fu,Mo(t,0),ks(t,r),wn(t,dt()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(G(345));case 2:bo(t,dn,Mi);break;case 3:if(ks(t,r),(r&130023424)===r&&(e=jb+500-dt(),10<e)){if(np(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){nn(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=jv(bo.bind(null,t,dn,Mi),e);break}bo(t,dn,Mi);break;case 4:if(ks(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-Dr(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=dt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*PV(r/1960))-r,10<r){t.timeoutHandle=jv(bo.bind(null,t,dn,Mi),r);break}bo(t,dn,Mi);break;case 5:bo(t,dn,Mi);break;default:throw Error(G(329))}}}return wn(t,dt()),t.callbackNode===n?g$.bind(null,t):null}function nx(t,e){var n=uu;return t.current.memoizedState.isDehydrated&&(Mo(t,e).flags|=256),t=xp(t,e),t!==2&&(e=dn,dn=n,e!==null&&rx(e)),t}function rx(t){dn===null?dn=t:dn.push.apply(dn,t)}function TV(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Br(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function ks(t,e){for(e&=~Nb,e&=~Im,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Dr(e),r=1<<n;t[n]=-1,e&=~r}}function Mk(t){if(ze&6)throw Error(G(327));nl();var e=np(t,0);if(!(e&1))return wn(t,dt()),null;var n=xp(t,e);if(t.tag!==0&&n===2){var r=Ev(t);r!==0&&(e=r,n=nx(t,r))}if(n===1)throw n=Fu,Mo(t,0),ks(t,e),wn(t,dt()),n;if(n===6)throw Error(G(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,bo(t,dn,Mi),wn(t,dt()),null}function Mb(t,e){var n=ze;ze|=1;try{return t(e)}finally{ze=n,ze===0&&(wl=dt()+500,_m&&io())}}function Wo(t){Rs!==null&&Rs.tag===0&&!(ze&6)&&nl();var e=ze;ze|=1;var n=dr.transition,r=Fe;try{if(dr.transition=null,Fe=1,t)return t()}finally{Fe=r,dr.transition=n,ze=e,!(ze&6)&&io()}}function Db(){Nn=qa.current,nt(qa)}function Mo(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,rV(n)),gt!==null)for(n=gt.return;n!==null;){var r=n;switch(yb(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ap();break;case 3:xl(),nt(xn),nt(Ht),Tb();break;case 5:Pb(r);break;case 4:xl();break;case 13:nt(ot);break;case 19:nt(ot);break;case 10:wb(r.type._context);break;case 22:case 23:Db()}n=n.return}if(Rt=t,gt=t=zs(t.current,null),Mt=Nn=e,St=0,Fu=null,Nb=Im=Zo=0,dn=uu=null,$o!==null){for(e=0;e<$o.length;e++)if(n=$o[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}$o=null}return t}function O$(t,e){do{var n=gt;try{if(bb(),xh.current=gp,mp){for(var r=at.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}mp=!1}if(Xo=0,Pt=bt=at=null,lu=!1,zu=0,Ib.current=null,n===null||n.return===null){St=1,Fu=e,gt=null;break}e:{var s=t,o=n.return,a=n,l=e;if(e=Mt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var d=u.alternate;d?(u.updateQueue=d.updateQueue,u.memoizedState=d.memoizedState,u.lanes=d.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=kk(o);if(h!==null){h.flags&=-257,Ck(h,o,a,s,e),h.mode&1&&Sk(s,c,e),e=h,l=c;var g=e.updateQueue;if(g===null){var m=new Set;m.add(l),e.updateQueue=m}else g.add(l);break e}else{if(!(e&1)){Sk(s,c,e),Lb();break e}l=Error(G(426))}}else if(it&&a.mode&1){var v=kk(o);if(v!==null){!(v.flags&65536)&&(v.flags|=256),Ck(v,o,a,s,e),vb(bl(l,a));break e}}s=l=bl(l,a),St!==4&&(St=2),uu===null?uu=[s]:uu.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var y=e$(s,l,e);Ok(s,y);break e;case 1:a=l;var x=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Ds===null||!Ds.has(b)))){s.flags|=65536,e&=-e,s.lanes|=e;var k=t$(s,a,e);Ok(s,k);break e}}s=s.return}while(s!==null)}x$(n)}catch(w){e=w,gt===n&&n!==null&&(gt=n=n.return);continue}break}while(!0)}function y$(){var t=Op.current;return Op.current=gp,t===null?gp:t}function Lb(){(St===0||St===3||St===2)&&(St=4),Rt===null||!(Zo&268435455)&&!(Im&268435455)||ks(Rt,Mt)}function xp(t,e){var n=ze;ze|=2;var r=y$();(Rt!==t||Mt!==e)&&(Mi=null,Mo(t,e));do try{EV();break}catch(i){O$(t,i)}while(!0);if(bb(),ze=n,Op.current=r,gt!==null)throw Error(G(261));return Rt=null,Mt=0,St}function EV(){for(;gt!==null;)v$(gt)}function RV(){for(;gt!==null&&!eB();)v$(gt)}function v$(t){var e=w$(t.alternate,t,Nn);t.memoizedProps=t.pendingProps,e===null?x$(t):gt=e,Ib.current=null}function x$(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=wV(n,e),n!==null){n.flags&=32767,gt=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{St=6,gt=null;return}}else if(n=bV(n,e,Nn),n!==null){gt=n;return}if(e=e.sibling,e!==null){gt=e;return}gt=e=t}while(e!==null);St===0&&(St=5)}function bo(t,e,n){var r=Fe,i=dr.transition;try{dr.transition=null,Fe=1,_V(t,e,n,r)}finally{dr.transition=i,Fe=r}return null}function _V(t,e,n,r){do nl();while(Rs!==null);if(ze&6)throw Error(G(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(G(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(uB(t,s),t===Rt&&(gt=Rt=null,Mt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Sd||(Sd=!0,S$(tp,function(){return nl(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=dr.transition,dr.transition=null;var o=Fe;Fe=1;var a=ze;ze|=4,Ib.current=null,kV(t,n),p$(n,t),HB(Iv),rp=!!Qv,Iv=Qv=null,t.current=n,CV(n),tB(),ze=a,Fe=o,dr.transition=s}else t.current=n;if(Sd&&(Sd=!1,Rs=t,vp=i),s=t.pendingLanes,s===0&&(Ds=null),iB(n.stateNode),wn(t,dt()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(yp)throw yp=!1,t=ex,ex=null,t;return vp&1&&t.tag!==0&&nl(),s=t.pendingLanes,s&1?t===tx?fu++:(fu=0,tx=t):fu=0,io(),null}function nl(){if(Rs!==null){var t=e_(vp),e=dr.transition,n=Fe;try{if(dr.transition=null,Fe=16>t?16:t,Rs===null)var r=!1;else{if(t=Rs,Rs=null,vp=0,ze&6)throw Error(G(331));var i=ze;for(ze|=4,ce=t.current;ce!==null;){var s=ce,o=s.child;if(ce.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(ce=c;ce!==null;){var u=ce;switch(u.tag){case 0:case 11:case 15:cu(8,u,s)}var f=u.child;if(f!==null)f.return=u,ce=f;else for(;ce!==null;){u=ce;var d=u.sibling,h=u.return;if(f$(u),u===c){ce=null;break}if(d!==null){d.return=h,ce=d;break}ce=h}}}var g=s.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(m!==null)}}ce=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,ce=o;else e:for(;ce!==null;){if(s=ce,s.flags&2048)switch(s.tag){case 0:case 11:case 15:cu(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,ce=y;break e}ce=s.return}}var x=t.current;for(ce=x;ce!==null;){o=ce;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,ce=b;else e:for(o=x;ce!==null;){if(a=ce,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Qm(9,a)}}catch(w){ut(a,a.return,w)}if(a===o){ce=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,ce=k;break e}ce=a.return}}if(ze=i,io(),xi&&typeof xi.onPostCommitFiberRoot=="function")try{xi.onPostCommitFiberRoot(Cm,t)}catch{}r=!0}return r}finally{Fe=n,dr.transition=e}}return!1}function Dk(t,e,n){e=bl(n,e),e=e$(t,e,1),t=Ms(t,e,1),e=nn(),t!==null&&(Rf(t,1,e),wn(t,e))}function ut(t,e,n){if(t.tag===3)Dk(t,t,n);else for(;e!==null;){if(e.tag===3){Dk(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ds===null||!Ds.has(r))){t=bl(n,t),t=t$(e,t,1),e=Ms(e,t,1),t=nn(),e!==null&&(Rf(e,1,t),wn(e,t));break}}e=e.return}}function $V(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=nn(),t.pingedLanes|=t.suspendedLanes&n,Rt===t&&(Mt&n)===n&&(St===4||St===3&&(Mt&130023424)===Mt&&500>dt()-jb?Mo(t,0):Nb|=n),wn(t,e)}function b$(t,e){e===0&&(t.mode&1?(e=hd,hd<<=1,!(hd&130023424)&&(hd=4194304)):e=1);var n=nn();t=Ui(t,e),t!==null&&(Rf(t,e,n),wn(t,n))}function AV(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),b$(t,n)}function QV(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(G(314))}r!==null&&r.delete(e),b$(t,n)}var w$;w$=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||xn.current)gn=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return gn=!1,xV(t,e,n);gn=!!(t.flags&131072)}else gn=!1,it&&e.flags&1048576&&P_(e,up,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;wh(t,e),t=e.pendingProps;var i=Ol(e,Ht.current);tl(e,n),i=Rb(null,e,r,t,i,n);var s=_b();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,bn(r)?(s=!0,lp(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,kb(e),i.updater=Am,e.stateNode=i,i._reactInternals=e,Fv(e,r,t,n),e=Wv(null,e,r,!0,s,n)):(e.tag=0,it&&s&&Ob(e),Jt(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(wh(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=NV(r),t=Qr(r,t),i){case 0:e=Zv(null,e,r,t,n);break e;case 1:e=Ek(null,e,r,t,n);break e;case 11:e=Pk(null,e,r,t,n);break e;case 14:e=Tk(null,e,r,Qr(r.type,t),n);break e}throw Error(G(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Qr(r,i),Zv(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Qr(r,i),Ek(t,e,r,i,n);case 3:e:{if(s$(e),t===null)throw Error(G(387));r=e.pendingProps,s=e.memoizedState,i=s.element,A_(t,e),hp(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=bl(Error(G(423)),e),e=Rk(t,e,r,n,i);break e}else if(r!==i){i=bl(Error(G(424)),e),e=Rk(t,e,r,n,i);break e}else for(zn=js(e.stateNode.containerInfo.firstChild),Zn=e,it=!0,Nr=null,n=__(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yl(),r===i){e=Hi(t,e,n);break e}Jt(t,e,r,n)}e=e.child}return e;case 5:return Q_(e),t===null&&zv(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,Nv(r,i)?o=null:s!==null&&Nv(r,s)&&(e.flags|=32),i$(t,e),Jt(t,e,o,n),e.child;case 6:return t===null&&zv(e),null;case 13:return o$(t,e,n);case 4:return Cb(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=vl(e,null,r,n):Jt(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Qr(r,i),Pk(t,e,r,i,n);case 7:return Jt(t,e,e.pendingProps,n),e.child;case 8:return Jt(t,e,e.pendingProps.children,n),e.child;case 12:return Jt(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Je(fp,r._currentValue),r._currentValue=o,s!==null)if(Br(s.value,o)){if(s.children===i.children&&!xn.current){e=Hi(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Xi(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Bv(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(G(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Bv(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Jt(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,tl(e,n),i=mr(i),r=r(i),e.flags|=1,Jt(t,e,r,n),e.child;case 14:return r=e.type,i=Qr(r,e.pendingProps),i=Qr(r.type,i),Tk(t,e,r,i,n);case 15:return n$(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Qr(r,i),wh(t,e),e.tag=1,bn(r)?(t=!0,lp(e)):t=!1,tl(e,n),J_(e,r,i),Fv(e,r,i,n),Wv(null,e,r,!0,t,n);case 19:return a$(t,e,n);case 22:return r$(t,e,n)}throw Error(G(156,e.tag))};function S$(t,e){return HR(t,e)}function IV(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ar(t,e,n,r){return new IV(t,e,n,r)}function zb(t){return t=t.prototype,!(!t||!t.isReactComponent)}function NV(t){if(typeof t=="function")return zb(t)?1:0;if(t!=null){if(t=t.$$typeof,t===sb)return 11;if(t===ob)return 14}return 2}function zs(t,e){var n=t.alternate;return n===null?(n=ar(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Ch(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")zb(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Ma:return Do(n.children,i,s,e);case ib:o=8,i|=8;break;case hv:return t=ar(12,n,e,i|2),t.elementType=hv,t.lanes=s,t;case pv:return t=ar(13,n,e,i),t.elementType=pv,t.lanes=s,t;case mv:return t=ar(19,n,e,i),t.elementType=mv,t.lanes=s,t;case QR:return Nm(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case $R:o=10;break e;case AR:o=9;break e;case sb:o=11;break e;case ob:o=14;break e;case vs:o=16,r=null;break e}throw Error(G(130,t==null?t:typeof t,""))}return e=ar(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function Do(t,e,n,r){return t=ar(7,t,r,e),t.lanes=n,t}function Nm(t,e,n,r){return t=ar(22,t,r,e),t.elementType=QR,t.lanes=n,t.stateNode={isHidden:!1},t}function vO(t,e,n){return t=ar(6,t,null,e),t.lanes=n,t}function xO(t,e,n){return e=ar(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function jV(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=eO(0),this.expirationTimes=eO(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eO(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Bb(t,e,n,r,i,s,o,a,l){return t=new jV(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=ar(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},kb(s),t}function MV(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ja,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function k$(t){if(!t)return Xs;t=t._reactInternals;e:{if(fa(t)!==t||t.tag!==1)throw Error(G(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(bn(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(G(171))}if(t.tag===1){var n=t.type;if(bn(n))return k_(t,n,e)}return e}function C$(t,e,n,r,i,s,o,a,l){return t=Bb(n,r,!0,t,i,s,o,a,l),t.context=k$(null),n=t.current,r=nn(),i=Ls(n),s=Xi(r,i),s.callback=e??null,Ms(n,s,i),t.current.lanes=i,Rf(t,i,r),wn(t,r),t}function jm(t,e,n,r){var i=e.current,s=nn(),o=Ls(i);return n=k$(n),e.context===null?e.context=n:e.pendingContext=n,e=Xi(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Ms(i,e,o),t!==null&&(Lr(t,i,o,s),vh(t,i,o)),o}function bp(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Lk(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Vb(t,e){Lk(t,e),(t=t.alternate)&&Lk(t,e)}function DV(){return null}var P$=typeof reportError=="function"?reportError:function(t){console.error(t)};function Fb(t){this._internalRoot=t}Mm.prototype.render=Fb.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(G(409));jm(t,e,null,null)};Mm.prototype.unmount=Fb.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Wo(function(){jm(null,t,null,null)}),e[Yi]=null}};function Mm(t){this._internalRoot=t}Mm.prototype.unstable_scheduleHydration=function(t){if(t){var e=r_();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Ss.length&&e!==0&&e<Ss[n].priority;n++);Ss.splice(n,0,t),n===0&&s_(t)}};function Xb(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Dm(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function zk(){}function LV(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=bp(o);s.call(c)}}var o=C$(e,r,t,0,null,!1,!1,"",zk);return t._reactRootContainer=o,t[Yi]=o.current,Nu(t.nodeType===8?t.parentNode:t),Wo(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=bp(l);a.call(c)}}var l=Bb(t,0,!1,null,null,!1,!1,"",zk);return t._reactRootContainer=l,t[Yi]=l.current,Nu(t.nodeType===8?t.parentNode:t),Wo(function(){jm(e,l,n,r)}),l}function Lm(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=bp(o);a.call(l)}}jm(e,o,t,i)}else o=LV(n,e,t,i,r);return bp(o)}t_=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Wc(e.pendingLanes);n!==0&&(cb(e,n|1),wn(e,dt()),!(ze&6)&&(wl=dt()+500,io()))}break;case 13:Wo(function(){var r=Ui(t,1);if(r!==null){var i=nn();Lr(r,t,1,i)}}),Vb(t,1)}};ub=function(t){if(t.tag===13){var e=Ui(t,134217728);if(e!==null){var n=nn();Lr(e,t,134217728,n)}Vb(t,134217728)}};n_=function(t){if(t.tag===13){var e=Ls(t),n=Ui(t,e);if(n!==null){var r=nn();Lr(n,t,e,r)}Vb(t,e)}};r_=function(){return Fe};i_=function(t,e){var n=Fe;try{return Fe=t,e()}finally{Fe=n}};Cv=function(t,e,n){switch(e){case"input":if(yv(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=Rm(r);if(!i)throw Error(G(90));NR(r),yv(r,i)}}}break;case"textarea":MR(t,n);break;case"select":e=n.value,e!=null&&Ga(t,!!n.multiple,e,!1)}};XR=Mb;ZR=Wo;var zV={usingClientEntryPoint:!1,Events:[$f,Ba,Rm,VR,FR,Mb]},Tc={findFiberByHostInstance:_o,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},BV={bundleType:Tc.bundleType,version:Tc.version,rendererPackageName:Tc.rendererPackageName,rendererConfig:Tc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:is.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=YR(t),t===null?null:t.stateNode},findFiberByHostInstance:Tc.findFiberByHostInstance||DV,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var kd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kd.isDisabled&&kd.supportsFiber)try{Cm=kd.inject(BV),xi=kd}catch{}}Hn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zV;Hn.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xb(e))throw Error(G(200));return MV(t,e,null,n)};Hn.createRoot=function(t,e){if(!Xb(t))throw Error(G(299));var n=!1,r="",i=P$;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=Bb(t,1,!1,null,null,n,!1,r,i),t[Yi]=e.current,Nu(t.nodeType===8?t.parentNode:t),new Fb(e)};Hn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(G(188)):(t=Object.keys(t).join(","),Error(G(268,t)));return t=YR(e),t=t===null?null:t.stateNode,t};Hn.flushSync=function(t){return Wo(t)};Hn.hydrate=function(t,e,n){if(!Dm(e))throw Error(G(200));return Lm(null,t,e,!0,n)};Hn.hydrateRoot=function(t,e,n){if(!Xb(t))throw Error(G(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=P$;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=C$(e,null,t,1,n??null,i,!1,s,o),t[Yi]=e.current,Nu(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new Mm(e)};Hn.render=function(t,e,n){if(!Dm(e))throw Error(G(200));return Lm(null,t,e,!1,n)};Hn.unmountComponentAtNode=function(t){if(!Dm(t))throw Error(G(40));return t._reactRootContainer?(Wo(function(){Lm(null,null,t,!1,function(){t._reactRootContainer=null,t[Yi]=null})}),!0):!1};Hn.unstable_batchedUpdates=Mb;Hn.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Dm(n))throw Error(G(200));if(t==null||t._reactInternals===void 0)throw Error(G(38));return Lm(t,e,n,!1,r)};Hn.version="18.3.1-next-f1338f8080-20240426";function T$(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(T$)}catch(t){console.error(t)}}T$(),TR.exports=Hn;var Gl=TR.exports;const E$=ql(Gl);var Bk=Gl;fv.createRoot=Bk.createRoot,fv.hydrateRoot=Bk.hydrateRoot;/**
|
|
42
|
+
* react-router v7.13.0
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Remix Software Inc.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
48
|
+
*
|
|
49
|
+
* @license MIT
|
|
50
|
+
*/var Vk="popstate";function VV(t={}){function e(r,i){let{pathname:s,search:o,hash:a}=r.location;return ix("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Xu(i)}return XV(e,n,null,t)}function lt(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Vr(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function FV(){return Math.random().toString(36).substring(2,10)}function Fk(t,e){return{usr:t.state,key:t.key,idx:e}}function ix(t,e,n=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?Kl(e):e,state:n,key:e&&e.key||r||FV()}}function Xu({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Kl(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function XV(t,e,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a="POP",l=null,c=u();c==null&&(c=0,o.replaceState({...o.state,idx:c},""));function u(){return(o.state||{idx:null}).idx}function f(){a="POP";let v=u(),y=v==null?null:v-c;c=v,l&&l({action:a,location:m.location,delta:y})}function d(v,y){a="PUSH";let x=ix(m.location,v,y);c=u()+1;let b=Fk(x,c),k=m.createHref(x);try{o.pushState(b,"",k)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(k)}s&&l&&l({action:a,location:m.location,delta:1})}function h(v,y){a="REPLACE";let x=ix(m.location,v,y);c=u();let b=Fk(x,c),k=m.createHref(x);o.replaceState(b,"",k),s&&l&&l({action:a,location:m.location,delta:0})}function g(v){return ZV(v)}let m={get action(){return a},get location(){return t(i,o)},listen(v){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Vk,f),l=v,()=>{i.removeEventListener(Vk,f),l=null}},createHref(v){return e(i,v)},createURL:g,encodeLocation(v){let y=g(v);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:d,replace:h,go(v){return o.go(v)}};return m}function ZV(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),lt(n,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:Xu(t);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function R$(t,e,n="/"){return WV(t,e,n,!1)}function WV(t,e,n,r){let i=typeof e=="string"?Kl(e):e,s=Gi(i.pathname||"/",n);if(s==null)return null;let o=_$(t);qV(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=iF(s);a=nF(o[l],c,r)}return a}function _$(t,e=[],n=[],r="",i=!1){let s=(o,a,l=i,c)=>{let u={relativePath:c===void 0?o.path||"":c,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(r)&&l)return;lt(u.relativePath.startsWith(r),`Absolute route path "${u.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(r.length)}let f=Zi([r,u.relativePath]),d=n.concat(u);o.children&&o.children.length>0&&(lt(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),_$(o.children,e,d,f,l)),!(o.path==null&&!o.index)&&e.push({path:f,score:eF(f,o.index),routesMeta:d})};return t.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,a);else for(let c of $$(o.path))s(o,a,!0,c)}),e}function $$(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=$$(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function qV(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:tF(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var YV=/^:[\w-]+$/,UV=3,HV=2,GV=1,KV=10,JV=-2,Xk=t=>t==="*";function eF(t,e){let n=t.split("/"),r=n.length;return n.some(Xk)&&(r+=JV),e&&(r+=HV),n.filter(i=>!Xk(i)).reduce((i,s)=>i+(YV.test(s)?UV:s===""?GV:KV),r)}function tF(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function nF(t,e,n=!1){let{routesMeta:r}=t,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=s==="/"?e:e.slice(s.length)||"/",f=wp({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),d=l.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=wp({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!f)return null;Object.assign(i,f.params),o.push({params:i,pathname:Zi([s,f.pathname]),pathnameBase:lF(Zi([s,f.pathnameBase])),route:d}),f.pathnameBase!=="/"&&(s=Zi([s,f.pathnameBase]))}return o}function wp(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=rF(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,{paramName:u,isOptional:f},d)=>{if(u==="*"){let g=a[d]||"";o=s.slice(0,s.length-g.length).replace(/(.)\/+$/,"$1")}const h=a[d];return f&&!h?c[u]=void 0:c[u]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:t}}function rF(t,e=!1,n=!0){Vr(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function iF(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Vr(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function Gi(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}var sF=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function oF(t,e="/"){let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Kl(t):t,s;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?s=Zk(n.substring(1),"/"):s=Zk(n,e)):s=e,{pathname:s,search:cF(r),hash:uF(i)}}function Zk(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function bO(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function aF(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function A$(t){let e=aF(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function Q$(t,e,n,r=!1){let i;typeof t=="string"?i=Kl(t):(i={...t},lt(!i.pathname||!i.pathname.includes("?"),bO("?","pathname","search",i)),lt(!i.pathname||!i.pathname.includes("#"),bO("#","pathname","hash",i)),lt(!i.search||!i.search.includes("#"),bO("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let f=e.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}a=f>=0?e[f]:"/"}let l=oF(i,a),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var Zi=t=>t.join("/").replace(/\/\/+/g,"/"),lF=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),cF=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,uF=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,fF=class{constructor(t,e,n,r=!1){this.status=t,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function dF(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function hF(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var I$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function N$(t,e){let n=t;if(typeof n!="string"||!sF.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(I$)try{let s=new URL(window.location.href),o=n.startsWith("//")?new URL(s.protocol+n):new URL(n),a=Gi(o.pathname,e);o.origin===s.origin&&a!=null?n=a+o.search+o.hash:i=!0}catch{Vr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var j$=["POST","PUT","PATCH","DELETE"];new Set(j$);var pF=["GET",...j$];new Set(pF);var Jl=O.createContext(null);Jl.displayName="DataRouter";var zm=O.createContext(null);zm.displayName="DataRouterState";var mF=O.createContext(!1),M$=O.createContext({isTransitioning:!1});M$.displayName="ViewTransition";var gF=O.createContext(new Map);gF.displayName="Fetchers";var OF=O.createContext(null);OF.displayName="Await";var vr=O.createContext(null);vr.displayName="Navigation";var Qf=O.createContext(null);Qf.displayName="Location";var Ci=O.createContext({outlet:null,matches:[],isDataRoute:!1});Ci.displayName="Route";var Zb=O.createContext(null);Zb.displayName="RouteError";var D$="REACT_ROUTER_ERROR",yF="REDIRECT",vF="ROUTE_ERROR_RESPONSE";function xF(t){if(t.startsWith(`${D$}:${yF}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function bF(t){if(t.startsWith(`${D$}:${vF}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new fF(e.status,e.statusText,e.data)}catch{}}function wF(t,{relative:e}={}){lt(If(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=O.useContext(vr),{hash:i,pathname:s,search:o}=Nf(t,{relative:e}),a=s;return n!=="/"&&(a=s==="/"?n:Zi([n,s])),r.createHref({pathname:a,search:o,hash:i})}function If(){return O.useContext(Qf)!=null}function so(){return lt(If(),"useLocation() may be used only in the context of a <Router> component."),O.useContext(Qf).location}var L$="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function z$(t){O.useContext(vr).static||O.useLayoutEffect(t)}function ec(){let{isDataRoute:t}=O.useContext(Ci);return t?jF():SF()}function SF(){lt(If(),"useNavigate() may be used only in the context of a <Router> component.");let t=O.useContext(Jl),{basename:e,navigator:n}=O.useContext(vr),{matches:r}=O.useContext(Ci),{pathname:i}=so(),s=JSON.stringify(A$(r)),o=O.useRef(!1);return z$(()=>{o.current=!0}),O.useCallback((l,c={})=>{if(Vr(o.current,L$),!o.current)return;if(typeof l=="number"){n.go(l);return}let u=Q$(l,JSON.parse(s),i,c.relative==="path");t==null&&e!=="/"&&(u.pathname=u.pathname==="/"?e:Zi([e,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[e,n,s,i,t])}O.createContext(null);function kF(){let{matches:t}=O.useContext(Ci),e=t[t.length-1];return e?e.params:{}}function Nf(t,{relative:e}={}){let{matches:n}=O.useContext(Ci),{pathname:r}=so(),i=JSON.stringify(A$(n));return O.useMemo(()=>Q$(t,JSON.parse(i),r,e==="path"),[t,i,r,e])}function CF(t,e){return B$(t,e)}function B$(t,e,n,r,i){var x;lt(If(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=O.useContext(vr),{matches:o}=O.useContext(Ci),a=o[o.length-1],l=a?a.params:{},c=a?a.pathname:"/",u=a?a.pathnameBase:"/",f=a&&a.route;{let b=f&&f.path||"";F$(c,!f||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
51
|
+
|
|
52
|
+
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let d=so(),h;if(e){let b=typeof e=="string"?Kl(e):e;lt(u==="/"||((x=b.pathname)==null?void 0:x.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${b.pathname}" was given in the \`location\` prop.`),h=b}else h=d;let g=h.pathname||"/",m=g;if(u!=="/"){let b=u.replace(/^\//,"").split("/");m="/"+g.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=R$(t,{pathname:m});Vr(f||v!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Vr(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=_F(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:Zi([u,s.encodeLocation?s.encodeLocation(b.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:Zi([u,s.encodeLocation?s.encodeLocation(b.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathnameBase])})),o,n,r,i);return e&&y?O.createElement(Qf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},y):y}function PF(){let t=NF(),e=dF(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",t),o=O.createElement(O.Fragment,null,O.createElement("p",null,"💿 Hey developer 👋"),O.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",O.createElement("code",{style:s},"ErrorBoundary")," or"," ",O.createElement("code",{style:s},"errorElement")," prop on your route.")),O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},e),n?O.createElement("pre",{style:i},n):null,o)}var TF=O.createElement(PF,null),V$=class extends O.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=bF(t.digest);n&&(t=n)}let e=t!==void 0?O.createElement(Ci.Provider,{value:this.props.routeContext},O.createElement(Zb.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?O.createElement(EF,{error:t},e):e}};V$.contextType=mF;var wO=new WeakMap;function EF({children:t,error:e}){let{basename:n}=O.useContext(vr);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=xF(e.digest);if(r){let i=wO.get(e);if(i)throw i;let s=N$(r.location,n);if(I$&&!wO.get(e))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw wO.set(e,o),o}return O.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function RF({routeContext:t,match:e,children:n}){let r=O.useContext(Jl);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),O.createElement(Ci.Provider,{value:t},n)}function _F(t,e=[],n=null,r=null,i=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let s=t,o=n==null?void 0:n.errors;if(o!=null){let u=s.findIndex(f=>f.route.id&&(o==null?void 0:o[f.route.id])!==void 0);lt(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,u+1))}let a=!1,l=-1;if(n)for(let u=0;u<s.length;u++){let f=s[u];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(l=u),f.route.id){let{loaderData:d,errors:h}=n,g=f.route.loader&&!d.hasOwnProperty(f.route.id)&&(!h||h[f.route.id]===void 0);if(f.route.lazy||g){a=!0,l>=0?s=s.slice(0,l+1):s=[s[0]];break}}}let c=n&&r?(u,f)=>{var d,h;r(u,{location:n.location,params:((h=(d=n.matches)==null?void 0:d[0])==null?void 0:h.params)??{},unstable_pattern:hF(n.matches),errorInfo:f})}:void 0;return s.reduceRight((u,f,d)=>{let h,g=!1,m=null,v=null;n&&(h=o&&f.route.id?o[f.route.id]:void 0,m=f.route.errorElement||TF,a&&(l<0&&d===0?(F$("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,v=null):l===d&&(g=!0,v=f.route.hydrateFallbackElement||null)));let y=e.concat(s.slice(0,d+1)),x=()=>{let b;return h?b=m:g?b=v:f.route.Component?b=O.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=u,O.createElement(RF,{match:f,routeContext:{outlet:u,matches:y,isDataRoute:n!=null},children:b})};return n&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?O.createElement(V$,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:c}):x()},null)}function Wb(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $F(t){let e=O.useContext(Jl);return lt(e,Wb(t)),e}function AF(t){let e=O.useContext(zm);return lt(e,Wb(t)),e}function QF(t){let e=O.useContext(Ci);return lt(e,Wb(t)),e}function qb(t){let e=QF(t),n=e.matches[e.matches.length-1];return lt(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function IF(){return qb("useRouteId")}function NF(){var r;let t=O.useContext(Zb),e=AF("useRouteError"),n=qb("useRouteError");return t!==void 0?t:(r=e.errors)==null?void 0:r[n]}function jF(){let{router:t}=$F("useNavigate"),e=qb("useNavigate"),n=O.useRef(!1);return z$(()=>{n.current=!0}),O.useCallback(async(i,s={})=>{Vr(n.current,L$),n.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...s}))},[t,e])}var Wk={};function F$(t,e,n){!e&&!Wk[t]&&(Wk[t]=!0,Vr(!1,n))}O.memo(MF);function MF({routes:t,future:e,state:n,onError:r}){return B$(t,void 0,n,r,e)}function sx(t){lt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function DF({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,unstable_useTransitions:o}){lt(!If(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=t.replace(/^\/*/,"/"),l=O.useMemo(()=>({basename:a,navigator:i,static:s,unstable_useTransitions:o,future:{}}),[a,i,s,o]);typeof n=="string"&&(n=Kl(n));let{pathname:c="/",search:u="",hash:f="",state:d=null,key:h="default"}=n,g=O.useMemo(()=>{let m=Gi(c,a);return m==null?null:{location:{pathname:m,search:u,hash:f,state:d,key:h},navigationType:r}},[a,c,u,f,d,h,r]);return Vr(g!=null,`<Router basename="${a}"> is not able to match the URL "${c}${u}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:O.createElement(vr.Provider,{value:l},O.createElement(Qf.Provider,{children:e,value:g}))}function LF({children:t,location:e}){return CF(ox(t),e)}function ox(t,e=[]){let n=[];return O.Children.forEach(t,(r,i)=>{if(!O.isValidElement(r))return;let s=[...e,i];if(r.type===O.Fragment){n.push.apply(n,ox(r.props.children,s));return}lt(r.type===sx,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),lt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=ox(r.props.children,s)),n.push(o)}),n}var Ph="get",Th="application/x-www-form-urlencoded";function Bm(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function zF(t){return Bm(t)&&t.tagName.toLowerCase()==="button"}function BF(t){return Bm(t)&&t.tagName.toLowerCase()==="form"}function VF(t){return Bm(t)&&t.tagName.toLowerCase()==="input"}function FF(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function XF(t,e){return t.button===0&&(!e||e==="_self")&&!FF(t)}function ax(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function ZF(t,e){let n=ax(t);return e&&e.forEach((r,i)=>{n.has(i)||e.getAll(i).forEach(s=>{n.append(i,s)})}),n}var Cd=null;function WF(){if(Cd===null)try{new FormData(document.createElement("form"),0),Cd=!1}catch{Cd=!0}return Cd}var qF=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function SO(t){return t!=null&&!qF.has(t)?(Vr(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Th}"`),null):t}function YF(t,e){let n,r,i,s,o;if(BF(t)){let a=t.getAttribute("action");r=a?Gi(a,e):null,n=t.getAttribute("method")||Ph,i=SO(t.getAttribute("enctype"))||Th,s=new FormData(t)}else if(zF(t)||VF(t)&&(t.type==="submit"||t.type==="image")){let a=t.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=t.getAttribute("formaction")||a.getAttribute("action");if(r=l?Gi(l,e):null,n=t.getAttribute("formmethod")||a.getAttribute("method")||Ph,i=SO(t.getAttribute("formenctype"))||SO(a.getAttribute("enctype"))||Th,s=new FormData(a,t),!WF()){let{name:c,type:u,value:f}=t;if(u==="image"){let d=c?`${c}.`:"";s.append(`${d}x`,"0"),s.append(`${d}y`,"0")}else c&&s.append(c,f)}}else{if(Bm(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ph,r=null,i=Th,o=t}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Yb(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function UF(t,e,n,r){let i=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:e&&Gi(i.pathname,e)==="/"?i.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function HF(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function GF(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function KF(t,e,n){let r=await Promise.all(t.map(async i=>{let s=e.routes[i.route.id];if(s){let o=await HF(s,n);return o.links?o.links():[]}return[]}));return nX(r.flat(1).filter(GF).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function qk(t,e,n,r,i,s){let o=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,a=(l,c)=>{var u;return n[c].pathname!==l.pathname||((u=n[c].route.path)==null?void 0:u.endsWith("*"))&&n[c].params["*"]!==l.params["*"]};return s==="assets"?e.filter((l,c)=>o(l,c)||a(l,c)):s==="data"?e.filter((l,c)=>{var f;let u=r.routes[l.route.id];if(!u||!u.hasLoader)return!1;if(o(l,c)||a(l,c))return!0;if(l.route.shouldRevalidate){let d=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(t,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function JF(t,e,{includeHydrateFallback:n}={}){return eX(t.map(r=>{let i=e.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function eX(t){return[...new Set(t)]}function tX(t){let e={},n=Object.keys(t).sort();for(let r of n)e[r]=t[r];return e}function nX(t,e){let n=new Set;return new Set(e),t.reduce((r,i)=>{let s=JSON.stringify(tX(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function X$(){let t=O.useContext(Jl);return Yb(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function rX(){let t=O.useContext(zm);return Yb(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Ub=O.createContext(void 0);Ub.displayName="FrameworkContext";function Z$(){let t=O.useContext(Ub);return Yb(t,"You must render this element inside a <HydratedRouter> element"),t}function iX(t,e){let n=O.useContext(Ub),[r,i]=O.useState(!1),[s,o]=O.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:f}=e,d=O.useRef(null);O.useEffect(()=>{if(t==="render"&&o(!0),t==="viewport"){let m=y=>{y.forEach(x=>{o(x.isIntersecting)})},v=new IntersectionObserver(m,{threshold:.5});return d.current&&v.observe(d.current),()=>{v.disconnect()}}},[t]),O.useEffect(()=>{if(r){let m=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(m)}}},[r]);let h=()=>{i(!0)},g=()=>{i(!1),o(!1)};return n?t!=="intent"?[s,d,{}]:[s,d,{onFocus:Ec(a,h),onBlur:Ec(l,g),onMouseEnter:Ec(c,h),onMouseLeave:Ec(u,g),onTouchStart:Ec(f,h)}]:[!1,d,{}]}function Ec(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function sX({page:t,...e}){let{router:n}=X$(),r=O.useMemo(()=>R$(n.routes,t,n.basename),[n.routes,t,n.basename]);return r?O.createElement(aX,{page:t,matches:r,...e}):null}function oX(t){let{manifest:e,routeModules:n}=Z$(),[r,i]=O.useState([]);return O.useEffect(()=>{let s=!1;return KF(t,e,n).then(o=>{s||i(o)}),()=>{s=!0}},[t,e,n]),r}function aX({page:t,matches:e,...n}){let r=so(),{future:i,manifest:s,routeModules:o}=Z$(),{basename:a}=X$(),{loaderData:l,matches:c}=rX(),u=O.useMemo(()=>qk(t,e,c,s,r,"data"),[t,e,c,s,r]),f=O.useMemo(()=>qk(t,e,c,s,r,"assets"),[t,e,c,s,r]),d=O.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let m=new Set,v=!1;if(e.forEach(x=>{var k;let b=s.routes[x.route.id];!b||!b.hasLoader||(!u.some(w=>w.route.id===x.route.id)&&x.route.id in l&&((k=o[x.route.id])!=null&&k.shouldRevalidate)||b.hasClientLoader?v=!0:m.add(x.route.id))}),m.size===0)return[];let y=UF(t,a,i.unstable_trailingSlashAwareDataRequests,"data");return v&&m.size>0&&y.searchParams.set("_routes",e.filter(x=>m.has(x.route.id)).map(x=>x.route.id).join(",")),[y.pathname+y.search]},[a,i.unstable_trailingSlashAwareDataRequests,l,r,s,u,e,t,o]),h=O.useMemo(()=>JF(f,s),[f,s]),g=oX(f);return O.createElement(O.Fragment,null,d.map(m=>O.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...n})),h.map(m=>O.createElement("link",{key:m,rel:"modulepreload",href:m,...n})),g.map(({key:m,link:v})=>O.createElement("link",{key:m,nonce:n.nonce,...v,crossOrigin:v.crossOrigin??n.crossOrigin})))}function lX(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var cX=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{cX&&(window.__reactRouterVersion="7.13.0")}catch{}function uX({basename:t,children:e,unstable_useTransitions:n,window:r}){let i=O.useRef();i.current==null&&(i.current=VV({window:r,v5Compat:!0}));let s=i.current,[o,a]=O.useState({action:s.action,location:s.location}),l=O.useCallback(c=>{n===!1?a(c):O.startTransition(()=>a(c))},[n]);return O.useLayoutEffect(()=>s.listen(l),[s,l]),O.createElement(DF,{basename:t,children:e,location:o.location,navigationType:o.action,navigator:s,unstable_useTransitions:n})}var W$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,q$=O.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:d,...h},g){let{basename:m,unstable_useTransitions:v}=O.useContext(vr),y=typeof c=="string"&&W$.test(c),x=N$(c,m);c=x.to;let b=wF(c,{relative:i}),[k,w,S]=iX(r,h),C=pX(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:i,viewTransition:f,unstable_defaultShouldRevalidate:d,unstable_useTransitions:v});function _(E){e&&e(E),E.defaultPrevented||C(E)}let I=O.createElement("a",{...h,...S,href:x.absoluteURL||b,onClick:x.isExternal||s?e:_,ref:lX(g,w),target:l,"data-discover":!y&&n==="render"?"true":void 0});return k&&!y?O.createElement(O.Fragment,null,I,O.createElement(sX,{page:b})):I});q$.displayName="Link";var fX=O.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:a,children:l,...c},u){let f=Nf(o,{relative:c.relative}),d=so(),h=O.useContext(zm),{navigator:g,basename:m}=O.useContext(vr),v=h!=null&&xX(f)&&a===!0,y=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,x=d.pathname,b=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(x=x.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&m&&(b=Gi(b,m)||b);const k=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let w=x===y||!i&&x.startsWith(y)&&x.charAt(k)==="/",S=b!=null&&(b===y||!i&&b.startsWith(y)&&b.charAt(y.length)==="/"),C={isActive:w,isPending:S,isTransitioning:v},_=w?e:void 0,I;typeof r=="function"?I=r(C):I=[r,w?"active":null,S?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let E=typeof s=="function"?s(C):s;return O.createElement(q$,{...c,"aria-current":_,className:I,ref:u,style:E,to:o,viewTransition:a},typeof l=="function"?l(C):l)});fX.displayName="NavLink";var dX=O.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:i,state:s,method:o=Ph,action:a,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:d,...h},g)=>{let{unstable_useTransitions:m}=O.useContext(vr),v=yX(),y=vX(a,{relative:c}),x=o.toLowerCase()==="get"?"get":"post",b=typeof a=="string"&&W$.test(a),k=w=>{if(l&&l(w),w.defaultPrevented)return;w.preventDefault();let S=w.nativeEvent.submitter,C=(S==null?void 0:S.getAttribute("formmethod"))||o,_=()=>v(S||w.currentTarget,{fetcherKey:e,method:C,navigate:n,replace:i,state:s,relative:c,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:d});m&&n!==!1?O.startTransition(()=>_()):_()};return O.createElement("form",{ref:g,method:x,action:y,onSubmit:r?l:k,...h,"data-discover":!b&&t==="render"?"true":void 0})});dX.displayName="Form";function hX(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Y$(t){let e=O.useContext(Jl);return lt(e,hX(t)),e}function pX(t,{target:e,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:a,unstable_useTransitions:l}={}){let c=ec(),u=so(),f=Nf(t,{relative:s});return O.useCallback(d=>{if(XF(d,e)){d.preventDefault();let h=n!==void 0?n:Xu(u)===Xu(f),g=()=>c(t,{replace:h,state:r,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:a});l?O.startTransition(()=>g()):g()}},[u,c,f,n,r,e,t,i,s,o,a,l])}function mX(t){Vr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let e=O.useRef(ax(t)),n=O.useRef(!1),r=so(),i=O.useMemo(()=>ZF(r.search,n.current?null:e.current),[r.search]),s=ec(),o=O.useCallback((a,l)=>{const c=ax(typeof a=="function"?a(new URLSearchParams(i)):a);n.current=!0,s("?"+c,l)},[s,i]);return[i,o]}var gX=0,OX=()=>`__${String(++gX)}__`;function yX(){let{router:t}=Y$("useSubmit"),{basename:e}=O.useContext(vr),n=IF(),r=t.fetch,i=t.navigate;return O.useCallback(async(s,o={})=>{let{action:a,method:l,encType:c,formData:u,body:f}=YF(s,e);if(o.navigate===!1){let d=o.fetcherKey||OX();await r(d,n,o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:f,formMethod:o.method||l,formEncType:o.encType||c,flushSync:o.flushSync})}else await i(o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:f,formMethod:o.method||l,formEncType:o.encType||c,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,e,n])}function vX(t,{relative:e}={}){let{basename:n}=O.useContext(vr),r=O.useContext(Ci);lt(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...Nf(t||".",{relative:e})},o=so();if(t==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(u=>u==="")){a.delete("index"),l.filter(f=>f).forEach(f=>a.append("index",f));let u=a.toString();s.search=u?`?${u}`:""}}return(!t||t===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:Zi([n,s.pathname])),Xu(s)}function xX(t,{relative:e}={}){let n=O.useContext(M$);lt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Y$("useViewTransitionState"),i=Nf(t,{relative:e});if(!n.isTransitioning)return!1;let s=Gi(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Gi(n.nextLocation.pathname,r)||n.nextLocation.pathname;return wp(i.pathname,o)!=null||wp(i.pathname,s)!=null}const bX={},Yk=t=>{let e;const n=new Set,r=(u,f)=>{const d=typeof u=="function"?u(e):u;if(!Object.is(d,e)){const h=e;e=f??(typeof d!="object"||d===null)?d:Object.assign({},e,d),n.forEach(g=>g(e,h))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(bX?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=e=t(r,i,l);return l},wX=t=>t?Yk(t):Yk;var U$={exports:{}},H$={},G$={exports:{}},K$={};/**
|
|
53
|
+
* @license React
|
|
54
|
+
* use-sync-external-store-shim.production.js
|
|
55
|
+
*
|
|
56
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the MIT license found in the
|
|
59
|
+
* LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/var Sl=O;function SX(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var kX=typeof Object.is=="function"?Object.is:SX,CX=Sl.useState,PX=Sl.useEffect,TX=Sl.useLayoutEffect,EX=Sl.useDebugValue;function RX(t,e){var n=e(),r=CX({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return TX(function(){i.value=n,i.getSnapshot=e,kO(i)&&s({inst:i})},[t,n,e]),PX(function(){return kO(i)&&s({inst:i}),t(function(){kO(i)&&s({inst:i})})},[t]),EX(n),n}function kO(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!kX(t,n)}catch{return!0}}function _X(t,e){return e()}var $X=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?_X:RX;K$.useSyncExternalStore=Sl.useSyncExternalStore!==void 0?Sl.useSyncExternalStore:$X;G$.exports=K$;var J$=G$.exports;/**
|
|
61
|
+
* @license React
|
|
62
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
63
|
+
*
|
|
64
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
65
|
+
*
|
|
66
|
+
* This source code is licensed under the MIT license found in the
|
|
67
|
+
* LICENSE file in the root directory of this source tree.
|
|
68
|
+
*/var Vm=O,AX=J$;function QX(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var IX=typeof Object.is=="function"?Object.is:QX,NX=AX.useSyncExternalStore,jX=Vm.useRef,MX=Vm.useEffect,DX=Vm.useMemo,LX=Vm.useDebugValue;H$.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var s=jX(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=DX(function(){function l(h){if(!c){if(c=!0,u=h,h=r(h),i!==void 0&&o.hasValue){var g=o.value;if(i(g,h))return f=g}return f=h}if(g=f,IX(u,h))return g;var m=r(h);return i!==void 0&&i(g,m)?(u=h,g):(u=h,f=m)}var c=!1,u,f,d=n===void 0?null:n;return[function(){return l(e())},d===null?void 0:function(){return l(d())}]},[e,n,r,i]);var a=NX(t,s[0],s[1]);return MX(function(){o.hasValue=!0,o.value=a},[a]),LX(a),a};U$.exports=H$;var zX=U$.exports;const BX=ql(zX),eA={},{useDebugValue:VX}=ee,{useSyncExternalStoreWithSelector:FX}=BX;let Uk=!1;const XX=t=>t;function ZX(t,e=XX,n){(eA?"production":void 0)!=="production"&&n&&!Uk&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Uk=!0);const r=FX(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return VX(r),r}const Hk=t=>{(eA?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?wX(t):t,n=(r,i)=>ZX(e,r,i);return Object.assign(n,e),n},da=t=>t?Hk(t):Hk,WX={};function qX(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var s;const o=l=>l===null?null:JSON.parse(l,void 0),a=(s=n.getItem(i))!=null?s:null;return a instanceof Promise?a.then(o):o(a)},setItem:(i,s)=>n.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>n.removeItem(i)}}const Zu=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return Zu(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Zu(r)(n)}}}},YX=(t,e)=>(n,r,i)=>{let s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:v=>v,version:0,merge:(v,y)=>({...y,...v}),...e},o=!1;const a=new Set,l=new Set;let c;try{c=s.getStorage()}catch{}if(!c)return t((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...v)},r,i);const u=Zu(s.serialize),f=()=>{const v=s.partialize({...r()});let y;const x=u({state:v,version:s.version}).then(b=>c.setItem(s.name,b)).catch(b=>{y=b});if(y)throw y;return x},d=i.setState;i.setState=(v,y)=>{d(v,y),f()};const h=t((...v)=>{n(...v),f()},r,i);let g;const m=()=>{var v;if(!c)return;o=!1,a.forEach(x=>x(r()));const y=((v=s.onRehydrateStorage)==null?void 0:v.call(s,r()))||void 0;return Zu(c.getItem.bind(c))(s.name).then(x=>{if(x)return s.deserialize(x)}).then(x=>{if(x)if(typeof x.version=="number"&&x.version!==s.version){if(s.migrate)return s.migrate(x.state,x.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return x.state}).then(x=>{var b;return g=s.merge(x,(b=r())!=null?b:h),n(g,!0),f()}).then(()=>{y==null||y(g,void 0),o=!0,l.forEach(x=>x(g))}).catch(x=>{y==null||y(void 0,x)})};return i.persist={setOptions:v=>{s={...s,...v},v.getStorage&&(c=v.getStorage())},clearStorage:()=>{c==null||c.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:v=>(a.add(v),()=>{a.delete(v)}),onFinishHydration:v=>(l.add(v),()=>{l.delete(v)})},m(),g||h},UX=(t,e)=>(n,r,i)=>{let s={storage:qX(()=>localStorage),partialize:m=>m,version:0,merge:(m,v)=>({...v,...m}),...e},o=!1;const a=new Set,l=new Set;let c=s.storage;if(!c)return t((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...m)},r,i);const u=()=>{const m=s.partialize({...r()});return c.setItem(s.name,{state:m,version:s.version})},f=i.setState;i.setState=(m,v)=>{f(m,v),u()};const d=t((...m)=>{n(...m),u()},r,i);i.getInitialState=()=>d;let h;const g=()=>{var m,v;if(!c)return;o=!1,a.forEach(x=>{var b;return x((b=r())!=null?b:d)});const y=((v=s.onRehydrateStorage)==null?void 0:v.call(s,(m=r())!=null?m:d))||void 0;return Zu(c.getItem.bind(c))(s.name).then(x=>{if(x)if(typeof x.version=="number"&&x.version!==s.version){if(s.migrate)return[!0,s.migrate(x.state,x.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,x.state];return[!1,void 0]}).then(x=>{var b;const[k,w]=x;if(h=s.merge(w,(b=r())!=null?b:d),n(h,!0),k)return u()}).then(()=>{y==null||y(h,void 0),h=r(),o=!0,l.forEach(x=>x(h))}).catch(x=>{y==null||y(void 0,x)})};return i.persist={setOptions:m=>{s={...s,...m},m.storage&&(c=m.storage)},clearStorage:()=>{c==null||c.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>g(),hasHydrated:()=>o,onHydrate:m=>(a.add(m),()=>{a.delete(m)}),onFinishHydration:m=>(l.add(m),()=>{l.delete(m)})},s.skipHydration||g(),h||d},HX=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((WX?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),YX(t,e)):UX(t,e),tA=HX,jf=da()(tA(t=>({voyageApiKey:null,localaiApiKey:null,ollamaBaseUrl:null,s3AccessKeyId:null,s3SecretAccessKey:null,s3SessionToken:null,s3Region:null,s3Endpoint:null,setVoyageApiKey:e=>t({voyageApiKey:e}),setLocalaiApiKey:e=>t({localaiApiKey:e}),setOllamaBaseUrl:e=>t({ollamaBaseUrl:e}),setS3AccessKeyId:e=>t({s3AccessKeyId:e}),setS3SecretAccessKey:e=>t({s3SecretAccessKey:e}),setS3SessionToken:e=>t({s3SessionToken:e}),setS3Region:e=>t({s3Region:e}),setS3Endpoint:e=>t({s3Endpoint:e}),clearSecrets:()=>t({voyageApiKey:null,localaiApiKey:null,ollamaBaseUrl:null,s3AccessKeyId:null,s3SecretAccessKey:null,s3SessionToken:null,s3Region:null,s3Endpoint:null})}),{name:"rag-secrets"}));function GX(){const t=jf.getState();if(t.voyageApiKey!==null||t.localaiApiKey!==null||t.ollamaBaseUrl!==null)return t;try{const e=localStorage.getItem("rag-secrets");if(e)return JSON.parse(e).state||t}catch{}return t}function Lo(){const t=GX(),e={};return t.voyageApiKey&&(e["x-voyage-api-key"]=t.voyageApiKey),t.localaiApiKey&&(e["x-localai-api-key"]=t.localaiApiKey),t.ollamaBaseUrl&&(e["x-ollama-base-url"]=t.ollamaBaseUrl),t.s3AccessKeyId&&(e["x-s3-access-key-id"]=t.s3AccessKeyId),t.s3SecretAccessKey&&(e["x-s3-secret-access-key"]=t.s3SecretAccessKey),t.s3SessionToken&&(e["x-s3-session-token"]=t.s3SessionToken),t.s3Region&&(e["x-s3-region"]=t.s3Region),t.s3Endpoint&&(e["x-s3-endpoint"]=t.s3Endpoint),e}async function CO(t,e){const n=await fetch(t,{...e,headers:{"Content-Type":"application/json",...Lo(),...e==null?void 0:e.headers}});if(!n.ok){const r=await n.json().catch(()=>({message:"Request failed"}));throw new Error(r.message||`HTTP ${n.status}`)}return n.json()}const ha=da()(tA((t,e)=>({currentProject:null,isLoading:!1,isClosing:!1,error:null,recentProjects:[],fetchCurrentProject:async()=>{t({isLoading:!0,error:null});try{const n=await CO("/api/project/current");t({currentProject:n,isLoading:!1}),n&&e().addRecentProject({path:n.path,name:n.name,lastOpened:n.openedAt})}catch(n){t({isLoading:!1,error:n instanceof Error?n.message:"Failed to fetch project"})}},openProject:async n=>{t({isLoading:!0,error:null});try{const r=await CO("/api/project/open",{method:"POST",body:JSON.stringify({path:n})});t({currentProject:r,isLoading:!1}),e().addRecentProject({path:r.path,name:r.name,lastOpened:r.openedAt})}catch(r){throw t({isLoading:!1,error:r instanceof Error?r.message:"Failed to open project"}),r}},closeProject:async()=>{t({isClosing:!0,error:null,currentProject:null});try{await CO("/api/project/close",{method:"POST"})}catch{}finally{t({isClosing:!1})}return!0},clearError:()=>{t({error:null})},addRecentProject:n=>{t(r=>{const i=r.recentProjects.filter(s=>s.path!==n.path);return{recentProjects:[n,...i].slice(0,10)}})},removeRecentProject:n=>{t(r=>({recentProjects:r.recentProjects.filter(i=>i.path!==n)}))},clearRecentProjects:()=>{t({recentProjects:[]})}}),{name:"rag-project",partialize:t=>({recentProjects:t.recentProjects})}));let Qi=null,go=null,PO=0,TO=0,Gk=0;const KX=3e4,JX=1e4,Mf=da((t,e)=>({notesSyncProgress:null,codeSyncProgress:null,lastCompleted:null,lockStatus:null,recoveryInfo:null,isConnected:!1,lastHeartbeat:null,syncNotes:async(n={})=>{t({notesSyncProgress:{target:"notes",status:"syncing",phase:"analyzing",current:null,added:0,updated:0,deleted:0,total:0,processed:0,progress:0}});try{const r=await fetch("/api/notes/sync",{method:"POST",headers:{"Content-Type":"application/json",...Lo()},body:JSON.stringify({resume:n.resume,force:n.force})});if(!r.ok){const i=await r.json().catch(()=>({}));throw new Error(i.message||"Sync failed")}}catch(r){t(i=>({notesSyncProgress:i.notesSyncProgress?{...i.notesSyncProgress,status:"error",error:r instanceof Error?r.message:"Sync failed"}:null}))}},syncCode:async(n={})=>{t({codeSyncProgress:{target:"code",status:"syncing",phase:"analyzing",current:null,added:0,updated:0,deleted:0,total:0,processed:0,progress:0}});try{const r=await fetch("/api/code/sync",{method:"POST",headers:{"Content-Type":"application/json",...Lo()},body:JSON.stringify({resume:n.resume,force:n.force})});if(!r.ok){const i=await r.json().catch(()=>({}));throw new Error(i.message||"Sync failed")}}catch(r){t(i=>({codeSyncProgress:i.codeSyncProgress?{...i.codeSyncProgress,status:"error",error:r instanceof Error?r.message:"Sync failed"}:null}))}},syncAll:async()=>{await Promise.all([e().syncNotes(),e().syncCode()])},pauseSync:async()=>{try{const n=await fetch("/api/sync/pause",{method:"POST"});if(!n.ok)return!1;const r=await n.json();return r.success&&t(i=>{var s,o;return{notesSyncProgress:((s=i.notesSyncProgress)==null?void 0:s.status)==="syncing"?{...i.notesSyncProgress,status:"paused",paused:!0}:i.notesSyncProgress,codeSyncProgress:((o=i.codeSyncProgress)==null?void 0:o.status)==="syncing"?{...i.codeSyncProgress,status:"paused",paused:!0}:i.codeSyncProgress}}),r.success}catch{return!1}},resumeSync:async()=>{try{const n=await fetch("/api/sync/resume",{method:"POST"});if(!n.ok)return!1;const r=await n.json();return r.success&&t(i=>{var s,o;return{notesSyncProgress:((s=i.notesSyncProgress)==null?void 0:s.status)==="paused"?{...i.notesSyncProgress,status:"syncing",paused:!1}:i.notesSyncProgress,codeSyncProgress:((o=i.codeSyncProgress)==null?void 0:o.status)==="paused"?{...i.codeSyncProgress,status:"syncing",paused:!1}:i.codeSyncProgress}}),r.success}catch{return!1}},cancelSync:async()=>{try{const n=await fetch("/api/sync/cancel",{method:"POST"});return n.ok?(await n.json()).success:!1}catch{return!1}},checkSyncStatus:async()=>{try{const n=await fetch("/api/sync/status");if(!n.ok)return;const r=await n.json();if(t({lockStatus:r.lock,lastCompleted:r.lastCompleted||null}),r.current){const i={target:r.current.type,status:r.current.paused?"paused":"syncing",paused:r.current.paused,phase:r.current.phase,current:r.current.currentFile,added:r.current.added,updated:r.current.updated,deleted:r.current.deleted,total:r.current.totalFiles,processed:r.current.processedFiles,progress:r.current.totalFiles>0?Math.round(r.current.processedFiles/r.current.totalFiles*100):0,taskId:r.current.taskId,estimatedRemainingMs:r.current.estimatedRemainingMs};r.current.type==="notes"?t({notesSyncProgress:i}):t({codeSyncProgress:i})}}catch{}},checkRecovery:async()=>{try{const n=await fetch("/api/sync/recover",{method:"POST"});if(n.ok){const r=await n.json();r.needsRecovery?t({recoveryInfo:r}):t({recoveryInfo:null})}}catch{}},forceUnlock:async(n=!1)=>{try{const r=await fetch("/api/sync/force-unlock",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({force:n})});return r.ok?(await r.json()).success:!1}catch{return!1}},resetProgress:n=>{!n||n==="all"?t({notesSyncProgress:null,codeSyncProgress:null}):n==="notes"?t({notesSyncProgress:null}):n==="code"&&t({codeSyncProgress:null})},connect:()=>{Qi&&Qi.close(),go&&(clearInterval(go),go=null),e().checkSyncStatus(),e().checkRecovery(),Qi=new EventSource("/api/events"),Qi.onopen=()=>{t({isConnected:!0}),PO=Date.now(),TO=0,e().checkSyncStatus(),e().checkRecovery()},Qi.onerror=()=>{t({isConnected:!1});const r=Math.min(1e3*Math.pow(2,TO),KX);TO++,setTimeout(()=>{e().isConnected===!1&&e().connect()},r)},Gk=Date.now(),go=setInterval(()=>{var o,a;const r=e(),i=((o=r.notesSyncProgress)==null?void 0:o.status)==="syncing"||((a=r.codeSyncProgress)==null?void 0:a.status)==="syncing",s=Date.now()-Gk<JX;(i&&Date.now()-PO>3e3||s)&&r.checkSyncStatus()},2e3),["heartbeat","sync:notes:started","sync:notes:progress","sync:notes:completed","sync:notes:error","sync:code:started","sync:code:progress","sync:code:completed","sync:code:error","reindex:notes:started","reindex:notes:progress","reindex:notes:completed","reindex:notes:error","reindex:code:started","reindex:code:progress","reindex:code:completed","reindex:code:error","project:opened","project:closed","file:indexed","file:removed"].forEach(r=>{Qi.addEventListener(r,i=>{const s=i;try{const o=JSON.parse(s.data);PO=Date.now(),e().handleSSEEvent({type:r,data:o})}catch{}})})},disconnect:()=>{Qi&&(Qi.close(),Qi=null),go&&(clearInterval(go),go=null),t({isConnected:!1})},handleSSEEvent:n=>{const{type:r,data:i}=n;switch(r){case"heartbeat":t({lastHeartbeat:new Date().toISOString()});break;case"sync:notes:started":t({notesSyncProgress:{target:"notes",status:"syncing",phase:"analyzing",current:null,added:0,updated:0,deleted:0,total:0,processed:0,progress:0}});break;case"sync:notes:progress":{const s=i;t(o=>({notesSyncProgress:o.notesSyncProgress?{...o.notesSyncProgress,phase:s.phase??o.notesSyncProgress.phase,current:s.current??o.notesSyncProgress.current,progress:s.progress??o.notesSyncProgress.progress,added:s.added??o.notesSyncProgress.added,updated:s.updated??o.notesSyncProgress.updated,deleted:s.deleted??o.notesSyncProgress.deleted,total:s.total??o.notesSyncProgress.total,processed:s.processed??o.notesSyncProgress.processed}:null}));break}case"sync:notes:completed":t(s=>({notesSyncProgress:s.notesSyncProgress?{...s.notesSyncProgress,status:"completed",progress:100,phase:"done",...i}:null}));break;case"sync:notes:error":t(s=>({notesSyncProgress:s.notesSyncProgress?{...s.notesSyncProgress,status:"error",error:i.error||"Sync failed"}:null}));break;case"sync:code:started":{const s=i;t({codeSyncProgress:{target:"code",status:"syncing",phase:"analyzing",current:null,added:0,updated:0,deleted:0,total:0,processed:0,progress:0,branch:s.branch,isMainBranch:s.isMainBranch,mode:s.mode}});break}case"sync:code:progress":{const s=i;t(o=>({codeSyncProgress:o.codeSyncProgress?{...o.codeSyncProgress,phase:s.phase??o.codeSyncProgress.phase,current:s.current??o.codeSyncProgress.current,progress:s.progress??o.codeSyncProgress.progress,added:s.added??o.codeSyncProgress.added,updated:s.updated??o.codeSyncProgress.updated,deleted:s.deleted??o.codeSyncProgress.deleted,total:s.total??o.codeSyncProgress.total,processed:s.processed??o.codeSyncProgress.processed,branch:s.branch??o.codeSyncProgress.branch,isMainBranch:s.isMainBranch??o.codeSyncProgress.isMainBranch,mode:s.mode??o.codeSyncProgress.mode}:null}));break}case"sync:code:completed":{const s=i;t(o=>({codeSyncProgress:o.codeSyncProgress?{...o.codeSyncProgress,status:"completed",progress:100,phase:"done",added:s.added??o.codeSyncProgress.added,deleted:s.deleted??o.codeSyncProgress.deleted,branch:s.branch??o.codeSyncProgress.branch,isMainBranch:s.isMainBranch??o.codeSyncProgress.isMainBranch,mode:s.mode??o.codeSyncProgress.mode}:null}));break}case"sync:code:error":t(s=>({codeSyncProgress:s.codeSyncProgress?{...s.codeSyncProgress,status:"error",error:i.error||"Sync failed"}:null}));break}}}));async function EO(t){const e=await fetch(t);if(!e.ok){const n=await e.json().catch(()=>({message:"Request failed"}));throw new Error(n.message||`HTTP ${e.status}`)}return e.json()}async function eZ(t,e){const n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:e?JSON.stringify(e):void 0});if(!n.ok){const r=await n.json().catch(()=>({message:"Request failed"}));throw new Error(r.message||`HTTP ${n.status}`)}return n.json()}async function tZ(t){const e=await fetch(t,{method:"DELETE"});if(!e.ok){const n=await e.json().catch(()=>({message:"Request failed"}));throw new Error(n.message||`HTTP ${e.status}`)}return e.json()}const Df=da((t,e)=>({activeTab:"notes",noteFiles:[],codeFiles:[],isLoadingNotes:!1,isLoadingCode:!1,selectedFile:null,selectedFileContent:null,notesHistory:[],notesHistoryIndex:-1,codeHistory:[],codeHistoryIndex:-1,selectedPaths:[],filterQuery:"",isReindexing:!1,reindexingPaths:[],error:null,setActiveTab:n=>{t({activeTab:n}),n==="notes"&&e().noteFiles.length===0?e().fetchNoteFiles():n==="code"&&e().codeFiles.length===0&&e().fetchCodeFiles()},setFilterQuery:n=>{t({filterQuery:n})},fetchNoteFiles:async n=>{t({isLoadingNotes:!0,error:null});try{const r=new URLSearchParams;n&&r.set("folder",n);const i=await EO(`/api/notes/files?${r}`);t({noteFiles:i,isLoadingNotes:!1})}catch(r){t({isLoadingNotes:!1,error:r instanceof Error?r.message:"Failed to fetch notes"})}},fetchCodeFiles:async(n,r)=>{t({isLoadingCode:!0,error:null});try{const i=new URLSearchParams;n&&i.set("folder",n),r&&i.set("language",r);const s=await EO(`/api/code/files?${i}`);t({codeFiles:s,isLoadingCode:!1})}catch(i){t({isLoadingCode:!1,error:i instanceof Error?i.message:"Failed to fetch code files"})}},selectFile:async n=>{if(!n){t({selectedFile:null,selectedFileContent:null});return}t({selectedFile:n,selectedFileContent:null});try{const{activeTab:r}=e(),s=await EO(`${r==="notes"?"/api/notes/files":"/api/code/file"}/${encodeURIComponent(n)}`);t({selectedFileContent:s.content})}catch(r){t({error:r instanceof Error?r.message:"Failed to load file content"})}},navigateToFile:async n=>{const{activeTab:r,notesHistory:i,notesHistoryIndex:s,codeHistory:o,codeHistoryIndex:a}=e(),l=r==="notes"?i:o,c=r==="notes"?s:a,u=[...l.slice(0,c+1),n],f=u.length-1;t(r==="notes"?{notesHistory:u,notesHistoryIndex:f}:{codeHistory:u,codeHistoryIndex:f}),await e().selectFile(n)},clearSelection:()=>{t({selectedFile:null,selectedFileContent:null})},refreshFiles:async()=>{const{activeTab:n,fetchNoteFiles:r,fetchCodeFiles:i}=e();n==="notes"?await r():await i()},canGoBack:()=>{const{activeTab:n,notesHistoryIndex:r,codeHistoryIndex:i}=e();return(n==="notes"?r:i)>0},canGoForward:()=>{const{activeTab:n,notesHistory:r,notesHistoryIndex:i,codeHistory:s,codeHistoryIndex:o}=e();return(n==="notes"?i:o)<(n==="notes"?r:s).length-1},goBack:async()=>{const{activeTab:n,notesHistory:r,notesHistoryIndex:i,codeHistory:s,codeHistoryIndex:o,selectFile:a}=e(),l=n==="notes"?r:s,c=n==="notes"?i:o;if(c<=0)return;const u=c-1,f=l[u];t(n==="notes"?{notesHistoryIndex:u}:{codeHistoryIndex:u}),await a(f)},goForward:async()=>{const{activeTab:n,notesHistory:r,notesHistoryIndex:i,codeHistory:s,codeHistoryIndex:o,selectFile:a}=e(),l=n==="notes"?r:s,c=n==="notes"?i:o;if(c>=l.length-1)return;const u=c+1,f=l[u];t(n==="notes"?{notesHistoryIndex:u}:{codeHistoryIndex:u}),await a(f)},toggleSelection:n=>{t(r=>({selectedPaths:r.selectedPaths.includes(n)?r.selectedPaths.filter(s=>s!==n):[...r.selectedPaths,n]}))},selectRange:(n,r)=>{const{activeTab:i,noteFiles:s,codeFiles:o,filterQuery:a}=e(),l=i==="notes"?s:o,u=(a?l.filter(v=>v.name.toLowerCase().includes(a.toLowerCase())||v.relativePath.toLowerCase().includes(a.toLowerCase())):l).map(v=>v.relativePath),f=u.indexOf(n),d=u.indexOf(r);if(f===-1||d===-1)return;const h=Math.min(f,d),g=Math.max(f,d),m=u.slice(h,g+1);t({selectedPaths:m})},clearMultiSelection:()=>{t({selectedPaths:[]})},selectAll:()=>{const{activeTab:n,noteFiles:r,codeFiles:i,filterQuery:s}=e(),o=n==="notes"?r:i,a=s?o.filter(l=>l.name.toLowerCase().includes(s.toLowerCase())||l.relativePath.toLowerCase().includes(s.toLowerCase())):o;t({selectedPaths:a.map(l=>l.relativePath)})},reindexFiles:async n=>{if(n.length===0)return;const{activeTab:r,refreshFiles:i}=e();t({isReindexing:!0,reindexingPaths:n,error:null});try{await eZ(r==="notes"?"/api/notes/reindex":"/api/code/reindex",{paths:n}),await i(),t({isReindexing:!1,reindexingPaths:[],selectedPaths:[]})}catch(s){t({isReindexing:!1,reindexingPaths:[],error:s instanceof Error?s.message:"Reindex failed"})}},removeFiles:async n=>{if(n.length===0)return;const{activeTab:r,refreshFiles:i}=e();t({error:null});try{const s=r==="notes"?"/api/notes/files":"/api/code/files";for(const o of n)await tZ(`${s}/${encodeURIComponent(o)}`);await i(),t({selectedPaths:[]})}catch(s){t({error:s instanceof Error?s.message:"Remove failed"})}}})),nA="rag-project-slugs";function nZ(t){const e=t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,20),n=Math.random().toString(36).slice(2,6);return`${e}-${n}`}function rA(){try{const t=localStorage.getItem(nA);return t?JSON.parse(t):{}}catch{return{}}}function rZ(t){localStorage.setItem(nA,JSON.stringify(t))}function Sp(t,e){const n=rA();if(n[t])return n[t];const r=nZ(e);return n[t]=r,rZ(n),r}function iZ(t){const e=rA();for(const[n,r]of Object.entries(e))if(r===t)return n;return null}function sZ(){const t=ec(),{projectSlug:e}=kF(),[n]=mX(),{currentProject:r,openProject:i,closeProject:s,recentProjects:o}=ha(),{activeTab:a,selectedFile:l,setActiveTab:c,navigateToFile:u}=Df(),f=O.useRef(!0),d=O.useRef(!1),h=O.useRef(!e);O.useEffect(()=>{if(!f.current)return;f.current=!1,(async()=>{if(!e){h.current=!0;return}h.current=!1;const v=iZ(e);if(v){if(d.current=!0,!r||r.path!==v)try{await i(v)}catch{t("/",{replace:!0});return}const y=n.get("tab");y&&(y==="notes"||y==="code")&&c(y);const x=n.get("file");x&&setTimeout(()=>{u(x)},100),d.current=!1}else{const y=o.find(x=>x.name.toLowerCase().replace(/[^a-z0-9]+/g,"-")===e.split("-").slice(0,-1).join("-"));if(y){d.current=!0;try{await i(y.path)}catch{t("/",{replace:!0})}d.current=!1}else t("/",{replace:!0})}})()},[e,n,r,i,s,o,c,u,t]),O.useEffect(()=>{h.current=!e},[e]);const g=O.useCallback(()=>{if(!d.current&&!(h.current&&!e)&&r){const m=Sp(r.path,r.name),v=new URLSearchParams;a!=="notes"&&v.set("tab",a),l&&v.set("file",l);const y=v.toString(),x=`/${m}${y?`?${y}`:""}`;t(x,{replace:!0})}},[r,a,l,t,e]);return O.useEffect(()=>{g()},[g]),{projectSlug:e,urlFile:n.get("file"),urlTab:n.get("tab")}}/**
|
|
69
|
+
* @license lucide-react v0.469.0 - ISC
|
|
70
|
+
*
|
|
71
|
+
* This source code is licensed under the ISC license.
|
|
72
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
+
*/const oZ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),iA=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/**
|
|
74
|
+
* @license lucide-react v0.469.0 - ISC
|
|
75
|
+
*
|
|
76
|
+
* This source code is licensed under the ISC license.
|
|
77
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
+
*/var aZ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
79
|
+
* @license lucide-react v0.469.0 - ISC
|
|
80
|
+
*
|
|
81
|
+
* This source code is licensed under the ISC license.
|
|
82
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
+
*/const lZ=O.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>O.createElement("svg",{ref:l,...aZ,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:iA("lucide",i),...a},[...o.map(([c,u])=>O.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
|
|
84
|
+
* @license lucide-react v0.469.0 - ISC
|
|
85
|
+
*
|
|
86
|
+
* This source code is licensed under the ISC license.
|
|
87
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
+
*/const fe=(t,e)=>{const n=O.forwardRef(({className:r,...i},s)=>O.createElement(lZ,{ref:s,iconNode:e,className:iA(`lucide-${oZ(t)}`,r),...i}));return n.displayName=`${t}`,n};/**
|
|
89
|
+
* @license lucide-react v0.469.0 - ISC
|
|
90
|
+
*
|
|
91
|
+
* This source code is licensed under the ISC license.
|
|
92
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
+
*/const cZ=fe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
94
|
+
* @license lucide-react v0.469.0 - ISC
|
|
95
|
+
*
|
|
96
|
+
* This source code is licensed under the ISC license.
|
|
97
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
+
*/const Hb=fe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
99
|
+
* @license lucide-react v0.469.0 - ISC
|
|
100
|
+
*
|
|
101
|
+
* This source code is licensed under the ISC license.
|
|
102
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
+
*/const uZ=fe("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
|
|
104
|
+
* @license lucide-react v0.469.0 - ISC
|
|
105
|
+
*
|
|
106
|
+
* This source code is licensed under the ISC license.
|
|
107
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
+
*/const fZ=fe("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
|
|
109
|
+
* @license lucide-react v0.469.0 - ISC
|
|
110
|
+
*
|
|
111
|
+
* This source code is licensed under the ISC license.
|
|
112
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
+
*/const dZ=fe("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);/**
|
|
114
|
+
* @license lucide-react v0.469.0 - ISC
|
|
115
|
+
*
|
|
116
|
+
* This source code is licensed under the ISC license.
|
|
117
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
+
*/const sA=fe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
119
|
+
* @license lucide-react v0.469.0 - ISC
|
|
120
|
+
*
|
|
121
|
+
* This source code is licensed under the ISC license.
|
|
122
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
+
*/const pa=fe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
124
|
+
* @license lucide-react v0.469.0 - ISC
|
|
125
|
+
*
|
|
126
|
+
* This source code is licensed under the ISC license.
|
|
127
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
+
*/const Fm=fe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
129
|
+
* @license lucide-react v0.469.0 - ISC
|
|
130
|
+
*
|
|
131
|
+
* This source code is licensed under the ISC license.
|
|
132
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
+
*/const hZ=fe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
134
|
+
* @license lucide-react v0.469.0 - ISC
|
|
135
|
+
*
|
|
136
|
+
* This source code is licensed under the ISC license.
|
|
137
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
+
*/const Or=fe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
139
|
+
* @license lucide-react v0.469.0 - ISC
|
|
140
|
+
*
|
|
141
|
+
* This source code is licensed under the ISC license.
|
|
142
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
+
*/const Ki=fe("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
144
|
+
* @license lucide-react v0.469.0 - ISC
|
|
145
|
+
*
|
|
146
|
+
* This source code is licensed under the ISC license.
|
|
147
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
+
*/const du=fe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
149
|
+
* @license lucide-react v0.469.0 - ISC
|
|
150
|
+
*
|
|
151
|
+
* This source code is licensed under the ISC license.
|
|
152
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
+
*/const Lf=fe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
154
|
+
* @license lucide-react v0.469.0 - ISC
|
|
155
|
+
*
|
|
156
|
+
* This source code is licensed under the ISC license.
|
|
157
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
+
*/const lx=fe("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
|
|
159
|
+
* @license lucide-react v0.469.0 - ISC
|
|
160
|
+
*
|
|
161
|
+
* This source code is licensed under the ISC license.
|
|
162
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
+
*/const pZ=fe("CodeXml",[["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"}]]);/**
|
|
164
|
+
* @license lucide-react v0.469.0 - ISC
|
|
165
|
+
*
|
|
166
|
+
* This source code is licensed under the ISC license.
|
|
167
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
+
*/const sn=fe("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
169
|
+
* @license lucide-react v0.469.0 - ISC
|
|
170
|
+
*
|
|
171
|
+
* This source code is licensed under the ISC license.
|
|
172
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
+
*/const oA=fe("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
174
|
+
* @license lucide-react v0.469.0 - ISC
|
|
175
|
+
*
|
|
176
|
+
* This source code is licensed under the ISC license.
|
|
177
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
+
*/const aA=fe("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
179
|
+
* @license lucide-react v0.469.0 - ISC
|
|
180
|
+
*
|
|
181
|
+
* This source code is licensed under the ISC license.
|
|
182
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
+
*/const mZ=fe("Diamond",[["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z",key:"1f1r0c"}]]);/**
|
|
184
|
+
* @license lucide-react v0.469.0 - ISC
|
|
185
|
+
*
|
|
186
|
+
* This source code is licensed under the ISC license.
|
|
187
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
+
*/const gZ=fe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
189
|
+
* @license lucide-react v0.469.0 - ISC
|
|
190
|
+
*
|
|
191
|
+
* This source code is licensed under the ISC license.
|
|
192
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
+
*/const kp=fe("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
194
|
+
* @license lucide-react v0.469.0 - ISC
|
|
195
|
+
*
|
|
196
|
+
* This source code is licensed under the ISC license.
|
|
197
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
+
*/const Cp=fe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
199
|
+
* @license lucide-react v0.469.0 - ISC
|
|
200
|
+
*
|
|
201
|
+
* This source code is licensed under the ISC license.
|
|
202
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
+
*/const OZ=fe("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);/**
|
|
204
|
+
* @license lucide-react v0.469.0 - ISC
|
|
205
|
+
*
|
|
206
|
+
* This source code is licensed under the ISC license.
|
|
207
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
+
*/const Sn=fe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
209
|
+
* @license lucide-react v0.469.0 - ISC
|
|
210
|
+
*
|
|
211
|
+
* This source code is licensed under the ISC license.
|
|
212
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
213
|
+
*/const lA=fe("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
214
|
+
* @license lucide-react v0.469.0 - ISC
|
|
215
|
+
*
|
|
216
|
+
* This source code is licensed under the ISC license.
|
|
217
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
+
*/const Gb=fe("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
219
|
+
* @license lucide-react v0.469.0 - ISC
|
|
220
|
+
*
|
|
221
|
+
* This source code is licensed under the ISC license.
|
|
222
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
223
|
+
*/const Eh=fe("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
224
|
+
* @license lucide-react v0.469.0 - ISC
|
|
225
|
+
*
|
|
226
|
+
* This source code is licensed under the ISC license.
|
|
227
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
228
|
+
*/const yZ=fe("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
|
|
229
|
+
* @license lucide-react v0.469.0 - ISC
|
|
230
|
+
*
|
|
231
|
+
* This source code is licensed under the ISC license.
|
|
232
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
233
|
+
*/const kl=fe("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
234
|
+
* @license lucide-react v0.469.0 - ISC
|
|
235
|
+
*
|
|
236
|
+
* This source code is licensed under the ISC license.
|
|
237
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
238
|
+
*/const Wu=fe("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
239
|
+
* @license lucide-react v0.469.0 - ISC
|
|
240
|
+
*
|
|
241
|
+
* This source code is licensed under the ISC license.
|
|
242
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
243
|
+
*/const cA=fe("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
|
|
244
|
+
* @license lucide-react v0.469.0 - ISC
|
|
245
|
+
*
|
|
246
|
+
* This source code is licensed under the ISC license.
|
|
247
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
248
|
+
*/const vZ=fe("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
|
|
249
|
+
* @license lucide-react v0.469.0 - ISC
|
|
250
|
+
*
|
|
251
|
+
* This source code is licensed under the ISC license.
|
|
252
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
253
|
+
*/const Kb=fe("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
254
|
+
* @license lucide-react v0.469.0 - ISC
|
|
255
|
+
*
|
|
256
|
+
* This source code is licensed under the ISC license.
|
|
257
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
258
|
+
*/const xZ=fe("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
|
|
259
|
+
* @license lucide-react v0.469.0 - ISC
|
|
260
|
+
*
|
|
261
|
+
* This source code is licensed under the ISC license.
|
|
262
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
263
|
+
*/const bZ=fe("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/**
|
|
264
|
+
* @license lucide-react v0.469.0 - ISC
|
|
265
|
+
*
|
|
266
|
+
* This source code is licensed under the ISC license.
|
|
267
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
268
|
+
*/const wZ=fe("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
269
|
+
* @license lucide-react v0.469.0 - ISC
|
|
270
|
+
*
|
|
271
|
+
* This source code is licensed under the ISC license.
|
|
272
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
273
|
+
*/const Un=fe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
274
|
+
* @license lucide-react v0.469.0 - ISC
|
|
275
|
+
*
|
|
276
|
+
* This source code is licensed under the ISC license.
|
|
277
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
278
|
+
*/const Yc=fe("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
279
|
+
* @license lucide-react v0.469.0 - ISC
|
|
280
|
+
*
|
|
281
|
+
* This source code is licensed under the ISC license.
|
|
282
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
283
|
+
*/const SZ=fe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
284
|
+
* @license lucide-react v0.469.0 - ISC
|
|
285
|
+
*
|
|
286
|
+
* This source code is licensed under the ISC license.
|
|
287
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
288
|
+
*/const kZ=fe("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
|
|
289
|
+
* @license lucide-react v0.469.0 - ISC
|
|
290
|
+
*
|
|
291
|
+
* This source code is licensed under the ISC license.
|
|
292
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
293
|
+
*/const Pp=fe("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
|
|
294
|
+
* @license lucide-react v0.469.0 - ISC
|
|
295
|
+
*
|
|
296
|
+
* This source code is licensed under the ISC license.
|
|
297
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
298
|
+
*/const CZ=fe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
299
|
+
* @license lucide-react v0.469.0 - ISC
|
|
300
|
+
*
|
|
301
|
+
* This source code is licensed under the ISC license.
|
|
302
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
303
|
+
*/const Jb=fe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
304
|
+
* @license lucide-react v0.469.0 - ISC
|
|
305
|
+
*
|
|
306
|
+
* This source code is licensed under the ISC license.
|
|
307
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
308
|
+
*/const ui=fe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
309
|
+
* @license lucide-react v0.469.0 - ISC
|
|
310
|
+
*
|
|
311
|
+
* This source code is licensed under the ISC license.
|
|
312
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
313
|
+
*/const PZ=fe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
314
|
+
* @license lucide-react v0.469.0 - ISC
|
|
315
|
+
*
|
|
316
|
+
* This source code is licensed under the ISC license.
|
|
317
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
318
|
+
*/const ew=fe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
319
|
+
* @license lucide-react v0.469.0 - ISC
|
|
320
|
+
*
|
|
321
|
+
* This source code is licensed under the ISC license.
|
|
322
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
323
|
+
*/const Kk=fe("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
|
324
|
+
* @license lucide-react v0.469.0 - ISC
|
|
325
|
+
*
|
|
326
|
+
* This source code is licensed under the ISC license.
|
|
327
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
328
|
+
*/const uA=fe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
329
|
+
* @license lucide-react v0.469.0 - ISC
|
|
330
|
+
*
|
|
331
|
+
* This source code is licensed under the ISC license.
|
|
332
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
333
|
+
*/const TZ=fe("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
334
|
+
* @license lucide-react v0.469.0 - ISC
|
|
335
|
+
*
|
|
336
|
+
* This source code is licensed under the ISC license.
|
|
337
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
338
|
+
*/const EZ=fe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
339
|
+
* @license lucide-react v0.469.0 - ISC
|
|
340
|
+
*
|
|
341
|
+
* This source code is licensed under the ISC license.
|
|
342
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
343
|
+
*/const RZ=fe("Strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);/**
|
|
344
|
+
* @license lucide-react v0.469.0 - ISC
|
|
345
|
+
*
|
|
346
|
+
* This source code is licensed under the ISC license.
|
|
347
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
348
|
+
*/const _Z=fe("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"}]]);/**
|
|
349
|
+
* @license lucide-react v0.469.0 - ISC
|
|
350
|
+
*
|
|
351
|
+
* This source code is licensed under the ISC license.
|
|
352
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
353
|
+
*/const tw=fe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
354
|
+
* @license lucide-react v0.469.0 - ISC
|
|
355
|
+
*
|
|
356
|
+
* This source code is licensed under the ISC license.
|
|
357
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
358
|
+
*/const fA=fe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
359
|
+
* @license lucide-react v0.469.0 - ISC
|
|
360
|
+
*
|
|
361
|
+
* This source code is licensed under the ISC license.
|
|
362
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
363
|
+
*/const $Z=fe("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/**
|
|
364
|
+
* @license lucide-react v0.469.0 - ISC
|
|
365
|
+
*
|
|
366
|
+
* This source code is licensed under the ISC license.
|
|
367
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
368
|
+
*/const dA=fe("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
369
|
+
* @license lucide-react v0.469.0 - ISC
|
|
370
|
+
*
|
|
371
|
+
* This source code is licensed under the ISC license.
|
|
372
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
373
|
+
*/const AZ=fe("Variable",[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]]);/**
|
|
374
|
+
* @license lucide-react v0.469.0 - ISC
|
|
375
|
+
*
|
|
376
|
+
* This source code is licensed under the ISC license.
|
|
377
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
378
|
+
*/const QZ=fe("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
379
|
+
* @license lucide-react v0.469.0 - ISC
|
|
380
|
+
*
|
|
381
|
+
* This source code is licensed under the ISC license.
|
|
382
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
383
|
+
*/const IZ=fe("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
|
|
384
|
+
* @license lucide-react v0.469.0 - ISC
|
|
385
|
+
*
|
|
386
|
+
* This source code is licensed under the ISC license.
|
|
387
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
388
|
+
*/const zf=fe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Jk(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function kn(...t){return e=>{let n=!1;const r=t.map(i=>{const s=Jk(i,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Jk(t[i],null)}}}}function Pe(...t){return O.useCallback(kn(...t),t)}var NZ=Symbol.for("react.lazy"),Tp=eb[" use ".trim().toString()];function jZ(t){return typeof t=="object"&&t!==null&&"then"in t}function hA(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===NZ&&"_payload"in t&&jZ(t._payload)}function Xm(t){const e=DZ(t),n=O.forwardRef((r,i)=>{let{children:s,...o}=r;hA(s)&&typeof Tp=="function"&&(s=Tp(s._payload));const a=O.Children.toArray(s),l=a.find(zZ);if(l){const c=l.props.children,u=a.map(f=>f===l?O.Children.count(c)>1?O.Children.only(null):O.isValidElement(c)?c.props.children:null:f);return p.jsx(e,{...o,ref:i,children:O.isValidElement(c)?O.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}var MZ=Xm("Slot");function DZ(t){const e=O.forwardRef((n,r)=>{let{children:i,...s}=n;if(hA(i)&&typeof Tp=="function"&&(i=Tp(i._payload)),O.isValidElement(i)){const o=VZ(i),a=BZ(s,i.props);return i.type!==O.Fragment&&(a.ref=r?kn(r,o):o),O.cloneElement(i,a)}return O.Children.count(i)>1?O.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var LZ=Symbol("radix.slottable");function zZ(t){return O.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===LZ}function BZ(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function VZ(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function pA(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=pA(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function mA(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=pA(t))&&(r&&(r+=" "),r+=e);return r}const eC=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,tC=mA,nw=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return tC(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=e,o=Object.keys(i).map(c=>{const u=n==null?void 0:n[c],f=s==null?void 0:s[c];if(u===null)return null;const d=eC(u)||eC(f);return i[c][d]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,d]=u;return d===void 0||(c[f]=d),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every(g=>{let[m,v]=g;return Array.isArray(v)?v.includes({...s,...a}[m]):{...s,...a}[m]===v})?[...c,f,d]:c},[]);return tC(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},rw="-",FZ=t=>{const e=ZZ(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(rw);return a[0]===""&&a.length!==1&&a.shift(),gA(a,e)||XZ(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},gA=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),i=r?gA(t.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=t.join(rw);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},nC=/^\[(.+)\]$/,XZ=t=>{if(nC.test(t)){const e=nC.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},ZZ=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return qZ(Object.entries(t.classGroups),n).forEach(([s,o])=>{cx(o,r,s,e)}),r},cx=(t,e,n,r)=>{t.forEach(i=>{if(typeof i=="string"){const s=i===""?e:rC(e,i);s.classGroupId=n;return}if(typeof i=="function"){if(WZ(i)){cx(i(r),e,n,r);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{cx(o,rC(e,s),n,r)})})},rC=(t,e)=>{let n=t;return e.split(rw).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},WZ=t=>t.isThemeGetter,qZ=(t,e)=>e?t.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[e+o,a])):s);return[n,i]}):t,YZ=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),e++,e>t&&(e=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},OA="!",UZ=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,i=e[0],s=e.length,o=a=>{const l=[];let c=0,u=0,f;for(let v=0;v<a.length;v++){let y=a[v];if(c===0){if(y===i&&(r||a.slice(v,v+s)===e)){l.push(a.slice(u,v)),u=v+s;continue}if(y==="/"){f=v;continue}}y==="["?c++:y==="]"&&c--}const d=l.length===0?a:a.substring(u),h=d.startsWith(OA),g=h?d.substring(1):d,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},HZ=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},GZ=t=>({cache:YZ(t.cacheSize),parseClassName:UZ(t),...FZ(t)}),KZ=/\s+/,JZ=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],o=t.trim().split(KZ);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=n(c);let g=!!h,m=r(g?d.substring(0,h):d);if(!m){if(!g){a=c+(a.length>0?" "+a:a);continue}if(m=r(d),!m){a=c+(a.length>0?" "+a:a);continue}g=!1}const v=HZ(u).join(":"),y=f?v+OA:v,x=y+m;if(s.includes(x))continue;s.push(x);const b=i(m,g);for(let k=0;k<b.length;++k){const w=b[k];s.push(y+w)}a=c+(a.length>0?" "+a:a)}return a};function eW(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=yA(e))&&(r&&(r+=" "),r+=n);return r}const yA=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=yA(t[r]))&&(n&&(n+=" "),n+=e);return n};function tW(t,...e){let n,r,i,s=o;function o(l){const c=e.reduce((u,f)=>f(u),t());return n=GZ(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=JZ(l,n);return i(l,u),u}return function(){return s(eW.apply(null,arguments))}}const et=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},vA=/^\[(?:([a-z-]+):)?(.+)\]$/i,nW=/^\d+\/\d+$/,rW=new Set(["px","full","screen"]),iW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sW=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,oW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,aW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ii=t=>rl(t)||rW.has(t)||nW.test(t),hs=t=>tc(t,"length",gW),rl=t=>!!t&&!Number.isNaN(Number(t)),RO=t=>tc(t,"number",rl),Rc=t=>!!t&&Number.isInteger(Number(t)),cW=t=>t.endsWith("%")&&rl(t.slice(0,-1)),ke=t=>vA.test(t),ps=t=>iW.test(t),uW=new Set(["length","size","percentage"]),fW=t=>tc(t,uW,xA),dW=t=>tc(t,"position",xA),hW=new Set(["image","url"]),pW=t=>tc(t,hW,yW),mW=t=>tc(t,"",OW),_c=()=>!0,tc=(t,e,n)=>{const r=vA.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},gW=t=>sW.test(t)&&!oW.test(t),xA=()=>!1,OW=t=>aW.test(t),yW=t=>lW.test(t),vW=()=>{const t=et("colors"),e=et("spacing"),n=et("blur"),r=et("brightness"),i=et("borderColor"),s=et("borderRadius"),o=et("borderSpacing"),a=et("borderWidth"),l=et("contrast"),c=et("grayscale"),u=et("hueRotate"),f=et("invert"),d=et("gap"),h=et("gradientColorStops"),g=et("gradientColorStopPositions"),m=et("inset"),v=et("margin"),y=et("opacity"),x=et("padding"),b=et("saturate"),k=et("scale"),w=et("sepia"),S=et("skew"),C=et("space"),_=et("translate"),I=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ke,e],A=()=>[ke,e],L=()=>["",Ii,hs],z=()=>["auto",rl,ke],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",ke],P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[rl,ke];return{cacheSize:500,separator:":",theme:{colors:[_c],spacing:[Ii,hs],blur:["none","",ps,ke],brightness:M(),borderColor:[t],borderRadius:["none","","full",ps,ke],borderSpacing:A(),borderWidth:L(),contrast:M(),grayscale:Q(),hueRotate:M(),invert:Q(),gap:A(),gradientColorStops:[t],gradientColorStopPositions:[cW,hs],inset:j(),margin:j(),opacity:M(),padding:A(),saturate:M(),scale:M(),sepia:Q(),skew:M(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",ke]}],container:["container"],columns:[{columns:[ps]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...X(),ke]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Rc,ke]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ke]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",Rc,ke]}],"grid-cols":[{"grid-cols":[_c]}],"col-start-end":[{col:["auto",{span:["full",Rc,ke]},ke]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[_c]}],"row-start-end":[{row:["auto",{span:[Rc,ke]},ke]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ke]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ke]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ke,e]}],"min-w":[{"min-w":[ke,e,"min","max","fit"]}],"max-w":[{"max-w":[ke,e,"none","full","min","max","fit","prose",{screen:[ps]},ps]}],h:[{h:[ke,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ke,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ke,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ke,e,"auto","min","max","fit"]}],"font-size":[{text:["base",ps,hs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",RO]}],"font-family":[{font:[_c]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ke]}],"line-clamp":[{"line-clamp":["none",rl,RO]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ii,ke]}],"list-image":[{"list-image":["none",ke]}],"list-style-type":[{list:["none","disc","decimal",ke]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ii,hs]}],"underline-offset":[{"underline-offset":["auto",Ii,ke]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),dW]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",fW]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},pW]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:W()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[Ii,ke]}],"outline-w":[{outline:[Ii,hs]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Ii,hs]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",ps,mW]}],"shadow-color":[{shadow:[_c]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ps,ke]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ke]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",ke]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",ke]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[Rc,ke]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ke]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Ii,hs,RO]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},xW=tW(vW);function le(...t){return xW(mA(t))}function bW(t){const e=new Date,n=new Date(t),r=e.getTime()-n.getTime(),i=Math.floor(r/1e3),s=Math.floor(i/60),o=Math.floor(s/60),a=Math.floor(o/24);return i<60?"just now":s<60?`${s}m ago`:o<24?`${o}h ago`:a<7?`${a}d ago`:n.toLocaleDateString()}function wW(t,e=40){if(!t)return"";if(t.length<=e)return t;const n=t.split("/");if(n.length<=2)return t;const r=n[0],i=n.slice(-2).join("/");return r.length+i.length+4>e?`.../${i}`:`${r}/.../${i}`}function SW(t,e){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>t(...r),e)}}const kW=nw("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Se=O.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...i},s)=>{const o=r?MZ:"button";return p.jsx(o,{className:le(kW({variant:e,size:n,className:t})),ref:s,...i})});Se.displayName="Button";function ne(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function CW(t,e){const n=O.createContext(e),r=s=>{const{children:o,...a}=s,l=O.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:l,children:o})};r.displayName=t+"Provider";function i(s){const o=O.useContext(n);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${t}\``)}return[r,i]}function Cn(t,e=[]){let n=[];function r(s,o){const a=O.createContext(o),l=n.length;n=[...n,o];const c=f=>{var y;const{scope:d,children:h,...g}=f,m=((y=d==null?void 0:d[t])==null?void 0:y[l])||a,v=O.useMemo(()=>g,Object.values(g));return p.jsx(m.Provider,{value:v,children:h})};c.displayName=s+"Provider";function u(f,d){var m;const h=((m=d==null?void 0:d[t])==null?void 0:m[l])||a,g=O.useContext(h);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=n.map(o=>O.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return O.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,PW(i,...e)]}function PW(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return O.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function TW(t){const e=EW(t),n=O.forwardRef((r,i)=>{const{children:s,...o}=r,a=O.Children.toArray(s),l=a.find(_W);if(l){const c=l.props.children,u=a.map(f=>f===l?O.Children.count(c)>1?O.Children.only(null):O.isValidElement(c)?c.props.children:null:f);return p.jsx(e,{...o,ref:i,children:O.isValidElement(c)?O.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function EW(t){const e=O.forwardRef((n,r)=>{const{children:i,...s}=n;if(O.isValidElement(i)){const o=AW(i),a=$W(s,i.props);return i.type!==O.Fragment&&(a.ref=r?kn(r,o):o),O.cloneElement(i,a)}return O.Children.count(i)>1?O.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var RW=Symbol("radix.slottable");function _W(t){return O.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===RW}function $W(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function AW(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var QW=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ue=QW.reduce((t,e)=>{const n=TW(`Primitive.${e}`),r=O.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function bA(t,e){t&&Gl.flushSync(()=>t.dispatchEvent(e))}function Wt(t){const e=O.useRef(t);return O.useEffect(()=>{e.current=t}),O.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function IW(t,e=globalThis==null?void 0:globalThis.document){const n=Wt(t);O.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var NW="DismissableLayer",ux="dismissableLayer.update",jW="dismissableLayer.pointerDownOutside",MW="dismissableLayer.focusOutside",iC,wA=O.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nc=O.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=t,c=O.useContext(wA),[u,f]=O.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=O.useState({}),g=Pe(e,C=>f(C)),m=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),x=u?m.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,k=x>=y,w=zW(C=>{const _=C.target,I=[...c.branches].some(E=>E.contains(_));!k||I||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},d),S=BW(C=>{const _=C.target;[...c.branches].some(E=>E.contains(_))||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},d);return IW(C=>{x===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},d),O.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(iC=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),sC(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=iC)}},[u,d,n,c]),O.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),sC())},[u,c]),O.useEffect(()=>{const C=()=>h({});return document.addEventListener(ux,C),()=>document.removeEventListener(ux,C)},[]),p.jsx(ue.div,{...l,ref:g,style:{pointerEvents:b?k?"auto":"none":void 0,...t.style},onFocusCapture:ne(t.onFocusCapture,S.onFocusCapture),onBlurCapture:ne(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:ne(t.onPointerDownCapture,w.onPointerDownCapture)})});nc.displayName=NW;var DW="DismissableLayerBranch",LW=O.forwardRef((t,e)=>{const n=O.useContext(wA),r=O.useRef(null),i=Pe(e,r);return O.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(ue.div,{...t,ref:i})});LW.displayName=DW;function zW(t,e=globalThis==null?void 0:globalThis.document){const n=Wt(t),r=O.useRef(!1),i=O.useRef(()=>{});return O.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){SA(jW,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function BW(t,e=globalThis==null?void 0:globalThis.document){const n=Wt(t),r=O.useRef(!1);return O.useEffect(()=>{const i=s=>{s.target&&!r.current&&SA(MW,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function sC(){const t=new CustomEvent(ux);document.dispatchEvent(t)}function SA(t,e,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?bA(i,s):i.dispatchEvent(s)}var _t=globalThis!=null&&globalThis.document?O.useLayoutEffect:()=>{},VW=eb[" useId ".trim().toString()]||(()=>{}),FW=0;function Yt(t){const[e,n]=O.useState(VW());return _t(()=>{n(r=>r??String(FW++))},[t]),e?`radix-${e}`:""}const XW=["top","right","bottom","left"],Zs=Math.min,Dn=Math.max,Ep=Math.round,Pd=Math.floor,wi=t=>({x:t,y:t}),ZW={left:"right",right:"left",bottom:"top",top:"bottom"},WW={start:"end",end:"start"};function fx(t,e,n){return Dn(t,Zs(e,n))}function Ji(t,e){return typeof t=="function"?t(e):t}function es(t){return t.split("-")[0]}function rc(t){return t.split("-")[1]}function iw(t){return t==="x"?"y":"x"}function sw(t){return t==="y"?"height":"width"}const qW=new Set(["top","bottom"]);function mi(t){return qW.has(es(t))?"y":"x"}function ow(t){return iw(mi(t))}function YW(t,e,n){n===void 0&&(n=!1);const r=rc(t),i=ow(t),s=sw(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Rp(o)),[o,Rp(o)]}function UW(t){const e=Rp(t);return[dx(t),e,dx(e)]}function dx(t){return t.replace(/start|end/g,e=>WW[e])}const oC=["left","right"],aC=["right","left"],HW=["top","bottom"],GW=["bottom","top"];function KW(t,e,n){switch(t){case"top":case"bottom":return n?e?aC:oC:e?oC:aC;case"left":case"right":return e?HW:GW;default:return[]}}function JW(t,e,n,r){const i=rc(t);let s=KW(es(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(dx)))),s}function Rp(t){return t.replace(/left|right|bottom|top/g,e=>ZW[e])}function e6(t){return{top:0,right:0,bottom:0,left:0,...t}}function kA(t){return typeof t!="number"?e6(t):{top:t,right:t,bottom:t,left:t}}function _p(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function lC(t,e,n){let{reference:r,floating:i}=t;const s=mi(e),o=ow(e),a=sw(o),l=es(e),c=s==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,d=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-i.width,y:f};break;default:h={x:r.x,y:r.y}}switch(rc(e)){case"start":h[o]-=d*(n&&c?-1:1);break;case"end":h[o]+=d*(n&&c?-1:1);break}return h}async function t6(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Ji(e,t),g=kA(h),v=a[d?f==="floating"?"reference":"floating":f],y=_p(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),k=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},w=_p(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:b,strategy:l}):x);return{top:(y.top-w.top+g.top)/k.y,bottom:(w.bottom-y.bottom+g.bottom)/k.y,left:(y.left-w.left+g.left)/k.x,right:(w.right-y.right+g.right)/k.x}}const n6=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=lC(c,r,l),d=r,h={},g=0;for(let v=0;v<a.length;v++){var m;const{name:y,fn:x}=a[v],{x:b,y:k,data:w,reset:S}=await x({x:u,y:f,initialPlacement:r,placement:d,strategy:i,middlewareData:h,rects:c,platform:{...o,detectOverflow:(m=o.detectOverflow)!=null?m:t6},elements:{reference:t,floating:e}});u=b??u,f=k??f,h={...h,[y]:{...h[y],...w}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:u,y:f}=lC(c,d,l)),v=-1)}return{x:u,y:f,placement:d,strategy:i,middlewareData:h}},r6=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=Ji(t,e)||{};if(c==null)return{};const f=kA(u),d={x:n,y:r},h=ow(i),g=sw(h),m=await o.getDimensions(c),v=h==="y",y=v?"top":"left",x=v?"bottom":"right",b=v?"clientHeight":"clientWidth",k=s.reference[g]+s.reference[h]-d[h]-s.floating[g],w=d[h]-s.reference[h],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let C=S?S[b]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=a.floating[b]||s.floating[g]);const _=k/2-w/2,I=C/2-m[g]/2-1,E=Zs(f[y],I),j=Zs(f[x],I),A=E,L=C-m[g]-j,z=C/2-m[g]/2+_,X=fx(A,z,L),W=!l.arrow&&rc(i)!=null&&z!==X&&s.reference[g]/2-(z<A?E:j)-m[g]/2<0,F=W?z<A?z-A:z-L:0;return{[h]:d[h]+F,data:{[h]:X,centerOffset:z-X-F,...W&&{alignmentOffset:F}},reset:W}}}),i6=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=Ji(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=es(i),x=mi(a),b=es(a)===a,k=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=d||(b||!m?[Rp(a)]:UW(a)),S=g!=="none";!d&&S&&w.push(...JW(a,m,g,k));const C=[a,...w],_=await l.detectOverflow(e,v),I=[];let E=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(_[y]),f){const z=YW(i,o,k);I.push(_[z[0]],_[z[1]])}if(E=[...E,{placement:i,overflows:I}],!I.every(z=>z<=0)){var j,A;const z=(((j=s.flip)==null?void 0:j.index)||0)+1,X=C[z];if(X&&(!(f==="alignment"?x!==mi(X):!1)||E.every(N=>mi(N.placement)===x?N.overflows[0]>0:!0)))return{data:{index:z,overflows:E},reset:{placement:X}};let W=(A=E.filter(F=>F.overflows[0]<=0).sort((F,N)=>F.overflows[1]-N.overflows[1])[0])==null?void 0:A.placement;if(!W)switch(h){case"bestFit":{var L;const F=(L=E.filter(N=>{if(S){const Q=mi(N.placement);return Q===x||Q==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(Q=>Q>0).reduce((Q,P)=>Q+P,0)]).sort((N,Q)=>N[1]-Q[1])[0])==null?void 0:L[0];F&&(W=F);break}case"initialPlacement":W=a;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function cC(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function uC(t){return XW.some(e=>t[e]>=0)}const s6=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:i="referenceHidden",...s}=Ji(t,e);switch(i){case"referenceHidden":{const o=await r.detectOverflow(e,{...s,elementContext:"reference"}),a=cC(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:uC(a)}}}case"escaped":{const o=await r.detectOverflow(e,{...s,altBoundary:!0}),a=cC(o,n.floating);return{data:{escapedOffsets:a,escaped:uC(a)}}}default:return{}}}}},CA=new Set(["left","top"]);async function o6(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=es(n),a=rc(n),l=mi(n)==="y",c=CA.has(o)?-1:1,u=s&&l?-1:1,f=Ji(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}const a6=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=e,l=await o6(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},l6=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i,platform:s}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x,y:b}=y;return{x,y:b}}},...c}=Ji(t,e),u={x:n,y:r},f=await s.detectOverflow(e,c),d=mi(es(i)),h=iw(d);let g=u[h],m=u[d];if(o){const y=h==="y"?"top":"left",x=h==="y"?"bottom":"right",b=g+f[y],k=g-f[x];g=fx(b,g,k)}if(a){const y=d==="y"?"top":"left",x=d==="y"?"bottom":"right",b=m+f[y],k=m-f[x];m=fx(b,m,k)}const v=l.fn({...e,[h]:g,[d]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:o,[d]:a}}}}}},c6=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Ji(t,e),u={x:n,y:r},f=mi(i),d=iw(f);let h=u[d],g=u[f];const m=Ji(a,e),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=d==="y"?"height":"width",k=s.reference[d]-s.floating[b]+v.mainAxis,w=s.reference[d]+s.reference[b]-v.mainAxis;h<k?h=k:h>w&&(h=w)}if(c){var y,x;const b=d==="y"?"width":"height",k=CA.has(es(i)),w=s.reference[f]-s.floating[b]+(k&&((y=o.offset)==null?void 0:y[f])||0)+(k?0:v.crossAxis),S=s.reference[f]+s.reference[b]+(k?0:((x=o.offset)==null?void 0:x[f])||0)-(k?v.crossAxis:0);g<w?g=w:g>S&&(g=S)}return{[d]:h,[f]:g}}}},u6=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=Ji(t,e),u=await o.detectOverflow(e,c),f=es(i),d=rc(i),h=mi(i)==="y",{width:g,height:m}=s.floating;let v,y;f==="top"||f==="bottom"?(v=f,y=d===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,v=d==="end"?"top":"bottom");const x=m-u.top-u.bottom,b=g-u.left-u.right,k=Zs(m-u[v],x),w=Zs(g-u[y],b),S=!e.middlewareData.shift;let C=k,_=w;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(_=b),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(C=x),S&&!d){const E=Dn(u.left,0),j=Dn(u.right,0),A=Dn(u.top,0),L=Dn(u.bottom,0);h?_=g-2*(E!==0||j!==0?E+j:Dn(u.left,u.right)):C=m-2*(A!==0||L!==0?A+L:Dn(u.top,u.bottom))}await l({...e,availableWidth:_,availableHeight:C});const I=await o.getDimensions(a.floating);return g!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};function Zm(){return typeof window<"u"}function ic(t){return PA(t)?(t.nodeName||"").toLowerCase():"#document"}function Wn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Pi(t){var e;return(e=(PA(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function PA(t){return Zm()?t instanceof Node||t instanceof Wn(t).Node:!1}function Fr(t){return Zm()?t instanceof Element||t instanceof Wn(t).Element:!1}function ki(t){return Zm()?t instanceof HTMLElement||t instanceof Wn(t).HTMLElement:!1}function fC(t){return!Zm()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Wn(t).ShadowRoot}const f6=new Set(["inline","contents"]);function Bf(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Xr(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!f6.has(i)}const d6=new Set(["table","td","th"]);function h6(t){return d6.has(ic(t))}const p6=[":popover-open",":modal"];function Wm(t){return p6.some(e=>{try{return t.matches(e)}catch{return!1}})}const m6=["transform","translate","scale","rotate","perspective"],g6=["transform","translate","scale","rotate","perspective","filter"],O6=["paint","layout","strict","content"];function aw(t){const e=lw(),n=Fr(t)?Xr(t):t;return m6.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||g6.some(r=>(n.willChange||"").includes(r))||O6.some(r=>(n.contain||"").includes(r))}function y6(t){let e=Ws(t);for(;ki(e)&&!Cl(e);){if(aw(e))return e;if(Wm(e))return null;e=Ws(e)}return null}function lw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const v6=new Set(["html","body","#document"]);function Cl(t){return v6.has(ic(t))}function Xr(t){return Wn(t).getComputedStyle(t)}function qm(t){return Fr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ws(t){if(ic(t)==="html")return t;const e=t.assignedSlot||t.parentNode||fC(t)&&t.host||Pi(t);return fC(e)?e.host:e}function TA(t){const e=Ws(t);return Cl(e)?t.ownerDocument?t.ownerDocument.body:t.body:ki(e)&&Bf(e)?e:TA(e)}function qu(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=TA(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=Wn(i);if(s){const a=hx(o);return e.concat(o,o.visualViewport||[],Bf(i)?i:[],a&&n?qu(a):[])}return e.concat(i,qu(i,[],n))}function hx(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function EA(t){const e=Xr(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=ki(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,a=Ep(n)!==s||Ep(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function cw(t){return Fr(t)?t:t.contextElement}function il(t){const e=cw(t);if(!ki(e))return wi(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=EA(e);let o=(s?Ep(n.width):n.width)/r,a=(s?Ep(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const x6=wi(0);function RA(t){const e=Wn(t);return!lw()||!e.visualViewport?x6:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function b6(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Wn(t)?!1:e}function qo(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=cw(t);let o=wi(1);e&&(r?Fr(r)&&(o=il(r)):o=il(t));const a=b6(s,n,r)?RA(s):wi(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(s){const d=Wn(s),h=r&&Fr(r)?Wn(r):r;let g=d,m=hx(g);for(;m&&r&&h!==g;){const v=il(m),y=m.getBoundingClientRect(),x=Xr(m),b=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,k=y.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,f*=v.y,l+=b,c+=k,g=Wn(m),m=hx(g)}}return _p({width:u,height:f,x:l,y:c})}function Ym(t,e){const n=qm(t).scrollLeft;return e?e.left+n:qo(Pi(t)).left+n}function _A(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-Ym(t,n),i=n.top+e.scrollTop;return{x:r,y:i}}function w6(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=Pi(r),a=e?Wm(e.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=wi(1);const u=wi(0),f=ki(r);if((f||!f&&!s)&&((ic(r)!=="body"||Bf(o))&&(l=qm(r)),ki(r))){const h=qo(r);c=il(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const d=o&&!f&&!s?_A(o,l):wi(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}}function S6(t){return Array.from(t.getClientRects())}function k6(t){const e=Pi(t),n=qm(t),r=t.ownerDocument.body,i=Dn(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Dn(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Ym(t);const a=-n.scrollTop;return Xr(r).direction==="rtl"&&(o+=Dn(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}const dC=25;function C6(t,e){const n=Wn(t),r=Pi(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=lw();(!u||u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Ym(r);if(c<=0){const u=r.ownerDocument,f=u.body,d=getComputedStyle(f),h=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-h);g<=dC&&(s-=g)}else c<=dC&&(s+=c);return{width:s,height:o,x:a,y:l}}const P6=new Set(["absolute","fixed"]);function T6(t,e){const n=qo(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=ki(t)?il(t):wi(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function hC(t,e,n){let r;if(e==="viewport")r=C6(t,n);else if(e==="document")r=k6(Pi(t));else if(Fr(e))r=T6(e,n);else{const i=RA(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return _p(r)}function $A(t,e){const n=Ws(t);return n===e||!Fr(n)||Cl(n)?!1:Xr(n).position==="fixed"||$A(n,e)}function E6(t,e){const n=e.get(t);if(n)return n;let r=qu(t,[],!1).filter(a=>Fr(a)&&ic(a)!=="body"),i=null;const s=Xr(t).position==="fixed";let o=s?Ws(t):t;for(;Fr(o)&&!Cl(o);){const a=Xr(o),l=aw(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&P6.has(i.position)||Bf(o)&&!l&&$A(t,o))?r=r.filter(u=>u!==o):i=a,o=Ws(o)}return e.set(t,r),r}function R6(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?Wm(e)?[]:E6(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const f=hC(e,u,i);return c.top=Dn(f.top,c.top),c.right=Zs(f.right,c.right),c.bottom=Zs(f.bottom,c.bottom),c.left=Dn(f.left,c.left),c},hC(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function _6(t){const{width:e,height:n}=EA(t);return{width:e,height:n}}function $6(t,e,n){const r=ki(e),i=Pi(e),s=n==="fixed",o=qo(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=wi(0);function c(){l.x=Ym(i)}if(r||!r&&!s)if((ic(e)!=="body"||Bf(i))&&(a=qm(e)),r){const h=qo(e,!0,s,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&c();s&&!r&&i&&c();const u=i&&!r&&!s?_A(i,a):wi(0),f=o.left+a.scrollLeft-l.x-u.x,d=o.top+a.scrollTop-l.y-u.y;return{x:f,y:d,width:o.width,height:o.height}}function _O(t){return Xr(t).position==="static"}function pC(t,e){if(!ki(t)||Xr(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Pi(t)===n&&(n=n.ownerDocument.body),n}function AA(t,e){const n=Wn(t);if(Wm(t))return n;if(!ki(t)){let i=Ws(t);for(;i&&!Cl(i);){if(Fr(i)&&!_O(i))return i;i=Ws(i)}return n}let r=pC(t,e);for(;r&&h6(r)&&_O(r);)r=pC(r,e);return r&&Cl(r)&&_O(r)&&!aw(r)?n:r||y6(t)||n}const A6=async function(t){const e=this.getOffsetParent||AA,n=this.getDimensions,r=await n(t.floating);return{reference:$6(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Q6(t){return Xr(t).direction==="rtl"}const I6={convertOffsetParentRelativeRectToViewportRelativeRect:w6,getDocumentElement:Pi,getClippingRect:R6,getOffsetParent:AA,getElementRects:A6,getClientRects:S6,getDimensions:_6,getScale:il,isElement:Fr,isRTL:Q6};function QA(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function N6(t,e){let n=null,r;const i=Pi(t);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:f,width:d,height:h}=c;if(a||e(),!d||!h)return;const g=Pd(f),m=Pd(i.clientWidth-(u+d)),v=Pd(i.clientHeight-(f+h)),y=Pd(u),b={rootMargin:-g+"px "+-m+"px "+-v+"px "+-y+"px",threshold:Dn(0,Zs(1,l))||1};let k=!0;function w(S){const C=S[0].intersectionRatio;if(C!==l){if(!k)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!QA(c,t.getBoundingClientRect())&&o(),k=!1}try{n=new IntersectionObserver(w,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,b)}n.observe(t)}return o(!0),s}function j6(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=cw(t),u=i||s?[...c?qu(c):[],...qu(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=c&&a?N6(c,n):null;let d=-1,h=null;o&&(h=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let g,m=l?qo(t):null;l&&v();function v(){const y=qo(t);m&&!QA(m,y)&&n(),m=y,g=requestAnimationFrame(v)}return n(),()=>{var y;u.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),f==null||f(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const M6=a6,D6=l6,L6=i6,z6=u6,B6=s6,mC=r6,V6=c6,F6=(t,e,n)=>{const r=new Map,i={platform:I6,...n},s={...i.platform,_c:r};return n6(t,e,{...i,platform:s})};var X6=typeof document<"u",Z6=function(){},Rh=X6?O.useLayoutEffect:Z6;function $p(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!$p(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&t.$$typeof)&&!$p(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function IA(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function gC(t,e){const n=IA(t);return Math.round(e*n)/n}function $O(t){const e=O.useRef(t);return Rh(()=>{e.current=t}),e}function W6(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=O.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=O.useState(r);$p(d,r)||h(r);const[g,m]=O.useState(null),[v,y]=O.useState(null),x=O.useCallback(N=>{N!==S.current&&(S.current=N,m(N))},[]),b=O.useCallback(N=>{N!==C.current&&(C.current=N,y(N))},[]),k=s||g,w=o||v,S=O.useRef(null),C=O.useRef(null),_=O.useRef(u),I=l!=null,E=$O(l),j=$O(i),A=$O(c),L=O.useCallback(()=>{if(!S.current||!C.current)return;const N={placement:e,strategy:n,middleware:d};j.current&&(N.platform=j.current),F6(S.current,C.current,N).then(Q=>{const P={...Q,isPositioned:A.current!==!1};z.current&&!$p(_.current,P)&&(_.current=P,Gl.flushSync(()=>{f(P)}))})},[d,e,n,j,A]);Rh(()=>{c===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[c]);const z=O.useRef(!1);Rh(()=>(z.current=!0,()=>{z.current=!1}),[]),Rh(()=>{if(k&&(S.current=k),w&&(C.current=w),k&&w){if(E.current)return E.current(k,w,L);L()}},[k,w,L,E,I]);const X=O.useMemo(()=>({reference:S,floating:C,setReference:x,setFloating:b}),[x,b]),W=O.useMemo(()=>({reference:k,floating:w}),[k,w]),F=O.useMemo(()=>{const N={position:n,left:0,top:0};if(!W.floating)return N;const Q=gC(W.floating,u.x),P=gC(W.floating,u.y);return a?{...N,transform:"translate("+Q+"px, "+P+"px)",...IA(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:P}},[n,a,W.floating,u.x,u.y]);return O.useMemo(()=>({...u,update:L,refs:X,elements:W,floatingStyles:F}),[u,L,X,W,F])}const q6=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?mC({element:r.current,padding:i}).fn(n):{}:r?mC({element:r,padding:i}).fn(n):{}}}},Y6=(t,e)=>({...M6(t),options:[t,e]}),U6=(t,e)=>({...D6(t),options:[t,e]}),H6=(t,e)=>({...V6(t),options:[t,e]}),G6=(t,e)=>({...L6(t),options:[t,e]}),K6=(t,e)=>({...z6(t),options:[t,e]}),J6=(t,e)=>({...B6(t),options:[t,e]}),e9=(t,e)=>({...q6(t),options:[t,e]});var t9="Arrow",NA=O.forwardRef((t,e)=>{const{children:n,width:r=10,height:i=5,...s}=t;return p.jsx(ue.svg,{...s,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});NA.displayName=t9;var n9=NA;function jA(t){const[e,n]=O.useState(void 0);return _t(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var uw="Popper",[MA,oo]=Cn(uw),[r9,DA]=MA(uw),LA=t=>{const{__scopePopper:e,children:n}=t,[r,i]=O.useState(null);return p.jsx(r9,{scope:e,anchor:r,onAnchorChange:i,children:n})};LA.displayName=uw;var zA="PopperAnchor",BA=O.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...i}=t,s=DA(zA,n),o=O.useRef(null),a=Pe(e,o),l=O.useRef(null);return O.useEffect(()=>{const c=l.current;l.current=(r==null?void 0:r.current)||o.current,c!==l.current&&s.onAnchorChange(l.current)}),r?null:p.jsx(ue.div,{...i,ref:a})});BA.displayName=zA;var fw="PopperContent",[i9,s9]=MA(fw),VA=O.forwardRef((t,e)=>{var Y,pe,me,ye,Ee,je;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:g,...m}=t,v=DA(fw,n),[y,x]=O.useState(null),b=Pe(e,kt=>x(kt)),[k,w]=O.useState(null),S=jA(k),C=(S==null?void 0:S.width)??0,_=(S==null?void 0:S.height)??0,I=r+(s!=="center"?"-"+s:""),E=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},j=Array.isArray(c)?c:[c],A=j.length>0,L={padding:E,boundary:j.filter(a9),altBoundary:A},{refs:z,floatingStyles:X,placement:W,isPositioned:F,middlewareData:N}=W6({strategy:"fixed",placement:I,whileElementsMounted:(...kt)=>j6(...kt,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Y6({mainAxis:i+_,alignmentAxis:o}),l&&U6({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?H6():void 0,...L}),l&&G6({...L}),K6({...L,apply:({elements:kt,rects:ln,availableWidth:Gr,availableHeight:Sr})=>{const{width:Kr,height:ho}=ln.reference,$i=kt.floating.style;$i.setProperty("--radix-popper-available-width",`${Gr}px`),$i.setProperty("--radix-popper-available-height",`${Sr}px`),$i.setProperty("--radix-popper-anchor-width",`${Kr}px`),$i.setProperty("--radix-popper-anchor-height",`${ho}px`)}}),k&&e9({element:k,padding:a}),l9({arrowWidth:C,arrowHeight:_}),d&&J6({strategy:"referenceHidden",...L})]}),[Q,P]=ZA(W),M=Wt(g);_t(()=>{F&&(M==null||M())},[F,M]);const $=(Y=N.arrow)==null?void 0:Y.x,R=(pe=N.arrow)==null?void 0:pe.y,q=((me=N.arrow)==null?void 0:me.centerOffset)!==0,[H,ie]=O.useState();return _t(()=>{y&&ie(window.getComputedStyle(y).zIndex)},[y]),p.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:F?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[(ye=N.transformOrigin)==null?void 0:ye.x,(Ee=N.transformOrigin)==null?void 0:Ee.y].join(" "),...((je=N.hide)==null?void 0:je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:p.jsx(i9,{scope:n,placedSide:Q,onArrowChange:w,arrowX:$,arrowY:R,shouldHideArrow:q,children:p.jsx(ue.div,{"data-side":Q,"data-align":P,...m,ref:b,style:{...m.style,animation:F?void 0:"none"}})})})});VA.displayName=fw;var FA="PopperArrow",o9={top:"bottom",right:"left",bottom:"top",left:"right"},XA=O.forwardRef(function(e,n){const{__scopePopper:r,...i}=e,s=s9(FA,r),o=o9[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(n9,{...i,ref:n,style:{...i.style,display:"block"}})})});XA.displayName=FA;function a9(t){return t!==null}var l9=t=>({name:"transformOrigin",options:t,fn(e){var v,y,x;const{placement:n,rects:r,middlewareData:i}=e,o=((v=i.arrow)==null?void 0:v.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=ZA(n),f={start:"0%",center:"50%",end:"100%"}[u],d=(((y=i.arrow)==null?void 0:y.x)??0)+a/2,h=(((x=i.arrow)==null?void 0:x.y)??0)+l/2;let g="",m="";return c==="bottom"?(g=o?f:`${d}px`,m=`${-l}px`):c==="top"?(g=o?f:`${d}px`,m=`${r.floating.height+l}px`):c==="right"?(g=`${-l}px`,m=o?f:`${h}px`):c==="left"&&(g=`${r.floating.width+l}px`,m=o?f:`${h}px`),{data:{x:g,y:m}}}});function ZA(t){const[e,n="center"]=t.split("-");return[e,n]}var WA=LA,Vf=BA,Um=VA,Hm=XA,c9="Portal",Ff=O.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[i,s]=O.useState(!1);_t(()=>s(!0),[]);const o=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?E$.createPortal(p.jsx(ue.div,{...r,ref:e}),o):null});Ff.displayName=c9;function u9(t,e){return O.useReducer((n,r)=>e[n][r]??n,t)}var $t=t=>{const{present:e,children:n}=t,r=f9(e),i=typeof n=="function"?n({present:r.isPresent}):O.Children.only(n),s=Pe(r.ref,d9(i));return typeof n=="function"||r.isPresent?O.cloneElement(i,{ref:s}):null};$t.displayName="Presence";function f9(t){const[e,n]=O.useState(),r=O.useRef(null),i=O.useRef(t),s=O.useRef("none"),o=t?"mounted":"unmounted",[a,l]=u9(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return O.useEffect(()=>{const c=Td(r.current);s.current=a==="mounted"?c:"none"},[a]),_t(()=>{const c=r.current,u=i.current;if(u!==t){const d=s.current,h=Td(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),_t(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,f=h=>{const m=Td(r.current).includes(CSS.escape(h.animationName));if(h.target===e&&m&&(l("ANIMATION_END"),!i.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},d=h=>{h.target===e&&(s.current=Td(r.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:O.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Td(t){return(t==null?void 0:t.animationName)||"none"}function d9(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var h9=Symbol("radix.slottable");function p9(t){const e=({children:n})=>p.jsx(p.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=h9,e}var m9=eb[" useInsertionEffect ".trim().toString()]||_t;function qs({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[i,s,o]=g9({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:i;{const u=O.useRef(t!==void 0);O.useEffect(()=>{const f=u.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const c=O.useCallback(u=>{var f;if(a){const d=O9(u)?u(t):u;d!==t&&((f=o.current)==null||f.call(o,d))}else s(u)},[a,t,s,o]);return[l,c]}function g9({defaultProp:t,onChange:e}){const[n,r]=O.useState(t),i=O.useRef(n),s=O.useRef(e);return m9(()=>{s.current=e},[e]),O.useEffect(()=>{var o;i.current!==n&&((o=s.current)==null||o.call(s,n),i.current=n)},[n,i]),[n,r,s]}function O9(t){return typeof t=="function"}var qA=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"}),y9="VisuallyHidden",YA=O.forwardRef((t,e)=>p.jsx(ue.span,{...t,ref:e,style:{...qA,...t.style}}));YA.displayName=y9;var v9=YA,[Gm]=Cn("Tooltip",[oo]),Km=oo(),UA="TooltipProvider",x9=700,px="tooltip.open",[b9,dw]=Gm(UA),HA=t=>{const{__scopeTooltip:e,delayDuration:n=x9,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=t,o=O.useRef(!0),a=O.useRef(!1),l=O.useRef(0);return O.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(b9,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:O.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:O.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:O.useCallback(c=>{a.current=c},[]),disableHoverableContent:i,children:s})};HA.displayName=UA;var Yu="Tooltip",[w9,Jm]=Gm(Yu),GA=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:i,onOpenChange:s,disableHoverableContent:o,delayDuration:a}=t,l=dw(Yu,t.__scopeTooltip),c=Km(e),[u,f]=O.useState(null),d=Yt(),h=O.useRef(0),g=o??l.disableHoverableContent,m=a??l.delayDuration,v=O.useRef(!1),[y,x]=qs({prop:r,defaultProp:i??!1,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(px))):l.onClose(),s==null||s(C)},caller:Yu}),b=O.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),k=O.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,x(!0)},[x]),w=O.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),S=O.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,x(!0),h.current=0},m)},[m,x]);return O.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),p.jsx(WA,{...c,children:p.jsx(w9,{scope:e,contentId:d,open:y,stateAttribute:b,trigger:u,onTriggerChange:f,onTriggerEnter:O.useCallback(()=>{l.isOpenDelayedRef.current?S():k()},[l.isOpenDelayedRef,S,k]),onTriggerLeave:O.useCallback(()=>{g?w():(window.clearTimeout(h.current),h.current=0)},[w,g]),onOpen:k,onClose:w,disableHoverableContent:g,children:n})})};GA.displayName=Yu;var mx="TooltipTrigger",KA=O.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=Jm(mx,n),s=dw(mx,n),o=Km(n),a=O.useRef(null),l=Pe(e,a,i.onTriggerChange),c=O.useRef(!1),u=O.useRef(!1),f=O.useCallback(()=>c.current=!1,[]);return O.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(Vf,{asChild:!0,...o,children:p.jsx(ue.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:ne(t.onPointerMove,d=>{d.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:ne(t.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:ne(t.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ne(t.onFocus,()=>{c.current||i.onOpen()}),onBlur:ne(t.onBlur,i.onClose),onClick:ne(t.onClick,i.onClose)})})});KA.displayName=mx;var S9="TooltipPortal",[xxe,k9]=Gm(S9,{forceMount:void 0}),Pl="TooltipContent",JA=O.forwardRef((t,e)=>{const n=k9(Pl,t.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=t,o=Jm(Pl,t.__scopeTooltip);return p.jsx($t,{present:r||o.open,children:o.disableHoverableContent?p.jsx(eQ,{side:i,...s,ref:e}):p.jsx(C9,{side:i,...s,ref:e})})}),C9=O.forwardRef((t,e)=>{const n=Jm(Pl,t.__scopeTooltip),r=dw(Pl,t.__scopeTooltip),i=O.useRef(null),s=Pe(e,i),[o,a]=O.useState(null),{trigger:l,onClose:c}=n,u=i.current,{onPointerInTransitChange:f}=r,d=O.useCallback(()=>{a(null),f(!1)},[f]),h=O.useCallback((g,m)=>{const v=g.currentTarget,y={x:g.clientX,y:g.clientY},x=_9(y,v.getBoundingClientRect()),b=$9(y,x),k=A9(m.getBoundingClientRect()),w=I9([...b,...k]);a(w),f(!0)},[f]);return O.useEffect(()=>()=>d(),[d]),O.useEffect(()=>{if(l&&u){const g=v=>h(v,u),m=v=>h(v,l);return l.addEventListener("pointerleave",g),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),u.removeEventListener("pointerleave",m)}}},[l,u,h,d]),O.useEffect(()=>{if(o){const g=m=>{const v=m.target,y={x:m.clientX,y:m.clientY},x=(l==null?void 0:l.contains(v))||(u==null?void 0:u.contains(v)),b=!Q9(y,o);x?d():b&&(d(),c())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,u,o,c,d]),p.jsx(eQ,{...t,ref:s})}),[P9,T9]=Gm(Yu,{isInside:!1}),E9=p9("TooltipContent"),eQ=O.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=t,l=Jm(Pl,n),c=Km(n),{onClose:u}=l;return O.useEffect(()=>(document.addEventListener(px,u),()=>document.removeEventListener(px,u)),[u]),O.useEffect(()=>{if(l.trigger){const f=d=>{const h=d.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,u]),p.jsx(nc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:p.jsxs(Um,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.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:[p.jsx(E9,{children:r}),p.jsx(P9,{scope:n,isInside:!0,children:p.jsx(v9,{id:l.contentId,role:"tooltip",children:i||r})})]})})});JA.displayName=Pl;var tQ="TooltipArrow",R9=O.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=Km(n);return T9(tQ,n).isInside?null:p.jsx(Hm,{...i,...r,ref:e})});R9.displayName=tQ;function _9(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function $9(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function A9(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function Q9(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const a=e[s],l=e[o],c=a.x,u=a.y,f=l.x,d=l.y;u>r!=d>r&&n<(f-c)*(r-u)/(d-u)+c&&(i=!i)}return i}function I9(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),N9(e)}function N9(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var j9=HA,M9=GA,D9=KA,nQ=JA;const Uu=j9,Bn=M9,Vn=D9,On=O.forwardRef(({className:t,sideOffset:e=4,...n},r)=>p.jsx(nQ,{ref:r,sideOffset:e,className:le("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));On.displayName=nQ.displayName;async function _s(t,e){const n=Lo(),r=await fetch(t,{...e,headers:{"Content-Type":"application/json",...n,...e==null?void 0:e.headers}});if(!r.ok){const i=await r.json().catch(()=>({message:"Request failed"}));throw new Error(i.message||`HTTP ${r.status}`)}return r.json()}const sl={async get(t,e){return _s(t,{...e,method:"GET"})},async post(t,e,n){return _s(t,{...n,method:"POST",body:e?JSON.stringify(e):void 0})},async put(t,e,n){return _s(t,{...n,method:"PUT",body:e?JSON.stringify(e):void 0})},async delete(t,e){return _s(t,{...e,method:"DELETE"})}},Ap=da((t,e)=>({query:"",scope:"notes",mode:"hybrid",language:null,pathFilter:null,tags:[],results:{notes:[],code:[]},isSearching:!1,error:null,limit:10,offset:0,hasMore:!1,isCommandPaletteOpen:!1,setQuery:n=>t({query:n}),setScope:n=>t({scope:n}),setMode:n=>t({mode:n}),setLanguage:n=>t({language:n}),setPathFilter:n=>t({pathFilter:n}),setTags:n=>t({tags:n}),search:async()=>{const n=e();if(!n.query.trim()){t({results:{notes:[],code:[]}});return}t({isSearching:!0,error:null,offset:0});try{const r={notes:[],code:[]};console.log("[Search] Starting search with query:",n.query,"scope:",n.scope,"mode:",n.mode);const i=new URLSearchParams({q:n.query,limit:String(n.limit)}),s=n.mode==="text"?"text":n.mode==="semantic"?"semantic":"hybrid";if(n.scope==="all"||n.scope==="notes")try{if(n.mode==="grep"){const a=new URLSearchParams({pattern:n.query,limit:String(n.limit)});n.pathFilter&&a.set("folder",n.pathFilter);const l=await _s(`/api/notes/grep?${a}`);console.log("[Search] Grep response:",l),r.notes=(l.results??[]).flatMap(c=>c.matches.map(u=>{var f;return{path:c.path,section:`Line ${u.line}`,score:1,content:u.content,title:((f=c.path.split("/").pop())==null?void 0:f.replace(".md",""))||c.path,tags:[],links:[]}}))}else{const a=new URLSearchParams(i);a.set("mode",s),n.pathFilter&&a.set("folder",n.pathFilter),n.tags.length>0&&a.set("tags",n.tags.join(","));const l=await _s(`/api/notes/search?${a}`);console.log("[Search] Notes response:",l),r.notes=l.results??[]}}catch(a){console.error("Notes search failed:",a)}if(n.scope==="all"||n.scope==="code")try{if(n.mode==="grep"){const a=new URLSearchParams({pattern:n.query,limit:String(n.limit)});n.language&&a.set("language",n.language);const l=await _s(`/api/code/grep?${a}`);console.log("[Search] Code grep response:",l),r.code=(l.results??[]).flatMap(c=>c.matches.map((u,f)=>({id:`${c.relativePath}:${u.line}:${f}`,name:c.relativePath.split("/").pop()||c.relativePath,type:c.language,path:c.path,relativePath:c.relativePath,signature:null,docstring:null,startLine:u.line,endLine:u.line,score:1,content:u.content})))}else{const a=new URLSearchParams(i);a.set("mode",s),n.pathFilter&&a.set("path",n.pathFilter),n.language&&a.set("language",n.language);const l=await _s(`/api/code/search?${a}`);console.log("[Search] Code response:",l),r.code=(l.results??[]).filter(c=>c==null?void 0:c.symbol).map(c=>({id:c.symbol.id,name:c.symbol.name,type:c.symbol.type,path:c.symbol.path,relativePath:c.symbol.relativePath,signature:c.symbol.signature,docstring:c.symbol.docstring,startLine:c.symbol.startLine,endLine:c.symbol.endLine,score:c.score,content:c.content}))}}catch(a){console.error("Code search failed:",a)}const o=r.notes.length+r.code.length;console.log("[Search] Final results:",r,"total:",o),t({results:r,isSearching:!1,hasMore:o>=n.limit})}catch(r){t({isSearching:!1,error:r instanceof Error?r.message:"Search failed"})}},loadMore:async()=>{const n=e();if(!n.hasMore||n.isSearching)return;const r=n.offset+n.limit;t({isSearching:!0,offset:r});try{t({isSearching:!1,hasMore:!1})}catch(i){t({isSearching:!1,error:i instanceof Error?i.message:"Failed to load more"})}},clearResults:()=>{t({query:"",results:{notes:[],code:[]},offset:0,hasMore:!1})},resetResults:()=>{t({results:{notes:[],code:[]},offset:0,hasMore:!1})},openCommandPalette:()=>t({isCommandPaletteOpen:!0}),closeCommandPalette:()=>t({isCommandPaletteOpen:!1}),toggleCommandPalette:()=>t(n=>({isCommandPaletteOpen:!n.isCommandPaletteOpen}))}));typeof window<"u"&&document.addEventListener("keydown",t=>{(t.metaKey||t.ctrlKey)&&t.key==="k"&&(t.preventDefault(),Ap.getState().toggleCommandPalette()),t.key==="Escape"&&Ap.getState().closeCommandPalette()});const L9={name:"",vaultPaths:["./vault"],lancedb:{dbPath:"./.lancedb"},embedding:{provider:"wasm",dimensions:384},reranking:{enabled:!1,provider:"none",topK:50,prerankThreshold:.3,maxDocumentLength:2e3,batchSize:100,wasmModel:"Xenova/ms-marco-MiniLM-L-6-v2",voyageModel:"rerank-2.5-lite",localaiBaseUrl:"http://localhost:8080",localaiRerankModel:"jina-reranker-v1-base-en"},code:{enabled:!1,paths:[],include:["**/*.ts","**/*.tsx","**/*.js","**/*.jsx"],exclude:["node_modules/**","dist/**",".git/**"],graph:{enabled:!1,quality:"balanced",semantic:{enabled:!0,maxClosureDepth:3,maxClosureFiles:50},embedded:{graphql:!0,css:!0},resolution:{respectTSPaths:!0}}},gitSync:{enabled:!0,autoSyncOnStartup:!0}},ma=da((t,e)=>({isOpen:!1,mode:"edit",activeTab:"general",config:null,originalConfig:null,projectPath:null,isDirty:!1,errors:{},isLoading:!1,isSaving:!1,createPath:"",openSettings:async()=>{t({isOpen:!0,mode:"edit",activeTab:"general",isLoading:!0,errors:{}}),await e().loadConfig()},openCreateWizard:()=>{t({isOpen:!0,mode:"create",activeTab:"general",config:{...L9},originalConfig:null,projectPath:null,createPath:"",isDirty:!1,errors:{},isLoading:!1})},closeModal:()=>{t({isOpen:!1,config:null,originalConfig:null,projectPath:null,isDirty:!1,errors:{},isLoading:!1,isSaving:!1,createPath:""})},setActiveTab:n=>{t({activeTab:n})},loadConfig:async()=>{t({isLoading:!0});try{const n=await fetch("/api/project/config",{headers:{...Lo()}});if(!n.ok){const i=await n.json().catch(()=>({}));throw new Error(i.message||"Failed to load config")}const r=await n.json();t({config:r.config,originalConfig:JSON.parse(JSON.stringify(r.config)),projectPath:r.path,isDirty:!1,isLoading:!1})}catch(n){t({isLoading:!1,errors:{_general:n instanceof Error?n.message:"Failed to load config"}})}},updateConfig:(n,r)=>{const{config:i,originalConfig:s}=e();if(!i)return;const o={...i,[n]:r};t({config:o,isDirty:JSON.stringify(o)!==JSON.stringify(s)})},updateNestedConfig:(n,r)=>{const{config:i,originalConfig:s}=e();if(!i)return;const o=i[n],a={...i,[n]:{...typeof o=="object"&&o!==null?o:{},...r}};t({config:a,isDirty:JSON.stringify(a)!==JSON.stringify(s)})},saveConfig:async()=>{var a,l,c;const{config:n,mode:r,createPath:i}=e();if(!n)return!1;const s={};if(r==="create"&&!(i!=null&&i.trim()))return s._general="Project path is required",t({errors:s}),!1;const o=jf.getState();if(n.embedding.provider==="voyage"&&!((a=o.voyageApiKey)!=null&&a.trim())&&(s.voyageApiKey="Voyage API key is required"),n.reranking.enabled&&n.reranking.provider==="voyage"&&!((l=o.voyageApiKey)!=null&&l.trim())&&(s.voyageApiKey="Voyage API key is required"),n.code.enabled&&!((c=n.code.include)!=null&&c.length)&&(s.codeInclude="At least one include pattern is required"),Object.keys(s).length>0)return t({errors:s}),!1;t({isSaving:!0,errors:{}});try{if(r==="create"){const u={path:i,config:{name:n.name,vaultPaths:n.vaultPaths,lancedb:n.lancedb,embedding:n.embedding,reranking:n.reranking,code:n.code,gitSync:n.gitSync}},f=await fetch("/api/project/create",{method:"POST",headers:{"Content-Type":"application/json",...Lo()},body:JSON.stringify(u)});if(!f.ok){const h=await f.json().catch(()=>({}));throw new Error(h.message||"Failed to create project")}const d=await f.json();return t({isSaving:!1,config:d.config,originalConfig:JSON.parse(JSON.stringify(d.config)),projectPath:d.path,isDirty:!1}),!0}else{const u=await fetch("/api/project/config",{method:"PUT",headers:{"Content-Type":"application/json",...Lo()},body:JSON.stringify(n)});if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d.message||"Failed to save config")}const f=await u.json();return t({isSaving:!1,config:f.config,originalConfig:JSON.parse(JSON.stringify(f.config)),isDirty:!1}),!0}}catch(u){return t({isSaving:!1,errors:{_general:u instanceof Error?u.message:"Failed to save config"}}),!1}},resetConfig:()=>{const{originalConfig:n}=e();n&&t({config:JSON.parse(JSON.stringify(n)),isDirty:!1,errors:{}})},setError:(n,r)=>{t(i=>({errors:r?{...i.errors,[n]:r}:Object.fromEntries(Object.entries(i.errors).filter(([s])=>s!==n))}))},clearErrors:()=>{t({errors:{}})},setCreatePath:n=>{t({createPath:n})},createProject:async()=>e().saveConfig()}));var AO="focusScope.autoFocusOnMount",QO="focusScope.autoFocusOnUnmount",OC={bubbles:!1,cancelable:!0},z9="FocusScope",Xf=O.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=O.useState(null),c=Wt(i),u=Wt(s),f=O.useRef(null),d=Pe(e,m=>l(m)),h=O.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;O.useEffect(()=>{if(r){let m=function(b){if(h.paused||!a)return;const k=b.target;a.contains(k)?f.current=k:ys(f.current,{select:!0})},v=function(b){if(h.paused||!a)return;const k=b.relatedTarget;k!==null&&(a.contains(k)||ys(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const w of b)w.removedNodes.length>0&&ys(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const x=new MutationObserver(y);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),x.disconnect()}}},[r,a,h.paused]),O.useEffect(()=>{if(a){vC.add(h);const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent(AO,OC);a.addEventListener(AO,c),a.dispatchEvent(y),y.defaultPrevented||(B9(W9(rQ(a)),{select:!0}),document.activeElement===m&&ys(a))}return()=>{a.removeEventListener(AO,c),setTimeout(()=>{const y=new CustomEvent(QO,OC);a.addEventListener(QO,u),a.dispatchEvent(y),y.defaultPrevented||ys(m??document.body,{select:!0}),a.removeEventListener(QO,u),vC.remove(h)},0)}}},[a,c,u,h]);const g=O.useCallback(m=>{if(!n&&!r||h.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const x=m.currentTarget,[b,k]=V9(x);b&&k?!m.shiftKey&&y===k?(m.preventDefault(),n&&ys(b,{select:!0})):m.shiftKey&&y===b&&(m.preventDefault(),n&&ys(k,{select:!0})):y===x&&m.preventDefault()}},[n,r,h.paused]);return p.jsx(ue.div,{tabIndex:-1,...o,ref:d,onKeyDown:g})});Xf.displayName=z9;function B9(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(ys(r,{select:e}),document.activeElement!==n)return}function V9(t){const e=rQ(t),n=yC(e,t),r=yC(e.reverse(),t);return[n,r]}function rQ(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function yC(t,e){for(const n of t)if(!F9(n,{upTo:e}))return n}function F9(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function X9(t){return t instanceof HTMLInputElement&&"select"in t}function ys(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&X9(t)&&e&&t.select()}}var vC=Z9();function Z9(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=xC(t,e),t.unshift(e)},remove(e){var n;t=xC(t,e),(n=t[0])==null||n.resume()}}}function xC(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function W9(t){return t.filter(e=>e.tagName!=="A")}var IO=0;function eg(){O.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??bC()),document.body.insertAdjacentElement("beforeend",t[1]??bC()),IO++,()=>{IO===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),IO--}},[])}function bC(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var fi=function(){return fi=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},fi.apply(this,arguments)};function iQ(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function q9(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var _h="right-scroll-bar-position",$h="width-before-scroll-bar",Y9="with-scroll-bars-hidden",U9="--removed-body-scroll-bar-size";function NO(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function H9(t,e){var n=O.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var G9=typeof window<"u"?O.useLayoutEffect:O.useEffect,wC=new WeakMap;function K9(t,e){var n=H9(null,function(r){return t.forEach(function(i){return NO(i,r)})});return G9(function(){var r=wC.get(n);if(r){var i=new Set(r),s=new Set(t),o=n.current;i.forEach(function(a){s.has(a)||NO(a,null)}),s.forEach(function(a){i.has(a)||NO(a,o)})}wC.set(n,t)},[t]),n}function J9(t){return t}function e7(t,e){e===void 0&&(e=J9);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var o=e(s,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(s){for(r=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(s),o=n}var l=function(){var u=o;o=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),n}}}};return i}function t7(t){t===void 0&&(t={});var e=e7(null);return e.options=fi({async:!0,ssr:!1},t),e}var sQ=function(t){var e=t.sideCar,n=iQ(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return O.createElement(r,fi({},n))};sQ.isSideCarExport=!0;function n7(t,e){return t.useMedium(e),sQ}var oQ=t7(),jO=function(){},tg=O.forwardRef(function(t,e){var n=O.useRef(null),r=O.useState({onScrollCapture:jO,onWheelCapture:jO,onTouchMoveCapture:jO}),i=r[0],s=r[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,f=t.shards,d=t.sideCar,h=t.noRelative,g=t.noIsolation,m=t.inert,v=t.allowPinchZoom,y=t.as,x=y===void 0?"div":y,b=t.gapMode,k=iQ(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,S=K9([n,e]),C=fi(fi({},k),i);return O.createElement(O.Fragment,null,u&&O.createElement(w,{sideCar:oQ,removeScrollBar:c,shards:f,noRelative:h,noIsolation:g,inert:m,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:b}),o?O.cloneElement(O.Children.only(a),fi(fi({},C),{ref:S})):O.createElement(x,fi({},C,{className:l,ref:S}),a))});tg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};tg.classNames={fullWidth:$h,zeroRight:_h};var r7=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function i7(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=r7();return e&&t.setAttribute("nonce",e),t}function s7(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function o7(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var a7=function(){var t=0,e=null;return{add:function(n){t==0&&(e=i7())&&(s7(e,n),o7(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},l7=function(){var t=a7();return function(e,n){O.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},aQ=function(){var t=l7(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},c7={left:0,top:0,right:0,gap:0},MO=function(t){return parseInt(t||"",10)||0},u7=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[MO(n),MO(r),MO(i)]},f7=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return c7;var e=u7(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},d7=aQ(),ol="data-scroll-locked",h7=function(t,e,n,r){var i=t.left,s=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),`
|
|
389
|
+
.`.concat(Y9,` {
|
|
390
|
+
overflow: hidden `).concat(r,`;
|
|
391
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
392
|
+
}
|
|
393
|
+
body[`).concat(ol,`] {
|
|
394
|
+
overflow: hidden `).concat(r,`;
|
|
395
|
+
overscroll-behavior: contain;
|
|
396
|
+
`).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
397
|
+
padding-left: `.concat(i,`px;
|
|
398
|
+
padding-top: `).concat(s,`px;
|
|
399
|
+
padding-right: `).concat(o,`px;
|
|
400
|
+
margin-left:0;
|
|
401
|
+
margin-top:0;
|
|
402
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
403
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.`).concat(_h,` {
|
|
407
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.`).concat($h,` {
|
|
411
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.`).concat(_h," .").concat(_h,` {
|
|
415
|
+
right: 0 `).concat(r,`;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.`).concat($h," .").concat($h,` {
|
|
419
|
+
margin-right: 0 `).concat(r,`;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
body[`).concat(ol,`] {
|
|
423
|
+
`).concat(U9,": ").concat(a,`px;
|
|
424
|
+
}
|
|
425
|
+
`)},SC=function(){var t=parseInt(document.body.getAttribute(ol)||"0",10);return isFinite(t)?t:0},p7=function(){O.useEffect(function(){return document.body.setAttribute(ol,(SC()+1).toString()),function(){var t=SC()-1;t<=0?document.body.removeAttribute(ol):document.body.setAttribute(ol,t.toString())}},[])},m7=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;p7();var s=O.useMemo(function(){return f7(i)},[i]);return O.createElement(d7,{styles:h7(s,!e,i,n?"":"!important")})},gx=!1;if(typeof window<"u")try{var Ed=Object.defineProperty({},"passive",{get:function(){return gx=!0,!0}});window.addEventListener("test",Ed,Ed),window.removeEventListener("test",Ed,Ed)}catch{gx=!1}var wa=gx?{passive:!1}:!1,g7=function(t){return t.tagName==="TEXTAREA"},lQ=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!g7(t)&&n[e]==="visible")},O7=function(t){return lQ(t,"overflowY")},y7=function(t){return lQ(t,"overflowX")},kC=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=cQ(t,r);if(i){var s=uQ(t,r),o=s[1],a=s[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},v7=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},x7=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},cQ=function(t,e){return t==="v"?O7(e):y7(e)},uQ=function(t,e){return t==="v"?v7(e):x7(e)},b7=function(t,e){return t==="h"&&e==="rtl"?-1:1},w7=function(t,e,n,r,i){var s=b7(t,window.getComputedStyle(e).direction),o=s*r,a=n.target,l=e.contains(a),c=!1,u=o>0,f=0,d=0;do{if(!a)break;var h=uQ(t,a),g=h[0],m=h[1],v=h[2],y=m-v-s*g;(g||y)&&cQ(t,a)&&(f+=y,d+=g);var x=a.parentNode;a=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&Math.abs(f)<1||!u&&Math.abs(d)<1)&&(c=!0),c},Rd=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},CC=function(t){return[t.deltaX,t.deltaY]},PC=function(t){return t&&"current"in t?t.current:t},S7=function(t,e){return t[0]===e[0]&&t[1]===e[1]},k7=function(t){return`
|
|
426
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
427
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
428
|
+
`)},C7=0,Sa=[];function P7(t){var e=O.useRef([]),n=O.useRef([0,0]),r=O.useRef(),i=O.useState(C7++)[0],s=O.useState(aQ)[0],o=O.useRef(t);O.useEffect(function(){o.current=t},[t]),O.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var m=q9([t.lockRef.current],(t.shards||[]).map(PC),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=O.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var y=Rd(m),x=n.current,b="deltaX"in m?m.deltaX:x[0]-y[0],k="deltaY"in m?m.deltaY:x[1]-y[1],w,S=m.target,C=Math.abs(b)>Math.abs(k)?"h":"v";if("touches"in m&&C==="h"&&S.type==="range")return!1;var _=window.getSelection(),I=_&&_.anchorNode,E=I?I===S||I.contains(S):!1;if(E)return!1;var j=kC(C,S);if(!j)return!0;if(j?w=C:(w=C==="v"?"h":"v",j=kC(C,S)),!j)return!1;if(!r.current&&"changedTouches"in m&&(b||k)&&(r.current=w),!w)return!0;var A=r.current||w;return w7(A,v,m,A==="h"?b:k)},[]),l=O.useCallback(function(m){var v=m;if(!(!Sa.length||Sa[Sa.length-1]!==s)){var y="deltaY"in v?CC(v):Rd(v),x=e.current.filter(function(w){return w.name===v.type&&(w.target===v.target||v.target===w.shadowParent)&&S7(w.delta,y)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var b=(o.current.shards||[]).map(PC).filter(Boolean).filter(function(w){return w.contains(v.target)}),k=b.length>0?a(v,b[0]):!o.current.noIsolation;k&&v.cancelable&&v.preventDefault()}}},[]),c=O.useCallback(function(m,v,y,x){var b={name:m,delta:v,target:y,should:x,shadowParent:T7(y)};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(k){return k!==b})},1)},[]),u=O.useCallback(function(m){n.current=Rd(m),r.current=void 0},[]),f=O.useCallback(function(m){c(m.type,CC(m),m.target,a(m,t.lockRef.current))},[]),d=O.useCallback(function(m){c(m.type,Rd(m),m.target,a(m,t.lockRef.current))},[]);O.useEffect(function(){return Sa.push(s),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,wa),document.addEventListener("touchmove",l,wa),document.addEventListener("touchstart",u,wa),function(){Sa=Sa.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,wa),document.removeEventListener("touchmove",l,wa),document.removeEventListener("touchstart",u,wa)}},[]);var h=t.removeScrollBar,g=t.inert;return O.createElement(O.Fragment,null,g?O.createElement(s,{styles:k7(i)}):null,h?O.createElement(m7,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function T7(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const E7=n7(oQ,P7);var Zf=O.forwardRef(function(t,e){return O.createElement(tg,fi({},t,{ref:e,sideCar:E7}))});Zf.classNames=tg.classNames;var R7=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ka=new WeakMap,_d=new WeakMap,$d={},DO=0,fQ=function(t){return t&&(t.host||fQ(t.parentNode))},_7=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=fQ(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},$7=function(t,e,n,r){var i=_7(e,Array.isArray(t)?t:[t]);$d[n]||($d[n]=new WeakMap);var s=$d[n],o=[],a=new Set,l=new Set(i),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};i.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else try{var h=d.getAttribute(r),g=h!==null&&h!=="false",m=(ka.get(d)||0)+1,v=(s.get(d)||0)+1;ka.set(d,m),s.set(d,v),o.push(d),m===1&&g&&_d.set(d,!0),v===1&&d.setAttribute(n,"true"),g||d.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",d,y)}})};return u(e),a.clear(),DO++,function(){o.forEach(function(f){var d=ka.get(f)-1,h=s.get(f)-1;ka.set(f,d),s.set(f,h),d||(_d.has(f)||f.removeAttribute(r),_d.delete(f)),h||f.removeAttribute(n)}),DO--,DO||(ka=new WeakMap,ka=new WeakMap,_d=new WeakMap,$d={})}},ng=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=R7(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),$7(r,i,n,"aria-hidden")):function(){return null}};function A7(t){const e=Q7(t),n=O.forwardRef((r,i)=>{const{children:s,...o}=r,a=O.Children.toArray(s),l=a.find(N7);if(l){const c=l.props.children,u=a.map(f=>f===l?O.Children.count(c)>1?O.Children.only(null):O.isValidElement(c)?c.props.children:null:f);return p.jsx(e,{...o,ref:i,children:O.isValidElement(c)?O.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function Q7(t){const e=O.forwardRef((n,r)=>{const{children:i,...s}=n;if(O.isValidElement(i)){const o=M7(i),a=j7(s,i.props);return i.type!==O.Fragment&&(a.ref=r?kn(r,o):o),O.cloneElement(i,a)}return O.Children.count(i)>1?O.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var I7=Symbol("radix.slottable");function N7(t){return O.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===I7}function j7(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function M7(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var rg="Dialog",[dQ]=Cn(rg),[D7,qr]=dQ(rg),hQ=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=O.useRef(null),l=O.useRef(null),[c,u]=qs({prop:r,defaultProp:i??!1,onChange:s,caller:rg});return p.jsx(D7,{scope:e,triggerRef:a,contentRef:l,contentId:Yt(),titleId:Yt(),descriptionId:Yt(),open:c,onOpenChange:u,onOpenToggle:O.useCallback(()=>u(f=>!f),[u]),modal:o,children:n})};hQ.displayName=rg;var pQ="DialogTrigger",L7=O.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=qr(pQ,n),s=Pe(e,i.triggerRef);return p.jsx(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":mw(i.open),...r,ref:s,onClick:ne(t.onClick,i.onOpenToggle)})});L7.displayName=pQ;var hw="DialogPortal",[z7,mQ]=dQ(hw,{forceMount:void 0}),gQ=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,s=qr(hw,e);return p.jsx(z7,{scope:e,forceMount:n,children:O.Children.map(r,o=>p.jsx($t,{present:n||s.open,children:p.jsx(Ff,{asChild:!0,container:i,children:o})}))})};gQ.displayName=hw;var Qp="DialogOverlay",OQ=O.forwardRef((t,e)=>{const n=mQ(Qp,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=qr(Qp,t.__scopeDialog);return s.modal?p.jsx($t,{present:r||s.open,children:p.jsx(V7,{...i,ref:e})}):null});OQ.displayName=Qp;var B7=A7("DialogOverlay.RemoveScroll"),V7=O.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=qr(Qp,n);return p.jsx(Zf,{as:B7,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(ue.div,{"data-state":mw(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Yo="DialogContent",yQ=O.forwardRef((t,e)=>{const n=mQ(Yo,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=qr(Yo,t.__scopeDialog);return p.jsx($t,{present:r||s.open,children:s.modal?p.jsx(F7,{...i,ref:e}):p.jsx(X7,{...i,ref:e})})});yQ.displayName=Yo;var F7=O.forwardRef((t,e)=>{const n=qr(Yo,t.__scopeDialog),r=O.useRef(null),i=Pe(e,n.contentRef,r);return O.useEffect(()=>{const s=r.current;if(s)return ng(s)},[]),p.jsx(vQ,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ne(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ne(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:ne(t.onFocusOutside,s=>s.preventDefault())})}),X7=O.forwardRef((t,e)=>{const n=qr(Yo,t.__scopeDialog),r=O.useRef(!1),i=O.useRef(!1);return p.jsx(vQ,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),vQ=O.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=qr(Yo,n),l=O.useRef(null),c=Pe(e,l);return eg(),p.jsxs(p.Fragment,{children:[p.jsx(Xf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:p.jsx(nc,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":mw(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(Z7,{titleId:a.titleId}),p.jsx(q7,{contentRef:l,descriptionId:a.descriptionId})]})]})}),pw="DialogTitle",xQ=O.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=qr(pw,n);return p.jsx(ue.h2,{id:i.titleId,...r,ref:e})});xQ.displayName=pw;var bQ="DialogDescription",wQ=O.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=qr(bQ,n);return p.jsx(ue.p,{id:i.descriptionId,...r,ref:e})});wQ.displayName=bQ;var SQ="DialogClose",kQ=O.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=qr(SQ,n);return p.jsx(ue.button,{type:"button",...r,ref:e,onClick:ne(t.onClick,()=>i.onOpenChange(!1))})});kQ.displayName=SQ;function mw(t){return t?"open":"closed"}var CQ="DialogTitleWarning",[bxe,PQ]=CW(CQ,{contentName:Yo,titleName:pw,docsSlug:"dialog"}),Z7=({titleId:t})=>{const e=PQ(CQ),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
429
|
+
|
|
430
|
+
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
431
|
+
|
|
432
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return O.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},W7="DialogDescriptionWarning",q7=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${PQ(W7).contentName}}.`;return O.useEffect(()=>{var s;const i=(s=t.current)==null?void 0:s.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},TQ=hQ,EQ=gQ,gw=OQ,Ow=yQ,RQ=xQ,_Q=wQ,Y7=kQ;const Hu=TQ,U7=EQ,$Q=O.forwardRef(({className:t,...e},n)=>p.jsx(gw,{ref:n,className:le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));$Q.displayName=gw.displayName;const Tl=O.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(U7,{children:[p.jsx($Q,{}),p.jsxs(Ow,{ref:r,className:le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...n,children:[e,p.jsxs(Y7,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[p.jsx(zf,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Tl.displayName=Ow.displayName;const Uo=({className:t,...e})=>p.jsx("div",{className:le("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});Uo.displayName="DialogHeader";const Ho=({className:t,...e})=>p.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});Ho.displayName="DialogFooter";const Go=O.forwardRef(({className:t,...e},n)=>p.jsx(RQ,{ref:n,className:le("text-lg font-semibold leading-none tracking-tight",t),...e}));Go.displayName=RQ.displayName;const Ko=O.forwardRef(({className:t,...e},n)=>p.jsx(_Q,{ref:n,className:le("text-sm text-muted-foreground",t),...e}));Ko.displayName=_Q.displayName;var ig="Collapsible",[H7]=Cn(ig),[G7,yw]=H7(ig),AQ=O.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l,c]=qs({prop:r,defaultProp:i??!1,onChange:o,caller:ig});return p.jsx(G7,{scope:n,disabled:s,contentId:Yt(),open:l,onOpenToggle:O.useCallback(()=>c(u=>!u),[c]),children:p.jsx(ue.div,{"data-state":xw(l),"data-disabled":s?"":void 0,...a,ref:e})})});AQ.displayName=ig;var QQ="CollapsibleTrigger",IQ=O.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,i=yw(QQ,n);return p.jsx(ue.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":xw(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:e,onClick:ne(t.onClick,i.onOpenToggle)})});IQ.displayName=QQ;var vw="CollapsibleContent",NQ=O.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=yw(vw,t.__scopeCollapsible);return p.jsx($t,{present:n||i.open,children:({present:s})=>p.jsx(K7,{...r,ref:e,present:s})})});NQ.displayName=vw;var K7=O.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:i,...s}=t,o=yw(vw,n),[a,l]=O.useState(r),c=O.useRef(null),u=Pe(e,c),f=O.useRef(0),d=f.current,h=O.useRef(0),g=h.current,m=o.open||a,v=O.useRef(m),y=O.useRef(void 0);return O.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),_t(()=>{const x=c.current;if(x){y.current=y.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const b=x.getBoundingClientRect();f.current=b.height,h.current=b.width,v.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),l(r)}},[o.open,r]),p.jsx(ue.div,{"data-state":xw(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...s,ref:u,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...t.style},children:m&&i})});function xw(t){return t?"open":"closed"}var J7=AQ;const bw=J7,ww=IQ,Sw=NQ;function e8(t,e=[]){let n=[];function r(s,o){const a=O.createContext(o);a.displayName=s+"Context";const l=n.length;n=[...n,o];const c=f=>{var y;const{scope:d,children:h,...g}=f,m=((y=d==null?void 0:d[t])==null?void 0:y[l])||a,v=O.useMemo(()=>g,Object.values(g));return p.jsx(m.Provider,{value:v,children:h})};c.displayName=s+"Provider";function u(f,d){var m;const h=((m=d==null?void 0:d[t])==null?void 0:m[l])||a,g=O.useContext(h);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=n.map(o=>O.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return O.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,t8(i,...e)]}function t8(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return O.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}var n8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],jQ=n8.reduce((t,e)=>{const n=Xm(`Primitive.${e}`),r=O.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{}),kw="Progress",Cw=100,[r8]=e8(kw),[i8,s8]=r8(kw),MQ=O.forwardRef((t,e)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:s=o8,...o}=t;(i||i===0)&&!TC(i)&&console.error(a8(`${i}`,"Progress"));const a=TC(i)?i:Cw;r!==null&&!EC(r,a)&&console.error(l8(`${r}`,"Progress"));const l=EC(r,a)?r:null,c=Ip(l)?s(l,a):void 0;return p.jsx(i8,{scope:n,value:l,max:a,children:p.jsx(jQ.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Ip(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":zQ(l,a),"data-value":l??void 0,"data-max":a,...o,ref:e})})});MQ.displayName=kw;var DQ="ProgressIndicator",LQ=O.forwardRef((t,e)=>{const{__scopeProgress:n,...r}=t,i=s8(DQ,n);return p.jsx(jQ.div,{"data-state":zQ(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:e})});LQ.displayName=DQ;function o8(t,e){return`${Math.round(t/e*100)}%`}function zQ(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Ip(t){return typeof t=="number"}function TC(t){return Ip(t)&&!isNaN(t)&&t>0}function EC(t,e){return Ip(t)&&!isNaN(t)&&t<=e&&t>=0}function a8(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Cw}\`.`}function l8(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be:
|
|
433
|
+
- a positive number
|
|
434
|
+
- less than the value passed to \`max\` (or ${Cw} if no \`max\` prop is set)
|
|
435
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
436
|
+
|
|
437
|
+
Defaulting to \`null\`.`}var BQ=MQ,c8=LQ;const Pw=O.forwardRef(({className:t,value:e,...n},r)=>p.jsx(BQ,{ref:r,className:le("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...n,children:p.jsx(c8,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(e||0)}%)`}})}));Pw.displayName=BQ.displayName;var u8=O.createContext(void 0);function Wf(t){const e=O.useContext(u8);return t||e||"ltr"}function Ox(t,[e,n]){return Math.min(n,Math.max(e,t))}function f8(t,e){return O.useReducer((n,r)=>e[n][r]??n,t)}var Tw="ScrollArea",[VQ]=Cn(Tw),[d8,xr]=VQ(Tw),FQ=O.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:s=600,...o}=t,[a,l]=O.useState(null),[c,u]=O.useState(null),[f,d]=O.useState(null),[h,g]=O.useState(null),[m,v]=O.useState(null),[y,x]=O.useState(0),[b,k]=O.useState(0),[w,S]=O.useState(!1),[C,_]=O.useState(!1),I=Pe(e,j=>l(j)),E=Wf(i);return p.jsx(d8,{scope:n,type:r,dir:E,scrollHideDelay:s,scrollArea:a,viewport:c,onViewportChange:u,content:f,onContentChange:d,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:w,onScrollbarXEnabledChange:S,scrollbarY:m,onScrollbarYChange:v,scrollbarYEnabled:C,onScrollbarYEnabledChange:_,onCornerWidthChange:x,onCornerHeightChange:k,children:p.jsx(ue.div,{dir:E,...o,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":b+"px",...t.style}})})});FQ.displayName=Tw;var XQ="ScrollAreaViewport",ZQ=O.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:r,nonce:i,...s}=t,o=xr(XQ,n),a=O.useRef(null),l=Pe(e,a,o.onViewportChange);return p.jsxs(p.Fragment,{children:[p.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}),p.jsx(ue.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t.style},children:p.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ZQ.displayName=XQ;var Ti="ScrollAreaScrollbar",Ew=O.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=xr(Ti,t.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:o}=i,a=t.orientation==="horizontal";return O.useEffect(()=>(a?s(!0):o(!0),()=>{a?s(!1):o(!1)}),[a,s,o]),i.type==="hover"?p.jsx(h8,{...r,ref:e,forceMount:n}):i.type==="scroll"?p.jsx(p8,{...r,ref:e,forceMount:n}):i.type==="auto"?p.jsx(WQ,{...r,ref:e,forceMount:n}):i.type==="always"?p.jsx(Rw,{...r,ref:e}):null});Ew.displayName=Ti;var h8=O.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=xr(Ti,t.__scopeScrollArea),[s,o]=O.useState(!1);return O.useEffect(()=>{const a=i.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),o(!0)},u=()=>{l=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",u)}}},[i.scrollArea,i.scrollHideDelay]),p.jsx($t,{present:n||s,children:p.jsx(WQ,{"data-state":s?"visible":"hidden",...r,ref:e})})}),p8=O.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=xr(Ti,t.__scopeScrollArea),s=t.orientation==="horizontal",o=og(()=>l("SCROLL_END"),100),[a,l]=f8("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 O.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,i.scrollHideDelay,l]),O.useEffect(()=>{const c=i.viewport,u=s?"scrollLeft":"scrollTop";if(c){let f=c[u];const d=()=>{const h=c[u];f!==h&&(l("SCROLL"),o()),f=h};return c.addEventListener("scroll",d),()=>c.removeEventListener("scroll",d)}},[i.viewport,s,l,o]),p.jsx($t,{present:n||a!=="hidden",children:p.jsx(Rw,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:e,onPointerEnter:ne(t.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ne(t.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),WQ=O.forwardRef((t,e)=>{const n=xr(Ti,t.__scopeScrollArea),{forceMount:r,...i}=t,[s,o]=O.useState(!1),a=t.orientation==="horizontal",l=og(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;o(a?c:u)}},10);return El(n.viewport,l),El(n.content,l),p.jsx($t,{present:r||s,children:p.jsx(Rw,{"data-state":s?"visible":"hidden",...i,ref:e})})}),Rw=O.forwardRef((t,e)=>{const{orientation:n="vertical",...r}=t,i=xr(Ti,t.__scopeScrollArea),s=O.useRef(null),o=O.useRef(0),[a,l]=O.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=GQ(a.viewport,a.content),u={...r,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:d=>s.current=d,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:d=>o.current=d};function f(d,h){return x8(d,o.current,a,h)}return n==="horizontal"?p.jsx(m8,{...u,ref:e,onThumbPositionChange:()=>{if(i.viewport&&s.current){const d=i.viewport.scrollLeft,h=RC(d,a,i.dir);s.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:d=>{i.viewport&&(i.viewport.scrollLeft=d)},onDragScroll:d=>{i.viewport&&(i.viewport.scrollLeft=f(d,i.dir))}}):n==="vertical"?p.jsx(g8,{...u,ref:e,onThumbPositionChange:()=>{if(i.viewport&&s.current){const d=i.viewport.scrollTop,h=RC(d,a);s.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:d=>{i.viewport&&(i.viewport.scrollTop=d)},onDragScroll:d=>{i.viewport&&(i.viewport.scrollTop=f(d))}}):null}),m8=O.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,s=xr(Ti,t.__scopeScrollArea),[o,a]=O.useState(),l=O.useRef(null),c=Pe(e,l,s.onScrollbarXChange);return O.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(YQ,{"data-orientation":"horizontal",...i,ref:c,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":sg(n)+"px",...t.style},onThumbPointerDown:u=>t.onThumbPointerDown(u.x),onDragScroll:u=>t.onDragScroll(u.x),onWheelScroll:(u,f)=>{if(s.viewport){const d=s.viewport.scrollLeft+u.deltaX;t.onWheelScroll(d),JQ(d,f)&&u.preventDefault()}},onResize:()=>{l.current&&s.viewport&&o&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:jp(o.paddingLeft),paddingEnd:jp(o.paddingRight)}})}})}),g8=O.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,s=xr(Ti,t.__scopeScrollArea),[o,a]=O.useState(),l=O.useRef(null),c=Pe(e,l,s.onScrollbarYChange);return O.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(YQ,{"data-orientation":"vertical",...i,ref:c,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":sg(n)+"px",...t.style},onThumbPointerDown:u=>t.onThumbPointerDown(u.y),onDragScroll:u=>t.onDragScroll(u.y),onWheelScroll:(u,f)=>{if(s.viewport){const d=s.viewport.scrollTop+u.deltaY;t.onWheelScroll(d),JQ(d,f)&&u.preventDefault()}},onResize:()=>{l.current&&s.viewport&&o&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:jp(o.paddingTop),paddingEnd:jp(o.paddingBottom)}})}})}),[O8,qQ]=VQ(Ti),YQ=O.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:s,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:f,...d}=t,h=xr(Ti,n),[g,m]=O.useState(null),v=Pe(e,I=>m(I)),y=O.useRef(null),x=O.useRef(""),b=h.viewport,k=r.content-r.viewport,w=Wt(u),S=Wt(l),C=og(f,10);function _(I){if(y.current){const E=I.clientX-y.current.left,j=I.clientY-y.current.top;c({x:E,y:j})}}return O.useEffect(()=>{const I=E=>{const j=E.target;(g==null?void 0:g.contains(j))&&w(E,k)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[b,g,k,w]),O.useEffect(S,[r,S]),El(g,C),El(h.content,C),p.jsx(O8,{scope:n,scrollbar:g,hasThumb:i,onThumbChange:Wt(s),onThumbPointerUp:Wt(o),onThumbPositionChange:S,onThumbPointerDown:Wt(a),children:p.jsx(ue.div,{...d,ref:v,style:{position:"absolute",...d.style},onPointerDown:ne(t.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),y.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),_(I))}),onPointerMove:ne(t.onPointerMove,_),onPointerUp:ne(t.onPointerUp,I=>{const E=I.target;E.hasPointerCapture(I.pointerId)&&E.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=x.current,h.viewport&&(h.viewport.style.scrollBehavior=""),y.current=null})})})}),Np="ScrollAreaThumb",UQ=O.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=qQ(Np,t.__scopeScrollArea);return p.jsx($t,{present:n||i.hasThumb,children:p.jsx(y8,{ref:e,...r})})}),y8=O.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:r,...i}=t,s=xr(Np,n),o=qQ(Np,n),{onThumbPositionChange:a}=o,l=Pe(e,f=>o.onThumbChange(f)),c=O.useRef(void 0),u=og(()=>{c.current&&(c.current(),c.current=void 0)},100);return O.useEffect(()=>{const f=s.viewport;if(f){const d=()=>{if(u(),!c.current){const h=b8(f,a);c.current=h,a()}};return a(),f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[s.viewport,u,a]),p.jsx(ue.div,{"data-state":o.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ne(t.onPointerDownCapture,f=>{const h=f.target.getBoundingClientRect(),g=f.clientX-h.left,m=f.clientY-h.top;o.onThumbPointerDown({x:g,y:m})}),onPointerUp:ne(t.onPointerUp,o.onThumbPointerUp)})});UQ.displayName=Np;var _w="ScrollAreaCorner",HQ=O.forwardRef((t,e)=>{const n=xr(_w,t.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.jsx(v8,{...t,ref:e}):null});HQ.displayName=_w;var v8=O.forwardRef((t,e)=>{const{__scopeScrollArea:n,...r}=t,i=xr(_w,n),[s,o]=O.useState(0),[a,l]=O.useState(0),c=!!(s&&a);return El(i.scrollbarX,()=>{var f;const u=((f=i.scrollbarX)==null?void 0:f.offsetHeight)||0;i.onCornerHeightChange(u),l(u)}),El(i.scrollbarY,()=>{var f;const u=((f=i.scrollbarY)==null?void 0:f.offsetWidth)||0;i.onCornerWidthChange(u),o(u)}),c?p.jsx(ue.div,{...r,ref:e,style:{width:s,height:a,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function jp(t){return t?parseInt(t,10):0}function GQ(t,e){const n=t/e;return isNaN(n)?0:n}function sg(t){const e=GQ(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function x8(t,e,n,r="ltr"){const i=sg(n),s=i/2,o=e||s,a=i-o,l=n.scrollbar.paddingStart+o,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,f=r==="ltr"?[0,u]:[u*-1,0];return KQ([l,c],f)(t)}function RC(t,e,n="ltr"){const r=sg(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-i,o=e.content-e.viewport,a=s-r,l=n==="ltr"?[0,o]:[o*-1,0],c=Ox(t,l);return KQ([0,o],[0,a])(c)}function KQ(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function JQ(t,e){return t>0&&t<e}var b8=(t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const s={left:t.scrollLeft,top:t.scrollTop},o=n.left!==s.left,a=n.top!==s.top;(o||a)&&e(),n=s,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function og(t,e){const n=Wt(t),r=O.useRef(0);return O.useEffect(()=>()=>window.clearTimeout(r.current),[]),O.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,e)},[n,e])}function El(t,e){const n=Wt(e);_t(()=>{let r=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(t),()=>{window.cancelAnimationFrame(r),i.unobserve(t)}}},[t,n])}var eI=FQ,w8=ZQ,S8=HQ;const sc=O.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(eI,{ref:r,className:le("relative overflow-hidden",t),...n,children:[p.jsx(w8,{className:"h-full w-full rounded-[inherit]",children:e}),p.jsx(tI,{}),p.jsx(S8,{})]}));sc.displayName=eI.displayName;const tI=O.forwardRef(({className:t,orientation:e="vertical",...n},r)=>p.jsx(Ew,{ref:r,orientation:e,className:le("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...n,children:p.jsx(UQ,{className:"relative flex-1 rounded-full bg-border"})}));tI.displayName=Ew.displayName;var k8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],C8=k8.reduce((t,e)=>{const n=Xm(`Primitive.${e}`),r=O.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{}),P8="Separator",_C="horizontal",T8=["horizontal","vertical"],nI=O.forwardRef((t,e)=>{const{decorative:n,orientation:r=_C,...i}=t,s=E8(r)?r:_C,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(C8.div,{"data-orientation":s,...a,...i,ref:e})});nI.displayName=P8;function E8(t){return T8.includes(t)}var rI=nI;const iI=O.forwardRef(({className:t,orientation:e="horizontal",decorative:n=!0,...r},i)=>p.jsx(rI,{ref:i,decorative:n,orientation:e,className:le("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...r}));iI.displayName=rI.displayName;const R8=nw("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",success:"border-transparent bg-green-500/10 text-green-600 dark:text-green-400",warning:"border-transparent bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",info:"border-transparent bg-blue-500/10 text-blue-600 dark:text-blue-400"}},defaultVariants:{variant:"default"}});function Ot({className:t,variant:e,...n}){return p.jsx("div",{className:le(R8({variant:e}),t),...n})}function $C(t){const e=_8(t),n=O.forwardRef((r,i)=>{const{children:s,...o}=r,a=O.Children.toArray(s),l=a.find(A8);if(l){const c=l.props.children,u=a.map(f=>f===l?O.Children.count(c)>1?O.Children.only(null):O.isValidElement(c)?c.props.children:null:f);return p.jsx(e,{...o,ref:i,children:O.isValidElement(c)?O.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function _8(t){const e=O.forwardRef((n,r)=>{const{children:i,...s}=n;if(O.isValidElement(i)){const o=I8(i),a=Q8(s,i.props);return i.type!==O.Fragment&&(a.ref=r?kn(r,o):o),O.cloneElement(i,a)}return O.Children.count(i)>1?O.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var $8=Symbol("radix.slottable");function A8(t){return O.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===$8}function Q8(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function I8(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function $w(t){const e=t+"CollectionProvider",[n,r]=Cn(e),[i,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:v,children:y}=m,x=ee.useRef(null),b=ee.useRef(new Map).current;return p.jsx(i,{scope:v,itemMap:b,collectionRef:x,children:y})};o.displayName=e;const a=t+"CollectionSlot",l=$C(a),c=ee.forwardRef((m,v)=>{const{scope:y,children:x}=m,b=s(a,y),k=Pe(v,b.collectionRef);return p.jsx(l,{ref:k,children:x})});c.displayName=a;const u=t+"CollectionItemSlot",f="data-radix-collection-item",d=$C(u),h=ee.forwardRef((m,v)=>{const{scope:y,children:x,...b}=m,k=ee.useRef(null),w=Pe(v,k),S=s(u,y);return ee.useEffect(()=>(S.itemMap.set(k,{ref:k,...b}),()=>void S.itemMap.delete(k))),p.jsx(d,{[f]:"",ref:w,children:x})});h.displayName=u;function g(m){const v=s(t+"CollectionConsumer",m);return ee.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((S,C)=>b.indexOf(S.ref.current)-b.indexOf(C.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:c,ItemSlot:h},g,r]}var LO="rovingFocusGroup.onEntryFocus",N8={bubbles:!1,cancelable:!0},qf="RovingFocusGroup",[yx,sI,j8]=$w(qf),[M8,oc]=Cn(qf,[j8]),[D8,L8]=M8(qf),oI=O.forwardRef((t,e)=>p.jsx(yx.Provider,{scope:t.__scopeRovingFocusGroup,children:p.jsx(yx.Slot,{scope:t.__scopeRovingFocusGroup,children:p.jsx(z8,{...t,ref:e})})}));oI.displayName=qf;var z8=O.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=t,d=O.useRef(null),h=Pe(e,d),g=Wf(s),[m,v]=qs({prop:o,defaultProp:a??null,onChange:l,caller:qf}),[y,x]=O.useState(!1),b=Wt(c),k=sI(n),w=O.useRef(!1),[S,C]=O.useState(0);return O.useEffect(()=>{const _=d.current;if(_)return _.addEventListener(LO,b),()=>_.removeEventListener(LO,b)},[b]),p.jsx(D8,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:m,onItemFocus:O.useCallback(_=>v(_),[v]),onItemShiftTab:O.useCallback(()=>x(!0),[]),onFocusableItemAdd:O.useCallback(()=>C(_=>_+1),[]),onFocusableItemRemove:O.useCallback(()=>C(_=>_-1),[]),children:p.jsx(ue.div,{tabIndex:y||S===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...t.style},onMouseDown:ne(t.onMouseDown,()=>{w.current=!0}),onFocus:ne(t.onFocus,_=>{const I=!w.current;if(_.target===_.currentTarget&&I&&!y){const E=new CustomEvent(LO,N8);if(_.currentTarget.dispatchEvent(E),!E.defaultPrevented){const j=k().filter(W=>W.focusable),A=j.find(W=>W.active),L=j.find(W=>W.id===m),X=[A,L,...j].filter(Boolean).map(W=>W.ref.current);cI(X,u)}}w.current=!1}),onBlur:ne(t.onBlur,()=>x(!1))})})}),aI="RovingFocusGroupItem",lI=O.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:o,...a}=t,l=Yt(),c=s||l,u=L8(aI,n),f=u.currentTabStopId===c,d=sI(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:m}=u;return O.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),p.jsx(yx.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:p.jsx(ue.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...a,ref:e,onMouseDown:ne(t.onMouseDown,v=>{r?u.onItemFocus(c):v.preventDefault()}),onFocus:ne(t.onFocus,()=>u.onItemFocus(c)),onKeyDown:ne(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=F8(v,u.orientation,u.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=d().filter(k=>k.focusable).map(k=>k.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const k=b.indexOf(v.currentTarget);b=u.loop?X8(b,k+1):b.slice(k+1)}setTimeout(()=>cI(b))}}),children:typeof o=="function"?o({isCurrentTabStop:f,hasTabStop:m!=null}):o})})});lI.displayName=aI;var B8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function V8(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function F8(t,e,n){const r=V8(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return B8[r]}function cI(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function X8(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var Aw=oI,Qw=lI;function uI(t){const e=O.useRef({value:t,previous:t});return O.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var Iw="Radio",[Z8,fI]=Cn(Iw),[W8,q8]=Z8(Iw),dI=O.forwardRef((t,e)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,form:c,...u}=t,[f,d]=O.useState(null),h=Pe(e,v=>d(v)),g=O.useRef(!1),m=f?c||!!f.closest("form"):!0;return p.jsxs(W8,{scope:n,checked:i,disabled:o,children:[p.jsx(ue.button,{type:"button",role:"radio","aria-checked":i,"data-state":gI(i),"data-disabled":o?"":void 0,disabled:o,value:a,...u,ref:h,onClick:ne(t.onClick,v=>{i||l==null||l(),m&&(g.current=v.isPropagationStopped(),g.current||v.stopPropagation())})}),m&&p.jsx(mI,{control:f,bubbles:!g.current,name:r,value:a,checked:i,required:s,disabled:o,form:c,style:{transform:"translateX(-100%)"}})]})});dI.displayName=Iw;var hI="RadioIndicator",pI=O.forwardRef((t,e)=>{const{__scopeRadio:n,forceMount:r,...i}=t,s=q8(hI,n);return p.jsx($t,{present:r||s.checked,children:p.jsx(ue.span,{"data-state":gI(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:e})})});pI.displayName=hI;var Y8="RadioBubbleInput",mI=O.forwardRef(({__scopeRadio:t,control:e,checked:n,bubbles:r=!0,...i},s)=>{const o=O.useRef(null),a=Pe(o,s),l=uI(n),c=jA(e);return O.useEffect(()=>{const u=o.current;if(!u)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&h){const g=new Event("click",{bubbles:r});h.call(u,n),u.dispatchEvent(g)}},[l,n,r]),p.jsx(ue.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:a,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});mI.displayName=Y8;function gI(t){return t?"checked":"unchecked"}var U8=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ag="RadioGroup",[H8]=Cn(ag,[oc,fI]),OI=oc(),yI=fI(),[G8,K8]=H8(ag),vI=O.forwardRef((t,e)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:u=!0,onValueChange:f,...d}=t,h=OI(n),g=Wf(c),[m,v]=qs({prop:s,defaultProp:i??null,onChange:f,caller:ag});return p.jsx(G8,{scope:n,name:r,required:o,disabled:a,value:m,onValueChange:v,children:p.jsx(Aw,{asChild:!0,...h,orientation:l,dir:g,loop:u,children:p.jsx(ue.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:g,...d,ref:e})})})});vI.displayName=ag;var xI="RadioGroupItem",bI=O.forwardRef((t,e)=>{const{__scopeRadioGroup:n,disabled:r,...i}=t,s=K8(xI,n),o=s.disabled||r,a=OI(n),l=yI(n),c=O.useRef(null),u=Pe(e,c),f=s.value===i.value,d=O.useRef(!1);return O.useEffect(()=>{const h=m=>{U8.includes(m.key)&&(d.current=!0)},g=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",g)}},[]),p.jsx(Qw,{asChild:!0,...a,focusable:!o,active:f,children:p.jsx(dI,{disabled:o,required:s.required,checked:f,...l,...i,name:s.name,ref:u,onCheck:()=>s.onValueChange(i.value),onKeyDown:ne(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:ne(i.onFocus,()=>{var h;d.current&&((h=c.current)==null||h.click())})})})});bI.displayName=xI;var J8="RadioGroupIndicator",wI=O.forwardRef((t,e)=>{const{__scopeRadioGroup:n,...r}=t,i=yI(n);return p.jsx(pI,{...i,...r,ref:e})});wI.displayName=J8;var SI=vI,kI=bI,eq=wI;const CI=O.forwardRef(({className:t,...e},n)=>p.jsx(SI,{className:le("grid gap-2",t),...e,ref:n}));CI.displayName=SI.displayName;const PI=O.forwardRef(({className:t,...e},n)=>p.jsx(kI,{ref:n,className:le("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:p.jsx(eq,{className:"flex items-center justify-center",children:p.jsx(du,{className:"h-2.5 w-2.5 fill-current text-current"})})}));PI.displayName=kI.displayName;var tq=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],nq=tq.reduce((t,e)=>{const n=Xm(`Primitive.${e}`),r=O.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{}),rq="Label",TI=O.forwardRef((t,e)=>p.jsx(nq.label,{...t,ref:e,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=t.onMouseDown)==null||i.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));TI.displayName=rq;var EI=TI;const iq=nw("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Te=O.forwardRef(({className:t,...e},n)=>p.jsx(EI,{ref:n,className:le(iq(),t),...e}));Te.displayName=EI.displayName;function zo({checked:t,onCheckedChange:e,className:n}){return p.jsx("button",{role:"switch","aria-checked":t,onClick:()=>e(!t),className:le("relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t?"bg-primary":"bg-input",n),children:p.jsx("span",{className:le("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform",t?"translate-x-4":"translate-x-0")})})}function RI(t){if(!t)return"Never";const e=new Date(t),r=new Date().getTime()-e.getTime(),i=Math.floor(r/6e4),s=Math.floor(i/60),o=Math.floor(s/24);return i<1?"Just now":i<60?`${i}m ago`:s<24?`${s}h ago`:o<7?`${o}d ago`:e.toLocaleDateString()}function AC({type:t,selected:e,count:n,lastSync:r,disabled:i}){const s=t==="notes"?Sn:sn,o=t==="notes"?"Docs":"Code",a=t==="notes"?"text-blue-500":"text-orange-500",l=t==="notes"?"Markdown files from vault":"Source code symbols";return p.jsxs(Te,{htmlFor:`sync-${t}`,className:le("flex items-start gap-3 rounded-lg border p-4 cursor-pointer transition-colors",e&&!i&&"border-primary bg-primary/5",i&&"opacity-50 cursor-not-allowed"),children:[p.jsx(PI,{value:t,id:`sync-${t}`,disabled:i,className:"mt-0.5"}),p.jsxs("div",{className:"flex-1 space-y-1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(s,{className:le("h-4 w-4",a)}),p.jsx("span",{className:"font-medium",children:o}),i&&p.jsx(Ot,{variant:"secondary",className:"text-[10px]",children:"Not configured"})]}),p.jsx("p",{className:"text-sm text-muted-foreground",children:l}),p.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(aA,{className:"h-3 w-3"}),n," indexed"]}),p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(Lf,{className:"h-3 w-3"}),RI(r)]})]})]})]})}function ti(t){return t.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function sq({type:t}){switch(t){case"success":return p.jsx(Ki,{className:"h-3.5 w-3.5 text-green-500 flex-shrink-0"});case"error":return p.jsx(Or,{className:"h-3.5 w-3.5 text-red-500 flex-shrink-0"});case"warning":return p.jsx(Or,{className:"h-3.5 w-3.5 text-yellow-500 flex-shrink-0"});default:return p.jsx(ui,{className:"h-3.5 w-3.5 text-blue-500 flex-shrink-0"})}}function _I(t){if(t.includes("not found: No such file or directory"))return"Index corrupted. Please clear the index and re-sync.";if(t.includes("LanceError")||t.includes("lance error"))return"Database error. Try clearing the index and re-syncing.";if(t.includes("ENOENT")||t.includes("EACCES"))return"File access error. Check file permissions.";if(t.includes("ENOSPC"))return"Disk full. Free up space and try again.";if(t.includes("Task not active"))return"Sync task was interrupted. Please try again.";if(t.length>150){const e=t.split(`
|
|
438
|
+
`)[0];return e.length>150?e.slice(0,147)+"...":e}return t}function $I(t){switch(t){case"analyzing":return"Analyzing changes...";case"embedding":return"Generating embeddings...";case"indexing":return"Indexing files...";case"deleting":return"Removing deleted files...";case"graph":return"Building code graph...";case"loading":return"Loading chunks...";case"parsing":return"Parsing files...";case"resolving":return"Resolving imports...";case"semantic":return"Semantic analysis...";case"building":return"Building structure...";case"tree":return"Building file tree...";case"stats":return"Computing statistics...";case"done":return"Done";default:return"Processing..."}}function oq({progress:t,type:e}){const n=e==="notes"?Sn:sn,r=e==="notes"?"Docs":"Code",i=e==="notes"?"text-blue-500":"text-orange-500",s=t.status==="completed",o=t.status==="error",a=t.status==="syncing",l=t.status==="paused";return p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(n,{className:le("h-5 w-5",i)}),p.jsx("span",{className:"font-medium",children:r})]}),s&&p.jsx(Ot,{variant:"success",children:"Complete"}),o&&p.jsx(Ot,{variant:"destructive",children:"Error"}),l&&p.jsx(Ot,{variant:"outline",children:"Paused"}),a&&p.jsx(Ot,{variant:"secondary",children:$I(t.phase)})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(Pw,{value:t.progress,className:"flex-1 h-2"}),p.jsxs("span",{className:"text-sm font-medium font-mono min-w-[4rem] text-right",children:[t.processed,"/",t.total]})]}),t.current&&(a||l)&&p.jsx("p",{className:"text-sm text-muted-foreground truncate font-mono",children:t.current})]}),p.jsxs("div",{className:"space-y-1",children:[p.jsxs("p",{className:"text-xs text-muted-foreground",children:[e==="notes"?"Docs":"Symbols",":"]}),p.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(Jb,{className:"h-3.5 w-3.5 text-green-500"}),p.jsxs("span",{children:[t.added," added"]})]}),p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(TZ,{className:"h-3.5 w-3.5 text-blue-500"}),p.jsxs("span",{children:[t.updated," updated"]})]}),p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(tw,{className:"h-3.5 w-3.5 text-red-500"}),p.jsxs("span",{children:[t.deleted," deleted"]})]})]})]}),o&&t.error&&p.jsx("div",{className:"rounded-md bg-red-500/10 p-3 text-sm text-red-600 dark:text-red-400",children:_I(t.error)})]})}function aq({open:t,onOpenChange:e}){const{notesSyncProgress:n,codeSyncProgress:r,syncNotes:i,syncCode:s,pauseSync:o,resumeSync:a,cancelSync:l,resetProgress:c,checkSyncStatus:u,lastCompleted:f}=Mf(),[d,h]=O.useState("select"),[g,m]=O.useState("notes"),[v,y]=O.useState(!1),[x,b]=O.useState({notesCount:0,codeCount:0,notesLastSync:null,codeLastSync:null,codeEnabled:!1}),[k,w]=O.useState([]),S=O.useRef(null),C=g==="notes"?n:r,_=(C==null?void 0:C.status)==="syncing",I=(C==null?void 0:C.status)==="paused",E=d==="progress"&&(C==null?void 0:C.status)==="completed",j=(C==null?void 0:C.status)==="error",A=_||I;O.useEffect(()=>{t&&(w([]),u(),fetch("/api/project/stats").then(M=>M.json()).then(M=>{b({notesCount:M.notesCount??0,codeCount:M.codeCount??0,notesLastSync:M.notesLastSync??null,codeLastSync:M.codeLastSync??null,codeEnabled:M.codeEnabled??!1})}).catch(()=>{}))},[t,u]),O.useEffect(()=>{if(!t)return;const M=(n==null?void 0:n.status)==="syncing"||(n==null?void 0:n.status)==="paused",$=(r==null?void 0:r.status)==="syncing"||(r==null?void 0:r.status)==="paused";M&&d==="select"?(m("notes"),h("progress")):$&&d==="select"&&(m("code"),h("progress"))},[t,n==null?void 0:n.status,r==null?void 0:r.status,d]);const L=O.useRef(void 0);O.useEffect(()=>{if(C!=null&&C.current&&_&&d==="progress"){const M={timestamp:ti(new Date),message:C.current,type:"info",file:C.current};w($=>[...$.slice(-199),M])}},[C==null?void 0:C.current,_,d]),O.useEffect(()=>{if(!_||d!=="progress")return;const M=C==null?void 0:C.phase;if(M&&M!==L.current){L.current=M;const $=$I(M),R={timestamp:ti(new Date),message:`Phase: ${$}`,type:"info"};w(q=>[...q.slice(-199),R])}},[C==null?void 0:C.phase,_,d]),O.useEffect(()=>{if(I&&d==="progress"){const M={timestamp:ti(new Date),message:"Sync paused",type:"warning"};w($=>[...$.slice(-99),M])}},[I,d]),O.useEffect(()=>{if(E&&C){const M=g==="notes"?"docs":"symbols",$={timestamp:ti(new Date),message:`Sync completed: ${C.added} ${M} added, ${C.updated} updated, ${C.deleted} deleted`,type:"success"};w(R=>[...R.slice(-99),$])}},[E,C==null?void 0:C.status,g]),O.useEffect(()=>{if(j&&(C!=null&&C.error)){const M={timestamp:ti(new Date),message:`Error: ${_I(C.error)}`,type:"error"};w($=>[...$.slice(-199),M])}},[j,C==null?void 0:C.error]),O.useEffect(()=>{var M;(M=S.current)==null||M.scrollIntoView({behavior:"smooth"})},[k]);const z=O.useCallback(()=>{e(!1),A||(h("select"),w([]),y(!1),setTimeout(()=>{c("all")},500))},[A,e,c]),X=()=>{h("progress"),w([{timestamp:ti(new Date),message:`Starting ${g} sync${v&&g==="code"?" (force)":""}...`,type:"info"}]),g==="notes"?i({force:v}):s({force:v})},W=async()=>{await o()&&w($=>[...$.slice(-99),{timestamp:ti(new Date),message:"Pause requested...",type:"info"}])},F=async()=>{await a()&&w($=>[...$.slice(-99),{timestamp:ti(new Date),message:"Resuming sync...",type:"info"}])},N=async()=>{await l()&&w($=>[...$.slice(-99),{timestamp:ti(new Date),message:"Cancelling sync...",type:"warning"}])},Q=()=>{w([{timestamp:ti(new Date),message:"Retrying sync...",type:"info"}]),g==="notes"?i():s()},P=g==="notes"||x.codeEnabled;return p.jsx(Hu,{open:t,onOpenChange:z,children:p.jsx(Tl,{className:"max-w-[846px] gap-3",children:d==="select"?p.jsxs(p.Fragment,{children:[p.jsxs(Uo,{children:[p.jsxs(Go,{className:"flex items-center gap-2",children:[p.jsx(ui,{className:"h-5 w-5"}),"Sync Index"]}),p.jsx(Ko,{children:"Select what to synchronize with the search index."})]}),f&&p.jsxs(bw,{className:"rounded-lg border bg-muted/20",children:[p.jsxs(ww,{className:"flex items-center justify-between w-full px-4 py-3 hover:bg-muted/50 transition-colors [&[data-state=open]>svg.chevron]:rotate-180",children:[p.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[p.jsx(Lf,{className:"h-4 w-4 text-muted-foreground"}),p.jsx("span",{className:"font-medium",children:"Last Sync:"}),p.jsx("span",{className:"capitalize text-muted-foreground",children:f.type}),p.jsx("span",{className:"text-muted-foreground",children:"•"}),p.jsxs("span",{className:"flex items-center gap-1",children:[f.status==="completed"?p.jsx(Ki,{className:"h-3 w-3 text-green-500"}):p.jsx(Or,{className:"h-3 w-3 text-red-500"}),p.jsx("span",{className:f.status==="completed"?"text-green-600":"text-red-600",children:f.status==="completed"?"Success":"Failed"})]}),p.jsx("span",{className:"text-muted-foreground",children:"•"}),p.jsx("span",{className:"text-muted-foreground",children:RI(new Date(f.completedAt).toISOString())})]}),p.jsx(pa,{className:"chevron h-4 w-4 text-muted-foreground transition-transform duration-200"})]}),p.jsx(Sw,{children:p.jsx("div",{className:"px-4 pb-3 pt-1 border-t",children:p.jsxs("div",{className:"grid grid-cols-2 gap-1 text-sm mt-2",children:[p.jsx("div",{className:"text-muted-foreground",children:"Started:"}),p.jsx("div",{children:new Date(f.startedAt).toLocaleString()}),p.jsx("div",{className:"text-muted-foreground",children:"Completed:"}),p.jsx("div",{children:new Date(f.completedAt).toLocaleString()}),p.jsx("div",{className:"text-muted-foreground",children:"Duration:"}),p.jsxs("div",{children:[Math.round((f.completedAt-f.startedAt)/1e3),"s"]}),p.jsx("div",{className:"text-muted-foreground",children:"Total Files:"}),p.jsx("div",{children:f.totalFiles}),p.jsx("div",{className:"text-muted-foreground",children:"Changes:"}),p.jsxs("div",{children:[f.stats.added>0&&p.jsxs("span",{className:"text-green-600",children:["+",f.stats.added," added"]}),f.stats.added>0&&f.stats.deleted>0&&p.jsx("span",{className:"mx-1",children:"•"}),f.stats.deleted>0&&p.jsxs("span",{className:"text-red-600",children:["-",f.stats.deleted," deleted"]}),f.stats.added===0&&f.stats.deleted===0&&p.jsx("span",{className:"text-muted-foreground",children:"No changes"})]})]})})})]}),p.jsxs(CI,{value:g,onValueChange:M=>m(M),className:"space-y-1",children:[p.jsx(AC,{type:"notes",selected:g==="notes",count:x.notesCount,lastSync:x.notesLastSync}),p.jsx(AC,{type:"code",selected:g==="code",count:x.codeCount,lastSync:x.codeLastSync,disabled:!x.codeEnabled})]}),p.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-4",children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs(Te,{htmlFor:"force-reindex",className:"flex items-center gap-2",children:[p.jsx(tw,{className:"h-4 w-4 text-orange-500"}),"Force Full Reindex"]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Clear existing index and rebuild from scratch"})]}),p.jsx(zo,{checked:v,onCheckedChange:y})]}),p.jsxs(Ho,{children:[p.jsx(Se,{variant:"outline",onClick:z,children:"Cancel"}),p.jsxs(Se,{onClick:X,disabled:!P,children:[p.jsx(ui,{className:"h-4 w-4 mr-2"}),"Start Sync"]})]})]}):p.jsxs(p.Fragment,{children:[p.jsxs(Uo,{children:[p.jsxs(Go,{className:"flex items-center gap-2",children:[_&&p.jsx(ui,{className:"h-5 w-5 animate-spin"}),I&&p.jsx(Pp,{className:"h-5 w-5 text-yellow-500"}),E&&p.jsx(Ki,{className:"h-5 w-5 text-green-500"}),j&&!A&&p.jsx(Or,{className:"h-5 w-5 text-red-500"}),I?"Sync Paused":"Syncing Index"]}),p.jsxs(Ko,{children:[_&&"Synchronizing files with the index...",I&&"Sync paused. Click Resume to continue.",E&&"Sync completed successfully.",j&&!A&&"Sync encountered errors."]})]}),p.jsxs("div",{className:"space-y-4",children:[C?p.jsx(oq,{progress:C,type:g}):p.jsxs("div",{className:"flex items-center gap-3 p-4 rounded-md border",children:[g==="notes"?p.jsx(Sn,{className:"h-5 w-5 text-blue-500"}):p.jsx(sn,{className:"h-5 w-5 text-orange-500"}),p.jsx("span",{className:"font-medium",children:g==="notes"?"Docs":"Code"}),p.jsx(ui,{className:"h-4 w-4 animate-spin ml-auto text-muted-foreground"}),p.jsx("span",{className:"text-sm text-muted-foreground",children:"Starting..."})]}),k.length>0&&p.jsxs(p.Fragment,{children:[p.jsx(iI,{}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("h4",{className:"text-sm font-medium",children:"Log"}),p.jsx(sc,{className:"h-[150px] rounded-md border bg-muted/30",children:p.jsxs("div",{className:"p-3 space-y-1 font-mono text-xs",children:[k.map((M,$)=>p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx("span",{className:"text-muted-foreground w-16 flex-shrink-0",children:M.timestamp}),p.jsx(sq,{type:M.type}),p.jsx("span",{className:le("flex-1",M.type==="error"&&"text-red-500",M.type==="success"&&"text-green-500",M.type==="warning"&&"text-yellow-500"),children:M.message})]},$)),p.jsx("div",{ref:S})]})})]})]})]}),p.jsxs(Ho,{className:"flex-wrap gap-2",children:[A&&p.jsxs("div",{className:"flex gap-2 mr-auto",children:[I?p.jsxs(Se,{variant:"outline",size:"sm",onClick:F,children:[p.jsx(CZ,{className:"h-4 w-4 mr-1"}),"Resume"]}):p.jsxs(Se,{variant:"outline",size:"sm",onClick:W,children:[p.jsx(Pp,{className:"h-4 w-4 mr-1"}),"Pause"]}),p.jsxs(Se,{variant:"outline",size:"sm",onClick:N,children:[p.jsx(EZ,{className:"h-4 w-4 mr-1"}),"Cancel"]})]}),j&&!A&&p.jsxs(Se,{variant:"outline",onClick:Q,children:[p.jsx(ui,{className:"h-4 w-4 mr-2"}),"Retry"]}),p.jsx(Se,{variant:A?"outline":"default",onClick:z,disabled:A,children:A?I?"Paused...":"Syncing...":"Close"})]})]})})})}function lq(){const[t,e]=O.useState(!1);return{isOpen:t,setIsOpen:e,openSyncDialog:()=>{e(!0)}}}function AI(){const t=ec(),{currentProject:e,closeProject:n,clearError:r}=ha(),{openCommandPalette:i}=Ap(),{notesSyncProgress:s,codeSyncProgress:o}=Mf(),{openSettings:a,openCreateWizard:l}=ma(),[c,u]=O.useState(!1),{isOpen:f,setIsOpen:d,openSyncDialog:h}=lq(),g=jf(C=>C.voyageApiKey),m=(e==null?void 0:e.embeddingProvider)==="voyage"&&!(g!=null&&g.trim()),v=()=>{r(),t("/"),n().catch(console.error)},y=(s==null?void 0:s.status)==="syncing"||(o==null?void 0:o.status)==="syncing",x=(s==null?void 0:s.status)==="paused"||(o==null?void 0:o.status)==="paused",b=(s==null?void 0:s.status)==="completed"||(o==null?void 0:o.status)==="completed",k=y||x,w=(s==null?void 0:s.status)==="syncing"||(s==null?void 0:s.status)==="paused"?s:(o==null?void 0:o.status)==="syncing"||(o==null?void 0:o.status)==="paused"?o:null,S=()=>{u(!c),document.documentElement.classList.toggle("dark")};return p.jsxs("header",{className:"border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:[p.jsxs("div",{className:"flex h-14 items-center px-4 gap-4",children:[p.jsx("div",{className:"flex items-center gap-2 min-w-[200px]",children:p.jsx(Uu,{children:e?p.jsxs(p.Fragment,{children:[p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Se,{variant:"ghost",size:"sm",onClick:v,className:"h-7 px-2 text-muted-foreground hover:text-foreground",children:p.jsx(kZ,{className:"h-4 w-4"})})}),p.jsx(On,{children:"Close Project"})]}),p.jsx("span",{className:"font-semibold text-sm",children:e.name})]}):p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"font-semibold text-lg",children:"RAG"}),p.jsxs(Se,{variant:"outline",size:"sm",onClick:l,className:"ml-2",children:[p.jsx(Eh,{className:"h-4 w-4 mr-2"}),"Create Project"]})]})})}),p.jsx("div",{className:"flex-1 flex justify-center",children:p.jsxs("button",{onClick:i,className:"w-full max-w-md flex items-center gap-2 h-9 px-3 rounded-md border border-input bg-background text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors",children:[p.jsx(ew,{className:"h-4 w-4"}),p.jsx("span",{className:"flex-1 text-left",children:"Search docs, code, symbols..."}),p.jsxs("kbd",{className:"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground",children:[p.jsx("span",{className:"text-xs",children:"Cmd"}),"K"]})]})}),p.jsx("div",{className:"flex items-center gap-2 min-w-[200px] justify-end",children:p.jsxs(Uu,{children:[e&&p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsxs(Se,{variant:"ghost",size:k?"sm":"icon",onClick:h,className:k?"gap-1.5 px-2":"",children:[x?p.jsx(Pp,{className:"h-4 w-4 text-yellow-500"}):y?p.jsx(ui,{className:"h-4 w-4 animate-spin text-blue-500"}):b?p.jsx(Ki,{className:"h-4 w-4 text-green-500"}):p.jsx(ui,{className:"h-4 w-4"}),k&&w&&p.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:[w.processed,"/",w.total]})]})}),p.jsx(On,{children:x?"Sync Paused":y?"Syncing...":b?"Synced":"Sync Index"})]}),p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Se,{variant:"ghost",size:"icon",onClick:S,children:c?p.jsx(_Z,{className:"h-4 w-4"}):p.jsx(SZ,{className:"h-4 w-4"})})}),p.jsx(On,{children:"Toggle Dark Mode"})]}),e&&p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsxs(Se,{variant:"ghost",size:"icon",onClick:a,className:"relative",children:[p.jsx(uA,{className:"h-4 w-4"}),m&&p.jsx(fA,{className:"h-3 w-3 text-yellow-500 absolute -top-0.5 -right-0.5"})]})}),p.jsx(On,{children:m?"Settings - API key required":"Project Settings"})]})]})})]}),p.jsx(aq,{open:f,onOpenChange:d})]})}var lg="Tabs",[cq]=Cn(lg,[oc]),QI=oc(),[uq,Nw]=cq(lg),II=O.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:s,orientation:o="horizontal",dir:a,activationMode:l="automatic",...c}=t,u=Wf(a),[f,d]=qs({prop:r,onChange:i,defaultProp:s??"",caller:lg});return p.jsx(uq,{scope:n,baseId:Yt(),value:f,onValueChange:d,orientation:o,dir:u,activationMode:l,children:p.jsx(ue.div,{dir:u,"data-orientation":o,...c,ref:e})})});II.displayName=lg;var NI="TabsList",jI=O.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...i}=t,s=Nw(NI,n),o=QI(n);return p.jsx(Aw,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:r,children:p.jsx(ue.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:e})})});jI.displayName=NI;var MI="TabsTrigger",DI=O.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...s}=t,o=Nw(MI,n),a=QI(n),l=BI(o.baseId,r),c=VI(o.baseId,r),u=r===o.value;return p.jsx(Qw,{asChild:!0,...a,focusable:!i,active:u,children:p.jsx(ue.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...s,ref:e,onMouseDown:ne(t.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:ne(t.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:ne(t.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!i&&f&&o.onValueChange(r)})})})});DI.displayName=MI;var LI="TabsContent",zI=O.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:i,children:s,...o}=t,a=Nw(LI,n),l=BI(a.baseId,r),c=VI(a.baseId,r),u=r===a.value,f=O.useRef(u);return O.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),p.jsx($t,{present:i||u,children:({present:d})=>p.jsx(ue.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!d,id:c,tabIndex:0,...o,ref:e,style:{...t.style,animationDuration:f.current?"0s":void 0},children:d&&s})})});zI.displayName=LI;function BI(t,e){return`${t}-trigger-${e}`}function VI(t,e){return`${t}-content-${e}`}var fq=II,FI=jI,XI=DI,ZI=zI;const jw=fq,cg=O.forwardRef(({className:t,...e},n)=>p.jsx(FI,{ref:n,className:le("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...e}));cg.displayName=FI.displayName;const Rl=O.forwardRef(({className:t,...e},n)=>p.jsx(XI,{ref:n,className:le("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...e}));Rl.displayName=XI.displayName;const Qo=O.forwardRef(({className:t,...e},n)=>p.jsx(ZI,{ref:n,className:le("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=inactive]:hidden",t),...e}));Qo.displayName=ZI.displayName;const WI=O.createContext(null);function Kn(){const t=O.useContext(WI);if(t===null)throw new Error("No Tree Api Provided");return t}const qI=O.createContext(null);function dq(){const t=O.useContext(qI);if(t===null)throw new Error("Provide a NodesContext");return t}const YI=O.createContext(null);function hq(){const t=O.useContext(YI);if(t===null)throw new Error("Provide a DnDContext");return t}const UI=O.createContext(0);function HI(){O.useContext(UI)}function Ah(t,e,n){return Math.max(Math.min(t,n),e)}function GI(t){return t&&t.isLeaf}function KI(t){return t&&t.isInternal&&!t.isOpen}function JI(t){var e;return t&&t.isOpen&&!(!((e=t.children)===null||e===void 0)&&e.length)}const eN=(t,e)=>{let n=t;for(;n;){if(n.id===e.id)return!0;n=n.parent}return!1},tN=t=>{if(!t.parent)throw Error("Node does not have a parent");return t.parent.children.findIndex(e=>e.id===t.id)};function Mw(t,e){if(!t)return null;if(t.id===e)return t;if(t.children)for(let n of t.children){const r=Mw(n,e);if(r)return r}return null}function Mp(t,e){if(e(t),t.children)for(let n of t.children)Mp(n,e)}function nN(t){const e=iN(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=pq(e,r);break}n==null||n.focus()}function rN(t){const e=iN(t);let n;for(let r=0;r<e.length;++r)if(e[r]===t){n=mq(e,r);break}n==null||n.focus()}function pq(t,e){return e+1<t.length?t[e+1]:t[0]}function mq(t,e){return e-1>=0?t[e-1]:t[t.length-1]}function iN(t){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter(e=>e===t||!t.contains(e))}function Uc(t,e){return typeof e=="boolean"?e:typeof e=="string"?t[e]:e(t)}function sN(t){return t===null?null:So(t)}function So(t){return typeof t=="string"?t:t.id}function oN(t,...e){if(t)return t(...e)}function aN(t){return new Promise((e,n)=>{let r=0;function i(){r+=1,r===100&&n(),t()?e():setTimeout(i,10)}i()})}function lN(t){var e,n;const r=t.focusedNode;return r?r.isOpen?0:r.parent?r.childIndex+1:0:(n=(e=t.root.children)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0}function cN(t){const e=t.focusedNode;return e?e.isOpen?e.id:e.parent&&!e.parent.isRoot?e.parent.id:null:null}const gq=Object.freeze(Object.defineProperty({__proto__:null,access:Uc,bound:Ah,dfs:Mw,focusNextElement:nN,focusPrevElement:rN,getInsertIndex:lN,getInsertParentId:cN,identify:So,identifyNull:sN,indexOf:tN,isClosed:KI,isDescendant:eN,isItem:GI,isOpenWithEmptyChildren:JI,safeRun:oN,waitFor:aN,walk:Mp},Symbol.toStringTag,{value:"Module"})),Oq={display:"flex",alignItems:"center",zIndex:1},yq={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},vq={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"},xq=ee.memo(function({top:e,left:n,indent:r}){const i={position:"absolute",pointerEvents:"none",top:e-2+"px",left:n+"px",right:r+"px"};return p.jsxs("div",{style:Object.assign(Object.assign({},Oq),i),children:[p.jsx("div",{style:Object.assign({},vq)}),p.jsx("div",{style:Object.assign({},yq)})]})});function bq({node:t,attrs:e,innerRef:n,children:r}){return p.jsx("div",Object.assign({},e,{ref:n,onFocus:i=>i.stopPropagation(),onClick:t.handleClick,children:r}))}function wq(t){return p.jsxs("div",{ref:t.dragHandle,style:t.style,children:[p.jsx("span",{onClick:e=>{e.stopPropagation(),t.node.toggle()},children:t.node.isLeaf?"🌳":t.node.isOpen?"🗁":"🗀"})," ",t.node.isEditing?p.jsx(kq,Object.assign({},t)):p.jsx(Sq,Object.assign({},t))]})}function Sq(t){return p.jsx(p.Fragment,{children:p.jsx("span",{children:t.node.data.name})})}function kq({node:t}){const e=O.useRef();return O.useEffect(()=>{var n,r;(n=e.current)===null||n===void 0||n.focus(),(r=e.current)===null||r===void 0||r.select()},[]),p.jsx("input",{ref:e,defaultValue:t.data.name,onBlur:()=>t.reset(),onKeyDown:n=>{var r;n.key==="Escape"&&t.reset(),n.key==="Enter"&&t.submit(((r=e.current)===null||r===void 0?void 0:r.value)||"")}})}function zO(t){return{type:"EDIT",id:t}}function Cq(t={id:null},e){return e.type==="EDIT"?Object.assign(Object.assign({},t),{id:e.id}):t}function Ca(t){return{type:"FOCUS",id:t}}function Pq(){return{type:"TREE_BLUR"}}function Tq(t={id:null,treeFocused:!1},e){return e.type==="FOCUS"?Object.assign(Object.assign({},t),{id:e.id,treeFocused:!0}):e.type==="TREE_BLUR"?Object.assign(Object.assign({},t),{treeFocused:!1}):t}class Dp{constructor(e){this.handleClick=n=>{n.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():n.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=e.tree,this.id=e.id,this.data=e.data,this.level=e.level,this.children=e.children,this.parent=e.parent,this.isDraggable=e.isDraggable,this.rowIndex=e.rowIndex}get isRoot(){return this.id===Gu}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var e;return this.isSelected&&!(!((e=this.prev)===null||e===void 0)&&e.isSelected)}get isSelectedEnd(){var e;return this.isSelected&&!(!((e=this.next)===null||e===void 0)&&e.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var e,n;const r=this.childIndex;return(n=(e=this.parent)===null||e===void 0?void 0:e.children[r+1])!==null&&n!==void 0?n:null}isAncestorOf(e){if(!e)return!1;let n=e;for(;n;){if(n.id===this.id)return!0;n=n.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(e){this.tree.submit(this,e)}reset(){this.tree.reset()}clone(){return new Dp(Object.assign({},this))}edit(){return this.tree.edit(this)}}const Gu="__REACT_ARBORIST_INTERNAL_ROOT__";function QC(t){var e;function n(s,o,a){const l=t.accessId(s),c=new Dp({tree:t,data:s,level:o,parent:a,id:l,children:null,isDraggable:t.isDraggable(s),rowIndex:null}),u=t.accessChildren(s);return u&&(c.children=u.map(f=>n(f,o+1,c))),c}const r=new Dp({tree:t,id:Gu,data:{id:Gu},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null}),i=(e=t.props.data)!==null&&e!==void 0?e:[];return r.children=i.map(s=>n(s,0,r)),r}const vx={open(t,e){return{type:"VISIBILITY_OPEN",id:t,filtered:e}},close(t,e){return{type:"VISIBILITY_CLOSE",id:t,filtered:e}},toggle(t,e){return{type:"VISIBILITY_TOGGLE",id:t,filtered:e}},clear(t){return{type:"VISIBILITY_CLEAR",filtered:t}}};function IC(t={},e){if(e.type==="VISIBILITY_OPEN")return Object.assign(Object.assign({},t),{[e.id]:!0});if(e.type==="VISIBILITY_CLOSE")return Object.assign(Object.assign({},t),{[e.id]:!1});if(e.type==="VISIBILITY_TOGGLE"){const n=t[e.id];return Object.assign(Object.assign({},t),{[e.id]:!n})}else return e.type==="VISIBILITY_CLEAR"?{}:t}function Eq(t={filtered:{},unfiltered:{}},e){return e.type.startsWith("VISIBILITY")?e.filtered?Object.assign(Object.assign({},t),{filtered:IC(t.filtered,e)}):Object.assign(Object.assign({},t),{unfiltered:IC(t.unfiltered,e)}):t}const _l=t=>{var e;return{nodes:{open:{filtered:{},unfiltered:(e=t==null?void 0:t.initialOpenState)!==null&&e!==void 0?e:{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}},Rr={clear:()=>({type:"SELECTION_CLEAR"}),only:t=>({type:"SELECTION_ONLY",id:So(t)}),add:t=>({type:"SELECTION_ADD",ids:(Array.isArray(t)?t:[t]).map(So)}),remove:t=>({type:"SELECTION_REMOVE",ids:(Array.isArray(t)?t:[t]).map(So)}),set:t=>Object.assign({type:"SELECTION_SET"},t),mostRecent:t=>({type:"SELECTION_MOST_RECENT",id:t===null?null:So(t)}),anchor:t=>({type:"SELECTION_ANCHOR",id:t===null?null:So(t)})};function Rq(t=_l().nodes.selection,e){const n=t.ids;switch(e.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},t),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},t),{ids:new Set([e.id])});case"SELECTION_ADD":return e.ids.length===0?t:(e.ids.forEach(r=>n.add(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_REMOVE":return e.ids.length===0?t:(e.ids.forEach(r=>n.delete(r)),Object.assign(Object.assign({},t),{ids:new Set(n)}));case"SELECTION_SET":return Object.assign(Object.assign({},t),{ids:e.ids,mostRecent:e.mostRecent,anchor:e.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},t),{mostRecent:e.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},t),{anchor:e.id});default:return t}}const $l={cursor(t){return{type:"DND_CURSOR",cursor:t}},dragStart(t,e){return{type:"DND_DRAG_START",id:t,dragIds:e}},dragEnd(){return{type:"DND_DRAG_END"}},hovering(t,e){return{type:"DND_HOVERING",parentId:t,index:e}}};function _q(t=_l().dnd,e){switch(e.type){case"DND_CURSOR":return Object.assign(Object.assign({},t),{cursor:e.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},t),{dragId:e.id,dragIds:e.dragIds});case"DND_DRAG_END":return _l().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},t),{parentId:e.parentId,index:e.index});default:return t}}const $q={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},Aq=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e}px, ${n}px)`}},Qq=t=>{if(!t)return{display:"none"};const{x:e,y:n}=t;return{transform:`translate(${e+10}px, ${n+10}px)`}};function uN({offset:t,mouse:e,id:n,dragIds:r,isDragging:i}){return p.jsxs(Iq,{isDragging:i,children:[p.jsx(Nq,{offset:t,children:p.jsx(Mq,{id:n,dragIds:r})}),p.jsx(jq,{mouse:e,count:r.length})]})}const Iq=O.memo(function(e){return e.isDragging?p.jsx("div",{style:$q,children:e.children}):null});function Nq(t){return p.jsx("div",{className:"row preview",style:Aq(t.offset),children:t.children})}function jq(t){const{count:e,mouse:n}=t;return e>1?p.jsx("div",{className:"selected-count",style:Qq(n),children:e}):null}const Mq=O.memo(function(e){const n=Kn(),r=n.get(e.id);return r?p.jsx(n.renderNode,{preview:!0,node:r,style:{paddingLeft:r.level*n.indent,opacity:.2,background:"transparent"},tree:n}):null});function Al(){return Al=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Al.apply(null,arguments)}function NC(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xx(t,e){return xx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},xx(t,e)}function Dq(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,xx(t,e)}var jC=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function Lq(t,e){return!!(t===e||jC(t)&&jC(e))}function zq(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!Lq(t[n],e[n]))return!1;return!0}function BO(t,e){e===void 0&&(e=zq);var n,r=[],i,s=!1;function o(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return s&&n===this&&e(a,r)||(i=t.apply(this,a),s=!0,n=this,r=a),i}return o}function Bq(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var Vq=typeof performance=="object"&&typeof performance.now=="function",MC=Vq?function(){return performance.now()}:function(){return Date.now()};function DC(t){cancelAnimationFrame(t.id)}function Fq(t,e){var n=MC();function r(){MC()-n>=e?t.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var VO=-1;function LC(t){if(t===void 0&&(t=!1),VO===-1||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(e),VO=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return VO}var Pa=null;function zC(t){if(t===void 0&&(t=!1),Pa===null||t){var e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?Pa="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?Pa="negative":Pa="positive-ascending"),document.body.removeChild(e),Pa}return Pa}var Xq=150,Zq=function(e,n){return e};function Wq(t){var e,n=t.getItemOffset,r=t.getEstimatedTotalSize,i=t.getItemSize,s=t.getOffsetForIndexAndAlignment,o=t.getStartIndexForOffset,a=t.getStopIndexForStartIndex,l=t.initInstanceProps,c=t.shouldResetStyleCacheOnItemSizeChange,u=t.validateProps;return e=function(f){Dq(d,f);function d(g){var m;return m=f.call(this,g)||this,m._instanceProps=l(m.props,NC(m)),m._outerRef=void 0,m._resetIsScrollingTimeoutId=null,m.state={instance:NC(m),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof m.props.initialScrollOffset=="number"?m.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},m._callOnItemsRendered=void 0,m._callOnItemsRendered=BO(function(v,y,x,b){return m.props.onItemsRendered({overscanStartIndex:v,overscanStopIndex:y,visibleStartIndex:x,visibleStopIndex:b})}),m._callOnScroll=void 0,m._callOnScroll=BO(function(v,y,x){return m.props.onScroll({scrollDirection:v,scrollOffset:y,scrollUpdateWasRequested:x})}),m._getItemStyle=void 0,m._getItemStyle=function(v){var y=m.props,x=y.direction,b=y.itemSize,k=y.layout,w=m._getItemStyleCache(c&&b,c&&k,c&&x),S;if(w.hasOwnProperty(v))S=w[v];else{var C=n(m.props,v,m._instanceProps),_=i(m.props,v,m._instanceProps),I=x==="horizontal"||k==="horizontal",E=x==="rtl",j=I?C:0;w[v]=S={position:"absolute",left:E?void 0:j,right:E?j:void 0,top:I?0:C,height:I?"100%":_,width:I?_:"100%"}}return S},m._getItemStyleCache=void 0,m._getItemStyleCache=BO(function(v,y,x){return{}}),m._onScrollHorizontal=function(v){var y=v.currentTarget,x=y.clientWidth,b=y.scrollLeft,k=y.scrollWidth;m.setState(function(w){if(w.scrollOffset===b)return null;var S=m.props.direction,C=b;if(S==="rtl")switch(zC()){case"negative":C=-b;break;case"positive-descending":C=k-x-b;break}return C=Math.max(0,Math.min(C,k-x)),{isScrolling:!0,scrollDirection:w.scrollOffset<C?"forward":"backward",scrollOffset:C,scrollUpdateWasRequested:!1}},m._resetIsScrollingDebounced)},m._onScrollVertical=function(v){var y=v.currentTarget,x=y.clientHeight,b=y.scrollHeight,k=y.scrollTop;m.setState(function(w){if(w.scrollOffset===k)return null;var S=Math.max(0,Math.min(k,b-x));return{isScrolling:!0,scrollDirection:w.scrollOffset<S?"forward":"backward",scrollOffset:S,scrollUpdateWasRequested:!1}},m._resetIsScrollingDebounced)},m._outerRefSetter=function(v){var y=m.props.outerRef;m._outerRef=v,typeof y=="function"?y(v):y!=null&&typeof y=="object"&&y.hasOwnProperty("current")&&(y.current=v)},m._resetIsScrollingDebounced=function(){m._resetIsScrollingTimeoutId!==null&&DC(m._resetIsScrollingTimeoutId),m._resetIsScrollingTimeoutId=Fq(m._resetIsScrolling,Xq)},m._resetIsScrolling=function(){m._resetIsScrollingTimeoutId=null,m.setState({isScrolling:!1},function(){m._getItemStyleCache(-1,null)})},m}d.getDerivedStateFromProps=function(m,v){return qq(m,v),u(m),null};var h=d.prototype;return h.scrollTo=function(m){m=Math.max(0,m),this.setState(function(v){return v.scrollOffset===m?null:{scrollDirection:v.scrollOffset<m?"forward":"backward",scrollOffset:m,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},h.scrollToItem=function(m,v){v===void 0&&(v="auto");var y=this.props,x=y.itemCount,b=y.layout,k=this.state.scrollOffset;m=Math.max(0,Math.min(m,x-1));var w=0;if(this._outerRef){var S=this._outerRef;b==="vertical"?w=S.scrollWidth>S.clientWidth?LC():0:w=S.scrollHeight>S.clientHeight?LC():0}this.scrollTo(s(this.props,m,v,k,this._instanceProps,w))},h.componentDidMount=function(){var m=this.props,v=m.direction,y=m.initialScrollOffset,x=m.layout;if(typeof y=="number"&&this._outerRef!=null){var b=this._outerRef;v==="horizontal"||x==="horizontal"?b.scrollLeft=y:b.scrollTop=y}this._callPropsCallbacks()},h.componentDidUpdate=function(){var m=this.props,v=m.direction,y=m.layout,x=this.state,b=x.scrollOffset,k=x.scrollUpdateWasRequested;if(k&&this._outerRef!=null){var w=this._outerRef;if(v==="horizontal"||y==="horizontal")if(v==="rtl")switch(zC()){case"negative":w.scrollLeft=-b;break;case"positive-ascending":w.scrollLeft=b;break;default:var S=w.clientWidth,C=w.scrollWidth;w.scrollLeft=C-S-b;break}else w.scrollLeft=b;else w.scrollTop=b}this._callPropsCallbacks()},h.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&DC(this._resetIsScrollingTimeoutId)},h.render=function(){var m=this.props,v=m.children,y=m.className,x=m.direction,b=m.height,k=m.innerRef,w=m.innerElementType,S=m.innerTagName,C=m.itemCount,_=m.itemData,I=m.itemKey,E=I===void 0?Zq:I,j=m.layout,A=m.outerElementType,L=m.outerTagName,z=m.style,X=m.useIsScrolling,W=m.width,F=this.state.isScrolling,N=x==="horizontal"||j==="horizontal",Q=N?this._onScrollHorizontal:this._onScrollVertical,P=this._getRangeToRender(),M=P[0],$=P[1],R=[];if(C>0)for(var q=M;q<=$;q++)R.push(O.createElement(v,{data:_,key:E(q,_),index:q,isScrolling:X?F:void 0,style:this._getItemStyle(q)}));var H=r(this.props,this._instanceProps);return O.createElement(A||L||"div",{className:y,onScroll:Q,ref:this._outerRefSetter,style:Al({position:"relative",height:b,width:W,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:x},z)},O.createElement(w||S||"div",{children:R,ref:k,style:{height:N?"100%":H,pointerEvents:F?"none":void 0,width:N?H:"100%"}}))},h._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var m=this.props.itemCount;if(m>0){var v=this._getRangeToRender(),y=v[0],x=v[1],b=v[2],k=v[3];this._callOnItemsRendered(y,x,b,k)}}if(typeof this.props.onScroll=="function"){var w=this.state,S=w.scrollDirection,C=w.scrollOffset,_=w.scrollUpdateWasRequested;this._callOnScroll(S,C,_)}},h._getRangeToRender=function(){var m=this.props,v=m.itemCount,y=m.overscanCount,x=this.state,b=x.isScrolling,k=x.scrollDirection,w=x.scrollOffset;if(v===0)return[0,0,0,0];var S=o(this.props,w,this._instanceProps),C=a(this.props,S,w,this._instanceProps),_=!b||k==="backward"?Math.max(1,y):1,I=!b||k==="forward"?Math.max(1,y):1;return[Math.max(0,S-_),Math.max(0,Math.min(v-1,C+I)),S,C]},d}(O.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var qq=function(e,n){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,n.instance},Yq=Wq({getItemOffset:function(e,n){var r=e.itemSize;return n*r},getItemSize:function(e,n){var r=e.itemSize;return r},getEstimatedTotalSize:function(e){var n=e.itemCount,r=e.itemSize;return r*n},getOffsetForIndexAndAlignment:function(e,n,r,i,s,o){var a=e.direction,l=e.height,c=e.itemCount,u=e.itemSize,f=e.layout,d=e.width,h=a==="horizontal"||f==="horizontal",g=h?d:l,m=Math.max(0,c*u-g),v=Math.min(m,n*u),y=Math.max(0,n*u-g+u+o);switch(r==="smart"&&(i>=y-g&&i<=v+g?r="auto":r="center"),r){case"start":return v;case"end":return y;case"center":{var x=Math.round(y+(v-y)/2);return x<Math.ceil(g/2)?0:x>m+Math.floor(g/2)?m:x}case"auto":default:return i>=y&&i<=v?i:i<y?y:v}},getStartIndexForOffset:function(e,n){var r=e.itemCount,i=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(n/i)))},getStopIndexForStartIndex:function(e,n,r){var i=e.direction,s=e.height,o=e.itemCount,a=e.itemSize,l=e.layout,c=e.width,u=i==="horizontal"||l==="horizontal",f=n*a,d=u?c:s,h=Math.ceil((d+r-f)/a);return Math.max(0,Math.min(o-1,n+h-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});function Uq(){var t,e;const n=Kn(),i=hq().cursor;if(!i||i.type!=="line")return null;const s=n.indent,o=n.rowHeight*i.index+((e=(t=n.props.padding)!==null&&t!==void 0?t:n.props.paddingTop)!==null&&e!==void 0?e:0),a=s*i.level,l=n.renderCursor;return p.jsx(l,{top:o,left:a,indent:s})}var Hq=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Gq=O.forwardRef(function(e,n){const{children:r}=e,i=Hq(e,["children"]),s=Kn();return p.jsxs("div",Object.assign({ref:n},i,{onClick:o=>{o.currentTarget===o.target&&s.deselectAll()},children:[p.jsx(Kq,{}),r]}))}),Kq=()=>{const t=Kn();return p.jsx("div",{style:{height:t.visibleNodes.length*t.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:p.jsx(Uq,{})})};var Jq=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const eY=O.forwardRef(function(e,n){var r,i,s,o,{style:a}=e,l=Jq(e,["style"]);const c=Kn(),u=(i=(r=c.props.padding)!==null&&r!==void 0?r:c.props.paddingTop)!==null&&i!==void 0?i:0,f=(o=(s=c.props.padding)!==null&&s!==void 0?s:c.props.paddingBottom)!==null&&o!==void 0?o:0;return p.jsx("div",Object.assign({ref:n,style:Object.assign(Object.assign({},a),{height:`${parseFloat(a.height)+u+f}px`})},l))});var fN=O.createContext({dragDropManager:void 0}),sr;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(sr||(sr={}));function we(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(!t){var s;if(e===void 0)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;s=new Error(e.replace(/%s/g,function(){return r[o++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var Dw="dnd-core/INIT_COORDS",ug="dnd-core/BEGIN_DRAG",Lw="dnd-core/PUBLISH_DRAG_SOURCE",fg="dnd-core/HOVER",dg="dnd-core/DROP",hg="dnd-core/END_DRAG";function BC(t,e){return{type:Dw,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}function Qh(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qh=function(n){return typeof n}:Qh=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Qh(t)}function tY(t,e,n){return e.split(".").reduce(function(r,i){return r&&r[i]?r[i]:n||null},t)}function nY(t,e){return t.filter(function(n){return n!==e})}function dN(t){return Qh(t)==="object"}function rY(t,e){var n=new Map,r=function(o){n.set(o,n.has(o)?n.get(o)+1:1)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(s,o){s===1&&i.push(o)}),i}function iY(t,e){return t.filter(function(n){return e.indexOf(n)>-1})}var sY={type:Dw,payload:{clientOffset:null,sourceClientOffset:null}};function oY(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},i=r.publishSource,s=i===void 0?!0:i,o=r.clientOffset,a=r.getSourceClientOffset,l=t.getMonitor(),c=t.getRegistry();t.dispatch(BC(o)),aY(n,l,c);var u=uY(n,l);if(u===null){t.dispatch(sY);return}var f=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");lY(a),f=a(u)}t.dispatch(BC(o,f));var d=c.getSource(u),h=d.beginDrag(l,u);if(h!=null){cY(h),c.pinSource(u);var g=c.getSourceType(u);return{type:ug,payload:{itemType:g,item:h,sourceId:u,clientOffset:o||null,sourceClientOffset:f||null,isSourcePublic:!!s}}}}}function aY(t,e,n){we(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){we(n.getSource(r),"Expected sourceIds to be registered.")})}function lY(t){we(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function cY(t){we(dN(t),"Item must be an object.")}function uY(t,e){for(var n=null,r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function fY(t){return function(){var n=t.getMonitor();if(n.isDragging())return{type:Lw}}}function bx(t,e){return e===null?t===null:Array.isArray(t)?t.some(function(n){return n===e}):t===e}function dY(t){return function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.clientOffset;hY(n);var s=n.slice(0),o=t.getMonitor(),a=t.getRegistry();pY(s,o,a);var l=o.getItemType();return mY(s,a,l),gY(s,o,a),{type:fg,payload:{targetIds:s,clientOffset:i||null}}}}function hY(t){we(Array.isArray(t),"Expected targetIds to be an array.")}function pY(t,e,n){we(e.isDragging(),"Cannot call hover while not dragging."),we(!e.didDrop(),"Cannot call hover after drop.");for(var r=0;r<t.length;r++){var i=t[r];we(t.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");var s=n.getTarget(i);we(s,"Expected targetIds to be registered.")}}function mY(t,e,n){for(var r=t.length-1;r>=0;r--){var i=t[r],s=e.getTargetType(i);bx(s,n)||t.splice(r,1)}}function gY(t,e,n){t.forEach(function(r){var i=n.getTarget(r);i.hover(e,r)})}function VC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function FC(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?VC(Object(n),!0).forEach(function(r){OY(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):VC(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function OY(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yY(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getMonitor(),i=t.getRegistry();vY(r);var s=wY(r);s.forEach(function(o,a){var l=xY(o,a,i,r),c={type:dg,payload:{dropResult:FC(FC({},n),l)}};t.dispatch(c)})}}function vY(t){we(t.isDragging(),"Cannot call drop while not dragging."),we(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function xY(t,e,n,r){var i=n.getTarget(t),s=i?i.drop(r,t):void 0;return bY(s),typeof s>"u"&&(s=e===0?{}:r.getDropResult()),s}function bY(t){we(typeof t>"u"||dN(t),"Drop result must either be an object or undefined.")}function wY(t){var e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function SY(t){return function(){var n=t.getMonitor(),r=t.getRegistry();kY(n);var i=n.getSourceId();if(i!=null){var s=r.getSource(i,!0);s.endDrag(n,i),r.unpinSource()}return{type:hg}}}function kY(t){we(t.isDragging(),"Cannot call endDrag while not dragging.")}function CY(t){return{beginDrag:oY(t),publishDragSource:fY(t),hover:dY(t),drop:yY(t),endDrag:SY(t)}}function PY(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function TY(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function EY(t,e,n){return e&&TY(t.prototype,e),t}function $c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var RY=function(){function t(e,n){var r=this;PY(this,t),$c(this,"store",void 0),$c(this,"monitor",void 0),$c(this,"backend",void 0),$c(this,"isSetUp",!1),$c(this,"handleRefCountChange",function(){var i=r.store.getState().refCount>0;r.backend&&(i&&!r.isSetUp?(r.backend.setup(),r.isSetUp=!0):!i&&r.isSetUp&&(r.backend.teardown(),r.isSetUp=!1))}),this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}return EY(t,[{key:"receiveBackend",value:function(n){this.backend=n}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var n=this,r=this.store.dispatch;function i(o){return function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];var u=o.apply(n,l);typeof u<"u"&&r(u)}}var s=CY(this);return Object.keys(s).reduce(function(o,a){var l=s[a];return o[a]=i(l),o},{})}},{key:"dispatch",value:function(n){this.store.dispatch(n)}}]),t}();function tr(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var XC=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ZC=function(){return Math.random().toString(36).substring(7).split("").join(".")},WC={INIT:"@@redux/INIT"+ZC(),REPLACE:"@@redux/REPLACE"+ZC()};function _Y(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function hN(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(tr(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(tr(1));return n(hN)(t,e)}if(typeof t!="function")throw new Error(tr(2));var i=t,s=e,o=[],a=o,l=!1;function c(){a===o&&(a=o.slice())}function u(){if(l)throw new Error(tr(3));return s}function f(m){if(typeof m!="function")throw new Error(tr(4));if(l)throw new Error(tr(5));var v=!0;return c(),a.push(m),function(){if(v){if(l)throw new Error(tr(6));v=!1,c();var x=a.indexOf(m);a.splice(x,1),o=null}}}function d(m){if(!_Y(m))throw new Error(tr(7));if(typeof m.type>"u")throw new Error(tr(8));if(l)throw new Error(tr(9));try{l=!0,s=i(s,m)}finally{l=!1}for(var v=o=a,y=0;y<v.length;y++){var x=v[y];x()}return m}function h(m){if(typeof m!="function")throw new Error(tr(10));i=m,d({type:WC.REPLACE})}function g(){var m,v=f;return m={subscribe:function(x){if(typeof x!="object"||x===null)throw new Error(tr(11));function b(){x.next&&x.next(u())}b();var k=v(b);return{unsubscribe:k}}},m[XC]=function(){return this},m}return d({type:WC.INIT}),r={dispatch:d,subscribe:f,getState:u,replaceReducer:h},r[XC]=g,r}var $Y=function(e,n){return e===n};function AY(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function QY(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$Y;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function qC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function YC(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qC(Object(n),!0).forEach(function(r){IY(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qC(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function IY(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var UC={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function NY(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:UC,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case Dw:case ug:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case fg:return AY(t.clientOffset,n.clientOffset)?t:YC(YC({},t),{},{clientOffset:n.clientOffset});case hg:case dg:return UC;default:return t}}var zw="dnd-core/ADD_SOURCE",Bw="dnd-core/ADD_TARGET",Vw="dnd-core/REMOVE_SOURCE",pg="dnd-core/REMOVE_TARGET";function jY(t){return{type:zw,payload:{sourceId:t}}}function MY(t){return{type:Bw,payload:{targetId:t}}}function DY(t){return{type:Vw,payload:{sourceId:t}}}function LY(t){return{type:pg,payload:{targetId:t}}}function HC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function nr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?HC(Object(n),!0).forEach(function(r){zY(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):HC(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function zY(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var BY={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function VY(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:BY,e=arguments.length>1?arguments[1]:void 0,n=e.payload;switch(e.type){case ug:return nr(nr({},t),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Lw:return nr(nr({},t),{},{isSourcePublic:!0});case fg:return nr(nr({},t),{},{targetIds:n.targetIds});case pg:return t.targetIds.indexOf(n.targetId)===-1?t:nr(nr({},t),{},{targetIds:nY(t.targetIds,n.targetId)});case dg:return nr(nr({},t),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case hg:return nr(nr({},t),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function FY(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case zw:case Bw:return t+1;case Vw:case pg:return t-1;default:return t}}var Lp=[],Fw=[];Lp.__IS_NONE__=!0;Fw.__IS_ALL__=!0;function XY(t,e){if(t===Lp)return!1;if(t===Fw||typeof e>"u")return!0;var n=iY(e,t);return n.length>0}function ZY(){var t=arguments.length>1?arguments[1]:void 0;switch(t.type){case fg:break;case zw:case Bw:case pg:case Vw:return Lp;case ug:case Lw:case hg:case dg:default:return Fw}var e=t.payload,n=e.targetIds,r=n===void 0?[]:n,i=e.prevTargetIds,s=i===void 0?[]:i,o=rY(r,s),a=o.length>0||!QY(r,s);if(!a)return Lp;var l=s[s.length-1],c=r[r.length-1];return l!==c&&(l&&o.push(l),c&&o.push(c)),o}function WY(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t+1}function GC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function KC(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?GC(Object(n),!0).forEach(function(r){qY(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):GC(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function qY(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function YY(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:ZY(t.dirtyHandlerIds,{type:e.type,payload:KC(KC({},e.payload),{},{prevTargetIds:tY(t,"dragOperation.targetIds",[])})}),dragOffset:NY(t.dragOffset,e),refCount:FY(t.refCount,e),dragOperation:VY(t.dragOperation,e),stateId:WY(t.stateId)}}function UY(t,e){return{x:t.x+e.x,y:t.y+e.y}}function pN(t,e){return{x:t.x-e.x,y:t.y-e.y}}function HY(t){var e=t.clientOffset,n=t.initialClientOffset,r=t.initialSourceClientOffset;return!e||!n||!r?null:pN(UY(e,r),n)}function GY(t){var e=t.clientOffset,n=t.initialClientOffset;return!e||!n?null:pN(e,n)}function KY(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function JY(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function eU(t,e,n){return e&&JY(t.prototype,e),t}function JC(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var tU=function(){function t(e,n){KY(this,t),JC(this,"store",void 0),JC(this,"registry",void 0),this.store=e,this.registry=n}return eU(t,[{key:"subscribeToStateChange",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},s=i.handlerIds;we(typeof n=="function","listener must be a function."),we(typeof s>"u"||Array.isArray(s),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId,a=function(){var c=r.store.getState(),u=c.stateId;try{var f=u===o||u===o+1&&!XY(c.dirtyHandlerIds,s);f||n()}finally{o=u}};return this.store.subscribe(a)}},{key:"subscribeToOffsetChange",value:function(n){var r=this;we(typeof n=="function","listener must be a function.");var i=this.store.getState().dragOffset,s=function(){var a=r.store.getState().dragOffset;a!==i&&(i=a,n())};return this.store.subscribe(s)}},{key:"canDragSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n);return we(r,"Expected to find a valid source. sourceId=".concat(n)),this.isDragging()?!1:r.canDrag(this,n)}},{key:"canDropOnTarget",value:function(n){if(!n)return!1;var r=this.registry.getTarget(n);if(we(r,"Expected to find a valid target. targetId=".concat(n)),!this.isDragging()||this.didDrop())return!1;var i=this.registry.getTargetType(n),s=this.getItemType();return bx(i,s)&&r.canDrop(this,n)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(n){if(!n)return!1;var r=this.registry.getSource(n,!0);if(we(r,"Expected to find a valid source. sourceId=".concat(n)),!this.isDragging()||!this.isSourcePublic())return!1;var i=this.registry.getSourceType(n),s=this.getItemType();return i!==s?!1:r.isDragging(this,n)}},{key:"isOverTarget",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!n)return!1;var i=r.shallow;if(!this.isDragging())return!1;var s=this.registry.getTargetType(n),o=this.getItemType();if(o&&!bx(s,o))return!1;var a=this.getTargetIds();if(!a.length)return!1;var l=a.indexOf(n);return i?l===a.length-1:l>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return HY(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return GY(this.store.getState().dragOffset)}}]),t}(),nU=0;function rU(){return nU++}function Ih(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ih=function(n){return typeof n}:Ih=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ih(t)}function iU(t){we(typeof t.canDrag=="function","Expected canDrag to be a function."),we(typeof t.beginDrag=="function","Expected beginDrag to be a function."),we(typeof t.endDrag=="function","Expected endDrag to be a function.")}function sU(t){we(typeof t.canDrop=="function","Expected canDrop to be a function."),we(typeof t.hover=="function","Expected hover to be a function."),we(typeof t.drop=="function","Expected beginDrag to be a function.")}function wx(t,e){if(e&&Array.isArray(t)){t.forEach(function(n){return wx(n,!1)});return}we(typeof t=="string"||Ih(t)==="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const eP=typeof global<"u"?global:self,mN=eP.MutationObserver||eP.WebKitMutationObserver;function gN(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function oU(t){let e=1;const n=new mN(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const aU=typeof mN=="function"?oU:gN;class lU{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,i=e.length-this.index;r<i;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=aU(this.flush),this.requestErrorThrow=gN(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class cU{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class uU{create(e){const n=this.freeTasks,r=n.length?n.pop():new cU(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const ON=new lU,fU=new uU(ON.registerPendingError);function dU(t){ON.enqueueTask(fU.create(t))}function hU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pU(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function mU(t,e,n){return e&&pU(t.prototype,e),t}function Ta(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gU(t,e){return xU(t)||vU(t,e)||yU(t,e)||OU()}function OU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
439
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yU(t,e){if(t){if(typeof t=="string")return tP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tP(t,e)}}function tP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function vU(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function xU(t){if(Array.isArray(t))return t}function bU(t){var e=rU().toString();switch(t){case sr.SOURCE:return"S".concat(e);case sr.TARGET:return"T".concat(e);default:throw new Error("Unknown Handler Role: ".concat(t))}}function nP(t){switch(t[0]){case"S":return sr.SOURCE;case"T":return sr.TARGET;default:we(!1,"Cannot parse handler ID: ".concat(t))}}function rP(t,e){var n=t.entries(),r=!1;do{var i=n.next(),s=i.done,o=gU(i.value,2),a=o[1];if(a===e)return!0;r=!!s}while(!r);return!1}var wU=function(){function t(e){hU(this,t),Ta(this,"types",new Map),Ta(this,"dragSources",new Map),Ta(this,"dropTargets",new Map),Ta(this,"pinnedSourceId",null),Ta(this,"pinnedSource",null),Ta(this,"store",void 0),this.store=e}return mU(t,[{key:"addSource",value:function(n,r){wx(n),iU(r);var i=this.addHandler(sr.SOURCE,n,r);return this.store.dispatch(jY(i)),i}},{key:"addTarget",value:function(n,r){wx(n,!0),sU(r);var i=this.addHandler(sr.TARGET,n,r);return this.store.dispatch(MY(i)),i}},{key:"containsHandler",value:function(n){return rP(this.dragSources,n)||rP(this.dropTargets,n)}},{key:"getSource",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;we(this.isSourceId(n),"Expected a valid source ID.");var i=r&&n===this.pinnedSourceId,s=i?this.pinnedSource:this.dragSources.get(n);return s}},{key:"getTarget",value:function(n){return we(this.isTargetId(n),"Expected a valid target ID."),this.dropTargets.get(n)}},{key:"getSourceType",value:function(n){return we(this.isSourceId(n),"Expected a valid source ID."),this.types.get(n)}},{key:"getTargetType",value:function(n){return we(this.isTargetId(n),"Expected a valid target ID."),this.types.get(n)}},{key:"isSourceId",value:function(n){var r=nP(n);return r===sr.SOURCE}},{key:"isTargetId",value:function(n){var r=nP(n);return r===sr.TARGET}},{key:"removeSource",value:function(n){var r=this;we(this.getSource(n),"Expected an existing source."),this.store.dispatch(DY(n)),dU(function(){r.dragSources.delete(n),r.types.delete(n)})}},{key:"removeTarget",value:function(n){we(this.getTarget(n),"Expected an existing target."),this.store.dispatch(LY(n)),this.dropTargets.delete(n),this.types.delete(n)}},{key:"pinSource",value:function(n){var r=this.getSource(n);we(r,"Expected an existing source."),this.pinnedSourceId=n,this.pinnedSource=r}},{key:"unpinSource",value:function(){we(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(n,r,i){var s=bU(n);return this.types.set(s,r),n===sr.SOURCE?this.dragSources.set(s,i):n===sr.TARGET&&this.dropTargets.set(s,i),s}}]),t}();function SU(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=kU(r),s=new tU(i,new wU(i)),o=new RY(i,s),a=t(o,e,n);return o.receiveBackend(a),o}function kU(t){var e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return hN(YY,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}var CU=["children"];function PU(t,e){return _U(t)||RU(t,e)||EU(t,e)||TU()}function TU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
440
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EU(t,e){if(t){if(typeof t=="string")return iP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iP(t,e)}}function iP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function RU(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function _U(t){if(Array.isArray(t))return t}function $U(t,e){if(t==null)return{};var n=AU(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function AU(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var sP=0,Nh=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),QU=O.memo(function(e){var n=e.children,r=$U(e,CU),i=IU(r),s=PU(i,2),o=s[0],a=s[1];return O.useEffect(function(){if(a){var l=yN();return++sP,function(){--sP===0&&(l[Nh]=null)}}},[]),p.jsx(fN.Provider,Object.assign({value:o},{children:n}),void 0)});function IU(t){if("manager"in t){var e={dragDropManager:t.manager};return[e,!1]}var n=NU(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[n,r]}function NU(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yN(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=e;return i[Nh]||(i[Nh]={dragDropManager:SU(t,e,n,r)}),i[Nh]}function yN(){return typeof global<"u"?global:window}function jU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function MU(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function DU(t,e,n){return e&&MU(t.prototype,e),t}function oP(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var FO=!1,XO=!1,LU=function(){function t(e){jU(this,t),oP(this,"internalMonitor",void 0),oP(this,"sourceId",null),this.internalMonitor=e.getMonitor()}return DU(t,[{key:"receiveHandlerId",value:function(n){this.sourceId=n}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){we(!FO,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return FO=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{FO=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;we(!XO,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return XO=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{XO=!1}}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"isDraggingSource",value:function(n){return this.internalMonitor.isDraggingSource(n)}},{key:"isOverTarget",value:function(n,r){return this.internalMonitor.isOverTarget(n,r)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(n){return this.internalMonitor.subscribeToOffsetChange(n)}},{key:"canDragSource",value:function(n){return this.internalMonitor.canDragSource(n)}},{key:"canDropOnTarget",value:function(n){return this.internalMonitor.canDropOnTarget(n)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function zU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BU(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function VU(t,e,n){return e&&BU(t.prototype,e),t}function aP(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ZO=!1,FU=function(){function t(e){zU(this,t),aP(this,"internalMonitor",void 0),aP(this,"targetId",null),this.internalMonitor=e.getMonitor()}return VU(t,[{key:"receiveHandlerId",value:function(n){this.targetId=n}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(n,r){return this.internalMonitor.subscribeToStateChange(n,r)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;we(!ZO,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return ZO=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{ZO=!1}}},{key:"isOver",value:function(n){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,n):!1}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),t}();function XU(t){if(typeof t.type!="string"){var e=t.type.displayName||t.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(e," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function ZU(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!O.isValidElement(e)){var r=e;return t(r,n),r}var i=e;XU(i);var s=n?function(o){return t(o,n)}:t;return WU(i,s)}}function vN(t){var e={};return Object.keys(t).forEach(function(n){var r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{var i=ZU(r);e[n]=function(){return i}}}),e}function lP(t,e){typeof t=="function"?t(e):t.current=e}function WU(t,e){var n=t.ref;return we(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?O.cloneElement(t,{ref:function(i){lP(n,i),lP(e,i)}}):O.cloneElement(t,{ref:e})}function jh(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?jh=function(n){return typeof n}:jh=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jh(t)}function Sx(t){return t!==null&&jh(t)==="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function kx(t,e,n,r){var i=void 0;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;var s=Object.keys(t),o=Object.keys(e);if(s.length!==o.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(e),l=0;l<s.length;l++){var c=s[l];if(!a(c))return!1;var u=t[c],f=e[c];if(i=void 0,i===!1||i===void 0&&u!==f)return!1}return!0}function qU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function YU(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function UU(t,e,n){return e&&YU(t.prototype,e),t}function Vt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var HU=function(){function t(e){var n=this;qU(this,t),Vt(this,"hooks",vN({dragSource:function(i,s){n.clearDragSource(),n.dragSourceOptions=s||null,Sx(i)?n.dragSourceRef=i:n.dragSourceNode=i,n.reconnectDragSource()},dragPreview:function(i,s){n.clearDragPreview(),n.dragPreviewOptions=s||null,Sx(i)?n.dragPreviewRef=i:n.dragPreviewNode=i,n.reconnectDragPreview()}})),Vt(this,"handlerId",null),Vt(this,"dragSourceRef",null),Vt(this,"dragSourceNode",void 0),Vt(this,"dragSourceOptionsInternal",null),Vt(this,"dragSourceUnsubscribe",void 0),Vt(this,"dragPreviewRef",null),Vt(this,"dragPreviewNode",void 0),Vt(this,"dragPreviewOptionsInternal",null),Vt(this,"dragPreviewUnsubscribe",void 0),Vt(this,"lastConnectedHandlerId",null),Vt(this,"lastConnectedDragSource",null),Vt(this,"lastConnectedDragSourceOptions",null),Vt(this,"lastConnectedDragPreview",null),Vt(this,"lastConnectedDragPreviewOptions",null),Vt(this,"backend",void 0),this.backend=e}return UU(t,[{key:"receiveHandlerId",value:function(n){this.handlerId!==n&&(this.handlerId=n,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(n){this.dragSourceOptionsInternal=n}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(n){this.dragPreviewOptionsInternal=n}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var n=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();if(r&&this.disconnectDragSource(),!!this.handlerId){if(!n){this.lastConnectedDragSource=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=n,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,n,this.dragSourceOptions))}}},{key:"reconnectDragPreview",value:function(){var n=this.dragPreview,r=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!kx(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!kx(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}]),t}();function GU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function KU(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function JU(t,e,n){return e&&KU(t.prototype,e),t}function ni(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var eH=function(){function t(e){var n=this;GU(this,t),ni(this,"hooks",vN({dropTarget:function(i,s){n.clearDropTarget(),n.dropTargetOptions=s,Sx(i)?n.dropTargetRef=i:n.dropTargetNode=i,n.reconnect()}})),ni(this,"handlerId",null),ni(this,"dropTargetRef",null),ni(this,"dropTargetNode",void 0),ni(this,"dropTargetOptionsInternal",null),ni(this,"unsubscribeDropTarget",void 0),ni(this,"lastConnectedHandlerId",null),ni(this,"lastConnectedDropTarget",null),ni(this,"lastConnectedDropTargetOptions",null),ni(this,"backend",void 0),this.backend=e}return JU(t,[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value:function(){var n=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();n&&this.disconnectDropTarget();var r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}},{key:"receiveHandlerId",value:function(n){n!==this.handlerId&&(this.handlerId=n,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(n){this.dropTargetOptionsInternal=n}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!kx(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}]),t}();function tH(t,e,n){var r=n.getRegistry(),i=r.addTarget(t,e);return[i,function(){return r.removeTarget(i)}]}function nH(t,e,n){var r=n.getRegistry(),i=r.addSource(t,e);return[i,function(){return r.removeSource(i)}]}var Jo=typeof window<"u"?O.useLayoutEffect:O.useEffect;function Mh(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mh=function(n){return typeof n}:Mh=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mh(t)}function rH(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iH(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function sH(t,e,n){return e&&iH(t.prototype,e),t}function WO(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var oH=function(){function t(e,n,r){rH(this,t),WO(this,"spec",void 0),WO(this,"monitor",void 0),WO(this,"connector",void 0),this.spec=e,this.monitor=n,this.connector=r}return sH(t,[{key:"beginDrag",value:function(){var n,r=this.spec,i=this.monitor,s=null;return Mh(r.item)==="object"?s=r.item:typeof r.item=="function"?s=r.item(i):s={},(n=s)!==null&&n!==void 0?n:null}},{key:"canDrag",value:function(){var n=this.spec,r=this.monitor;return typeof n.canDrag=="boolean"?n.canDrag:typeof n.canDrag=="function"?n.canDrag(r):!0}},{key:"isDragging",value:function(n,r){var i=this.spec,s=this.monitor,o=i.isDragging;return o?o(s):r===n.getSourceId()}},{key:"endDrag",value:function(){var n=this.spec,r=this.monitor,i=this.connector,s=n.end;s&&s(r.getItem(),r),i.reconnect()}}]),t}();function aH(t,e,n){var r=O.useMemo(function(){return new oH(t,e,n)},[e,n]);return O.useEffect(function(){r.spec=t},[t]),r}function ga(){var t=O.useContext(fN),e=t.dragDropManager;return we(e!=null,"Expected drag drop context"),e}function lH(t){return O.useMemo(function(){var e=t.type;return we(e!=null,"spec.type must be defined"),e},[t])}function cH(t,e){return hH(t)||dH(t,e)||fH(t,e)||uH()}function uH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
441
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fH(t,e){if(t){if(typeof t=="string")return cP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cP(t,e)}}function cP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function dH(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function hH(t){if(Array.isArray(t))return t}function pH(t,e,n){var r=ga(),i=aH(t,e,n),s=lH(t);Jo(function(){if(s!=null){var a=nH(s,i,r),l=cH(a,2),c=l[0],u=l[1];return e.receiveHandlerId(c),n.receiveHandlerId(c),u}},[r,e,n,i,s])}function mH(t){return vH(t)||yH(t)||OH(t)||gH()}function gH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
442
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OH(t,e){if(t){if(typeof t=="string")return Cx(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cx(t,e)}}function yH(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function vH(t){if(Array.isArray(t))return Cx(t)}function Cx(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function xN(t,e){var n=mH(e||[]);return e==null&&typeof t!="function"&&n.push(t),O.useMemo(function(){return typeof t=="function"?t():t},n)}function xH(){var t=ga();return O.useMemo(function(){return new LU(t)},[t])}function bH(t,e){var n=ga(),r=O.useMemo(function(){return new HU(n.getBackend())},[n]);return Jo(function(){return r.dragSourceOptions=t||null,r.reconnect(),function(){return r.disconnectDragSource()}},[r,t]),Jo(function(){return r.dragPreviewOptions=e||null,r.reconnect(),function(){return r.disconnectDragPreview()}},[r,e]),r}var wH=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;i--!==0;){var o=s[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n};const SH=ql(wH);function kH(t,e){return EH(t)||TH(t,e)||PH(t,e)||CH()}function CH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
443
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PH(t,e){if(t){if(typeof t=="string")return uP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uP(t,e)}}function uP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function TH(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function EH(t){if(Array.isArray(t))return t}function bN(t,e,n){var r=O.useState(function(){return e(t)}),i=kH(r,2),s=i[0],o=i[1],a=O.useCallback(function(){var l=e(t);SH(s,l)||(o(l),n&&n())},[s,t,n]);return Jo(a),[s,a]}function RH(t,e){return QH(t)||AH(t,e)||$H(t,e)||_H()}function _H(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
444
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $H(t,e){if(t){if(typeof t=="string")return fP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fP(t,e)}}function fP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function AH(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function QH(t){if(Array.isArray(t))return t}function IH(t,e,n){var r=bN(t,e,n),i=RH(r,2),s=i[0],o=i[1];return Jo(function(){var l=t.getHandlerId();if(l!=null)return t.subscribeToStateChange(o,{handlerIds:[l]})},[t,o]),s}function wN(t,e,n){return IH(e,t||function(){return{}},function(){return n.reconnect()})}function NH(t){return O.useMemo(function(){return t.hooks.dragSource()},[t])}function jH(t){return O.useMemo(function(){return t.hooks.dragPreview()},[t])}function MH(t,e){var n=xN(t,e);we(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");var r=xH(),i=bH(n.options,n.previewOptions);return pH(n,r,i),[wN(n.collect,r,i),NH(i),jH(i)]}function DH(t){var e=t.accept;return O.useMemo(function(){return we(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]},[e])}function LH(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zH(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function BH(t,e,n){return e&&zH(t.prototype,e),t}function dP(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var VH=function(){function t(e,n){LH(this,t),dP(this,"spec",void 0),dP(this,"monitor",void 0),this.spec=e,this.monitor=n}return BH(t,[{key:"canDrop",value:function(){var n=this.spec,r=this.monitor;return n.canDrop?n.canDrop(r.getItem(),r):!0}},{key:"hover",value:function(){var n=this.spec,r=this.monitor;n.hover&&n.hover(r.getItem(),r)}},{key:"drop",value:function(){var n=this.spec,r=this.monitor;if(n.drop)return n.drop(r.getItem(),r)}}]),t}();function FH(t,e){var n=O.useMemo(function(){return new VH(t,e)},[e]);return O.useEffect(function(){n.spec=t},[t]),n}function XH(t,e){return YH(t)||qH(t,e)||WH(t,e)||ZH()}function ZH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
445
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WH(t,e){if(t){if(typeof t=="string")return hP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hP(t,e)}}function hP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function qH(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function YH(t){if(Array.isArray(t))return t}function UH(t,e,n){var r=ga(),i=FH(t,e),s=DH(t);Jo(function(){var a=tH(s,i,r),l=XH(a,2),c=l[0],u=l[1];return e.receiveHandlerId(c),n.receiveHandlerId(c),u},[r,e,i,n,s.map(function(o){return o.toString()}).join("|")])}function HH(){var t=ga();return O.useMemo(function(){return new FU(t)},[t])}function GH(t){var e=ga(),n=O.useMemo(function(){return new eH(e.getBackend())},[e]);return Jo(function(){return n.dropTargetOptions=t||null,n.reconnect(),function(){return n.disconnectDropTarget()}},[t]),n}function KH(t){return O.useMemo(function(){return t.hooks.dropTarget()},[t])}function SN(t,e){var n=xN(t,e),r=HH(),i=GH(n.options);return UH(n,r,i),[wN(n.collect,r,i),KH(i)]}function JH(t,e){return rG(t)||nG(t,e)||tG(t,e)||eG()}function eG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
446
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tG(t,e){if(t){if(typeof t=="string")return pP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pP(t,e)}}function pP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function nG(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,o,a;try{for(n=n.call(t);!(i=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function rG(t){if(Array.isArray(t))return t}function iG(t){var e=ga(),n=e.getMonitor(),r=bN(n,t),i=JH(r,2),s=i[0],o=i[1];return O.useEffect(function(){return n.subscribeToOffsetChange(o)}),O.useEffect(function(){return n.subscribeToStateChange(o)}),s}function kN(t){var e=null,n=function(){return e==null&&(e=t()),e};return n}function sG(t,e){return t.filter(function(n){return n!==e})}function oG(t,e){var n=new Set,r=function(o){return n.add(o)};t.forEach(r),e.forEach(r);var i=[];return n.forEach(function(s){return i.push(s)}),i}function aG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lG(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function cG(t,e,n){return e&&lG(t.prototype,e),t}function mP(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var uG=function(){function t(e){aG(this,t),mP(this,"entered",[]),mP(this,"isNodeInDocument",void 0),this.isNodeInDocument=e}return cG(t,[{key:"enter",value:function(n){var r=this,i=this.entered.length,s=function(a){return r.isNodeInDocument(a)&&(!a.contains||a.contains(n))};return this.entered=oG(this.entered.filter(s),[n]),i===0&&this.entered.length>0}},{key:"leave",value:function(n){var r=this.entered.length;return this.entered=sG(this.entered.filter(this.isNodeInDocument),n),r>0&&this.entered.length===0}},{key:"reset",value:function(){this.entered=[]}}]),t}(),fG=kN(function(){return/firefox/i.test(navigator.userAgent)}),CN=kN(function(){return!!window.safari});function dG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hG(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function pG(t,e,n){return e&&hG(t.prototype,e),t}function Ac(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var gP=function(){function t(e,n){dG(this,t),Ac(this,"xs",void 0),Ac(this,"ys",void 0),Ac(this,"c1s",void 0),Ac(this,"c2s",void 0),Ac(this,"c3s",void 0);for(var r=e.length,i=[],s=0;s<r;s++)i.push(s);i.sort(function(_,I){return e[_]<e[I]?-1:1});for(var o=[],a=[],l,c,u=0;u<r-1;u++)l=e[u+1]-e[u],c=n[u+1]-n[u],o.push(l),a.push(c/l);for(var f=[a[0]],d=0;d<o.length-1;d++){var h=a[d],g=a[d+1];if(h*g<=0)f.push(0);else{l=o[d];var m=o[d+1],v=l+m;f.push(3*v/((v+m)/h+(v+l)/g))}}f.push(a[a.length-1]);for(var y=[],x=[],b,k=0;k<f.length-1;k++){b=a[k];var w=f[k],S=1/o[k],C=w+f[k+1]-b-b;y.push((b-w-C)*S),x.push(C*S*S)}this.xs=e,this.ys=n,this.c1s=f,this.c2s=y,this.c3s=x}return pG(t,[{key:"interpolate",value:function(n){var r=this.xs,i=this.ys,s=this.c1s,o=this.c2s,a=this.c3s,l=r.length-1;if(n===r[l])return i[l];for(var c=0,u=a.length-1,f;c<=u;){f=Math.floor(.5*(c+u));var d=r[f];if(d<n)c=f+1;else if(d>n)u=f-1;else return i[f]}l=Math.max(0,u);var h=n-r[l],g=h*h;return i[l]+s[l]*h+o[l]*g+a[l]*h*g}}]),t}(),mG=1;function PN(t){var e=t.nodeType===mG?t:t.parentElement;if(!e)return null;var n=e.getBoundingClientRect(),r=n.top,i=n.left;return{x:i,y:r}}function Ad(t){return{x:t.clientX,y:t.clientY}}function gG(t){var e;return t.nodeName==="IMG"&&(fG()||!((e=document.documentElement)!==null&&e!==void 0&&e.contains(t)))}function OG(t,e,n,r){var i=t?e.width:n,s=t?e.height:r;return CN()&&t&&(s/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:s}}function yG(t,e,n,r,i){var s=gG(e),o=s?t:e,a=PN(o),l={x:n.x-a.x,y:n.y-a.y},c=t.offsetWidth,u=t.offsetHeight,f=r.anchorX,d=r.anchorY,h=OG(s,e,c,u),g=h.dragPreviewWidth,m=h.dragPreviewHeight,v=function(){var C=new gP([0,.5,1],[l.y,l.y/u*m,l.y+m-u]),_=C.interpolate(d);return CN()&&s&&(_+=(window.devicePixelRatio-1)*m),_},y=function(){var C=new gP([0,.5,1],[l.x,l.x/c*g,l.x+g-c]);return C.interpolate(f)},x=i.offsetX,b=i.offsetY,k=x===0||x,w=b===0||b;return{x:k?x:y(),y:w?b:v()}}var TN="__NATIVE_FILE__",EN="__NATIVE_URL__",RN="__NATIVE_TEXT__",_N="__NATIVE_HTML__";const OP=Object.freeze(Object.defineProperty({__proto__:null,FILE:TN,HTML:_N,TEXT:RN,URL:EN},Symbol.toStringTag,{value:"Module"}));function qO(t,e,n){var r=e.reduce(function(i,s){return i||t.getData(s)},"");return r??n}var Ea;function Qd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Px=(Ea={},Qd(Ea,TN,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items},dataTransfer:function(e){return e}},matchesTypes:["Files"]}),Qd(Ea,_N,{exposeProperties:{html:function(e,n){return qO(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Html","text/html"]}),Qd(Ea,EN,{exposeProperties:{urls:function(e,n){return qO(e,n,"").split(`
|
|
447
|
+
`)},dataTransfer:function(e){return e}},matchesTypes:["Url","text/uri-list"]}),Qd(Ea,RN,{exposeProperties:{text:function(e,n){return qO(e,n,"")},dataTransfer:function(e){return e}},matchesTypes:["Text","text/plain"]}),Ea);function vG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xG(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function bG(t,e,n){return e&&xG(t.prototype,e),t}function yP(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var wG=function(){function t(e){vG(this,t),yP(this,"item",void 0),yP(this,"config",void 0),this.config=e,this.item={},this.initializeExposedProperties()}return bG(t,[{key:"initializeExposedProperties",value:function(){var n=this;Object.keys(this.config.exposeProperties).forEach(function(r){Object.defineProperty(n.item,r,{configurable:!0,enumerable:!0,get:function(){return console.warn(`Browser doesn't allow reading "`.concat(r,'" until the drop event.')),null}})})}},{key:"loadDataTransfer",value:function(n){var r=this;if(n){var i={};Object.keys(this.config.exposeProperties).forEach(function(s){i[s]={value:r.config.exposeProperties[s](n,r.config.matchesTypes),configurable:!0,enumerable:!0}}),Object.defineProperties(this.item,i)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(n,r){return r===n.getSourceId()}},{key:"endDrag",value:function(){}}]),t}();function SG(t,e){var n=new wG(Px[t]);return n.loadDataTransfer(e),n}function YO(t){if(!t)return null;var e=Array.prototype.slice.call(t.types||[]);return Object.keys(Px).filter(function(n){var r=Px[n].matchesTypes;return r.some(function(i){return e.indexOf(i)>-1})})[0]||null}function kG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function CG(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function PG(t,e,n){return e&&CG(t.prototype,e),t}function UO(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var TG=function(){function t(e,n){kG(this,t),UO(this,"ownerDocument",null),UO(this,"globalContext",void 0),UO(this,"optionsArgs",void 0),this.globalContext=e,this.optionsArgs=n}return PG(t,[{key:"window",get:function(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}},{key:"document",get:function(){var n;return(n=this.globalContext)!==null&&n!==void 0&&n.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var n;return((n=this.optionsArgs)===null||n===void 0?void 0:n.rootElement)||this.window}}]),t}();function vP(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function xP(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vP(Object(n),!0).forEach(function(r){$e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vP(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function EG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function RG(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _G(t,e,n){return e&&RG(t.prototype,e),t}function $e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var $G=function(){function t(e,n,r){var i=this;EG(this,t),$e(this,"options",void 0),$e(this,"actions",void 0),$e(this,"monitor",void 0),$e(this,"registry",void 0),$e(this,"enterLeaveCounter",void 0),$e(this,"sourcePreviewNodes",new Map),$e(this,"sourcePreviewNodeOptions",new Map),$e(this,"sourceNodes",new Map),$e(this,"sourceNodeOptions",new Map),$e(this,"dragStartSourceIds",null),$e(this,"dropTargetIds",[]),$e(this,"dragEnterTargetIds",[]),$e(this,"currentNativeSource",null),$e(this,"currentNativeHandle",null),$e(this,"currentDragSourceNode",null),$e(this,"altKeyPressed",!1),$e(this,"mouseMoveTimeoutTimer",null),$e(this,"asyncEndDragFrameId",null),$e(this,"dragOverTargetIds",null),$e(this,"lastClientOffset",null),$e(this,"hoverRafId",null),$e(this,"getSourceClientOffset",function(s){var o=i.sourceNodes.get(s);return o&&PN(o)||null}),$e(this,"endDragNativeItem",function(){i.isDraggingNativeItem()&&(i.actions.endDrag(),i.currentNativeHandle&&i.registry.removeSource(i.currentNativeHandle),i.currentNativeHandle=null,i.currentNativeSource=null)}),$e(this,"isNodeInDocument",function(s){return!!(s&&i.document&&i.document.body&&i.document.body.contains(s))}),$e(this,"endDragIfSourceWasRemovedFromDOM",function(){var s=i.currentDragSourceNode;s==null||i.isNodeInDocument(s)||i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),$e(this,"handleTopDragStartCapture",function(){i.clearCurrentDragSourceNode(),i.dragStartSourceIds=[]}),$e(this,"handleTopDragStart",function(s){if(!s.defaultPrevented){var o=i.dragStartSourceIds;i.dragStartSourceIds=null;var a=Ad(s);i.monitor.isDragging()&&i.actions.endDrag(),i.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:i.getSourceClientOffset,clientOffset:a});var l=s.dataTransfer,c=YO(l);if(i.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){var u=i.monitor.getSourceId(),f=i.sourceNodes.get(u),d=i.sourcePreviewNodes.get(u)||f;if(d){var h=i.getCurrentSourcePreviewNodeOptions(),g=h.anchorX,m=h.anchorY,v=h.offsetX,y=h.offsetY,x={anchorX:g,anchorY:m},b={offsetX:v,offsetY:y},k=yG(f,d,a,x,b);l.setDragImage(d,k.x,k.y)}}try{l==null||l.setData("application/json",{})}catch{}i.setCurrentDragSourceNode(s.target);var w=i.getCurrentSourcePreviewNodeOptions(),S=w.captureDraggingState;S?i.actions.publishDragSource():setTimeout(function(){return i.actions.publishDragSource()},0)}else if(c)i.beginDragNativeItem(c);else{if(l&&!l.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}}}),$e(this,"handleTopDragEndCapture",function(){i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),$e(this,"handleTopDragEnterCapture",function(s){i.dragEnterTargetIds=[];var o=i.enterLeaveCounter.enter(s.target);if(!(!o||i.monitor.isDragging())){var a=s.dataTransfer,l=YO(a);l&&i.beginDragNativeItem(l,a)}}),$e(this,"handleTopDragEnter",function(s){var o=i.dragEnterTargetIds;if(i.dragEnterTargetIds=[],!!i.monitor.isDragging()){i.altKeyPressed=s.altKey,o.length>0&&i.actions.hover(o,{clientOffset:Ad(s)});var a=o.some(function(l){return i.monitor.canDropOnTarget(l)});a&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=i.getCurrentDropEffect()))}}),$e(this,"handleTopDragOverCapture",function(){i.dragOverTargetIds=[]}),$e(this,"handleTopDragOver",function(s){var o=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}i.altKeyPressed=s.altKey,i.lastClientOffset=Ad(s),i.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(i.hoverRafId=requestAnimationFrame(function(){i.monitor.isDragging()&&i.actions.hover(o||[],{clientOffset:i.lastClientOffset}),i.hoverRafId=null}));var a=(o||[]).some(function(l){return i.monitor.canDropOnTarget(l)});a?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=i.getCurrentDropEffect())):i.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))}),$e(this,"handleTopDragLeaveCapture",function(s){i.isDraggingNativeItem()&&s.preventDefault();var o=i.enterLeaveCounter.leave(s.target);o&&i.isDraggingNativeItem()&&setTimeout(function(){return i.endDragNativeItem()},0)}),$e(this,"handleTopDropCapture",function(s){if(i.dropTargetIds=[],i.isDraggingNativeItem()){var o;s.preventDefault(),(o=i.currentNativeSource)===null||o===void 0||o.loadDataTransfer(s.dataTransfer)}else YO(s.dataTransfer)&&s.preventDefault();i.enterLeaveCounter.reset()}),$e(this,"handleTopDrop",function(s){var o=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(o,{clientOffset:Ad(s)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.monitor.isDragging()&&i.actions.endDrag()}),$e(this,"handleSelectStart",function(s){var o=s.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(s.preventDefault(),o.dragDrop()))}),this.options=new TG(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new uG(this.isNodeInDocument)}return _G(t,[{key:"profile",value:function(){var n,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((n=this.dragStartSourceIds)===null||n===void 0?void 0:n.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var n=this.rootElement;if(n!==void 0){if(n.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");n.__isReactDndBackendSetUp=!0,this.addEventListeners(n)}}},{key:"teardown",value:function(){var n=this.rootElement;if(n!==void 0&&(n.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}},{key:"connectDragPreview",value:function(n,r,i){var s=this;return this.sourcePreviewNodeOptions.set(n,i),this.sourcePreviewNodes.set(n,r),function(){s.sourcePreviewNodes.delete(n),s.sourcePreviewNodeOptions.delete(n)}}},{key:"connectDragSource",value:function(n,r,i){var s=this;this.sourceNodes.set(n,r),this.sourceNodeOptions.set(n,i);var o=function(c){return s.handleDragStart(c,n)},a=function(c){return s.handleSelectStart(c)};return r.setAttribute("draggable","true"),r.addEventListener("dragstart",o),r.addEventListener("selectstart",a),function(){s.sourceNodes.delete(n),s.sourceNodeOptions.delete(n),r.removeEventListener("dragstart",o),r.removeEventListener("selectstart",a),r.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(n,r){var i=this,s=function(c){return i.handleDragEnter(c,n)},o=function(c){return i.handleDragOver(c,n)},a=function(c){return i.handleDrop(c,n)};return r.addEventListener("dragenter",s),r.addEventListener("dragover",o),r.addEventListener("drop",a),function(){r.removeEventListener("dragenter",s),r.removeEventListener("dragover",o),r.removeEventListener("drop",a)}}},{key:"addEventListeners",value:function(n){n.addEventListener&&(n.addEventListener("dragstart",this.handleTopDragStart),n.addEventListener("dragstart",this.handleTopDragStartCapture,!0),n.addEventListener("dragend",this.handleTopDragEndCapture,!0),n.addEventListener("dragenter",this.handleTopDragEnter),n.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.addEventListener("dragover",this.handleTopDragOver),n.addEventListener("dragover",this.handleTopDragOverCapture,!0),n.addEventListener("drop",this.handleTopDrop),n.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(n){n.removeEventListener&&(n.removeEventListener("dragstart",this.handleTopDragStart),n.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),n.removeEventListener("dragend",this.handleTopDragEndCapture,!0),n.removeEventListener("dragenter",this.handleTopDragEnter),n.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),n.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),n.removeEventListener("dragover",this.handleTopDragOver),n.removeEventListener("dragover",this.handleTopDragOverCapture,!0),n.removeEventListener("drop",this.handleTopDrop),n.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(n);return xP({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var n=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(n);return xP({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}},{key:"isDraggingNativeItem",value:function(){var n=this.monitor.getItemType();return Object.keys(OP).some(function(r){return OP[r]===n})}},{key:"beginDragNativeItem",value:function(n,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=SG(n,r),this.currentNativeHandle=this.registry.addSource(n,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(n){var r=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=n;var i=1e3;this.mouseMoveTimeoutTimer=setTimeout(function(){var s;return(s=r.rootElement)===null||s===void 0?void 0:s.addEventListener("mousemove",r.endDragIfSourceWasRemovedFromDOM,!0)},i)}},{key:"clearCurrentDragSourceNode",value:function(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var n;(n=this.window)===null||n===void 0||n.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}},{key:"handleDragStart",value:function(n,r){n.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}},{key:"handleDragEnter",value:function(n,r){this.dragEnterTargetIds.unshift(r)}},{key:"handleDragOver",value:function(n,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}},{key:"handleDrop",value:function(n,r){this.dropTargetIds.unshift(r)}}]),t}(),Id;function AG(){return Id||(Id=new Image,Id.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Id}var QG=function(e,n,r){return new $G(e,n,r)};function IG(t){const e=Kn(),n=e.selectedIds,[r,i,s]=MH(()=>({canDrag:()=>t.isDraggable,type:"NODE",item:()=>{const o=e.isSelected(t.id)?Array.from(n):[t.id];return e.dispatch($l.dragStart(t.id,o)),{id:t.id,dragIds:o}},end:()=>{e.hideCursor(),e.dispatch($l.dragEnd())}}),[n,t]);return O.useEffect(()=>{s(AG())},[s]),i}function NG(t,e){const n=t.getBoundingClientRect(),r=e.x-Math.round(n.x),i=e.y-Math.round(n.y),s=n.height,o=i<s/2,a=!o,l=s/4,c=i>l&&i<s-l;return{x:r,inTopHalf:o,inBottomHalf:a,inMiddle:c,atTop:!c&&o,atBottom:!c&&a}}function jG(t,e,n,r){return t?t.isInternal?r.atTop?[e,t]:r.inMiddle?[t,t]:[t,n]:r.inTopHalf?[e,t]:[t,n]:[e,null]}function Nd(t,e){return{parentId:t||null,index:e}}function Ra(t,e){return{type:"line",index:t,level:e}}function MG(t){return{type:"highlight",id:t}}function HO(t,e){var n;let r=t;for(;r.parent&&r.level>e;)r=r.parent;const i=((n=r.parent)===null||n===void 0?void 0:n.id)||null,s=tN(r)+1;return{parentId:i,index:s}}function $N(t){var e;const n=NG(t.element,t.offset),r=t.indent,i=Math.round(Math.max(0,n.x-r)/r),{node:s,nextNode:o,prevNode:a}=t,[l,c]=jG(s,a,o,n);if(s&&s.isInternal&&n.inMiddle)return{drop:Nd(s.id,null),cursor:MG(s.id)};if(!l)return{drop:Nd((e=c==null?void 0:c.parent)===null||e===void 0?void 0:e.id,0),cursor:Ra(0,0)};if(GI(l)){const u=Ah(i,(c==null?void 0:c.level)||0,l.level);return{drop:HO(l,u),cursor:Ra(l.rowIndex+1,u)}}if(KI(l)){const u=Ah(i,(c==null?void 0:c.level)||0,l.level);return{drop:HO(l,u),cursor:Ra(l.rowIndex+1,u)}}if(JI(l)){const u=Ah(i,0,l.level+1);return u>l.level?{drop:Nd(l.id,0),cursor:Ra(l.rowIndex+1,u)}:{drop:HO(l,u),cursor:Ra(l.rowIndex+1,u)}}return{drop:Nd(l==null?void 0:l.id,0),cursor:Ra(l.rowIndex+1,l.level+1)}}function DG(t,e){const n=Kn(),[r,i]=SN(()=>({accept:"NODE",canDrop:()=>n.canDrop(),hover:(s,o)=>{const a=o.getClientOffset();if(!t.current||!a)return;const{cursor:l,drop:c}=$N({element:t.current,offset:a,indent:n.indent,node:e,prevNode:e.prev,nextNode:e.next});c&&n.dispatch($l.hovering(c.parentId,c.index)),o.canDrop()?l&&n.showCursor(l):n.hideCursor()},drop:(s,o)=>{if(!o.canDrop())return null;let{parentId:a,index:l,dragIds:c}=n.state.dnd;oN(n.props.onMove,{dragIds:c,parentId:a===Gu?null:a,index:l===null?0:l,dragNodes:n.dragNodes,parentNode:n.get(a)}),n.open(a)}}),[e,t.current,n.props]);return i}function LG(t){const e=Kn(),n=e.at(t);if(!n)throw new Error(`Could not find node for index: ${t}`);return O.useMemo(()=>{const r=n.clone();return e.visibleNodes[t]=r,r},[...Object.values(n.state),n])}const zG=ee.memo(function({index:e,style:n}){HI(),dq();const r=Kn(),i=LG(e),s=O.useRef(null),o=IG(i),a=DG(s,i),l=O.useCallback(m=>{s.current=m,a(m)},[a]),c=r.indent*i.level,u=O.useMemo(()=>({paddingLeft:c}),[c]),f=O.useMemo(()=>{var m,v;return Object.assign(Object.assign({},n),{top:parseFloat(n.top)+((v=(m=r.props.padding)!==null&&m!==void 0?m:r.props.paddingTop)!==null&&v!==void 0?v:0)})},[n,r.props.padding,r.props.paddingTop]),d={role:"treeitem","aria-level":i.level+1,"aria-selected":i.isSelected,"aria-expanded":i.isOpen,style:f,tabIndex:-1,className:r.props.rowClassName};O.useEffect(()=>{var m;!i.isEditing&&i.isFocused&&((m=s.current)===null||m===void 0||m.focus({preventScroll:!0}))},[i.isEditing,i.isFocused,s.current]);const h=r.renderNode,g=r.renderRow;return p.jsx(g,{node:i,innerRef:l,attrs:d,children:p.jsx(h,{node:i,tree:r,style:u,dragHandle:o})})});let GO="",bP=null;function AN(){HI();const t=Kn();return p.jsx("div",{role:"tree",style:{height:t.height,width:t.width,minHeight:0,minWidth:0},onContextMenu:t.props.onContextMenu,onClick:t.props.onClick,tabIndex:0,onFocus:e=>{e.currentTarget.contains(e.relatedTarget)||t.onFocus()},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||t.onBlur()},onKeyDown:e=>{var n;if(t.isEditing)return;if(e.key==="Backspace"){if(!t.props.onDelete)return;const i=Array.from(t.selectedIds);if(i.length>1){let s=t.mostRecentNode;for(;s&&s.isSelected;)s=s.nextSibling;s||(s=t.lastNode),t.focus(s,{scroll:!1}),t.delete(Array.from(i))}else{const s=t.focusedNode;if(s){const o=s.nextSibling,a=s.parent;t.focus(o||a,{scroll:!1}),t.delete(s)}}return}if(e.key==="Tab"&&!e.shiftKey){e.preventDefault(),nN(e.currentTarget);return}if(e.key==="Tab"&&e.shiftKey){e.preventDefault(),rN(e.currentTarget);return}if(e.key==="ArrowDown"){e.preventDefault();const i=t.nextNode;if(e.metaKey){t.select(t.focusedNode),t.activate(t.focusedNode);return}else if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const s=t.focusedNode;s?s.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.firstNode);return}}if(e.key==="ArrowUp"){e.preventDefault();const i=t.prevNode;if(!e.shiftKey||t.props.disableMultiSelection){t.focus(i);return}else{if(!i)return;const s=t.focusedNode;s?s.isSelected?t.selectContiguous(i):t.selectMulti(i):t.focus(t.lastNode);return}}if(e.key==="ArrowRight"){const i=t.focusedNode;if(!i)return;i.isInternal&&i.isOpen?t.focus(t.nextNode):i.isInternal&&t.open(i.id);return}if(e.key==="ArrowLeft"){const i=t.focusedNode;if(!i||i.isRoot)return;i.isInternal&&i.isOpen?t.close(i.id):!((n=i.parent)===null||n===void 0)&&n.isRoot||t.focus(i.parent);return}if(e.key==="a"&&e.metaKey&&!t.props.disableMultiSelection){e.preventDefault(),t.selectAll();return}if(e.key==="a"&&!e.metaKey&&t.props.onCreate){t.createLeaf();return}if(e.key==="A"&&!e.metaKey){if(!t.props.onCreate)return;t.createInternal();return}if(e.key==="Home"){e.preventDefault(),t.focus(t.firstNode);return}if(e.key==="End"){e.preventDefault(),t.focus(t.lastNode);return}if(e.key==="Enter"){const i=t.focusedNode;if(!i||!i.isEditable||!t.props.onRename)return;setTimeout(()=>{i&&t.edit(i)});return}if(e.key===" "){e.preventDefault();const i=t.focusedNode;if(!i)return;i.isLeaf?(i.select(),i.activate()):i.toggle();return}if(e.key==="*"){const i=t.focusedNode;if(!i)return;t.openSiblings(i);return}if(e.key==="PageUp"){e.preventDefault(),t.pageUp();return}e.key==="PageDown"&&(e.preventDefault(),t.pageDown()),clearTimeout(bP),GO+=e.key,bP=setTimeout(()=>{GO=""},600);const r=t.visibleNodes.find(i=>{const s=i.data.name;return typeof s=="string"?s.toLowerCase().startsWith(GO):!1});r&&t.focus(r.id)},children:p.jsx(Yq,{className:t.props.className,outerRef:t.listEl,itemCount:t.visibleNodes.length,height:t.height,width:t.width,itemSize:t.rowHeight,overscanCount:t.overscanCount,itemKey:e=>{var n;return((n=t.visibleNodes[e])===null||n===void 0?void 0:n.id)||e},outerElementType:Gq,innerElementType:eY,onScroll:t.props.onScroll,onItemsRendered:t.onItemsRendered.bind(t),ref:t.list,children:zG})})}function wP(t){return t.isFiltered?VG(t.root,t.isMatch.bind(t)):BG(t.root)}function BG(t){const e=[];function n(r){var i;r.level>=0&&e.push(r),r.isOpen&&((i=r.children)===null||i===void 0||i.forEach(n))}return n(t),e.forEach(QN),e}function VG(t,e){const n={},r=[];function i(o){if(!o.isRoot&&e(o)){n[o.id]=!0;let l=o.parent;for(;l;)n[l.id]=!0,l=l.parent}if(o.children)for(let l of o.children)i(l)}function s(o){var a;o.level>=0&&n[o.id]&&r.push(o),o.isOpen&&((a=o.children)===null||a===void 0||a.forEach(s))}return i(t),s(t),r.forEach(QN),r}function QN(t,e){t.rowIndex=e}const SP=t=>t.reduce((e,n,r)=>(e[n.id]=r,e),{});var KO=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?s(u.value):i(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};const{safeRun:Ct,identify:Ni,identifyNull:_r}=gq;class hu{constructor(e,n,r,i){this.store=e,this.props=n,this.list=r,this.listEl=i,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=QC(this),this.visibleNodes=wP(this),this.idToIndex=SP(this.visibleNodes)}update(e){this.props=e,this.root=QC(this),this.visibleNodes=wP(this),this.idToIndex=SP(this.visibleNodes)}dispatch(e){return this.store.dispatch(e)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){var e;return(e=this.props.width)!==null&&e!==void 0?e:300}get height(){var e;return(e=this.props.height)!==null&&e!==void 0?e:500}get indent(){var e;return(e=this.props.indent)!==null&&e!==void 0?e:24}get rowHeight(){var e;return(e=this.props.rowHeight)!==null&&e!==void 0?e:24}get overscanCount(){var e;return(e=this.props.overscanCount)!==null&&e!==void 0?e:1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){var e;const n=(e=this.props.searchMatch)!==null&&e!==void 0?e:(r,i)=>JSON.stringify(Object.values(r.data)).toLocaleLowerCase().includes(i.toLocaleLowerCase());return r=>n(r,this.searchTerm)}accessChildren(e){var n;const r=this.props.childrenAccessor||"children";return(n=Uc(e,r))!==null&&n!==void 0?n:null}accessId(e){const n=this.props.idAccessor||"id",r=Uc(e,n);if(!r)throw new Error("Data must contain an 'id' property or props.idAccessor must return a string");return r}get firstNode(){var e;return(e=this.visibleNodes[0])!==null&&e!==void 0?e:null}get lastNode(){var e;return(e=this.visibleNodes[this.visibleNodes.length-1])!==null&&e!==void 0?e:null}get focusedNode(){var e;return(e=this.get(this.state.nodes.focus.id))!==null&&e!==void 0?e:null}get mostRecentNode(){var e;return(e=this.get(this.state.nodes.selection.mostRecent))!==null&&e!==void 0?e:null}get nextNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e+1)}get prevNode(){const e=this.indexOf(this.focusedNode);return e===null?null:this.at(e-1)}get(e){return e&&e in this.idToIndex&&this.visibleNodes[this.idToIndex[e]]||null}at(e){return this.visibleNodes[e]||null}nodesBetween(e,n){var r;if(e===null||n===null)return[];const i=(r=this.indexOf(e))!==null&&r!==void 0?r:0,s=this.indexOf(n);if(s===null)return[];const o=Math.min(i,s),a=Math.max(i,s);return this.visibleNodes.slice(o,a+1)}indexOf(e){const n=sN(e);return n?this.idToIndex[n]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(){return KO(this,arguments,void 0,function*(e={}){var n,r;const i=e.parentId===void 0?cN(this):e.parentId,s=(n=e.index)!==null&&n!==void 0?n:lN(this),o=(r=e.type)!==null&&r!==void 0?r:"leaf",a=yield Ct(this.props.onCreate,{type:o,parentId:i,index:s,parentNode:this.get(i)});a&&(this.focus(a),setTimeout(()=>{this.edit(a).then(()=>{this.select(a),this.activate(a)})}))})}delete(e){return KO(this,void 0,void 0,function*(){if(!e)return;const r=(Array.isArray(e)?e:[e]).map(Ni),i=r.map(s=>this.get(s)).filter(s=>!!s);yield Ct(this.props.onDelete,{nodes:i,ids:r})})}edit(e){const n=Ni(e);return this.resolveEdit({cancelled:!0}),this.scrollTo(n),this.dispatch(zO(n)),new Promise(r=>{hu.editPromise=r})}submit(e,n){return KO(this,void 0,void 0,function*(){if(!e)return;const r=Ni(e);yield Ct(this.props.onRename,{id:r,name:n,node:this.get(r)}),this.dispatch(zO(null)),this.resolveEdit({cancelled:!1,value:n}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(zO(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(e){const n=this.get(_r(e));n&&Ct(this.props.onActivate,n)}resolveEdit(e){const n=hu.editPromise;n&&n(e),hu.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let e=[];for(let n of Array.from(this.selectedIds)){const r=this.get(n);r&&e.push(r)}return e}focus(e,n={}){e&&(this.props.selectionFollowsFocus?this.select(e):(this.dispatch(Ca(Ni(e))),n.scroll!==!1&&this.scrollTo(e),this.focusedNode&&Ct(this.props.onFocus,this.focusedNode)))}pageUp(){var e,n;const r=this.visibleStartIndex,s=this.visibleStopIndex-r;let o=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;o>r?o=r:o=Math.max(r-s,0),this.focus(this.at(o))}pageDown(){var e,n;const r=this.visibleStartIndex,i=this.visibleStopIndex,s=i-r;let o=(n=(e=this.focusedNode)===null||e===void 0?void 0:e.rowIndex)!==null&&n!==void 0?n:0;o<i?o=i:o=Math.min(o+s,this.visibleNodes.length-1),this.focus(this.at(o))}select(e,n={}){if(!e)return;const r=n.focus!==!1,i=Ni(e);r&&this.dispatch(Ca(i)),this.dispatch(Rr.only(i)),this.dispatch(Rr.anchor(i)),this.dispatch(Rr.mostRecent(i)),this.scrollTo(i,n.align),this.focusedNode&&r&&Ct(this.props.onFocus,this.focusedNode),Ct(this.props.onSelect,this.selectedNodes)}deselect(e){if(!e)return;const n=Ni(e);this.dispatch(Rr.remove(n)),Ct(this.props.onSelect,this.selectedNodes)}selectMulti(e){const n=this.get(_r(e));n&&(this.dispatch(Ca(n.id)),this.dispatch(Rr.add(n.id)),this.dispatch(Rr.anchor(n.id)),this.dispatch(Rr.mostRecent(n.id)),this.scrollTo(n),this.focusedNode&&Ct(this.props.onFocus,this.focusedNode),Ct(this.props.onSelect,this.selectedNodes))}selectContiguous(e){if(!e)return;const n=Ni(e),{anchor:r,mostRecent:i}=this.state.nodes.selection;this.dispatch(Ca(n)),this.dispatch(Rr.remove(this.nodesBetween(r,i))),this.dispatch(Rr.add(this.nodesBetween(r,_r(n)))),this.dispatch(Rr.mostRecent(n)),this.scrollTo(n),this.focusedNode&&Ct(this.props.onFocus,this.focusedNode),Ct(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),Ct(this.props.onSelect,this.selectedNodes)}selectAll(){var e;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(Ca((e=this.lastNode)===null||e===void 0?void 0:e.id)),this.focusedNode&&Ct(this.props.onFocus,this.focusedNode),Ct(this.props.onSelect,this.selectedNodes)}setSelection(e){var n;const r=new Set((n=e.ids)===null||n===void 0?void 0:n.map(Ni)),i=_r(e.anchor),s=_r(e.mostRecent);this.dispatch(Rr.set({ids:r,anchor:i,mostRecent:s})),Ct(this.props.onSelect,this.selectedNodes)}get cursorParentId(){const{cursor:e}=this.state.dnd;switch(e.type){case"highlight":return e.id;default:return null}}get cursorOverFolder(){return this.state.dnd.cursor.type==="highlight"}get dragNodes(){return this.state.dnd.dragIds.map(e=>this.get(e)).filter(e=>!!e)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){var e;if(this.isFiltered)return!1;const n=(e=this.get(this.state.dnd.parentId))!==null&&e!==void 0?e:this.root,r=this.dragNodes,i=this.props.disableDrop;for(const s of r)if(!s||!n||s.isInternal&&eN(n,s))return!1;return typeof i=="function"?!i({parentNode:n,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):typeof i=="string"?!n.data[i]:typeof i=="boolean"?!i:!0}hideCursor(){this.dispatch($l.cursor({type:"none"}))}showCursor(e){this.dispatch($l.cursor(e))}open(e){const n=_r(e);n&&(this.isOpen(n)||(this.dispatch(vx.open(n,this.isFiltered)),Ct(this.props.onToggle,n)))}close(e){const n=_r(e);n&&this.isOpen(n)&&(this.dispatch(vx.close(n,this.isFiltered)),Ct(this.props.onToggle,n))}toggle(e){const n=_r(e);if(n)return this.isOpen(n)?this.close(n):this.open(n)}openParents(e){const n=_r(e);if(!n)return;const r=Mw(this.root,n);let i=r==null?void 0:r.parent;for(;i;)this.open(i.id),i=i.parent}openSiblings(e){const n=e.parent;if(!n)this.toggle(e.id);else if(n.children){const r=e.isOpen;for(let i of n.children)i.isInternal&&(r?this.close(i.id):this.open(i.id));this.scrollTo(this.focusedNode)}}openAll(){Mp(this.root,e=>{e.isInternal&&e.open()})}closeAll(){Mp(this.root,e=>{e.isInternal&&e.close()})}scrollTo(e,n="smart"){if(!e)return;const r=Ni(e);return this.openParents(r),aN(()=>r in this.idToIndex).then(()=>{var i;const s=this.idToIndex[r];s!==void 0&&((i=this.list.current)===null||i===void 0||i.scrollToItem(s,n))}).catch(()=>{})}get isEditing(){return this.state.nodes.edit.id!==null}get isFiltered(){var e;return!!(!((e=this.props.searchTerm)===null||e===void 0)&&e.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return this.state.nodes.selection.ids.size===0}get hasOneSelection(){return this.state.nodes.selection.ids.size===1}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(e){return e?this.state.nodes.selection.ids.has(e):!1}isOpen(e){var n,r,i;if(!e)return!1;if(e===Gu)return!0;const s=(n=this.props.openByDefault)!==null&&n!==void 0?n:!0;return this.isFiltered?(r=this.state.nodes.open.filtered[e])!==null&&r!==void 0?r:!0:(i=this.state.nodes.open.unfiltered[e])!==null&&i!==void 0?i:s}isEditable(e){const n=this.props.disableEdit||(()=>!1);return!Uc(e,n)}isDraggable(e){const n=this.props.disableDrag||(()=>!1);return!Uc(e,n)}isDragging(e){const n=_r(e);return n?this.state.nodes.drag.id===n:!1}isFocused(e){return this.hasFocus&&this.state.nodes.focus.id===e}isMatch(e){return this.matchFn(e)}willReceiveDrop(e){const n=_r(e);if(!n)return!1;const{destinationParentId:r,destinationIndex:i}=this.state.nodes.drag;return n===r&&i===null}onFocus(){const e=this.focusedNode||this.firstNode;e&&this.dispatch(Ca(e.id))}onBlur(){this.dispatch(Pq())}onItemsRendered(e){this.visibleStartIndex=e.visibleStartIndex,this.visibleStopIndex=e.visibleStopIndex}get renderContainer(){return this.props.renderContainer||AN}get renderRow(){return this.props.renderRow||bq}get renderNode(){return this.props.children||wq}get renderDragPreview(){return this.props.renderDragPreview||uN}get renderCursor(){return this.props.renderCursor||xq}}function Ft(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var FG=typeof Symbol=="function"&&Symbol.observable||"@@observable",kP=FG,JO=()=>Math.random().toString(36).substring(7).split("").join("."),XG={INIT:`@@redux/INIT${JO()}`,REPLACE:`@@redux/REPLACE${JO()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${JO()}`},zp=XG;function ZG(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function IN(t,e,n){if(typeof t!="function")throw new Error(Ft(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ft(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ft(1));return n(IN)(t,e)}let r=t,i=e,s=new Map,o=s,a=0,l=!1;function c(){o===s&&(o=new Map,s.forEach((v,y)=>{o.set(y,v)}))}function u(){if(l)throw new Error(Ft(3));return i}function f(v){if(typeof v!="function")throw new Error(Ft(4));if(l)throw new Error(Ft(5));let y=!0;c();const x=a++;return o.set(x,v),function(){if(y){if(l)throw new Error(Ft(6));y=!1,c(),o.delete(x),s=null}}}function d(v){if(!ZG(v))throw new Error(Ft(7));if(typeof v.type>"u")throw new Error(Ft(8));if(typeof v.type!="string")throw new Error(Ft(17));if(l)throw new Error(Ft(9));try{l=!0,i=r(i,v)}finally{l=!1}return(s=o).forEach(x=>{x()}),v}function h(v){if(typeof v!="function")throw new Error(Ft(10));r=v,d({type:zp.REPLACE})}function g(){const v=f;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Ft(11));function x(){const k=y;k.next&&k.next(u())}return x(),{unsubscribe:v(x)}},[kP](){return this}}}return d({type:zp.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:h,[kP]:g}}function WG(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:zp.INIT})>"u")throw new Error(Ft(12));if(typeof n(void 0,{type:zp.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ft(13))})}function CP(t){const e=Object.keys(t),n={};for(let s=0;s<e.length;s++){const o=e[s];typeof t[o]=="function"&&(n[o]=t[o])}const r=Object.keys(n);let i;try{WG(n)}catch(s){i=s}return function(o={},a){if(i)throw i;let l=!1;const c={};for(let u=0;u<r.length;u++){const f=r[u],d=n[f],h=o[f],g=d(h,a);if(typeof g>"u")throw a&&a.type,new Error(Ft(14));c[f]=g,l=l||g!==h}return l=l||r.length!==Object.keys(o).length,l?c:o}}function qG(t=_l().nodes.drag,e){switch(e.type){case"DND_DRAG_START":return Object.assign(Object.assign({},t),{id:e.id,selectedIds:e.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},t),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":return e.parentId!==t.destinationParentId||e.index!=t.destinationIndex?Object.assign(Object.assign({},t),{destinationParentId:e.parentId,destinationIndex:e.index}):t;default:return t}}const YG=CP({nodes:CP({focus:Tq,edit:Cq,open:Eq,selection:Rq,drag:qG}),dnd:_q}),UG=_l();function HG({treeProps:t,imperativeHandle:e,children:n}){const r=O.useRef(null),i=O.useRef(null),s=O.useRef(IN(YG,_l(t))),o=J$.useSyncExternalStore(s.current.subscribe,s.current.getState,()=>UG),a=O.useMemo(()=>new hu(s.current,t,r,i),[]),l=O.useRef(0);return O.useMemo(()=>{l.current+=1,a.update(t)},[...Object.values(t),o.nodes.open]),O.useImperativeHandle(e,()=>a),O.useEffect(()=>{a.props.selection?a.select(a.props.selection,{focus:!1}):a.deselectAll()},[a.props.selection]),O.useEffect(()=>{a.props.searchTerm||s.current.dispatch(vx.clear(!0))},[a.props.searchTerm]),p.jsx(WI.Provider,{value:a,children:p.jsx(UI.Provider,{value:l.current,children:p.jsx(qI.Provider,{value:o.nodes,children:p.jsx(YI.Provider,{value:o.dnd,children:p.jsx(QU,Object.assign({backend:QG,options:{rootElement:a.props.dndRootElement||void 0}},t.dndManager&&{manager:t.dndManager},{children:n}))})})})})}function GG(){const t=Kn(),[,e]=SN(()=>({accept:"NODE",canDrop:(n,r)=>r.isOver({shallow:!0})?t.canDrop():!1,hover:(n,r)=>{if(!r.isOver({shallow:!0}))return;const i=r.getClientOffset();if(!t.listEl.current||!i)return;const{cursor:s,drop:o}=$N({element:t.listEl.current,offset:i,indent:t.indent,node:null,prevNode:t.visibleNodes[t.visibleNodes.length-1],nextNode:null});o&&t.dispatch($l.hovering(o.parentId,o.index)),r.canDrop()?s&&t.showCursor(s):t.hideCursor()}}),[t]);e(t.listEl)}function KG(t){return GG(),t.children}function JG(){const e=Kn().props.renderContainer||AN;return p.jsx(p.Fragment,{children:p.jsx(e,{})})}function eK(){const t=Kn(),{offset:e,mouse:n,item:r,isDragging:i}=iG(o=>({offset:o.getSourceClientOffset(),mouse:o.getClientOffset(),item:o.getItem(),isDragging:o.isDragging()})),s=t.props.renderDragPreview||uN;return p.jsx(s,{offset:e,mouse:n,id:(r==null?void 0:r.id)||null,dragIds:(r==null?void 0:r.dragIds)||[],isDragging:i})}class tK{constructor(e){this.root=nK(e)}get data(){var e,n;return(n=(e=this.root.children)===null||e===void 0?void 0:e.map(r=>r.data))!==null&&n!==void 0?n:[]}create(e){const n=e.parentId?this.find(e.parentId):this.root;if(!n)return null;n.addChild(e.data,e.index)}move(e){const n=this.find(e.id),r=e.parentId?this.find(e.parentId):this.root;!n||!r||(r.addChild(n.data,e.index),n.drop())}update(e){const n=this.find(e.id);n&&n.update(e.changes)}drop(e){const n=this.find(e.id);n&&n.drop()}find(e,n=this.root){if(!n)return null;if(n.id===e)return n;if(n.children){for(let r of n.children){const i=this.find(e,r);if(i)return i}return null}return null}}function nK(t){const e=new NN({id:"ROOT"},null);return e.children=t.map(n=>Xw(n,e)),e}function Xw(t,e){const n=new NN(t,e);return t.children&&(n.children=t.children.map(r=>Xw(r,n))),n}class NN{constructor(e,n){this.data=e,this.parent=n,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,n){var r,i;const s=Xw(e,this);this.children=(r=this.children)!==null&&r!==void 0?r:[],this.children.splice(n,0,s),this.data.children=(i=this.data.children)!==null&&i!==void 0?i:[],this.data.children.splice(n,0,e)}removeChild(e){var n,r;(n=this.children)===null||n===void 0||n.splice(e,1),(r=this.data.children)===null||r===void 0||r.splice(e,1)}update(e){if(this.hasParent()){const n=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),n),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}}let rK=0;function iK(t){const[e,n]=O.useState(t),r=O.useMemo(()=>new tK(e),[e]);return[e,{onMove:c=>{for(const u of c.dragIds)r.move({id:u,parentId:c.parentId,index:c.index});n(r.data)},onRename:({name:c,id:u})=>{r.update({id:u,changes:{name:c}}),n(r.data)},onCreate:({parentId:c,index:u,type:f})=>{const d={id:`simple-tree-id-${rK++}`,name:""};return f==="internal"&&(d.children=[]),r.create({parentId:c,index:u,data:d}),n(r.data),d},onDelete:c=>{c.ids.forEach(u=>r.drop({id:u})),n(r.data)}}]}function sK(t){if(t.initialData&&t.data)throw new Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(t.initialData&&(t.onCreate||t.onDelete||t.onMove||t.onRename))throw new Error(`React Arborist Tree => You passed the initialData prop along with a data handler.
|
|
448
|
+
Use the data prop if you want to provide your own handlers.`);if(t.initialData){const[e,n]=iK(t.initialData);return Object.assign(Object.assign(Object.assign({},t),n),{data:e})}else return t}function oK(t,e){const n=sK(t);return p.jsxs(HG,{treeProps:n,imperativeHandle:e,children:[p.jsx(KG,{children:p.jsx(JG,{})}),p.jsx(eK,{})]})}const aK=O.forwardRef(oK),Ge=O.forwardRef(({className:t,type:e,...n},r)=>p.jsx("input",{type:e,className:le("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:r,...n}));Ge.displayName="Input";function lK({status:t}){if(!t)return null;const e={indexed:{icon:p.jsx(Ki,{className:"h-3 w-3 text-green-500 flex-shrink-0"}),label:"Indexed"},modified:{icon:p.jsx(Lf,{className:"h-3 w-3 text-yellow-500 flex-shrink-0"}),label:"Modified since last index"},unindexed:{icon:p.jsx(Or,{className:"h-3 w-3 text-gray-400 flex-shrink-0"}),label:"Not indexed"},indexing:{icon:p.jsx(Un,{className:"h-3 w-3 text-blue-500 animate-spin flex-shrink-0"}),label:"Indexing..."}},{icon:n,label:r}=e[t];return p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx("span",{className:"flex-shrink-0 cursor-help",children:n})}),p.jsx(On,{side:"left",children:p.jsx("p",{children:r})})]})}function cK({type:t,isOpen:e,activeTab:n}){return t==="directory"?e?p.jsx(Gb,{className:"h-4 w-4 text-yellow-500 flex-shrink-0"}):p.jsx(kl,{className:"h-4 w-4 text-yellow-500 flex-shrink-0"}):n==="notes"?p.jsx(Sn,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}):p.jsx(sn,{className:"h-4 w-4 text-orange-500 flex-shrink-0"})}const uK=O.forwardRef(function({node:e,style:n,tree:r,isSelected:i,isMultiSelected:s,isIndexing:o,activeTab:a,onSelect:l,onContextMenu:c},u){const f=r.isOpen(e.id),d=e.type==="directory",h=x=>{d&&r.toggle(e.id),l(e,x)},g=x=>{x.preventDefault(),c(e,x)},v=(e.relativePath.split("/").length-1)*16+8,y=o?"indexing":e.indexStatus;return p.jsxs("div",{ref:u,style:{...n,paddingLeft:v},className:le("flex items-center gap-2 h-7 pr-2 rounded-sm cursor-pointer select-none","hover:bg-accent/50 transition-colors",i&&"bg-accent",s&&"bg-accent/70",o&&"bg-blue-500/10"),onClick:h,onContextMenu:g,children:[d?p.jsx("button",{className:"flex-shrink-0 w-4 h-4 flex items-center justify-center",onClick:x=>{x.stopPropagation(),r.toggle(e.id)},children:f?p.jsx(pa,{className:"h-3 w-3 text-muted-foreground"}):p.jsx(Fm,{className:"h-3 w-3 text-muted-foreground"})}):p.jsx("div",{className:"w-4 flex-shrink-0"}),p.jsx(cK,{type:e.type,isOpen:f,activeTab:a}),p.jsx("span",{className:le("flex-1 truncate text-sm",o&&"text-blue-600 dark:text-blue-400"),children:e.name}),e.type==="file"&&y&&y!=="indexed"&&p.jsx(lK,{status:y})]})});function fK(t,e){const n=new Map,r=[...t].sort((o,a)=>o.relativePath.localeCompare(a.relativePath));for(const o of r){const a=o.relativePath.split("/");for(let l=0;l<a.length;l++){const c=l===a.length-1,u=a.slice(0,l+1).join("/");if(!n.has(u)){const f={id:u,path:o.path.substring(0,o.path.length-o.relativePath.length+u.length),name:a[l],relativePath:u,type:c?"file":"directory",children:c?void 0:[]};if(c&&(f.indexStatus=o.indexStatus,f.size=o.size,f.lastIndexed=o.lastIndexed,e==="notes"?f.chunks=o.chunks:(f.symbols=o.symbols,f.language=o.language)),n.set(u,f),l>0){const d=a.slice(0,l).join("/"),h=n.get(d);h&&h.children&&h.children.push(f)}}}}const i=Array.from(n.values()).filter(o=>!o.relativePath.includes("/")),s=o=>o.sort((a,l)=>a.type!==l.type?a.type==="directory"?-1:1:a.name.localeCompare(l.name)).map(a=>(a.children&&a.children.length>0&&(a.children=s(a.children)),a));return s(i)}function dK(t,e){if(!e)return t;const n=e.toLowerCase(),r=i=>{var l;const s=i.name.toLowerCase().includes(n),o=i.relativePath.toLowerCase().includes(n);if(i.type==="file")return s||o?i:null;const a=(l=i.children)==null?void 0:l.map(r).filter(c=>c!==null);return a&&a.length>0?{...i,children:a}:s||o?i:null};return t.map(r).filter(i=>i!==null)}function PP({files:t,activeTab:e,isLoading:n,selectedFile:r,filterQuery:i,onFilterChange:s,onSelectFile:o,onReindex:a,onRemove:l}){const c=O.useRef(null),u=O.useRef(null),f=O.useRef(),[d,h]=O.useState(400),[g,m]=O.useState(i),[v,y]=O.useState([]),[x,b]=O.useState(null),[k,w]=O.useState(null),{notesSyncProgress:S,codeSyncProgress:C}=Mf(),_=e==="notes"?S==null?void 0:S.current:C==null?void 0:C.current,I=O.useCallback(N=>{m(N),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{s(N)},200)},[s]);O.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]),O.useEffect(()=>{m(i)},[i]),O.useLayoutEffect(()=>{const N=u.current;if(!N)return;const Q=new ResizeObserver(P=>{const M=P[0];M&&h(M.contentRect.height)});return Q.observe(N),()=>Q.disconnect()},[]);const E=O.useMemo(()=>{const N=fK(t,e);return dK(N,g)},[t,e,g]),j=O.useCallback((N,Q)=>{const P=Q.metaKey||Q.ctrlKey,M=Q.shiftKey;N.type==="file"?P?y($=>$.some(q=>q.id===N.id)?$.filter(q=>q.id!==N.id):[...$,N]):M&&v.length>0?y($=>$.some(R=>R.id===N.id)?$:[...$,N]):(y([N]),o(N.relativePath)):!P&&!M&&y([])},[v,o]),A=O.useCallback((N,Q)=>{Q.preventDefault(),b(N),w({x:Q.clientX,y:Q.clientY}),v.some(P=>P.id===N.id)||y([N])},[v]),L=O.useCallback(()=>{const N=v.length>0?v.map(Q=>Q.relativePath):x?[x.relativePath]:[];N.length>0&&a(N),w(null)},[v,x,a]),z=O.useCallback(()=>{const N=v.length>0?v.filter(Q=>Q.type==="file").map(Q=>Q.relativePath):(x==null?void 0:x.type)==="file"?[x.relativePath]:[];N.length>0&&l(N),w(null)},[v,x,l]),X=O.useCallback(()=>{x&&window.open(`vscode://file/${x.path}`,"_blank"),w(null)},[x]),W=O.useCallback(()=>{x&&navigator.clipboard.writeText(x.relativePath),w(null)},[x]);O.useEffect(()=>{const N=()=>w(null);if(k)return document.addEventListener("click",N),()=>document.removeEventListener("click",N)},[k]),O.useEffect(()=>{if(!r||!c.current)return;const N=r.split("/");for(let Q=1;Q<N.length;Q++){const P=N.slice(0,Q).join("/");c.current.open(P)}setTimeout(()=>{var Q;(Q=c.current)==null||Q.scrollTo(r)},50)},[r]);const F=O.useCallback(({node:N,style:Q,dragHandle:P})=>{const M=N.data,$=r===M.relativePath,R=v.some(H=>H.id===M.id),q=_===M.relativePath;return p.jsx(uK,{node:M,style:Q,dragHandle:P,tree:{isOpen:()=>N.isOpen,toggle:()=>N.toggle()},isSelected:$,isMultiSelected:R&&!$,isIndexing:q,activeTab:e,onSelect:j,onContextMenu:A})},[r,v,e,j,A,_]);return p.jsxs("div",{className:"flex flex-col h-full",children:[p.jsx("div",{className:"p-2 border-b",children:p.jsxs("div",{className:"relative",children:[p.jsx(lA,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),p.jsx(Ge,{placeholder:"Filter files...",value:g,onChange:N=>I(N.target.value),className:"pl-8 h-9"})]})}),p.jsx("div",{ref:u,className:"flex-1 overflow-hidden",children:n?p.jsx("div",{className:"flex items-center justify-center h-full",children:p.jsx(Un,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):E.length===0?p.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:i?"No matching files":"No files found"}):p.jsx(aK,{ref:c,data:E,openByDefault:!1,width:"100%",height:d,indent:16,rowHeight:28,overscanCount:5,disableDrag:!0,disableDrop:!0,disableMultiSelection:!1,className:"h-full",children:F})}),k&&x&&p.jsxs("div",{className:"fixed z-50 min-w-[180px] rounded-md border bg-popover p-1 shadow-md",style:{left:k.x,top:k.y},onClick:N=>N.stopPropagation(),children:[x.type==="file"&&p.jsxs(p.Fragment,{children:[p.jsx("button",{className:"relative flex w-full cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground",onClick:()=>{o(x.relativePath),w(null)},children:"Preview"}),p.jsx("button",{className:"relative flex w-full cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground",onClick:X,children:"Open in Editor"}),p.jsx("button",{className:"relative flex w-full cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground",onClick:W,children:"Copy Path"}),p.jsx("div",{className:"-mx-1 my-1 h-px bg-border"})]}),p.jsx("button",{className:"relative flex w-full cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground",onClick:L,children:v.length>1?`Reindex ${v.length} items`:"Reindex"}),(x.type==="file"||v.some(N=>N.type==="file"))&&p.jsx("button",{className:"relative flex w-full cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none text-destructive hover:bg-accent",onClick:z,children:"Remove from Index"})]})]})}function hK(t){const e=pK(t),n=O.forwardRef((r,i)=>{const{children:s,...o}=r,a=O.Children.toArray(s),l=a.find(gK);if(l){const c=l.props.children,u=a.map(f=>f===l?O.Children.count(c)>1?O.Children.only(null):O.isValidElement(c)?c.props.children:null:f);return p.jsx(e,{...o,ref:i,children:O.isValidElement(c)?O.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function pK(t){const e=O.forwardRef((n,r)=>{const{children:i,...s}=n;if(O.isValidElement(i)){const o=yK(i),a=OK(s,i.props);return i.type!==O.Fragment&&(a.ref=r?kn(r,o):o),O.cloneElement(i,a)}return O.Children.count(i)>1?O.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var mK=Symbol("radix.slottable");function gK(t){return O.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===mK}function OK(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function yK(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Tx=["Enter"," "],vK=["ArrowDown","PageUp","Home"],jN=["ArrowUp","PageDown","End"],xK=[...vK,...jN],bK={ltr:[...Tx,"ArrowRight"],rtl:[...Tx,"ArrowLeft"]},wK={ltr:["ArrowLeft"],rtl:["ArrowRight"]},mg="Menu",[Ku,SK,kK]=$w(mg),[Oa,MN]=Cn(mg,[kK,oo,oc]),Zw=oo(),DN=oc(),[wxe,ya]=Oa(mg),[Sxe,Yf]=Oa(mg),CK="MenuAnchor",Ww=O.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=Zw(n);return p.jsx(Vf,{...i,...r,ref:e})});Ww.displayName=CK;var qw="MenuPortal",[PK,LN]=Oa(qw,{forceMount:void 0}),zN=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:i}=t,s=ya(qw,e);return p.jsx(PK,{scope:e,forceMount:n,children:p.jsx($t,{present:n||s.open,children:p.jsx(Ff,{asChild:!0,container:i,children:r})})})};zN.displayName=qw;var hr="MenuContent",[TK,Yw]=Oa(hr),BN=O.forwardRef((t,e)=>{const n=LN(hr,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,s=ya(hr,t.__scopeMenu),o=Yf(hr,t.__scopeMenu);return p.jsx(Ku.Provider,{scope:t.__scopeMenu,children:p.jsx($t,{present:r||s.open,children:p.jsx(Ku.Slot,{scope:t.__scopeMenu,children:o.modal?p.jsx(EK,{...i,ref:e}):p.jsx(RK,{...i,ref:e})})})})}),EK=O.forwardRef((t,e)=>{const n=ya(hr,t.__scopeMenu),r=O.useRef(null),i=Pe(e,r);return O.useEffect(()=>{const s=r.current;if(s)return ng(s)},[]),p.jsx(Uw,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ne(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),RK=O.forwardRef((t,e)=>{const n=ya(hr,t.__scopeMenu);return p.jsx(Uw,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),_K=hK("MenuContent.ScrollLock"),Uw=O.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:h,disableOutsideScroll:g,...m}=t,v=ya(hr,n),y=Yf(hr,n),x=Zw(n),b=DN(n),k=SK(n),[w,S]=O.useState(null),C=O.useRef(null),_=Pe(e,C,v.onContentChange),I=O.useRef(0),E=O.useRef(""),j=O.useRef(0),A=O.useRef(null),L=O.useRef("right"),z=O.useRef(0),X=g?Zf:O.Fragment,W=g?{as:_K,allowPinchZoom:!0}:void 0,F=Q=>{var Y,pe;const P=E.current+Q,M=k().filter(me=>!me.disabled),$=document.activeElement,R=(Y=M.find(me=>me.ref.current===$))==null?void 0:Y.textValue,q=M.map(me=>me.textValue),H=VK(q,P,R),ie=(pe=M.find(me=>me.textValue===H))==null?void 0:pe.ref.current;(function me(ye){E.current=ye,window.clearTimeout(I.current),ye!==""&&(I.current=window.setTimeout(()=>me(""),1e3))})(P),ie&&setTimeout(()=>ie.focus())};O.useEffect(()=>()=>window.clearTimeout(I.current),[]),eg();const N=O.useCallback(Q=>{var M,$;return L.current===((M=A.current)==null?void 0:M.side)&&XK(Q,($=A.current)==null?void 0:$.area)},[]);return p.jsx(TK,{scope:n,searchRef:E,onItemEnter:O.useCallback(Q=>{N(Q)&&Q.preventDefault()},[N]),onItemLeave:O.useCallback(Q=>{var P;N(Q)||((P=C.current)==null||P.focus(),S(null))},[N]),onTriggerLeave:O.useCallback(Q=>{N(Q)&&Q.preventDefault()},[N]),pointerGraceTimerRef:j,onPointerGraceIntentChange:O.useCallback(Q=>{A.current=Q},[]),children:p.jsx(X,{...W,children:p.jsx(Xf,{asChild:!0,trapped:i,onMountAutoFocus:ne(s,Q=>{var P;Q.preventDefault(),(P=C.current)==null||P.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:p.jsx(nc,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:h,children:p.jsx(Aw,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:w,onCurrentTabStopIdChange:S,onEntryFocus:ne(l,Q=>{y.isUsingKeyboardRef.current||Q.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Um,{role:"menu","aria-orientation":"vertical","data-state":rj(v.open),"data-radix-menu-content":"",dir:y.dir,...x,...m,ref:_,style:{outline:"none",...m.style},onKeyDown:ne(m.onKeyDown,Q=>{const M=Q.target.closest("[data-radix-menu-content]")===Q.currentTarget,$=Q.ctrlKey||Q.altKey||Q.metaKey,R=Q.key.length===1;M&&(Q.key==="Tab"&&Q.preventDefault(),!$&&R&&F(Q.key));const q=C.current;if(Q.target!==q||!xK.includes(Q.key))return;Q.preventDefault();const ie=k().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);jN.includes(Q.key)&&ie.reverse(),zK(ie)}),onBlur:ne(t.onBlur,Q=>{Q.currentTarget.contains(Q.target)||(window.clearTimeout(I.current),E.current="")}),onPointerMove:ne(t.onPointerMove,Ju(Q=>{const P=Q.target,M=z.current!==Q.clientX;if(Q.currentTarget.contains(P)&&M){const $=Q.clientX>z.current?"right":"left";L.current=$,z.current=Q.clientX}}))})})})})})})});BN.displayName=hr;var $K="MenuGroup",Hw=O.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return p.jsx(ue.div,{role:"group",...r,ref:e})});Hw.displayName=$K;var AK="MenuLabel",VN=O.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return p.jsx(ue.div,{...r,ref:e})});VN.displayName=AK;var Bp="MenuItem",TP="menu.itemSelect",gg=O.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...i}=t,s=O.useRef(null),o=Yf(Bp,t.__scopeMenu),a=Yw(Bp,t.__scopeMenu),l=Pe(e,s),c=O.useRef(!1),u=()=>{const f=s.current;if(!n&&f){const d=new CustomEvent(TP,{bubbles:!0,cancelable:!0});f.addEventListener(TP,h=>r==null?void 0:r(h),{once:!0}),bA(f,d),d.defaultPrevented?c.current=!1:o.onClose()}};return p.jsx(FN,{...i,ref:l,disabled:n,onClick:ne(t.onClick,u),onPointerDown:f=>{var d;(d=t.onPointerDown)==null||d.call(t,f),c.current=!0},onPointerUp:ne(t.onPointerUp,f=>{var d;c.current||(d=f.currentTarget)==null||d.click()}),onKeyDown:ne(t.onKeyDown,f=>{const d=a.searchRef.current!=="";n||d&&f.key===" "||Tx.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});gg.displayName=Bp;var FN=O.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...s}=t,o=Yw(Bp,n),a=DN(n),l=O.useRef(null),c=Pe(e,l),[u,f]=O.useState(!1),[d,h]=O.useState("");return O.useEffect(()=>{const g=l.current;g&&h((g.textContent??"").trim())},[s.children]),p.jsx(Ku.ItemSlot,{scope:n,disabled:r,textValue:i??d,children:p.jsx(Qw,{asChild:!0,...a,focusable:!r,children:p.jsx(ue.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:c,onPointerMove:ne(t.onPointerMove,Ju(g=>{r?o.onItemLeave(g):(o.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ne(t.onPointerLeave,Ju(g=>o.onItemLeave(g))),onFocus:ne(t.onFocus,()=>f(!0)),onBlur:ne(t.onBlur,()=>f(!1))})})})}),QK="MenuCheckboxItem",XN=O.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...i}=t;return p.jsx(UN,{scope:t.__scopeMenu,checked:n,children:p.jsx(gg,{role:"menuitemcheckbox","aria-checked":Vp(n)?"mixed":n,...i,ref:e,"data-state":Kw(n),onSelect:ne(i.onSelect,()=>r==null?void 0:r(Vp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});XN.displayName=QK;var ZN="MenuRadioGroup",[IK,NK]=Oa(ZN,{value:void 0,onValueChange:()=>{}}),WN=O.forwardRef((t,e)=>{const{value:n,onValueChange:r,...i}=t,s=Wt(r);return p.jsx(IK,{scope:t.__scopeMenu,value:n,onValueChange:s,children:p.jsx(Hw,{...i,ref:e})})});WN.displayName=ZN;var qN="MenuRadioItem",YN=O.forwardRef((t,e)=>{const{value:n,...r}=t,i=NK(qN,t.__scopeMenu),s=n===i.value;return p.jsx(UN,{scope:t.__scopeMenu,checked:s,children:p.jsx(gg,{role:"menuitemradio","aria-checked":s,...r,ref:e,"data-state":Kw(s),onSelect:ne(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});YN.displayName=qN;var Gw="MenuItemIndicator",[UN,jK]=Oa(Gw,{checked:!1}),HN=O.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...i}=t,s=jK(Gw,n);return p.jsx($t,{present:r||Vp(s.checked)||s.checked===!0,children:p.jsx(ue.span,{...i,ref:e,"data-state":Kw(s.checked)})})});HN.displayName=Gw;var MK="MenuSeparator",GN=O.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return p.jsx(ue.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});GN.displayName=MK;var DK="MenuArrow",KN=O.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=Zw(n);return p.jsx(Hm,{...i,...r,ref:e})});KN.displayName=DK;var LK="MenuSub",[kxe,JN]=Oa(LK),Hc="MenuSubTrigger",ej=O.forwardRef((t,e)=>{const n=ya(Hc,t.__scopeMenu),r=Yf(Hc,t.__scopeMenu),i=JN(Hc,t.__scopeMenu),s=Yw(Hc,t.__scopeMenu),o=O.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,c={__scopeMenu:t.__scopeMenu},u=O.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return O.useEffect(()=>u,[u]),O.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),p.jsx(Ww,{asChild:!0,...c,children:p.jsx(FN,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":rj(n.open),...t,ref:kn(e,i.onTriggerChange),onClick:f=>{var d;(d=t.onClick)==null||d.call(t,f),!(t.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ne(t.onPointerMove,Ju(f=>{s.onItemEnter(f),!f.defaultPrevented&&!t.disabled&&!n.open&&!o.current&&(s.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:ne(t.onPointerLeave,Ju(f=>{var h,g;u();const d=(h=n.content)==null?void 0:h.getBoundingClientRect();if(d){const m=(g=n.content)==null?void 0:g.dataset.side,v=m==="right",y=v?-5:5,x=d[v?"left":"right"],b=d[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+y,y:f.clientY},{x,y:d.top},{x:b,y:d.top},{x:b,y:d.bottom},{x,y:d.bottom}],side:m}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:ne(t.onKeyDown,f=>{var h;const d=s.searchRef.current!=="";t.disabled||d&&f.key===" "||bK[r.dir].includes(f.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),f.preventDefault())})})})});ej.displayName=Hc;var tj="MenuSubContent",nj=O.forwardRef((t,e)=>{const n=LN(hr,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,s=ya(hr,t.__scopeMenu),o=Yf(hr,t.__scopeMenu),a=JN(tj,t.__scopeMenu),l=O.useRef(null),c=Pe(e,l);return p.jsx(Ku.Provider,{scope:t.__scopeMenu,children:p.jsx($t,{present:r||s.open,children:p.jsx(Ku.Slot,{scope:t.__scopeMenu,children:p.jsx(Uw,{id:a.contentId,"aria-labelledby":a.triggerId,...i,ref:c,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var f;o.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:ne(t.onFocusOutside,u=>{u.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:ne(t.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:ne(t.onKeyDown,u=>{var h;const f=u.currentTarget.contains(u.target),d=wK[o.dir].includes(u.key);f&&d&&(s.onOpenChange(!1),(h=a.trigger)==null||h.focus(),u.preventDefault())})})})})})});nj.displayName=tj;function rj(t){return t?"open":"closed"}function Vp(t){return t==="indeterminate"}function Kw(t){return Vp(t)?"indeterminate":t?"checked":"unchecked"}function zK(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function BK(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function VK(t,e,n){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let o=BK(t,Math.max(s,0));i.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function FK(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const a=e[s],l=e[o],c=a.x,u=a.y,f=l.x,d=l.y;u>r!=d>r&&n<(f-c)*(r-u)/(d-u)+c&&(i=!i)}return i}function XK(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return FK(n,e)}function Ju(t){return e=>e.pointerType==="mouse"?t(e):void 0}var ZK=Ww,WK=zN,qK=BN,YK=Hw,UK=VN,HK=gg,GK=XN,KK=WN,JK=YN,eJ=HN,tJ=GN,nJ=KN,rJ=ej,iJ=nj,ij="ContextMenu",[sJ]=Cn(ij,[MN]),Pn=MN(),[Cxe,sj]=sJ(ij),oj="ContextMenuTrigger",oJ=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:r=!1,...i}=t,s=sj(oj,n),o=Pn(n),a=O.useRef({x:0,y:0}),l=O.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),c=O.useRef(0),u=O.useCallback(()=>window.clearTimeout(c.current),[]),f=d=>{a.current={x:d.clientX,y:d.clientY},s.onOpenChange(!0)};return O.useEffect(()=>u,[u]),O.useEffect(()=>void(r&&u()),[r,u]),p.jsxs(p.Fragment,{children:[p.jsx(ZK,{...o,virtualRef:l}),p.jsx(ue.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...i,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:ne(t.onContextMenu,d=>{u(),f(d),d.preventDefault()}),onPointerDown:r?t.onPointerDown:ne(t.onPointerDown,jd(d=>{u(),c.current=window.setTimeout(()=>f(d),700)})),onPointerMove:r?t.onPointerMove:ne(t.onPointerMove,jd(u)),onPointerCancel:r?t.onPointerCancel:ne(t.onPointerCancel,jd(u)),onPointerUp:r?t.onPointerUp:ne(t.onPointerUp,jd(u))})]})});oJ.displayName=oj;var aJ="ContextMenuPortal",aj=t=>{const{__scopeContextMenu:e,...n}=t,r=Pn(e);return p.jsx(WK,{...r,...n})};aj.displayName=aJ;var lj="ContextMenuContent",cj=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=sj(lj,n),s=Pn(n),o=O.useRef(!1);return p.jsx(qK,{...s,...r,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:a=>{var l;(l=t.onCloseAutoFocus)==null||l.call(t,a),!a.defaultPrevented&&o.current&&a.preventDefault(),o.current=!1},onInteractOutside:a=>{var l;(l=t.onInteractOutside)==null||l.call(t,a),!a.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});cj.displayName=lj;var lJ="ContextMenuGroup",cJ=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(YK,{...i,...r,ref:e})});cJ.displayName=lJ;var uJ="ContextMenuLabel",uj=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(UK,{...i,...r,ref:e})});uj.displayName=uJ;var fJ="ContextMenuItem",fj=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(HK,{...i,...r,ref:e})});fj.displayName=fJ;var dJ="ContextMenuCheckboxItem",dj=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(GK,{...i,...r,ref:e})});dj.displayName=dJ;var hJ="ContextMenuRadioGroup",pJ=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(KK,{...i,...r,ref:e})});pJ.displayName=hJ;var mJ="ContextMenuRadioItem",hj=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(JK,{...i,...r,ref:e})});hj.displayName=mJ;var gJ="ContextMenuItemIndicator",pj=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(eJ,{...i,...r,ref:e})});pj.displayName=gJ;var OJ="ContextMenuSeparator",mj=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(tJ,{...i,...r,ref:e})});mj.displayName=OJ;var yJ="ContextMenuArrow",vJ=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(nJ,{...i,...r,ref:e})});vJ.displayName=yJ;var xJ="ContextMenuSubTrigger",gj=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(rJ,{...i,...r,ref:e})});gj.displayName=xJ;var bJ="ContextMenuSubContent",Oj=O.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,i=Pn(n);return p.jsx(iJ,{...i,...r,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Oj.displayName=bJ;function jd(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var wJ=aj,yj=cj,vj=uj,xj=fj,bj=dj,wj=hj,Sj=pj,kj=mj,Cj=gj,Pj=Oj;const SJ=O.forwardRef(({className:t,inset:e,children:n,...r},i)=>p.jsxs(Cj,{ref:i,className:le("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e&&"pl-8",t),...r,children:[n,p.jsx(Fm,{className:"ml-auto h-4 w-4"})]}));SJ.displayName=Cj.displayName;const kJ=O.forwardRef(({className:t,...e},n)=>p.jsx(Pj,{ref:n,className:le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));kJ.displayName=Pj.displayName;const CJ=O.forwardRef(({className:t,...e},n)=>p.jsx(wJ,{children:p.jsx(yj,{ref:n,className:le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 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",t),...e})}));CJ.displayName=yj.displayName;const PJ=O.forwardRef(({className:t,inset:e,...n},r)=>p.jsx(xj,{ref:r,className:le("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));PJ.displayName=xj.displayName;const TJ=O.forwardRef(({className:t,children:e,checked:n,...r},i)=>p.jsxs(bj,{ref:i,className:le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(Sj,{children:p.jsx(sA,{className:"h-4 w-4"})})}),e]}));TJ.displayName=bj.displayName;const EJ=O.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(wj,{ref:r,className:le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(Sj,{children:p.jsx(du,{className:"h-2 w-2 fill-current"})})}),e]}));EJ.displayName=wj.displayName;const RJ=O.forwardRef(({className:t,inset:e,...n},r)=>p.jsx(vj,{ref:r,className:le("px-2 py-1.5 text-sm font-semibold text-foreground",e&&"pl-8",t),...n}));RJ.displayName=vj.displayName;const _J=O.forwardRef(({className:t,...e},n)=>p.jsx(kj,{ref:n,className:le("-mx-1 my-1 h-px bg-border",t),...e}));_J.displayName=kj.displayName;function $J(){const{activeTab:t,setActiveTab:e,filterQuery:n,setFilterQuery:r,fetchNoteFiles:i,fetchCodeFiles:s,isLoadingNotes:o,isLoadingCode:a,selectedFile:l,navigateToFile:c,noteFiles:u,codeFiles:f,reindexFiles:d,removeFiles:h}=Df();O.useEffect(()=>{i()},[i]);const g=v=>{d(v)},m=v=>{h(v)};return p.jsx("aside",{className:"w-72 border-r flex flex-col bg-muted/10",children:p.jsxs(jw,{value:t,onValueChange:v=>{e(v),v==="code"&&f.length===0&&s()},className:"flex-1 flex flex-col overflow-hidden",children:[p.jsx("div",{className:"p-2 border-b flex-shrink-0",children:p.jsxs(cg,{className:"w-full",children:[p.jsxs(Rl,{value:"notes",className:"flex-1 gap-1",children:[p.jsx(Sn,{className:"h-4 w-4"}),"Docs"]}),p.jsxs(Rl,{value:"code",className:"flex-1 gap-1",children:[p.jsx(sn,{className:"h-4 w-4"}),"Code"]})]})}),p.jsx(Qo,{value:"notes",className:"flex-1 m-0 overflow-hidden flex flex-col",children:p.jsx(PP,{files:u,activeTab:"notes",isLoading:o,selectedFile:l,filterQuery:n,onFilterChange:r,onSelectFile:c,onReindex:g,onRemove:m})}),p.jsx(Qo,{value:"code",className:"flex-1 m-0 overflow-hidden flex flex-col",children:p.jsx(PP,{files:f,activeTab:"code",isLoading:a,selectedFile:l,filterQuery:n,onFilterChange:r,onSelectFile:c,onReindex:g,onRemove:m})})]})})}function AJ(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const QJ=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,IJ=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NJ={};function EP(t,e){return(NJ.jsx?IJ:QJ).test(t)}const jJ=/[ \t\n\f\r]/g;function MJ(t){return typeof t=="object"?t.type==="text"?RP(t.value):!1:RP(t)}function RP(t){return t.replace(jJ,"")===""}let Uf=class{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}};Uf.prototype.normal={};Uf.prototype.property={};Uf.prototype.space=void 0;function Tj(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new Uf(n,r,e)}function Ex(t){return t.toLowerCase()}class Tn{constructor(e,n){this.attribute=n,this.property=e}}Tn.prototype.attribute="";Tn.prototype.booleanish=!1;Tn.prototype.boolean=!1;Tn.prototype.commaOrSpaceSeparated=!1;Tn.prototype.commaSeparated=!1;Tn.prototype.defined=!1;Tn.prototype.mustUseProperty=!1;Tn.prototype.number=!1;Tn.prototype.overloadedBoolean=!1;Tn.prototype.property="";Tn.prototype.spaceSeparated=!1;Tn.prototype.space=void 0;let DJ=0;const Ce=va(),mt=va(),Rx=va(),K=va(),He=va(),al=va(),In=va();function va(){return 2**++DJ}const _x=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ce,booleanish:mt,commaOrSpaceSeparated:In,commaSeparated:al,number:K,overloadedBoolean:Rx,spaceSeparated:He},Symbol.toStringTag,{value:"Module"})),ey=Object.keys(_x);class Jw extends Tn{constructor(e,n,r,i){let s=-1;if(super(e,n),_P(this,"space",i),typeof r=="number")for(;++s<ey.length;){const o=ey[s];_P(this,ey[s],(r&_x[o])===_x[o])}}}Jw.prototype.defined=!0;function _P(t,e,n){n&&(t[e]=n)}function ac(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const s=new Jw(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[Ex(r)]=r,n[Ex(s.attribute)]=r}return new Uf(e,n,t.space)}const Ej=ac({properties:{ariaActiveDescendant:null,ariaAtomic:mt,ariaAutoComplete:null,ariaBusy:mt,ariaChecked:mt,ariaColCount:K,ariaColIndex:K,ariaColSpan:K,ariaControls:He,ariaCurrent:null,ariaDescribedBy:He,ariaDetails:null,ariaDisabled:mt,ariaDropEffect:He,ariaErrorMessage:null,ariaExpanded:mt,ariaFlowTo:He,ariaGrabbed:mt,ariaHasPopup:null,ariaHidden:mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:He,ariaLevel:K,ariaLive:null,ariaModal:mt,ariaMultiLine:mt,ariaMultiSelectable:mt,ariaOrientation:null,ariaOwns:He,ariaPlaceholder:null,ariaPosInSet:K,ariaPressed:mt,ariaReadOnly:mt,ariaRelevant:null,ariaRequired:mt,ariaRoleDescription:He,ariaRowCount:K,ariaRowIndex:K,ariaRowSpan:K,ariaSelected:mt,ariaSetSize:K,ariaSort:null,ariaValueMax:K,ariaValueMin:K,ariaValueNow:K,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function Rj(t,e){return e in t?t[e]:e}function _j(t,e){return Rj(t,e.toLowerCase())}const LJ=ac({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:al,acceptCharset:He,accessKey:He,action:null,allow:null,allowFullScreen:Ce,allowPaymentRequest:Ce,allowUserMedia:Ce,alt:null,as:null,async:Ce,autoCapitalize:null,autoComplete:He,autoFocus:Ce,autoPlay:Ce,blocking:He,capture:null,charSet:null,checked:Ce,cite:null,className:He,cols:K,colSpan:null,content:null,contentEditable:mt,controls:Ce,controlsList:He,coords:K|al,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ce,defer:Ce,dir:null,dirName:null,disabled:Ce,download:Rx,draggable:mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ce,formTarget:null,headers:He,height:K,hidden:Rx,high:K,href:null,hrefLang:null,htmlFor:He,httpEquiv:He,id:null,imageSizes:null,imageSrcSet:null,inert:Ce,inputMode:null,integrity:null,is:null,isMap:Ce,itemId:null,itemProp:He,itemRef:He,itemScope:Ce,itemType:He,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ce,low:K,manifest:null,max:null,maxLength:K,media:null,method:null,min:null,minLength:K,multiple:Ce,muted:Ce,name:null,nonce:null,noModule:Ce,noValidate:Ce,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ce,optimum:K,pattern:null,ping:He,placeholder:null,playsInline:Ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ce,referrerPolicy:null,rel:He,required:Ce,reversed:Ce,rows:K,rowSpan:K,sandbox:He,scope:null,scoped:Ce,seamless:Ce,selected:Ce,shadowRootClonable:Ce,shadowRootDelegatesFocus:Ce,shadowRootMode:null,shape:null,size:K,sizes:null,slot:null,span:K,spellCheck:mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:K,step:null,style:null,tabIndex:K,target:null,title:null,translate:null,type:null,typeMustMatch:Ce,useMap:null,value:mt,width:K,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:He,axis:null,background:null,bgColor:null,border:K,borderColor:null,bottomMargin:K,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ce,declare:Ce,event:null,face:null,frame:null,frameBorder:null,hSpace:K,leftMargin:K,link:null,longDesc:null,lowSrc:null,marginHeight:K,marginWidth:K,noResize:Ce,noHref:Ce,noShade:Ce,noWrap:Ce,object:null,profile:null,prompt:null,rev:null,rightMargin:K,rules:null,scheme:null,scrolling:mt,standby:null,summary:null,text:null,topMargin:K,valueType:null,version:null,vAlign:null,vLink:null,vSpace:K,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ce,disableRemotePlayback:Ce,prefix:null,property:null,results:K,security:null,unselectable:null},space:"html",transform:_j}),zJ=ac({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:In,accentHeight:K,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:K,amplitude:K,arabicForm:null,ascent:K,attributeName:null,attributeType:null,azimuth:K,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:K,by:null,calcMode:null,capHeight:K,className:He,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:K,diffuseConstant:K,direction:null,display:null,dur:null,divisor:K,dominantBaseline:null,download:Ce,dx:null,dy:null,edgeMode:null,editable:null,elevation:K,enableBackground:null,end:null,event:null,exponent:K,externalResourcesRequired:null,fill:null,fillOpacity:K,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:al,g2:al,glyphName:al,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:K,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:K,horizOriginX:K,horizOriginY:K,id:null,ideographic:K,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:K,k:K,k1:K,k2:K,k3:K,k4:K,kernelMatrix:In,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:K,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:K,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:K,overlineThickness:K,paintOrder:null,panose1:null,path:null,pathLength:K,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:He,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:K,pointsAtY:K,pointsAtZ:K,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:In,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:In,rev:In,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:In,requiredFeatures:In,requiredFonts:In,requiredFormats:In,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:K,specularExponent:K,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:K,strikethroughThickness:K,string:null,stroke:null,strokeDashArray:In,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:K,strokeOpacity:K,strokeWidth:null,style:null,surfaceScale:K,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:In,tabIndex:K,tableValues:null,target:null,targetX:K,targetY:K,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:In,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:K,underlineThickness:K,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:K,values:null,vAlphabetic:K,vMathematical:K,vectorEffect:null,vHanging:K,vIdeographic:K,version:null,vertAdvY:K,vertOriginX:K,vertOriginY:K,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:K,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Rj}),$j=ac({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),Aj=ac({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_j}),Qj=ac({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),BJ={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},VJ=/[A-Z]/g,$P=/-[a-z]/g,FJ=/^data[-\w.:]+$/i;function XJ(t,e){const n=Ex(e);let r=e,i=Tn;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&FJ.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace($P,WJ);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!$P.test(s)){let o=s.replace(VJ,ZJ);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=Jw}return new i(r,e)}function ZJ(t){return"-"+t.toLowerCase()}function WJ(t){return t.charAt(1).toUpperCase()}const qJ=Tj([Ej,LJ,$j,Aj,Qj],"html"),e1=Tj([Ej,zJ,$j,Aj,Qj],"svg");function YJ(t){return t.join(" ").trim()}var t1={},AP=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,UJ=/\n/g,HJ=/^\s*/,GJ=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,KJ=/^:\s*/,JJ=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,eee=/^[;\s]*/,tee=/^\s+|\s+$/g,nee=`
|
|
449
|
+
`,QP="/",IP="*",ko="",ree="comment",iee="declaration";function see(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(g){var m=g.match(UJ);m&&(n+=m.length);var v=g.lastIndexOf(nee);r=~v?g.length-v:r+g.length}function s(){var g={line:n,column:r};return function(m){return m.position=new o(g),c(),m}}function o(g){this.start=g,this.end={line:n,column:r},this.source=e.source}o.prototype.content=t;function a(g){var m=new Error(e.source+":"+n+":"+r+": "+g);if(m.reason=g,m.filename=e.source,m.line=n,m.column=r,m.source=t,!e.silent)throw m}function l(g){var m=g.exec(t);if(m){var v=m[0];return i(v),t=t.slice(v.length),m}}function c(){l(HJ)}function u(g){var m;for(g=g||[];m=f();)m!==!1&&g.push(m);return g}function f(){var g=s();if(!(QP!=t.charAt(0)||IP!=t.charAt(1))){for(var m=2;ko!=t.charAt(m)&&(IP!=t.charAt(m)||QP!=t.charAt(m+1));)++m;if(m+=2,ko===t.charAt(m-1))return a("End of comment missing");var v=t.slice(2,m-2);return r+=2,i(v),t=t.slice(m),r+=2,g({type:ree,comment:v})}}function d(){var g=s(),m=l(GJ);if(m){if(f(),!l(KJ))return a("property missing ':'");var v=l(JJ),y=g({type:iee,property:NP(m[0].replace(AP,ko)),value:v?NP(v[0].replace(AP,ko)):ko});return l(eee),y}}function h(){var g=[];u(g);for(var m;m=d();)m!==!1&&(g.push(m),u(g));return g}return c(),h()}function NP(t){return t?t.replace(tee,ko):ko}var oee=see,aee=Gh&&Gh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t1,"__esModule",{value:!0});t1.default=cee;const lee=aee(oee);function cee(t,e){let n=null;if(!t||typeof t!="string")return n;const r=(0,lee.default)(t),i=typeof e=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?e(o,a,s):a&&(n=n||{},n[o]=a)}),n}var Og={};Object.defineProperty(Og,"__esModule",{value:!0});Og.camelCase=void 0;var uee=/^--[a-zA-Z0-9_-]+$/,fee=/-([a-z])/g,dee=/^[^-]+$/,hee=/^-(webkit|moz|ms|o|khtml)-/,pee=/^-(ms)-/,mee=function(t){return!t||dee.test(t)||uee.test(t)},gee=function(t,e){return e.toUpperCase()},jP=function(t,e){return"".concat(e,"-")},Oee=function(t,e){return e===void 0&&(e={}),mee(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace(pee,jP):t=t.replace(hee,jP),t.replace(fee,gee))};Og.camelCase=Oee;var yee=Gh&&Gh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},vee=yee(t1),xee=Og;function $x(t,e){var n={};return!t||typeof t!="string"||(0,vee.default)(t,function(r,i){r&&i&&(n[(0,xee.camelCase)(r,e)]=i)}),n}$x.default=$x;var bee=$x;const wee=ql(bee),Ij=Nj("end"),n1=Nj("start");function Nj(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function See(t){const e=n1(t),n=Ij(t);if(e&&n)return{start:e,end:n}}function pu(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?MP(t.position):"start"in t||"end"in t?MP(t):"line"in t||"column"in t?Ax(t):""}function Ax(t){return DP(t&&t.line)+":"+DP(t&&t.column)}function MP(t){return Ax(t&&t.start)+"-"+Ax(t&&t.end)}function DP(t){return t&&typeof t=="number"?t:1}class Gt extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?i=e:!s.cause&&e&&(o=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=pu(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Gt.prototype.file="";Gt.prototype.name="";Gt.prototype.reason="";Gt.prototype.message="";Gt.prototype.stack="";Gt.prototype.column=void 0;Gt.prototype.line=void 0;Gt.prototype.ancestors=void 0;Gt.prototype.cause=void 0;Gt.prototype.fatal=void 0;Gt.prototype.place=void 0;Gt.prototype.ruleId=void 0;Gt.prototype.source=void 0;const r1={}.hasOwnProperty,kee=new Map,Cee=/[A-Z]/g,Pee=new Set(["table","tbody","thead","tfoot","tr"]),Tee=new Set(["td","th"]),jj="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Eee(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=jee(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Nee(n,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?e1:qJ,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=Mj(i,t,void 0);return s&&typeof s!="string"?s:i.create(t,i.Fragment,{children:s||void 0},void 0)}function Mj(t,e,n){if(e.type==="element")return Ree(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return _ee(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return Aee(t,e,n);if(e.type==="mdxjsEsm")return $ee(t,e);if(e.type==="root")return Qee(t,e,n);if(e.type==="text")return Iee(t,e)}function Ree(t,e,n){const r=t.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=e1,t.schema=i),t.ancestors.push(e);const s=Lj(t,e.tagName,!1),o=Mee(t,e);let a=s1(t,e);return Pee.has(e.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!MJ(l):!0})),Dj(t,o,s,e),i1(o,a),t.ancestors.pop(),t.schema=r,t.create(e,s,o,n)}function _ee(t,e){if(e.data&&e.data.estree&&t.evaluater){const r=e.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}ef(t,e.position)}function $ee(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);ef(t,e.position)}function Aee(t,e,n){const r=t.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=e1,t.schema=i),t.ancestors.push(e);const s=e.name===null?t.Fragment:Lj(t,e.name,!0),o=Dee(t,e),a=s1(t,e);return Dj(t,o,s,e),i1(o,a),t.ancestors.pop(),t.schema=r,t.create(e,s,o,n)}function Qee(t,e,n){const r={};return i1(r,s1(t,e)),t.create(e,t.Fragment,r,n)}function Iee(t,e){return e.value}function Dj(t,e,n,r){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=r)}function i1(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function Nee(t,e,n){return r;function r(i,s,o,a){const c=Array.isArray(o.children)?n:e;return a?c(s,o,a):c(s,o)}}function jee(t,e){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=n1(r);return e(i,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function Mee(t,e){const n={};let r,i;for(i in e.properties)if(i!=="children"&&r1.call(e.properties,i)){const s=Lee(t,i,e.properties[i]);if(s){const[o,a]=s;t.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&Tee.has(e.tagName)?r=a:n[o]=a}}if(r){const s=n.style||(n.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Dee(t,e){const n={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,t.evaluater.evaluateExpression(a.argument))}else ef(t,e.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const a=r.value.data.estree.body[0];a.type,s=t.evaluater.evaluateExpression(a.expression)}else ef(t,e.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function s1(t,e){const n=[];let r=-1;const i=t.passKeys?new Map:kee;for(;++r<e.children.length;){const s=e.children[r];let o;if(t.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const a=Mj(t,s,o);a!==void 0&&n.push(a)}return n}function Lee(t,e,n){const r=XJ(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?AJ(n):YJ(n)),r.property==="style"){let i=typeof n=="object"?n:zee(t,String(n));return t.stylePropertyNameCase==="css"&&(i=Bee(i)),["style",i]}return[t.elementAttributeNameCase==="react"&&r.space?BJ[r.property]||r.property:r.attribute,n]}}function zee(t,e){try{return wee(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const r=n,i=new Gt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=jj+"#cannot-parse-style-attribute",i}}function Lj(t,e,n){let r;if(!n)r={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let s=-1,o;for(;++s<i.length;){const a=EP(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=o}else r=EP(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(r.type==="Literal"){const i=r.value;return r1.call(t.components,i)?t.components[i]:i}if(t.evaluater)return t.evaluater.evaluateExpression(r);ef(t)}function ef(t,e){const n=new Gt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=jj+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Bee(t){const e={};let n;for(n in t)r1.call(t,n)&&(e[Vee(n)]=t[n]);return e}function Vee(t){let e=t.replace(Cee,Fee);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function Fee(t){return"-"+t.toLowerCase()}const ty={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Xee={};function o1(t,e){const n=Xee,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return zj(t,r,i)}function zj(t,e,n){if(Zee(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return LP(t.children,e,n)}return Array.isArray(t)?LP(t,e,n):""}function LP(t,e,n){const r=[];let i=-1;for(;++i<t.length;)r[i]=zj(t[i],e,n);return r.join("")}function Zee(t){return!!(t&&typeof t=="object")}const zP=document.createElement("i");function a1(t){const e="&"+t+";";zP.innerHTML=e;const n=zP.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function qn(t,e,n,r){const i=t.length;let s=0,o;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(e,n),t.splice(...o);else for(n&&t.splice(e,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(e,0),t.splice(...o),s+=1e4,e+=1e4}function or(t,e){return t.length>0?(qn(t,t.length,0,e),t):e}const BP={}.hasOwnProperty;function Bj(t){const e={};let n=-1;for(;++n<t.length;)Wee(e,t[n]);return e}function Wee(t,e){let n;for(n in e){const i=(BP.call(t,n)?t[n]:void 0)||(t[n]={}),s=e[n];let o;if(s)for(o in s){BP.call(i,o)||(i[o]=[]);const a=s[o];qee(i[o],Array.isArray(a)?a:a?[a]:[])}}}function qee(t,e){let n=-1;const r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);qn(t,0,0,r)}function Vj(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function zr(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const tn=ao(/[A-Za-z]/),qt=ao(/[\dA-Za-z]/),Yee=ao(/[#-'*+\--9=?A-Z^-~]/);function Fp(t){return t!==null&&(t<32||t===127)}const Qx=ao(/\d/),Uee=ao(/[\dA-Fa-f]/),Hee=ao(/[!-/:-@[-`{-~]/);function ge(t){return t!==null&&t<-2}function Ue(t){return t!==null&&(t<0||t===32)}function Ie(t){return t===-2||t===-1||t===32}const yg=ao(new RegExp("\\p{P}|\\p{S}","u")),ea=ao(/\s/);function ao(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function lc(t){const e=[];let n=-1,r=0,i=0;for(;++n<t.length;){const s=t.charCodeAt(n);let o="";if(s===37&&qt(t.charCodeAt(n+1))&&qt(t.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=t.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o="�"}else o=String.fromCharCode(s);o&&(e.push(t.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function De(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return Ie(l)?(t.enter(n),a(l)):e(l)}function a(l){return Ie(l)&&s++<i?(t.consume(l),a):(t.exit(n),e(l))}}const Gee={tokenize:Kee};function Kee(t){const e=t.attempt(this.parser.constructs.contentInitial,r,i);let n;return e;function r(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),De(t,e,"linePrefix")}function i(a){return t.enter("paragraph"),s(a)}function s(a){const l=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return ge(a)?(t.consume(a),t.exit("chunkText"),s):(t.consume(a),o)}}const Jee={tokenize:ete},VP={tokenize:tte};function ete(t){const e=this,n=[];let r=0,i,s,o;return a;function a(b){if(r<n.length){const k=n[r];return e.containerState=k[1],t.attempt(k[0].continuation,l,c)(b)}return c(b)}function l(b){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&x();const k=e.events.length;let w=k,S;for(;w--;)if(e.events[w][0]==="exit"&&e.events[w][1].type==="chunkFlow"){S=e.events[w][1].end;break}y(r);let C=k;for(;C<e.events.length;)e.events[C][1].end={...S},C++;return qn(e.events,w+1,0,e.events.slice(k)),e.events.length=C,c(b)}return a(b)}function c(b){if(r===n.length){if(!i)return d(b);if(i.currentConstruct&&i.currentConstruct.concrete)return g(b);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(VP,u,f)(b)}function u(b){return i&&x(),y(r),d(b)}function f(b){return e.parser.lazy[e.now().line]=r!==n.length,o=e.now().offset,g(b)}function d(b){return e.containerState={},t.attempt(VP,h,g)(b)}function h(b){return r++,n.push([e.currentConstruct,e.containerState]),d(b)}function g(b){if(b===null){i&&x(),y(0),t.consume(b);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),m(b)}function m(b){if(b===null){v(t.exit("chunkFlow"),!0),y(0),t.consume(b);return}return ge(b)?(t.consume(b),v(t.exit("chunkFlow")),r=0,e.interrupt=void 0,a):(t.consume(b),m)}function v(b,k){const w=e.sliceStream(b);if(k&&w.push(null),b.previous=s,s&&(s.next=b),s=b,i.defineSkip(b.start),i.write(w),e.parser.lazy[b.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<o&&(!i.events[S][1].end||i.events[S][1].end.offset>o))return;const C=e.events.length;let _=C,I,E;for(;_--;)if(e.events[_][0]==="exit"&&e.events[_][1].type==="chunkFlow"){if(I){E=e.events[_][1].end;break}I=!0}for(y(r),S=C;S<e.events.length;)e.events[S][1].end={...E},S++;qn(e.events,_+1,0,e.events.slice(C)),e.events.length=S}}function y(b){let k=n.length;for(;k-- >b;){const w=n[k];e.containerState=w[1],w[0].exit.call(e,t)}n.length=b}function x(){i.write([null]),s=void 0,i=void 0,e.containerState._closeFlow=void 0}}function tte(t,e,n){return De(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ql(t){if(t===null||Ue(t)||ea(t))return 1;if(yg(t))return 2}function vg(t,e,n){const r=[];let i=-1;for(;++i<t.length;){const s=t[i].resolveAll;s&&!r.includes(s)&&(e=s(e,n),r.push(s))}return e}const Ix={name:"attention",resolveAll:nte,tokenize:rte};function nte(t,e){let n=-1,r,i,s,o,a,l,c,u;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const f={...t[r][1].end},d={...t[n][1].start};FP(f,-l),FP(d,l),o={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...t[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:d},s={type:l>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},t[r][1].end={...o.start},t[n][1].start={...a.end},c=[],t[r][1].end.offset-t[r][1].start.offset&&(c=or(c,[["enter",t[r][1],e],["exit",t[r][1],e]])),c=or(c,[["enter",i,e],["enter",o,e],["exit",o,e],["enter",s,e]]),c=or(c,vg(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),c=or(c,[["exit",s,e],["enter",a,e],["exit",a,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(u=2,c=or(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):u=0,qn(t,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function rte(t,e){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ql(r);let s;return o;function o(l){return s=l,t.enter("attentionSequence"),a(l)}function a(l){if(l===s)return t.consume(l),a;const c=t.exit("attentionSequence"),u=Ql(l),f=!u||u===2&&i||n.includes(l),d=!i||i===2&&u||n.includes(r);return c._open=!!(s===42?f:f&&(i||!d)),c._close=!!(s===42?d:d&&(u||!f)),e(l)}}function FP(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const ite={name:"autolink",tokenize:ste};function ste(t,e,n){let r=0;return i;function i(h){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(h){return tn(h)?(t.consume(h),o):h===64?n(h):c(h)}function o(h){return h===43||h===45||h===46||qt(h)?(r=1,a(h)):c(h)}function a(h){return h===58?(t.consume(h),r=0,l):(h===43||h===45||h===46||qt(h))&&r++<32?(t.consume(h),a):(r=0,c(h))}function l(h){return h===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):h===null||h===32||h===60||Fp(h)?n(h):(t.consume(h),l)}function c(h){return h===64?(t.consume(h),u):Yee(h)?(t.consume(h),c):n(h)}function u(h){return qt(h)?f(h):n(h)}function f(h){return h===46?(t.consume(h),r=0,u):h===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):d(h)}function d(h){if((h===45||qt(h))&&r++<63){const g=h===45?d:f;return t.consume(h),g}return n(h)}}const Hf={partial:!0,tokenize:ote};function ote(t,e,n){return r;function r(s){return Ie(s)?De(t,i,"linePrefix")(s):i(s)}function i(s){return s===null||ge(s)?e(s):n(s)}}const Fj={continuation:{tokenize:lte},exit:cte,name:"blockQuote",tokenize:ate};function ate(t,e,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(o),t.exit("blockQuoteMarker"),s}return n(o)}function s(o){return Ie(o)?(t.enter("blockQuotePrefixWhitespace"),t.consume(o),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(o))}}function lte(t,e,n){const r=this;return i;function i(o){return Ie(o)?De(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return t.attempt(Fj,e,n)(o)}}function cte(t){t.exit("blockQuote")}const Xj={name:"characterEscape",tokenize:ute};function ute(t,e,n){return r;function r(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),i}function i(s){return Hee(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(s)}}const Zj={name:"characterReference",tokenize:fte};function fte(t,e,n){const r=this;let i=0,s,o;return a;function a(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),l}function l(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),c):(t.enter("characterReferenceValue"),s=31,o=qt,u(f))}function c(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,o=Uee,u):(t.enter("characterReferenceValue"),s=7,o=Qx,u(f))}function u(f){if(f===59&&i){const d=t.exit("characterReferenceValue");return o===qt&&!a1(r.sliceSerialize(d))?n(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return o(f)&&i++<s?(t.consume(f),u):n(f)}}const XP={partial:!0,tokenize:hte},ZP={concrete:!0,name:"codeFenced",tokenize:dte};function dte(t,e,n){const r=this,i={partial:!0,tokenize:w};let s=0,o=0,a;return l;function l(S){return c(S)}function c(S){const C=r.events[r.events.length-1];return s=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,a=S,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(S)}function u(S){return S===a?(o++,t.consume(S),u):o<3?n(S):(t.exit("codeFencedFenceSequence"),Ie(S)?De(t,f,"whitespace")(S):f(S))}function f(S){return S===null||ge(S)?(t.exit("codeFencedFence"),r.interrupt?e(S):t.check(XP,m,k)(S)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),d(S))}function d(S){return S===null||ge(S)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(S)):Ie(S)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),De(t,h,"whitespace")(S)):S===96&&S===a?n(S):(t.consume(S),d)}function h(S){return S===null||ge(S)?f(S):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===null||ge(S)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(S)):S===96&&S===a?n(S):(t.consume(S),g)}function m(S){return t.attempt(i,k,v)(S)}function v(S){return t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),y}function y(S){return s>0&&Ie(S)?De(t,x,"linePrefix",s+1)(S):x(S)}function x(S){return S===null||ge(S)?t.check(XP,m,k)(S):(t.enter("codeFlowValue"),b(S))}function b(S){return S===null||ge(S)?(t.exit("codeFlowValue"),x(S)):(t.consume(S),b)}function k(S){return t.exit("codeFenced"),e(S)}function w(S,C,_){let I=0;return E;function E(X){return S.enter("lineEnding"),S.consume(X),S.exit("lineEnding"),j}function j(X){return S.enter("codeFencedFence"),Ie(X)?De(S,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):A(X)}function A(X){return X===a?(S.enter("codeFencedFenceSequence"),L(X)):_(X)}function L(X){return X===a?(I++,S.consume(X),L):I>=o?(S.exit("codeFencedFenceSequence"),Ie(X)?De(S,z,"whitespace")(X):z(X)):_(X)}function z(X){return X===null||ge(X)?(S.exit("codeFencedFence"),C(X)):_(X)}}}function hte(t,e,n){const r=this;return i;function i(o){return o===null?n(o):(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):e(o)}}const ny={name:"codeIndented",tokenize:mte},pte={partial:!0,tokenize:gte};function mte(t,e,n){const r=this;return i;function i(c){return t.enter("codeIndented"),De(t,s,"linePrefix",5)(c)}function s(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?l(c):ge(c)?t.attempt(pte,o,l)(c):(t.enter("codeFlowValue"),a(c))}function a(c){return c===null||ge(c)?(t.exit("codeFlowValue"),o(c)):(t.consume(c),a)}function l(c){return t.exit("codeIndented"),e(c)}}function gte(t,e,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):ge(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i):De(t,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(o):ge(o)?i(o):n(o)}}const Ote={name:"codeText",previous:vte,resolve:yte,tokenize:xte};function yte(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)i===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(i=r):(r===e||t[r][1].type==="lineEnding")&&(t[i][1].type="codeTextData",r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return t}function vte(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xte(t,e,n){let r=0,i,s;return o;function o(f){return t.enter("codeText"),t.enter("codeTextSequence"),a(f)}function a(f){return f===96?(t.consume(f),r++,a):(t.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(t.enter("space"),t.consume(f),t.exit("space"),l):f===96?(s=t.enter("codeTextSequence"),i=0,u(f)):ge(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||ge(f)?(t.exit("codeTextData"),l(f)):(t.consume(f),c)}function u(f){return f===96?(t.consume(f),i++,u):i===r?(t.exit("codeTextSequence"),t.exit("codeText"),e(f)):(s.type="codeTextData",c(f))}}class bte{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Qc(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Qc(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Qc(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);Qc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Qc(this.left,n.reverse())}}}function Qc(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function Wj(t){const e={};let n=-1,r,i,s,o,a,l,c;const u=new bte(t);for(;++n<u.length;){for(;n in e;)n=e[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,wte(u,n)),n=e[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=u.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},a=u.slice(i,n),a.unshift(r),u.splice(i,n-i+1,a))}}return qn(t,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function wte(t,e){const n=t.get(e)[1],r=t.get(e)[2];let i=e-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],c={};let u,f,d=-1,h=n,g=0,m=0;const v=[m];for(;h;){for(;t.get(++i)[1]!==h;);s.push(i),h._tokenizer||(u=r.sliceStream(h),h.next||u.push(null),f&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++d<a.length;)a[d][0]==="exit"&&a[d-1][0]==="enter"&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(m=d+1,v.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):v.pop(),d=v.length;d--;){const y=a.slice(v[d],v[d+1]),x=s.pop();l.push([x,x+y.length-1]),t.splice(x,2,y)}for(l.reverse(),d=-1;++d<l.length;)c[g+l[d][0]]=g+l[d][1],g+=l[d][1]-l[d][0]-1;return c}const Ste={resolve:Cte,tokenize:Pte},kte={partial:!0,tokenize:Tte};function Cte(t){return Wj(t),t}function Pte(t,e){let n;return r;function r(a){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):ge(a)?t.check(kte,o,s)(a):(t.consume(a),i)}function s(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function o(a){return t.consume(a),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Tte(t,e,n){const r=this;return i;function i(o){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),De(t,s,"linePrefix")}function s(o){if(o===null||ge(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(o):t.interrupt(r.parser.constructs.flow,n,e)(o)}}function qj(t,e,n,r,i,s,o,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return f;function f(y){return y===60?(t.enter(r),t.enter(i),t.enter(s),t.consume(y),t.exit(s),d):y===null||y===32||y===41||Fp(y)?n(y):(t.enter(r),t.enter(o),t.enter(a),t.enter("chunkString",{contentType:"string"}),m(y))}function d(y){return y===62?(t.enter(s),t.consume(y),t.exit(s),t.exit(i),t.exit(r),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(t.exit("chunkString"),t.exit(a),d(y)):y===null||y===60||ge(y)?n(y):(t.consume(y),y===92?g:h)}function g(y){return y===60||y===62||y===92?(t.consume(y),h):h(y)}function m(y){return!u&&(y===null||y===41||Ue(y))?(t.exit("chunkString"),t.exit(a),t.exit(o),t.exit(r),e(y)):u<c&&y===40?(t.consume(y),u++,m):y===41?(t.consume(y),u--,m):y===null||y===32||y===40||Fp(y)?n(y):(t.consume(y),y===92?v:m)}function v(y){return y===40||y===41||y===92?(t.consume(y),m):m(y)}}function Yj(t,e,n,r,i,s){const o=this;let a=0,l;return c;function c(h){return t.enter(r),t.enter(i),t.consume(h),t.exit(i),t.enter(s),u}function u(h){return a>999||h===null||h===91||h===93&&!l||h===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(h):h===93?(t.exit(s),t.enter(i),t.consume(h),t.exit(i),t.exit(r),e):ge(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||ge(h)||a++>999?(t.exit("chunkString"),u(h)):(t.consume(h),l||(l=!Ie(h)),h===92?d:f)}function d(h){return h===91||h===92||h===93?(t.consume(h),a++,f):f(h)}}function Uj(t,e,n,r,i,s){let o;return a;function a(d){return d===34||d===39||d===40?(t.enter(r),t.enter(i),t.consume(d),t.exit(i),o=d===40?41:d,l):n(d)}function l(d){return d===o?(t.enter(i),t.consume(d),t.exit(i),t.exit(r),e):(t.enter(s),c(d))}function c(d){return d===o?(t.exit(s),l(o)):d===null?n(d):ge(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),De(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===o||d===null||ge(d)?(t.exit("chunkString"),c(d)):(t.consume(d),d===92?f:u)}function f(d){return d===o||d===92?(t.consume(d),u):u(d)}}function mu(t,e){let n;return r;function r(i){return ge(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):Ie(i)?De(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const Ete={name:"definition",tokenize:_te},Rte={partial:!0,tokenize:$te};function _te(t,e,n){const r=this;let i;return s;function s(h){return t.enter("definition"),o(h)}function o(h){return Yj.call(r,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=zr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(t.enter("definitionMarker"),t.consume(h),t.exit("definitionMarker"),l):n(h)}function l(h){return Ue(h)?mu(t,c)(h):c(h)}function c(h){return qj(t,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function u(h){return t.attempt(Rte,f,f)(h)}function f(h){return Ie(h)?De(t,d,"whitespace")(h):d(h)}function d(h){return h===null||ge(h)?(t.exit("definition"),r.parser.defined.push(i),e(h)):n(h)}}function $te(t,e,n){return r;function r(a){return Ue(a)?mu(t,i)(a):n(a)}function i(a){return Uj(t,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return Ie(a)?De(t,o,"whitespace")(a):o(a)}function o(a){return a===null||ge(a)?e(a):n(a)}}const Ate={name:"hardBreakEscape",tokenize:Qte};function Qte(t,e,n){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),i}function i(s){return ge(s)?(t.exit("hardBreakEscape"),e(s)):n(s)}}const Ite={name:"headingAtx",resolve:Nte,tokenize:jte};function Nte(t,e){let n=t.length-2,r=3,i,s;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},s={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},qn(t,r,n-r+1,[["enter",i,e],["enter",s,e],["exit",s,e],["exit",i,e]])),t}function jte(t,e,n){let r=0;return i;function i(u){return t.enter("atxHeading"),s(u)}function s(u){return t.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(t.consume(u),o):u===null||Ue(u)?(t.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||ge(u)?(t.exit("atxHeading"),e(u)):Ie(u)?De(t,a,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function l(u){return u===35?(t.consume(u),l):(t.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||Ue(u)?(t.exit("atxHeadingText"),a(u)):(t.consume(u),c)}}const Mte=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],WP=["pre","script","style","textarea"],Dte={concrete:!0,name:"htmlFlow",resolveTo:Bte,tokenize:Vte},Lte={partial:!0,tokenize:Xte},zte={partial:!0,tokenize:Fte};function Bte(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function Vte(t,e,n){const r=this;let i,s,o,a,l;return c;function c(R){return u(R)}function u(R){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(R),f}function f(R){return R===33?(t.consume(R),d):R===47?(t.consume(R),s=!0,m):R===63?(t.consume(R),i=3,r.interrupt?e:P):tn(R)?(t.consume(R),o=String.fromCharCode(R),v):n(R)}function d(R){return R===45?(t.consume(R),i=2,h):R===91?(t.consume(R),i=5,a=0,g):tn(R)?(t.consume(R),i=4,r.interrupt?e:P):n(R)}function h(R){return R===45?(t.consume(R),r.interrupt?e:P):n(R)}function g(R){const q="CDATA[";return R===q.charCodeAt(a++)?(t.consume(R),a===q.length?r.interrupt?e:A:g):n(R)}function m(R){return tn(R)?(t.consume(R),o=String.fromCharCode(R),v):n(R)}function v(R){if(R===null||R===47||R===62||Ue(R)){const q=R===47,H=o.toLowerCase();return!q&&!s&&WP.includes(H)?(i=1,r.interrupt?e(R):A(R)):Mte.includes(o.toLowerCase())?(i=6,q?(t.consume(R),y):r.interrupt?e(R):A(R)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):s?x(R):b(R))}return R===45||qt(R)?(t.consume(R),o+=String.fromCharCode(R),v):n(R)}function y(R){return R===62?(t.consume(R),r.interrupt?e:A):n(R)}function x(R){return Ie(R)?(t.consume(R),x):E(R)}function b(R){return R===47?(t.consume(R),E):R===58||R===95||tn(R)?(t.consume(R),k):Ie(R)?(t.consume(R),b):E(R)}function k(R){return R===45||R===46||R===58||R===95||qt(R)?(t.consume(R),k):w(R)}function w(R){return R===61?(t.consume(R),S):Ie(R)?(t.consume(R),w):b(R)}function S(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(t.consume(R),l=R,C):Ie(R)?(t.consume(R),S):_(R)}function C(R){return R===l?(t.consume(R),l=null,I):R===null||ge(R)?n(R):(t.consume(R),C)}function _(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Ue(R)?w(R):(t.consume(R),_)}function I(R){return R===47||R===62||Ie(R)?b(R):n(R)}function E(R){return R===62?(t.consume(R),j):n(R)}function j(R){return R===null||ge(R)?A(R):Ie(R)?(t.consume(R),j):n(R)}function A(R){return R===45&&i===2?(t.consume(R),W):R===60&&i===1?(t.consume(R),F):R===62&&i===4?(t.consume(R),M):R===63&&i===3?(t.consume(R),P):R===93&&i===5?(t.consume(R),Q):ge(R)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(Lte,$,L)(R)):R===null||ge(R)?(t.exit("htmlFlowData"),L(R)):(t.consume(R),A)}function L(R){return t.check(zte,z,$)(R)}function z(R){return t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),X}function X(R){return R===null||ge(R)?L(R):(t.enter("htmlFlowData"),A(R))}function W(R){return R===45?(t.consume(R),P):A(R)}function F(R){return R===47?(t.consume(R),o="",N):A(R)}function N(R){if(R===62){const q=o.toLowerCase();return WP.includes(q)?(t.consume(R),M):A(R)}return tn(R)&&o.length<8?(t.consume(R),o+=String.fromCharCode(R),N):A(R)}function Q(R){return R===93?(t.consume(R),P):A(R)}function P(R){return R===62?(t.consume(R),M):R===45&&i===2?(t.consume(R),P):A(R)}function M(R){return R===null||ge(R)?(t.exit("htmlFlowData"),$(R)):(t.consume(R),M)}function $(R){return t.exit("htmlFlow"),e(R)}}function Fte(t,e,n){const r=this;return i;function i(o){return ge(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):e(o)}}function Xte(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Hf,e,n)}}const Zte={name:"htmlText",tokenize:Wte};function Wte(t,e,n){const r=this;let i,s,o;return a;function a(P){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(P),l}function l(P){return P===33?(t.consume(P),c):P===47?(t.consume(P),w):P===63?(t.consume(P),b):tn(P)?(t.consume(P),_):n(P)}function c(P){return P===45?(t.consume(P),u):P===91?(t.consume(P),s=0,g):tn(P)?(t.consume(P),x):n(P)}function u(P){return P===45?(t.consume(P),h):n(P)}function f(P){return P===null?n(P):P===45?(t.consume(P),d):ge(P)?(o=f,F(P)):(t.consume(P),f)}function d(P){return P===45?(t.consume(P),h):f(P)}function h(P){return P===62?W(P):P===45?d(P):f(P)}function g(P){const M="CDATA[";return P===M.charCodeAt(s++)?(t.consume(P),s===M.length?m:g):n(P)}function m(P){return P===null?n(P):P===93?(t.consume(P),v):ge(P)?(o=m,F(P)):(t.consume(P),m)}function v(P){return P===93?(t.consume(P),y):m(P)}function y(P){return P===62?W(P):P===93?(t.consume(P),y):m(P)}function x(P){return P===null||P===62?W(P):ge(P)?(o=x,F(P)):(t.consume(P),x)}function b(P){return P===null?n(P):P===63?(t.consume(P),k):ge(P)?(o=b,F(P)):(t.consume(P),b)}function k(P){return P===62?W(P):b(P)}function w(P){return tn(P)?(t.consume(P),S):n(P)}function S(P){return P===45||qt(P)?(t.consume(P),S):C(P)}function C(P){return ge(P)?(o=C,F(P)):Ie(P)?(t.consume(P),C):W(P)}function _(P){return P===45||qt(P)?(t.consume(P),_):P===47||P===62||Ue(P)?I(P):n(P)}function I(P){return P===47?(t.consume(P),W):P===58||P===95||tn(P)?(t.consume(P),E):ge(P)?(o=I,F(P)):Ie(P)?(t.consume(P),I):W(P)}function E(P){return P===45||P===46||P===58||P===95||qt(P)?(t.consume(P),E):j(P)}function j(P){return P===61?(t.consume(P),A):ge(P)?(o=j,F(P)):Ie(P)?(t.consume(P),j):I(P)}function A(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(t.consume(P),i=P,L):ge(P)?(o=A,F(P)):Ie(P)?(t.consume(P),A):(t.consume(P),z)}function L(P){return P===i?(t.consume(P),i=void 0,X):P===null?n(P):ge(P)?(o=L,F(P)):(t.consume(P),L)}function z(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||Ue(P)?I(P):(t.consume(P),z)}function X(P){return P===47||P===62||Ue(P)?I(P):n(P)}function W(P){return P===62?(t.consume(P),t.exit("htmlTextData"),t.exit("htmlText"),e):n(P)}function F(P){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(P),t.exit("lineEnding"),N}function N(P){return Ie(P)?De(t,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):Q(P)}function Q(P){return t.enter("htmlTextData"),o(P)}}const l1={name:"labelEnd",resolveAll:Hte,resolveTo:Gte,tokenize:Kte},qte={tokenize:Jte},Yte={tokenize:ene},Ute={tokenize:tne};function Hte(t){let e=-1;const n=[];for(;++e<t.length;){const r=t[e][1];if(n.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",e+=i}}return t.length!==n.length&&qn(t,0,t.length,n),t}function Gte(t,e){let n=t.length,r=0,i,s,o,a;for(;n--;)if(i=t[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},c={type:"label",start:{...t[s][1].start},end:{...t[o][1].end}},u={type:"labelText",start:{...t[s+r+2][1].end},end:{...t[o-2][1].start}};return a=[["enter",l,e],["enter",c,e]],a=or(a,t.slice(s+1,s+r+3)),a=or(a,[["enter",u,e]]),a=or(a,vg(e.parser.constructs.insideSpan.null,t.slice(s+r+4,o-3),e)),a=or(a,[["exit",u,e],t[o-2],t[o-1],["exit",c,e]]),a=or(a,t.slice(o+1)),a=or(a,[["exit",l,e]]),qn(t,s,t.length,a),t}function Kte(t,e,n){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return a;function a(d){return s?s._inactive?f(d):(o=r.parser.defined.includes(zr(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelEnd"),l):n(d)}function l(d){return d===40?t.attempt(qte,u,o?u:f)(d):d===91?t.attempt(Yte,u,o?c:f)(d):o?u(d):f(d)}function c(d){return t.attempt(Ute,u,f)(d)}function u(d){return e(d)}function f(d){return s._balanced=!0,n(d)}}function Jte(t,e,n){return r;function r(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),i}function i(f){return Ue(f)?mu(t,s)(f):s(f)}function s(f){return f===41?u(f):qj(t,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return Ue(f)?mu(t,l)(f):u(f)}function a(f){return n(f)}function l(f){return f===34||f===39||f===40?Uj(t,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return Ue(f)?mu(t,u)(f):u(f)}function u(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):n(f)}}function ene(t,e,n){const r=this;return i;function i(a){return Yj.call(r,t,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(zr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function o(a){return n(a)}}function tne(t,e,n){return r;function r(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),i}function i(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),e):n(s)}}const nne={name:"labelStartImage",resolveAll:l1.resolveAll,tokenize:rne};function rne(t,e,n){const r=this;return i;function i(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),s}function s(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),o):n(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):e(a)}}const ine={name:"labelStartLink",resolveAll:l1.resolveAll,tokenize:sne};function sne(t,e,n){const r=this;return i;function i(o){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(o),t.exit("labelMarker"),t.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):e(o)}}const ry={name:"lineEnding",tokenize:one};function one(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),De(t,e,"linePrefix")}}const Dh={name:"thematicBreak",tokenize:ane};function ane(t,e,n){let r=0,i;return s;function s(c){return t.enter("thematicBreak"),o(c)}function o(c){return i=c,a(c)}function a(c){return c===i?(t.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||ge(c))?(t.exit("thematicBreak"),e(c)):n(c)}function l(c){return c===i?(t.consume(c),r++,l):(t.exit("thematicBreakSequence"),Ie(c)?De(t,a,"whitespace")(c):a(c))}}const cn={continuation:{tokenize:fne},exit:hne,name:"list",tokenize:une},lne={partial:!0,tokenize:pne},cne={partial:!0,tokenize:dne};function une(t,e,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Qx(h)){if(r.containerState.type||(r.containerState.type=g,t.enter(g,{_container:!0})),g==="listUnordered")return t.enter("listItemPrefix"),h===42||h===45?t.check(Dh,n,c)(h):c(h);if(!r.interrupt||h===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(h)}return n(h)}function l(h){return Qx(h)&&++o<10?(t.consume(h),l):(!r.interrupt||o<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(t.exit("listItemValue"),c(h)):n(h)}function c(h){return t.enter("listItemMarker"),t.consume(h),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,t.check(Hf,r.interrupt?n:u,t.attempt(lne,d,f))}function u(h){return r.containerState.initialBlankLine=!0,s++,d(h)}function f(h){return Ie(h)?(t.enter("listItemPrefixWhitespace"),t.consume(h),t.exit("listItemPrefixWhitespace"),d):n(h)}function d(h){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(h)}}function fne(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(Hf,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,De(t,e,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!Ie(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(cne,e,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,De(t,t.attempt(cn,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function dne(t,e,n){const r=this;return De(t,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?e(s):n(s)}}function hne(t){t.exit(this.containerState.type)}function pne(t,e,n){const r=this;return De(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!Ie(s)&&o&&o[1].type==="listItemPrefixWhitespace"?e(s):n(s)}}const qP={name:"setextUnderline",resolveTo:mne,tokenize:gne};function mne(t,e){let n=t.length,r,i,s;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!s&&t[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",s?(t.splice(i,0,["enter",o,e]),t.splice(s+1,0,["exit",t[r][1],e]),t[r][1].end={...t[s][1].end}):t[r][1]=o,t.push(["exit",o,e]),t}function gne(t,e,n){const r=this;let i;return s;function s(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return t.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(t.consume(c),a):(t.exit("setextHeadingLineSequence"),Ie(c)?De(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||ge(c)?(t.exit("setextHeadingLine"),e(c)):n(c)}}const One={tokenize:yne};function yne(t){const e=this,n=t.attempt(Hf,r,t.attempt(this.parser.constructs.flowInitial,i,De(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Ste,i)),"linePrefix")));return n;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const vne={resolveAll:Gj()},xne=Hj("string"),bne=Hj("text");function Hj(t){return{resolveAll:Gj(t==="text"?wne:void 0),tokenize:e};function e(n){const r=this,i=this.parser.constructs[t],s=n.attempt(i,o,a);return o;function o(u){return c(u)?s(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const f=i[u];let d=-1;if(f)for(;++d<f.length;){const h=f[d];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Gj(t){return e;function e(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return t?t(n,r):n}}function wne(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const r=t[n-1][1],i=e.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const c=i[s];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(c===-2)l=!0,a++;else if(c!==-1){s++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(a=0),a){const c={type:n===t.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(t.splice(n,0,["enter",c,e],["exit",c,e]),n+=2)}n++}return t}const Sne={42:cn,43:cn,45:cn,48:cn,49:cn,50:cn,51:cn,52:cn,53:cn,54:cn,55:cn,56:cn,57:cn,62:Fj},kne={91:Ete},Cne={[-2]:ny,[-1]:ny,32:ny},Pne={35:Ite,42:Dh,45:[qP,Dh],60:Dte,61:qP,95:Dh,96:ZP,126:ZP},Tne={38:Zj,92:Xj},Ene={[-5]:ry,[-4]:ry,[-3]:ry,33:nne,38:Zj,42:Ix,60:[ite,Zte],91:ine,92:[Ate,Xj],93:l1,95:Ix,96:Ote},Rne={null:[Ix,vne]},_ne={null:[42,95]},$ne={null:[]},Ane=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:_ne,contentInitial:kne,disable:$ne,document:Sne,flow:Pne,flowInitial:Cne,insideSpan:Rne,string:Tne,text:Ene},Symbol.toStringTag,{value:"Module"}));function Qne(t,e,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let o=[],a=[];const l={attempt:C(w),check:C(S),consume:x,enter:b,exit:k,interrupt:C(S,{interrupt:!0})},c={code:null,containerState:{},defineSkip:m,events:[],now:g,parser:t,previous:null,sliceSerialize:d,sliceStream:h,write:f};let u=e.tokenize.call(c,l);return e.resolveAll&&s.push(e),c;function f(j){return o=or(o,j),v(),o[o.length-1]!==null?[]:(_(e,0),c.events=vg(s,c.events,c),c.events)}function d(j,A){return Nne(h(j),A)}function h(j){return Ine(o,j)}function g(){const{_bufferIndex:j,_index:A,line:L,column:z,offset:X}=r;return{_bufferIndex:j,_index:A,line:L,column:z,offset:X}}function m(j){i[j.line]=j.column,E()}function v(){let j;for(;r._index<o.length;){const A=o[r._index];if(typeof A=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<A.length;)y(A.charCodeAt(r._bufferIndex));else y(A)}}function y(j){u=u(j)}function x(j){ge(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,E()):j!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=j}function b(j,A){const L=A||{};return L.type=j,L.start=g(),c.events.push(["enter",L,c]),a.push(L),L}function k(j){const A=a.pop();return A.end=g(),c.events.push(["exit",A,c]),A}function w(j,A){_(j,A.from)}function S(j,A){A.restore()}function C(j,A){return L;function L(z,X,W){let F,N,Q,P;return Array.isArray(z)?$(z):"tokenize"in z?$([z]):M(z);function M(ie){return Y;function Y(pe){const me=pe!==null&&ie[pe],ye=pe!==null&&ie.null,Ee=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(ye)?ye:ye?[ye]:[]];return $(Ee)(pe)}}function $(ie){return F=ie,N=0,ie.length===0?W:R(ie[N])}function R(ie){return Y;function Y(pe){return P=I(),Q=ie,ie.partial||(c.currentConstruct=ie),ie.name&&c.parser.constructs.disable.null.includes(ie.name)?H():ie.tokenize.call(A?Object.assign(Object.create(c),A):c,l,q,H)(pe)}}function q(ie){return j(Q,P),X}function H(ie){return P.restore(),++N<F.length?R(F[N]):W}}}function _(j,A){j.resolveAll&&!s.includes(j)&&s.push(j),j.resolve&&qn(c.events,A,c.events.length-A,j.resolve(c.events.slice(A),c)),j.resolveTo&&(c.events=j.resolveTo(c.events,c))}function I(){const j=g(),A=c.previous,L=c.currentConstruct,z=c.events.length,X=Array.from(a);return{from:z,restore:W};function W(){r=j,c.previous=A,c.currentConstruct=L,c.events.length=z,a=X,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ine(t,e){const n=e.start._index,r=e.start._bufferIndex,i=e.end._index,s=e.end._bufferIndex;let o;if(n===i)o=[t[n].slice(r,s)];else{if(o=t.slice(n,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}s>0&&o.push(t[i].slice(0,s))}return o}function Nne(t,e){let n=-1;const r=[];let i;for(;++n<t.length;){const s=t[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
|
|
450
|
+
`;break}case-3:{o=`\r
|
|
451
|
+
`;break}case-2:{o=e?" ":" ";break}case-1:{if(!e&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function jne(t){const r={constructs:Bj([Ane,...(t||{}).extensions||[]]),content:i(Gee),defined:[],document:i(Jee),flow:i(One),lazy:{},string:i(xne),text:i(bne)};return r;function i(s){return o;function o(a){return Qne(r,s,a)}}}function Mne(t){for(;!Wj(t););return t}const YP=/[\0\t\n\r]/g;function Dne(){let t=1,e="",n=!0,r;return i;function i(s,o,a){const l=[];let c,u,f,d,h;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),f=0,e="",n&&(s.charCodeAt(0)===65279&&f++,n=void 0);f<s.length;){if(YP.lastIndex=f,c=YP.exec(s),d=c&&c.index!==void 0?c.index:s.length,h=s.charCodeAt(d),!c){e=s.slice(f);break}if(h===10&&f===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<d&&(l.push(s.slice(f,d)),t+=d-f),h){case 0:{l.push(65533),t++;break}case 9:{for(u=Math.ceil(t/4)*4,l.push(-2);t++<u;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:r=!0,t=1}f=d+1}return a&&(r&&l.push(-5),e&&l.push(e),l.push(null)),l}}const Lne=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zne(t){return t.replace(Lne,Bne)}function Bne(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Vj(n.slice(s?2:1),s?16:10)}return a1(n)||t}const Kj={}.hasOwnProperty;function Vne(t,e,n){return typeof e!="string"&&(n=e,e=void 0),Fne(n)(Mne(jne(n).document().write(Dne()(t,e,!0))))}function Fne(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s($i),autolinkProtocol:I,autolinkEmail:I,atxHeading:s(Gr),blockQuote:s(ye),characterEscape:I,characterReference:I,codeFenced:s(Ee),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Ee,o),codeText:s(je,o),codeTextData:I,data:I,codeFlowValue:I,definition:s(kt),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(ln),hardBreakEscape:s(Sr),hardBreakTrailing:s(Sr),htmlFlow:s(Kr,o),htmlFlowData:I,htmlText:s(Kr,o),htmlTextData:I,image:s(ho),label:o,link:s($i),listItem:s(po),listItemValue:d,listOrdered:s(vc,f),listUnordered:s(vc),paragraph:s(ad),reference:R,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Gr),strong:s(Ai),thematicBreak:s(qg)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:me,autolinkProtocol:pe,blockQuote:l(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:ie,characterReference:Y,codeFenced:l(v),codeFencedFence:m,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:E,codeIndented:l(y),codeText:l(X),codeTextData:E,data:E,definition:l(),definitionDestinationString:k,definitionLabelString:x,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(L),htmlFlowData:E,htmlText:l(z),htmlTextData:E,image:l(F),label:Q,labelText:N,lineEnding:j,link:l(W),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:q,resourceDestinationString:P,resourceTitleString:M,resource:$,setextHeading:l(_),setextHeadingLineSequence:C,setextHeadingText:S,strong:l(),thematicBreak:l()}};Jj(e,(t||{}).mdastExtensions||[]);const n={};return r;function r(V){let te={type:"root",children:[]};const xe={stack:[te],tokenStack:[],config:e,enter:a,exit:c,buffer:o,resume:u,data:n},_e=[];let Be=-1;for(;++Be<V.length;)if(V[Be][1].type==="listOrdered"||V[Be][1].type==="listUnordered")if(V[Be][0]==="enter")_e.push(Be);else{const Rn=_e.pop();Be=i(V,Rn,Be)}for(Be=-1;++Be<V.length;){const Rn=e[V[Be][0]];Kj.call(Rn,V[Be][1].type)&&Rn[V[Be][1].type].call(Object.assign({sliceSerialize:V[Be][2].sliceSerialize},xe),V[Be][1])}if(xe.tokenStack.length>0){const Rn=xe.tokenStack[xe.tokenStack.length-1];(Rn[1]||UP).call(xe,void 0,Rn[0])}for(te.position={start:ms(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:ms(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be<e.transforms.length;)te=e.transforms[Be](te)||te;return te}function i(V,te,xe){let _e=te-1,Be=-1,Rn=!1,Jr,_n,er,as;for(;++_e<=xe;){const pt=V[_e];switch(pt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pt[0]==="enter"?Be++:Be--,as=void 0;break}case"lineEndingBlank":{pt[0]==="enter"&&(Jr&&!as&&!Be&&!er&&(er=_e),as=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:as=void 0}if(!Be&&pt[0]==="enter"&&pt[1].type==="listItemPrefix"||Be===-1&&pt[0]==="exit"&&(pt[1].type==="listUnordered"||pt[1].type==="listOrdered")){if(Jr){let ls=_e;for(_n=void 0;ls--;){const kr=V[ls];if(kr[1].type==="lineEnding"||kr[1].type==="lineEndingBlank"){if(kr[0]==="exit")continue;_n&&(V[_n][1].type="lineEndingBlank",Rn=!0),kr[1].type="lineEnding",_n=ls}else if(!(kr[1].type==="linePrefix"||kr[1].type==="blockQuotePrefix"||kr[1].type==="blockQuotePrefixWhitespace"||kr[1].type==="blockQuoteMarker"||kr[1].type==="listItemIndent"))break}er&&(!_n||er<_n)&&(Jr._spread=!0),Jr.end=Object.assign({},_n?V[_n][1].start:pt[1].end),V.splice(_n||_e,0,["exit",Jr,pt[2]]),_e++,xe++}if(pt[1].type==="listItemPrefix"){const ls={type:"listItem",_spread:!1,start:Object.assign({},pt[1].start),end:void 0};Jr=ls,V.splice(_e,0,["enter",ls,pt[2]]),_e++,xe++,er=void 0,as=!0}}}return V[te][1]._spread=Rn,xe}function s(V,te){return xe;function xe(_e){a.call(this,V(_e),_e),te&&te.call(this,_e)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(V,te,xe){this.stack[this.stack.length-1].children.push(V),this.stack.push(V),this.tokenStack.push([te,xe||void 0]),V.position={start:ms(te.start),end:void 0}}function l(V){return te;function te(xe){V&&V.call(this,xe),c.call(this,xe)}}function c(V,te){const xe=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==V.type&&(te?te.call(this,V,_e[0]):(_e[1]||UP).call(this,V,_e[0]));else throw new Error("Cannot close `"+V.type+"` ("+pu({start:V.start,end:V.end})+"): it’s not open");xe.position.end=ms(V.end)}function u(){return o1(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(V){if(this.data.expectingFirstListItemValue){const te=this.stack[this.stack.length-2];te.start=Number.parseInt(this.sliceSerialize(V),10),this.data.expectingFirstListItemValue=void 0}}function h(){const V=this.resume(),te=this.stack[this.stack.length-1];te.lang=V}function g(){const V=this.resume(),te=this.stack[this.stack.length-1];te.meta=V}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const V=this.resume(),te=this.stack[this.stack.length-1];te.value=V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const V=this.resume(),te=this.stack[this.stack.length-1];te.value=V.replace(/(\r?\n|\r)$/g,"")}function x(V){const te=this.resume(),xe=this.stack[this.stack.length-1];xe.label=te,xe.identifier=zr(this.sliceSerialize(V)).toLowerCase()}function b(){const V=this.resume(),te=this.stack[this.stack.length-1];te.title=V}function k(){const V=this.resume(),te=this.stack[this.stack.length-1];te.url=V}function w(V){const te=this.stack[this.stack.length-1];if(!te.depth){const xe=this.sliceSerialize(V).length;te.depth=xe}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(V){const te=this.stack[this.stack.length-1];te.depth=this.sliceSerialize(V).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function I(V){const xe=this.stack[this.stack.length-1].children;let _e=xe[xe.length-1];(!_e||_e.type!=="text")&&(_e=Wg(),_e.position={start:ms(V.start),end:void 0},xe.push(_e)),this.stack.push(_e)}function E(V){const te=this.stack.pop();te.value+=this.sliceSerialize(V),te.position.end=ms(V.end)}function j(V){const te=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=te.children[te.children.length-1];xe.position.end=ms(V.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(te.type)&&(I.call(this,V),E.call(this,V))}function A(){this.data.atHardBreak=!0}function L(){const V=this.resume(),te=this.stack[this.stack.length-1];te.value=V}function z(){const V=this.resume(),te=this.stack[this.stack.length-1];te.value=V}function X(){const V=this.resume(),te=this.stack[this.stack.length-1];te.value=V}function W(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const te=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=te,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function F(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const te=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=te,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function N(V){const te=this.sliceSerialize(V),xe=this.stack[this.stack.length-2];xe.label=zne(te),xe.identifier=zr(te).toLowerCase()}function Q(){const V=this.stack[this.stack.length-1],te=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const _e=V.children;xe.children=_e}else xe.alt=te}function P(){const V=this.resume(),te=this.stack[this.stack.length-1];te.url=V}function M(){const V=this.resume(),te=this.stack[this.stack.length-1];te.title=V}function $(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function q(V){const te=this.resume(),xe=this.stack[this.stack.length-1];xe.label=te,xe.identifier=zr(this.sliceSerialize(V)).toLowerCase(),this.data.referenceType="full"}function H(V){this.data.characterReferenceType=V.type}function ie(V){const te=this.sliceSerialize(V),xe=this.data.characterReferenceType;let _e;xe?(_e=Vj(te,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=a1(te);const Be=this.stack[this.stack.length-1];Be.value+=_e}function Y(V){const te=this.stack.pop();te.position.end=ms(V.end)}function pe(V){E.call(this,V);const te=this.stack[this.stack.length-1];te.url=this.sliceSerialize(V)}function me(V){E.call(this,V);const te=this.stack[this.stack.length-1];te.url="mailto:"+this.sliceSerialize(V)}function ye(){return{type:"blockquote",children:[]}}function Ee(){return{type:"code",lang:null,meta:null,value:""}}function je(){return{type:"inlineCode",value:""}}function kt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ln(){return{type:"emphasis",children:[]}}function Gr(){return{type:"heading",depth:0,children:[]}}function Sr(){return{type:"break"}}function Kr(){return{type:"html",value:""}}function ho(){return{type:"image",title:null,url:"",alt:null}}function $i(){return{type:"link",title:null,url:"",children:[]}}function vc(V){return{type:"list",ordered:V.type==="listOrdered",start:null,spread:V._spread,children:[]}}function po(V){return{type:"listItem",spread:V._spread,checked:null,children:[]}}function ad(){return{type:"paragraph",children:[]}}function Ai(){return{type:"strong",children:[]}}function Wg(){return{type:"text",value:""}}function qg(){return{type:"thematicBreak"}}}function ms(t){return{line:t.line,column:t.column,offset:t.offset}}function Jj(t,e){let n=-1;for(;++n<e.length;){const r=e[n];Array.isArray(r)?Jj(t,r):Xne(t,r)}}function Xne(t,e){let n;for(n in e)if(Kj.call(e,n))switch(n){case"canContainEols":{const r=e[n];r&&t[n].push(...r);break}case"transforms":{const r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{const r=e[n];r&&Object.assign(t[n],r);break}}}function UP(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+pu({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+pu({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+pu({start:e.start,end:e.end})+") is still open")}function Zne(t){const e=this;e.parser=n;function n(r){return Vne(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function Wne(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function qne(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
|
|
452
|
+
`}]}function Yne(t,e){const n=e.value?e.value+`
|
|
453
|
+
`:"",r={},i=e.lang?e.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return e.meta&&(s.data={meta:e.meta}),t.patch(e,s),s=t.applyData(e,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(e,s),s}function Une(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function Hne(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function Gne(t,e){const n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(e.identifier).toUpperCase(),i=lc(r.toLowerCase()),s=t.footnoteOrder.indexOf(r);let o,a=t.footnoteCounts.get(r);a===void 0?(a=0,t.footnoteOrder.push(r),o=t.footnoteOrder.length):o=s+1,a+=1,t.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};t.patch(e,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,c),t.applyData(e,c)}function Kne(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function Jne(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function eM(t,e){const n=e.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];const i=t.all(e),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function ere(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return eM(t,e);const i={src:lc(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,s),t.applyData(e,s)}function tre(t,e){const n={src:lc(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,r),t.applyData(e,r)}function nre(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,r),t.applyData(e,r)}function rre(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return eM(t,e);const i={href:lc(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,s),t.applyData(e,s)}function ire(t,e){const n={href:lc(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function sre(t,e,n){const r=t.all(e),i=n?ore(n):tM(e),s={},o=[];if(typeof e.checked=="boolean"){const u=r[0];let f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
|
|
454
|
+
`}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
|
|
455
|
+
`});const c={type:"element",tagName:"li",properties:s,children:o};return t.patch(e,c),t.applyData(e,c)}function ore(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let r=-1;for(;!e&&++r<n.length;)e=tM(n[r])}return e}function tM(t){const e=t.spread;return e??t.children.length>1}function are(t,e){const n={},r=t.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(r,!0)};return t.patch(e,s),t.applyData(e,s)}function lre(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function cre(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function ure(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function fre(t,e){const n=t.all(e),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(e.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},a=n1(e.children[1]),l=Ij(e.children[e.children.length-1]);a&&l&&(o.position={start:a,end:l}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,s),t.applyData(e,s)}function dre(t,e,n){const r=n?n.children:void 0,s=(r?r.indexOf(e):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:e.children.length;let l=-1;const c=[];for(;++l<a;){const f=e.children[l],d={},h=o?o[l]:void 0;h&&(d.align=h);let g={type:"element",tagName:s,properties:d,children:[]};f&&(g.children=t.all(f),t.patch(f,g),g=t.applyData(f,g)),c.push(g)}const u={type:"element",tagName:"tr",properties:{},children:t.wrap(c,!0)};return t.patch(e,u),t.applyData(e,u)}function hre(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const HP=9,GP=32;function pre(t){const e=String(t),n=/\r?\n|\r/g;let r=n.exec(e),i=0;const s=[];for(;r;)s.push(KP(e.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(e);return s.push(KP(e.slice(i),i>0,!1)),s.join("")}function KP(t,e,n){let r=0,i=t.length;if(e){let s=t.codePointAt(r);for(;s===HP||s===GP;)r++,s=t.codePointAt(r)}if(n){let s=t.codePointAt(i-1);for(;s===HP||s===GP;)i--,s=t.codePointAt(i-1)}return i>r?t.slice(r,i):""}function mre(t,e){const n={type:"text",value:pre(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function gre(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const Ore={blockquote:Wne,break:qne,code:Yne,delete:Une,emphasis:Hne,footnoteReference:Gne,heading:Kne,html:Jne,imageReference:ere,image:tre,inlineCode:nre,linkReference:rre,link:ire,listItem:sre,list:are,paragraph:lre,root:cre,strong:ure,table:fre,tableCell:hre,tableRow:dre,text:mre,thematicBreak:gre,toml:Md,yaml:Md,definition:Md,footnoteDefinition:Md};function Md(){}const nM=-1,xg=0,gu=1,Xp=2,c1=3,u1=4,f1=5,d1=6,rM=7,iM=8,JP=typeof self=="object"?self:globalThis,yre=(t,e)=>{const n=(i,s)=>(t.set(s,i),i),r=i=>{if(t.has(i))return t.get(i);const[s,o]=e[i];switch(s){case xg:case nM:return n(o,i);case gu:{const a=n([],i);for(const l of o)a.push(r(l));return a}case Xp:{const a=n({},i);for(const[l,c]of o)a[r(l)]=r(c);return a}case c1:return n(new Date(o),i);case u1:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case f1:{const a=n(new Map,i);for(const[l,c]of o)a.set(r(l),r(c));return a}case d1:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case rM:{const{name:a,message:l}=o;return n(new JP[a](l),i)}case iM:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return n(new DataView(a),o)}}return n(new JP[s](o),i)};return r},eT=t=>yre(new Map,t)(0),_a="",{toString:vre}={},{keys:xre}=Object,Ic=t=>{const e=typeof t;if(e!=="object"||!t)return[xg,e];const n=vre.call(t).slice(8,-1);switch(n){case"Array":return[gu,_a];case"Object":return[Xp,_a];case"Date":return[c1,_a];case"RegExp":return[u1,_a];case"Map":return[f1,_a];case"Set":return[d1,_a];case"DataView":return[gu,n]}return n.includes("Array")?[gu,n]:n.includes("Error")?[rM,n]:[Xp,n]},Dd=([t,e])=>t===xg&&(e==="function"||e==="symbol"),bre=(t,e,n,r)=>{const i=(o,a)=>{const l=r.push(o)-1;return n.set(a,l),l},s=o=>{if(n.has(o))return n.get(o);let[a,l]=Ic(o);switch(a){case xg:{let u=o;switch(l){case"bigint":a=iM,u=o.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([nM],o)}return i([a,u],o)}case gu:{if(l){let d=o;return l==="DataView"?d=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(d=new Uint8Array(o)),i([l,[...d]],o)}const u=[],f=i([a,u],o);for(const d of o)u.push(s(d));return f}case Xp:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(e&&"toJSON"in o)return s(o.toJSON());const u=[],f=i([a,u],o);for(const d of xre(o))(t||!Dd(Ic(o[d])))&&u.push([s(d),s(o[d])]);return f}case c1:return i([a,o.toISOString()],o);case u1:{const{source:u,flags:f}=o;return i([a,{source:u,flags:f}],o)}case f1:{const u=[],f=i([a,u],o);for(const[d,h]of o)(t||!(Dd(Ic(d))||Dd(Ic(h))))&&u.push([s(d),s(h)]);return f}case d1:{const u=[],f=i([a,u],o);for(const d of o)(t||!Dd(Ic(d)))&&u.push(s(d));return f}}const{message:c}=o;return i([a,{name:l,message:c}],o)};return s},tT=(t,{json:e,lossy:n}={})=>{const r=[];return bre(!(e||n),!!e,new Map,r)(t),r},Zp=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?eT(tT(t,e)):structuredClone(t):(t,e)=>eT(tT(t,e));function wre(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function Sre(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function kre(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||wre,r=t.options.footnoteBackLabel||Sre,i=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",o=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<t.footnoteOrder.length;){const c=t.footnoteById.get(t.footnoteOrder[l]);if(!c)continue;const u=t.all(c),f=String(c.identifier).toUpperCase(),d=lc(f.toLowerCase());let h=0;const g=[],m=t.footnoteCounts.get(f);for(;m!==void 0&&++h<=m;){g.length>0&&g.push({type:"text",value:" "});let x=typeof n=="string"?n:n(l,h);typeof x=="string"&&(x={type:"text",value:x}),g.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+d+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,h),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const v=u[u.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const x=v.children[v.children.length-1];x&&x.type==="text"?x.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...g)}else u.push(...g);const y={type:"element",tagName:"li",properties:{id:e+"fn-"+d},children:t.wrap(u,!0)};t.patch(c,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Zp(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
456
|
+
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(a,!0)},{type:"text",value:`
|
|
457
|
+
`}]}}const bg=function(t){if(t==null)return Ere;if(typeof t=="function")return wg(t);if(typeof t=="object")return Array.isArray(t)?Cre(t):Pre(t);if(typeof t=="string")return Tre(t);throw new Error("Expected function, string, or object as test")};function Cre(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=bg(t[n]);return wg(r);function r(...i){let s=-1;for(;++s<e.length;)if(e[s].apply(this,i))return!0;return!1}}function Pre(t){const e=t;return wg(n);function n(r){const i=r;let s;for(s in t)if(i[s]!==e[s])return!1;return!0}}function Tre(t){return wg(e);function e(n){return n&&n.type===t}}function wg(t){return e;function e(n,r,i){return!!(Rre(n)&&t.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ere(){return!0}function Rre(t){return t!==null&&typeof t=="object"&&"type"in t}const sM=[],_re=!0,Nx=!1,$re="skip";function oM(t,e,n,r){let i;typeof e=="function"&&typeof n!="function"?(r=n,n=e):i=e;const s=bg(i),o=r?-1:1;a(t,void 0,[])();function a(l,c,u){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return d;function d(){let h=sM,g,m,v;if((!e||s(l,c,u[u.length-1]||void 0))&&(h=Are(n(l,u)),h[0]===Nx))return h;if("children"in l&&l.children){const y=l;if(y.children&&h[0]!==$re)for(m=(r?y.children.length:-1)+o,v=u.concat(y);m>-1&&m<y.children.length;){const x=y.children[m];if(g=a(x,m,v)(),g[0]===Nx)return g;m=typeof g[1]=="number"?g[1]:m+o}}return h}}}function Are(t){return Array.isArray(t)?t:typeof t=="number"?[_re,t]:t==null?sM:[t]}function h1(t,e,n,r){let i,s,o;typeof e=="function"&&typeof n!="function"?(s=void 0,o=e,i=n):(s=e,o=n,i=r),oM(t,s,a,i);function a(l,c){const u=c[c.length-1],f=u?u.children.indexOf(l):void 0;return o(l,f,u)}}const jx={}.hasOwnProperty,Qre={};function Ire(t,e){const n=e||Qre,r=new Map,i=new Map,s=new Map,o={...Ore,...n.handlers},a={all:c,applyData:jre,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:Nre,wrap:Dre};return h1(t,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const f=u.type==="definition"?r:i,d=String(u.identifier).toUpperCase();f.has(d)||f.set(d,u)}}),a;function l(u,f){const d=u.type,h=a.handlers[d];if(jx.call(a.handlers,d)&&h)return h(a,u,f);if(a.options.passThrough&&a.options.passThrough.includes(d)){if("children"in u){const{children:m,...v}=u,y=Zp(v);return y.children=a.all(u),y}return Zp(u)}return(a.options.unknownHandler||Mre)(a,u,f)}function c(u){const f=[];if("children"in u){const d=u.children;let h=-1;for(;++h<d.length;){const g=a.one(d[h],u);if(g){if(h&&d[h-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=nT(g.value)),!Array.isArray(g)&&g.type==="element")){const m=g.children[0];m&&m.type==="text"&&(m.value=nT(m.value))}Array.isArray(g)?f.push(...g):f.push(g)}}}return f}}function Nre(t,e){t.position&&(e.position=See(t))}function jre(t,e){let n=e;if(t&&t.data){const r=t.data.hName,i=t.data.hChildren,s=t.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,Zp(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Mre(t,e){const n=e.data||{},r="value"in e&&!(jx.call(n,"hProperties")||jx.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function Dre(t,e){const n=[];let r=-1;for(e&&n.push({type:"text",value:`
|
|
458
|
+
`});++r<t.length;)r&&n.push({type:"text",value:`
|
|
459
|
+
`}),n.push(t[r]);return e&&t.length>0&&n.push({type:"text",value:`
|
|
460
|
+
`}),n}function nT(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function rT(t,e){const n=Ire(t,e),r=n.one(t,void 0),i=kre(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
461
|
+
`},i),s}function Lre(t,e){return t&&"run"in t?async function(n,r){const i=rT(n,{file:r,...e});await t.run(i,r)}:function(n,r){return rT(n,{file:r,...t||e})}}function iT(t){if(t)throw t}var Lh=Object.prototype.hasOwnProperty,aM=Object.prototype.toString,sT=Object.defineProperty,oT=Object.getOwnPropertyDescriptor,aT=function(e){return typeof Array.isArray=="function"?Array.isArray(e):aM.call(e)==="[object Array]"},lT=function(e){if(!e||aM.call(e)!=="[object Object]")return!1;var n=Lh.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Lh.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;var i;for(i in e);return typeof i>"u"||Lh.call(e,i)},cT=function(e,n){sT&&n.name==="__proto__"?sT(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},uT=function(e,n){if(n==="__proto__")if(Lh.call(e,n)){if(oT)return oT(e,n).value}else return;return e[n]},zre=function t(){var e,n,r,i,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(e=arguments[l],e!=null)for(n in e)r=uT(a,n),i=uT(e,n),a!==i&&(u&&i&&(lT(i)||(s=aT(i)))?(s?(s=!1,o=r&&aT(r)?r:[]):o=r&&lT(r)?r:{},cT(a,{name:n,newValue:t(u,o,i)})):typeof i<"u"&&cT(a,{name:n,newValue:i}));return a};const iy=ql(zre);function Mx(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Bre(){const t=[],e={run:n,use:r};return e;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...c){const u=t[++s];let f=-1;if(l){o(l);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,u?Vre(u,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function Vre(t,e){let n;return r;function r(...o){const a=t.length>o.length;let l;a&&o.push(i);try{l=t.apply(this,o)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,e(o,...a))}function s(o){i(null,o)}}const li={basename:Fre,dirname:Xre,extname:Zre,join:Wre,sep:"/"};function Fre(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Gf(t);let n=0,r=-1,i=t.length,s;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let o=-1,a=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(t.codePointAt(i)===e.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=t.length),t.slice(n,r)}function Xre(t){if(Gf(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function Zre(t){Gf(t);let e=t.length,n=-1,r=0,i=-1,s=0,o;for(;e--;){const a=t.codePointAt(e);if(a===47){if(o){r=e+1;break}continue}n<0&&(o=!0,n=e+1),a===46?i<0?i=e:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":t.slice(i,n)}function Wre(...t){let e=-1,n;for(;++e<t.length;)Gf(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":qre(n)}function qre(t){Gf(t);const e=t.codePointAt(0)===47;let n=Yre(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function Yre(t,e){let n="",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=t.length;){if(o<t.length)a=t.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(i+1,o):n=t.slice(i+1,o),r=o-i-1;i=o,s=0}else a===46&&s>-1?s++:s=-1}return n}function Gf(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Ure={cwd:Hre};function Hre(){return"/"}function Dx(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Gre(t){if(typeof t=="string")t=new URL(t);else if(!Dx(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Kre(t)}function Kre(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const r=e.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const sy=["history","path","basename","stem","extname","dirname"];class lM{constructor(e){let n;e?Dx(e)?n={path:e}:typeof e=="string"||Jre(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":Ure.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<sy.length;){const s=sy[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)sy.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?li.basename(this.path):void 0}set basename(e){ay(e,"basename"),oy(e,"basename"),this.path=li.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?li.dirname(this.path):void 0}set dirname(e){fT(this.basename,"dirname"),this.path=li.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?li.extname(this.path):void 0}set extname(e){if(oy(e,"extname"),fT(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=li.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Dx(e)&&(e=Gre(e)),ay(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?li.basename(this.path,this.extname):void 0}set stem(e){ay(e,"stem"),oy(e,"stem"),this.path=li.join(this.dirname||"",e+(this.extname||""))}fail(e,n,r){const i=this.message(e,n,r);throw i.fatal=!0,i}info(e,n,r){const i=this.message(e,n,r);return i.fatal=void 0,i}message(e,n,r){const i=new Gt(e,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function oy(t,e){if(t&&t.includes(li.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+li.sep+"`")}function ay(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function fT(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function Jre(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const eie=function(t){const r=this.constructor.prototype,i=r[t],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},tie={}.hasOwnProperty;class p1 extends eie{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Bre()}copy(){const e=new p1;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];e.use(...r)}return e.data(iy(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(uy("data",this.frozen),this.namespace[e]=n,this):tie.call(this.namespace,e)&&this.namespace[e]||void 0:e?(uy("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(e,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=Ld(e),r=this.parser||this.Parser;return ly("parse",r),r(String(n),n)}process(e,n){const r=this;return this.freeze(),ly("process",this.parser||this.Parser),cy("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=Ld(e),l=r.parse(a);r.run(l,a,function(u,f,d){if(u||!f||!d)return c(u);const h=f,g=r.stringify(h,d);iie(g)?d.value=g:d.result=g,c(u,d)});function c(u,f){u||!f?o(u):s?s(f):n(void 0,f)}}}processSync(e){let n=!1,r;return this.freeze(),ly("processSync",this.parser||this.Parser),cy("processSync",this.compiler||this.Compiler),this.process(e,i),hT("processSync","process",n),r;function i(s,o){n=!0,iT(s),r=o}}run(e,n,r){dT(e),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=Ld(n);i.run(e,l,c);function c(u,f,d){const h=f||e;u?a(u):o?o(h):r(void 0,h,d)}}}runSync(e,n){let r=!1,i;return this.run(e,n,s),hT("runSync","run",r),i;function s(o,a){iT(o),i=a,r=!0}}stringify(e,n){this.freeze();const r=Ld(n),i=this.compiler||this.Compiler;return cy("stringify",i),dT(e),i(e,r)}use(e,...n){const r=this.attachers,i=this.namespace;if(uy("use",this.frozen),e!=null)if(typeof e=="function")l(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):o(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...f]=c;l(u,f)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(i.settings=iy(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const f=c[u];s(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let f=-1,d=-1;for(;++f<r.length;)if(r[f][0]===c){d=f;break}if(d===-1)r.push([c,...u]);else if(u.length>0){let[h,...g]=u;const m=r[d][1];Mx(m)&&Mx(h)&&(h=iy(!0,m,h)),r[d]=[c,h,...g]}}}}const nie=new p1().freeze();function ly(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function cy(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function uy(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function dT(t){if(!Mx(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function hT(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Ld(t){return rie(t)?t:new lM(t)}function rie(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function iie(t){return typeof t=="string"||sie(t)}function sie(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const oie="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",pT=[],mT={allowDangerousHtml:!0},aie=/^(https?|ircs?|mailto|xmpp)$/i,lie=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function cie(t){const e=uie(t),n=fie(t);return die(e.runSync(e.parse(n),n),t)}function uie(t){const e=t.rehypePlugins||pT,n=t.remarkPlugins||pT,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...mT}:mT;return nie().use(Zne).use(n).use(Lre,r).use(e)}function fie(t){const e=t.children||"",n=new lM;return typeof e=="string"&&(n.value=e),n}function die(t,e){const n=e.allowedElements,r=e.allowElement,i=e.components,s=e.disallowedElements,o=e.skipHtml,a=e.unwrapDisallowed,l=e.urlTransform||hie;for(const u of lie)Object.hasOwn(e,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+oie+u.id,void 0);return e.className&&(t={type:"element",tagName:"div",properties:{className:e.className},children:t.type==="root"?t.children:[t]}),h1(t,c),Eee(t,{Fragment:p.Fragment,components:i,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function c(u,f,d){if(u.type==="raw"&&d&&typeof f=="number")return o?d.children.splice(f,1):d.children[f]={type:"text",value:u.value},f;if(u.type==="element"){let h;for(h in ty)if(Object.hasOwn(ty,h)&&Object.hasOwn(u.properties,h)){const g=u.properties[h],m=ty[h];(m===null||m.includes(u.tagName))&&(u.properties[h]=l(String(g||""),h,u))}}if(u.type==="element"){let h=n?!n.includes(u.tagName):s?s.includes(u.tagName):!1;if(!h&&r&&typeof f=="number"&&(h=!r(u,f,d)),h&&d&&typeof f=="number")return a&&u.children?d.children.splice(f,1,...u.children):d.children.splice(f,1),f}}}function hie(t){const e=t.indexOf(":"),n=t.indexOf("?"),r=t.indexOf("#"),i=t.indexOf("/");return e===-1||i!==-1&&e>i||n!==-1&&e>n||r!==-1&&e>r||aie.test(t.slice(0,e))?t:""}function gT(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function pie(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function mie(t,e,n){const i=bg((n||{}).ignore||[]),s=gie(e);let o=-1;for(;++o<s.length;)oM(t,"text",a);function a(c,u){let f=-1,d;for(;++f<u.length;){const h=u[f],g=d?d.children:void 0;if(i(h,g?g.indexOf(h):void 0,d))return;d=h}if(d)return l(c,u)}function l(c,u){const f=u[u.length-1],d=s[o][0],h=s[o][1];let g=0;const v=f.children.indexOf(c);let y=!1,x=[];d.lastIndex=0;let b=d.exec(c.value);for(;b;){const k=b.index,w={index:b.index,input:b.input,stack:[...u,c]};let S=h(...b,w);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?d.lastIndex=k+1:(g!==k&&x.push({type:"text",value:c.value.slice(g,k)}),Array.isArray(S)?x.push(...S):S&&x.push(S),g=k+b[0].length,y=!0),!d.global)break;b=d.exec(c.value)}return y?(g<c.value.length&&x.push({type:"text",value:c.value.slice(g)}),f.children.splice(v,1,...x)):x=[c],v+x.length}}function gie(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<n.length;){const i=n[r];e.push([Oie(i[0]),yie(i[1])])}return e}function Oie(t){return typeof t=="string"?new RegExp(pie(t),"g"):t}function yie(t){return typeof t=="function"?t:function(){return t}}const fy="phrasing",dy=["autolink","link","image","label"];function vie(){return{transforms:[Pie],enter:{literalAutolink:bie,literalAutolinkEmail:hy,literalAutolinkHttp:hy,literalAutolinkWww:hy},exit:{literalAutolink:Cie,literalAutolinkEmail:kie,literalAutolinkHttp:wie,literalAutolinkWww:Sie}}}function xie(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:fy,notInConstruct:dy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:fy,notInConstruct:dy},{character:":",before:"[ps]",after:"\\/",inConstruct:fy,notInConstruct:dy}]}}function bie(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function hy(t){this.config.enter.autolinkProtocol.call(this,t)}function wie(t){this.config.exit.autolinkProtocol.call(this,t)}function Sie(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function kie(t){this.config.exit.autolinkEmail.call(this,t)}function Cie(t){this.exit(t)}function Pie(t){mie(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Tie],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Eie]],{ignore:["link","linkReference"]})}function Tie(t,e,n,r,i){let s="";if(!cM(i)||(/^w/i.test(e)&&(n=e+n,e="",s="http://"),!Rie(n)))return!1;const o=_ie(n+r);if(!o[0])return!1;const a={type:"link",title:null,url:s+e+o[0],children:[{type:"text",value:e+o[0]}]};return o[1]?[a,{type:"text",value:o[1]}]:a}function Eie(t,e,n,r){return!cM(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function Rie(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function _ie(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],r=n.indexOf(")");const i=gT(t,"(");let s=gT(t,")");for(;r!==-1&&i>s;)t+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[t,n]}function cM(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||ea(n)||yg(n))&&(!e||n!==47)}uM.peek=Lie;function $ie(){this.buffer()}function Aie(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Qie(){this.buffer()}function Iie(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Nie(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zr(this.sliceSerialize(t)).toLowerCase(),n.label=e}function jie(t){this.exit(t)}function Mie(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zr(this.sliceSerialize(t)).toLowerCase(),n.label=e}function Die(t){this.exit(t)}function Lie(){return"["}function uM(t,e,n,r){const i=n.createTracker(r);let s=i.move("[^");const o=n.enter("footnoteReference"),a=n.enter("reference");return s+=i.move(n.safe(n.associationId(t),{after:"]",before:s})),a(),o(),s+=i.move("]"),s}function zie(){return{enter:{gfmFootnoteCallString:$ie,gfmFootnoteCall:Aie,gfmFootnoteDefinitionLabelString:Qie,gfmFootnoteDefinition:Iie},exit:{gfmFootnoteCallString:Nie,gfmFootnoteCall:jie,gfmFootnoteDefinitionLabelString:Mie,gfmFootnoteDefinition:Die}}}function Bie(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:n,footnoteReference:uM},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,o){const a=s.createTracker(o);let l=a.move("[^");const c=s.enter("footnoteDefinition"),u=s.enter("label");return l+=a.move(s.safe(s.associationId(r),{before:l,after:"]"})),u(),l+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),l+=a.move((e?`
|
|
462
|
+
`:" ")+s.indentLines(s.containerFlow(r,a.current()),e?fM:Vie))),c(),l}}function Vie(t,e,n){return e===0?t:fM(t,e,n)}function fM(t,e,n){return(n?"":" ")+t}const Fie=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];dM.peek=Yie;function Xie(){return{canContainEols:["delete"],enter:{strikethrough:Wie},exit:{strikethrough:qie}}}function Zie(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Fie}],handlers:{delete:dM}}}function Wie(t){this.enter({type:"delete",children:[]},t)}function qie(t){this.exit(t)}function dM(t,e,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(t,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),s(),o}function Yie(){return"~"}function Uie(t){return t.length}function Hie(t,e){const n=e||{},r=(n.align||[]).concat(),i=n.stringLength||Uie,s=[],o=[],a=[],l=[];let c=0,u=-1;for(;++u<t.length;){const m=[],v=[];let y=-1;for(t[u].length>c&&(c=t[u].length);++y<t[u].length;){const x=Gie(t[u][y]);if(n.alignDelimiters!==!1){const b=i(x);v[y]=b,(l[y]===void 0||b>l[y])&&(l[y]=b)}m.push(x)}o[u]=m,a[u]=v}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)s[f]=OT(r[f]);else{const m=OT(r);for(;++f<c;)s[f]=m}f=-1;const d=[],h=[];for(;++f<c;){const m=s[f];let v="",y="";m===99?(v=":",y=":"):m===108?v=":":m===114&&(y=":");let x=n.alignDelimiters===!1?1:Math.max(1,l[f]-v.length-y.length);const b=v+"-".repeat(x)+y;n.alignDelimiters!==!1&&(x=v.length+x+y.length,x>l[f]&&(l[f]=x),h[f]=x),d[f]=b}o.splice(1,0,d),a.splice(1,0,h),u=-1;const g=[];for(;++u<o.length;){const m=o[u],v=a[u];f=-1;const y=[];for(;++f<c;){const x=m[f]||"";let b="",k="";if(n.alignDelimiters!==!1){const w=l[f]-(v[f]||0),S=s[f];S===114?b=" ".repeat(w):S===99?w%2?(b=" ".repeat(w/2+.5),k=" ".repeat(w/2-.5)):(b=" ".repeat(w/2),k=b):k=" ".repeat(w)}n.delimiterStart!==!1&&!f&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&x==="")&&(n.delimiterStart!==!1||f)&&y.push(" "),n.alignDelimiters!==!1&&y.push(b),y.push(x),n.alignDelimiters!==!1&&y.push(k),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&y.push("|")}g.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return g.join(`
|
|
463
|
+
`)}function Gie(t){return t==null?"":String(t)}function OT(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function Kie(t,e,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(t,s.current()),Jie);return i(),o}function Jie(t,e,n){return">"+(n?"":" ")+t}function ese(t,e){return yT(t,e.inConstruct,!0)&&!yT(t,e.notInConstruct,!1)}function yT(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let r=-1;for(;++r<e.length;)if(t.includes(e[r]))return!0;return!1}function vT(t,e,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
464
|
+
`&&ese(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
465
|
+
`}function tse(t,e){const n=String(t);let r=n.indexOf(e),i=r,s=0,o=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>o&&(o=s):s=1,i=r+e.length,r=n.indexOf(e,i);return o}function nse(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function rse(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function ise(t,e,n,r){const i=rse(n),s=t.value||"",o=i==="`"?"GraveAccent":"Tilde";if(nse(t,n)){const f=n.enter("codeIndented"),d=n.indentLines(s,sse);return f(),d}const a=n.createTracker(r),l=i.repeat(Math.max(tse(s,i)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(t.lang){const f=n.enter(`codeFencedLang${o}`);u+=a.move(n.safe(t.lang,{before:u,after:" ",encode:["`"],...a.current()})),f()}if(t.lang&&t.meta){const f=n.enter(`codeFencedMeta${o}`);u+=a.move(" "),u+=a.move(n.safe(t.meta,{before:u,after:`
|
|
466
|
+
`,encode:["`"],...a.current()})),f()}return u+=a.move(`
|
|
467
|
+
`),s&&(u+=a.move(s+`
|
|
468
|
+
`)),u+=a.move(l),c(),u}function sse(t,e,n){return(n?"":" ")+t}function m1(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function ose(t,e,n,r){const i=m1(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(t),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(t.url,{before:c,after:t.title?" ":`
|
|
469
|
+
`,...l.current()}))),a(),t.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(t.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),o(),c}function ase(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function tf(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Wp(t,e,n){const r=Ql(t),i=Ql(e);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}hM.peek=lse;function hM(t,e,n,r){const i=ase(n),s=n.enter("emphasis"),o=n.createTracker(r),a=o.move(i);let l=o.move(n.containerPhrasing(t,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Wp(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=tf(c)+l.slice(1));const f=l.charCodeAt(l.length-1),d=Wp(r.after.charCodeAt(0),f,i);d.inside&&(l=l.slice(0,-1)+tf(f));const h=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},a+l+h}function lse(t,e,n){return n.options.emphasis||"*"}function cse(t,e){let n=!1;return h1(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Nx}),!!((!t.depth||t.depth<3)&&o1(t)&&(e.options.setext||n))}function use(t,e,n,r){const i=Math.max(Math.min(6,t.depth||1),1),s=n.createTracker(r);if(cse(t,n)){const u=n.enter("headingSetext"),f=n.enter("phrasing"),d=n.containerPhrasing(t,{...s.current(),before:`
|
|
470
|
+
`,after:`
|
|
471
|
+
`});return f(),u(),d+`
|
|
472
|
+
`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
473
|
+
`))+1))}const o="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");s.move(o+" ");let c=n.containerPhrasing(t,{before:"# ",after:`
|
|
474
|
+
`,...s.current()});return/^[\t ]/.test(c)&&(c=tf(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),a(),c}pM.peek=fse;function pM(t){return t.value||""}function fse(){return"<"}mM.peek=dse;function mM(t,e,n,r){const i=m1(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(t.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(t.url,{before:c,after:t.title?" ":")",...l.current()}))),a(),t.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(t.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),c+=l.move(")"),o(),c}function dse(){return"!"}gM.peek=hse;function gM(t,e,n,r){const i=t.referenceType,s=n.enter("imageReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const c=n.safe(t.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==f?l+=a.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function hse(){return"!"}OM.peek=pse;function OM(t,e,n){let r=t.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const o=n.unsafe[s],a=n.compilePattern(o);let l;if(o.atBreak)for(;l=a.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function pse(){return"`"}function yM(t,e){const n=o1(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}vM.peek=mse;function vM(t,e,n,r){const i=m1(n),s=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let a,l;if(yM(t,n)){const u=n.stack;n.stack=[],a=n.enter("autolink");let f=o.move("<");return f+=o.move(n.containerPhrasing(t,{before:f,after:">",...o.current()})),f+=o.move(">"),a(),n.stack=u,f}a=n.enter("link"),l=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(t,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(t.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=n.enter("destinationRaw"),c+=o.move(n.safe(t.url,{before:c,after:t.title?" ":")",...o.current()}))),l(),t.title&&(l=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(t.title,{before:c,after:i,...o.current()})),c+=o.move(i),l()),c+=o.move(")"),a(),c}function mse(t,e,n){return yM(t,n)?"<":"["}xM.peek=gse;function xM(t,e,n,r){const i=t.referenceType,s=n.enter("linkReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const c=n.containerPhrasing(t,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==f?l+=a.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function gse(){return"["}function g1(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function Ose(t){const e=g1(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function yse(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function bM(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function vse(t,e,n,r){const i=n.enter("list"),s=n.bulletCurrent;let o=t.ordered?yse(n):g1(n);const a=t.ordered?o==="."?")":".":Ose(n);let l=e&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!t.ordered){const u=t.children?t.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),bM(n)===o&&u){let f=-1;for(;++f<t.children.length;){const d=t.children[f];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=a),n.bulletCurrent=o;const c=n.containerFlow(t,r);return n.bulletLastUsed=o,n.bulletCurrent=s,i(),c}function xse(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function bse(t,e,n,r){const i=xse(n);let s=n.bulletCurrent||g1(n);e&&e.type==="list"&&e.ordered&&(s=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+s);let o=s.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(o=Math.ceil(o/4)*4);const a=n.createTracker(r);a.move(s+" ".repeat(o-s.length)),a.shift(o);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(t,a.current()),u);return l(),c;function u(f,d,h){return d?(h?"":" ".repeat(o))+f:(h?s:s+" ".repeat(o-s.length))+f}}function wse(t,e,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(t,r);return s(),i(),o}const Sse=bg(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function kse(t,e,n,r){return(t.children.some(function(o){return Sse(o)})?n.containerPhrasing:n.containerFlow).call(n,t,r)}function Cse(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}wM.peek=Pse;function wM(t,e,n,r){const i=Cse(n),s=n.enter("strong"),o=n.createTracker(r),a=o.move(i+i);let l=o.move(n.containerPhrasing(t,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Wp(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=tf(c)+l.slice(1));const f=l.charCodeAt(l.length-1),d=Wp(r.after.charCodeAt(0),f,i);d.inside&&(l=l.slice(0,-1)+tf(f));const h=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},a+l+h}function Pse(t,e,n){return n.options.strong||"*"}function Tse(t,e,n,r){return n.safe(t.value,r)}function Ese(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function Rse(t,e,n){const r=(bM(n)+(n.options.ruleSpaces?" ":"")).repeat(Ese(n));return n.options.ruleSpaces?r.slice(0,-1):r}const SM={blockquote:Kie,break:vT,code:ise,definition:ose,emphasis:hM,hardBreak:vT,heading:use,html:pM,image:mM,imageReference:gM,inlineCode:OM,link:vM,linkReference:xM,list:vse,listItem:bse,paragraph:wse,root:kse,strong:wM,text:Tse,thematicBreak:Rse};function _se(){return{enter:{table:$se,tableData:xT,tableHeader:xT,tableRow:Qse},exit:{codeText:Ise,table:Ase,tableData:py,tableHeader:py,tableRow:py}}}function $se(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function Ase(t){this.exit(t),this.data.inTable=void 0}function Qse(t){this.enter({type:"tableRow",children:[]},t)}function py(t){this.exit(t)}function xT(t){this.enter({type:"tableCell",children:[]},t)}function Ise(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,Nse));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function Nse(t,e){return e==="|"?e:t}function jse(t){const e=t||{},n=e.tableCellPadding,r=e.tablePipeAlign,i=e.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
475
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:o,tableCell:l,tableRow:a}};function o(h,g,m,v){return c(u(h,m,v),h.align)}function a(h,g,m,v){const y=f(h,m,v),x=c([y]);return x.slice(0,x.indexOf(`
|
|
476
|
+
`))}function l(h,g,m,v){const y=m.enter("tableCell"),x=m.enter("phrasing"),b=m.containerPhrasing(h,{...v,before:s,after:s});return x(),y(),b}function c(h,g){return Hie(h,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function u(h,g,m){const v=h.children;let y=-1;const x=[],b=g.enter("table");for(;++y<v.length;)x[y]=f(v[y],g,m);return b(),x}function f(h,g,m){const v=h.children;let y=-1;const x=[],b=g.enter("tableRow");for(;++y<v.length;)x[y]=l(v[y],h,g,m);return b(),x}function d(h,g,m){let v=SM.inlineCode(h,g,m);return m.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function Mse(){return{exit:{taskListCheckValueChecked:bT,taskListCheckValueUnchecked:bT,paragraph:Lse}}}function Dse(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:zse}}}function bT(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function Lse(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=e.children;let s=-1,o;for(;++s<i.length;){const a=i[s];if(a.type==="paragraph"){o=a;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function zse(t,e,n,r){const i=t.children[0],s=typeof t.checked=="boolean"&&i&&i.type==="paragraph",o="["+(t.checked?"x":" ")+"] ",a=n.createTracker(r);s&&a.move(o);let l=SM.listItem(t,e,n,{...r,...a.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+o}}function Bse(){return[vie(),zie(),Xie(),_se(),Mse()]}function Vse(t){return{extensions:[xie(),Bie(t),Zie(),jse(t),Dse()]}}const Fse={tokenize:Use,partial:!0},kM={tokenize:Hse,partial:!0},CM={tokenize:Gse,partial:!0},PM={tokenize:Kse,partial:!0},Xse={tokenize:Jse,partial:!0},TM={name:"wwwAutolink",tokenize:qse,previous:RM},EM={name:"protocolAutolink",tokenize:Yse,previous:_M},ss={name:"emailAutolink",tokenize:Wse,previous:$M},Ei={};function Zse(){return{text:Ei}}let Oo=48;for(;Oo<123;)Ei[Oo]=ss,Oo++,Oo===58?Oo=65:Oo===91&&(Oo=97);Ei[43]=ss;Ei[45]=ss;Ei[46]=ss;Ei[95]=ss;Ei[72]=[ss,EM];Ei[104]=[ss,EM];Ei[87]=[ss,TM];Ei[119]=[ss,TM];function Wse(t,e,n){const r=this;let i,s;return o;function o(f){return!Lx(f)||!$M.call(r,r.previous)||O1(r.events)?n(f):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(f))}function a(f){return Lx(f)?(t.consume(f),a):f===64?(t.consume(f),l):n(f)}function l(f){return f===46?t.check(Xse,u,c)(f):f===45||f===95||qt(f)?(s=!0,t.consume(f),l):u(f)}function c(f){return t.consume(f),i=!0,l}function u(f){return s&&i&&tn(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(f)):n(f)}}function qse(t,e,n){const r=this;return i;function i(o){return o!==87&&o!==119||!RM.call(r,r.previous)||O1(r.events)?n(o):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(Fse,t.attempt(kM,t.attempt(CM,s),n),n)(o))}function s(o){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(o)}}function Yse(t,e,n){const r=this;let i="",s=!1;return o;function o(f){return(f===72||f===104)&&_M.call(r,r.previous)&&!O1(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),t.consume(f),a):n(f)}function a(f){if(tn(f)&&i.length<5)return i+=String.fromCodePoint(f),t.consume(f),a;if(f===58){const d=i.toLowerCase();if(d==="http"||d==="https")return t.consume(f),l}return n(f)}function l(f){return f===47?(t.consume(f),s?c:(s=!0,l)):n(f)}function c(f){return f===null||Fp(f)||Ue(f)||ea(f)||yg(f)?n(f):t.attempt(kM,t.attempt(CM,u),n)(f)}function u(f){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(f)}}function Use(t,e,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,t.consume(o),i):o===46&&r===3?(t.consume(o),s):n(o)}function s(o){return o===null?n(o):e(o)}}function Hse(t,e,n){let r,i,s;return o;function o(c){return c===46||c===95?t.check(PM,l,a)(c):c===null||Ue(c)||ea(c)||c!==45&&yg(c)?l(c):(s=!0,t.consume(c),o)}function a(c){return c===95?r=!0:(i=r,r=void 0),t.consume(c),o}function l(c){return i||r||!s?n(c):e(c)}}function Gse(t,e){let n=0,r=0;return i;function i(o){return o===40?(n++,t.consume(o),i):o===41&&r<n?s(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?t.check(PM,e,s)(o):o===null||Ue(o)||ea(o)?e(o):(t.consume(o),i)}function s(o){return o===41&&r++,t.consume(o),i}}function Kse(t,e,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(t.consume(a),r):a===38?(t.consume(a),s):a===93?(t.consume(a),i):a===60||a===null||Ue(a)||ea(a)?e(a):n(a)}function i(a){return a===null||a===40||a===91||Ue(a)||ea(a)?e(a):r(a)}function s(a){return tn(a)?o(a):n(a)}function o(a){return a===59?(t.consume(a),r):tn(a)?(t.consume(a),o):n(a)}}function Jse(t,e,n){return r;function r(s){return t.consume(s),i}function i(s){return qt(s)?n(s):e(s)}}function RM(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Ue(t)}function _M(t){return!tn(t)}function $M(t){return!(t===47||Lx(t))}function Lx(t){return t===43||t===45||t===46||t===95||qt(t)}function O1(t){let e=t.length,n=!1;for(;e--;){const r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const eoe={tokenize:loe,partial:!0};function toe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:soe,continuation:{tokenize:ooe},exit:aoe}},text:{91:{name:"gfmFootnoteCall",tokenize:ioe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:noe,resolveTo:roe}}}}function noe(t,e,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!o||!o._balanced)return n(l);const c=zr(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function roe(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",s,e],["enter",o,e],["exit",o,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...a),t}function ioe(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return a;function a(f){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(t.enter("gfmFootnoteCallMarker"),t.consume(f),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",c)}function c(f){if(s>999||f===93&&!o||f===null||f===91||Ue(f))return n(f);if(f===93){t.exit("chunkString");const d=t.exit("gfmFootnoteCallString");return i.includes(zr(r.sliceSerialize(d)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(f)}return Ue(f)||(o=!0),s++,t.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(t.consume(f),s++,c):c(f)}}function soe(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,a;return l;function l(g){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):n(g)}function u(g){if(o>999||g===93&&!a||g===null||g===91||Ue(g))return n(g);if(g===93){t.exit("chunkString");const m=t.exit("gfmFootnoteDefinitionLabelString");return s=zr(r.sliceSerialize(m)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),d}return Ue(g)||(a=!0),o++,t.consume(g),g===92?f:u}function f(g){return g===91||g===92||g===93?(t.consume(g),o++,u):u(g)}function d(g){return g===58?(t.enter("definitionMarker"),t.consume(g),t.exit("definitionMarker"),i.includes(s)||i.push(s),De(t,h,"gfmFootnoteDefinitionWhitespace")):n(g)}function h(g){return e(g)}}function ooe(t,e,n){return t.check(Hf,e,t.attempt(eoe,e,n))}function aoe(t){t.exit("gfmFootnoteDefinition")}function loe(t,e,n){const r=this;return De(t,i,"gfmFootnoteDefinitionIndent",5);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?e(s):n(s)}}function coe(t){let n=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,a){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},f={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},d=[["enter",u,a],["enter",o[c][1],a],["exit",o[c][1],a],["enter",f,a]],h=a.parser.constructs.insideSpan.null;h&&qn(d,d.length,0,vg(h,o.slice(c+1,l),a)),qn(d,d.length,0,[["exit",f,a],["enter",o[l][1],a],["exit",o[l][1],a],["exit",u,a]]),qn(o,c-1,l-c+3,d),l=c+d.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function s(o,a,l){const c=this.previous,u=this.events;let f=0;return d;function d(g){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(g):(o.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const m=Ql(c);if(g===126)return f>1?l(g):(o.consume(g),f++,h);if(f<2&&!n)return l(g);const v=o.exit("strikethroughSequenceTemporary"),y=Ql(g);return v._open=!y||y===2&&!!m,v._close=!m||m===2&&!!y,a(g)}}}class uoe{constructor(){this.map=[]}add(e,n,r){foe(this,e,n,r)}consume(e){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];r.push(e.slice()),e.length=0;let i=r.pop();for(;i;){for(const s of i)e.push(s);i=r.pop()}this.map.length=0}}function foe(t,e,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...r);return}i+=1}t.map.push([e,n,r])}}function doe(t,e){let n=!1;const r=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}function hoe(){return{flow:{null:{name:"table",tokenize:poe,resolveAll:moe}}}}function poe(t,e,n){const r=this;let i=0,s=0,o;return a;function a(E){let j=r.events.length-1;for(;j>-1;){const z=r.events[j][1].type;if(z==="lineEnding"||z==="linePrefix")j--;else break}const A=j>-1?r.events[j][1].type:null,L=A==="tableHead"||A==="tableRow"?S:l;return L===S&&r.parser.lazy[r.now().line]?n(E):L(E)}function l(E){return t.enter("tableHead"),t.enter("tableRow"),c(E)}function c(E){return E===124||(o=!0,s+=1),u(E)}function u(E){return E===null?n(E):ge(E)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),h):n(E):Ie(E)?De(t,u,"whitespace")(E):(s+=1,o&&(o=!1,i+=1),E===124?(t.enter("tableCellDivider"),t.consume(E),t.exit("tableCellDivider"),o=!0,u):(t.enter("data"),f(E)))}function f(E){return E===null||E===124||Ue(E)?(t.exit("data"),u(E)):(t.consume(E),E===92?d:f)}function d(E){return E===92||E===124?(t.consume(E),f):f(E)}function h(E){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(E):(t.enter("tableDelimiterRow"),o=!1,Ie(E)?De(t,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):g(E))}function g(E){return E===45||E===58?v(E):E===124?(o=!0,t.enter("tableCellDivider"),t.consume(E),t.exit("tableCellDivider"),m):w(E)}function m(E){return Ie(E)?De(t,v,"whitespace")(E):v(E)}function v(E){return E===58?(s+=1,o=!0,t.enter("tableDelimiterMarker"),t.consume(E),t.exit("tableDelimiterMarker"),y):E===45?(s+=1,y(E)):E===null||ge(E)?k(E):w(E)}function y(E){return E===45?(t.enter("tableDelimiterFiller"),x(E)):w(E)}function x(E){return E===45?(t.consume(E),x):E===58?(o=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(E),t.exit("tableDelimiterMarker"),b):(t.exit("tableDelimiterFiller"),b(E))}function b(E){return Ie(E)?De(t,k,"whitespace")(E):k(E)}function k(E){return E===124?g(E):E===null||ge(E)?!o||i!==s?w(E):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(E)):w(E)}function w(E){return n(E)}function S(E){return t.enter("tableRow"),C(E)}function C(E){return E===124?(t.enter("tableCellDivider"),t.consume(E),t.exit("tableCellDivider"),C):E===null||ge(E)?(t.exit("tableRow"),e(E)):Ie(E)?De(t,C,"whitespace")(E):(t.enter("data"),_(E))}function _(E){return E===null||E===124||Ue(E)?(t.exit("data"),C(E)):(t.consume(E),E===92?I:_)}function I(E){return E===92||E===124?(t.consume(E),_):_(E)}}function moe(t,e){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,c,u,f;const d=new uoe;for(;++n<t.length;){const h=t[n],g=h[1];h[0]==="enter"?g.type==="tableHead"?(a=!1,l!==0&&(wT(d,e,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},d.add(n,0,[["enter",c,e]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,f=void 0,s=[0,0,0,0],o=[0,n+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},d.add(n,0,[["enter",u,e]])),i=g.type==="tableDelimiterRow"?2:u?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],f=zd(d,e,s,i,void 0,f),s=[0,0,0,0]),o[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],f=zd(d,e,s,i,void 0,f)),s=o,o=[s[1],n,0,0])):g.type==="tableHead"?(a=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,s[1]!==0?(o[0]=o[1],f=zd(d,e,s,i,n,f)):o[1]!==0&&(f=zd(d,e,o,i,n,f)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&wT(d,e,l,c,u),d.consume(e.events),n=-1;++n<e.events.length;){const h=e.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=doe(e.events,n))}return t}function zd(t,e,n,r,i,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(s.end=Object.assign({},$a(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const l=$a(e.events,n[1]);if(s={type:o,start:Object.assign({},l),end:Object.assign({},l)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const c=$a(e.events,n[2]),u=$a(e.events,n[3]),f={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(t.add(n[2],0,[["enter",f,e]]),r!==2){const d=e.events[n[2]],h=e.events[n[3]];if(d[1].end=Object.assign({},h[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,m=n[3]-n[2]-1;t.add(g,m,[])}}t.add(n[3]+1,0,[["exit",f,e]])}return i!==void 0&&(s.end=Object.assign({},$a(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}function wT(t,e,n,r,i){const s=[],o=$a(e.events,n);i&&(i.end=Object.assign({},o),s.push(["exit",i,e])),r.end=Object.assign({},o),s.push(["exit",r,e]),t.add(n+1,0,s)}function $a(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const goe={name:"tasklistCheck",tokenize:yoe};function Ooe(){return{text:{91:goe}}}function yoe(t,e,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),s)}function s(l){return Ue(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):n(l)}function a(l){return ge(l)?e(l):Ie(l)?t.check({tokenize:voe},e,n)(l):n(l)}}function voe(t,e,n){return De(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function xoe(t){return Bj([Zse(),toe(),coe(t),hoe(),Ooe()])}const boe={};function woe(t){const e=this,n=t||boe,r=e.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(xoe(n)),s.push(Bse()),o.push(Vse(n))}let zx=[],AM=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?AM:zx).push(n=n+t[e])})();function Soe(t){if(t<768)return!1;for(let e=0,n=zx.length;;){let r=e+n>>1;if(t<zx[r])n=r;else if(t>=AM[r])e=r+1;else return!0;if(e==n)return!1}}function ST(t){return t>=127462&&t<=127487}const kT=8205;function koe(t,e,n=!0,r=!0){return(n?QM:Coe)(t,e,r)}function QM(t,e,n){if(e==t.length)return e;e&&IM(t.charCodeAt(e))&&NM(t.charCodeAt(e-1))&&e--;let r=my(t,e);for(e+=CT(r);e<t.length;){let i=my(t,e);if(r==kT||i==kT||n&&Soe(i))e+=CT(i),r=i;else if(ST(i)){let s=0,o=e-2;for(;o>=0&&ST(my(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function Coe(t,e,n){for(;e>0;){let r=QM(t,e-2,n);if(r<e)return r;e--}return 0}function my(t,e){let n=t.charCodeAt(e);if(!NM(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return IM(r)?(n-55296<<10)+(r-56320)+65536:n}function IM(t){return t>=56320&&t<57344}function NM(t){return t>=55296&&t<56320}function CT(t){return t<65536?1:2}class Le{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Il(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),di.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Il(this,e,n);let r=[];return this.decompose(e,n,r,0),di.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Ou(this),s=new Ou(e);for(let o=n,a=n;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new Ou(this,e)}iterRange(e,n=this.length){return new jM(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new MM(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Le.empty:e.length<=32?new ft(e):di.from(ft.split(e,[]))}}class ft extends Le{constructor(e,n=Poe(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.text[s],a=i+o.length;if((n?r:a)>=e)return new Toe(i,a,r,o);i=a+1,r++}}decompose(e,n,r,i){let s=e<=0&&n>=this.length?this:new ft(PT(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),a=zh(s.text,o.text.slice(),0,s.length);if(a.length<=32)r.push(new ft(a,o.length+s.length));else{let l=a.length>>1;r.push(new ft(a.slice(0,l)),new ft(a.slice(l)))}}else r.push(s)}replace(e,n,r){if(!(r instanceof ft))return super.replace(e,n,r);[e,n]=Il(this,e,n);let i=zh(this.text,zh(r.text,PT(this.text,0,e)),n),s=this.length+r.length-(n-e);return i.length<=32?new ft(i,s):di.from(ft.split(i,[]),s)}sliceString(e,n=this.length,r=`
|
|
477
|
+
`){[e,n]=Il(this,e,n);let i="";for(let s=0,o=0;s<=n&&o<this.text.length;o++){let a=this.text[o],l=s+a.length;s>e&&o&&(i+=r),e<l&&n>s&&(i+=a.slice(Math.max(0,e-s),n-s)),s=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(n.push(new ft(r,i)),r=[],i=-1);return i>-1&&n.push(new ft(r,i)),n}}class di extends Le{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let s=0;;s++){let o=this.children[s],a=i+o.length,l=r+o.lines-1;if((n?l:a)>=e)return o.lineInner(e,n,r,i);i=a+1,r=l+1}}decompose(e,n,r,i){for(let s=0,o=0;o<=n&&s<this.children.length;s++){let a=this.children[s],l=o+a.length;if(e<=l&&n>=o){let c=i&((o<=e?1:0)|(l>=n?2:0));o>=e&&l<=n&&!c?r.push(a):a.decompose(e-o,n-o,r,c)}o=l+1}}replace(e,n,r){if([e,n]=Il(this,e,n),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],a=s+o.length;if(e>=s&&n<=a){let l=o.replace(e-s,n-s,r),c=this.lines-o.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let u=this.children.slice();return u[i]=l,new di(u,this.length-(n-e)+r.length)}return super.replace(s,a,l)}s=a+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
|
|
478
|
+
`){[e,n]=Il(this,e,n);let i="";for(let s=0,o=0;s<this.children.length&&o<=n;s++){let a=this.children[s],l=o+a.length;o>e&&s&&(i+=r),e<l&&n>o&&(i+=a.sliceString(e-o,n-o,r)),o=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof di))return 0;let r=0,[i,s,o,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,s+=n){if(i==o||s==a)return r;let l=this.children[i],c=e.children[s];if(l!=c)return r+l.scanIdentical(c,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let g of e)g.flatten(h);return new ft(h,n)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,a=[],l=0,c=-1,u=[];function f(h){let g;if(h.lines>s&&h instanceof di)for(let m of h.children)f(m);else h.lines>o&&(l>o||!l)?(d(),a.push(h)):h instanceof ft&&l&&(g=u[u.length-1])instanceof ft&&h.lines+g.lines<=32?(l+=h.lines,c+=h.length+1,u[u.length-1]=new ft(g.text.concat(h.text),g.length+1+h.length)):(l+h.lines>i&&d(),l+=h.lines,c+=h.length+1,u.push(h))}function d(){l!=0&&(a.push(u.length==1?u[0]:di.from(u,c)),c=-1,l=u.length=0)}for(let h of e)f(h);return d(),a.length==1?a[0]:new di(a,n)}}Le.empty=new ft([""],0);function Poe(t){let e=-1;for(let n of t)e+=n.length+1;return e}function zh(t,e,n=0,r=1e9){for(let i=0,s=0,o=!0;s<t.length&&i<=r;s++){let a=t[s],l=i+a.length;l>=n&&(l>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),o?(e[e.length-1]+=a,o=!1):e.push(a)),i=l+1}return e}function PT(t,e,n){return zh(t,[""],e,n)}class Ou{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof ft?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,a=i instanceof ft?i.text.length:i.children.length;if(o==(n>0?a:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
|
|
479
|
+
`,this;e--}else if(i instanceof ft){let l=i.text[o+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[o+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof ft?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class jM{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Ou(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class MM{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Le.prototype[Symbol.iterator]=function(){return this.iter()},Ou.prototype[Symbol.iterator]=jM.prototype[Symbol.iterator]=MM.prototype[Symbol.iterator]=function(){return this});let Toe=class{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}};function Il(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Et(t,e,n=!0,r=!0){return koe(t,e,n,r)}function Eoe(t){return t>=56320&&t<57344}function Roe(t){return t>=55296&&t<56320}function hn(t,e){let n=t.charCodeAt(e);if(!Roe(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return Eoe(r)?(n-55296<<10)+(r-56320)+65536:n}function y1(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function hi(t){return t<65536?1:2}const Bx=/\r\n?|\n/;var jt=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(jt||(jt={}));class Si{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let s=this.sections[n++],o=this.sections[n++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,n=!1){Vx(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new Si(e)}composeDesc(e){return this.empty?e:e.empty?this:DM(this,e)}mapDesc(e,n=!1){return e.empty?this:Fx(this,e,n)}mapPos(e,n=-1,r=jt.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],l=this.sections[o++],c=i+a;if(l<0){if(c>e)return s+(e-i);s+=a}else{if(r!=jt.Simple&&c>=e&&(r==jt.TrackDel&&i<e&&c>e||r==jt.TrackBefore&&i<e||r==jt.TrackAfter&&c>e))return null;if(c>e||c==e&&n<0&&!a)return e==i||n<0?s:s+l;s+=l}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let s=this.sections[r++],o=this.sections[r++],a=i+s;if(o>=0&&i<=n&&a>=e)return i<e&&a>n?"cover":!0;i=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Si(e)}static create(e){return new Si(e)}}class wt extends Si{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Vx(this,(n,r,i,s,o)=>e=e.replace(i,i+(r-n),o),!1),e}mapDesc(e,n=!1){return Fx(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,s=0;i<n.length;i+=2){let o=n[i],a=n[i+1];if(a>=0){n[i]=a,n[i+1]=o;let l=i>>1;for(;r.length<l;)r.push(Le.empty);r.push(o?e.slice(s,s+o):Le.empty)}s+=o}return new wt(n,r)}compose(e){return this.empty?e:e.empty?this:DM(this,e,!0)}map(e,n=!1){return e.empty?this:Fx(this,e,n,!0)}iterChanges(e,n=!1){Vx(this,e,n)}get desc(){return Si.create(this.sections)}filter(e){let n=[],r=[],i=[],s=new nf(this);e:for(let o=0,a=0;;){let l=o==e.length?1e9:e[o++];for(;a<l||a==l&&s.len==0;){if(s.done)break e;let u=Math.min(s.len,l-a);Xt(i,u,-1);let f=s.ins==-1?-1:s.off==0?s.ins:0;Xt(n,u,f),f>0&&$s(r,n,s.text),s.forward(u),a+=u}let c=e[o++];for(;a<c;){if(s.done)break e;let u=Math.min(s.len,c-a);Xt(n,u,-1),Xt(i,u,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(u),a+=u}}return{changes:new wt(n,r),filtered:Si.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],s=[],o=0,a=null;function l(u=!1){if(!u&&!i.length)return;o<n&&Xt(i,n-o,-1);let f=new wt(i,s);a=a?a.compose(f.map(a)):f,i=[],s=[],o=0}function c(u){if(Array.isArray(u))for(let f of u)c(f);else if(u instanceof wt){if(u.length!=n)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${n})`);l(),a=a?a.compose(u.map(a)):u}else{let{from:f,to:d=f,insert:h}=u;if(f>d||f<0||d>n)throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);let g=h?typeof h=="string"?Le.of(h.split(r||Bx)):h:Le.empty,m=g.length;if(f==d&&m==0)return;f<o&&l(),f>o&&Xt(i,f-o,-1),Xt(i,d-f,m),$s(s,i,g),o=d}}return c(e),l(!a),a}static empty(e){return new wt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")n.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;r.length<i;)r.push(Le.empty);r[i]=Le.of(s.slice(1)),n.push(s[0],r[i].length)}}}return new wt(n,r)}static createSet(e,n){return new wt(e,n)}}function Xt(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function $s(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(Le.empty);t.push(n)}}function Vx(t,e,n){let r=t.inserted;for(let i=0,s=0,o=0;o<t.sections.length;){let a=t.sections[o++],l=t.sections[o++];if(l<0)i+=a,s+=a;else{let c=i,u=s,f=Le.empty;for(;c+=a,u+=l,l&&r&&(f=f.append(r[o-2>>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(i,c,s,u,f),i=c,s=u}}}function Fx(t,e,n,r=!1){let i=[],s=r?[]:null,o=new nf(t),a=new nf(e);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let c=Math.min(o.len,a.len);Xt(i,c,-1),o.forward(c),a.forward(c)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!n))){let c=a.len;for(Xt(i,a.ins,-1);c;){let u=Math.min(o.len,c);o.ins>=0&&l<o.i&&o.len<=u&&(Xt(i,0,o.ins),s&&$s(s,i,o.text),l=o.i),o.forward(u),c-=u}a.next()}else if(o.ins>=0){let c=0,u=o.len;for(;u;)if(a.ins==-1){let f=Math.min(u,a.len);c+=f,u-=f,a.forward(f)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;Xt(i,c,l<o.i?o.ins:0),s&&l<o.i&&$s(s,i,o.text),l=o.i,o.forward(o.len-u)}else{if(o.done&&a.done)return s?wt.createSet(i,s):Si.create(i);throw new Error("Mismatched change set lengths")}}}function DM(t,e,n=!1){let r=[],i=n?[]:null,s=new nf(t),o=new nf(e);for(let a=!1;;){if(s.done&&o.done)return i?wt.createSet(r,i):Si.create(r);if(s.ins==0)Xt(r,s.len,0,a),s.next();else if(o.len==0&&!o.done)Xt(r,0,o.ins,a),i&&$s(i,r,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let l=Math.min(s.len2,o.len),c=r.length;if(s.ins==-1){let u=o.ins==-1?-1:o.off?0:o.ins;Xt(r,l,u,a),i&&u&&$s(i,r,o.text)}else o.ins==-1?(Xt(r,s.off?0:s.len,l,a),i&&$s(i,r,s.textBit(l))):(Xt(r,s.off?0:s.len,o.off?0:o.ins,a),i&&!o.off&&$s(i,r,o.text));a=(s.ins>l||o.ins>=0&&o.len>l)&&(a||r.length>c),s.forward2(l),o.forward(l)}}}}class nf{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?Le.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Le.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Io{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new Io(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return Z.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Z.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Z.range(e.anchor,e.head)}static create(e,n,r){return new Io(e,n,r)}}class Z{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Z.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Z([this.main],0)}addRange(e,n=!0){return Z.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,Z.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Z(e.ranges.map(n=>Io.fromJSON(n)),e.main)}static single(e,n=e){return new Z([Z.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=r:s.from<r)return Z.normalized(e.slice(),n);r=s.to}return new Z(e,n)}static cursor(e,n=0,r,i){return Io.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let s=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?Io.create(n,e,48|s):Io.create(e,n,(n>e?8:0)|s)}static normalized(e,n=0){let r=e[n];e.sort((i,s)=>i.from-s.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let a=o.from,l=Math.max(s.to,o.to);i<=n&&n--,e.splice(--i,2,s.anchor>s.head?Z.range(l,a):Z.range(a,l))}}return new Z(e,n)}}function LM(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let v1=0;class oe{constructor(e,n,r,i,s){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=v1++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new oe(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:x1),!!e.static,e.enables)}of(e){return new Bh([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Bh(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Bh(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function x1(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class Bh{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=v1++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?c=!0:((n=e[f.id])!==null&&n!==void 0?n:1)&1||u.push(e[f.id]);return{create(f){return f.values[o]=r(f),1},update(f,d){if(l&&d.docChanged||c&&(d.docChanged||d.selection)||Xx(f,u)){let h=r(f);if(a?!TT(h,f.values[o],i):!i(h,f.values[o]))return f.values[o]=h,1}return 0},reconfigure:(f,d)=>{let h,g=d.config.address[s];if(g!=null){let m=Yp(d,g);if(this.dependencies.every(v=>v instanceof oe?d.facet(v)===f.facet(v):v instanceof At?d.field(v,!1)==f.field(v,!1):!0)||(a?TT(h=r(f),m,i):i(h=r(f),m)))return f.values[o]=m,0}else h=r(f);return f.values[o]=h,1}}}}function TT(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function Xx(t,e){let n=!1;for(let r of e)yu(t,r)&1&&(n=!0);return n}function _oe(t,e,n){let r=n.map(l=>t[l.id]),i=n.map(l=>l.type),s=r.filter(l=>!(l&1)),o=t[e.id]>>1;function a(l){let c=[];for(let u=0;u<r.length;u++){let f=Yp(l,r[u]);if(i[u]==2)for(let d of f)c.push(d);else c.push(f)}return e.combine(c)}return{create(l){for(let c of r)yu(l,c);return l.values[o]=a(l),1},update(l,c){if(!Xx(l,s))return 0;let u=a(l);return e.compare(u,l.values[o])?0:(l.values[o]=u,1)},reconfigure(l,c){let u=Xx(l,r),f=c.config.facets[e.id],d=c.facet(e);if(f&&!u&&x1(n,f))return l.values[o]=d,0;let h=a(l);return e.compare(h,d)?(l.values[o]=d,0):(l.values[o]=h,1)}}}const Bd=oe.define({static:!0});class At{constructor(e,n,r,i,s){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let n=new At(v1++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Bd).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let s=r.values[n],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[n]=o,1)},reconfigure:(r,i)=>{let s=r.facet(Bd),o=i.facet(Bd),a;return(a=s.find(l=>l.field==this))&&a!=o.find(l=>l.field==this)?(r.values[n]=a.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,Bd.of({field:this,create:e})]}get extension(){return this}}const Co={lowest:4,low:3,default:2,high:1,highest:0};function Nc(t){return e=>new zM(e,t)}const os={highest:Nc(Co.highest),high:Nc(Co.high),default:Nc(Co.default),low:Nc(Co.low),lowest:Nc(Co.lowest)};class zM{constructor(e,n){this.inner=e,this.prec=n}}class Sg{of(e){return new Zx(this,e)}reconfigure(e){return Sg.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Zx{constructor(e,n){this.compartment=e,this.inner=n}}class qp{constructor(e,n,r,i,s,o){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],s=Object.create(null),o=new Map;for(let d of $oe(e,n,o))d instanceof At?i.push(d):(s[d.facet.id]||(s[d.facet.id]=[])).push(d);let a=Object.create(null),l=[],c=[];for(let d of i)a[d.id]=c.length<<1,c.push(h=>d.slot(h));let u=r==null?void 0:r.config.facets;for(let d in s){let h=s[d],g=h[0].facet,m=u&&u[d]||[];if(h.every(v=>v.type==0))if(a[g.id]=l.length<<1|1,x1(m,h))l.push(r.facet(g));else{let v=g.combine(h.map(y=>y.value));l.push(r&&g.compare(v,r.facet(g))?r.facet(g):v)}else{for(let v of h)v.type==0?(a[v.id]=l.length<<1|1,l.push(v.value)):(a[v.id]=c.length<<1,c.push(y=>v.dynamicSlot(y)));a[g.id]=c.length<<1,c.push(v=>_oe(v,g,h))}}let f=c.map(d=>d(a));return new qp(e,o,f,a,l,s)}}function $oe(t,e,n){let r=[[],[],[],[],[]],i=new Map;function s(o,a){let l=i.get(o);if(l!=null){if(l<=a)return;let c=r[l].indexOf(o);c>-1&&r[l].splice(c,1),o instanceof Zx&&n.delete(o.compartment)}if(i.set(o,a),Array.isArray(o))for(let c of o)s(c,a);else if(o instanceof Zx){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;n.set(o.compartment,c),s(c,a)}else if(o instanceof zM)s(o.inner,o.prec);else if(o instanceof At)r[a].push(o),o.provides&&s(o.provides,a);else if(o instanceof Bh)r[a].push(o),o.facet.extensions&&s(o.facet.extensions,Co.default);else{let c=o.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(c,a)}}return s(t,Co.default),r.reduce((o,a)=>o.concat(a))}function yu(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function Yp(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const BM=oe.define(),Wx=oe.define({combine:t=>t.some(e=>e),static:!0}),VM=oe.define({combine:t=>t.length?t[0]:void 0,static:!0}),FM=oe.define(),XM=oe.define(),ZM=oe.define(),WM=oe.define({combine:t=>t.length?t[0]:!1});class Ri{constructor(e,n){this.type=e,this.value=n}static define(){return new Aoe}}class Aoe{of(e){return new Ri(this,e)}}class Qoe{constructor(e){this.map=e}of(e){return new ve(this,e)}}class ve{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new ve(this.type,n)}is(e){return this.type==e}static define(e={}){return new Qoe(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(n);s&&r.push(s)}return r}}ve.reconfigure=ve.define();ve.appendConfig=ve.define();class yt{constructor(e,n,r,i,s,o){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&LM(r,n.newLength),s.some(a=>a.type==yt.time)||(this.annotations=s.concat(yt.time.of(Date.now())))}static create(e,n,r,i,s,o){return new yt(e,n,r,i,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(yt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}yt.time=Ri.define();yt.userEvent=Ri.define();yt.addToHistory=Ri.define();yt.remote=Ri.define();function Ioe(t,e){let n=[];for(let r=0,i=0;;){let s,o;if(r<t.length&&(i==e.length||e[i]>=t[r]))s=t[r++],o=t[r++];else if(i<e.length)s=e[i++],o=e[i++];else return n;!n.length||n[n.length-1]<s?n.push(s,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function qM(t,e,n){var r;let i,s,o;return n?(i=e.changes,s=wt.empty(e.changes.length),o=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:ve.mapEffects(t.effects,i).concat(ve.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function qx(t,e,n){let r=e.selection,i=ll(e.annotations);return e.userEvent&&(i=i.concat(yt.userEvent.of(e.userEvent))),{changes:e.changes instanceof wt?e.changes:wt.of(e.changes||[],n,t.facet(VM)),selection:r&&(r instanceof Z?r:Z.single(r.anchor,r.head)),effects:ll(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function YM(t,e,n){let r=qx(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(n=!1);let o=!!e[s].sequential;r=qM(r,qx(t,e[s],o?r.changes.newLength:t.doc.length),o)}let i=yt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return joe(n?Noe(i):i)}function Noe(t){let e=t.startState,n=!0;for(let i of e.facet(FM)){let s=i(t);if(s===!1){n=!1;break}Array.isArray(s)&&(n=n===!0?s:Ioe(n,s))}if(n!==!0){let i,s;if(n===!1)s=t.changes.invertedDesc,i=wt.empty(e.doc.length);else{let o=t.changes.filter(n);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}t=yt.create(e,i,t.selection&&t.selection.map(s),ve.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let r=e.facet(XM);for(let i=r.length-1;i>=0;i--){let s=r[i](t);s instanceof yt?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof yt?t=s[0]:t=YM(e,ll(s),!1)}return t}function joe(t){let e=t.startState,n=e.facet(ZM),r=t;for(let i=n.length-1;i>=0;i--){let s=n[i](t);s&&Object.keys(s).length&&(r=qM(r,qx(e,s,t.changes.newLength),!0))}return r==t?t:yt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const Moe=[];function ll(t){return t==null?Moe:Array.isArray(t)?t:[t]}var st=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(st||(st={}));const Doe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Yx;try{Yx=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Loe(t){if(Yx)return Yx.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||Doe.test(n)))return!0}return!1}function zoe(t){return e=>{if(!/\S/.test(e))return st.Space;if(Loe(e))return st.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return st.Word;return st.Other}}class Ae{constructor(e,n,r,i,s,o){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)yu(this,a<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return yu(this,r),Yp(this,r)}update(...e){return YM(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let a of e.effects)a.is(Sg.reconfigure)?(n&&(i=new Map,n.compartments.forEach((l,c)=>i.set(c,l)),n=null),i.set(a.value.compartment,a.value.extension)):a.is(ve.reconfigure)?(n=null,r=a.value):a.is(ve.appendConfig)&&(n=null,r=ll(r).concat(a.value));let s;n?s=e.startState.values.slice():(n=qp.resolve(r,i,this),s=new Ae(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let o=e.startState.facet(Wx)?e.newSelection:e.newSelection.asSingle();new Ae(n,e.newDoc,o,s,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Z.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),s=[r.range],o=ll(r.effects);for(let a=1;a<n.ranges.length;a++){let l=e(n.ranges[a]),c=this.changes(l.changes),u=c.map(i);for(let d=0;d<a;d++)s[d]=s[d].map(u);let f=i.mapDesc(c,!0);s.push(l.range.map(f)),i=i.compose(u),o=ve.mapEffects(o,u).concat(ve.mapEffects(ll(l.effects),f))}return{changes:i,selection:Z.create(s,n.mainIndex),effects:o}}changes(e=[]){return e instanceof wt?e:wt.of(e,this.doc.length,this.facet(Ae.lineSeparator))}toText(e){return Le.of(e.split(this.facet(Ae.lineSeparator)||Bx))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(yu(this,n),Yp(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof At&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let o=r[s],a=e[s];i.push(o.init(l=>o.spec.fromJSON(a,l)))}}return Ae.create({doc:e.doc,selection:Z.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=qp.resolve(e.extensions||[],new Map),r=e.doc instanceof Le?e.doc:Le.of((e.doc||"").split(n.staticFacet(Ae.lineSeparator)||Bx)),i=e.selection?e.selection instanceof Z?e.selection:Z.single(e.selection.anchor,e.selection.head):Z.single(0);return LM(i,r.length),n.staticFacet(Wx)||(i=i.asSingle()),new Ae(n,r,i,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(Ae.tabSize)}get lineBreak(){return this.facet(Ae.lineSeparator)||`
|
|
480
|
+
`}get readOnly(){return this.facet(WM)}phrase(e,...n){for(let r of this.facet(Ae.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>n.length?r:n[s-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let s of this.facet(BM))for(let o of s(this,n,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){let n=this.languageDataAt("wordChars",e);return zoe(n.length?n[0]:"")}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,a=e-r;for(;o>0;){let l=Et(n,o,!1);if(s(n.slice(l,o))!=st.Word)break;o=l}for(;a<i;){let l=Et(n,a);if(s(n.slice(a,l))!=st.Word)break;a=l}return o==a?null:Z.range(o+r,a+r)}}Ae.allowMultipleSelections=Wx;Ae.tabSize=oe.define({combine:t=>t.length?t[0]:4});Ae.lineSeparator=VM;Ae.readOnly=WM;Ae.phrases=oe.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});Ae.languageData=BM;Ae.changeFilter=FM;Ae.transactionFilter=XM;Ae.transactionExtender=ZM;Sg.reconfigure=ve.define();function _i(t,e,n={}){let r={};for(let i of t)for(let s of Object.keys(i)){let o=i[s],a=r[s];if(a===void 0)r[s]=o;else if(!(a===o||o===void 0))if(Object.hasOwnProperty.call(n,s))r[s]=n[s](a,o);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Ys{eq(e){return this==e}range(e,n=e){return Ux.create(e,n,this)}}Ys.prototype.startSide=Ys.prototype.endSide=0;Ys.prototype.point=!1;Ys.prototype.mapMode=jt.TrackDel;function b1(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}let Ux=class UM{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new UM(e,n,r)}};function Hx(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class w1{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let s=r?this.to:this.from;for(let o=i,a=s.length;;){if(o==a)return o;let l=o+a>>1,c=s[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==o)return c>=0?o:a;c>=0?a=l:o=l+1}}between(e,n,r,i){for(let s=this.findIndex(n,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,n){let r=[],i=[],s=[],o=-1,a=-1;for(let l=0;l<this.value.length;l++){let c=this.value[l],u=this.from[l]+e,f=this.to[l]+e,d,h;if(u==f){let g=n.mapPos(u,c.startSide,c.mapMode);if(g==null||(d=h=g,c.startSide!=c.endSide&&(h=n.mapPos(u,c.endSide),h<d)))continue}else if(d=n.mapPos(u,c.startSide),h=n.mapPos(f,c.endSide),d>h||d==h&&c.startSide>0&&c.endSide<=0)continue;(h-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(a=Math.max(a,h-d)),r.push(c),i.push(d-o),s.push(h-o))}return{mapped:r.length?new w1(i,s,r,a):null,pos:o}}}class Qe{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new Qe(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(Hx)),this.isEmpty)return n.length?Qe.of(n):this;let a=new HM(this,null,-1).goto(0),l=0,c=[],u=new ts;for(;a.value||l<n.length;)if(l<n.length&&(a.from-n[l].from||a.startSide-n[l].value.startSide)>=0){let f=n[l++];u.addInner(f.from,f.to,f.value)||c.push(f)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==n.length||this.chunkEnd(a.chunkIndex)<n[l].from)&&(!o||i>this.chunkEnd(a.chunkIndex)||s<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||i>a.to||s<a.from||o(a.from,a.to,a.value))&&(u.addInner(a.from,a.to,a.value)||c.push(Ux.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?Qe.empty:this.nextLayer.update({add:c,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let a=this.chunkPos[o],l=this.chunk[o],c=e.touchesRange(a,a+l.length);if(c===!1)i=Math.max(i,l.maxPoint),n.push(l),r.push(e.mapPos(a));else if(c===!0){let{mapped:u,pos:f}=l.map(a,e);u&&(i=Math.max(i,u.maxPoint),n.push(u),r.push(f))}}let s=this.nextLayer.map(e);return n.length==0?s:new Qe(r,n,s||Qe.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(n>=s&&e<=s+o.length&&o.between(s,e-s,n-s,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return rf.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return rf.from(e).goto(n)}static compare(e,n,r,i,s=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),a=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),l=ET(o,a,r),c=new jc(o,l,s),u=new jc(a,l,s);r.iterGaps((f,d,h)=>RT(c,f,u,d,h,i)),r.empty&&r.length==0&&RT(c,0,u,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let s=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),o=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let a=ET(s,o),l=new jc(s,a,0).goto(r),c=new jc(o,a,0).goto(r);for(;;){if(l.to!=c.to||!Gx(l.active,c.active)||l.point&&(!c.point||!b1(l.point,c.point)))return!1;if(l.to>i)return!0;l.next(),c.next()}}static spans(e,n,r,i,s=-1){let o=new jc(e,null,s).goto(n),a=n,l=o.openStart;for(;;){let c=Math.min(o.to,r);if(o.point){let u=o.activeForPoint(o.to),f=o.pointFrom<n?u.length+1:o.point.startSide<0?u.length:Math.min(u.length,l);i.point(a,c,o.point,u,f,o.pointRank),l=Math.min(o.openEnd(c),u.length)}else c>a&&(i.span(a,c,o.active,l),l=o.openEnd(c));if(o.to>r)return l+(o.point&&o.to>r?1:0);a=o.to,o.next()}}static of(e,n=!1){let r=new ts;for(let i of e instanceof Ux?[e]:n?Boe(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Qe.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Qe.empty;i=i.nextLayer)n=new Qe(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}Qe.empty=new Qe([],[],null,-1);function Boe(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(Hx(e,r)>0)return t.slice().sort(Hx);e=r}return t}Qe.empty.nextLayer=Qe.empty;class ts{finishChunk(e){this.chunks.push(new w1(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new ts)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Qe.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Qe.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function ET(t,e,n){let r=new Map;for(let s of t)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&r.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let a=r.get(s.chunk[o]);a!=null&&(n?n.mapPos(a):a)==s.chunkPos[o]&&!(n!=null&&n.touchesRange(a,a+s.chunk[o].length))&&i.add(s.chunk[o])}return i}class HM{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class rf{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new HM(o,n,r,s));return i.length==1?i[0]:new rf(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)gy(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)gy(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),gy(this.heap,0)}}}function gy(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class jc{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=rf.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Vd(this.active,e),Vd(this.activeTo,e),Vd(this.activeRank,e),this.minActive=_T(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:s}=this.cursor;for(;n<this.activeRank.length&&(s-this.activeRank[n]||i-this.activeTo[n])>0;)n++;Fd(this.active,n,r),Fd(this.activeTo,n,i),Fd(this.activeRank,n,s),e&&Fd(e,n,this.cursor.from),this.minActive=_T(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&Vd(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function RT(t,e,n,r,i,s){t.goto(e),n.goto(r);let o=r+i,a=r,l=r-e,c=!!s.boundChange;for(let u=!1;;){let f=t.to+l-n.to,d=f||t.endSide-n.endSide,h=d<0?t.to+l:n.to,g=Math.min(h,o);if(t.point||n.point?(t.point&&n.point&&b1(t.point,n.point)&&Gx(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(a,g,t.point,n.point),u=!1):(u&&s.boundChange(a),g>a&&!Gx(t.active,n.active)&&s.compareRange(a,g,t.active,n.active),c&&g<o&&(f||t.openEnd(h)!=n.openEnd(h))&&(u=!0)),h>o)break;a=h,d<=0&&t.next(),d>=0&&n.next()}}function Gx(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!b1(t[n],e[n]))return!1;return!0}function Vd(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function Fd(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function _T(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function Zr(t,e,n=t.length){let r=0;for(let i=0;i<n&&i<t.length;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Et(t,i));return r}function Kx(t,e,n,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==t.length)break;s+=t.charCodeAt(i)==9?n-s%n:1,i=Et(t,i)}return r===!0?-1:t.length}const Jx="ͼ",$T=typeof Symbol>"u"?"__"+Jx:Symbol.for(Jx),e0=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),AT=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Us{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,a,l,c){let u=[],f=/^@(\w+)\b/.exec(o[0]),d=f&&f[1]=="keyframes";if(f&&a==null)return l.push(o[0]+";");for(let h in a){let g=a[h];if(/&/.test(h))s(h.split(/,\s*/).map(m=>o.map(v=>m.replace(/&/,v))).reduce((m,v)=>m.concat(v)),g,l);else if(g&&typeof g=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");s(i(h),g,u,d)}else g!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+g+";")}(u.length||d)&&l.push((r&&!f&&!c?o.map(r):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
|
|
481
|
+
`)}static newName(){let e=AT[$T]||1;return AT[$T]=e+1,Jx+e.toString(36)}static mount(e,n,r){let i=e[e0],s=r&&r.nonce;i?s&&i.setNonce(s):i=new Voe(e,s),i.mount(Array.isArray(n)?n:[n],e)}}let QT=new Map;class Voe{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=QT.get(r);if(s)return e[e0]=s;this.sheet=new i.CSSStyleSheet,QT.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[e0]=this}mount(e,n){let r=this.sheet,i=0,s=0;for(let o=0;o<e.length;o++){let a=e[o],l=this.modules.indexOf(a);if(l<s&&l>-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,a),r)for(let c=0;c<a.rules.length;c++)r.insertRule(a.rules[c],i++)}else{for(;s<l;)i+=this.modules[s++].rules.length;i+=a.rules.length,s++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let o="";for(let l=0;l<this.modules.length;l++)o+=this.modules[l].getRules()+`
|
|
482
|
+
`;this.styleTag.textContent=o;let a=n.head||n;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Hs={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},sf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Foe=typeof navigator<"u"&&/Mac/.test(navigator.platform),Xoe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Nt=0;Nt<10;Nt++)Hs[48+Nt]=Hs[96+Nt]=String(Nt);for(var Nt=1;Nt<=24;Nt++)Hs[Nt+111]="F"+Nt;for(var Nt=65;Nt<=90;Nt++)Hs[Nt]=String.fromCharCode(Nt+32),sf[Nt]=String.fromCharCode(Nt);for(var Oy in Hs)sf.hasOwnProperty(Oy)||(sf[Oy]=Hs[Oy]);function Zoe(t){var e=Foe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Xoe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?sf:Hs)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Ze(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)GM(t,arguments[e]);return t}function GM(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)GM(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}let en=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},t0=typeof document<"u"?document:{documentElement:{style:{}}};const n0=/Edge\/(\d+)/.exec(en.userAgent),KM=/MSIE \d/.test(en.userAgent),r0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(en.userAgent),kg=!!(KM||r0||n0),IT=!kg&&/gecko\/(\d+)/i.test(en.userAgent),yy=!kg&&/Chrome\/(\d+)/.exec(en.userAgent),Woe="webkitFontSmoothing"in t0.documentElement.style,i0=!kg&&/Apple Computer/.test(en.vendor),NT=i0&&(/Mobile\/\w+/.test(en.userAgent)||en.maxTouchPoints>2);var ae={mac:NT||/Mac/.test(en.platform),windows:/Win/.test(en.platform),linux:/Linux|X11/.test(en.platform),ie:kg,ie_version:KM?t0.documentMode||6:r0?+r0[1]:n0?+n0[1]:0,gecko:IT,gecko_version:IT?+(/Firefox\/(\d+)/.exec(en.userAgent)||[0,0])[1]:0,chrome:!!yy,chrome_version:yy?+yy[1]:0,ios:NT,android:/Android\b/.test(en.userAgent),webkit_version:Woe?+(/\bAppleWebKit\/(\d+)/.exec(en.userAgent)||[0,0])[1]:0,safari:i0,safari_version:i0?+(/\bVersion\/(\d+(\.\d+)?)/.exec(en.userAgent)||[0,0])[1]:0,tabSize:t0.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function S1(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const Up=Object.create(null);function k1(t,e,n){if(t==e)return!0;t||(t=Up),e||(e=Up);let r=Object.keys(t),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=n&&(i.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function qoe(t,e){for(let n=t.attributes.length-1;n>=0;n--){let r=t.attributes[n].name;e[r]==null&&t.removeAttribute(r)}for(let n in e){let r=e[n];n=="style"?t.style.cssText=r:t.getAttribute(n)!=r&&t.setAttribute(n,r)}}function jT(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function Yoe(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class Yr{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Dt=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Dt||(Dt={}));class he extends Ys{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Kf(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new ta(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=JM(e,n);r=(s?n?-3e8:-1:5e8)-1,i=(o?n?2e8:1:-6e8)+1}return new ta(e,r,i,n,e.widget||null,!0)}static line(e){return new Jf(e)}static set(e,n=!1){return Qe.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}he.none=Qe.empty;class Kf extends he{constructor(e){let{start:n,end:r}=JM(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?S1(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Up}eq(e){return this==e||e instanceof Kf&&this.tagName==e.tagName&&k1(this.attrs,e.attrs)}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Kf.prototype.point=!1;class Jf extends he{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Jf&&this.spec.class==e.spec.class&&k1(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Jf.prototype.mapMode=jt.TrackBefore;Jf.prototype.point=!0;class ta extends he{constructor(e,n,r,i,s,o){super(n,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?n<=0?jt.TrackBefore:jt.TrackAfter:jt.TrackDel}get type(){return this.startSide!=this.endSide?Dt.WidgetRange:this.startSide<=0?Dt.WidgetBefore:Dt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof ta&&Uoe(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}ta.prototype.point=!0;function JM(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function Uoe(t,e){return t==e||!!(t&&e&&t.compare(e))}function cl(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class of extends Ys{constructor(e,n){super(),this.tagName=e,this.attributes=n}eq(e){return e==this||e instanceof of&&this.tagName==e.tagName&&k1(this.attributes,e.attributes)}static create(e){return new of(e.tagName,e.attributes||Up)}static set(e,n=!1){return Qe.of(e,n)}}of.prototype.startSide=of.prototype.endSide=-1;function af(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function s0(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function vu(t,e){if(!e.anchorNode)return!1;try{return s0(t,e.anchorNode)}catch{return!1}}function xu(t){return t.nodeType==3?cf(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function bu(t,e,n,r){return n?MT(t,e,n,r,-1)||MT(t,e,n,r,1):!1}function Gs(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Hp(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function MT(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:ns(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=Gs(t)+(i<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?ns(t):0}else return!1}}function ns(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function lf(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function Hoe(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function eD(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function Goe(t,e,n,r,i,s,o,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,f=!1;u&&!f;)if(u.nodeType==1){let d,h=u==l.body,g=1,m=1;if(h)d=Hoe(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let x=u.getBoundingClientRect();({scaleX:g,scaleY:m}=eD(u,x)),d={left:x.left,right:x.left+u.clientWidth*g,top:x.top,bottom:x.top+u.clientHeight*m}}let v=0,y=0;if(i=="nearest")e.top<d.top?(y=e.top-(d.top+o),n>0&&e.bottom>d.bottom+y&&(y=e.bottom-d.bottom+o)):e.bottom>d.bottom&&(y=e.bottom-d.bottom+o,n<0&&e.top-y<d.top&&(y=e.top-(d.top+o)));else{let x=e.bottom-e.top,b=d.bottom-d.top;y=(i=="center"&&x<=b?e.top+x/2-b/2:i=="start"||i=="center"&&n<0?e.top-o:e.bottom-b+o)-d.top}if(r=="nearest"?e.left<d.left?(v=e.left-(d.left+s),n>0&&e.right>d.right+v&&(v=e.right-d.right+s)):e.right>d.right&&(v=e.right-d.right+s,n<0&&e.left<d.left+v&&(v=e.left-(d.left+s))):v=(r=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:r=="start"==a?e.left-s:e.right-(d.right-d.left)+s)-d.left,v||y)if(h)c.scrollBy(v,y);else{let x=0,b=0;if(y){let k=u.scrollTop;u.scrollTop+=y/m,b=(u.scrollTop-k)*m}if(v){let k=u.scrollLeft;u.scrollLeft+=v/g,x=(u.scrollLeft-k)*g}e={left:e.left-x,top:e.top-b,right:e.right-x,bottom:e.bottom-b},x&&Math.abs(x-v)<1&&(r="nearest"),b&&Math.abs(b-y)<1&&(i="nearest")}if(h)break;(e.top<d.top||e.bottom>d.bottom||e.left<d.left||e.right>d.right)&&(e={left:Math.max(e.left,d.left),right:Math.min(e.right,d.right),top:Math.max(e.top,d.top),bottom:Math.min(e.bottom,d.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function Koe(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class Joe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?ns(n):0),r,Math.min(e.focusOffset,r?ns(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let wo=null;ae.safari&&ae.safari_version>=26&&(wo=!1);function tD(t){if(t.setActive)return t.setActive();if(wo)return t.focus(wo);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(wo==null?{get preventScroll(){return wo={preventScroll:!0},!0}}:void 0),!wo){wo=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],s=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let DT;function cf(t,e,n=e){let r=DT||(DT=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function ul(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,t.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function eae(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function tae(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,ns(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=ns(n))}else{if(n==t)return!0;r=Gs(n),n=n.parentNode}}function nD(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function rD(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=ns(n)}else if(n.parentNode&&!Hp(n))r=Gs(n),n=n.parentNode;else return null}}function iD(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Hp(n))r=Gs(n)+1,n=n.parentNode;else return null}}class Mr{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new Mr(e.parentNode,Gs(e),n)}static after(e,n){return new Mr(e.parentNode,Gs(e)+1,n)}}var Ye=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Ye||(Ye={}));const na=Ye.LTR,C1=Ye.RTL;function sD(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const nae=sD("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),rae=sD("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),o0=Object.create(null),ri=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);o0[e]=n,o0[n]=-e}function oD(t){return t<=247?nae[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?rae[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const iae=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class gi{get dir(){return this.level%2?C1:na}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let s=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=n&&a.to>=n){if(a.level==r)return o;(s<0||(i!=0?i<0?a.from<n:a.to>n:e[s].level>a.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function aD(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!aD(r.inner,i.inner))return!1}return!0}const qe=[];function sae(t,e,n,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:e,a=s<r.length?r[s].from:n,l=s?256:i;for(let c=o,u=l,f=l;c<a;c++){let d=oD(t.charCodeAt(c));d==512?d=u:d==8&&f==4&&(d=16),qe[c]=d==4?2:d,d&7&&(f=d),u=d}for(let c=o,u=l,f=l;c<a;c++){let d=qe[c];if(d==128)c<a-1&&u==qe[c+1]&&u&24?d=qe[c]=u:qe[c]=256;else if(d==64){let h=c+1;for(;h<a&&qe[h]==64;)h++;let g=c&&u==8||h<n&&qe[h]==8?f==1?1:8:256;for(let m=c;m<h;m++)qe[m]=g;c=h-1}else d==8&&f==1&&(qe[c]=1);u=d,d&7&&(f=d)}}}function oae(t,e,n,r,i){let s=i==1?2:1;for(let o=0,a=0,l=0;o<=r.length;o++){let c=o?r[o-1].to:e,u=o<r.length?r[o].from:n;for(let f=c,d,h,g;f<u;f++)if(h=o0[d=t.charCodeAt(f)])if(h<0){for(let m=a-3;m>=0;m-=3)if(ri[m+1]==-h){let v=ri[m+2],y=v&2?i:v&4?v&1?s:i:0;y&&(qe[f]=qe[ri[m]]=y),a=m;break}}else{if(ri.length==189)break;ri[a++]=f,ri[a++]=d,ri[a++]=l}else if((g=qe[f])==2||g==1){let m=g==i;l=m?0:1;for(let v=a-3;v>=0;v-=3){let y=ri[v+2];if(y&2)break;if(m)ri[v+2]|=2;else{if(y&4)break;ri[v+2]|=4}}}}}function aae(t,e,n,r){for(let i=0,s=r;i<=n.length;i++){let o=i?n[i-1].to:t,a=i<n.length?n[i].from:e;for(let l=o;l<a;){let c=qe[l];if(c==256){let u=l+1;for(;;)if(u==a){if(i==n.length)break;u=n[i++].to,a=i<n.length?n[i].from:e}else if(qe[u]==256)u++;else break;let f=s==1,d=(u<e?qe[u]:r)==1,h=f==d?f?1:2:r;for(let g=u,m=i,v=m?n[m-1].to:t;g>l;)g==v&&(g=n[--m].from,v=m?n[m-1].to:t),qe[--g]=h;l=u}else s=c,l++}}}function a0(t,e,n,r,i,s,o){let a=r%2?2:1;if(r%2==i%2)for(let l=e,c=0;l<n;){let u=!0,f=!1;if(c==s.length||l<s[c].from){let m=qe[l];m!=a&&(u=!1,f=m==16)}let d=!u&&a==1?[]:null,h=u?r:r+1,g=l;e:for(;;)if(c<s.length&&g==s[c].from){if(f)break e;let m=s[c];if(!u)for(let v=m.to,y=c+1;;){if(v==n)break e;if(y<s.length&&s[y].from==v)v=s[y++].to;else{if(qe[v]==a)break e;break}}if(c++,d)d.push(m);else{m.from>l&&o.push(new gi(l,m.from,h));let v=m.direction==na!=!(h%2);l0(t,v?r+1:r,i,m.inner,m.from,m.to,o),l=m.to}g=m.to}else{if(g==n||(u?qe[g]!=a:qe[g]==a))break;g++}d?a0(t,l,g,r+1,i,d,o):l<g&&o.push(new gi(l,g,h)),l=g}else for(let l=n,c=s.length;l>e;){let u=!0,f=!1;if(!c||l>s[c-1].to){let m=qe[l-1];m!=a&&(u=!1,f=m==16)}let d=!u&&a==1?[]:null,h=u?r:r+1,g=l;e:for(;;)if(c&&g==s[c-1].to){if(f)break e;let m=s[--c];if(!u)for(let v=m.from,y=c;;){if(v==e)break e;if(y&&s[y-1].to==v)v=s[--y].from;else{if(qe[v-1]==a)break e;break}}if(d)d.push(m);else{m.to<l&&o.push(new gi(m.to,l,h));let v=m.direction==na!=!(h%2);l0(t,v?r+1:r,i,m.inner,m.from,m.to,o),l=m.from}g=m.from}else{if(g==e||(u?qe[g-1]!=a:qe[g-1]==a))break;g--}d?a0(t,g,l,r+1,i,d,o):g<l&&o.push(new gi(g,l,h)),l=g}}function l0(t,e,n,r,i,s,o){let a=e%2?2:1;sae(t,i,s,r,a),oae(t,i,s,r,a),aae(i,s,r,a),a0(t,i,s,e,n,r,o)}function lae(t,e,n){if(!t)return[new gi(0,0,e==C1?1:0)];if(e==na&&!n.length&&!iae.test(t))return lD(t.length);if(n.length)for(;t.length>qe.length;)qe[qe.length]=256;let r=[],i=e==na?0:1;return l0(t,i,i,n,0,t.length,r),r}function lD(t){return[new gi(0,t,0)]}let cD="";function cae(t,e,n,r,i){var s;let o=r.head-t.from,a=gi.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),l=e[a],c=l.side(i,n);if(o==c){let d=a+=i?1:-1;if(d<0||d>=e.length)return null;l=e[a=d],o=l.side(!i,n),c=l.side(i,n)}let u=Et(t.text,o,l.forward(i,n));(u<l.from||u>l.to)&&(u=c),cD=t.text.slice(Math.min(o,u),Math.max(o,u));let f=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return f&&u==c&&f.level+(i?0:1)<l.level?Z.cursor(f.side(!i,n)+t.from,f.forward(i,n)?1:-1,f.level):Z.cursor(u+t.from,l.forward(i,n)?-1:1,l.level)}function uae(t,e,n){for(let r=e;r<n;r++){let i=oD(t.charCodeAt(r));if(i==1)return na;if(i==2||i==4)return C1}return na}const uD=oe.define(),fD=oe.define(),dD=oe.define(),hD=oe.define(),c0=oe.define(),pD=oe.define(),mD=oe.define(),P1=oe.define(),T1=oe.define(),gD=oe.define({combine:t=>t.some(e=>e)}),OD=oe.define({combine:t=>t.some(e=>e)}),yD=oe.define();class fl{constructor(e,n="nearest",r="nearest",i=5,s=5,o=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new fl(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new fl(Z.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Xd=ve.define({map:(t,e)=>t.map(e)}),vD=ve.define();function yn(t,e,n){let r=t.facet(hD);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const zi=oe.define({combine:t=>t.length?t[0]:!0});let fae=0;const Ya=oe.define({combine(t){return t.filter((e,n)=>{for(let r=0;r<n;r++)if(t[r].plugin==e.plugin)return!1;return!0})}});class ht{constructor(e,n,r,i,s){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Ya.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Ya.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:s,decorations:o}=n||{};return new ht(fae++,e,r,i,a=>{let l=[];return o&&l.push(Cg.of(c=>{let u=c.plugin(a);return u?o(u):he.none})),s&&l.push(s(a)),l})}static fromClass(e,n){return ht.define((r,i)=>new e(r,i),n)}}class vy{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(yn(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){yn(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){yn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const xD=oe.define(),E1=oe.define(),Cg=oe.define(),bD=oe.define(),R1=oe.define(),ed=oe.define(),wD=oe.define();function LT(t,e){let n=t.state.facet(wD);if(!n.length)return n;let r=n.map(s=>s instanceof Function?s(t):s),i=[];return Qe.spans(r,e.from,e.to,{point(){},span(s,o,a,l){let c=s-e.from,u=o-e.from,f=i;for(let d=a.length-1;d>=0;d--,l--){let h=a[d].spec.bidiIsolate,g;if(h==null&&(h=uae(e.text,c,u)),l>0&&f.length&&(g=f[f.length-1]).to==c&&g.direction==h)g.to=u,f=g.inner;else{let m={from:c,to:u,direction:h,inner:[]};f.push(m),f=m.inner}}}}),i}const SD=oe.define();function _1(t){let e=0,n=0,r=0,i=0;for(let s of t.state.facet(SD)){let o=s(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:n,top:r,bottom:i}}const Gc=oe.define();class lr{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new lr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,s=0,o=0;;){let a=i<e.length?e[i].fromB:1e9,l=s<n.length?n[s]:1e9,c=Math.min(a,l);if(c==1e9)break;let u=c+o,f=c,d=u;for(;;)if(s<n.length&&n[s]<=f){let h=n[s+1];s+=2,f=Math.max(f,h);for(let g=i;g<e.length&&e[g].fromB<=f;g++)o=e[g].toA-e[g].toB;d=Math.max(d,h+o)}else if(i<e.length&&e[i].fromB<=f){let h=e[i++];f=Math.max(f,h.toB),d=Math.max(d,h.toA),o=h.toA-h.toB}else break;r.push(new lr(u,d,c,f))}return r}}class Gp{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=wt.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,a,l)=>i.push(new lr(s,o,a,l))),this.changedRanges=i}static create(e,n,r){return new Gp(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const dae=[];class vt{constructor(e,n,r=0){this.dom=e,this.length=n,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return dae}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let n=this.domAttrs;n&&qoe(this.dom,n)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,n=this.posAtStart){let r=n;for(let i of this.children){if(i==e)return r;r+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,n){return null}domPosFor(e,n){let r=Gs(this.dom),i=this.length?e>0:n>0;return new Mr(this.parent.dom,r+(i?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Tg)return e;return null}static get(e){return e.cmTile}}class Pg extends vt{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let n=this.dom,r=null,i,s=(e==null?void 0:e.node)==n?e:null,o=0;for(let a of this.children){if(a.sync(e),o+=a.length+a.breakAfter,i=r?r.nextSibling:n.firstChild,s&&i!=a.dom&&(s.written=!0),a.dom.parentNode==n)for(;i&&i!=a.dom;)i=zT(i);else n.insertBefore(a.dom,i);r=a.dom}for(i=r?r.nextSibling:n.firstChild,s&&i&&(s.written=!0);i;)i=zT(i);this.length=o}}function zT(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class Tg extends Pg{constructor(e,n){super(n),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let n=vt.get(e);if(n&&this.owns(n))return n;e=e.parentNode}}blockTiles(e){for(let n=[],r=this,i=0,s=0;;)if(i==r.children.length){if(!n.length)return;r=r.parent,r.breakAfter&&s++,i=n.pop()}else{let o=r.children[i++];if(o instanceof Bs)n.push(i),r=o,i=0;else{let a=s+o.length,l=e(o,s);if(l!==void 0)return l;s=a+o.breakAfter}}}resolveBlock(e,n){let r,i=-1,s,o=-1;if(this.blockTiles((a,l)=>{let c=l+a.length;if(e>=l&&e<=c){if(a.isWidget()&&n>=-1&&n<=1){if(a.flags&32)return!0;a.flags&16&&(r=void 0)}(l<e||e==c&&(n<-1?a.length:a.covers(1)))&&(!r||!a.isWidget()&&r.isWidget())&&(r=a,i=e-l),(c>e||e==l&&(n>1?a.length:a.covers(-1)))&&(!s||!a.isWidget()&&s.isWidget())&&(s=a,o=e-l)}}),!r&&!s)throw new Error("No tile at position "+e);return r&&n<0||!s?{tile:r,offset:i}:{tile:s,offset:o}}}class Bs extends Pg{constructor(e,n){super(e),this.wrapper=n}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,n){let r=new Bs(n||document.createElement(e.tagName),e);return n||(r.flags|=4),r}}class Nl extends Pg{constructor(e,n){super(e),this.attrs=n}isLine(){return!0}static start(e,n,r){let i=new Nl(n||document.createElement("div"),e);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,n,r){let i=null,s=-1,o=null,a=-1;function l(u,f){for(let d=0,h=0;d<u.children.length&&h<=f;d++){let g=u.children[d],m=h+g.length;m>=f&&(g.isComposite()?l(g,f-h):(!o||o.isHidden&&(n>0||r&&pae(o,g)))&&(m>f||g.flags&32)?(o=g,a=f-h):(h<f||g.flags&16&&!g.isHidden)&&(i=g,s=f-h)),h=m}}l(this,e);let c=(n<0?i:o)||i||o;return c?{tile:c,offset:c==i?s:a}:null}coordsIn(e,n){let r=this.resolveInline(e,n,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),n):hae(this)}domIn(e,n){let r=this.resolveInline(e,n);if(r){let{tile:i,offset:s}=r;if(this.dom.contains(i.dom))return i.isText()?new Mr(i.dom,Math.min(i.dom.nodeValue.length,s)):i.domPosFor(s,i.flags&16?1:i.flags&32?-1:n);let o=r.tile.parent,a=!1;for(let l of o.children){if(a)return new Mr(l.dom,0);l==r.tile&&(a=!0)}}return new Mr(this.dom,0)}}function hae(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=xu(e);return n[n.length-1]||null}function pae(t,e){let n=t.coordsIn(0,1),r=e.coordsIn(0,1);return n&&r&&r.top<n.bottom}class mn extends Pg{constructor(e,n){super(e),this.mark=n}get domAttrs(){return this.mark.attrs}static of(e,n){let r=new mn(n||document.createElement(e.tagName),e);return n||(r.flags|=4),r}}class No extends vt{constructor(e,n){super(e,n.length),this.text=n}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&n<0||e==r&&n>=0?ae.chrome||ae.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):n<0?i--:s<r&&s++;let a=cf(this.dom,i,s).getClientRects();if(!a.length)return null;let l=a[(o?o<0:n>=0)?0:a.length-1];return ae.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),o?lf(l,o<0):l||null}static of(e,n){let r=new No(n||document.createTextNode(e),e);return n||(r.flags|=2),r}}class ra extends vt{constructor(e,n,r,i){super(e,n,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,n){return this.coordsInWidget(e,n,!1)}coordsInWidget(e,n,r){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;if(r)return lf(this.dom.getBoundingClientRect(),this.length?e==0:n<=0);{let s=this.dom.getClientRects(),o=null;if(!s.length)return null;let a=this.flags&16?!0:this.flags&32?!1:e>0;for(let l=a?s.length-1:0;o=s[l],!(e>0?l==0:l==s.length-1||o.top<o.bottom);l+=a?-1:1);return lf(o,!a)}}get overrideDOMText(){if(!this.length)return Le.empty;let{root:e}=this;if(!e)return Le.empty;let n=this.posAtStart;return e.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,n,r,i,s){return s||(s=e.toDOM(n),e.editable||(s.contentEditable="false")),new ra(s,r,e,i)}}class Kp extends vt{constructor(e){let n=document.createElement("img");n.className="cm-widgetBuffer",n.setAttribute("aria-hidden","true"),super(n,0,e)}get isHidden(){return!0}get overrideDOMText(){return Le.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class mae{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,n,r){let{tile:i,index:s,beforeBreak:o,parents:a}=this;for(;e||n>0;)if(i.isComposite())if(o){if(!e)break;r&&r.break(),e--,o=!1}else if(s==i.children.length){if(!e&&!a.length)break;r&&r.leave(i),o=!!i.breakAfter,{tile:i,index:s}=a.pop(),s++}else{let l=i.children[s],c=l.breakAfter;(n>0?l.length<=e:l.length<e)&&(!r||r.skip(l,0,l.length)!==!1||!l.isComposite)?(o=!!c,s++,e-=l.length):(a.push({tile:i,index:s}),i=l,s=0,r&&l.isComposite()&&r.enter(l))}else if(s==i.length)o=!!i.breakAfter,{tile:i,index:s}=a.pop(),s++;else if(e){let l=Math.min(e,i.length-s);r&&r.skip(i,s,s+l),e-=l,s+=l}else break;return this.tile=i,this.index=s,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class gae{constructor(e,n,r,i){this.from=e,this.to=n,this.wrapper=r,this.rank=i}}class Oae{constructor(e,n,r){this.cache=e,this.root=n,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,n,r,i){var s;this.flushBuffer();let o=this.ensureMarks(n,r),a=o.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let l=o.children[o.children.length-1]=new No(a.dom,a.text+e);l.parent=o}else o.append(i||No.of(e,(s=this.cache.find(No))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,n){let r=this.curLine;r.dom!=n.line.dom&&(r.setDOM(this.cache.reused.has(n.line)?xy(n.line.dom):n.line.dom),this.cache.reused.set(n.line,2));let i=r;for(let a=n.marks.length-1;a>=0;a--){let l=n.marks[a],c=i.lastChild;if(c instanceof mn&&c.mark.eq(l.mark))c.dom!=l.dom&&c.setDOM(xy(l.dom)),i=c;else{if(this.cache.reused.get(l)){let f=vt.get(l.dom);f&&f.setDOM(xy(l.dom))}let u=mn.of(l.mark,l.dom);i.append(u),i=u}this.cache.reused.set(l,2)}let s=vt.get(e.text);s&&this.cache.reused.set(s,2);let o=new No(e.text,e.text.nodeValue);o.flags|=8,i.append(o)}addInlineWidget(e,n,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let s=this.ensureMarks(n,r);!i&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,n,r){this.flushBuffer(),this.ensureMarks(n,r).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let n=this.afterWidget||this.lastBlock;n.length+=e,this.pos+=e}addLineStart(e,n){var r;e||(e=kD);let i=Nl.start(e,n||((r=this.cache.find(Nl))===null||r===void 0?void 0:r.dom),!!n);this.getBlockPos().append(this.lastBlock=this.curLine=i)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,n){var r;let i=this.curLine;for(let s=e.length-1;s>=0;s--){let o=e[s],a;if(n>0&&(a=i.lastChild)&&a instanceof mn&&a.mark.eq(o))i=a,n--;else{let l=mn.of(o,(r=this.cache.find(mn,c=>c.mark.eq(o)))===null||r===void 0?void 0:r.dom);i.append(l),i=l,n=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!BT(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(ae.ios&&BT(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(by,0,32)||new ra(by.toDOM(),0,by,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let n=new gae(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let n=this.root;for(let r of this.wrappers){let i=n.lastChild;if(r.from<this.pos&&i instanceof Bs&&i.wrapper.eq(r.wrapper))n=i;else{let s=Bs.of(r.wrapper,(e=this.cache.find(Bs,o=>o.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);n.append(s),n=s}}return n}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let n=2|(e<0?16:32),r=this.cache.find(Kp,void 0,1);return r&&(r.flags=n),r||new Kp(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class yae{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:i,lineBreak:s,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=i;let a=this.textOff=Math.min(e,i.length);return s?null:i.slice(0,a)}let n=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,n);return this.textOff=n,r}}const Jp=[ra,Nl,No,mn,Kp,Bs,Tg];for(let t=0;t<Jp.length;t++)Jp[t].bucket=t;class vae{constructor(e){this.view=e,this.buckets=Jp.map(()=>[]),this.index=Jp.map(()=>0),this.reused=new Map}add(e){let n=e.constructor.bucket,r=this.buckets[n];r.length<6?r.push(e):r[this.index[n]=(this.index[n]+1)%6]=e}find(e,n,r=2){let i=e.bucket,s=this.buckets[i],o=this.index[i];for(let a=s.length-1;a>=0;a--){let l=(a+o)%s.length,c=s[l];if((!n||n(c))&&!this.reused.has(c))return s.splice(l,1),l<o&&this.index[i]--,this.reused.set(c,r),c}return null}findWidget(e,n,r){let i=this.buckets[0];if(i.length)for(let s=0,o=0;;s++){if(s==i.length){if(o)return null;o=1,s=0}let a=i[s];if(!this.reused.has(a)&&(o==0?a.widget.compare(e):a.widget.constructor==e.constructor&&e.updateDOM(a.dom,this.view)))return i.splice(s,1),s<this.index[0]&&this.index[0]--,a.widget==e&&a.length==n&&(a.flags&497)==r?(this.reused.set(a,1),a):(this.reused.set(a,2),new ra(a.dom,n,e,a.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,n=2){if(!this.reused.has(e))return this.reused.set(e,n),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class xae{constructor(e,n,r,i,s){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new vae(e),this.text=new yae(e.state.doc),this.builder=new Oae(this.cache,new Tg(e,e.contentDOM),Qe.iter(r)),this.cache.reused.set(n,2),this.old=new mae(n),this.reuseWalker={skip:(o,a,l)=>{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,n){let r=n&&this.getCompositionContext(n.text);for(let i=0,s=0,o=0;;){let a=o<e.length?e[o++]:null,l=a?a.fromA:this.old.root.length;if(l>i){let c=l-i;this.preserve(c,!o,!a),i=l,s+=c}if(!a)break;n&&a.fromA<=n.range.fromA&&a.toA>=n.range.toA?(this.forward(a.fromA,n.range.fromA,n.range.fromA<n.range.toA?1:-1),this.emit(s,n.range.fromB),this.cache.clear(),this.builder.addComposition(n,r),this.text.skip(n.range.toB-n.range.fromB),this.forward(n.range.fromA,a.toA),this.emit(n.range.toB,a.toB)):(this.forward(a.fromA,a.toA),this.emit(s,a.toB)),s=a.toB,i=a.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,n,r){let i=Sae(this.old),s=this.openMarks;this.old.advance(e,r?1:-1,{skip:(o,a,l)=>{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(l-a);else{let c=l>0||a<o.length?ra.of(o.widget,this.view,l-a,o.flags&496,this.cache.maybeReuse(o)):this.cache.reuse(o);c.flags&256?(c.flags&=-2,this.builder.addBlockWidget(c)):(this.builder.ensureLine(null),this.builder.addInlineWidget(c,i,s),s=i.length)}else if(o.isText())this.builder.ensureLine(null),!a&&l==o.length?this.builder.addText(o.text,i,s,this.cache.reuse(o)):(this.cache.add(o),this.builder.addText(o.text.slice(a,l),i,s)),s=i.length;else if(o.isLine())o.flags&=-2,this.cache.reused.set(o,1),this.builder.addLine(o);else if(o instanceof Kp)this.cache.add(o);else if(o instanceof mn)this.builder.ensureLine(null),this.builder.addMark(o,i,s),this.cache.reused.set(o,1),s=i.length;else return!1;this.openWidget=!1},enter:o=>{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof mn&&i.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?i.length&&(i.length=s=0):o instanceof mn&&(i.shift(),s=Math.min(s,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,n){let r=null,i=this.builder,s=0,o=Qe.spans(this.decorations,e,n,{point:(a,l,c,u,f,d)=>{if(c instanceof ta){if(this.disallowBlockEffectsFor[d]){if(c.block)throw new RangeError("Block decorations may not be specified via plugins");if(l>this.view.state.doc.lineAt(a).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=u.length,f>u.length)i.continueWidget(l-a);else{let h=c.widget||(c.block?jl.block:jl.inline),g=bae(c),m=this.cache.findWidget(h,l-a,g)||ra.of(h,this.view,l-a,g);c.block?(c.startSide>0&&i.addLineStartIfNotCovered(r),i.addBlockWidget(m)):(i.ensureLine(r),i.addInlineWidget(m,u,f))}r=null}else r=wae(r,c);l>a&&this.text.skip(l-a)},span:(a,l,c,u)=>{for(let f=a;f<l;){let d=this.text.next(Math.min(512,l-f));d==null?(i.addLineStartIfNotCovered(r),i.addBreak(),f++):(i.ensureLine(r),i.addText(d,c,f==a?u:c.length),f+=d.length),r=null}}});i.addLineStartIfNotCovered(r),this.openWidget=o>s,this.openMarks=o}forward(e,n,r=1){n-e<=10?this.old.advance(n-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let n=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let s=vt.get(i);if(i==this.view.contentDOM)break;s instanceof mn?n.push(s):s!=null&&s.isLine()?r=s:i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new Nl(i,kD):n.push(mn.of(new Kf({tagName:i.nodeName.toLowerCase(),attributes:Yoe(i)}),i))}return{line:r,marks:n}}}function BT(t,e){let n=r=>{for(let i of r.children)if((e?i.isText():i.length)||n(i))return!0;return!1};return n(t)}function bae(t){let e=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;return t.block&&(e|=256),e}const kD={class:"cm-line"};function wae(t,e){let n=e.spec.attributes,r=e.spec.class;return!n&&!r||(t||(t={class:"cm-line"}),n&&S1(n,t),r&&(t.class+=" "+r)),t}function Sae(t){let e=[];for(let n=t.parents.length;n>1;n--){let r=n==t.parents.length?t.tile:t.parents[n].tile;r instanceof mn&&e.push(r.mark)}return e}function xy(t){let e=vt.get(t);return e&&e.setDOM(t.cloneNode()),t}class jl extends Yr{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}jl.inline=new jl("span");jl.block=new jl("div");const by=new class extends Yr{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class VT{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=he.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Tg(e,e.contentDOM),this.updateInner([new lr(0,0,0,e.state.doc.length)],null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:f})=>f<this.minWidthFrom||u>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!Aae(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?Cae(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:u,to:f}=this.hasComposition;r=new lr(u,f,e.changes.mapPos(u,-1),e.changes.mapPos(f,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(ae.ie||ae.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,a=this.blockWrappers;this.updateDeco();let l=Eae(o,this.decorations,e.changes);l.length&&(r=lr.extendWithRanges(r,l));let c=_ae(a,this.blockWrappers,e.changes);return c.length&&(r=lr.extendWithRanges(r,c)),s&&!r.some(u=>u.fromA<=s.range.fromA&&u.toA>=s.range.toA)&&(r=s.range.addToSet(r.slice())),this.tile.flags&2&&r.length==0?!1:(this.updateInner(r,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(n||e.length){let o=this.tile,a=new xae(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);this.tile=a.run(e,n),u0(o,a.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=ae.chrome||ae.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||r.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof wy&&i.push(s.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(vD)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,s=i==r,o=!s&&!(this.view.state.facet(zi)||r.tabIndex>-1)&&vu(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||n||o))return;let a=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,c,u;if(l.empty?u=c=this.inlineDOMNearPos(l.anchor,l.assoc||1):(u=this.inlineDOMNearPos(l.head,l.head==l.from?1:-1),c=this.inlineDOMNearPos(l.anchor,l.anchor==l.from?1:-1)),ae.gecko&&l.empty&&!this.hasComposition&&kae(c)){let d=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(d,c.node.childNodes[c.offset]||null)),c=u=new Mr(d,0),a=!0}let f=this.view.observer.selectionRange;(a||!f.focusNode||(!bu(c.node,c.offset,f.anchorNode,f.anchorOffset)||!bu(u.node,u.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,l))&&(this.view.observer.ignore(()=>{ae.android&&ae.chrome&&r.contains(f.focusNode)&&$ae(f.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let d=af(this.view.root);if(d)if(l.empty){if(ae.gecko){let h=Pae(c.node,c.offset);if(h&&h!=3){let g=(h==1?rD:iD)(c.node,c.offset);g&&(c=new Mr(g.node,g.offset))}}d.collapse(c.node,c.offset),l.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=l.bidiLevel)}else if(d.extend){d.collapse(c.node,c.offset);try{d.extend(u.node,u.offset)}catch{}}else{let h=document.createRange();l.anchor>l.head&&([c,u]=[u,c]),h.setEnd(u.node,u.offset),h.setStart(c.node,c.offset),d.removeAllRanges(),d.addRange(h)}o&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(c,u)),this.impreciseAnchor=c.precise?null:new Mr(f.anchorNode,f.anchorOffset),this.impreciseHead=u.precise?null:new Mr(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&bu(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=af(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let o=this.lineAt(n.head,n.assoc);if(!o)return;let a=o.posAtStart;if(n.head==a||n.head==a+o.length)return;let l=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc,n.assoc);r.collapse(u.node,u.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=n.from&&r.collapse(i,s)}posFromDOM(e,n){let r=this.tile.nearest(e);if(!r)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let i=r.posAtStart;if(r.isComposite()){let s;if(e==r.dom)s=r.dom.childNodes[n];else{let o=ns(e)==0?0:n==0?-1:1;for(;;){let a=e.parentNode;if(a==r.dom)break;o==0&&a.firstChild!=a.lastChild&&(e==a.firstChild?o=-1:o=1),e=a}o<0?s=e:s=e.nextSibling}if(s==r.dom.firstChild)return i;for(;s&&!vt.get(s);)s=s.nextSibling;if(!s)return i+r.length;for(let o=0,a=i;;o++){let l=r.children[o];if(l.dom==s)return a;a+=l.length+l.breakAfter}}else return r.isText()?e==r.dom?i+n:i+(n?r.length:0):i}domAtPos(e,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,n);return r.isWidget()?r.domPosFor(e,n):r.domIn(i,n)}inlineDOMNearPos(e,n){let r,i=-1,s=!1,o,a=-1,l=!1;return this.tile.blockTiles((c,u)=>{if(c.isWidget()){if(c.flags&32&&u>=e)return!0;c.flags&16&&(s=!0)}else{let f=u+c.length;if(u<=e&&(r=c,i=e-u,s=f<e),f>=e&&!o&&(o=c,a=e-u,l=u>e),u>e&&o)return!0}}),!r&&!o?this.domAtPos(e,n):(s&&o?r=null:l&&r&&(o=null),r&&n<0||!o?r.domIn(i,n):o.domIn(a,n))}coordsAt(e,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,n);return r.isWidget()?r.widget instanceof wy?null:r.coordsInWidget(i,n,!0):r.coordsIn(i,n)}lineAt(e,n){let{tile:r}=this.tile.resolveBlock(e,n);return r.isLine()?r:null}coordsForChar(e){let{tile:n,offset:r}=this.tile.resolveBlock(e,1);if(!n.isLine())return null;function i(s,o){if(s.isComposite())for(let a of s.children){if(a.length>=o){let l=i(a,o);if(l)return l}if(o-=a.length,o<0)break}else if(s.isText()&&o<s.length){let a=Et(s.text,o);if(a==o)return null;let l=cf(s.dom,o,a).getClientRects();for(let c=0;c<l.length;c++){let u=l[c];if(c==l.length-1||u.top<u.bottom&&u.left<u.right)return u}}return null}return i(n,r)}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==Ye.LTR,c=0,u=(f,d,h)=>{for(let g=0;g<f.children.length&&!(d>i);g++){let m=f.children[g],v=d+m.length,y=m.dom.getBoundingClientRect(),{height:x}=y;if(h&&!g&&(c+=y.top-h.top),m instanceof Bs)v>r&&u(m,d,y);else if(d>=r&&(c>0&&n.push(-c),n.push(x+c),c=0,o)){let b=m.dom.lastChild,k=b?xu(b):[];if(k.length){let w=k[k.length-1],S=l?w.right-y.left:y.right-w.left;S>a&&(a=S,this.minWidth=s,this.minWidthFrom=d,this.minWidthTo=v)}}h&&g==f.children.length-1&&(c+=h.bottom-y.bottom),d=v+m.breakAfter}};return u(this.tile,0,null),n}textDirectionAt(e){let{tile:n}=this.tile.resolveBlock(e,1);return getComputedStyle(n.dom).direction=="rtl"?Ye.RTL:Ye.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let a=0,l;for(let c of o.children){if(!c.isText()||/[^ -~]/.test(c.text))return;let u=xu(c.dom);if(u.length!=1)return;a+=u[0].width,l=u[0].height}if(a)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:a/o.length,textHeight:l}}});if(e)return e;let n=document.createElement("div"),r,i,s;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let o=xu(n.firstChild)[0];r=n.getBoundingClientRect().height,i=o&&o.width?o.width/27:7,s=o&&o.height?o.height:r,n.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let s=i==n.viewports.length?null:n.viewports[i],o=s?s.from-1:this.view.state.doc.length;if(o>r){let a=(n.lineBlockAt(o).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(he.replace({widget:new wy(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return he.set(e)}updateDeco(){let e=1,n=this.view.state.facet(Cg).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(R1).map((s,o)=>{let a=typeof s=="function";return a&&(r=!0),a?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(Qe.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(bD).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(yD))try{if(c(this.view,e.range,e))return!0}catch(u){yn(this.view.state,u,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let s=_1(this.view),o={left:r.left-s.left,top:r.top-s.top,right:r.right+s.right,bottom:r.bottom+s.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;Goe(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==Ye.LTR)}lineHasWidget(e){let n=r=>r.isWidget()||r.children.some(n);return n(this.tile.resolveBlock(e,1).tile)}destroy(){u0(this.tile)}}function u0(t,e){let n=e==null?void 0:e.get(t);if(n!=1){n==null&&t.destroy();for(let r of t.children)u0(r,e)}}function kae(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function CD(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=rD(n.focusNode,n.focusOffset),i=iD(n.focusNode,n.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let a=vt.get(i.node);if(!a||a.isText()&&a.text!=i.node.nodeValue)s=i;else if(t.docView.lastCompositionAfterCursor){let l=vt.get(r.node);!l||l.isText()&&l.text!=r.node.nodeValue||(s=i)}}if(t.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function Cae(t,e,n){let r=CD(t,n);if(!r)return null;let{node:i,from:s,to:o}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc;return{range:new lr(l.mapPos(s),l.mapPos(o),s,o),text:i}}function Pae(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let Tae=class{constructor(){this.changes=[]}compareRange(e,n){cl(e,n,this.changes)}comparePoint(e,n){cl(e,n,this.changes)}boundChange(e){cl(e,e,this.changes)}};function Eae(t,e,n){let r=new Tae;return Qe.compare(t,e,n,r),r.changes}class Rae{constructor(){this.changes=[]}compareRange(e,n){cl(e,n,this.changes)}comparePoint(){}boundChange(e){cl(e,e,this.changes)}}function _ae(t,e,n){let r=new Rae;return Qe.compare(t,e,n,r),r.changes}function $ae(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function Aae(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}class wy extends Yr{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function Qae(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),s=e-i.from;if(i.length==0)return Z.cursor(e);s==0?n=1:s==i.length&&(n=-1);let o=s,a=s;n<0?o=Et(i.text,s,!1):a=Et(i.text,s);let l=r(i.text.slice(o,a));for(;o>0;){let c=Et(i.text,o,!1);if(r(i.text.slice(c,o))!=l)break;o=c}for(;a<i.length;){let c=Et(i.text,a);if(r(i.text.slice(a,c))!=l)break;a=c}return Z.range(o+i.from,a+i.from)}function Iae(t,e,n,r,i){let s=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((i-n.top-(t.defaultLineHeight-a)*.5)/a);s+=l*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+Kx(o,s,t.state.tabSize)}function f0(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==Dt.Text&&(i.type!=s.type||(n<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function Nae(t,e,n,r){let i=f0(t,e.head,e.assoc||-1),s=!r||i.type!=Dt.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let o=t.dom.getBoundingClientRect(),a=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(a==Ye.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(l!=null)return Z.cursor(l,n?-1:1)}return Z.cursor(n?i.to:i.from,n?-1:1)}function FT(t,e,n,r){let i=t.state.doc.lineAt(e.head),s=t.bidiSpans(i),o=t.textDirectionAt(i.from);for(let a=e,l=null;;){let c=cae(i,s,o,a,n),u=cD;if(!c){if(i.number==(n?t.state.doc.lines:1))return a;u=`
|
|
483
|
+
`,i=t.state.doc.line(i.number+(n?1:-1)),s=t.bidiSpans(i),c=t.visualLineSide(i,!n)}if(l){if(!l(u))return a}else{if(!r)return c;l=r(u)}a=c}}function jae(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return s=>{let o=r(s);return i==st.Space&&(i=o),i==o}}function Mae(t,e,n,r){let i=e.head,s=n?1:-1;if(i==(n?t.state.doc.length:0))return Z.cursor(i,e.assoc);let o=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(i,(e.empty?e.assoc:0)||(n?1:-1)),u=t.documentTop;if(c)o==null&&(o=c.left-l.left),a=s<0?c.top:c.bottom;else{let g=t.viewState.lineBlockAt(i);o==null&&(o=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-g.from))),a=(s<0?g.top:g.bottom)+u}let f=l.left+o,d=r??t.viewState.heightOracle.textHeight>>1,h=d0(t,{x:f,y:a+d*s},!1,s);return Z.cursor(h.pos,h.assoc,void 0,o)}function wu(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(s,o,a)=>{if(e>s&&e<o){let l=r||n||(e-s<o-e?-1:1);e=l<0?s:o,r=l}});if(!r)return e}}function PD(t,e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=wu(t,i.from,0);o!=i.from&&(s=Z.cursor(o,-1))}else{let o=wu(t,i.from,-1),a=wu(t,i.to,1);(o!=i.from||a!=i.to)&&(s=Z.range(i.from==i.anchor?o:a,i.from==i.head?o:a))}s&&(n||(n=e.ranges.slice()),n[r]=s)}return n?Z.create(n,e.mainIndex):e}function Sy(t,e,n){let r=wu(t.state.facet(ed).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:Z.cursor(r,r<n.from?1:-1)}class pi{constructor(e,n){this.pos=e,this.assoc=n}}function d0(t,e,n,r){let i=t.contentDOM.getBoundingClientRect(),s=i.top+t.viewState.paddingTop,{x:o,y:a}=e,l=a-s,c;for(;;){if(l<0)return new pi(0,1);if(l>t.viewState.docHeight)return new pi(t.state.doc.length,-1);if(c=t.elementAtHeight(l),r==null)break;if(c.type==Dt.Text){if(r<0?c.to<t.viewport.from:c.from>t.viewport.to)break;let d=t.docView.coordsAt(r<0?c.from:c.to,r>0?-1:1);if(d&&(r<0?d.top<=l+s:d.bottom>=l+s))break}let f=t.viewState.heightOracle.textHeight/2;l=r>0?c.bottom+f:c.top-f}if(t.viewport.from>=c.to||t.viewport.to<=c.from){if(n)return null;if(c.type==Dt.Text){let f=Iae(t,i,c,o,a);return new pi(f,f==c.from?1:-1)}}if(c.type!=Dt.Text)return l<(c.top+c.bottom)/2?new pi(c.from,1):new pi(c.to,-1);let u=t.docView.lineAt(c.from,2);return(!u||u.length!=c.length)&&(u=t.docView.lineAt(c.from,-2)),new Dae(t,o,a,t.textDirectionAt(c.from)).scanTile(u,c.from)}class Dae{constructor(e,n,r,i){this.view=e,this.x=n,this.y=r,this.baseDir=i,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,n){let{line:r,spans:i}=this.bidiSpansAt(e);return i[gi.find(i,e-r.from,-1,n)].level==this.baseDir}dirAt(e,n){let{line:r,spans:i}=this.bidiSpansAt(e);return i[gi.find(i,e-r.from,-1,n)].dir}bidiIn(e,n){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<n)}scan(e,n){let r=0,i=e.length-1,s=new Set,o=this.bidiIn(e[0],e[i]),a,l,c=-1,u=1e9,f;e:for(;r<i;){let h=i-r,g=r+i>>1;t:if(s.has(g)){let v=r+Math.floor(Math.random()*h);for(let y=0;y<h;y++){if(!s.has(v)){g=v;break t}v++,v==i&&(v=r)}break e}s.add(g);let m=n(g);if(m)for(let v=0;v<m.length;v++){let y=m[v],x=0;if(y.bottom<this.y)(!a||a.bottom<y.bottom)&&(a=y),x=1;else if(y.top>this.y)(!l||l.top>y.top)&&(l=y),x=-1;else{let b=y.left>this.x?this.x-y.left:y.right<this.x?this.x-y.right:0,k=Math.abs(b);k<u&&(c=g,u=k,f=y),b&&(x=b<0==(this.baseDir==Ye.LTR)?-1:1)}x==-1&&(!o||this.baseDirAt(e[g],1))?i=g:x==1&&(!o||this.baseDirAt(e[g+1],-1))&&(r=g+1)}}if(!f){let h=a&&(!l||this.y-a.bottom<l.top-this.y)?a:l;return this.y=(h.top+h.bottom)/2,this.scan(e,n)}let d=(o?this.dirAt(e[c],1):this.baseDir)==Ye.LTR;return{i:c,after:this.x>(f.left+f.right)/2==d}}scanText(e,n){let r=[];for(let s=0;s<e.length;s=Et(e.text,s))r.push(n+s);r.push(n+e.length);let i=this.scan(r,s=>{let o=r[s]-n,a=r[s+1]-n;return cf(e.dom,o,a).getClientRects()});return i.after?new pi(r[i.i+1],-1):new pi(r[i.i],1)}scanTile(e,n){if(!e.length)return new pi(n,1);if(e.children.length==1){let a=e.children[0];if(a.isText())return this.scanText(a,n);if(a.isComposite())return this.scanTile(a,n)}let r=[n];for(let a=0,l=n;a<e.children.length;a++)r.push(l+=e.children[a].length);let i=this.scan(r,a=>{let l=e.children[a];return l.flags&48?null:(l.dom.nodeType==1?l.dom:cf(l.dom,0,l.length)).getClientRects()}),s=e.children[i.i],o=r[i.i];return s.isText()?this.scanText(s,o):s.isComposite()?this.scanTile(s,o):i.after?new pi(r[i.i+1],-1):new pi(o,1)}}const Kc="";class Lae{constructor(e,n){this.points=e,this.view=n,this.text="",this.lineSeparator=n.state.facet(Ae.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Kc}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let o=vt.get(i),a=i.nextSibling;if(a==n){o!=null&&o.breakAfter&&!a&&r!=this.view.contentDOM&&this.lineBreak();break}let l=vt.get(a);(o&&l?o.breakAfter:(o?o.breakAfter:Hp(i))||Hp(a)&&(i.nodeName!="BR"||o!=null&&o.isWidget())&&this.text.length>s)&&!Bae(a,n)&&this.lineBreak(),i=a}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,a;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(a=i.exec(n))&&(s=a.index,o=a[0].length),this.append(n.slice(r,s<0?n.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);r=s+o}}readNode(e){let n=vt.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(zae(e,r.node,r.offset)?n:0))}}function zae(t,e,n){for(;;){if(!e||n<ns(e))return!1;if(e==t)return!0;n=Gs(e)+1,e=e.parentNode}}function Bae(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let r=vt.get(t);if(!(r!=null&&r.isWidget()))return!1;r&&(n||(n=[])).push(r)}if(n)for(let r of n){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}class XT{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class Vae{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=TD(e.docView.tile,n,r,0))){let a=s||o?[]:Xae(e),l=new Lae(a,e);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=Zae(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=s&&s.node==a.focusNode&&s.offset==a.focusOffset||!s0(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!s0(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((ae.ios||ae.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.to<e.state.doc.length)){let f=Math.min(l,c),d=Math.max(l,c),h=u.from-f,g=u.to-d;(h==0||h==1||f==0)&&(g==0||g==-1||d==e.state.doc.length)&&(l=0,c=e.state.doc.length)}e.inputState.composing>-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(Z.range(c,l)):this.newSel=Z.single(c,l)}}}function TD(t,e,n,r){if(t.isComposite()){let i=-1,s=-1,o=-1,a=-1;for(let l=0,c=r,u=r;l<t.children.length;l++){let f=t.children[l],d=c+f.length;if(c<e&&d>n)return TD(f,e,n,c);if(d>=e&&i==-1&&(i=l,s=c),c>n&&f.dom.parentNode==t.dom){o=l,a=u;break}u=d,c=d+f.breakAfter}return{from:s,to:a<0?r+t.length:a,startDOM:(i?t.children[i-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:o<t.children.length&&o>=0?t.children[o].dom:null}}else return t.isText()?{from:r,to:r+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}function ED(t,e){let n,{newSel:r}=e,i=t.state.selection.main,s=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,l=i.from,c=null;(s===8||ae.android&&e.text.length<a-o)&&(l=i.to,c="end");let u=RD(t.state.doc.sliceString(o,a,Kc),e.text,l-o,c);u&&(ae.chrome&&s==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==Kc+Kc&&u.toB--,n={from:o+u.from,to:o+u.toA,insert:Le.of(e.text.slice(u.from,u.toB).split(Kc))})}else r&&(!t.hasFocus&&t.state.facet(zi)||em(r,i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:(ae.mac||ae.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=Z.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:Le.of([n.insert.toString().replace("."," ")])}):n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:t.state.doc.lineAt(i.from).to<i.to&&t.docView.lineHasWidget(i.to)&&t.inputState.insertingTextAt>Date.now()-50?n={from:i.from,to:i.to,insert:t.state.toText(t.inputState.insertingText)}:ae.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
|
|
484
|
+
`&&t.lineWrapping&&(r&&(r=Z.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Le.of([" "])}),n)return $1(t,n,r,s);if(r&&!em(r,i)){let o=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),a=t.inputState.lastSelectionOrigin,a=="select.pointer"&&(r=PD(t.state.facet(ed).map(l=>l(t)),r))),t.dispatch({selection:r,scrollIntoView:o,userEvent:a}),!0}else return!1}function $1(t,e,n,r=-1){if(ae.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(ae.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&ul(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&ul(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&ul(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,a=()=>o||(o=Fae(t,e,n));return t.state.facet(pD).some(l=>l(t,e.from,e.to,s,a))||t.dispatch(a()),!0}function Fae(t,e,n){let r,i=t.state,s=i.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let l=e.from<s.from?-1:1,c=l<0?s.from:s.to,u=wu(i.facet(ed).map(f=>f(t)),c,l);e.from==u&&(o=u)}if(o>-1)r={changes:e,selection:Z.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=s.from<e.from?i.sliceDoc(s.from,e.from):"",c=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let l=i.changes(e),c=n&&n.main.to<=l.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let u=t.state.sliceDoc(e.from,e.to),f,d=n&&CD(t,n.main.head);if(d){let g=e.insert.length-(e.to-e.from);f={from:d.from,to:d.to-g}}else f=t.state.doc.lineAt(s.head);let h=s.to-e.to;r=i.changeByRange(g=>{if(g.from==s.from&&g.to==s.to)return{changes:l,range:c||g.map(l)};let m=g.to-h,v=m-u.length;if(t.state.sliceDoc(v,m)!=u||m>=f.from&&v<=f.to)return{range:g};let y=i.changes({from:v,to:m,insert:e.insert}),x=g.to-s.to;return{changes:y,range:c?Z.range(Math.max(0,c.anchor+x),Math.max(0,c.head+x)):g.map(y)}})}else r={changes:l,selection:c&&i.selection.replaceRange(c)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}function RD(t,e,n,r){let i=Math.min(t.length,e.length),s=0;for(;s<i&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&t.length==e.length)return null;let o=t.length,a=e.length;for(;o>0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;if(r=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o<s&&t.length<e.length){let l=n<=s&&n>=o?s-n:0;s-=l,a=s+(a-o),o=s}else if(a<s){let l=n<=s&&n>=a?s-n:0;s-=l,o=s+(o-a),a=s}return{from:s,toA:o,toB:a}}function Xae(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new XT(n,r)),(i!=n||s!=r)&&e.push(new XT(i,s))),e}function Zae(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?Z.single(n+e,r+e):null}function em(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class Wae{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,ae.safari&&e.contentDOM.addEventListener("input",()=>null),ae.gecko&&ale(e.contentDOM.ownerDocument)}handleEvent(e){!ele(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=qae(e),r=this.handlers,i=this.view.contentDOM;for(let s in n)if(s!="scroll"){let o=!n[s].handlers.length,a=r[s];a&&o!=!a.handlers.length&&(i.removeEventListener(s,this.handleEvent),a=null),a||i.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!n[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&$D.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),ae.android&&ae.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return ae.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=_D.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||Yae.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,ul(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:ae.safari&&!ae.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function ZT(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){yn(n.state,i)}}}function qae(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec,s=i&&i.plugin.domEventHandlers,o=i&&i.plugin.domEventObservers;if(s)for(let a in s){let l=s[a];l&&n(a).handlers.push(ZT(r.value,l))}if(o)for(let a in o){let l=o[a];l&&n(a).observers.push(ZT(r.value,l))}}for(let r in Wr)n(r).handlers.push(Wr[r]);for(let r in yr)n(r).observers.push(yr[r]);return e}const _D=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Yae="dthko",$D=[16,17,18,20,91,92,224,225],Zd=6;function Wd(t){return Math.max(0,t)*.7+8}function Uae(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class Hae{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=Koe(e.contentDOM),this.atoms=e.state.facet(ed).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Ae.allowMultipleSelections)&&Gae(e,n),this.dragging=Jae(e,n)&&ID(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&Uae(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,s=0,o=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=_1(this.view);e.clientX-l.left<=i+Zd?n=-Wd(i-e.clientX):e.clientX+l.right>=o-Zd&&(n=Wd(e.clientX-o)),e.clientY-l.top<=s+Zd?r=-Wd(s-e.clientY):e.clientY+l.bottom>=a-Zd&&(r=Wd(e.clientY-a)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,r=PD(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function Gae(t,e){let n=t.state.facet(uD);return n.length?n[0](e):ae.mac?e.metaKey:e.ctrlKey}function Kae(t,e){let n=t.state.facet(fD);return n.length?n[0](e):ae.mac?!e.altKey:!e.ctrlKey}function Jae(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=af(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let o=i[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function ele(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=vt.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const Wr=Object.create(null),yr=Object.create(null),AD=ae.ie&&ae.ie_version<15||ae.ios&&ae.webkit_version<604;function tle(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),QD(t,n.value)},50)}function Eg(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function QD(t,e){e=Eg(t.state,P1,e);let{state:n}=t,r,i=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(h0!=null&&n.selection.ranges.every(l=>l.empty)&&h0==s.toString()){let l=-1;r=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let f=n.toText((o?s.line(i++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:f},range:Z.cursor(c.from+f.length)}})}else o?r=n.changeByRange(l=>{let c=s.line(i++);return{changes:{from:l.from,to:l.to,insert:c.text},range:Z.cursor(l.from+c.length)}}):r=n.replaceSelection(s);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}yr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Wr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);yr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};yr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Wr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(dD))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=rle(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new Hae(t,e,n,r)),r&&t.observer.ignore(()=>{tD(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function WT(t,e,n,r){if(r==1)return Z.cursor(e,n);if(r==2)return Qae(t.state,e,n);{let i=t.docView.lineAt(e,n),s=t.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,a=i?i.posAtEnd:s.to;return a<t.state.doc.length&&a==s.to&&a++,Z.range(o,a)}}const nle=ae.ie&&ae.ie_version<=11;let qT=null,YT=0,UT=0;function ID(t){if(!nle)return t.detail;let e=qT,n=UT;return qT=t,UT=Date.now(),YT=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(YT+1)%3:1}function rle(t,e){let n=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=ID(e),i=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),i=i.map(s.changes))},get(s,o,a){let l=t.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),c,u=WT(t,l.pos,l.assoc,r);if(n.pos!=l.pos&&!o){let f=WT(t,n.pos,n.assoc,r),d=Math.min(f.from,u.from),h=Math.max(f.to,u.to);u=d<u.from?Z.range(d,h):Z.range(h,d)}return o?i.replaceRange(i.main.extend(u.from,u.to)):a&&r==1&&i.ranges.length>1&&(c=ile(i,l.pos))?c:a?i.addRange(u):Z.create([u])}}}function ile(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return Z.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Wr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.tile.nearest(e.target);if(i&&i.isWidget()){let s=i.posAtStart,o=s+i.length;(s>=n.to||o<=n.from)&&(n=Z.range(s,o))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",Eg(t.state,T1,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Wr.dragend=t=>(t.inputState.draggedContent=null,!1);function HT(t,e,n,r){if(n=Eg(t.state,P1,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=r&&s&&Kae(t,e)?{from:s.from,to:s.to}:null,a={from:i,insert:n},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Wr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,s=()=>{++i==n.length&&HT(t,e,r.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o<n.length;o++){let a=new FileReader;a.onerror=s,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(r[o]=a.result),s()},a.readAsText(n[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return HT(t,e,r,!0),!0}return!1};Wr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=AD?null:e.clipboardData;return n?(QD(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(tle(t),!1)};function sle(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function ole(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>i&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),i=o.number}r=!0}return{text:Eg(t,T1,e.join(t.lineBreak)),ranges:n,linewise:r}}let h0=null;Wr.copy=Wr.cut=(t,e)=>{if(!vu(t.contentDOM,t.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=ole(t.state);if(!n&&!i)return!1;h0=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=AD?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(sle(t,n),!1)};const ND=Ri.define();function jD(t,e){let n=[];for(let r of t.facet(mD)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:ND.of(!0)}):null}function MD(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=jD(t.state,e);n?t.dispatch(n):t.update([])}},10)}yr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),MD(t)};yr.blur=t=>{t.observer.clearSelectionRange(),MD(t)};yr.compositionstart=yr.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};yr.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,ae.chrome&&ae.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};yr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Wr.beforeinput=(t,e)=>{var n,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let a=o[0],l=t.posAtDOM(a.startContainer,a.startOffset),c=t.posAtDOM(a.endContainer,a.endOffset);return $1(t,{from:l,to:c,insert:t.state.toText(s)},null),!0}}let i;if(ae.chrome&&ae.android&&(i=_D.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return ae.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),ae.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>yr.compositionend(t,e),20),!1};const GT=new Set;function ale(t){GT.has(t)||(GT.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const KT=["pre-wrap","normal","pre-line","break-spaces"];let Ml=!1;function JT(){Ml=!1}class lle{constructor(e){this.lineWrapping=e,this.doc=Le.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return KT.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,s,o){let a=KT.indexOf(e)>-1,l=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=a||Math.abs(r-this.charWidth)>.1;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=s,l){this.heightSamples={};for(let c=0;c<o.length;c++){let u=o[c];u<0?c++:this.heightSamples[Math.floor(u*10)]=!0}}return l}}class cle{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class jr{constructor(e,n,r,i,s){this.from=e,this.length=n,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?Dt.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof ta?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new jr(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var Ke=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(Ke||(Ke={}));const Vh=.001;class rn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Vh&&(Ml=!0),this.height=e)}replace(e,n,r){return rn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let s=this,o=r.doc;for(let a=i.length-1;a>=0;a--){let{fromA:l,toA:c,fromB:u,toB:f}=i[a],d=s.lineAt(l,Ke.ByPosNoHeight,r.setDoc(n),0,0),h=d.to>=c?d:s.lineAt(c,Ke.ByPosNoHeight,r,0,0);for(f+=h.to-c,c=h.to;a>0&&d.from<=i[a-1].toA;)l=i[a-1].fromA,u=i[a-1].fromB,a--,l<d.from&&(d=s.lineAt(l,Ke.ByPosNoHeight,r,0,0));u+=d.from-l,l=d.from;let g=A1.build(r.setDoc(o),e,u,f);s=tm(s,s.replace(l,c,g))}return s.updateHeight(r,0)}static empty(){return new jn(0,0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,s=0;for(;;)if(n==r)if(i>s*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),r+=1+a.break,i-=a.size}else if(s>i*2){let a=e[r];a.break?e.splice(r,1,a.left,null,a.right):e.splice(r,1,a.left,a.right),r+=2+a.break,s-=a.size}else break;else if(i<s){let a=e[n++];a&&(i+=a.size)}else{let a=e[--r];a&&(s+=a.size)}let o=0;return e[n-1]==null?(o=1,n--):e[n]==null&&(o=1,r++),new fle(rn.of(e.slice(0,n)),o,rn.of(e.slice(r)))}}function tm(t,e){return t==e?t:(t.constructor!=e.constructor&&(Ml=!0),e)}rn.prototype.size=1;const ule=he.replace({});class DD extends rn{constructor(e,n,r){super(e,n),this.deco=r,this.spaceAbove=0}mainBlock(e,n){return new jr(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,n,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new jr(i,0,r,this.spaceAbove,ule):this.mainBlock(r,i)}lineAt(e,n,r,i,s){let o=this.mainBlock(i,s);return this.spaceAbove?this.blockAt(0,r,i,s).join(o):o}forEachLine(e,n,r,i,s,o){e<=s+this.length&&n>=s&&o(this.lineAt(0,Ke.ByPos,r,i,s))}setMeasuredHeight(e){let n=e.heights[e.index++];n<0?(this.spaceAbove=-n,n=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class jn extends DD{constructor(e,n,r){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,n){return new jr(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof jn||i instanceof It&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof It?i=new jn(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):rn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class It extends rn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,s=i-r+1,o,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*s);o=l/s,this.length>s+1&&(a=(this.height-l)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:i,perLine:o,perChar:a}}blockAt(e,n,r,i){let{firstLine:s,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let c=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),u=n.doc.lineAt(c),f=a+u.length*l,d=Math.max(r,e-f/2);return new jr(u.from,u.length,d,f,0)}else{let c=Math.max(0,Math.min(o-s,Math.floor((e-r)/a))),{from:u,length:f}=n.doc.line(s+c);return new jr(u,f,r+a*c,a,0)}}lineAt(e,n,r,i,s){if(n==Ke.ByHeight)return this.blockAt(e,r,i,s);if(n==Ke.ByPosNoHeight){let{from:h,to:g}=r.doc.lineAt(e);return new jr(h,g-h,0,0,0)}let{firstLine:o,perLine:a,perChar:l}=this.heightMetrics(r,s),c=r.doc.lineAt(e),u=a+c.length*l,f=c.number-o,d=i+a*f+l*(c.from-s-f);return new jr(c.from,c.length,Math.max(i,Math.min(d,i+this.height-u)),u,0)}forEachLine(e,n,r,i,s,o){e=Math.max(e,s),n=Math.min(n,s+this.length);let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(r,s);for(let u=e,f=i;u<=n;){let d=r.doc.lineAt(u);if(u==e){let g=d.number-a;f+=l*g+c*(e-s-g)}let h=l+c*d.length;o(new jr(d.from,d.length,f,h,0)),f+=h,u=d.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let s=r[r.length-1];s instanceof It?r[r.length-1]=new It(s.length+i):r.push(null,new It(i-1))}if(e>0){let s=r[0];s instanceof It?r[0]=new It(e+s.length):r.unshift(new It(e-1),null)}return rn.of(r)}decomposeLeft(e,n){n.push(new It(e-1),null)}decomposeRight(e,n){n.push(null,new It(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let s=n+this.length;if(i&&i.from<=n+this.length&&i.more){let o=[],a=Math.max(n,i.from),l=-1;for(i.from>n&&o.push(new It(i.from-n-1).updateHeight(e,n));a<=s&&i.more;){let u=e.doc.lineAt(a).length;o.length&&o.push(null);let f=i.heights[i.index++],d=0;f<0&&(d=-f,f=i.heights[i.index++]),l==-1?l=f:Math.abs(f-l)>=Vh&&(l=-2);let h=new jn(u,f,d);h.outdated=!1,o.push(h),a+=u+1}a<=s&&o.push(null,new It(s-a).updateHeight(e,a));let c=rn.of(o);return(l<0||Math.abs(c.height-this.height)>=Vh||Math.abs(l-this.heightMetrics(e,n).perLine)>=Vh)&&(Ml=!0),tm(this,c)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class fle extends rn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,s,i+this.left.length+this.break)}lineAt(e,n,r,i,s){let o=i+this.left.height,a=s+this.left.length+this.break,l=n==Ke.ByHeight?e<o:e<a,c=l?this.left.lineAt(e,n,r,i,s):this.right.lineAt(e,n,r,o,a);if(this.break||(l?c.to<a:c.from>a))return c;let u=n==Ke.ByPosNoHeight?Ke.ByPosNoHeight:Ke.ByPos;return l?c.join(this.right.lineAt(a,u,r,o,a)):this.left.lineAt(a,u,r,i,s).join(c)}forEachLine(e,n,r,i,s,o){let a=i+this.left.height,l=s+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,n,r,i,s,o),n>=l&&this.right.forEachLine(e,n,r,a,l,o);else{let c=this.lineAt(l,Ke.ByPos,r,i,s);e<c.from&&this.left.forEachLine(e,c.from-1,r,i,s,o),c.to>=e&&c.from<=n&&o(c),n>c.to&&this.right.forEachLine(c.to+1,n,r,a,l,o)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let a of r)s.push(a);if(e>0&&eE(s,o-1),n<this.length){let a=s.length;this.decomposeRight(n,s),eE(s,a)}return rn.of(s)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?rn.of(this.break?[e,null,n]:[e,n]):(this.left=tm(this.left,e),this.right=tm(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:s,right:o}=this,a=n+s.length+this.break,l=null;return i&&i.from<=n+s.length&&i.more?l=s=s.updateHeight(e,n,r,i):s.updateHeight(e,n,r),i&&i.from<=a+o.length&&i.more?l=o=o.updateHeight(e,a,r,i):o.updateHeight(e,a,r),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function eE(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof It&&(r=t[e+1])instanceof It&&t.splice(e-1,3,new It(n.length+1+r.length))}const dle=5;class A1{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof jn?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new jn(r-this.pos,-1,0)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=n-e;r.block?this.addBlock(new DD(o,i,r)):(o||s||i>=dle)&&this.addLineDeco(i,s,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new jn(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,n){let r=new It(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof jn)return e;let n=new jn(0,-1,0);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof jn)&&!this.isCovered?this.nodes.push(new jn(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof jn&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let s=new A1(r,e);return Qe.spans(n,r,i,s,0),s.finish(r)}}function hle(t,e,n){let r=new ple;return Qe.compare(t,e,n,r,0),r.changes}class ple{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&cl(e,n,this.changes,5)}}function mle(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,s=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let c=t.parentNode;c&&c!=r.body;)if(c.nodeType==1){let u=c,f=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let d=u.getBoundingClientRect();s=Math.max(s,d.left),o=Math.min(o,d.right),a=Math.max(a,d.top),l=Math.min(c==t.parentNode?i.innerHeight:l,d.bottom)}c=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function gle(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function Ole(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class ky{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=n[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,n){return he.replace({widget:new yle(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class yle extends Yr{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class tE{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=nE,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Ye.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(E1).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new lle(n),this.stateDeco=rE(e),this.heightMap=rn.empty().applyChanges(this.stateDeco,Le.empty,this.heightOracle.setDoc(e.doc),[new lr(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=he.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new qd(s,o))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?nE:new Q1(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Jc(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=rE(this.state);let i=e.changedRanges,s=lr.extendWithRanges(i,hle(r,this.stateDeco,e?e.changes:wt.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);JT(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||Ml)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(OD)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Ye.RTL:Ye.LTR;let o=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent,a=n.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0;if(a.width&&a.height){let{scaleX:k,scaleY:w}=eD(n,a);(k>.005&&Math.abs(this.scaleX-k)>.005||w>.005&&Math.abs(this.scaleY-w)>.005)&&(this.scaleX=k,this.scaleY=w,c|=16,o=l=!0)}let f=(parseInt(r.paddingTop)||0)*this.scaleY,d=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=d)&&(this.paddingTop=f,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=nD(e.scrollDOM);let g=(this.printing?Ole:mle)(n,this.paddingTop),m=g.top-this.pixelViewport.top,v=g.bottom-this.pixelViewport.bottom;this.pixelViewport=g;let y=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(y!=this.inView&&(this.inView=y,y&&(l=!0)),!this.inView&&!this.scrollTarget&&!gle(e.dom))return 0;let x=a.width;if((this.contentDOMWidth!=x||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let k=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(k)&&(o=!0),o||i.lineWrapping&&Math.abs(x-this.contentDOMWidth)>i.charWidth){let{lineHeight:w,charWidth:S,textHeight:C}=e.docView.measureTextSize();o=w>0&&i.refresh(s,w,S,C,Math.max(5,x/S),k),o&&(e.docView.minWidth=0,c|=16)}m>0&&v>0?u=Math.max(m,v):m<0&&v<0&&(u=Math.min(m,v)),JT();for(let w of this.viewports){let S=w.from==this.viewport.from?k:e.docView.measureVisibleLineHeights(w);this.heightMap=(o?rn.empty().applyChanges(this.stateDeco,Le.empty,this.heightOracle,[new lr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new cle(w.from,S))}Ml&&(c|=2)}let b=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return b&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new qd(i.lineAt(o-r*1e3,Ke.ByHeight,s,0,0).from,i.lineAt(a+(1-r)*1e3,Ke.ByHeight,s,0,0).to);if(n){let{head:c}=n.range;if(c<l.from||c>l.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(c,Ke.ByPos,s,0,0),d;n.y=="center"?d=(f.top+f.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c<l.from?d=f.top:d=f.bottom-u,l=new qd(i.lineAt(d-1e3/2,Ke.ByHeight,s,0,0).from,i.lineAt(d+u+1e3/2,Ke.ByHeight,s,0,0).to)}}return l}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new qd(this.heightMap.lineAt(r,Ke.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,Ke.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,Ke.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(n,Ke.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||s>=a+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<a+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new ky(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=Ye.LTR&&!r)return[];let a=[],l=(u,f,d,h)=>{if(f-u<s)return;let g=this.state.selection.main,m=[g.from];g.empty||m.push(g.to);for(let y of m)if(y>u&&y<f){l(u,y-10,d,h),l(y+10,f,d,h);return}let v=xle(e,y=>y.from>=d.from&&y.to<=d.to&&Math.abs(y.from-u)<s&&Math.abs(y.to-f)<s&&!m.some(x=>y.from<x&&y.to>x));if(!v){if(f<d.to&&n&&r&&n.visibleRanges.some(b=>b.from<=f&&b.to>=f)){let b=n.moveToLineBoundary(Z.cursor(f),!1,!0).head;b>u&&(f=b)}let y=this.gapSize(d,u,f,h),x=r||y<2e6?y:2e6;v=new ky(u,f,y,x)}a.push(v)},c=u=>{if(u.length<o||u.type!=Dt.Text)return;let f=vle(u.from,u.to,this.stateDeco);if(f.total<o)return;let d=this.scrollTarget?this.scrollTarget.range.head:null,h,g;if(r){let m=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,v,y;if(d!=null){let x=Ud(f,d),b=((this.visibleBottom-this.visibleTop)/2+m)/u.height;v=x-b,y=x+b}else v=(this.visibleTop-u.top-m)/u.height,y=(this.visibleBottom-u.top+m)/u.height;h=Yd(f,v),g=Yd(f,y)}else{let m=f.total*this.heightOracle.charWidth,v=i*this.heightOracle.charWidth,y=0;if(m>2e6)for(let S of e)S.from>=u.from&&S.from<u.to&&S.size!=S.displaySize&&S.from*this.heightOracle.charWidth+y<this.pixelViewport.left&&(y=S.size-S.displaySize);let x=this.pixelViewport.left+y,b=this.pixelViewport.right+y,k,w;if(d!=null){let S=Ud(f,d),C=((b-x)/2+v)/m;k=S-C,w=S+C}else k=(x-v)/m,w=(b+v)/m;h=Yd(f,k),g=Yd(f,w)}h>u.from&&l(u.from,h,u,f),g<u.to&&l(g,u.to,u,f)};for(let u of this.viewportLines)Array.isArray(u.type)?u.type.forEach(c):c(u);return a}gapSize(e,n,r,i){let s=Ud(i,r)-Ud(i,n);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){ky.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=he.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];Qe.spans(n,this.viewport.from,this.viewport.to,{span(s,o){r.push({from:s,to:o})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let o=this.visibleRanges[s],a=r[s];(o.from!=a.from||o.to!=a.to)&&(i|=4,e&&e.mapPos(o.from,-1)==a.from&&e.mapPos(o.to,1)==a.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Jc(this.heightMap.lineAt(e,Ke.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||Jc(this.heightMap.lineAt(this.scaler.fromDOM(e),Ke.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Jc(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}let qd=class{constructor(e,n){this.from=e,this.to=n}};function vle(t,e,n){let r=[],i=t,s=0;return Qe.spans(n,t,e,{span(){},point(o,a){o>i&&(r.push({from:i,to:o}),s+=o-i),i=a}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function Yd({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:s,to:o}=e[i],a=o-s;if(r<=a)return s+r;r-=a}}function Ud(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function xle(t,e){for(let n of t)if(e(n))return n}const nE={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function rE(t){let e=t.facet(Cg).filter(r=>typeof r!="function"),n=t.facet(R1).filter(r=>typeof r!="function");return n.length&&e.push(Qe.join(n)),e}class Q1{constructor(e,n,r){let i=0,s=0,o=0;this.viewports=r.map(({from:a,to:l})=>{let c=n.lineAt(a,Ke.ByPos,e,0,0).top,u=n.lineAt(l,Ke.ByPos,e,0,0).bottom;return i+=u-c,{from:a,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let a of this.viewports)a.domTop=o+(a.top-s)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),s=a.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof Q1?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function Jc(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new jr(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>Jc(i,e)):t._content)}const Hd=oe.define({combine:t=>t.join(" ")}),p0=oe.define({combine:t=>t.indexOf(!0)>-1}),m0=Us.newName(),LD=Us.newName(),zD=Us.newName(),BD={"&light":"."+LD,"&dark":"."+zD};function g0(t,e,n){return new Us(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const ble=g0("."+m0,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},BD),wle={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Cy=ae.ie&&ae.ie_version<=11;class Sle{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Joe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(ae.ie&&ae.ie_version<=11||ae.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&ae.android&&e.constructor.EDIT_CONTEXT!==!1&&!(ae.chrome&&ae.chrome_version<126)&&(this.editContext=new Cle(e),e.state.facet(zi)&&(e.contentDOM.editContext=this.editContext.editContext)),Cy&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(zi)?r.root.activeElement!=this.dom:!vu(this.dom,i))return;let s=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(ae.ie&&ae.ie_version<=11||ae.android&&ae.chrome)&&!r.state.selection.main.empty&&i.focusNode&&bu(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=af(e.root);if(!n)return!1;let r=ae.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&kle(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=vu(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&tae(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,wle),Cy&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Cy&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&ul(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),n==-1?{from:n,to:r}=o:(n=Math.min(o.from,n),r=Math.max(o.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&vu(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new Vae(this.view,e,n,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=ED(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!em(this.view.state.selection,n.newSel.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.tile.nearest(e.target);if(!n||n.isWidget())return null;if(n.markDirty(e.type=="attributes"),e.type=="childList"){let r=iE(n,e.previousSibling||e.target.previousSibling,-1),i=iE(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(zi)!=e.state.facet(zi)&&(e.view.contentDOM.editContext=e.state.facet(zi)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function iE(t,e,n){for(;e;){let r=vt.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function sE(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor,1);return bu(o.node,o.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function kle(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return sE(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?sE(t,n):null}class Cle{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:s,head:o}=i,a=this.toEditorPos(r.updateRangeStart),l=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:a,drifted:!1});let c=l-a>r.text.length;a==this.from&&s<this.from?a=s:l==this.to&&s>this.to&&(l=s);let u=RD(e.state.sliceDoc(a,l),r.text,(c?i.from:i.to)-a,c?"end":null);if(!u){let d=Z.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));em(d,i)||e.dispatch({selection:d,userEvent:"select"});return}let f={from:u.from+a,to:u.toA+a,insert:Le.of(r.text.slice(u.from,u.toB).split(`
|
|
485
|
+
`))};if((ae.mac||ae.android)&&f.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:a,to:l,insert:Le.of([r.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let d=this.to-this.from+(f.to-f.from+f.insert.length);$1(e,f,Z.single(this.toEditorPos(r.selectionStart,d),this.toEditorPos(r.selectionEnd,d)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(n.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let o=this.toEditorPos(r.rangeStart),a=this.toEditorPos(r.rangeEnd);o<a;o++){let l=e.coordsForChar(o);s=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||s||new DOMRect,i.push(s)}n.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,a=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(a)){let l=this.toEditorPos(s.rangeStart),c=this.toEditorPos(s.rangeEnd);if(l<c){let u=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(a)?1:2}px`;i.push(he.mark({attributes:{style:u}}).range(l,c))}}}e.dispatch({effects:vD.of(he.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=af(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,o,a,l,c)=>{if(r)return;let u=c.length-(o-s);if(i&&o>=i.to)if(i.from==s&&i.to==o&&i.insert.eq(c)){i=this.pendingContextChange=null,n+=u,this.to+=u;return}else i=null,this.revertPending(e.state);if(s+=n,o+=n,o<=this.from)this.from+=u,this.to+=u;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+c.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),c.toString()),this.to+=u}n+=u}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class re{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||eae(e.parent)||document,this.viewState=new tE(e.state||Ae.create(e)),e.scrollTo&&e.scrollTo.is(Xd)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ya).map(i=>new vy(i));for(let i of this.plugins)i.update(this);this.observer=new Sle(this),this.inputState=new Wae(this),this.inputState.ensureHandlers(this.plugins),this.docView=new VT(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=!0,this.requestMeasure()})}dispatch(...e){let n=e.length==1&&e[0]instanceof yt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,s=this.state;for(let d of e){if(d.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=d.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,a=0,l=null;e.some(d=>d.annotation(ND))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=jD(s,o),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(u=null)):this.observer.clear(),s.facet(Ae.phrases)!=this.state.facet(Ae.phrases))return this.setState(s);i=Gp.create(this,s,e),i.flags|=a;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(f&&(f=f.map(d.changes)),d.scrollIntoView){let{main:h}=d.state.selection;f=new fl(h.empty?h:Z.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of d.effects)h.is(Xd)&&(f=h.value.clip(this.state))}this.viewState.update(i,f),this.bidiCache=nm.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Gc)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Hd)!=i.state.facet(Hd)&&(this.viewState.mustMeasureContent=!0),(n||r||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let d of this.state.facet(c0))try{d(i)}catch(h){yn(this.state,h,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!ED(this,u)&&c.force&&ul(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new tE(e),this.plugins=e.facet(Ya).map(r=>new vy(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new VT(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Ya),r=e.state.facet(Ya);if(n!=r){let i=[];for(let s of r){let o=n.indexOf(s);if(o<0)i.push(new vy(s));else{let a=this.plugins[o];a.mustUpdate=e,i.push(a)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){yn(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(nD(r))s=-1,o=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(i);s=h.from,o=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(h=>{try{return h.read(this)}catch(g){return yn(this.state,g),oE}}),f=Gp.create(this,this.state,[]),d=!1;f.flags|=l,n?n.flags|=l:n=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f),d&&this.docViewUpdate());for(let h=0;h<c.length;h++)if(u[h]!=oE)try{let g=c[h];g.write&&g.write(u[h],this)}catch(g){yn(this.state,g)}if(d&&this.docView.updateSelection(!0),!f.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let g=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o;if(g>1||g<-1){i=i+g,r.scrollTop=i/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(c0))a(n)}get themeClasses(){return m0+" "+(this.state.facet(p0)?zD:LD)+" "+this.state.facet(Hd)}updateAttrs(){let e=aE(this,xD,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(zi)?"true":"false",class:"cm-content",style:`${ae.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),aE(this,E1,n);let r=this.observer.ignore(()=>{let i=jT(this.contentDOM,this.contentAttrs,n),s=jT(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(re.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Gc);let e=this.state.facet(re.cspNonce);Us.mount(this.root,this.styleModules.concat(ble).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return Sy(this,e,FT(this,e,n,r))}moveByGroup(e,n){return Sy(this,e,FT(this,e,n,r=>jae(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[n?r.length-1:0];return Z.cursor(s.side(n,i)+e.from,s.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return Nae(this,e,n,r)}moveVertically(e,n,r){return Sy(this,e,Mae(this,e,n,r))}domAtPos(e,n=1){return this.docView.domAtPos(e,n)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){this.readMeasured();let r=d0(this,e,n);return r&&r.pos}posAndSideAtCoords(e,n=!0){return this.readMeasured(),d0(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[gi.find(s,e-i.from,-1,n)];return lf(r,o.dir==Ye.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(gD)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Ple)return lD(e.length);let n=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||aD(s.isolates,r=LT(this,e))))return s.order;r||(r=LT(this,e));let i=lae(e.text,n,r);return this.bidiCache.push(new nm(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||ae.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{tD(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return Xd.of(new fl(typeof e=="number"?Z.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return Xd.of(new fl(Z.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return ht.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return ht.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Us.newName(),i=[Hd.of(r),Gc.of(g0(`.${r}`,e))];return n&&n.dark&&i.push(p0.of(!0)),i}static baseTheme(e){return os.lowest(Gc.of(g0("."+m0,e,BD)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&vt.get(r)||vt.get(e);return((n=i==null?void 0:i.root)===null||n===void 0?void 0:n.view)||null}}re.styleModule=Gc;re.inputHandler=pD;re.clipboardInputFilter=P1;re.clipboardOutputFilter=T1;re.scrollHandler=yD;re.focusChangeEffect=mD;re.perLineTextDirection=gD;re.exceptionSink=hD;re.updateListener=c0;re.editable=zi;re.mouseSelectionStyle=dD;re.dragMovesSelection=fD;re.clickAddsSelectionRange=uD;re.decorations=Cg;re.blockWrappers=bD;re.outerDecorations=R1;re.atomicRanges=ed;re.bidiIsolatedRanges=wD;re.scrollMargins=SD;re.darkTheme=p0;re.cspNonce=oe.define({combine:t=>t.length?t[0]:""});re.contentAttributes=E1;re.editorAttributes=xD;re.lineWrapping=re.contentAttributes.of({class:"cm-lineWrapping"});re.announce=ve.define();const Ple=4096,oE={};class nm{constructor(e,n,r,i,s,o){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=s,this.order=o}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Ye.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new nm(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function aE(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(t):s;o&&S1(o,n)}return n}const Tle=ae.mac?"mac":ae.windows?"win":ae.linux?"linux":"key";function Ele(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,s,o,a;for(let l=0;l<n.length-1;++l){const c=n[l];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))i=!0;else if(/^(c|ctrl|control)$/i.test(c))s=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))e=="mac"?a=!0:s=!0;else throw new Error("Unrecognized modifier name: "+c)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),a&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function Gd(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const Rle=os.default(re.domEventHandlers({keydown(t,e){return FD(VD(e.state),t,e,"editor")}})),xa=oe.define({enables:Rle}),lE=new WeakMap;function VD(t){let e=t.facet(xa),n=lE.get(e);return n||lE.set(e,n=Ale(e.reduce((r,i)=>r.concat(i),[]))),n}function _le(t,e,n){return FD(VD(t.state),e,t,n)}let Cs=null;const $le=4e3;function Ale(t,e=Tle){let n=Object.create(null),r=Object.create(null),i=(o,a)=>{let l=r[o];if(l==null)r[o]=a;else if(l!=a)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,a,l,c,u)=>{var f,d;let h=n[o]||(n[o]=Object.create(null)),g=a.split(/ (?!$)/).map(y=>Ele(y,e));for(let y=1;y<g.length;y++){let x=g.slice(0,y).join(" ");i(x,!0),h[x]||(h[x]={preventDefault:!0,stopPropagation:!1,run:[b=>{let k=Cs={view:b,prefix:x,scope:o};return setTimeout(()=>{Cs==k&&(Cs=null)},$le),!0}]})}let m=g.join(" ");i(m,!1);let v=h[m]||(h[m]={preventDefault:!1,stopPropagation:!1,run:((d=(f=h._any)===null||f===void 0?void 0:f.run)===null||d===void 0?void 0:d.slice())||[]});l&&v.run.push(l),c&&(v.preventDefault=!0),u&&(v.stopPropagation=!0)};for(let o of t){let a=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of a){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let d in u)u[d].run.push(h=>f(h,O0))}let l=o[e]||o.key;if(l)for(let c of a)s(c,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(c,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return n}let O0=null;function FD(t,e,n,r){O0=e;let i=Zoe(e),s=hn(i,0),o=hi(s)==i.length&&i!=" ",a="",l=!1,c=!1,u=!1;Cs&&Cs.view==n&&Cs.scope==r&&(a=Cs.prefix+" ",$D.indexOf(e.keyCode)<0&&(c=!0,Cs=null));let f=new Set,d=v=>{if(v){for(let y of v.run)if(!f.has(y)&&(f.add(y),y(n)))return v.stopPropagation&&(u=!0),!0;v.preventDefault&&(v.stopPropagation&&(u=!0),c=!0)}return!1},h=t[r],g,m;return h&&(d(h[a+Gd(i,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(ae.windows&&e.ctrlKey&&e.altKey)&&!(ae.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(g=Hs[e.keyCode])&&g!=i?(d(h[a+Gd(g,e,!0)])||e.shiftKey&&(m=sf[e.keyCode])!=i&&m!=g&&d(h[a+Gd(m,e,!1)]))&&(l=!0):o&&e.shiftKey&&d(h[a+Gd(i,e,!0)])&&(l=!0),!l&&d(h._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),O0=null,l}class td{constructor(e,n,r,i,s){this.className=e,this.left=n,this.top=r,this.width=i,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let s=XD(e);return[new td(n,i.left-s.left,i.top-s.top,null,i.bottom-i.top)]}else return Qle(e,n,r)}}function XD(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Ye.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function cE(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let s=t.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,a=t.posAtCoords({x:s.left+1,y:o}),l=t.posAtCoords({x:s.right-1,y:o});return a==null||l==null?r:{from:Math.max(r.from,Math.min(a,l)),to:Math.min(r.to,Math.max(a,l))}}function Qle(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),s=t.textDirection==Ye.LTR,o=t.contentDOM,a=o.getBoundingClientRect(),l=XD(t),c=o.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),f=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=a.right-(u?parseInt(u.paddingRight):0),h=f0(t,r,1),g=f0(t,i,-1),m=h.type==Dt.Text?h:null,v=g.type==Dt.Text?g:null;if(m&&(t.lineWrapping||h.widgetLineBreaks)&&(m=cE(t,r,1,m)),v&&(t.lineWrapping||g.widgetLineBreaks)&&(v=cE(t,i,-1,v)),m&&v&&m.from==v.from&&m.to==v.to)return x(b(n.from,n.to,m));{let w=m?b(n.from,null,m):k(h,!1),S=v?b(null,n.to,v):k(g,!0),C=[];return(m||h).to<(v||g).from-(m&&v?1:0)||h.widgetLineBreaks>1&&w.bottom+t.defaultLineHeight/2<S.top?C.push(y(f,w.bottom,d,S.top)):w.bottom<S.top&&t.elementAtHeight((w.bottom+S.top)/2).type==Dt.Text&&(w.bottom=S.top=(w.bottom+S.top)/2),x(w).concat(C).concat(x(S))}function y(w,S,C,_){return new td(e,w-l.left,S-l.top,Math.max(0,C-w),_-S)}function x({top:w,bottom:S,horizontal:C}){let _=[];for(let I=0;I<C.length;I+=2)_.push(y(C[I],w,C[I+1],S));return _}function b(w,S,C){let _=1e9,I=-1e9,E=[];function j(z,X,W,F,N){let Q=t.coordsAtPos(z,z==C.to?-2:2),P=t.coordsAtPos(W,W==C.from?2:-2);!Q||!P||(_=Math.min(Q.top,P.top,_),I=Math.max(Q.bottom,P.bottom,I),N==Ye.LTR?E.push(s&&X?f:Q.left,s&&F?d:P.right):E.push(!s&&F?f:P.left,!s&&X?d:Q.right))}let A=w??C.from,L=S??C.to;for(let z of t.visibleRanges)if(z.to>A&&z.from<L)for(let X=Math.max(z.from,A),W=Math.min(z.to,L);;){let F=t.state.doc.lineAt(X);for(let N of t.bidiSpans(F)){let Q=N.from+F.from,P=N.to+F.from;if(Q>=W)break;P>X&&j(Math.max(Q,X),w==null&&Q<=A,Math.min(P,W),S==null&&P>=L,N.dir)}if(X=F.to+1,X>=W)break}return E.length==0&&j(A,w==null,L,S==null,t.textDirection),{top:_,bottom:I,horizontal:E}}function k(w,S){let C=a.top+(S?w.top:w.bottom);return{top:C,bottom:C,horizontal:[]}}}function Ile(t,e){return t.constructor==e.constructor&&t.eq(e)}class Nle{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(Fh)!=e.state.facet(Fh)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(Fh);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!Ile(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e,ae.safari&&ae.safari_version>=26&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Fh=oe.define();function ZD(t){return[ht.define(e=>new Nle(e,t)),Fh.of(t)]}const uf=oe.define({combine(t){return _i(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function jle(t={}){return[uf.of(t),Mle,Dle,Lle,OD.of(!0)]}function WD(t){return t.startState.facet(uf)!=t.state.facet(uf)}const Mle=ZD({above:!0,markers(t){let{state:e}=t,n=e.facet(uf),r=[];for(let i of e.selection.ranges){let s=i==e.selection.main;if(i.empty||n.drawRangeCursor){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=i.empty?i:Z.cursor(i.head,i.head>i.anchor?-1:1);for(let l of td.forRange(t,o,a))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=WD(t);return n&&uE(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){uE(e.state,t)},class:"cm-cursorLayer"});function uE(t,e){e.style.animationDuration=t.facet(uf).cursorBlinkRate+"ms"}const Dle=ZD({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:td.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||WD(t)},class:"cm-selectionLayer"}),Lle=os.highest(re.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),qD=ve.define({map(t,e){return t==null?null:e.mapPos(t)}}),eu=At.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(qD)?r.value:n,t)}}),zle=ht.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(eu);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(eu)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(eu),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(eu)!=t&&this.view.dispatch({effects:qD.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Ble(){return[eu,zle]}function fE(t,e,n,r,i){e.lastIndex=0;for(let s=t.iterRange(n,r),o=n,a;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;a=e.exec(s.value);)i(o+a.index,a)}function Vle(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:s}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=s:r.push({from:i,to:s});return r}class Fle{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:s,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(a,l,c,u)=>i(u,c,c+a[0].length,a,l);else if(typeof r=="function")this.addMatch=(a,l,c,u)=>{let f=r(a,l,c);f&&u(c,c+a[0].length,f)};else if(r)this.addMatch=(a,l,c,u)=>u(c,c+a[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let n=new ts,r=n.add.bind(n);for(let{from:i,to:s}of Vle(e,this.maxLength))fE(e.state.doc,this.regexp,i,s,(o,a)=>this.addMatch(a,e,o,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((s,o,a,l)=>{l>=e.view.viewport.from&&a<=e.view.viewport.to&&(r=Math.min(a,r),i=Math.max(l,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let s of e.visibleRanges){let o=Math.max(s.from,r),a=Math.min(s.to,i);if(a>=o){let l=e.state.doc.lineAt(o),c=l.to<a?e.state.doc.lineAt(a):l,u=Math.max(s.from,l.from),f=Math.min(s.to,c.to);if(this.boundary){for(;o>l.from;o--)if(this.boundary.test(l.text[o-1-l.from])){u=o;break}for(;a<c.to;a++)if(this.boundary.test(c.text[a-c.from])){f=a;break}}let d=[],h,g=(m,v,y)=>d.push(y.range(m,v));if(l==c)for(this.regexp.lastIndex=u-l.from;(h=this.regexp.exec(l.text))&&h.index<f-l.from;)this.addMatch(h,e,h.index+l.from,g);else fE(e.state.doc,this.regexp,u,f,(m,v)=>this.addMatch(v,e,m,g));n=n.update({filterFrom:u,filterTo:f,filter:(m,v)=>m<u||v>f,add:d})}}return n}}const y0=/x/.unicode!=null?"gu":"g",Xle=new RegExp(`[\0-\b
|
|
486
|
+
--\u2028\u2029\uFEFF-]`,y0),Zle={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Py=null;function Wle(){var t;if(Py==null&&typeof document<"u"&&document.body){let e=document.body.style;Py=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Py||!1}const Xh=oe.define({combine(t){let e=_i(t,{render:null,specialChars:Xle,addSpecialChars:null});return(e.replaceTabs=!Wle())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,y0)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,y0)),e}});function qle(t={}){return[Xh.of(t),Yle()]}let dE=null;function Yle(){return dE||(dE=ht.fromClass(class{constructor(t){this.view=t,this.decorations=he.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Xh)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Fle({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,s=hn(e[0],0);if(s==9){let o=i.lineAt(r),a=n.state.tabSize,l=Zr(o.text,a,r-o.from);return he.replace({widget:new Kle((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=he.replace({widget:new Gle(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Xh);t.startState.facet(Xh)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const Ule="•";function Hle(t){return t>=32?Ule:t==10?"":String.fromCharCode(9216+t)}class Gle extends Yr{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=Hle(this.code),r=e.state.phrase("Control character")+" "+(Zle[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let s=document.createElement("span");return s.textContent=n,s.title=r,s.setAttribute("aria-label",r),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class Kle extends Yr{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function Jle(){return tce}const ece=he.line({class:"cm-activeLine"}),tce=ht.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(ece.range(i.from)),e=i.from)}return he.set(n)}},{decorations:t=>t.decorations});class nce extends Yr{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?xu(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=lf(n[0],r.direction!="rtl"),s=parseInt(r.lineHeight);return i.bottom-i.top>s*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+s}:i}ignoreEvent(){return!1}}function rce(t){let e=ht.fromClass(class{constructor(n){this.view=n,this.placeholder=t?he.set([he.widget({widget:new nce(t),side:1}).range(0)]):he.none}get decorations(){return this.view.state.doc.length?he.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,re.contentAttributes.of({"aria-placeholder":t})]:e}const v0=2e3;function ice(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),s=[];if(e.off>v0||n.off>v0||e.col<0||n.col<0){let o=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let c=t.doc.line(l);c.length<=a&&s.push(Z.range(c.from+o,c.to+a))}}else{let o=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let c=t.doc.line(l),u=Kx(c.text,o,t.tabSize,!0);if(u<0)s.push(Z.cursor(c.to));else{let f=Kx(c.text,a,t.tabSize);s.push(Z.range(c.from+u,c.from+f))}}}return s}function sce(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function hE(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,s=i>v0?-1:i==r.length?sce(t,e.clientX):Zr(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:s,off:i}}function oce(t,e){let n=hE(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let s=i.changes.mapPos(i.startState.doc.line(n.line).from),o=i.state.doc.lineAt(s);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},r=r.map(i.changes)}},get(i,s,o){let a=hE(t,i);if(!a)return r;let l=ice(t.state,n,a);return l.length?o?Z.create(l.concat(r.ranges)):Z.create(l):r}}:null}function ace(t){let e=n=>n.altKey&&n.button==0;return re.mouseSelectionStyle.of((n,r)=>e(r)?oce(n,r):null)}const lce={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},cce={style:"cursor: crosshair"};function uce(t={}){let[e,n]=lce[t.key||"Alt"],r=ht.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,re.contentAttributes.of(i=>{var s;return!((s=i.plugin(r))===null||s===void 0)&&s.isDown?cce:null})]}const Kd="-10000px";class YD{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=r(o,s))}update(e,n){var r;let i=e.state.facet(this.facet),s=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],a=n?[]:null;for(let l=0;l<s.length;l++){let c=s[l],u=-1;if(c){for(let f=0;f<this.tooltips.length;f++){let d=this.tooltips[f];d&&d.create==c.create&&(u=f)}if(u<0)o[l]=this.createTooltipView(c,l?o[l-1]:null),a&&(a[l]=!!c.above);else{let f=o[l]=this.tooltipViews[u];a&&(a[l]=n[u]),f.update&&f.update(e)}}}for(let l of this.tooltipViews)o.indexOf(l)<0&&(this.removeTooltipView(l),(r=l.destroy)===null||r===void 0||r.call(l));return n&&(a.forEach((l,c)=>n[c]=l),n.length=a.length),this.input=i,this.tooltips=s,this.tooltipViews=o,!0}}function fce(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const Ty=oe.define({combine:t=>{var e,n,r;return{position:ae.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||fce}}}),pE=new WeakMap,I1=ht.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Ty);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new YD(t,N1,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(Ty);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=Kd,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(ae.safari){let o=s.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}else n=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(t=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=_1(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(Ty).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:s}=t,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],c=this.manager.tooltipViews[a],{dom:u}=c,f=t.pos[a],d=t.size[a];if(!f||l.clip!==!1&&(f.bottom<=Math.max(n.top,r.top)||f.top>=Math.min(n.bottom,r.bottom)||f.right<Math.max(n.left,r.left)-.1||f.left>Math.min(n.right,r.right)+.1)){u.style.top=Kd;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,g=h?7:0,m=d.right-d.left,v=(e=pE.get(c))!==null&&e!==void 0?e:d.bottom-d.top,y=c.offset||hce,x=this.view.textDirection==Ye.LTR,b=d.width>r.right-r.left?x?r.left:r.right-d.width:x?Math.max(r.left,Math.min(f.left-(h?14:0)+y.x,r.right-m)):Math.min(Math.max(r.left,f.left-m+(h?14:0)-y.x),r.right-m),k=this.above[a];!l.strictSide&&(k?f.top-v-g-y.y<r.top:f.bottom+v+g+y.y>r.bottom)&&k==r.bottom-f.bottom>f.top-r.top&&(k=this.above[a]=!k);let w=(k?f.top-r.top:r.bottom-f.bottom)-g;if(w<v&&c.resize!==!1){if(w<this.view.defaultLineHeight){u.style.top=Kd;continue}pE.set(c,v),u.style.height=(v=w)/s+"px"}else u.style.height&&(u.style.height="");let S=k?f.top-v-g-y.y:f.bottom+g+y.y,C=b+m;if(c.overlap!==!0)for(let _ of o)_.left<C&&_.right>b&&_.top<S+v&&_.bottom>S&&(S=k?_.top-v-2-g:_.bottom+g+2);if(this.position=="absolute"?(u.style.top=(S-t.parent.top)/s+"px",mE(u,(b-t.parent.left)/i)):(u.style.top=S/s+"px",mE(u,b/i)),h){let _=f.left+(x?y.x:-y.x)-(b+14-7);h.style.left=_/i+"px"}c.overlap!==!0&&o.push({left:b,top:S,right:C,bottom:S+v}),u.classList.toggle("cm-tooltip-above",k),u.classList.toggle("cm-tooltip-below",!k),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Kd}},{eventObservers:{scroll(){this.maybeMeasure()}}});function mE(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const dce=re.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),hce={x:0,y:0},N1=oe.define({enables:[I1,dce]}),rm=oe.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class Rg{static create(e){return new Rg(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new YD(e,rm,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const pce=N1.compute([rm],t=>{let e=t.facet(rm);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:Rg.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class mce{constructor(e,n,r,i,s){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.tile.nearest(n.target);if(!r)return;let i,s=1;if(r.isWidget())i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let a=e.coordsAtPos(i);if(!a||n.y<a.top||n.y>a.bottom||n.x<a.left-e.defaultCharacterWidth||n.x>a.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(u=>u.from<=i&&u.to>=i),c=l&&l.dir==Ye.RTL?-1:1;s=n.x<a.left?-c:c}let o=this.source(e,i,s);if(o!=null&&o.then){let a=this.pending={pos:i};o.then(l=>{this.pending==a&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>yn(e.state,l,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(I1),n=e?e.manager.tooltips.findIndex(r=>r.create==Rg.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:s}=this;if(i.length&&s&&!gce(s.dom,e)||this.pending){let{pos:o}=i[0]||this.pending,a=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:o;(o==a?this.view.posAtCoords(this.lastMove)!=o:!Oce(this.view,o,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Jd=4;function gce(t,e){let{left:n,right:r,top:i,bottom:s}=t.getBoundingClientRect(),o;if(o=t.querySelector(".cm-tooltip-arrow")){let a=o.getBoundingClientRect();i=Math.min(a.top,i),s=Math.max(a.bottom,s)}return e.clientX>=n-Jd&&e.clientX<=r+Jd&&e.clientY>=i-Jd&&e.clientY<=s+Jd}function Oce(t,e,n,r,i,s){let o=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>r||o.right<r||o.top>i||Math.min(o.bottom,a)<i)return!1;let l=t.posAtCoords({x:r,y:i},!1);return l>=e&&l<=n}function yce(t,e={}){let n=ve.define(),r=At.define({create(){return[]},update(i,s){if(i.length&&(e.hideOnChange&&(s.docChanged||s.selection)?i=[]:e.hideOn&&(i=i.filter(o=>!e.hideOn(s,o))),s.docChanged)){let o=[];for(let a of i){let l=s.changes.mapPos(a.pos,-1,jt.TrackDel);if(l!=null){let c=Object.assign(Object.create(null),a);c.pos=l,c.end!=null&&(c.end=s.changes.mapPos(c.end)),o.push(c)}}i=o}for(let o of s.effects)o.is(n)&&(i=o.value),o.is(vce)&&(i=[]);return i},provide:i=>rm.from(i)});return{active:r,extension:[r,ht.define(i=>new mce(i,t,r,n,e.hoverTime||300)),pce]}}function UD(t,e){let n=t.plugin(I1);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const vce=ve.define(),gE=oe.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function j1(t,e){let n=t.plugin(HD),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const HD=ht.fromClass(class{constructor(t){this.input=t.state.facet(ff),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(gE);this.top=new eh(t,!0,e.topContainer),this.bottom=new eh(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(gE);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new eh(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new eh(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(ff);if(n!=this.input){let r=n.filter(l=>l),i=[],s=[],o=[],a=[];for(let l of r){let c=this.specs.indexOf(l),u;c<0?(u=l(t.view),a.push(u)):(u=this.panels[c],u.update&&u.update(t)),i.push(u),(u.top?s:o).push(u)}this.specs=r,this.panels=i,this.top.sync(s),this.bottom.sync(o);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>re.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class eh{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=OE(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=OE(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function OE(t){let e=t.nextSibling;return t.remove(),e}const ff=oe.define({enables:HD});function xce(t,e){let n,r=new Promise(o=>n=o),i=o=>bce(o,e,n);t.state.field(Ey,!1)?t.dispatch({effects:GD.of(i)}):t.dispatch({effects:ve.appendConfig.of(Ey.init(()=>[i]))});let s=KD.of(i);return{close:s,result:r.then(o=>((t.win.queueMicrotask||(l=>t.win.setTimeout(l,10)))(()=>{t.state.field(Ey).indexOf(i)>-1&&t.dispatch({effects:s})}),o))}}const Ey=At.define({create(){return[]},update(t,e){for(let n of e.effects)n.is(GD)?t=[n.value].concat(t):n.is(KD)&&(t=t.filter(r=>r!=n.value));return t},provide:t=>ff.computeN([t],e=>e.field(t))}),GD=ve.define(),KD=ve.define();function bce(t,e,n){let r=e.content?e.content(t,()=>o(null)):null;if(!r){if(r=Ze("form"),e.input){let a=Ze("input",e.input);/^(text|password|number|email|tel|url)$/.test(a.type)&&a.classList.add("cm-textfield"),a.name||(a.name="input"),r.appendChild(Ze("label",(e.label||"")+": ",a))}else r.appendChild(document.createTextNode(e.label||""));r.appendChild(document.createTextNode(" ")),r.appendChild(Ze("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let i=r.nodeName=="FORM"?[r]:r.querySelectorAll("form");for(let a=0;a<i.length;a++){let l=i[a];l.addEventListener("keydown",c=>{c.keyCode==27?(c.preventDefault(),o(null)):c.keyCode==13&&(c.preventDefault(),o(l))}),l.addEventListener("submit",c=>{c.preventDefault(),o(l)})}let s=Ze("div",r,Ze("button",{onclick:()=>o(null),"aria-label":t.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(s.className=e.class),s.classList.add("cm-dialog");function o(a){s.contains(s.ownerDocument.activeElement)&&t.focus(),n(a)}return{dom:s,top:e.top,mount:()=>{if(e.focus){let a;typeof e.focus=="string"?a=r.querySelector(e.focus):a=r.querySelector("input")||r.querySelector("button"),a&&"select"in a?a.select():a&&"focus"in a&&a.focus()}}}}class rs extends Ys{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}rs.prototype.elementClass="";rs.prototype.toDOM=void 0;rs.prototype.mapMode=jt.TrackBefore;rs.prototype.startSide=rs.prototype.endSide=-1;rs.prototype.point=!0;const Zh=oe.define(),wce=oe.define(),Sce={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Qe.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Su=oe.define();function kce(t){return[JD(),Su.of({...Sce,...t})]}const yE=oe.define({combine:t=>t.some(e=>e)});function JD(t){return[Cce]}const Cce=ht.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Su).map(e=>new xE(t,e)),this.fixed=!t.state.facet(yE);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(yE)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Qe.iter(this.view.state.facet(Zh),this.view.viewport.from),r=[],i=this.gutters.map(s=>new Pce(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let o=!0;for(let a of s.type)if(a.type==Dt.Text&&o){x0(n,r,a.from);for(let l of i)l.line(this.view,a,r);o=!1}else if(a.widget)for(let l of i)l.widget(this.view,a)}else if(s.type==Dt.Text){x0(n,r,s.from);for(let o of i)o.line(this.view,s,r)}else if(s.widget)for(let o of i)o.widget(this.view,s);for(let s of i)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Su),n=t.state.facet(Su),r=t.docChanged||t.heightChanged||t.viewportChanged||!Qe.eq(t.startState.facet(Zh),t.state.facet(Zh),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let s of n){let o=e.indexOf(s);o<0?i.push(new xE(this.view,s)):(this.gutters[o].update(t),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>re.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Ye.LTR?{left:r,right:i}:{right:r,left:i}})});function vE(t){return Array.isArray(t)?t:[t]}function x0(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class Pce{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Qe.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,s=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==i.elements.length){let a=new eL(e,o,s,r);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,o,s,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];x0(this.cursor,i,n.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,n,i);s&&i.unshift(s);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let s of e.state.facet(wce)){let o=s(e,n.widget,n);o&&(i||(i=[])).push(o)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class xE{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let l=s.getBoundingClientRect();o=(l.top+l.bottom)/2}else o=i.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[r](e,a,i)&&i.preventDefault()});this.markers=vE(n.markers(e)),n.initialSpacer&&(this.spacer=new eL(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=vE(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Qe.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class eL{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),Tce(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let a=o,l=s<n.length?n[s++]:null,c=!1;if(l){let u=l.elementClass;u&&(r+=" "+u);for(let f=o;f<this.markers.length;f++)if(this.markers[f].compare(l)){a=f,c=!0;break}}else a=this.markers.length;for(;o<a;){let u=this.markers[o++];if(u.toDOM){u.destroy(i);let f=i.nextSibling;i.remove(),i=f}}if(!l)break;l.toDOM&&(c?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),c&&o++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function Tce(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const Ece=oe.define(),Rce=oe.define(),Ua=oe.define({combine(t){return _i(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let s=r[i],o=n[i];r[i]=s?(a,l,c)=>s(a,l,c)||o(a,l,c):o}return r}})}});class Ry extends rs{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function _y(t,e){return t.state.facet(Ua).formatNumber(e,t.state)}const _ce=Su.compute([Ua],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(Ece)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new Ry(_y(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(Rce)){let s=i(e,n,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(Ua)!=e.state.facet(Ua),initialSpacer(e){return new Ry(_y(e,bE(e.state.doc.lines)))},updateSpacer(e,n){let r=_y(n.view,bE(n.view.state.doc.lines));return r==e.number?e:new Ry(r)},domEventHandlers:t.facet(Ua).domEventHandlers,side:"before"}));function $ce(t={}){return[Ua.of(t),JD(),_ce]}function bE(t){let e=9;for(;e<t;)e=e*10+9;return e}const Ace=new class extends rs{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Qce=Zh.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(Ace.range(i)))}return Qe.of(e)});function Ice(){return Qce}const tL=1024;let Nce=0;class cr{constructor(e,n){this.from=e,this.to=n}}class Oe{constructor(e={}){this.id=Nce++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=xt.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Oe.closedBy=new Oe({deserialize:t=>t.split(" ")});Oe.openedBy=new Oe({deserialize:t=>t.split(" ")});Oe.group=new Oe({deserialize:t=>t.split(" ")});Oe.isolate=new Oe({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Oe.contextHash=new Oe({perNode:!0});Oe.lookAhead=new Oe({perNode:!0});Oe.mounted=new Oe({perNode:!0});class dl{constructor(e,n,r,i=!1){this.tree=e,this.overlay=n,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[Oe.mounted.id]}}const jce=Object.create(null);class xt{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):jce,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new xt(e.name||"",n,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Oe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Oe.group),s=-1;s<(i?i.length:0);s++){let o=n[s<0?r.name:i[s]];if(o)return o}}}}xt.none=new xt("",Object.create(null),0,8);class cc{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let s of e){let o=s(r);if(o){i||(i=Object.assign({},r.props));let a=o[1],l=o[0];l.combine&&l.id in i&&(a=l.combine(i[l.id],a)),i[l.id]=a}}n.push(i?new xt(r.name,i,r.id,r.flags):r)}return new cc(n)}}const th=new WeakMap,wE=new WeakMap;var Ve;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays",t[t.EnterBracketed=16]="EnterBracketed"})(Ve||(Ve={}));class Re{constructor(e,n,r,i,s){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,a]of s)this.props[typeof o=="number"?o:o.id]=a}}toString(){let e=dl.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new im(this.topNode,e)}cursorAt(e,n=0,r=0){let i=th.get(this)||this.topNode,s=new im(i);return s.moveTo(e,n),th.set(this,s._tree),s}get topNode(){return new Ut(this,0,0,null)}resolve(e,n=0){let r=df(th.get(this)||this.topNode,e,n,!1);return th.set(this,r),r}resolveInner(e,n=0){let r=df(wE.get(this)||this.topNode,e,n,!0);return wE.set(this,r),r}resolveStack(e,n=0){return Lce(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:s=this.length}=e,o=e.mode||0,a=(o&Ve.IncludeAnonymous)>0;for(let l=this.cursor(o|Ve.IncludeAnonymous);;){let c=!1;if(l.from<=s&&l.to>=i&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:L1(xt.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Re(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new Re(xt.none,n,r,i)))}static build(e){return zce(e)}}Re.empty=new Re(xt.none,[],[],0);class M1{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new M1(this.buffer,this.index)}}class Ks{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return xt.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,n,r,i,s){let{buffer:o}=this,a=-1;for(let l=e;l!=n&&!(nL(s,i,o[l+1],o[l+2])&&(a=l,r>0));l=o[l+3]);return a}slice(e,n,r){let i=this.buffer,s=new Uint16Array(n-e),o=0;for(let a=e,l=0;a<n;){s[l++]=i[a++],s[l++]=i[a++]-r;let c=s[l++]=i[a++]-r;s[l++]=i[a++]-e,o=Math.max(o,c)}return new Ks(s,o,this.set)}}function nL(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function df(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let o=!r&&t instanceof Ut&&t.index<0?null:t.parent;if(!o)return t;t=o}let s=r?0:Ve.IgnoreOverlays;if(r)for(let o=t,a=o.parent;a;o=a,a=o.parent)o instanceof Ut&&o.index<0&&((i=a.enter(e,n,s))===null||i===void 0?void 0:i.from)!=o.from&&(t=a);for(;;){let o=t.enter(e,n,s);if(!o)return t;t=o}}class rL{cursor(e=0){return new im(this,e)}getChild(e,n=null,r=null){let i=SE(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return SE(this,e,n,r)}resolve(e,n=0){return df(this,e,n,!1)}resolveInner(e,n=0){return df(this,e,n,!0)}matchContext(e){return b0(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class Ut extends rL{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,s=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,c=n>0?a.length:-1;e!=c;e+=n){let u=a[e],f=l[e]+o.from,d;if(!(!(s&Ve.EnterBracketed&&u instanceof Re&&(d=dl.get(u))&&!d.overlay&&d.bracketed&&r>=f&&r<=f+u.length)&&!nL(i,r,f,f+u.length))){if(u instanceof Ks){if(s&Ve.ExcludeBuffers)continue;let h=u.findChild(0,u.buffer.length,n,r-f,i);if(h>-1)return new Oi(new Mce(o,u,e,f),null,h)}else if(s&Ve.IncludeAnonymous||!u.type.isAnonymous||D1(u)){let h;if(!(s&Ve.IgnoreMounts)&&(h=dl.get(u))&&!h.overlay)return new Ut(h.tree,f,e,o);let g=new Ut(u,f,e,o);return s&Ve.IncludeAnonymous||!g.type.isAnonymous?g:g.nextChild(n<0?u.children.length-1:0,n,r,i,s)}}}if(s&Ve.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,n,r=0){let i;if(!(r&Ve.IgnoreOverlays)&&(i=dl.get(this._tree))&&i.overlay){let s=e-this.from,o=r&Ve.EnterBracketed&&i.bracketed;for(let{from:a,to:l}of i.overlay)if((n>0||o?a<=s:a<s)&&(n<0||o?l>=s:l>s))return new Ut(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function SE(t,e,n,r){let i=t.cursor(),s=[];if(!i.firstChild())return s;if(n!=null){for(let o=!1;!o;)if(o=i.type.is(n),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function b0(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class Mce{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Oi extends rL{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return s<0?null:new Oi(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,n,r=0){if(r&Ve.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new Oi(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Oi(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Oi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let o=r.buffer[this.index+1];e.push(r.slice(i,s,o)),n.push(0)}return new Re(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function iL(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;s<t.length;s++){let o=t[s];(o.from>n.from||o.to<n.to)&&(n=o,e=s)}let r=n instanceof Ut&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new Dce(i,n)}class Dce{constructor(e,n){this.heads=e,this.node=n}get next(){return iL(this.heads)}}function Lce(t,e,n){let r=t.resolveInner(e,n),i=null;for(let s=r instanceof Ut?r:r.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(i||(i=[r])).push(o.resolve(e,n)),s=o}else{let o=dl.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let a=new Ut(o.tree,o.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(df(a,e,n,!1))}}return i?iL(i):r}class im{get name(){return this.type.name}constructor(e,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~Ve.EnterBracketed,e instanceof Ut)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Ut?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&Ve.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Ve.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Ve.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let s=n+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let a=r._tree.children[s];if(this.mode&Ve.IncludeAnonymous||a instanceof Ks||!a.type.isAnonymous||D1(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;n=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)n=new Oi(this.buffer,n,this.stack[i]);return this.bufferNode=new Oi(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return b0(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return b0(this._tree,e,i);let o=r[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function D1(t){return t.children.some(e=>e instanceof Ks||!e.type.isAnonymous||D1(e))}function zce(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=tL,reused:s=[],minRepeatType:o=r.types.length}=t,a=Array.isArray(n)?new M1(n,n.length):n,l=r.types,c=0,u=0;function f(w,S,C,_,I,E){let{id:j,start:A,end:L,size:z}=a,X=u,W=c;if(z<0)if(a.next(),z==-1){let M=s[j];C.push(M),_.push(A-w);return}else if(z==-3){c=j;return}else if(z==-4){u=j;return}else throw new RangeError(`Unrecognized record size: ${z}`);let F=l[j],N,Q,P=A-w;if(L-A<=i&&(Q=v(a.pos-S,I))){let M=new Uint16Array(Q.size-Q.skip),$=a.pos-Q.size,R=M.length;for(;a.pos>$;)R=y(Q.start,M,R);N=new Ks(M,L-Q.start,r),P=Q.start-w}else{let M=a.pos-z;a.next();let $=[],R=[],q=j>=o?j:-1,H=0,ie=L;for(;a.pos>M;)q>=0&&a.id==q&&a.size>=0?(a.end<=ie-i&&(g($,R,A,H,a.end,ie,q,X,W),H=$.length,ie=a.end),a.next()):E>2500?d(A,M,$,R):f(A,M,$,R,q,E+1);if(q>=0&&H>0&&H<$.length&&g($,R,A,H,A,ie,q,X,W),$.reverse(),R.reverse(),q>-1&&H>0){let Y=h(F,W);N=L1(F,$,R,0,$.length,0,L-A,Y,Y)}else N=m(F,$,R,L-A,X-L,W)}C.push(N),_.push(P)}function d(w,S,C,_){let I=[],E=0,j=-1;for(;a.pos>S;){let{id:A,start:L,end:z,size:X}=a;if(X>4)a.next();else{if(j>-1&&L<j)break;j<0&&(j=z-i),I.push(A,L,z),E++,a.next()}}if(E){let A=new Uint16Array(E*4),L=I[I.length-2];for(let z=I.length-3,X=0;z>=0;z-=3)A[X++]=I[z],A[X++]=I[z+1]-L,A[X++]=I[z+2]-L,A[X++]=X;C.push(new Ks(A,I[2]-L,r)),_.push(L-w)}}function h(w,S){return(C,_,I)=>{let E=0,j=C.length-1,A,L;if(j>=0&&(A=C[j])instanceof Re){if(!j&&A.type==w&&A.length==I)return A;(L=A.prop(Oe.lookAhead))&&(E=_[j]+A.length+L)}return m(w,C,_,I,E,S)}}function g(w,S,C,_,I,E,j,A,L){let z=[],X=[];for(;w.length>_;)z.push(w.pop()),X.push(S.pop()+C-I);w.push(m(r.types[j],z,X,E-I,A-E,L)),S.push(I-C)}function m(w,S,C,_,I,E,j){if(E){let A=[Oe.contextHash,E];j=j?[A].concat(j):[A]}if(I>25){let A=[Oe.lookAhead,I];j=j?[A].concat(j):[A]}return new Re(w,S,C,_,j)}function v(w,S){let C=a.fork(),_=0,I=0,E=0,j=C.end-i,A={size:0,start:0,skip:0};e:for(let L=C.pos-w;C.pos>L;){let z=C.size;if(C.id==S&&z>=0){A.size=_,A.start=I,A.skip=E,E+=4,_+=4,C.next();continue}let X=C.pos-z;if(z<0||X<L||C.start<j)break;let W=C.id>=o?4:0,F=C.start;for(C.next();C.pos>X;){if(C.size<0)if(C.size==-3||C.size==-4)W+=4;else break e;else C.id>=o&&(W+=4);C.next()}I=F,_+=z,E+=W}return(S<0||_==w)&&(A.size=_,A.start=I,A.skip=E),A.size>4?A:void 0}function y(w,S,C){let{id:_,start:I,end:E,size:j}=a;if(a.next(),j>=0&&_<o){let A=C;if(j>4){let L=a.pos-(j-4);for(;a.pos>L;)C=y(w,S,C)}S[--C]=A,S[--C]=E-w,S[--C]=I-w,S[--C]=_}else j==-3?c=_:j==-4&&(u=_);return C}let x=[],b=[];for(;a.pos>0;)f(t.start||0,t.bufferStart||0,x,b,-1,0);let k=(e=t.length)!==null&&e!==void 0?e:x.length?b[0]+x[0].length:0;return new Re(l[t.topID],x.reverse(),b.reverse(),k)}const kE=new WeakMap;function Wh(t,e){if(!t.isAnonymous||e instanceof Ks||e.type!=t)return 1;let n=kE.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Re)){n=1;break}n+=Wh(t,r)}kE.set(e,n)}return n}function L1(t,e,n,r,i,s,o,a,l){let c=0;for(let g=r;g<i;g++)c+=Wh(t,e[g]);let u=Math.ceil(c*1.5/8),f=[],d=[];function h(g,m,v,y,x){for(let b=v;b<y;){let k=b,w=m[b],S=Wh(t,g[b]);for(b++;b<y;b++){let C=Wh(t,g[b]);if(S+C>=u)break;S+=C}if(b==k+1){if(S>u){let C=g[k];h(C.children,C.positions,0,C.children.length,m[k]+x);continue}f.push(g[k])}else{let C=m[b-1]+g[b-1].length-w;f.push(L1(t,g,m,k,b,w,C,null,l))}d.push(w+x-s)}}return h(e,n,r,i,0),(a||l)(f,d,o)}class sL{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof Oi?this.setBuffer(e.context.buffer,e.index,n):e instanceof Ut&&this.map.set(e.tree,n)}get(e){return e instanceof Oi?this.getBuffer(e.context.buffer,e.index):e instanceof Ut?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Wi{constructor(e,n,r,i,s=!1,o=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new Wi(0,e.length,e,0,!1,r)];for(let s of n)s.to>e.length&&i.push(s);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<n.length?n[a]:null,f=u?u.fromA:1e9;if(f-l>=r)for(;o&&o.from<f;){let d=o;if(l>=d.from||f<=d.to||c){let h=Math.max(d.from,l)-c,g=Math.min(d.to,f)-c;d=h>=g?null:new Wi(h,g,d.tree,d.offset+c,a>0,!!u)}if(d&&i.push(d),o.to>f)break;o=s<e.length?e[s++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return i}}class _g{startParse(e,n,r){return typeof e=="string"&&(e=new Bce(e)),r=r?r.length?r.map(i=>new cr(i.from,i.to)):[new cr(0,0)]:[new cr(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let s=i.advance();if(s)return s}}}class Bce{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function oL(t){return(e,n,r,i)=>new Fce(e,t,n,r,i)}class CE{constructor(e,n,r,i,s,o){this.parser=e,this.parse=n,this.overlay=r,this.bracketed=i,this.target=s,this.from=o}}function PE(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class Vce{constructor(e,n,r,i,s,o,a,l){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=s,this.bracketed=o,this.target=a,this.prev=l,this.depth=0,this.ranges=[]}}const w0=new Oe({perNode:!0});class Fce{constructor(e,n,r,i,s){this.nest=n,this.input=r,this.fragments=i,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new Re(r.type,r.children,r.positions,r.length,r.propValues.concat([[w0,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[Oe.mounted.id]=new dl(n,e.overlay,e.parser,e.bracketed),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new Wce(this.fragments),n=null,r=null,i=new im(new Ut(this.baseTree,this.ranges[0].from,0,null),Ve.IncludeAnonymous|Ve.IgnoreMounts);e:for(let s,o;;){let a=!0,l;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)a=!1;else if(e.hasNode(i)){if(n){let c=n.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let f=u.from+c.pos,d=u.to+c.pos;f>=i.from&&d<=i.to&&!n.ranges.some(h=>h.from<d&&h.to>f)&&n.ranges.push({from:f,to:d})}}a=!1}else if(r&&(o=Xce(r.ranges,i.from,i.to)))a=o!=2;else if(!i.type.isAnonymous&&(s=this.nest(i,this.input))&&(i.from<i.to||!s.overlay)){i.tree||(Zce(i),n&&n.depth++,r&&r.depth++);let c=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")n=new Vce(s.parser,s.overlay,c,this.inner.length,i.from,!!s.bracketed,i.tree,n);else{let u=RE(this.ranges,s.overlay||(i.from<i.to?[new cr(i.from,i.to)]:[]));u.length&&PE(u),(u.length||!s.overlay)&&this.inner.push(new CE(s.parser,u.length?s.parser.startParse(this.input,_E(c,u),u):s.parser.startParse(""),s.overlay?s.overlay.map(f=>new cr(f.from-i.from,f.to-i.from)):null,!!s.bracketed,i.tree,u.length?u[0].from:i.from)),s.overlay?u.length&&(r={ranges:u,depth:0,prev:r}):a=!1}}else if(n&&(l=n.predicate(i))&&(l===!0&&(l=new cr(i.from,i.to)),l.from<l.to)){let c=n.ranges.length-1;c>=0&&n.ranges[c].to==l.from?n.ranges[c]={from:n.ranges[c].from,to:l.to}:n.ranges.push(l)}if(a&&i.firstChild())n&&n.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(n&&!--n.depth){let c=RE(this.ranges,n.ranges);c.length&&(PE(c),this.inner.splice(n.index,0,new CE(n.parser,n.parser.startParse(this.input,_E(n.mounts,c),c),n.ranges.map(u=>new cr(u.from-n.start,u.to-n.start)),n.bracketed,n.target,c[0].from))),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function Xce(t,e,n){for(let r of t){if(r.from>=n)break;if(r.to>e)return r.from<=e&&r.to>=n?2:1}return 0}function TE(t,e,n,r,i,s){if(e<n){let o=t.buffer[e+1];r.push(t.slice(e,n,o)),i.push(o-s)}}function Zce(t){let{node:e}=t,n=[],r=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let i=t.tree,s=i.children.indexOf(r),o=i.children[s],a=o.buffer,l=[s];function c(u,f,d,h,g,m){let v=n[m],y=[],x=[];TE(o,u,v,y,x,h);let b=a[v+1],k=a[v+2];l.push(y.length);let w=m?c(v+4,a[v+3],o.set.types[a[v]],b,k-b,m-1):e.toTree();return y.push(w),x.push(b-h),TE(o,a[v+3],f,y,x,h),new Re(d,y,x,g)}i.children[s]=c(0,a.length,xt.none,0,o.length,n.length-1);for(let u of l){let f=t.tree.children[u],d=t.tree.positions[u];t.yield(new Ut(f,d+t.from,u,t._tree))}}class EE{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(Ve.IncludeAnonymous|Ve.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)n.to>=e&&n.enter(r,1,Ve.IgnoreOverlays|Ve.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof Re)n=n.children[0];else break}return!1}}let Wce=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(n=r.tree.prop(w0))!==null&&n!==void 0?n:r.to,this.inner=new EE(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(w0))!==null&&e!==void 0?e:n.to,this.inner=new EE(n.tree,-n.offset)}}findMounts(e,n){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(r=s.tree)===null||r===void 0?void 0:r.prop(Oe.mounted);if(o&&o.parser==n)for(let a=this.fragI;a<this.fragments.length;a++){let l=this.fragments[a];if(l.from>=s.to)break;l.tree==this.curFrag.tree&&i.push({frag:l,pos:s.from-l.offset,mount:o})}}}return i}};function RE(t,e){let n=null,r=e;for(let i=1,s=0;i<t.length;i++){let o=t[i-1].to,a=t[i].from;for(;s<r.length;s++){let l=r[s];if(l.from>=a)break;l.to<=o||(n||(r=n=e.slice()),l.from<o?(n[s]=new cr(l.from,o),l.to>a&&n.splice(s+1,0,new cr(a,l.to))):l.to>a?n[s--]=new cr(a,l.to):n.splice(s--,1))}}return r}function qce(t,e,n,r){let i=0,s=0,o=!1,a=!1,l=-1e9,c=[];for(;;){let u=i==t.length?1e9:o?t[i].to:t[i].from,f=s==e.length?1e9:a?e[s].to:e[s].from;if(o!=a){let d=Math.max(l,n),h=Math.min(u,f,r);d<h&&c.push(new cr(d,h))}if(l=Math.min(u,f),l==1e9)break;u==l&&(o?(o=!1,i++):o=!0),f==l&&(a?(a=!1,s++):a=!0)}return c}function _E(t,e){let n=[];for(let{pos:r,mount:i,frag:s}of t){let o=r+(i.overlay?i.overlay[0].from:0),a=o+i.tree.length,l=Math.max(s.from,o),c=Math.min(s.to,a);if(i.overlay){let u=i.overlay.map(d=>new cr(d.from+r,d.to+r)),f=qce(e,u,l,c);for(let d=0,h=l;;d++){let g=d==f.length,m=g?c:f[d].from;if(m>h&&n.push(new Wi(h,m,i.tree,-o,s.from>=h||s.openStart,s.to<=m||s.openEnd)),g)break;h=f[d].to}}else n.push(new Wi(l,c,i.tree,-o,s.from>=o||s.openStart,s.to<=a||s.openEnd))}return n}let Yce=0;class Ln{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=Yce++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof Ln&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new Ln(r,[],null,[]);if(i.set.push(i),n)for(let s of n.set)i.set.push(s);return i}static defineModifier(e){let n=new sm(e);return r=>r.modified.indexOf(n)>-1?r:sm.get(r.base||r,r.modified.concat(n).sort((i,s)=>i.id-s.id))}}let Uce=0;class sm{constructor(e){this.name=e,this.instances=[],this.id=Uce++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&Hce(n,a.modified));if(r)return r;let i=[],s=new Ln(e.name,i,e,n);for(let a of n)a.instances.push(s);let o=Gce(n);for(let a of e.set)if(!a.modified.length)for(let l of o)i.push(sm.get(a,l));return s}}function Hce(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function Gce(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function uc(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let s=[],o=2,a=i;for(let f=0;;){if(a=="..."&&f>0&&f+3==i.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+i);if(s.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==i.length)break;let h=i[f++];if(f==i.length&&h=="!"){o=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);a=i.slice(f)}let l=s.length-1,c=s[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new hf(r,o,l>0?s.slice(0,l):null);e[c]=u.sort(e[c])}}return aL.add(e)}const aL=new Oe({combine(t,e){let n,r,i;for(;t||e;){if(!t||e&&t.depth>=e.depth?(i=e,e=e.next):(i=t,t=t.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let s=new hf(i.tags,i.mode,i.context);n?n.next=s:r=s,n=s}return r}});class hf{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}hf.empty=new hf([],2,null);function lL(t,e){let n=Object.create(null);for(let s of t)if(!Array.isArray(s.tag))n[s.tag.id]=s.class;else for(let o of s.tag)n[o.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let o=i;for(let a of s)for(let l of a.set){let c=n[l.id];if(c){o=o?o+" "+c:c;break}}return o},scope:r}}function Kce(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function Jce(t,e,n,r=0,i=t.length){let s=new eue(r,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),r,i,"",s.highlighters),s.flush(i)}class eue{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,s){let{type:o,from:a,to:l}=e;if(a>=r||l<=n)return;o.isTop&&(s=this.highlighters.filter(h=>!h.scope||h.scope(o)));let c=i,u=tue(e)||hf.empty,f=Kce(s,u.tags);if(f&&(c&&(c+=" "),c+=f,u.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(n,a),c),u.opaque)return;let d=e.tree&&e.tree.prop(Oe.mounted);if(d&&d.overlay){let h=e.node.enter(d.overlay[0].from+a,1),g=this.highlighters.filter(v=>!v.scope||v.scope(d.tree.type)),m=e.firstChild();for(let v=0,y=a;;v++){let x=v<d.overlay.length?d.overlay[v]:null,b=x?x.from+a:l,k=Math.max(n,y),w=Math.min(r,b);if(k<w&&m)for(;e.from<w&&(this.highlightRange(e,k,w,i,s),this.startSpan(Math.min(w,e.to),c),!(e.to>=b||!e.nextSibling())););if(!x||b>r)break;y=x.to+a,y>n&&(this.highlightRange(h.cursor(),Math.max(n,x.from+a),Math.min(r,y),"",g),this.startSpan(Math.min(r,y),c))}m&&e.parent()}else if(e.firstChild()){d&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,s),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function tue(t){let e=t.type.prop(aL);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const se=Ln.define,nh=se(),bs=se(),$E=se(bs),AE=se(bs),ws=se(),rh=se(ws),$y=se(ws),oi=se(),yo=se(oi),ii=se(),si=se(),S0=se(),Mc=se(S0),ih=se(),T={comment:nh,lineComment:se(nh),blockComment:se(nh),docComment:se(nh),name:bs,variableName:se(bs),typeName:$E,tagName:se($E),propertyName:AE,attributeName:se(AE),className:se(bs),labelName:se(bs),namespace:se(bs),macroName:se(bs),literal:ws,string:rh,docString:se(rh),character:se(rh),attributeValue:se(rh),number:$y,integer:se($y),float:se($y),bool:se(ws),regexp:se(ws),escape:se(ws),color:se(ws),url:se(ws),keyword:ii,self:se(ii),null:se(ii),atom:se(ii),unit:se(ii),modifier:se(ii),operatorKeyword:se(ii),controlKeyword:se(ii),definitionKeyword:se(ii),moduleKeyword:se(ii),operator:si,derefOperator:se(si),arithmeticOperator:se(si),logicOperator:se(si),bitwiseOperator:se(si),compareOperator:se(si),updateOperator:se(si),definitionOperator:se(si),typeOperator:se(si),controlOperator:se(si),punctuation:S0,separator:se(S0),bracket:Mc,angleBracket:se(Mc),squareBracket:se(Mc),paren:se(Mc),brace:se(Mc),content:oi,heading:yo,heading1:se(yo),heading2:se(yo),heading3:se(yo),heading4:se(yo),heading5:se(yo),heading6:se(yo),contentSeparator:se(oi),list:se(oi),quote:se(oi),emphasis:se(oi),strong:se(oi),link:se(oi),monospace:se(oi),strikethrough:se(oi),inserted:se(),deleted:se(),changed:se(),invalid:se(),meta:ih,documentMeta:se(ih),annotation:se(ih),processingInstruction:se(ih),definition:Ln.defineModifier("definition"),constant:Ln.defineModifier("constant"),function:Ln.defineModifier("function"),standard:Ln.defineModifier("standard"),local:Ln.defineModifier("local"),special:Ln.defineModifier("special")};for(let t in T){let e=T[t];e instanceof Ln&&(e.name=t)}lL([{tag:T.link,class:"tok-link"},{tag:T.heading,class:"tok-heading"},{tag:T.emphasis,class:"tok-emphasis"},{tag:T.strong,class:"tok-strong"},{tag:T.keyword,class:"tok-keyword"},{tag:T.atom,class:"tok-atom"},{tag:T.bool,class:"tok-bool"},{tag:T.url,class:"tok-url"},{tag:T.labelName,class:"tok-labelName"},{tag:T.inserted,class:"tok-inserted"},{tag:T.deleted,class:"tok-deleted"},{tag:T.literal,class:"tok-literal"},{tag:T.string,class:"tok-string"},{tag:T.number,class:"tok-number"},{tag:[T.regexp,T.escape,T.special(T.string)],class:"tok-string2"},{tag:T.variableName,class:"tok-variableName"},{tag:T.local(T.variableName),class:"tok-variableName tok-local"},{tag:T.definition(T.variableName),class:"tok-variableName tok-definition"},{tag:T.special(T.variableName),class:"tok-variableName2"},{tag:T.definition(T.propertyName),class:"tok-propertyName tok-definition"},{tag:T.typeName,class:"tok-typeName"},{tag:T.namespace,class:"tok-namespace"},{tag:T.className,class:"tok-className"},{tag:T.macroName,class:"tok-macroName"},{tag:T.propertyName,class:"tok-propertyName"},{tag:T.operator,class:"tok-operator"},{tag:T.comment,class:"tok-comment"},{tag:T.meta,class:"tok-meta"},{tag:T.invalid,class:"tok-invalid"},{tag:T.punctuation,class:"tok-punctuation"}]);var Ay;const As=new Oe;function $g(t){return oe.define({combine:t?e=>e.concat(t):void 0})}const z1=new Oe;class Fn{constructor(e,n,r=[],i=""){this.data=e,this.name=i,Ae.prototype.hasOwnProperty("tree")||Object.defineProperty(Ae.prototype,"tree",{get(){return We(this)}}),this.parser=n,this.extension=[Js.of(this),Ae.languageData.of((s,o,a)=>{let l=QE(s,o,a),c=l.type.prop(As);if(!c)return[];let u=s.facet(c),f=l.type.prop(z1);if(f){let d=l.resolve(o-l.from,a);for(let h of f)if(h.test(d,s)){let g=s.facet(h.facet);return h.type=="replace"?g:g.concat(u)}}return u})].concat(r)}isActiveAt(e,n,r=-1){return QE(e,n,r).type.prop(As)==this.data}findRegions(e){let n=e.facet(Js);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(As)==this.data){r.push({from:o,to:o+s.length});return}let a=s.prop(Oe.mounted);if(a){if(a.tree.prop(As)==this.data){if(a.overlay)for(let l of a.overlay)r.push({from:l.from+o,to:l.to+o});else r.push({from:o,to:o+s.length});return}else if(a.overlay){let l=r.length;if(i(a.tree,a.overlay[0].from+o),r.length>l)return}}for(let l=0;l<s.children.length;l++){let c=s.children[l];c instanceof Re&&i(c,s.positions[l]+o)}};return i(We(e),0),r}get allowsNesting(){return!0}}Fn.setState=ve.define();function QE(t,e,n){let r=t.facet(Js),i=We(t).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,n,Ve.ExcludeBuffers|Ve.EnterBracketed))s.type.isTop&&(i=s);return i}class Dl extends Fn{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=$g(e.languageData);return new Dl(n,e.parser.configure({props:[As.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new Dl(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function We(t){let e=t.field(Fn.state,!1);return e?e.tree:Re.empty}class nue{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let Dc=null;class ia{constructor(e,n,r=[],i,s,o,a,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new ia(e,n,[],Re.empty,0,r,[],null)}startParse(){return this.parser.startParse(new nue(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Re.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Wi.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Wi.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Dc;Dc=this;try{return e()}finally{Dc=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=IE(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,f,d)=>l.push({fromA:c,toA:u,fromB:f,toB:d})),r=Wi.applyChanges(r,l),i=Re.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),f=e.mapPos(c.to,-1);u<f&&a.push({from:u,to:f})}}}return new ia(this.parser,n,r,i,s,o,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=IE(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends _g{createParse(n,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let l=Dc;if(l){for(let c of i)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new Re(xt.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Dc}}function IE(t,e,n){return Wi.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Ll{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Ll(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=ia.create(e.facet(Js).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Ll(r)}}Fn.state=At.define({create:Ll.init,update(t,e){for(let n of e.effects)if(n.is(Fn.setState))return n.value;return e.startState.facet(Js)!=e.state.facet(Js)?Ll.init(e.state):t.apply(e)}});let cL=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(cL=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Qy=typeof navigator<"u"&&(!((Ay=navigator.scheduling)===null||Ay===void 0)&&Ay.isInputPending)?()=>navigator.scheduling.isInputPending():null,rue=ht.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Fn.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Fn.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=cL(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(Fn.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!Qy?Math.max(25,e.timeRemaining()-5):1e9),a=s.context.treeLen<i&&r.doc.length>i+1e3,l=s.context.work(()=>Qy&&Qy()||Date.now()>o,i+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Fn.setState.of(new Ll(s.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>yn(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Js=oe.define({combine(t){return t.length?t[0]:null},enables:t=>[Fn.state,rue,re.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class zl{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class D{constructor(e,n,r,i,s,o=void 0){this.name=e,this.alias=n,this.extensions=r,this.filename=i,this.loadFunc=s,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:n,support:r}=e;if(!n){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(r)}return new D(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,n,r)}static matchFilename(e,n){for(let i of e)if(i.filename&&i.filename.test(n))return i;let r=/\.([^.]+)$/.exec(n);if(r){for(let i of e)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(e,n,r=!0){n=n.toLowerCase();for(let i of e)if(i.alias.some(s=>s==n))return i;if(r)for(let i of e)for(let s of i.alias){let o=n.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(n[o-1])&&!/\w/.test(n[o+s.length])))return i}return null}}const iue=oe.define(),fc=oe.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function sa(t){let e=t.facet(fc);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function pf(t,e){let n="",r=t.tabSize,i=t.facet(fc)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let s=0;s<e;s++)n+=i;return n}function B1(t,e){t instanceof Ae&&(t=new Ag(t));for(let r of t.state.facet(iue)){let i=r(t,e);if(i!==void 0)return i}let n=We(t.state);return n.length>=e?sue(t,n,e):null}class Ag{constructor(e,n={}){this.state=e,this.options=n,this.unit=sa(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),s=this.countColumn(r,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(s+=o-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,n=e.length){return Zr(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const dc=new Oe;function sue(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let s=[];for(let o=i;o&&!(o.from<r.node.from||o.to>r.node.to||o.from==r.node.from&&o.type==r.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)r={node:s[o],next:r}}return uL(r,t,n)}function uL(t,e,n){for(let r=t;r;r=r.next){let i=aue(r.node);if(i)return i(V1.create(e,n,r))}return 0}function oue(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function aue(t){let e=t.type.prop(dc);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(Oe.closedBy))){let i=t.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>fL(o,!0,1,void 0,s&&!oue(o)?i.from:void 0)}return t.parent==null?lue:null}function lue(){return 0}class V1 extends Ag{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new V1(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(cue(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return uL(this.context.next,this.base,this.pos)}}function cue(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function uue(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=o)return null;let c=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+c}}a=l.to}}function fue({closing:t,align:e=!0,units:n=1}){return r=>fL(r,e,n,t)}function fL(t,e,n,r,i){let s=t.textAfter,o=s.match(/^\s*/)[0].length,a=r&&s.slice(o,o+r.length)==r||i==t.pos+o,l=e?uue(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const due=t=>t.baseIndent;function qh({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const hue=200;function pue(){return Ae.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+hue)return t;let s=n.sliceString(i.from,r);if(!e.some(c=>c.test(s)))return t;let{state:o}=t,a=-1,l=[];for(let{head:c}of o.selection.ranges){let u=o.doc.lineAt(c);if(u.from==a)continue;a=u.from;let f=B1(o,u.from);if(f==null)continue;let d=/^\s*/.exec(u.text)[0],h=pf(o,f);d!=h&&l.push({from:u.from,to:u.from+d.length,insert:h})}return l.length?[t,{changes:l,sequential:!0}]:t})}const dL=oe.define(),hc=new Oe;function hL(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function mue(t,e,n){let r=We(t);if(r.length<n)return null;let i=r.resolveStack(n,1),s=null;for(let o=i;o;o=o.next){let a=o.node;if(a.to<=n||a.from>n)continue;if(s&&a.from<e)break;let l=a.type.prop(hc);if(l&&(a.to<r.length-50||r.length==t.doc.length||!gue(a))){let c=l(a,t);c&&c.from<=n&&c.from>=e&&c.to>n&&(s=c)}}return s}function gue(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function om(t,e,n){for(let r of t.facet(dL)){let i=r(t,e,n);if(i)return i}return mue(t,e,n)}function pL(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const Qg=ve.define({map:pL}),nd=ve.define({map:pL});function mL(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const oa=At.define({create(){return he.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,r)=>t=NE(t,n,r)),t=t.map(e.changes);for(let n of e.effects)if(n.is(Qg)&&!Oue(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(yL),i=r?he.replace({widget:new kue(r(e.state,n.value))}):jE;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(nd)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=NE(t,e.selection.main.head)),t},provide:t=>re.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(jE.range(r,i))}return he.set(e,!0)}});function NE(t,e,n=e){let r=!1;return t.between(e,n,(i,s)=>{i<n&&s>e&&(r=!0)}),r?t.update({filterFrom:e,filterTo:n,filter:(i,s)=>i>=n||s<=e}):t}function am(t,e,n){var r;let i=null;return(r=t.field(oa,!1))===null||r===void 0||r.between(e,n,(s,o)=>{(!i||i.from>s)&&(i={from:s,to:o})}),i}function Oue(t,e,n){let r=!1;return t.between(e,e,(i,s)=>{i==e&&s==n&&(r=!0)}),r}function gL(t,e){return t.field(oa,!1)?e:e.concat(ve.appendConfig.of(vL()))}const yue=t=>{for(let e of mL(t)){let n=om(t.state,e.from,e.to);if(n)return t.dispatch({effects:gL(t.state,[Qg.of(n),OL(t,n)])}),!0}return!1},vue=t=>{if(!t.state.field(oa,!1))return!1;let e=[];for(let n of mL(t)){let r=am(t.state,n.from,n.to);r&&e.push(nd.of(r),OL(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function OL(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return re.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const xue=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),s=om(e,i.from,i.to);s&&n.push(Qg.of(s)),r=(s?t.lineBlockAt(s.to):i).to+1}return n.length&&t.dispatch({effects:gL(t.state,n)}),!!n.length},bue=t=>{let e=t.state.field(oa,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(nd.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},wue=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:yue},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:vue},{key:"Ctrl-Alt-[",run:xue},{key:"Ctrl-Alt-]",run:bue}],Sue={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},yL=oe.define({combine(t){return _i(t,Sue)}});function vL(t){return[oa,Tue]}function xL(t,e){let{state:n}=t,r=n.facet(yL),i=o=>{let a=t.lineBlockAt(t.posAtDOM(o.target)),l=am(t.state,a.from,a.to);l&&t.dispatch({effects:nd.of(l)}),o.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const jE=he.replace({widget:new class extends Yr{toDOM(t){return xL(t,null)}}});class kue extends Yr{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return xL(e,this.value)}}const Cue={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Iy extends rs{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function Pue(t={}){let e={...Cue,...t},n=new Iy(e,!0),r=new Iy(e,!1),i=ht.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(Js)!=o.state.facet(Js)||o.startState.field(oa,!1)!=o.state.field(oa,!1)||We(o.startState)!=We(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let a=new ts;for(let l of o.viewportLineBlocks){let c=am(o.state,l.from,l.to)?r:om(o.state,l.from,l.to)?n:null;c&&a.add(l.from,l.from,c)}return a.finish()}}),{domEventHandlers:s}=e;return[i,kce({class:"cm-foldGutter",markers(o){var a;return((a=o.plugin(i))===null||a===void 0?void 0:a.markers)||Qe.empty},initialSpacer(){return new Iy(e,!1)},domEventHandlers:{...s,click:(o,a,l)=>{if(s.click&&s.click(o,a,l))return!0;let c=am(o.state,a.from,a.to);if(c)return o.dispatch({effects:nd.of(c)}),!0;let u=om(o.state,a.from,a.to);return u?(o.dispatch({effects:Qg.of(u)}),!0):!1}}}),vL()]}const Tue=re.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class pc{constructor(e,n){this.specs=e;let r;function i(a){let l=Us.newName();return(r||(r=Object.create(null)))["."+l]=a,l}const s=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,o=n.scope;this.scope=o instanceof Fn?a=>a.prop(As)==o.data:o?a=>a==o:void 0,this.style=lL(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:s}).style,this.module=r?new Us(r):null,this.themeType=n.themeType}static define(e,n){return new pc(e,n||{})}}const k0=oe.define(),bL=oe.define({combine(t){return t.length?[t[0]]:null}});function Ny(t){let e=t.facet(k0);return e.length?e:t.facet(bL)}function Ig(t,e){let n=[Rue],r;return t instanceof pc&&(t.module&&n.push(re.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(bL.of(t)):r?n.push(k0.computeN([re.darkTheme],i=>i.facet(re.darkTheme)==(r=="dark")?[t]:[])):n.push(k0.of(t)),n}class Eue{constructor(e){this.markCache=Object.create(null),this.tree=We(e.state),this.decorations=this.buildDeco(e,Ny(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=We(e.state),r=Ny(e.state),i=r!=Ny(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length<s.to&&!i&&n.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return he.none;let r=new ts;for(let{from:i,to:s}of e.visibleRanges)Jce(this.tree,n,(o,a,l)=>{r.add(o,a,this.markCache[l]||(this.markCache[l]=he.mark({class:l})))},i,s);return r.finish()}}const Rue=os.high(ht.fromClass(Eue,{decorations:t=>t.decorations})),wL=pc.define([{tag:T.meta,color:"#404740"},{tag:T.link,textDecoration:"underline"},{tag:T.heading,textDecoration:"underline",fontWeight:"bold"},{tag:T.emphasis,fontStyle:"italic"},{tag:T.strong,fontWeight:"bold"},{tag:T.strikethrough,textDecoration:"line-through"},{tag:T.keyword,color:"#708"},{tag:[T.atom,T.bool,T.url,T.contentSeparator,T.labelName],color:"#219"},{tag:[T.literal,T.inserted],color:"#164"},{tag:[T.string,T.deleted],color:"#a11"},{tag:[T.regexp,T.escape,T.special(T.string)],color:"#e40"},{tag:T.definition(T.variableName),color:"#00f"},{tag:T.local(T.variableName),color:"#30a"},{tag:[T.typeName,T.namespace],color:"#085"},{tag:T.className,color:"#167"},{tag:[T.special(T.variableName),T.macroName],color:"#256"},{tag:T.definition(T.propertyName),color:"#00c"},{tag:T.comment,color:"#940"},{tag:T.invalid,color:"#f00"}]),_ue=re.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),SL=1e4,kL="()[]{}",CL=oe.define({combine(t){return _i(t,{afterCursor:!0,brackets:kL,maxScanDistance:SL,renderMatch:Que})}}),$ue=he.mark({class:"cm-matchingBracket"}),Aue=he.mark({class:"cm-nonmatchingBracket"});function Que(t){let e=[],n=t.matched?$ue:Aue;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const Iue=At.define({create(){return he.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(CL);for(let i of e.state.selection.ranges){if(!i.empty)continue;let s=yi(e.state,i.head,-1,r)||i.head>0&&yi(e.state,i.head-1,1,r)||r.afterCursor&&(yi(e.state,i.head,1,r)||i.head<e.state.doc.length&&yi(e.state,i.head+1,-1,r));s&&(n=n.concat(r.renderMatch(s,e.state)))}return he.set(n,!0)},provide:t=>re.decorations.from(t)}),Nue=[Iue,_ue];function jue(t={}){return[CL.of(t),Nue]}const PL=new Oe;function C0(t,e,n){let r=t.prop(e<0?Oe.openedBy:Oe.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function P0(t){let e=t.type.prop(PL);return e?e(t.node):t}function yi(t,e,n,r={}){let i=r.maxScanDistance||SL,s=r.brackets||kL,o=We(t),a=o.resolveInner(e,n);for(let l=a;l;l=l.parent){let c=C0(l.type,n,s);if(c&&l.from<l.to){let u=P0(l);if(u&&(n>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return Mue(t,e,n,l,u,c,s)}}return Due(t,e,n,o,a.type,i,s)}function Mue(t,e,n,r,i,s,o){let a=r.parent,l={from:i.from,to:i.to},c=0,u=a==null?void 0:a.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(c==0&&s.indexOf(u.type.name)>-1&&u.from<u.to){let f=P0(u);return{start:l,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(C0(u.type,n,o))c++;else if(C0(u.type,-n,o)){if(c==0){let f=P0(u);return{start:l,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}c--}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}function Due(t,e,n,r,i,s,o){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=o.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),f=0;for(let d=0;!u.next().done&&d<=s;){let h=u.value;n<0&&(d+=h.length);let g=e+d*n;for(let m=n>0?0:h.length-1,v=n>0?h.length:-1;m!=v;m+=n){let y=o.indexOf(h[m]);if(!(y<0||r.resolveInner(g+m,1).type!=i))if(y%2==0==n>0)f++;else{if(f==1)return{start:c,end:{from:g+m,to:g+m+1},matched:y>>1==l>>1};f--}}n>0&&(d+=h.length)}return u.done?{start:c,matched:!1}:null}function ME(t,e,n,r=0,i=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let s=i;for(let o=r;o<e;o++)t.charCodeAt(o)==9?s+=n-s%n:s++;return s}class TL{constructor(e,n,r,i){this.string=e,this.tabSize=n,this.indentUnit=r,this.overrideIndent=i,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let n=this.string.charAt(this.pos),r;if(typeof e=="string"?r=n==e:r=n&&(e instanceof RegExp?e.test(n):e(n)),r)return++this.pos,n}eatWhile(e){let n=this.pos;for(;this.eat(e););return this.pos>n}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ME(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var e;return(e=this.overrideIndent)!==null&&e!==void 0?e:ME(this.string,null,this.tabSize)}match(e,n,r){if(typeof e=="string"){let i=o=>r?o.toLowerCase():o,s=this.string.substr(this.pos,e.length);return i(s)==i(e)?(n!==!1&&(this.pos+=e.length),!0):null}else{let i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&n!==!1&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}}function Lue(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||zue,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||Z1,mergeTokens:t.mergeTokens!==!1}}function zue(t){if(typeof t!="object")return t;let e={};for(let n in t){let r=t[n];e[n]=r instanceof Array?r.slice():r}return e}const DE=new WeakMap;class F1 extends Fn{constructor(e){let n=$g(e.languageData),r=Lue(e),i,s=new class extends _g{createParse(o,a,l){return new Vue(i,o,a,l)}};super(n,s,[],e.name),this.topNode=Zue(n,this),i=this,this.streamParser=r,this.stateAfter=new Oe({perNode:!0}),this.tokenTable=e.tokenTable?new $L(r.tokenTable):Xue}static define(e){return new F1(e)}getIndent(e){let n,{overrideIndentation:r}=e.options;r&&(n=DE.get(e.state),n!=null&&n<e.pos-1e4&&(n=void 0));let i=X1(this,e.node.tree,e.node.from,e.node.from,n??e.pos),s,o;if(i?(o=i.state,s=i.pos+1):(o=this.streamParser.startState(e.unit),s=e.node.from),e.pos-s>1e4)return null;for(;s<e.pos;){let l=e.state.doc.lineAt(s),c=Math.min(e.pos,l.to);if(l.length){let u=r?r(l.from):-1,f=new TL(l.text,e.state.tabSize,e.unit,u<0?void 0:u);for(;f.pos<c-l.from;)RL(this.streamParser.token,f,o)}else this.streamParser.blankLine(o,e.unit);if(c==e.pos)break;s=l.to+1}let a=e.lineAt(e.pos);return r&&n==null&&DE.set(e.state,a.from),this.streamParser.indent(o,/^\s*(.*)/.exec(a.text)[1],e)}get allowsNesting(){return!1}}function X1(t,e,n,r,i){let s=n>=r&&n+e.length<=i&&e.prop(t.stateAfter);if(s)return{state:t.streamParser.copyState(s),pos:n+e.length};for(let o=e.children.length-1;o>=0;o--){let a=e.children[o],l=n+e.positions[o],c=a instanceof Re&&l<i&&X1(t,a,l,r,i);if(c)return c}return null}function EL(t,e,n,r,i){if(i&&n<=0&&r>=e.length)return e;!i&&n==0&&e.type==t.topNode&&(i=!0);for(let s=e.children.length-1;s>=0;s--){let o=e.positions[s],a=e.children[s],l;if(o<r&&a instanceof Re){if(!(l=EL(t,a,n-o,r-o,i)))break;return i?new Re(e.type,e.children.slice(0,s).concat(l),e.positions.slice(0,s+1),o+l.length):l}}return null}function Bue(t,e,n,r,i){for(let s of e){let o=s.from+(s.openStart?25:0),a=s.to-(s.openEnd?25:0),l=o<=n&&a>n&&X1(t,s.tree,0-s.offset,n,a),c;if(l&&l.pos<=r&&(c=EL(t,s.tree,n+s.offset,l.pos+s.offset,!1)))return{state:l.state,tree:c}}return{state:t.streamParser.startState(i?sa(i):4),tree:Re.empty}}let Vue=class{constructor(e,n,r,i){this.lang=e,this.input=n,this.fragments=r,this.ranges=i,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=i[i.length-1].to;let s=ia.get(),o=i[0].from,{state:a,tree:l}=Bue(e,r,o,this.to,s==null?void 0:s.state);this.state=a,this.parsedPos=this.chunkStart=o+l.length;for(let c=0;c<l.children.length;c++)this.chunks.push(l.children[c]),this.chunkPos.push(l.positions[c]);s&&this.parsedPos<s.viewport.from-1e5&&i.some(c=>c.from<=s.viewport.from&&c.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState(sa(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=ia.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),r=Math.min(n,this.chunkStart+512);for(e&&(r=Math.min(r,e.viewport.to));this.parsedPos<r;)this.parseLine(e);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==`
|
|
487
|
+
`&&(n="");else{let r=n.indexOf(`
|
|
488
|
+
`);r>-1&&(n=n.slice(0,r))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),r=e+n.length;for(let i=this.rangeIndex;;){let s=this.ranges[i].to;if(s>=r||(n=n.slice(0,s-(r-n.length)),i++,i==this.ranges.length))break;let o=this.ranges[i].from,a=this.lineAfter(o);n+=a,r=o+a.length}return{line:n,end:r}}skipGapsTo(e,n,r){for(;;){let i=this.ranges[this.rangeIndex].to,s=e+n;if(r>0?i>s:i>=s)break;let o=this.ranges[++this.rangeIndex].from;n+=o-i}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,n,r,i){let s=4;if(this.ranges.length>1){i=this.skipGapsTo(n,i,1),n+=i;let a=this.chunk.length;i=this.skipGapsTo(r,i,-1),r+=i,s+=this.chunk.length-a}let o=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&o>=0&&this.chunk[o]==e&&this.chunk[o+2]==n?this.chunk[o+2]=r:this.chunk.push(e,n,r,s),i}parseLine(e){let{line:n,end:r}=this.nextLine(),i=0,{streamParser:s}=this.lang,o=new TL(n,e?e.state.tabSize:4,e?sa(e.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let a=RL(s.token,o,this.state);if(a&&(i=this.emitToken(this.lang.tokenTable.resolve(a),this.parsedPos+o.start,this.parsedPos+o.pos,i)),o.start>1e4)break}this.parsedPos=r,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=Re.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:Fue,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new Re(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new Re(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function RL(t,e,n){e.start=e.pos;for(let r=0;r<10;r++){let i=t(e,n);if(e.pos>e.start)return i}throw new Error("Stream parser failed to advance stream.")}const Z1=Object.create(null),mf=[xt.none],Fue=new cc(mf),LE=[],zE=Object.create(null),_L=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])_L[t]=AL(Z1,e);class $L{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),_L)}resolve(e){return e?this.table[e]||(this.table[e]=AL(this.extra,e)):0}}const Xue=new $L(Z1);function jy(t,e){LE.indexOf(t)>-1||(LE.push(t),console.warn(e))}function AL(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=t[c]||T[c];u?typeof u=="function"?l.length?l=l.map(u):jy(c,`Modifier ${c} used at start of tag`):l.length?jy(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:jy(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(a=>a.id),s=zE[i];if(s)return s.id;let o=zE[i]=xt.define({id:mf.length,name:r,props:[uc({[r]:n})]});return mf.push(o),o.id}function Zue(t,e){let n=xt.define({id:mf.length,name:"Document",props:[As.add(()=>t),dc.add(()=>r=>e.getIndent(r))],top:!0});return mf.push(n),n}Ye.RTL,Ye.LTR;const Wue=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=q1(t.state,n.from);return r.line?que(t):r.block?Uue(t):!1};function W1(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const que=W1(Kue,0),Yue=W1(QL,0),Uue=W1((t,e)=>QL(t,e,Gue(e)),0);function q1(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const Lc=50;function Hue(t,{open:e,close:n},r,i){let s=t.sliceDoc(r-Lc,r),o=t.sliceDoc(i,i+Lc),a=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(o)[0].length,c=s.length-a;if(s.slice(c-e.length,c)==e&&o.slice(l,l+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:i+l,margin:l&&1}};let u,f;i-r<=2*Lc?u=f=t.sliceDoc(r,i):(u=t.sliceDoc(r,r+Lc),f=t.sliceDoc(i-Lc,i));let d=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(f)[0].length,g=f.length-h-n.length;return u.slice(d,d+e.length)==e&&f.slice(g,g+n.length)==n?{open:{pos:r+d+e.length,margin:/\s/.test(u.charAt(d+e.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(f.charAt(g-1))?1:0}}:null}function Gue(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function QL(t,e,n=e.selection.ranges){let r=n.map(s=>q1(e,s.from).block);if(!r.every(s=>s))return null;let i=n.map((s,o)=>Hue(e,r[o],s.from,s.to));if(t!=2&&!i.every(s=>s))return{changes:e.changes(n.map((s,o)=>i[o]?[]:[{from:s.from,insert:r[o].open+" "},{from:s.to,insert:" "+r[o].close}]))};if(t!=1&&i.some(s=>s)){let s=[];for(let o=0,a;o<i.length;o++)if(a=i[o]){let l=r[o],{open:c,close:u}=a;s.push({from:c.pos-l.open.length,to:c.pos+c.margin},{from:u.pos-u.margin,to:u.pos+l.close.length})}return{changes:s}}return null}function Kue(t,e,n=e.selection.ranges){let r=[],i=-1;e:for(let{from:s,to:o}of n){let a=r.length,l=1e9,c;for(let u=s;u<=o;){let f=e.doc.lineAt(u);if(c==null&&(c=q1(e,f.from).line,!c))continue e;if(f.from>i&&(s==o||o>f.from)){i=f.from;let d=/^\s*/.exec(f.text)[0].length,h=d==f.length,g=f.text.slice(d,d+c.length)==c?d:-1;d<f.text.length&&d<l&&(l=d),r.push({line:f,comment:g,token:c,indent:d,empty:h,single:!1})}u=f.to+1}if(l<1e9)for(let u=a;u<r.length;u++)r[u].indent<r[u].line.text.length&&(r[u].indent=l);r.length==a+1&&(r[a].single=!0)}if(t!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:a,token:l,indent:c,empty:u,single:f}of r)(f||!u)&&s.push({from:a.from+c,insert:l+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:a,token:l}of r)if(a>=0){let c=o.from+a,u=c+l.length;o.text[u-o.from]==" "&&u++,s.push({from:c,to:u})}return{changes:s}}return null}const T0=Ri.define(),Jue=Ri.define(),efe=oe.define(),IL=oe.define({combine(t){return _i(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),NL=At.define({create(){return vi.empty},update(t,e){let n=e.state.facet(IL),r=e.annotation(T0);if(r){let l=vn.fromTransaction(e,r.selection),c=r.side,u=c==0?t.undone:t.done;return l?u=lm(u,u.length,n.minDepth,l):u=DL(u,e.startState.selection),new vi(c==0?r.rest:u,c==0?u:r.rest)}let i=e.annotation(Jue);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(yt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=vn.fromTransaction(e),o=e.annotation(yt.time),a=e.annotation(yt.userEvent);return s?t=t.addChanges(s,o,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,a,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new vi(t.done.map(vn.fromJSON),t.undone.map(vn.fromJSON))}});function tfe(t={}){return[NL,IL.of(t),re.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?jL:e.inputType=="historyRedo"?E0:null;return r?(e.preventDefault(),r(n)):!1}})]}function Ng(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(NL,!1);if(!i)return!1;let s=i.pop(t,n,e);return s?(r(s),!0):!1}}const jL=Ng(0,!1),E0=Ng(1,!1),nfe=Ng(0,!0),rfe=Ng(1,!0);class vn{constructor(e,n,r,i,s){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new vn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new vn(e.changes&&wt.fromJSON(e.changes),[],e.mapped&&Si.fromJSON(e.mapped),e.startSelection&&Z.fromJSON(e.startSelection),e.selectionsAfter.map(Z.fromJSON))}static fromTransaction(e,n){let r=ur;for(let i of e.startState.facet(efe)){let s=i(e);s.length&&(r=r.concat(s))}return!r.length&&e.changes.empty?null:new vn(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,ur)}static selection(e){return new vn(void 0,ur,void 0,void 0,e)}}function lm(t,e,n,r){let i=e+1>n+20?e-n-1:0,s=t.slice(i,e);return s.push(r),s}function ife(t,e){let n=[],r=!1;return t.iterChangedRanges((i,s)=>n.push(i,s)),e.iterChangedRanges((i,s,o,a)=>{for(let l=0;l<n.length;){let c=n[l++],u=n[l++];a>=c&&o<=u&&(r=!0)}}),r}function sfe(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function ML(t,e){return t.length?e.length?t.concat(e):t:e}const ur=[],ofe=200;function DL(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-ofe));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),lm(t,t.length-1,1e9,n.setSelAfter(r)))}else return[vn.selection([e])]}function afe(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function My(t,e){if(!t.length)return t;let n=t.length,r=ur;for(;n;){let i=lfe(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let s=t.slice(0,n);return s[n-1]=i,s}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[vn.selection(r)]:ur}function lfe(t,e,n){let r=ML(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):ur,n);if(!t.changes)return vn.selection(r);let i=t.changes.map(e),s=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(s):s;return new vn(i,ve.mapEffects(t.effects,e),o,t.startSelection.map(s),r)}const cfe=/^(input\.type|delete)($|\.)/;class vi{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new vi(this.done,this.undone):this}addChanges(e,n,r,i,s){let o=this.done,a=o[o.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!r||cfe.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,ife(a.changes,e.changes))||r=="input.type.compose")?o=lm(o,o.length-1,i.minDepth,new vn(e.changes.compose(a.changes),ML(ve.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,ur)):o=lm(o,o.length,i.minDepth,e),new vi(o,ur,n,r)}addSelection(e,n,r,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:ur;return s.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&sfe(s[s.length-1],e)?this:new vi(DL(this.done,e),this.undone,n,r)}addMapping(e){return new vi(My(this.done,e),My(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let s=i[i.length-1],o=s.selectionsAfter[0]||(s.startSelection?s.startSelection.map(s.changes.invertedDesc,1):n.selection);if(r&&s.selectionsAfter.length)return n.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:T0.of({side:e,rest:afe(i),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let a=i.length==1?ur:i.slice(0,i.length-1);return s.mapped&&(a=My(a,s.mapped)),n.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:T0.of({side:e,rest:a,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}vi.empty=new vi(ur,ur);const ufe=[{key:"Mod-z",run:jL,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:E0,preventDefault:!0},{linux:"Ctrl-Shift-z",run:E0,preventDefault:!0},{key:"Mod-u",run:nfe,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:rfe,preventDefault:!0}];function mc(t,e){return Z.create(t.ranges.map(e),t.mainIndex)}function Ur(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Hr({state:t,dispatch:e},n){let r=mc(t.selection,n);return r.eq(t.selection,!0)?!1:(e(Ur(t,r)),!0)}function jg(t,e){return Z.cursor(e?t.to:t.from)}function LL(t,e){return Hr(t,n=>n.empty?t.moveByChar(n,e):jg(n,e))}function Kt(t){return t.textDirectionAt(t.state.selection.main.head)==Ye.LTR}const zL=t=>LL(t,!Kt(t)),BL=t=>LL(t,Kt(t));function VL(t,e){return Hr(t,n=>n.empty?t.moveByGroup(n,e):jg(n,e))}const ffe=t=>VL(t,!Kt(t)),dfe=t=>VL(t,Kt(t));function hfe(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Mg(t,e,n){let r=We(t).resolveInner(e.head),i=n?Oe.closedBy:Oe.openedBy;for(let l=e.head;;){let c=n?r.childAfter(l):r.childBefore(l);if(!c)break;hfe(t,c,i)?r=c:l=n?c.to:c.from}let s=r.type.prop(i),o,a;return s&&(o=n?yi(t,r.from,1):yi(t,r.to,-1))&&o.matched?a=n?o.end.to:o.end.from:a=n?r.to:r.from,Z.cursor(a,n?-1:1)}const pfe=t=>Hr(t,e=>Mg(t.state,e,!Kt(t))),mfe=t=>Hr(t,e=>Mg(t.state,e,Kt(t)));function FL(t,e){return Hr(t,n=>{if(!n.empty)return jg(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const XL=t=>FL(t,!1),ZL=t=>FL(t,!0);function WL(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let s of t.state.facet(re.scrollMargins)){let o=s(t);o!=null&&o.top&&(n=Math.max(o==null?void 0:o.top,n)),o!=null&&o.bottom&&(r=Math.max(o==null?void 0:o.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function qL(t,e){let n=WL(t),{state:r}=t,i=mc(r.selection,o=>o.empty?t.moveVertically(o,e,n.height):jg(o,e));if(i.eq(r.selection))return!1;let s;if(n.selfScroll){let o=t.coordsAtPos(r.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,c=a.bottom-n.marginBottom;o&&o.top>l&&o.bottom<c&&(s=re.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-l}))}return t.dispatch(Ur(r,i),{effects:s}),!0}const BE=t=>qL(t,!1),R0=t=>qL(t,!0);function lo(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let s=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=Z.cursor(r.from+s))}return i}const gfe=t=>Hr(t,e=>lo(t,e,!0)),Ofe=t=>Hr(t,e=>lo(t,e,!1)),yfe=t=>Hr(t,e=>lo(t,e,!Kt(t))),vfe=t=>Hr(t,e=>lo(t,e,Kt(t))),xfe=t=>Hr(t,e=>Z.cursor(t.lineBlockAt(e.head).from,1)),bfe=t=>Hr(t,e=>Z.cursor(t.lineBlockAt(e.head).to,-1));function wfe(t,e,n){let r=!1,i=mc(t.selection,s=>{let o=yi(t,s.head,-1)||yi(t,s.head,1)||s.head>0&&yi(t,s.head-1,1)||s.head<t.doc.length&&yi(t,s.head+1,-1);if(!o||!o.end)return s;r=!0;let a=o.start.from==s.head?o.end.to:o.end.from;return Z.cursor(a)});return r?(e(Ur(t,i)),!0):!1}const Sfe=({state:t,dispatch:e})=>wfe(t,e);function br(t,e){let n=mc(t.state.selection,r=>{let i=e(r);return Z.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Ur(t.state,n)),!0)}function YL(t,e){return br(t,n=>t.moveByChar(n,e))}const UL=t=>YL(t,!Kt(t)),HL=t=>YL(t,Kt(t));function GL(t,e){return br(t,n=>t.moveByGroup(n,e))}const kfe=t=>GL(t,!Kt(t)),Cfe=t=>GL(t,Kt(t)),Pfe=t=>br(t,e=>Mg(t.state,e,!Kt(t))),Tfe=t=>br(t,e=>Mg(t.state,e,Kt(t)));function KL(t,e){return br(t,n=>t.moveVertically(n,e))}const JL=t=>KL(t,!1),e5=t=>KL(t,!0);function t5(t,e){return br(t,n=>t.moveVertically(n,e,WL(t).height))}const VE=t=>t5(t,!1),FE=t=>t5(t,!0),Efe=t=>br(t,e=>lo(t,e,!0)),Rfe=t=>br(t,e=>lo(t,e,!1)),_fe=t=>br(t,e=>lo(t,e,!Kt(t))),$fe=t=>br(t,e=>lo(t,e,Kt(t))),Afe=t=>br(t,e=>Z.cursor(t.lineBlockAt(e.head).from)),Qfe=t=>br(t,e=>Z.cursor(t.lineBlockAt(e.head).to)),XE=({state:t,dispatch:e})=>(e(Ur(t,{anchor:0})),!0),ZE=({state:t,dispatch:e})=>(e(Ur(t,{anchor:t.doc.length})),!0),WE=({state:t,dispatch:e})=>(e(Ur(t,{anchor:t.selection.main.anchor,head:0})),!0),qE=({state:t,dispatch:e})=>(e(Ur(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),Ife=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),Nfe=({state:t,dispatch:e})=>{let n=Dg(t).map(({from:r,to:i})=>Z.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:Z.create(n),userEvent:"select"})),!0},jfe=({state:t,dispatch:e})=>{let n=mc(t.selection,r=>{let i=We(t),s=i.resolveStack(r.from,1);if(r.empty){let o=i.resolveStack(r.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;o;o=o.next){let{node:a}=o;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&o.next)return Z.range(a.to,a.from)}return r});return n.eq(t.selection)?!1:(e(Ur(t,n)),!0)};function n5(t,e){let{state:n}=t,r=n.selection,i=n.selection.ranges.slice();for(let s of n.selection.ranges){let o=n.doc.lineAt(s.head);if(e?o.to<t.state.doc.length:o.from>0)for(let a=s;;){let l=t.moveVertically(a,e);if(l.head<o.from||l.head>o.to){i.some(c=>c.head==l.head)||i.push(l);break}else{if(l.head==a.head)break;a=l}}}return i.length==r.ranges.length?!1:(t.dispatch(Ur(n,Z.create(i,i.length-1))),!0)}const Mfe=t=>n5(t,!1),Dfe=t=>n5(t,!0),Lfe=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=Z.create([n.main]):n.main.empty||(r=Z.create([Z.cursor(n.main.head)])),r?(e(Ur(t,r)),!0):!1};function rd(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(s=>{let{from:o,to:a}=s;if(o==a){let l=e(s);l<o?(n="delete.backward",l=sh(t,l,!1)):l>o&&(n="delete.forward",l=sh(t,l,!0)),o=Math.min(o,l),a=Math.max(a,l)}else o=sh(t,o,!1),a=sh(t,a,!0);return o==a?{range:s}:{changes:{from:o,to:a},range:Z.cursor(o,o<s.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?re.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function sh(t,e,n){if(t instanceof re)for(let r of t.state.facet(re.atomicRanges).map(i=>i(t)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=n?s:i)});return e}const r5=(t,e,n)=>rd(t,r=>{let i=r.from,{state:s}=t,o=s.doc.lineAt(i),a,l;if(n&&!e&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(a=o.text.slice(0,i-o.from))){if(a[a.length-1]==" ")return i-1;let c=Zr(a,s.tabSize),u=c%sa(s)||sa(s);for(let f=0;f<u&&a[a.length-1-f]==" ";f++)i--;l=i}else l=Et(o.text,i-o.from,e,e)+o.from,l==i&&o.number!=(e?s.doc.lines:1)?l+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(l-o.from,i-o.from))&&(l=Et(o.text,l-o.from,!1,!1)+o.from);return l}),_0=t=>r5(t,!1,!0),i5=t=>r5(t,!0,!1),s5=(t,e)=>rd(t,n=>{let r=n.head,{state:i}=t,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let a=null;;){if(r==(e?s.to:s.from)){r==n.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=Et(s.text,r-s.from,e)+s.from,c=s.text.slice(Math.min(r,l)-s.from,Math.max(r,l)-s.from),u=o(c);if(a!=null&&u!=a)break;(c!=" "||r!=n.head)&&(a=u),r=l}return r}),o5=t=>s5(t,!1),zfe=t=>s5(t,!0),Bfe=t=>rd(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Vfe=t=>rd(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Ffe=t=>rd(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Xfe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Le.of(["",""])},range:Z.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Zfe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,s=t.doc.lineAt(i),o=i==s.from?i-1:Et(s.text,i-s.from,!1)+s.from,a=i==s.to?i+1:Et(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:a,insert:t.doc.slice(i,a).append(t.doc.slice(o,i))},range:Z.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Dg(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),s=t.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=t.doc.lineAt(r.to-1)),n>=i.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});n=s.number+1}return e}function a5(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let s of Dg(t)){if(n?s.to==t.doc.length:s.from==0)continue;let o=t.doc.lineAt(n?s.to+1:s.from-1),a=o.length+1;if(n){r.push({from:s.to,to:o.to},{from:s.from,insert:o.text+t.lineBreak});for(let l of s.ranges)i.push(Z.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{r.push({from:o.from,to:s.from},{from:s.to,insert:t.lineBreak+o.text});for(let l of s.ranges)i.push(Z.range(l.anchor-a,l.head-a))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:Z.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Wfe=({state:t,dispatch:e})=>a5(t,e,!1),qfe=({state:t,dispatch:e})=>a5(t,e,!0);function l5(t,e,n){if(t.readOnly)return!1;let r=[];for(let s of Dg(t))n?r.push({from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}):r.push({from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)});let i=t.changes(r);return e(t.update({changes:i,selection:t.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Yfe=({state:t,dispatch:e})=>l5(t,e,!1),Ufe=({state:t,dispatch:e})=>l5(t,e,!0),Hfe=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Dg(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=mc(e.selection,i=>{let s;if(t.lineWrapping){let o=t.lineBlockAt(i.head),a=t.coordsAtPos(i.head,i.assoc||1);a&&(s=o.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,s)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Gfe(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=We(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(Oe.closedBy))&&s.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const YE=c5(!1),Kfe=c5(!0);function c5(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:o}=i,a=e.doc.lineAt(s),l=!t&&s==o&&Gfe(e,s);t&&(s=o=(o<=a.to?a:e.doc.lineAt(o)).to);let c=new Ag(e,{simulateBreak:s,simulateDoubleBreak:!!l}),u=B1(c,s);for(u==null&&(u=Zr(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<a.to&&/\s/.test(a.text[o-a.from]);)o++;l?{from:s,to:o}=l:s>a.from&&s<a.from+100&&!/\S/.test(a.text.slice(0,s))&&(s=a.from);let f=["",pf(e,u)];return l&&f.push(pf(e,c.lineIndent(a.from,-1))),{changes:{from:s,to:o,insert:Le.of(f)},range:Z.cursor(s+1+f[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function Y1(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let a=t.doc.lineAt(o);a.number>n&&(r.empty||r.to>a.from)&&(e(a,i,r),n=a.number),o=a.to+1}let s=t.changes(i);return{changes:i,range:Z.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const Jfe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Ag(t,{overrideIndentation:s=>{let o=n[s];return o??-1}}),i=Y1(t,(s,o,a)=>{let l=B1(r,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let c=/^\s*/.exec(s.text)[0],u=pf(t,l);(c!=u||a.from<s.from+c.length)&&(n[s.from]=l,o.push({from:s.from,to:s.from+c.length,insert:u}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},U1=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Y1(t,(n,r)=>{r.push({from:n.from,insert:t.facet(fc)})}),{userEvent:"input.indent"})),!0),H1=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Y1(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let s=Zr(i,t.tabSize),o=0,a=pf(t,Math.max(0,s-sa(t)));for(;o<i.length&&o<a.length&&i.charCodeAt(o)==a.charCodeAt(o);)o++;r.push({from:n.from+o,to:n.from+i.length,insert:a.slice(o)})}),{userEvent:"delete.dedent"})),!0),ede=t=>(t.setTabFocusMode(),!0),tde=[{key:"Ctrl-b",run:zL,shift:UL,preventDefault:!0},{key:"Ctrl-f",run:BL,shift:HL},{key:"Ctrl-p",run:XL,shift:JL},{key:"Ctrl-n",run:ZL,shift:e5},{key:"Ctrl-a",run:xfe,shift:Afe},{key:"Ctrl-e",run:bfe,shift:Qfe},{key:"Ctrl-d",run:i5},{key:"Ctrl-h",run:_0},{key:"Ctrl-k",run:Bfe},{key:"Ctrl-Alt-h",run:o5},{key:"Ctrl-o",run:Xfe},{key:"Ctrl-t",run:Zfe},{key:"Ctrl-v",run:R0}],nde=[{key:"ArrowLeft",run:zL,shift:UL,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:ffe,shift:kfe,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:yfe,shift:_fe,preventDefault:!0},{key:"ArrowRight",run:BL,shift:HL,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:dfe,shift:Cfe,preventDefault:!0},{mac:"Cmd-ArrowRight",run:vfe,shift:$fe,preventDefault:!0},{key:"ArrowUp",run:XL,shift:JL,preventDefault:!0},{mac:"Cmd-ArrowUp",run:XE,shift:WE},{mac:"Ctrl-ArrowUp",run:BE,shift:VE},{key:"ArrowDown",run:ZL,shift:e5,preventDefault:!0},{mac:"Cmd-ArrowDown",run:ZE,shift:qE},{mac:"Ctrl-ArrowDown",run:R0,shift:FE},{key:"PageUp",run:BE,shift:VE},{key:"PageDown",run:R0,shift:FE},{key:"Home",run:Ofe,shift:Rfe,preventDefault:!0},{key:"Mod-Home",run:XE,shift:WE},{key:"End",run:gfe,shift:Efe,preventDefault:!0},{key:"Mod-End",run:ZE,shift:qE},{key:"Enter",run:YE,shift:YE},{key:"Mod-a",run:Ife},{key:"Backspace",run:_0,shift:_0,preventDefault:!0},{key:"Delete",run:i5,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:o5,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:zfe,preventDefault:!0},{mac:"Mod-Backspace",run:Vfe,preventDefault:!0},{mac:"Mod-Delete",run:Ffe,preventDefault:!0}].concat(tde.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),rde=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:pfe,shift:Pfe},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:mfe,shift:Tfe},{key:"Alt-ArrowUp",run:Wfe},{key:"Shift-Alt-ArrowUp",run:Yfe},{key:"Alt-ArrowDown",run:qfe},{key:"Shift-Alt-ArrowDown",run:Ufe},{key:"Mod-Alt-ArrowUp",run:Mfe},{key:"Mod-Alt-ArrowDown",run:Dfe},{key:"Escape",run:Lfe},{key:"Mod-Enter",run:Kfe},{key:"Alt-l",mac:"Ctrl-l",run:Nfe},{key:"Mod-i",run:jfe,preventDefault:!0},{key:"Mod-[",run:H1},{key:"Mod-]",run:U1},{key:"Mod-Alt-\\",run:Jfe},{key:"Shift-Mod-k",run:Hfe},{key:"Shift-Mod-\\",run:Sfe},{key:"Mod-/",run:Wue},{key:"Alt-A",run:Yue},{key:"Ctrl-m",mac:"Shift-Alt-m",run:ede}].concat(nde),ide={key:"Tab",run:U1,shift:H1},UE=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Bl{constructor(e,n,r=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?a=>s(UE(a)):UE,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return hn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=y1(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=hi(e);let i=this.normalize(n);if(i.length)for(let s=0,o=r;;s++){let a=i.charCodeAt(s),l=this.match(a,o,this.bufferPos+this.bufferStart);if(s==i.length-1){if(l)return this.value=l,this;break}o==r&&s<n.length&&n.charCodeAt(s)==a&&o++}}}match(e,n,r){let i=null;for(let s=0;s<this.matches.length;s+=2){let o=this.matches[s],a=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?i={from:this.matches[s+1],to:r}:(this.matches[s]++,a=!0)),a||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(Bl.prototype[Symbol.iterator]=function(){return this});const u5={from:-1,to:-1,match:/.*/.exec("")},G1="gm"+(/x/.unicode==null?"":"u");class f5{constructor(e,n,r,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=u5,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new d5(e,n,r,i,s);this.re=new RegExp(n,G1+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=cm(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=cm(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const Dy=new WeakMap;class hl{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=Dy.get(e);if(!i||i.from>=r||i.to<=n){let a=new hl(n,e.sliceString(n,r));return Dy.set(e,a),a}if(i.from==n&&i.to==r)return i;let{text:s,from:o}=i;return o>n&&(s=e.sliceString(n,o)+s,o=n),i.to<r&&(s+=e.sliceString(i.to,r)),Dy.set(e,new hl(o,s)),new hl(n,s.slice(n-o,r-o))}}class d5{constructor(e,n,r,i,s){this.text=e,this.to=s,this.done=!1,this.value=u5,this.matchPos=cm(e,i),this.re=new RegExp(n,G1+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=hl.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=cm(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=hl.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(f5.prototype[Symbol.iterator]=d5.prototype[Symbol.iterator]=function(){return this});function sde(t){try{return new RegExp(t,G1),!0}catch{return!1}}function cm(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}const ode=t=>{let{state:e}=t,n=String(e.doc.lineAt(t.state.selection.main.head).number),{close:r,result:i}=xce(t,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:e.phrase("go")});return i.then(s=>{let o=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!o){t.dispatch({effects:r});return}let a=e.doc.lineAt(e.selection.main.head),[,l,c,u,f]=o,d=u?+u.slice(1):0,h=c?+c:a.number;if(c&&f){let v=h/100;l&&(v=v*(l=="-"?-1:1)+a.number/e.doc.lines),h=Math.round(e.doc.lines*v)}else c&&l&&(h=h*(l=="-"?-1:1)+a.number);let g=e.doc.line(Math.max(1,Math.min(e.doc.lines,h))),m=Z.cursor(g.from+Math.max(0,Math.min(d,g.length)));t.dispatch({effects:[r,re.scrollIntoView(m.from,{y:"center"})],selection:m})}),!0},ade={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},lde=oe.define({combine(t){return _i(t,ade,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function cde(t){return[pde,hde]}const ude=he.mark({class:"cm-selectionMatch"}),fde=he.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function HE(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=st.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=st.Word)}function dde(t,e,n,r){return t(e.sliceDoc(n,n+1))==st.Word&&t(e.sliceDoc(r-1,r))==st.Word}const hde=ht.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(lde),{state:n}=t,r=n.selection;if(r.ranges.length>1)return he.none;let i=r.main,s,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return he.none;let l=n.wordAt(i.head);if(!l)return he.none;o=n.charCategorizer(i.head),s=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return he.none;if(e.wholeWords){if(s=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(HE(o,n,i.from,i.to)&&dde(o,n,i.from,i.to)))return he.none}else if(s=n.sliceDoc(i.from,i.to),!s)return he.none}let a=[];for(let l of t.visibleRanges){let c=new Bl(n.doc,s,l.from,l.to);for(;!c.next().done;){let{from:u,to:f}=c.value;if((!o||HE(o,n,u,f))&&(i.empty&&u<=i.from&&f>=i.to?a.push(fde.range(u,f)):(u>=i.to||f<=i.from)&&a.push(ude.range(u,f)),a.length>e.maxMatches))return he.none}}return he.set(a)}},{decorations:t=>t.decorations}),pde=re.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),mde=({state:t,dispatch:e})=>{let{selection:n}=t,r=Z.create(n.ranges.map(i=>t.wordAt(i.head)||Z.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function gde(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),s=i&&i.from==n.from&&i.to==n.to;for(let o=!1,a=new Bl(t.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(o)return null;a=new Bl(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}else{if(o&&r.some(l=>l.from==a.value.from))continue;if(s){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const Ode=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return mde({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=r))return!1;let i=gde(t,r);return i?(e(t.update({selection:t.selection.addRange(Z.range(i.from,i.to),!1),effects:re.scrollIntoView(i.to)})),!0):!1},gc=oe.define({combine(t){return _i(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new $de(e),scrollToMatch:e=>re.scrollIntoView(e)})}});class h5{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||sde(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
|
|
489
|
+
`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new Sde(this):new xde(this)}getCursor(e,n=0,r){let i=e.doc?e:Ae.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Qa(this,i,n,r):Aa(this,i,n,r)}}class p5{constructor(e){this.spec=e}}function yde(t,e,n){return(r,i,s,o)=>{if(n&&!n(r,i,s,o))return!1;let a=r>=o&&i<=o+s.length?s.slice(r-o,i-o):e.doc.sliceString(r,i);return t(a,e,r,i)}}function Aa(t,e,n,r){let i;return t.wholeWord&&(i=vde(e.doc,e.charCategorizer(e.selection.main.head))),t.test&&(i=yde(t.test,e,i)),new Bl(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:s=>s.toLowerCase(),i)}function vde(t,e){return(n,r,i,s)=>((s>n||s+i.length<r)&&(s=Math.max(0,n-2),i=t.sliceString(s,Math.min(t.length,r+2))),(e(um(i,n-s))!=st.Word||e(fm(i,n-s))!=st.Word)&&(e(fm(i,r-s))!=st.Word||e(um(i,r-s))!=st.Word))}class xde extends p5{constructor(e){super(e)}nextMatch(e,n,r){let i=Aa(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let s=Math.min(e.doc.length,n+this.spec.unquoted.length);i=Aa(this.spec,e,0,s).nextOverlapping()}return i.done||i.value.from==n&&i.value.to==r?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let s=Math.max(n,i-1e4-this.spec.unquoted.length),o=Aa(this.spec,e,s,i),a=null;for(;!o.nextOverlapping().done;)a=o.value;if(a)return a;if(s==n)return null;i-=1e4}}prevMatch(e,n,r){let i=this.prevMatchInRange(e,0,n);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=n||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=Aa(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=Aa(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}function bde(t,e,n){return(r,i,s)=>(!n||n(r,i,s))&&t(s[0],e,r,i)}function Qa(t,e,n,r){let i;return t.wholeWord&&(i=wde(e.charCategorizer(e.selection.main.head))),t.test&&(i=bde(t.test,e,i)),new f5(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:i},n,r)}function um(t,e){return t.slice(Et(t,e,!1),e)}function fm(t,e){return t.slice(e,Et(t,e))}function wde(t){return(e,n,r)=>!r[0].length||(t(um(r.input,r.index))!=st.Word||t(fm(r.input,r.index))!=st.Word)&&(t(fm(r.input,r.index+r[0].length))!=st.Word||t(um(r.input,r.index+r[0].length))!=st.Word)}class Sde extends p5{nextMatch(e,n,r){let i=Qa(this.spec,e,r,e.doc.length).next();return i.done&&(i=Qa(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let s=Math.max(n,r-i*1e4),o=Qa(this.spec,e,s,r),a=null;for(;!o.next().done;)a=o.value;if(a&&(s==n||a.from>s+10))return a;if(s==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let s=+r.slice(0,i);if(s>0&&s<e.match.length)return e.match[s]+r.slice(i)}return n})}matchAll(e,n){let r=Qa(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let s=Qa(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const gf=ve.define(),K1=ve.define(),Vs=At.define({create(t){return new Ly($0(t).create(),null)},update(t,e){for(let n of e.effects)n.is(gf)?t=new Ly(n.value.create(),t.panel):n.is(K1)&&(t=new Ly(t.query,n.value?J1:null));return t},provide:t=>ff.from(t,e=>e.panel)});class Ly{constructor(e,n){this.query=e,this.panel=n}}const kde=he.mark({class:"cm-searchMatch"}),Cde=he.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Pde=ht.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Vs))}update(t){let e=t.state.field(Vs);(e!=t.startState.field(Vs)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return he.none;let{view:n}=this,r=new ts;for(let i=0,s=n.visibleRanges,o=s.length;i<o;i++){let{from:a,to:l}=s[i];for(;i<o-1&&l>s[i+1].from-2*250;)l=s[++i].to;t.highlight(n.state,a,l,(c,u)=>{let f=n.state.selection.ranges.some(d=>d.from==c&&d.to==u);r.add(c,u,f?Cde:kde)})}return r.finish()}},{decorations:t=>t.decorations});function id(t){return e=>{let n=e.state.field(Vs,!1);return n&&n.query.spec.valid?t(e,n):O5(e)}}const dm=id((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=Z.single(r.from,r.to),s=t.state.facet(gc);return t.dispatch({selection:i,effects:[eS(t,r),s.scrollToMatch(i.main,t)],userEvent:"select.search"}),g5(t),!0}),hm=id((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let s=Z.single(i.from,i.to),o=t.state.facet(gc);return t.dispatch({selection:s,effects:[eS(t,i),o.scrollToMatch(s.main,t)],userEvent:"select.search"}),g5(t),!0}),Tde=id((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:Z.create(n.map(r=>Z.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),Ede=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,s=[],o=0;for(let a=new Bl(t.doc,t.sliceDoc(r,i));!a.next().done;){if(s.length>1e3)return!1;a.value.from==r&&(o=s.length),s.push(Z.range(a.value.from,a.value.to))}return e(t.update({selection:Z.create(s,o),userEvent:"select.search.matches"})),!0},GE=id((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,r,r);if(!s)return!1;let o=s,a=[],l,c,u=[];o.from==r&&o.to==i&&(c=n.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:c}),o=e.nextMatch(n,o.from,o.to),u.push(re.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let f=t.state.changes(a);return o&&(l=Z.single(o.from,o.to).map(f),u.push(eS(t,o)),u.push(n.facet(gc).scrollToMatch(l.main,t))),t.dispatch({changes:f,selection:l,effects:u,userEvent:"input.replace"}),!0}),Rde=id((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:s,to:o}=i;return{from:s,to:o,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:re.announce.of(r),userEvent:"input.replace.all"}),!0});function J1(t){return t.state.facet(gc).createPanel(t)}function $0(t,e){var n,r,i,s,o;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let c=t.facet(gc);return new h5({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:c.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:c.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:c.wholeWord})}function m5(t){let e=j1(t,J1);return e&&e.dom.querySelector("[main-field]")}function g5(t){let e=m5(t);e&&e==t.root.activeElement&&e.select()}const O5=t=>{let e=t.state.field(Vs,!1);if(e&&e.panel){let n=m5(t);if(n&&n!=t.root.activeElement){let r=$0(t.state,e.query.spec);r.valid&&t.dispatch({effects:gf.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[K1.of(!0),e?gf.of($0(t.state,e.query.spec)):ve.appendConfig.of(Qde)]});return!0},y5=t=>{let e=t.state.field(Vs,!1);if(!e||!e.panel)return!1;let n=j1(t,J1);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:K1.of(!1)}),!0},_de=[{key:"Mod-f",run:O5,scope:"editor search-panel"},{key:"F3",run:dm,shift:hm,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:dm,shift:hm,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:y5,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Ede},{key:"Mod-Alt-g",run:ode},{key:"Mod-d",run:Ode,preventDefault:!0}];class $de{constructor(e){this.view=e;let n=this.query=e.state.field(Vs).query.spec;this.commit=this.commit.bind(this),this.searchField=Ze("input",{value:n.search,placeholder:$n(e,"Find"),"aria-label":$n(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ze("input",{value:n.replace,placeholder:$n(e,"Replace"),"aria-label":$n(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Ze("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=Ze("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=Ze("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,s,o){return Ze("button",{class:"cm-button",name:i,onclick:s,type:"button"},o)}this.dom=Ze("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>dm(e),[$n(e,"next")]),r("prev",()=>hm(e),[$n(e,"previous")]),r("select",()=>Tde(e),[$n(e,"all")]),Ze("label",null,[this.caseField,$n(e,"match case")]),Ze("label",null,[this.reField,$n(e,"regexp")]),Ze("label",null,[this.wordField,$n(e,"by word")]),...e.state.readOnly?[]:[Ze("br"),this.replaceField,r("replace",()=>GE(e),[$n(e,"replace")]),r("replaceAll",()=>Rde(e),[$n(e,"replace all")])],Ze("button",{name:"close",onclick:()=>y5(e),"aria-label":$n(e,"close"),type:"button"},["×"])])}commit(){let e=new h5({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:gf.of(e)}))}keydown(e){_le(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?hm:dm)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),GE(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(gf)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(gc).top}}function $n(t,e){return t.state.phrase(e)}const oh=30,ah=/[\s\.,:;?!]/;function eS(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,s=Math.max(r.from,e-oh),o=Math.min(i,n+oh),a=t.state.sliceDoc(s,o);if(s!=r.from){for(let l=0;l<oh;l++)if(!ah.test(a[l+1])&&ah.test(a[l])){a=a.slice(l);break}}if(o!=i){for(let l=a.length-1;l>a.length-oh;l--)if(!ah.test(a[l-1])&&ah.test(a[l])){a=a.slice(0,l);break}}return re.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const Ade=re.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Qde=[Vs,os.low(Pde),Ade];class tS{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=We(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),s=i.search(x5(e,!1));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function KE(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Ide(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let s=1;s<i.length;s++)n[i[s]]=!0}let r=KE(e)+KE(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function v5(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:Ide(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:n}:null}}function Nde(t,e){return n=>{for(let r=We(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class JE{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function Bo(t){return t.selection.main.from}function x5(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",s=r[r.length-1]!="$";return!i&&!s?t:new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const nS=Ri.define();function jde(t,e,n,r){let{main:i}=t.selection,s=n-i.from,o=r-i.from;return{...t.changeByRange(a=>{if(a!=i&&n!=r&&t.sliceDoc(a.from+s,a.from+o)!=t.sliceDoc(n,r))return{range:a};let l=t.toText(e);return{changes:{from:a.from+s,to:r==i.from?a.to:a.from+o,insert:l},range:Z.cursor(a.from+s+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const e2=new WeakMap;function Mde(t){if(!Array.isArray(t))return t;let e=e2.get(t);return e||e2.set(t,e=v5(t)),e}const pm=ve.define(),Of=ve.define();class Dde{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=hn(e,n),i=hi(r);this.chars.push(r);let s=e.slice(n,n+i),o=s.toUpperCase();this.folded.push(hn(o==s?s.toLowerCase():o,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:s,byWord:o}=this;if(n.length==1){let x=hn(e,0),b=hi(x),k=b==e.length?0:-100;if(x!=n[0])if(x==r[0])k+=-200;else return null;return this.ret(k,[0,b])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=n.length,c=0;if(a<0){for(let x=0,b=Math.min(e.length,200);x<b&&c<l;){let k=hn(e,x);(k==n[c]||k==r[c])&&(i[c++]=x),x+=hi(k)}if(c<l)return null}let u=0,f=0,d=!1,h=0,g=-1,m=-1,v=/[a-z]/.test(e),y=!0;for(let x=0,b=Math.min(e.length,200),k=0;x<b&&f<l;){let w=hn(e,x);a<0&&(u<l&&w==n[u]&&(s[u++]=x),h<l&&(w==n[h]||w==r[h]?(h==0&&(g=x),m=x+1,h++):h=0));let S,C=w<255?w>=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(S=y1(w))!=S.toLowerCase()?1:S!=S.toUpperCase()?2:0;(!x||C==1&&v||k==0&&C!=0)&&(n[f]==w||r[f]==w&&(d=!0)?o[f++]=x:o.length&&(y=!1)),k=C,x+=hi(w)}return f==l&&o[0]==0&&y?this.result(-100+(d?-200:0),o,e):h==l&&g==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):h==l?this.ret(-900-e.length,[g,m]):f==l?this.result(-100+(d?-200:0)+-700+(y?0:-1100),o,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],s=0;for(let o of n){let a=o+(this.astral?hi(hn(r,o)):1);s&&i[s-1]==o?i[s-1]=a:(i[s++]=o,i[s++]=a)}return this.ret(e-r.length,i)}}class Lde{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const Tt=oe.define({combine(t){return _i(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:zde,filterStrict:!1,compareCompletions:(e,n)=>(e.sortText||e.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>t2(e(r),n(r)),optionClass:(e,n)=>r=>t2(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function t2(t,e){return t?e?t+" "+e:t:e}function zde(t,e,n,r,i,s){let o=t.textDirection==Ye.RTL,a=o,l=!1,c="top",u,f,d=e.left-i.left,h=i.right-e.right,g=r.right-r.left,m=r.bottom-r.top;if(a&&d<Math.min(g,h)?a=!1:!a&&h<Math.min(g,d)&&(a=!0),g<=(a?d:h))u=Math.max(i.top,Math.min(n.top,i.bottom-m))-e.top,f=Math.min(400,a?d:h);else{l=!0,f=Math.min(400,(o?e.right:i.right-e.left)-30);let x=i.bottom-e.bottom;x>=m||x>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let v=(e.bottom-e.top)/s.offsetHeight,y=(e.right-e.left)/s.offsetWidth;return{style:`${c}: ${u/v}px; max-width: ${f/y}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":a?"left":"right")}}function Bde(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,s){let o=document.createElement("span");o.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let c=0;c<s.length;){let u=s[c++],f=s[c++];u>l&&o.appendChild(document.createTextNode(a.slice(l,u)));let d=o.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(u,f))),d.className="cm-completionMatchedText",l=f}return l<a.length&&o.appendChild(document.createTextNode(a.slice(l))),o},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function zy(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class Vde{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:s,selected:o}=i.open,a=e.state.facet(Tt);this.optionContent=Bde(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=zy(s.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(n).open;for(let u=l.target,f;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(f=/-(\d+)$/.exec(u.id))&&+f[1]<c.length){this.applyCompletion(e,c[+f[1]]),l.preventDefault();return}}),this.dom.addEventListener("focusout",l=>{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Tt).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:Of.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:s,selected:o,disabled:a}=r.open;(!i.open||i.open.options!=s)&&(this.range=zy(s.length,o,e.state.facet(Tt).maxRenderedOptions),this.showOptions(s,r.id)),this.updateSel(),a!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;(n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=zy(n.options.length,n.selected,this.view.state.facet(Tt).maxRenderedOptions),this.showOptions(n.options,e.id));let r=this.updateSelectedOption(n.selected);if(r){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:s}=i;if(!s)return;let o=typeof s=="string"?document.createTextNode(s):s(i);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,i)}).catch(a=>yn(this.view.state,a,"completion info")):(this.addInfoPane(o,i),r.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",r.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:s}=e;r.appendChild(i),this.infoDestroy=s||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&(r.removeAttribute("aria-selected"),r.removeAttribute("aria-describedby"));return n&&Xde(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return i.top>Math.min(s.bottom,n.bottom)-10||i.bottom<Math.max(s.top,n.top)+10?null:this.view.state.facet(Tt).positionInfo(this.view,n,i,r,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",o=>{o.target==i&&o.preventDefault()});let s=null;for(let o=r.from;o<r.to;o++){let{completion:a,match:l}=e[o],{section:c}=a;if(c){let d=typeof c=="string"?c:c.name;if(d!=s&&(o>r.from||r.from==0))if(s=d,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=d}}const u=i.appendChild(document.createElement("li"));u.id=n+"-"+o,u.setAttribute("role","option");let f=this.optionClass(a);f&&(u.className=f);for(let d of this.optionContent){let h=d(a,this.view.state,this.view,l);h&&u.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function Fde(t,e){return n=>new Vde(n,t,e)}function Xde(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function n2(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function Zde(t,e){let n=[],r=null,i=null,s=u=>{n.push(u);let{section:f}=u.completion;if(f){r||(r=[]);let d=typeof f=="string"?f:f.name;r.some(h=>h.name==d)||r.push(typeof f=="string"?{name:d}:f)}},o=e.facet(Tt);for(let u of t)if(u.hasResult()){let f=u.result.getMatch;if(u.result.filter===!1)for(let d of u.result.options)s(new JE(d,u.source,f?f(d):[],1e9-n.length));else{let d=e.sliceDoc(u.from,u.to),h,g=o.filterStrict?new Lde(d):new Dde(d);for(let m of u.result.options)if(h=g.match(m.label)){let v=m.displayLabel?f?f(m,h.matched):[]:h.matched,y=h.score+(m.boost||0);if(s(new JE(m,u.source,v,y)),typeof m.section=="object"&&m.section.rank==="dynamic"){let{name:x}=m.section;i||(i=Object.create(null)),i[x]=Math.max(y,i[x]||-1e9)}}}}if(r){let u=Object.create(null),f=0,d=(h,g)=>(h.rank==="dynamic"&&g.rank==="dynamic"?i[g.name]-i[h.name]:0)||(typeof h.rank=="number"?h.rank:1e9)-(typeof g.rank=="number"?g.rank:1e9)||(h.name<g.name?-1:1);for(let h of r.sort(d))f-=1e5,u[h.name]=f;for(let h of n){let{section:g}=h.completion;g&&(h.score+=u[typeof g=="string"?g:g.name])}}let a=[],l=null,c=o.compareCompletions;for(let u of n.sort((f,d)=>d.score-f.score||c(f.completion,d.completion))){let f=u.completion;!l||l.label!=f.label||l.detail!=f.detail||l.type!=null&&f.type!=null&&l.type!=f.type||l.apply!=f.apply||l.boost!=f.boost?a.push(u):n2(u.completion)>n2(l)&&(a[a.length-1]=u),l=u.completion}return a}class Ha{constructor(e,n,r,i,s,o){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=s,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Ha(this.options,r2(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,s,o){if(i&&!o&&e.some(c=>c.isPending))return i.setDisabled();let a=Zde(e,n);if(!a.length)return i&&e.some(c=>c.isPending)?i.setDisabled():null;let l=n.facet(Tt).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let c=i.options[i.selected].completion;for(let u=0;u<a.length;u++)if(a[u].completion==c){l=u;break}}return new Ha(a,r2(r,l),{pos:e.reduce((c,u)=>u.hasResult()?Math.min(c,u.from):c,1e8),create:Gde,above:s.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new Ha(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Ha(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class mm{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new mm(Ude,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Tt),s=(r.override||n.languageDataAt("autocomplete",Bo(n)).map(Mde)).map(l=>(this.active.find(u=>u.source==l)||new fr(l,this.active.some(u=>u.state!=0)?1:0)).update(e,r));s.length==this.active.length&&s.every((l,c)=>l==this.active[c])&&(s=this.active);let o=this.open,a=e.effects.some(l=>l.is(rS));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!Wde(s,this.active)||a?o=Ha.build(s,n,this.id,o,r,a):o&&o.disabled&&!s.some(l=>l.isPending)&&(o=null),!o&&s.every(l=>!l.isPending)&&s.some(l=>l.hasResult())&&(s=s.map(l=>l.hasResult()?new fr(l.source,0):l));for(let l of e.effects)l.is(w5)&&(o=o&&o.setSelected(l.value,this.id));return s==this.active&&o==this.open?this:new mm(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?qde:Yde}}function Wde(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,s=r==e.length;if(i||s)return i==s;if(t[n++].result!=e[r++].result)return!1}}const qde={"aria-autocomplete":"list"},Yde={};function r2(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Ude=[];function b5(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(nS);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class fr{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=b5(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new fr(i.source,0)),r&4&&i.state==0&&(i=new fr(this.source,1)),i=i.updateFor(e,r);for(let s of e.effects)if(s.is(pm))i=new fr(i.source,1,s.value);else if(s.is(Of))i=new fr(i.source,0);else if(s.is(rS))for(let o of s.value)o.source==i.source&&(i=o);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Bo(e.state))}}class pl extends fr{constructor(e,n,r,i,s,o){super(e,3,n),this.limit=r,this.result=i,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=Bo(e.state);if(a>o||!i||n&2&&(Bo(e.startState)==this.from||a<this.limit))return new fr(this.source,n&4?1:0);let l=e.changes.mapPos(this.limit);return Hde(i.validFor,e.state,s,o)?new pl(this.source,this.explicit,l,i,s,o):i.update&&(i=i.update(i,s,o,new tS(e.state,a,!1)))?new pl(this.source,this.explicit,l,i,i.from,(r=i.to)!==null&&r!==void 0?r:Bo(e.state)):new fr(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new pl(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new fr(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function Hde(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):x5(t,!0).test(i)}const rS=ve.define({map(t,e){return t.map(n=>n.map(e))}}),w5=ve.define(),pn=At.define({create(){return mm.start()},update(t,e){return t.update(e)},provide:t=>[N1.from(t,e=>e.tooltip),re.contentAttributes.from(t,e=>e.attrs)]});function iS(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(pn).active.find(i=>i.source==e.source);return r instanceof pl?(typeof n=="string"?t.dispatch({...jde(t.state,n,r.from,r.to),annotations:nS.of(e.completion)}):n(t,e.completion,r.from,r.to),!0):!1}const Gde=Fde(pn,iS);function lh(t,e="option"){return n=>{let r=n.state.field(pn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Tt).interactionDelay)return!1;let i=1,s;e=="page"&&(s=UD(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:o}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),n.dispatch({effects:w5.of(a)}),!0}}const Kde=t=>{let e=t.state.field(pn,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Tt).interactionDelay?!1:iS(t,e.open.options[e.open.selected])},By=t=>t.state.field(pn,!1)?(t.dispatch({effects:pm.of(!0)}),!0):!1,Jde=t=>{let e=t.state.field(pn,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Of.of(null)}),!0)};class ehe{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const the=50,nhe=1e3,rhe=ht.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(pn).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(pn),n=t.state.facet(Tt);if(!t.selectionSet&&!t.docChanged&&t.startState.field(pn)==e)return;let r=t.transactions.some(s=>{let o=b5(s,n);return o&8||(s.selection||s.docChanged)&&!(o&3)});for(let s=0;s<this.running.length;s++){let o=this.running[s];if(r||o.context.abortOnDocChange&&t.docChanged||o.updates.length+t.transactions.length>the&&Date.now()-o.time>nhe){for(let a of o.context.abortListeners)try{a()}catch(l){yn(this.view.state,l)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(o=>o.is(pm)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(pn);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Tt).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=Bo(e),r=new tS(e,n,t.explicit,this.view),i=new ehe(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:Of.of(null)}),yn(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Tt).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Tt),r=this.view.state.field(pn);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(s.done===void 0)continue;if(this.running.splice(i--,1),s.done){let a=Bo(s.updates.length?s.updates[0].startState:this.view.state),l=Math.min(a,s.done.from+(s.active.explicit?0:1)),c=new pl(s.active.source,s.active.explicit,l,s.done,s.done.from,(t=s.done.to)!==null&&t!==void 0?t:a);for(let u of s.updates)c=c.update(u,n);if(c.hasResult()){e.push(c);continue}}let o=r.active.find(a=>a.source==s.active.source);if(o&&o.isPending)if(s.done==null){let a=new fr(s.active.source,0);for(let l of s.updates)a=a.update(l,n);a.isPending||e.push(a)}else this.startQuery(o)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:rS.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(pn,!1);if(e&&e.tooltip&&this.view.state.facet(Tt).closeOnBlur){let n=e.open&&UD(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Of.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:pm.of(!1)}),20),this.composing=0}}}),ihe=typeof navigator=="object"&&/Win/.test(navigator.platform),she=os.highest(re.domEventHandlers({keydown(t,e){let n=e.state.field(pn,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(ihe&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(o=>o.source==r.source),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&iS(e,r),!1}})),S5=re.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class ohe{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class sS{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,jt.TrackDel),r=e.mapPos(this.to,1,jt.TrackDel);return n==null||r==null?null:new sS(this.field,n,r)}}class oS{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],s=e.doc.lineAt(n),o=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(r.length){let c=o,u=/^\t*/.exec(l)[0].length;for(let f=0;f<u;f++)c+=e.facet(fc);i.push(n+c.length-u),l=c+l.slice(u)}r.push(l),n+=l.length+1}let a=this.fieldPositions.map(l=>new sS(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:a}}static parse(e){let n=[],r=[],i=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let a=s[1]?+s[1]:null,l=s[2]||s[3]||"",c=-1,u=l.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f<n.length;f++)(a!=null?n[f].seq==a:u&&n[f].name==u)&&(c=f);if(c<0){let f=0;for(;f<n.length&&(a==null||n[f].seq!=null&&n[f].seq<a);)f++;n.splice(f,0,{seq:a,name:u}),c=f;for(let d of i)d.field>=c&&d.field++}for(let f of i)if(f.line==r.length&&f.from>s.index){let d=s[2]?3+(s[1]||"").length:2;f.from-=d,f.to-=d}i.push(new ohe(c,r.length,s.index,s.index+u.length)),o=o.slice(0,s.index)+l+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(a,l,c)=>{for(let u of i)u.line==r.length&&u.from>c&&(u.from--,u.to--);return l}),r.push(o)}return new oS(r,i)}}let ahe=he.widget({widget:new class extends Yr{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),lhe=he.mark({class:"cm-snippetField"});class Oc{constructor(e,n){this.ranges=e,this.active=n,this.deco=he.set(e.map(r=>(r.from==r.to?ahe:lhe).range(r.from,r.to)),!0)}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new Oc(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const sd=ve.define({map(t,e){return t&&t.map(e)}}),che=ve.define(),yf=At.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(sd))return n.value;if(n.is(che)&&t)return new Oc(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>re.decorations.from(t,e=>e?e.deco:he.none)});function aS(t,e){return Z.create(t.filter(n=>n.field==e).map(n=>Z.range(n.from,n.to)))}function uhe(t){let e=oS.parse(t);return(n,r,i,s)=>{let{text:o,ranges:a}=e.instantiate(n.state,i),{main:l}=n.state.selection,c={changes:{from:i,to:s==l.from?l.to:s,insert:Le.of(o)},scrollIntoView:!0,annotations:r?[nS.of(r),yt.userEvent.of("input.complete")]:void 0};if(a.length&&(c.selection=aS(a,0)),a.some(u=>u.field>0)){let u=new Oc(a,0),f=c.effects=[sd.of(u)];n.state.field(yf,!1)===void 0&&f.push(ve.appendConfig.of([yf,mhe,ghe,S5]))}n.dispatch(n.state.update(c))}}function k5(t){return({state:e,dispatch:n})=>{let r=e.field(yf,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,s=t>0&&!r.ranges.some(o=>o.field==i+t);return n(e.update({selection:aS(r.ranges,i),effects:sd.of(s?null:new Oc(r.ranges,i)),scrollIntoView:!0})),!0}}const fhe=({state:t,dispatch:e})=>t.field(yf,!1)?(e(t.update({effects:sd.of(null)})),!0):!1,dhe=k5(1),hhe=k5(-1),phe=[{key:"Tab",run:dhe,shift:hhe},{key:"Escape",run:fhe}],i2=oe.define({combine(t){return t.length?t[0]:phe}}),mhe=os.highest(xa.compute([i2],t=>t.facet(i2)));function un(t,e){return{...e,apply:uhe(t)}}const ghe=re.domEventHandlers({mousedown(t,e){let n=e.state.field(yf,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:aS(n.ranges,i.field),effects:sd.of(n.ranges.some(s=>s.field>i.field)?new Oc(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),vf={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},jo=ve.define({map(t,e){let n=e.mapPos(t,-1,jt.TrackAfter);return n??void 0}}),lS=new class extends Ys{};lS.startSide=1;lS.endSide=-1;const C5=At.define({create(){return Qe.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(jo)&&(t=t.update({add:[lS.range(n.value,n.value+1)]}));return t}});function Ohe(){return[vhe,C5]}const Vy="()[]{}<>«»»«[]{}";function P5(t){for(let e=0;e<Vy.length;e+=2)if(Vy.charCodeAt(e)==t)return Vy.charAt(e+1);return y1(t<128?t:t+1)}function T5(t,e){return t.languageDataAt("closeBrackets",e)[0]||vf}const yhe=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),vhe=re.inputHandler.of((t,e,n,r)=>{if((yhe?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&hi(hn(r,0))==1||e!=i.from||n!=i.to)return!1;let s=whe(t.state,r);return s?(t.dispatch(s),!0):!1}),xhe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=T5(t,t.selection.main.head).brackets||vf.brackets,i=null,s=t.changeByRange(o=>{if(o.empty){let a=She(t.doc,o.head);for(let l of r)if(l==a&&Lg(t.doc,o.head)==P5(hn(l,0)))return{changes:{from:o.head-l.length,to:o.head+l.length},range:Z.cursor(o.head-l.length)}}return{range:i=o}});return i||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},bhe=[{key:"Backspace",run:xhe}];function whe(t,e){let n=T5(t,t.selection.main.head),r=n.brackets||vf.brackets;for(let i of r){let s=P5(hn(i,0));if(e==i)return s==i?Phe(t,i,r.indexOf(i+i+i)>-1,n):khe(t,i,s,n.before||vf.before);if(e==s&&E5(t,t.selection.main.from))return Che(t,i,s)}return null}function E5(t,e){let n=!1;return t.field(C5).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function Lg(t,e){let n=t.sliceString(e,e+2);return n.slice(0,hi(hn(n,0)))}function She(t,e){let n=t.sliceString(e-2,e);return hi(hn(n,0))==n.length?n:n.slice(1)}function khe(t,e,n,r){let i=null,s=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:jo.of(o.to+e.length),range:Z.range(o.anchor+e.length,o.head+e.length)};let a=Lg(t.doc,o.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+n,from:o.head},effects:jo.of(o.head+e.length),range:Z.cursor(o.head+e.length)}:{range:i=o}});return i?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Che(t,e,n){let r=null,i=t.changeByRange(s=>s.empty&&Lg(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:Z.cursor(s.head+n.length)}:r={range:s});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function Phe(t,e,n,r){let i=r.stringPrefixes||vf.stringPrefixes,s=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:jo.of(a.to+e.length),range:Z.range(a.anchor+e.length,a.head+e.length)};let l=a.head,c=Lg(t.doc,l),u;if(c==e){if(s2(t,l))return{changes:{insert:e+e,from:l},effects:jo.of(l+e.length),range:Z.cursor(l+e.length)};if(E5(t,l)){let d=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+d.length,insert:d},range:Z.cursor(l+d.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=o2(t,l-2*e.length,i))>-1&&s2(t,u))return{changes:{insert:e+e+e+e,from:l},effects:jo.of(l+e.length),range:Z.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=st.Word&&o2(t,l,i)>-1&&!The(t,l,e,i))return{changes:{insert:e+e,from:l},effects:jo.of(l+e.length),range:Z.cursor(l+e.length)}}return{range:s=a}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function s2(t,e){let n=We(t).resolveInner(e+1);return n.parent&&n.from==e}function The(t,e,n,r){let i=We(t).resolveInner(e,-1),s=r.reduce((o,a)=>Math.max(o,a.length),0);for(let o=0;o<5;o++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+s)),l=a.indexOf(n);if(!l||l>-1&&r.indexOf(a.slice(0,l))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>n.length+l;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=i.to==e&&i.parent;if(!c)break;i=c}return!1}function o2(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=st.Word)return e;for(let i of n){let s=e-i.length;if(t.sliceDoc(s,e)==i&&r(t.sliceDoc(s-1,s))!=st.Word)return s}return-1}function Ehe(t={}){return[she,pn,Tt.of(t),rhe,Rhe,S5]}const R5=[{key:"Ctrl-Space",run:By},{mac:"Alt-`",run:By},{mac:"Alt-i",run:By},{key:"Escape",run:Jde},{key:"ArrowDown",run:lh(!0)},{key:"ArrowUp",run:lh(!1)},{key:"PageDown",run:lh(!0,"page")},{key:"PageUp",run:lh(!1,"page")},{key:"Enter",run:Kde}],Rhe=os.highest(xa.computeN([Tt],t=>t.facet(Tt).defaultKeymap?[R5]:[]));class a2{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class Po{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(xf).markerFilter;i&&(e=i(e,r));let s=e.slice().sort((h,g)=>h.from-g.from||h.to-g.to),o=new ts,a=[],l=0,c=r.doc.iter(),u=0,f=r.doc.length;for(let h=0;;){let g=h==s.length?null:s[h];if(!g&&!a.length)break;let m,v;if(a.length)m=l,v=a.reduce((b,k)=>Math.min(b,k.to),g&&g.from>m?g.from:1e8);else{if(m=g.from,m>f)break;v=g.to,a.push(g),h++}for(;h<s.length;){let b=s[h];if(b.from==m&&(b.to>b.from||b.to==m))a.push(b),h++,v=Math.min(b.to,v);else{v=Math.min(b.from,v);break}}v=Math.min(v,f);let y=!1;if(a.some(b=>b.from==m&&(b.to==v||v==f))&&(y=m==v,!y&&v-m<10)){let b=m-(u+c.value.length);b>0&&(c.next(b),u=m);for(let k=m;;){if(k>=v){y=!0;break}if(!c.lineBreak&&u+c.value.length>k)break;k=u+c.value.length,u+=c.value.length,c.next()}}let x=Vhe(a);if(y)o.add(m,m,he.widget({widget:new Dhe(x),diagnostics:a.slice()}));else{let b=a.reduce((k,w)=>w.markClass?k+" "+w.markClass:k,"");o.add(m,v,he.mark({class:"cm-lintRange cm-lintRange-"+x+b,diagnostics:a.slice(),inclusiveEnd:a.some(k=>k.to>v)}))}if(l=v,l==f)break;for(let b=0;b<a.length;b++)a[b].to<=l&&a.splice(b--,1)}let d=o.finish();return new Po(d,n,eo(d))}}function eo(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,s,{spec:o})=>{if(!(e&&o.diagnostics.indexOf(e)<0))if(!r)r=new a2(i,s,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new a2(r.from,s,r.diagnostic)}}),r}function _he(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(xf).hideOn(t,n,r);if(i!=null)return i;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(o=>o.is(_5))||t.changes.touchesRange(s.from,Math.max(s.to,r)))}function $he(t,e){return t.field(Xn,!1)?e:e.concat(ve.appendConfig.of(Fhe))}const _5=ve.define(),cS=ve.define(),$5=ve.define(),Xn=At.define({create(){return new Po(he.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);r=eo(n,t.selected.diagnostic,s)||eo(n,null,s)}!n.size&&i&&e.state.facet(xf).autoPanel&&(i=null),t=new Po(n,i,r)}for(let n of e.effects)if(n.is(_5)){let r=e.state.facet(xf).autoPanel?n.value.length?bf.open:null:t.panel;t=Po.init(n.value,r,e.state)}else n.is(cS)?t=new Po(t.diagnostics,n.value?bf.open:null,t.selected):n.is($5)&&(t=new Po(t.diagnostics,t.panel,n.value));return t},provide:t=>[ff.from(t,e=>e.panel),re.decorations.from(t,e=>e.diagnostics)]}),Ahe=he.mark({class:"cm-lintRange cm-lintRange-active"});function Qhe(t,e,n){let{diagnostics:r}=t.state.field(Xn),i,s=-1,o=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,c,{spec:u})=>{if(e>=l&&e<=c&&(l==c||(e>l||n>0)&&(e<c||n<0)))return i=u.diagnostics,s=l,o=c,!1});let a=t.state.facet(xf).tooltipFilter;return i&&a&&(i=a(i,t.state)),i?{pos:s,end:o,above:t.state.doc.lineAt(s).to<o,create(){return{dom:Ihe(t,i)}}}:null}function Ihe(t,e){return Ze("ul",{class:"cm-tooltip-lint"},e.map(n=>Q5(t,n,!1)))}const Nhe=t=>{let e=t.state.field(Xn,!1);(!e||!e.panel)&&t.dispatch({effects:$he(t.state,[cS.of(!0)])});let n=j1(t,bf.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},l2=t=>{let e=t.state.field(Xn,!1);return!e||!e.panel?!1:(t.dispatch({effects:cS.of(!1)}),!0)},jhe=t=>{let e=t.state.field(Xn,!1);if(!e)return!1;let n=t.state.selection.main,r=eo(e.diagnostics,null,n.to+1);return!r&&(r=eo(e.diagnostics,null,0),!r||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},Mhe=[{key:"Mod-Shift-m",run:Nhe,preventDefault:!0},{key:"F8",run:jhe}],xf=oe.define({combine(t){return{sources:t.map(e=>e.source).filter(e=>e!=null),..._i(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:c2,tooltipFilter:c2,needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n,hideOn:(e,n)=>e?n?(r,i,s)=>e(r,i,s)||n(r,i,s):e:n,autoPanel:(e,n)=>e||n})}}});function c2(t,e){return t?e?(n,r)=>e(t(n,r),r):t:e}function A5(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(s=>s.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function Q5(t,e,n){var r;let i=n?A5(e.actions):[];return Ze("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Ze("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((s,o)=>{let a=!1,l=h=>{if(h.preventDefault(),a)return;a=!0;let g=eo(t.state.field(Xn).diagnostics,e);g&&s.apply(t,g.from,g.to)},{name:c}=s,u=i[o]?c.indexOf(i[o]):-1,f=u<0?c:[c.slice(0,u),Ze("u",c.slice(u,u+1)),c.slice(u+1)],d=s.markClass?" "+s.markClass:"";return Ze("button",{type:"button",class:"cm-diagnosticAction"+d,onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${i[o]})"`}.`},f)}),e.source&&Ze("div",{class:"cm-diagnosticSource"},e.source))}class Dhe extends Yr{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Ze("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class u2{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Q5(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class bf{constructor(e){this.view=e,this.items=[];let n=i=>{if(!(i.ctrlKey||i.altKey||i.metaKey)){if(i.keyCode==27)l2(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=A5(s.actions);for(let a=0;a<o.length;a++)if(o[a].toUpperCase().charCodeAt(0)==i.keyCode){let l=eo(this.view.state.field(Xn).diagnostics,s);l&&s.actions[a].apply(e,l.from,l.to)}}else return;i.preventDefault()}},r=i=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(i.target)&&this.moveSelection(s)};this.list=Ze("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=Ze("div",{class:"cm-panel-lint"},this.list,Ze("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>l2(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Xn).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Xn),r=0,i=!1,s=null,o=new Set;for(e.between(0,this.view.state.doc.length,(a,l,{spec:c})=>{for(let u of c.diagnostics){if(o.has(u))continue;o.add(u);let f=-1,d;for(let h=r;h<this.items.length;h++)if(this.items[h].diagnostic==u){f=h;break}f<0?(d=new u2(this.view,u),this.items.splice(r,0,d),i=!0):(d=this.items[f],f>r&&(this.items.splice(r,f-r),i=!0)),n&&d.diagnostic==n.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),s=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new u2(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:l})=>{let c=l.height/this.list.offsetHeight;a.top<l.top?this.list.scrollTop-=(l.top-a.top)/c:a.bottom>l.bottom&&(this.list.scrollTop+=(a.bottom-l.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Xn),r=eo(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:$5.of(r)})}static open(e){return new bf(e)}}function Lhe(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function ch(t){return Lhe(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const zhe=re.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:ch("#d11")},".cm-lintRange-warning":{backgroundImage:ch("orange")},".cm-lintRange-info":{backgroundImage:ch("#999")},".cm-lintRange-hint":{backgroundImage:ch("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function Bhe(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function Vhe(t){let e="hint",n=1;for(let r of t){let i=Bhe(r.severity);i>n&&(n=i,e=r.severity)}return e}const Fhe=[Xn,re.decorations.compute([Xn],t=>{let{selected:e,panel:n}=t.field(Xn);return!e||!n||e.from==e.to?he.none:he.set([Ahe.range(e.from,e.to)])}),yce(Qhe,{hideOn:_he}),zhe];var f2=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(bhe)),e.defaultKeymap!==!1&&(r=r.concat(rde)),e.searchKeymap!==!1&&(r=r.concat(_de)),e.historyKeymap!==!1&&(r=r.concat(ufe)),e.foldKeymap!==!1&&(r=r.concat(wue)),e.completionKeymap!==!1&&(r=r.concat(R5)),e.lintKeymap!==!1&&(r=r.concat(Mhe));var i=[];return e.lineNumbers!==!1&&i.push($ce()),e.highlightActiveLineGutter!==!1&&i.push(Ice()),e.highlightSpecialChars!==!1&&i.push(qle()),e.history!==!1&&i.push(tfe()),e.foldGutter!==!1&&i.push(Pue()),e.drawSelection!==!1&&i.push(jle()),e.dropCursor!==!1&&i.push(Ble()),e.allowMultipleSelections!==!1&&i.push(Ae.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(pue()),e.syntaxHighlighting!==!1&&i.push(Ig(wL,{fallback:!0})),e.bracketMatching!==!1&&i.push(jue()),e.closeBrackets!==!1&&i.push(Ohe()),e.autocompletion!==!1&&i.push(Ehe()),e.rectangularSelection!==!1&&i.push(ace()),n!==!1&&i.push(uce()),e.highlightActiveLine!==!1&&i.push(Jle()),e.highlightSelectionMatches!==!1&&i.push(cde()),e.tabSize&&typeof e.tabSize=="number"&&i.push(fc.of(" ".repeat(e.tabSize))),i.concat([xa.of(r.flat())]).filter(Boolean)};const Xhe="#e5c07b",d2="#e06c75",Zhe="#56b6c2",Whe="#ffffff",Yh="#abb2bf",A0="#7d8799",qhe="#61afef",Yhe="#98c379",h2="#d19a66",Uhe="#c678dd",Hhe="#21252b",p2="#2c313a",m2="#282c34",Fy="#353a42",Ghe="#3E4451",g2="#528bff",Khe=re.theme({"&":{color:Yh,backgroundColor:m2},".cm-content":{caretColor:g2},".cm-cursor, .cm-dropCursor":{borderLeftColor:g2},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Ghe},".cm-panels":{backgroundColor:Hhe,color:Yh},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:m2,color:A0,border:"none"},".cm-activeLineGutter":{backgroundColor:p2},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Fy},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Fy,borderBottomColor:Fy},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:p2,color:Yh}}},{dark:!0}),Jhe=pc.define([{tag:T.keyword,color:Uhe},{tag:[T.name,T.deleted,T.character,T.propertyName,T.macroName],color:d2},{tag:[T.function(T.variableName),T.labelName],color:qhe},{tag:[T.color,T.constant(T.name),T.standard(T.name)],color:h2},{tag:[T.definition(T.name),T.separator],color:Yh},{tag:[T.typeName,T.className,T.number,T.changed,T.annotation,T.modifier,T.self,T.namespace],color:Xhe},{tag:[T.operator,T.operatorKeyword,T.url,T.escape,T.regexp,T.link,T.special(T.string)],color:Zhe},{tag:[T.meta,T.comment],color:A0},{tag:T.strong,fontWeight:"bold"},{tag:T.emphasis,fontStyle:"italic"},{tag:T.strikethrough,textDecoration:"line-through"},{tag:T.link,color:A0,textDecoration:"underline"},{tag:T.heading,fontWeight:"bold",color:d2},{tag:[T.atom,T.bool,T.special(T.variableName)],color:h2},{tag:[T.processingInstruction,T.string,T.inserted],color:Yhe},{tag:T.invalid,color:Whe}]),uS=[Khe,Ig(Jhe)];var epe=re.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),tpe=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:s="light",placeholder:o="",basicSetup:a=!0}=e,l=[];switch(n&&l.unshift(xa.of([ide])),a&&(typeof a=="boolean"?l.unshift(f2()):l.unshift(f2(a))),o&&l.unshift(rce(o)),s){case"light":l.push(epe);break;case"dark":l.push(uS);break;case"none":break;default:l.push(s);break}return r===!1&&l.push(re.editable.of(!1)),i&&l.push(Ae.readOnly.of(!0)),[...l]},npe=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)});class rpe{constructor(e,n){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=n,this.timeoutMS=n,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(n=>{try{n()}catch(r){console.error("TimeoutLatch callback error:",r)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class O2{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var Xy=null,ipe=()=>typeof window>"u"?new O2:(Xy||(Xy=new O2),Xy),y2=Ri.define(),spe=200,ope=[];function ape(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:s,onUpdate:o,extensions:a=ope,autoFocus:l,theme:c="light",height:u=null,minHeight:f=null,maxHeight:d=null,width:h=null,minWidth:g=null,maxWidth:m=null,placeholder:v="",editable:y=!0,readOnly:x=!1,indentWithTab:b=!0,basicSetup:k=!0,root:w,initialState:S}=t,[C,_]=O.useState(),[I,E]=O.useState(),[j,A]=O.useState(),L=O.useState(()=>({current:null}))[0],z=O.useState(()=>({current:null}))[0],X=re.theme({"&":{height:u,minHeight:f,maxHeight:d,width:h,minWidth:g,maxWidth:m},"& .cm-scroller":{height:"100% !important"}}),W=re.updateListener.of(Q=>{if(Q.docChanged&&typeof r=="function"&&!Q.transactions.some($=>$.annotation(y2))){L.current?L.current.reset():(L.current=new rpe(()=>{if(z.current){var $=z.current;z.current=null,$()}L.current=null},spe),ipe().add(L.current));var P=Q.state.doc,M=P.toString();r(M,Q)}i&&i(npe(Q))}),F=tpe({theme:c,editable:y,readOnly:x,placeholder:v,indentWithTab:b,basicSetup:k}),N=[W,X,...F];return o&&typeof o=="function"&&N.push(re.updateListener.of(o)),N=N.concat(a),O.useLayoutEffect(()=>{if(C&&!j){var Q={doc:e,selection:n,extensions:N},P=S?Ae.fromJSON(S.json,Q,S.fields):Ae.create(Q);if(A(P),!I){var M=new re({state:P,parent:C,root:w});E(M),s&&s(M,P)}}return()=>{I&&(A(void 0),E(void 0))}},[C,j]),O.useEffect(()=>{t.container&&_(t.container)},[t.container]),O.useEffect(()=>()=>{I&&(I.destroy(),E(void 0)),L.current&&(L.current.cancel(),L.current=null)},[I]),O.useEffect(()=>{l&&I&&I.focus()},[l,I]),O.useEffect(()=>{I&&I.dispatch({effects:ve.reconfigure.of(N)})},[c,a,u,f,d,h,g,m,v,y,x,b,k,r,o]),O.useEffect(()=>{if(e!==void 0){var Q=I?I.state.doc.toString():"";if(I&&e!==Q){var P=L.current&&!L.current.isDone,M=()=>{I&&e!==I.state.doc.toString()&&I.dispatch({changes:{from:0,to:I.state.doc.toString().length,insert:e||""},annotations:[y2.of(!0)]})};P?z.current=M:M()}}},[e,I]),{state:j,setState:A,view:I,setView:E,container:C,setContainer:_}}var lpe=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],fS=O.forwardRef((t,e)=>{var{className:n,value:r="",selection:i,extensions:s=[],onChange:o,onStatistics:a,onCreateEditor:l,onUpdate:c,autoFocus:u,theme:f="light",height:d,minHeight:h,maxHeight:g,width:m,minWidth:v,maxWidth:y,basicSetup:x,placeholder:b,indentWithTab:k,editable:w,readOnly:S,root:C,initialState:_}=t,I=Bq(t,lpe),E=O.useRef(null),{state:j,view:A,container:L,setContainer:z}=ape({root:C,value:r,autoFocus:u,theme:f,height:d,minHeight:h,maxHeight:g,width:m,minWidth:v,maxWidth:y,basicSetup:x,placeholder:b,indentWithTab:k,editable:w,readOnly:S,selection:i,onChange:o,onStatistics:a,onCreateEditor:l,onUpdate:c,extensions:s,initialState:_});O.useImperativeHandle(e,()=>({editor:E.current,state:j,view:A}),[E,L,j,A]);var X=O.useCallback(F=>{E.current=F,z(F)},[z]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var W=typeof f=="string"?"cm-theme-"+f:"cm-theme";return p.jsx("div",Al({ref:X,className:""+W+(n?" "+n:"")},I))});fS.displayName="CodeMirror";class gm{static create(e,n,r,i,s){let o=i+(i<<8)+e+(n<<4)|0;return new gm(e,n,r,o,s,[],[])}constructor(e,n,r,i,s,o,a){this.type=e,this.value=n,this.from=r,this.hash=i,this.end=s,this.children=o,this.positions=a,this.hashProp=[[Oe.contextHash,i]]}addChild(e,n){e.prop(Oe.contextHash)!=this.hash&&(e=new Re(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let r=this.children.length-1;return r>=0&&(n=Math.max(n,this.positions[r]+this.children[r].length+this.from)),new Re(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(i,s,o)=>new Re(xt.none,i,s,o,this.hashProp)})}}var J;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(J||(J={}));class cpe{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class upe{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return ku(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,r=0){for(let i=n;i<e;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(e){let n=0;for(let r=0;n<this.text.length&&r<e;n++)r+=this.text.charCodeAt(n)==9?4-r%4:1;return n}scrub(){if(!this.baseIndent)return this.text;let e="";for(let n=0;n<this.basePos;n++)e+=" ";return e+this.text.slice(this.basePos)}}function v2(t,e,n){if(n.pos==n.text.length||t!=e.block&&n.indent>=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(t.type==J.OrderedList?pS:hS)(n,e,!1);return r>0&&(t.type!=J.BulletList||dS(n,e,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==t.value}const I5={[J.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(Me(J.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(wr(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[J.ListItem](t,e,n){return n.indent<n.baseIndent+t.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[J.OrderedList]:v2,[J.BulletList]:v2,[J.Document](){return!0}};function wr(t){return t==32||t==9||t==10||t==13}function ku(t,e=0){for(;e<t.length&&wr(t.charCodeAt(e));)e++;return e}function x2(t,e,n){for(;e>n&&wr(t.charCodeAt(e-1));)e--;return e}function N5(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let n=e;n<t.text.length;n++)if(t.text.charCodeAt(n)==96)return-1}return e}function j5(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function dS(t,e,n){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let r=1;for(let i=t.pos+1;i<t.text.length;i++){let s=t.text.charCodeAt(i);if(s==t.next)r++;else if(!wr(s))return-1}return n&&t.next==45&&L5(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(F5.SetextHeading)>-1||r<3?-1:1}function M5(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function hS(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||wr(t.text.charCodeAt(t.pos+1)))&&(!n||M5(e,J.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function pS(t,e,n){let r=t.pos,i=t.next;for(;i>=48&&i<=57;){r++;if(r==t.text.length)return-1;i=t.text.charCodeAt(r)}return r==t.pos||r>t.pos+9||i!=46&&i!=41||r<t.text.length-1&&!wr(t.text.charCodeAt(r+1))||n&&!M5(e,J.OrderedList)&&(t.skipSpace(r+1)==t.text.length||r>t.pos+1||t.next!=49)?-1:r+1-t.pos}function D5(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let n=e-t.pos;return n>6?-1:n}function L5(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let n=e;for(;e<t.text.length&&wr(t.text.charCodeAt(e));)e++;return e==t.text.length?n:-1}const Q0=/^[ \t]*$/,z5=/-->/,B5=/\?>/,I0=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,z5],[/^\s*<\?/,B5],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,Q0],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,Q0]];function V5(t,e,n){if(t.next!=60)return-1;let r=t.text.slice(t.pos);for(let i=0,s=I0.length-(n?1:0);i<s;i++)if(I0[i][0].test(r))return i;return-1}function b2(t,e){let n=t.countIndent(e,t.pos,t.indent),r=t.countIndent(t.skipSpace(e),e,n);return r>=n+5?n+1:r}function gs(t,e,n){let r=t.length-1;r>=0&&t[r].to==e&&t[r].type==J.CodeText?t[r].to=n:t.push(Me(J.CodeText,e,n))}const uh={LinkReference:void 0,IndentedCode(t,e){let n=e.baseIndent+4;if(e.indent<n)return!1;let r=e.findColumn(n),i=t.lineStart+r,s=t.lineStart+e.text.length,o=[],a=[];for(gs(o,i,s);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){gs(a,t.lineStart-1,t.lineStart);for(let l of e.markers)a.push(l)}else{if(e.indent<n)break;{if(a.length){for(let c of a)c.type==J.CodeText?gs(o,c.from,c.to):o.push(c);a=[]}gs(o,t.lineStart-1,t.lineStart);for(let c of e.markers)o.push(c);s=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<s&&gs(o,l,s)}}return a.length&&(a=a.filter(l=>l.type!=J.CodeText),a.length&&(e.markers=a.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-i).finish(J.CodeBlock,s-i),i),!0},FencedCode(t,e){let n=N5(e);if(n<0)return!1;let r=t.lineStart+e.pos,i=e.next,s=n-e.pos,o=e.skipSpace(n),a=x2(e.text,e.text.length,o),l=[Me(J.CodeMark,r,r+s)];o<a&&l.push(Me(J.CodeInfo,t.lineStart+o,t.lineStart+a));for(let c=!0,u=!0,f=!1;t.nextLine()&&e.depth>=t.stack.length;c=!1){let d=e.pos;if(e.indent-e.baseIndent<4)for(;d<e.text.length&&e.text.charCodeAt(d)==i;)d++;if(d-e.pos>=s&&e.skipSpace(d)==e.text.length){for(let h of e.markers)l.push(h);u&&f&&gs(l,t.lineStart-1,t.lineStart),l.push(Me(J.CodeMark,t.lineStart+e.pos,t.lineStart+d)),t.nextLine();break}else{f=!0,c||(gs(l,t.lineStart-1,t.lineStart),u=!1);for(let m of e.markers)l.push(m);let h=t.lineStart+e.basePos,g=t.lineStart+e.text.length;h<g&&(gs(l,h,g),u=!1)}}return t.addNode(t.buffer.writeElements(l,-r).finish(J.FencedCode,t.prevLineEnd()-r),r),!0},Blockquote(t,e){let n=j5(e);return n<0?!1:(t.startContext(J.Blockquote,e.pos),t.addNode(J.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+n),null)},HorizontalRule(t,e){if(dS(e,t,!1)<0)return!1;let n=t.lineStart+e.pos;return t.nextLine(),t.addNode(J.HorizontalRule,n),!0},BulletList(t,e){let n=hS(e,t,!1);if(n<0)return!1;t.block.type!=J.BulletList&&t.startContext(J.BulletList,e.basePos,e.next);let r=b2(e,e.pos+1);return t.startContext(J.ListItem,e.basePos,r-e.baseIndent),t.addNode(J.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},OrderedList(t,e){let n=pS(e,t,!1);if(n<0)return!1;t.block.type!=J.OrderedList&&t.startContext(J.OrderedList,e.basePos,e.text.charCodeAt(e.pos+n-1));let r=b2(e,e.pos+n);return t.startContext(J.ListItem,e.basePos,r-e.baseIndent),t.addNode(J.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(r),null},ATXHeading(t,e){let n=D5(e);if(n<0)return!1;let r=e.pos,i=t.lineStart+r,s=x2(e.text,e.text.length,r),o=s;for(;o>r&&e.text.charCodeAt(o-1)==e.next;)o--;(o==s||o==r||!wr(e.text.charCodeAt(o-1)))&&(o=e.text.length);let a=t.buffer.write(J.HeaderMark,0,n).writeElements(t.parser.parseInline(e.text.slice(r+n+1,o),i+n+1),-i);o<e.text.length&&a.write(J.HeaderMark,o-r,s-r);let l=a.finish(J.ATXHeading1-1+n,e.text.length-r);return t.nextLine(),t.addNode(l,i),!0},HTMLBlock(t,e){let n=V5(e,t,!1);if(n<0)return!1;let r=t.lineStart+e.pos,i=I0[n][1],s=[],o=i!=Q0;for(;!i.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let c of e.markers)s.push(c)}o&&t.nextLine();let a=i==z5?J.CommentBlock:i==B5?J.ProcessingInstructionBlock:J.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(s,-r).finish(a,l-r),r),!0},SetextHeading:void 0};class fpe{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,n,r){if(this.stage==-1)return!1;let i=r.content+`
|
|
490
|
+
`+n.scrub(),s=this.advance(i);return s>-1&&s<i.length?this.complete(e,r,s):!1}finish(e,n){return(this.stage==2||this.stage==3)&&ku(n.content,this.pos)==n.content.length?this.complete(e,n,n.content.length):!1}complete(e,n,r){return e.addLeafElement(n,Me(J.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(K5(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Me(J.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(H5(e,ku(e,this.pos),this.start)))return-1}else if(this.stage==2){let n=ku(e,this.pos),r=0;if(n>this.pos){let i=G5(e,n,this.start);if(i){let s=Zy(e,i.to-this.start);s>0&&(this.nextStage(i),r=s)}}return r||(r=Zy(e,this.pos)),r>0&&r<e.length?r:-1}else return Zy(e,this.pos)}}}function Zy(t,e){for(;e<t.length;e++){let n=t.charCodeAt(e);if(n==10)break;if(!wr(n))return-1}return e}class dpe{nextLine(e,n,r){let i=n.depth<e.stack.length?-1:L5(n),s=n.next;if(i<0)return!1;let o=Me(J.HeaderMark,e.lineStart+n.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(r,Me(s==61?J.SetextHeading1:J.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),o])),!0}finish(){return!1}}const F5={LinkReference(t,e){return e.content.charCodeAt(0)==91?new fpe(e):null},SetextHeading(){return new dpe}},hpe=[(t,e)=>D5(e)>=0,(t,e)=>N5(e)>=0,(t,e)=>j5(e)>=0,(t,e)=>hS(e,t,!0)>=0,(t,e)=>pS(e,t,!0)>=0,(t,e)=>dS(e,t,!0)>=0,(t,e)=>V5(e,t,!0)>=0],ppe={text:"",end:0};class mpe{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.line=new upe,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=gm.create(J.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new ype(r,n):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let r=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;r<e.markers.length&&(!i||e.markers[r].from<i.end);){let s=e.markers[r++];this.addNode(s.type,s.from,s.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let r of this.parser.blockParsers)if(r){let i=r(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}let n=new cpe(this.lineStart+e.pos,e.text.slice(e.pos));for(let r of this.parser.leafBlockParsers)if(r){let i=r(this,n);i&&n.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,e,n))break e}for(let r of n.parsers)if(r.nextLine(this,e,n))return null;n.content+=`
|
|
491
|
+
`+e.scrub();for(let r of e.markers)n.marks.push(r)}return this.finishLeaf(n),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let n=this.fragments.takeNodes(this);return n?(this.absoluteLineStart+=n,this.lineStart=J5(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let n=ppe;if(n.end=e,e>=this.to)n.text="";else if(n.text=this.lineChunkAt(e),n.end+=n.text.length,this.ranges.length>1){let r=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<n.end;){i++;let s=this.ranges[i].from,o=this.lineChunkAt(s);n.end=s+o.length,n.text=n.text.slice(0,this.ranges[i-1].to-r)+o,r=n.end-n.text.length}}return n}readLine(){let{line:e}=this,{text:n,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(n);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],s=this.parser.skipContextMarkup[i.type];if(!s)throw new Error("Unhandled block context "+J[i.type]);let o=this.line.markers.length;if(!s(i,this,e)){this.line.markers.length>o&&(i.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let n=this.input.chunk(e),r;if(this.input.lineChunks)r=n==`
|
|
492
|
+
`?"":n;else{let i=n.indexOf(`
|
|
493
|
+
`);r=i<0?n:n.slice(0,i)}return e+r.length>this.to?r.slice(0,this.to-e):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,n,r=0){this.block=gm.create(e,r,this.lineStart+n,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,n,r=0){this.startContext(this.parser.getNodeType(e),n,r)}addNode(e,n,r){typeof e=="number"&&(e=new Re(this.parser.nodeSet.types[e],Vl,Vl,(r??this.prevLineEnd())-n)),this.block.addChild(e,n-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,n){this.addNode(this.buffer.writeElements(j0(n.children,e.marks),-n.from).finish(n.type,n.to-n.from),n.from)}finishContext(){let e=this.stack.pop(),n=this.stack[this.stack.length-1];n.addChild(e.toTree(this.parser.nodeSet),e.from-n.from),this.block=n}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?X5(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let r of e.parsers)if(r.finish(this,e))return;let n=j0(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(n,-e.start).finish(J.Paragraph,e.content.length),e.start)}elt(e,n,r,i){return typeof e=="string"?Me(this.parser.getNodeType(e),n,r,i):new q5(e,n)}get buffer(){return new W5(this.parser.nodeSet)}}function X5(t,e,n,r,i){let s=t[e].to,o=[],a=[],l=n.from+r;function c(u,f){for(;f?u>=s:u>s;){let d=t[e+1].from-s;r+=d,u+=d,e++,s=t[e].to}}for(let u=n.firstChild;u;u=u.nextSibling){c(u.from+r,!0);let f=u.from+r,d,h=i.get(u.tree);h?d=h:u.to+r>s?(d=X5(t,e,u,r,i),c(u.to+r,!1)):d=u.toTree(),o.push(d),a.push(f-l)}return c(n.to+r,!1),new Re(n.type,o,a,n.to+r-l,n.tree?n.tree.propValues:void 0)}class zg extends _g{constructor(e,n,r,i,s,o,a,l,c){super(),this.nodeSet=e,this.blockParsers=n,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=s,this.skipContextMarkup=o,this.inlineParsers=a,this.inlineNames=l,this.wrappers=c,this.nodeTypes=Object.create(null);for(let u of e.types)this.nodeTypes[u.name]=u.id}createParse(e,n,r){let i=new mpe(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}configure(e){let n=N0(e);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,s=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),a=this.blockNames.slice(),l=this.inlineParsers.slice(),c=this.inlineNames.slice(),u=this.endLeafBlock.slice(),f=this.wrappers;if(zc(n.defineNodes)){i=Object.assign({},i);let d=r.types.slice(),h;for(let g of n.defineNodes){let{name:m,block:v,composite:y,style:x}=typeof g=="string"?{name:g}:g;if(d.some(w=>w.name==m))continue;y&&(i[d.length]=(w,S,C)=>y(S,C,w.value));let b=d.length,k=y?["Block","BlockContext"]:v?b>=J.ATXHeading1&&b<=J.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;d.push(xt.define({id:b,name:m,props:k&&[[Oe.group,k]]})),x&&(h||(h={}),Array.isArray(x)||x instanceof Ln?h[m]=x:Object.assign(h,x))}r=new cc(d),h&&(r=r.extend(uc(h)))}if(zc(n.props)&&(r=r.extend(...n.props)),zc(n.remove))for(let d of n.remove){let h=this.blockNames.indexOf(d),g=this.inlineNames.indexOf(d);h>-1&&(s[h]=o[h]=void 0),g>-1&&(l[g]=void 0)}if(zc(n.parseBlock))for(let d of n.parseBlock){let h=a.indexOf(d.name);if(h>-1)s[h]=d.parse,o[h]=d.leaf;else{let g=d.before?fh(a,d.before):d.after?fh(a,d.after)+1:a.length-1;s.splice(g,0,d.parse),o.splice(g,0,d.leaf),a.splice(g,0,d.name)}d.endLeaf&&u.push(d.endLeaf)}if(zc(n.parseInline))for(let d of n.parseInline){let h=c.indexOf(d.name);if(h>-1)l[h]=d.parse;else{let g=d.before?fh(c,d.before):d.after?fh(c,d.after)+1:c.length-1;l.splice(g,0,d.parse),c.splice(g,0,d.name)}}return n.wrap&&(f=f.concat(n.wrap)),new zg(r,s,o,a,u,i,l,c,f)}getNodeType(e){let n=this.nodeTypes[e];if(n==null)throw new RangeError(`Unknown node type '${e}'`);return n}parseInline(e,n){let r=new mS(this,e,n);e:for(let i=n;i<r.end;){let s=r.char(i);for(let o of this.inlineParsers)if(o){let a=o(r,s,i);if(a>=0){i=a;continue e}}i++}return r.resolveMarkers(0)}}function zc(t){return t!=null&&t.length>0}function N0(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=N0(t[0]);if(t.length==1)return e;let n=N0(t.slice(1));if(!n||!e)return e||n;let r=(o,a)=>(o||Vl).concat(a||Vl),i=e.wrap,s=n.wrap;return{props:r(e.props,n.props),defineNodes:r(e.defineNodes,n.defineNodes),parseBlock:r(e.parseBlock,n.parseBlock),parseInline:r(e.parseInline,n.parseInline),remove:r(e.remove,n.remove),wrap:i?s?(o,a,l,c)=>i(s(o,a,l,c),a,l,c):i:s}}function fh(t,e){let n=t.indexOf(e);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return n}let Z5=[xt.none];for(let t=1,e;e=J[t];t++)Z5[t]=xt.define({id:t,name:e,props:t>=J.Escape?[]:[[Oe.group,t in I5?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const Vl=[];class W5{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,n,r,i=0){return this.content.push(e,n,r,4+i*4),this}writeElements(e,n=0){for(let r of e)r.writeTo(this,n);return this}finish(e,n){return Re.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:n})}}let wf=class{constructor(e,n,r,i=Vl){this.type=e,this.from=n,this.to=r,this.children=i}writeTo(e,n){let r=e.content.length;e.writeElements(this.children,n),e.content.push(this.type,this.from+n,this.to+n,e.content.length+4-r)}toTree(e){return new W5(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class q5{constructor(e,n){this.tree=e,this.from=n}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Vl}writeTo(e,n){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+n,this.to+n,-1)}toTree(){return this.tree}}function Me(t,e,n,r){return new wf(t,e,n,r)}const Y5={resolve:"Emphasis",mark:"EmphasisMark"},U5={resolve:"Emphasis",mark:"EmphasisMark"},To={},Om={};class Mn{constructor(e,n,r,i){this.type=e,this.from=n,this.to=r,this.side=i}}const w2="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let Sf=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{Sf=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const Wy={Escape(t,e,n){if(e!=92||n==t.end-1)return-1;let r=t.char(n+1);for(let i=0;i<w2.length;i++)if(w2.charCodeAt(i)==r)return t.append(Me(J.Escape,n,n+2));return-1},Entity(t,e,n){if(e!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(n+1,n+31));return r?t.append(Me(J.Entity,n,n+1+r[0].length)):-1},InlineCode(t,e,n){if(e!=96||n&&t.char(n-1)==96)return-1;let r=n+1;for(;r<t.end&&t.char(r)==96;)r++;let i=r-n,s=0;for(;r<t.end;r++)if(t.char(r)==96){if(s++,s==i&&t.char(r+1)!=96)return t.append(Me(J.InlineCode,n,r+1,[Me(J.CodeMark,n,n+i),Me(J.CodeMark,r+1-i,r+1)]))}else s=0;return-1},HTMLTag(t,e,n){if(e!=60||n==t.end-1)return-1;let r=t.slice(n+1,t.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return t.append(Me(J.Autolink,n,n+1+i[0].length,[Me(J.LinkMark,n,n+1),Me(J.URL,n+1,n+i[0].length),Me(J.LinkMark,n+i[0].length,n+1+i[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(s)return t.append(Me(J.Comment,n,n+1+s[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return t.append(Me(J.ProcessingInstruction,n,n+1+o[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return a?t.append(Me(J.HTMLTag,n,n+1+a[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let r=n+1;for(;t.char(r)==e;)r++;let i=t.slice(n-1,n),s=t.slice(r,r+1),o=Sf.test(i),a=Sf.test(s),l=/\s|^$/.test(i),c=/\s|^$/.test(s),u=!c&&(!a||l||o),f=!l&&(!o||c||a),d=u&&(e==42||!f||o),h=f&&(e==42||!u||a);return t.append(new Mn(e==95?Y5:U5,n,r,(d?1:0)|(h?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(Me(J.HardBreak,n,n+2));if(e==32){let r=n+1;for(;t.char(r)==32;)r++;if(t.char(r)==10&&r>=n+2)return t.append(Me(J.HardBreak,n,r+1))}return-1},Link(t,e,n){return e==91?t.append(new Mn(To,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new Mn(Om,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let r=t.parts.length-1;r>=0;r--){let i=t.parts[r];if(i instanceof Mn&&(i.type==To||i.type==Om)){if(!i.side||t.skipSpace(i.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[r]=null,-1;let s=t.takeContent(r),o=t.parts[r]=gpe(t,s,i.type==To?J.Link:J.Image,i.from,n+1);if(i.type==To)for(let a=0;a<r;a++){let l=t.parts[a];l instanceof Mn&&l.type==To&&(l.side=0)}return o.to}}return-1}};function gpe(t,e,n,r,i){let{text:s}=t,o=t.char(i),a=i;if(e.unshift(Me(J.LinkMark,r,r+(n==J.Image?2:1))),e.push(Me(J.LinkMark,i-1,i)),o==40){let l=t.skipSpace(i+1),c=H5(s,l-t.offset,t.offset),u;c&&(l=t.skipSpace(c.to),l!=c.to&&(u=G5(s,l-t.offset,t.offset),u&&(l=t.skipSpace(u.to)))),t.char(l)==41&&(e.push(Me(J.LinkMark,i,i+1)),a=l+1,c&&e.push(c),u&&e.push(u),e.push(Me(J.LinkMark,l,a)))}else if(o==91){let l=K5(s,i-t.offset,t.offset,!1);l&&(e.push(l),a=l.to)}return Me(n,r,a,e)}function H5(t,e,n){if(t.charCodeAt(e)==60){for(let i=e+1;i<t.length;i++){let s=t.charCodeAt(i);if(s==62)return Me(J.URL,e+n,i+1+n);if(s==60||s==10)return!1}return null}else{let i=0,s=e;for(let o=!1;s<t.length;s++){let a=t.charCodeAt(s);if(wr(a))break;if(o)o=!1;else if(a==40)i++;else if(a==41){if(!i)break;i--}else a==92&&(o=!0)}return s>e?Me(J.URL,e+n,s+n):s==t.length?null:!1}}function G5(t,e,n){let r=t.charCodeAt(e);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let s=e+1,o=!1;s<t.length;s++){let a=t.charCodeAt(s);if(o)o=!1;else{if(a==i)return Me(J.LinkTitle,e+n,s+1+n);a==92&&(o=!0)}}return null}function K5(t,e,n,r){for(let i=!1,s=e+1,o=Math.min(t.length,s+999);s<o;s++){let a=t.charCodeAt(s);if(i)i=!1;else{if(a==93)return r?!1:Me(J.LinkLabel,e+n,s+1+n);if(r&&!wr(a)&&(r=!1),a==91)return!1;a==92&&(i=!0)}}return null}class mS{constructor(e,n,r){this.parser=e,this.text=n,this.offset=r,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,r,i,s){return this.append(new Mn(e,n,r,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof Mn&&(n.type==To||n.type==Om))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let r=e;r<this.parts.length;r++){let i=this.parts[r];if(!(i instanceof Mn&&i.type.resolve&&i.side&2))continue;let s=i.type==Y5||i.type==U5,o=i.to-i.from,a,l=r-1;for(;l>=e;l--){let m=this.parts[l];if(m instanceof Mn&&m.side&1&&m.type==i.type&&!(s&&(i.side&1||m.side&2)&&(m.to-m.from+o)%3==0&&((m.to-m.from)%3||o%3))){a=m;break}}if(!a)continue;let c=i.type.resolve,u=[],f=a.from,d=i.to;if(s){let m=Math.min(2,a.to-a.from,o);f=a.to-m,d=i.from+m,c=m==1?"Emphasis":"StrongEmphasis"}a.type.mark&&u.push(this.elt(a.type.mark,f,a.to));for(let m=l+1;m<r;m++)this.parts[m]instanceof wf&&u.push(this.parts[m]),this.parts[m]=null;i.type.mark&&u.push(this.elt(i.type.mark,i.from,d));let h=this.elt(c,f,d,u);this.parts[l]=s&&a.from!=f?new Mn(a.type,a.from,f,a.side):null,(this.parts[r]=s&&i.to!=d?new Mn(i.type,d,i.to,i.side):null)?this.parts.splice(r,0,h):this.parts[r]=h}let n=[];for(let r=e;r<this.parts.length;r++){let i=this.parts[r];i instanceof wf&&n.push(i)}return n}findOpeningDelimiter(e){for(let n=this.parts.length-1;n>=0;n--){let r=this.parts[n];if(r instanceof Mn&&r.type==e&&r.side&1)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}getDelimiterAt(e){let n=this.parts[e];return n instanceof Mn?n:null}skipSpace(e){return ku(this.text,e-this.offset)+this.offset}elt(e,n,r,i){return typeof e=="string"?Me(this.parser.getNodeType(e),n,r,i):new q5(e,n)}}mS.linkStart=To;mS.imageStart=Om;function j0(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),r=0;for(let i of e){for(;r<n.length&&n[r].to<i.to;)r++;if(r<n.length&&n[r].from<i.from){let s=n[r];s instanceof wf&&(n[r]=new wf(s.type,s.from,s.to,j0(s.children,[i])))}else n.splice(r++,0,i)}return n}const Ope=[J.CodeBlock,J.ListItem,J.OrderedList,J.BulletList];let ype=class{constructor(e,n){this.fragments=e,this.input=n,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,n){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
|
|
494
|
+
`;)s--;this.fragmentEnd=s?s-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let i=e+this.fragment.offset;for(;r.to<=i;)if(!r.parent())return!1;for(;;){if(r.from>=i)return this.fragment.from<=n;if(!r.childAfter(i))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(Oe.contextHash)==e}takeNodes(e){let n=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,a=e.block.children.length,l=o,c=a;for(;;){if(n.to-r>i){if(n.type.isAnonymous&&n.firstChild())continue;break}let u=J5(n.from-r,e.ranges);if(n.to-r<=e.ranges[e.rangeI].to)e.addNode(n.tree,u);else{let f=new Re(e.parser.nodeSet.types[J.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(f,n.tree),e.addNode(f,u)}if(n.type.is("Block")&&(Ope.indexOf(n.type.id)<0?(o=n.to-r,a=e.block.children.length):(o=l,a=c),l=n.to-r,c=e.block.children.length),!n.nextSibling())break}for(;e.block.children.length>a;)e.block.children.pop(),e.block.positions.pop();return o-s}};function J5(t,e){let n=t;for(let r=1;r<e.length;r++){let i=e[r-1].to,s=e[r].from;i<t&&(n-=s-i)}return n}const vpe=uc({"Blockquote/...":T.quote,HorizontalRule:T.contentSeparator,"ATXHeading1/... SetextHeading1/...":T.heading1,"ATXHeading2/... SetextHeading2/...":T.heading2,"ATXHeading3/...":T.heading3,"ATXHeading4/...":T.heading4,"ATXHeading5/...":T.heading5,"ATXHeading6/...":T.heading6,"Comment CommentBlock":T.comment,Escape:T.escape,Entity:T.character,"Emphasis/...":T.emphasis,"StrongEmphasis/...":T.strong,"Link/... Image/...":T.link,"OrderedList/... BulletList/...":T.list,"BlockQuote/...":T.quote,"InlineCode CodeText":T.monospace,"URL Autolink":T.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":T.processingInstruction,"CodeInfo LinkLabel":T.labelName,LinkTitle:T.string,Paragraph:T.content}),xpe=new zg(new cc(Z5).extend(vpe),Object.keys(uh).map(t=>uh[t]),Object.keys(uh).map(t=>F5[t]),Object.keys(uh),hpe,I5,Object.keys(Wy).map(t=>Wy[t]),Object.keys(Wy),[]);function bpe(t,e,n){let r=[];for(let i=t.firstChild,s=e;;i=i.nextSibling){let o=i?i.from:n;if(o>s&&r.push({from:s,to:o}),!i)break;s=i.to}return r}function wpe(t){let{codeParser:e,htmlParser:n}=t;return{wrap:oL((i,s)=>{let o=i.type.id;if(e&&(o==J.CodeBlock||o==J.FencedCode)){let a="";if(o==J.FencedCode){let c=i.node.getChild(J.CodeInfo);c&&(a=s.read(c.from,c.to))}let l=e(a);if(l)return{parser:l,overlay:c=>c.type.id==J.CodeText,bracketed:o==J.FencedCode}}else if(n&&(o==J.HTMLBlock||o==J.HTMLTag||o==J.CommentBlock))return{parser:n,overlay:bpe(i.node,i.from,i.to)};return null})}}const Spe={resolve:"Strikethrough",mark:"StrikethroughMark"},kpe={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":T.strikethrough}},{name:"StrikethroughMark",style:T.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let r=t.slice(n-1,n),i=t.slice(n+2,n+3),s=/\s|^$/.test(r),o=/\s|^$/.test(i),a=Sf.test(r),l=Sf.test(i);return t.addDelimiter(Spe,n,n+2,!o&&(!l||s||a),!s&&(!a||o||l))},after:"Emphasis"}]};function Cu(t,e,n=0,r,i=0){let s=0,o=!0,a=-1,l=-1,c=!1,u=()=>{r.push(t.elt("TableCell",i+a,i+l,t.parser.parseInline(e.slice(a,l),i+a)))};for(let f=n;f<e.length;f++){let d=e.charCodeAt(f);d==124&&!c?((!o||a>-1)&&s++,o=!1,r&&(a>-1&&u(),r.push(t.elt("TableDelimiter",f+i,f+i+1))),a=l=-1):(c||d!=32&&d!=9)&&(a<0&&(a=f),l=f+1),c=!c&&d==92}return a>-1&&(s++,r&&u()),s}function S2(t,e){for(let n=e;n<t.length;n++){let r=t.charCodeAt(n);if(r==124)return!0;r==92&&n++}return!1}const e3=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class k2{constructor(){this.rows=null}nextLine(e,n,r){if(this.rows==null){this.rows=!1;let i;if((n.next==45||n.next==58||n.next==124)&&e3.test(i=n.text.slice(n.pos))){let s=[];Cu(e,r.content,0,s,r.start)==Cu(e,i,n.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,s),e.elt("TableDelimiter",e.lineStart+n.pos,e.lineStart+n.text.length)])}}else if(this.rows){let i=[];Cu(e,n.text,n.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+n.pos,e.lineStart+n.text.length,i))}return!1}finish(e,n){return this.rows?(e.addLeafElement(n,e.elt("Table",n.start,n.start+n.content.length,this.rows)),!0):!1}}const Cpe={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":T.heading}},"TableRow",{name:"TableCell",style:T.content},{name:"TableDelimiter",style:T.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return S2(e.content,0)?new k2:null},endLeaf(t,e,n){if(n.parsers.some(i=>i instanceof k2)||!S2(e.text,e.basePos))return!1;let r=t.peekLine();return e3.test(r)&&Cu(t,e.text,e.basePos)==Cu(t,r,e.basePos)},before:"SetextHeading"}]};class Ppe{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const Tpe={defineNodes:[{name:"Task",block:!0,style:T.list},{name:"TaskMarker",style:T.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new Ppe:null},after:"SetextHeading"}]},C2=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,P2=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Epe=/[\w-]+\.[\w-]+($|\/)/,T2=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,E2=/\/[a-zA-Z\d@.]+/gy;function R2(t,e,n,r){let i=0;for(let s=e;s<n;s++)t[s]==r&&i++;return i}function Rpe(t,e){P2.lastIndex=e;let n=P2.exec(t);if(!n||Epe.exec(n[0])[0].indexOf("_")>-1)return-1;let r=e+n[0].length;for(;;){let i=t[r-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&R2(t,e,r,")")>R2(t,e,r,"("))r--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,r))))r=e+s.index;else break}return r}function _2(t,e){T2.lastIndex=e;let n=T2.exec(t);if(!n)return-1;let r=n[0][n[0].length-1];return r=="_"||r=="-"?-1:e+n[0].length-(r=="."?1:0)}const _pe={parseInline:[{name:"Autolink",parse(t,e,n){let r=n-t.offset;if(r&&/\w/.test(t.text[r-1]))return-1;C2.lastIndex=r;let i=C2.exec(t.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=Rpe(t.text,r+i[0].length),s>-1&&t.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(r,s));s=r+o[0].length}}else i[3]?s=_2(t.text,r):(s=_2(t.text,r+i[0].length),s>-1&&i[0]=="xmpp:"&&(E2.lastIndex=s,i=E2.exec(t.text),i&&(s=i.index+i[0].length)));return s<0?-1:(t.addElement(t.elt("URL",n,s+t.offset)),s+t.offset)}}]},$pe=[Cpe,Tpe,kpe,_pe];function t3(t,e,n){return(r,i,s)=>{if(i!=t||r.char(s+1)==t)return-1;let o=[r.elt(n,s,s+1)];for(let a=s+1;a<r.end;a++){let l=r.char(a);if(l==t)return r.addElement(r.elt(e,s,a+1,o.concat(r.elt(n,a,a+1))));if(l==92&&o.push(r.elt("Escape",a,a+++2)),wr(l))break}return-1}}const Ape={defineNodes:[{name:"Superscript",style:T.special(T.content)},{name:"SuperscriptMark",style:T.processingInstruction}],parseInline:[{name:"Superscript",parse:t3(94,"Superscript","SuperscriptMark")}]},Qpe={defineNodes:[{name:"Subscript",style:T.special(T.content)},{name:"SubscriptMark",style:T.processingInstruction}],parseInline:[{name:"Subscript",parse:t3(126,"Subscript","SubscriptMark")}]},Ipe={defineNodes:[{name:"Emoji",style:T.character}],parseInline:[{name:"Emoji",parse(t,e,n){let r;return e!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(t.slice(n+1,t.end)))?-1:t.addElement(t.elt("Emoji",n,n+1+r[0].length))}}]};var $2={};class ym{constructor(e,n,r,i,s,o,a,l,c,u=0,f){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=s,this.score=o,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new ym(e,[],n,r,r,0,[],0,i?new A2(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=s.dynamicPrecedence(i);if(a&&(this.score+=a),r==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let f=l?this.stack[l-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<s.minRepeatTerm||e&131072){let h=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,c,h,d+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=s.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,n,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,a=this.buffer.length;if(a==0&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(n==r)return;if(o.buffer[a-2]>=n){o.buffer[a-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,n,r,i);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4);else{let s=e,{parser:o}=this.p;this.pos=i;let a=o.stateFlag(s,1);!a&&(i>r||n<=o.maxNode)&&(this.reducePos=i),this.pushState(s,a?r:Math.min(r,this.reducePos)),this.shiftContext(n,r),n<=o.maxNode&&this.buffer.push(n,r,i,4)}}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new ym(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new Npe(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let s=0,o;s<n.length;s+=2)(o=n[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(n[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<n.length;s+=2){let o=n[s+1];i.some((a,l)=>l&1&&a==o)||i.push(n[s],o)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let s=n[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(n[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if(!(n&65536))return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,s)=>{if(!n.includes(i))return n.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let a=(o>>19)-s;if(a>1){let l=o&65535,c=this.stack.length-a*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=r(o,s+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new A2(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class A2{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class Npe{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class vm{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new vm(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new vm(this.stack,this.pos,this.index)}}function tu(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let s=0;for(;;){let o=t.charCodeAt(r++),a=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),s+=l,a)break;s*=46}n?n[i++]=s:n=new e(s)}return n}class Uh{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Q2=new Uh;class jpe{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Q2,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let o=this.ranges[--i];s-=r.from-o.to,r=o}for(;n<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-r.to,r=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Q2,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class ml{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;n3(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}ml.prototype.contextual=ml.prototype.fallback=ml.prototype.extend=!1;class xm{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?tu(e):e}token(e,n){let r=e.pos,i=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(n3(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,o==null)break;e.reset(o,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}xm.prototype.contextual=ml.prototype.fallback=ml.prototype.extend=!1;class Jn{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function n3(t,e,n,r,i,s){let o=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;a&t[o];){let c=t[o+1];for(let h=o+3;h<c;h+=2)if((t[h+1]&a)>0){let g=t[h];if(l.allows(g)&&(e.token.value==-1||e.token.value==g||Mpe(g,e.token.value,i,s))){e.acceptToken(g);break}}let u=e.next,f=0,d=t[o+2];if(e.next<0&&d>f&&t[c+d*3-3]==65535){o=t[c+d*3-1];continue e}for(;f<d;){let h=f+d>>1,g=c+h+(h<<1),m=t[g],v=t[g+1]||65536;if(u<m)d=h;else if(u>=v)f=h+1;else{o=t[g+2],e.advance();continue e}}break}}function I2(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function Mpe(t,e,n,r){let i=I2(n,r,e);return i<0||I2(n,r,t)<i}const An=typeof process<"u"&&$2&&/\bparse\b/.test($2.LOG);let qy=null;function N2(t,e,n){let r=t.cursor(Ve.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class Dpe{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?N2(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?N2(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[n]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof Re){if(o==e){if(o<this.safeFrom)return null;let a=o+s.length;if(a<=this.safeTo){let l=s.prop(Oe.lookAhead);if(!l||a+l<this.fragment.to)return s}}this.index[n]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}}class Lpe{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Uh)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<s.length;c++){if(!(1<<c&o))continue;let u=s[c],f=this.tokens[c];if(!(r&&!u.fallback)&&((u.contextual||f.start!=e.pos||f.mask!=o||f.context!=a)&&(this.updateCachedToken(f,u,e),f.mask=o,f.context=a),f.lookAhead>f.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let d=n;if(f.extended>-1&&(n=this.addActions(e,f.extended,f.end,n)),n=this.addActions(e,f.value,f.end,n),!u.extend&&(r=f,n>d))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new Uh,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Uh,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let a=s.specializers[o](this.stream.read(e.start,e.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:s}=e,{parser:o}=e.p,{data:a}=o;for(let l=0;l<2;l++)for(let c=o.stateSlot(s,l?2:1);;c+=3){if(a[c]==65535)if(a[c+1]==1)c=Li(a,c+2);else{i==0&&a[c+1]==2&&(i=this.putAction(Li(a,c+2),n,r,i));break}a[c]==n&&(i=this.putAction(Li(a,c+1),n,r,i))}return i}}class zpe{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new jpe(n,i),this.tokens=new Lpe(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[ym.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new Dpe(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let a=e[o];for(;;){if(this.tokens.mainToken=null,a.pos>n)r.push(a);else{if(this.advanceStack(a,r,e))continue;{i||(i=[],s=[]),i.push(a);let l=this.tokens.getMainToken(a);s.push(l.value,l.end)}}break}}if(!r.length){let o=i&&Vpe(i);if(o)return An&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw An&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(o)return An&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((a,l)=>l.score-a.score);r.length>o;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let a=r[o];for(let l=o+1;l<r.length;l++){let c=r[l];if(a.sameState(c)||a.buffer.length>500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(o--,1);continue e}}}r.length>12&&(r.sort((o,a)=>a.score-o.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:s}=this,o=An?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?s.getGoto(e.state,f.type.id):-1;if(d>-1&&f.length&&(!c||(f.prop(Oe.contextHash)||0)==u))return e.useNode(f,d),An&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(f.type.id)})`),!0;if(!(f instanceof Re)||f.children.length==0||f.positions[0]>0)break;let h=f.children[0];if(h instanceof Re&&f.positions[0]==0)f=h;else break}}let a=s.stateSlot(e.state,4);if(a>0)return e.reduce(a),An&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;c<l.length;){let u=l[c++],f=l[c++],d=l[c++],h=c==l.length||!r,g=h?e:e.split(),m=this.tokens.mainToken;if(g.apply(u,f,m?m.start:g.pos,d),An&&console.log(o+this.stackID(g)+` (via ${u&65536?`reduce of ${s.getName(u&65535)}`:"shift"} for ${s.getName(f)} @ ${i}${g==e?"":", split"})`),h)return!0;g.pos>i?n.push(g):r.push(g)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return j2(e,n),!0}}runRecovery(e,n,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let a=e[o],l=n[o<<1],c=n[(o<<1)+1],u=An?this.stackID(a)+" -> ":"";if(a.deadEnd&&(s||(s=!0,a.restart(),An&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let f=a.split(),d=u;for(let h=0;h<10&&f.forceReduce()&&(An&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));h++)An&&(d=this.stackID(f)+" -> ");for(let h of a.recoverByInsert(l))An&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),An&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),j2(a,r)):(!i||i.score<f.score)&&(i=f)}return i}stackToTree(e){return e.close(),Re.build({buffer:vm.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(qy||(qy=new WeakMap)).get(e);return n||qy.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function j2(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class Bpe{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const Yy=t=>t;class r3{constructor(e){this.start=e.start,this.shift=e.shift||Yy,this.reduce=e.reduce||Yy,this.reuse=e.reuse||Yy,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Fl extends _g{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<n.length;a++)i.push([]);function s(a,l,c){i[a].push([l,l.deserialize(String(c))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=Oe[l]);for(let c=1;c<a.length;){let u=a[c++];if(u>=0)s(u,l,a[c++]);else{let f=a[c+-u];for(let d=-u;d>0;d--)s(a[c++],l,f);c++}}}this.nodeSet=new cc(n.map((a,l)=>xt.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=tL;let o=tu(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(M2),this.states=tu(e.states,Uint32Array),this.data=tu(e.stateData),this.goto=tu(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new ml(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new zpe(this,e,n,r);for(let s of this.wrappers)i=s(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let s=i[n+1];;){let o=i[s++],a=o&1,l=i[s++];if(a&&r)return l;for(let c=s+(o>>1);s<c;s++)if(i[s]==e)return l;if(a)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),o;;s+=3){if((o=r[s])==65535)if(r[s+1]==1)o=r[s=Li(r,s+2)];else{if(r[s+1]==2)return Li(r,s+2);break}if(o==n||o==0)return Li(r,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Li(this.data,s+2);else break;i=n(Li(this.data,s+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Li(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((s,o)=>o&1&&s==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(Fl.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(a=>a.from==r.external);if(!s)return r;let o=Object.assign(Object.assign({},r),{external:s.to});return n.specializers[i]=M2(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<n.length;s++)if(!r[s])for(let o=this.dialects[n[s]],a;(a=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new Bpe(e,r,i)}static deserialize(e){return new Fl(e)}}function Li(t,e){return t[e]|t[e+1]<<16}function Vpe(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function M2(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}const Fpe=55,Xpe=1,Zpe=56,Wpe=2,qpe=57,Ype=3,D2=4,Upe=5,gS=6,i3=7,s3=8,o3=9,a3=10,Hpe=11,Gpe=12,Kpe=13,Uy=58,Jpe=14,eme=15,L2=59,l3=21,tme=23,c3=24,nme=25,M0=27,u3=28,rme=29,ime=32,sme=35,ome=37,ame=38,lme=0,cme=1,ume={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},fme={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},z2={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function dme(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}let B2=null,V2=null,F2=0;function D0(t,e){let n=t.pos+e;if(F2==n&&V2==t)return B2;let r=t.peek(e),i="";for(;dme(r);)i+=String.fromCharCode(r),r=t.peek(++e);return V2=t,F2=n,B2=i?i.toLowerCase():r==hme||r==pme?void 0:null}const f3=60,bm=62,OS=47,hme=63,pme=33,mme=45;function X2(t,e){this.name=t,this.parent=e}const gme=[gS,a3,i3,s3,o3],Ome=new r3({start:null,shift(t,e,n,r){return gme.indexOf(e)>-1?new X2(D0(r,1)||"",t):t},reduce(t,e){return e==l3&&t?t.parent:t},reuse(t,e,n,r){let i=e.type.id;return i==gS||i==ome?new X2(D0(r,1)||"",t):t},strict:!1}),yme=new Jn((t,e)=>{if(t.next!=f3){t.next<0&&e.context&&t.acceptToken(Uy);return}t.advance();let n=t.next==OS;n&&t.advance();let r=D0(t,0);if(r===void 0)return;if(!r)return t.acceptToken(n?eme:Jpe);let i=e.context?e.context.name:null;if(n){if(r==i)return t.acceptToken(Hpe);if(i&&fme[i])return t.acceptToken(Uy,-2);if(e.dialectEnabled(lme))return t.acceptToken(Gpe);for(let s=e.context;s;s=s.parent)if(s.name==r)return;t.acceptToken(Kpe)}else{if(r=="script")return t.acceptToken(i3);if(r=="style")return t.acceptToken(s3);if(r=="textarea")return t.acceptToken(o3);if(ume.hasOwnProperty(r))return t.acceptToken(a3);i&&z2[i]&&z2[i][r]?t.acceptToken(Uy,-1):t.acceptToken(gS)}},{contextual:!0}),vme=new Jn(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(L2);break}if(t.next==mme)e++;else if(t.next==bm&&e>=2){n>=3&&t.acceptToken(L2,-2);break}else e=0;t.advance()}});function xme(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const bme=new Jn((t,e)=>{if(t.next==OS&&t.peek(1)==bm){let n=e.dialectEnabled(cme)||xme(e.context);t.acceptToken(n?Upe:D2,2)}else t.next==bm&&t.acceptToken(D2,1)});function yS(t,e,n){let r=2+t.length;return new Jn(i=>{for(let s=0,o=0,a=0;;a++){if(i.next<0){a&&i.acceptToken(e);break}if(s==0&&i.next==f3||s==1&&i.next==OS||s>=2&&s<r&&i.next==t.charCodeAt(s-2))s++,o++;else if(s==r&&i.next==bm){a>o?i.acceptToken(e,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&a){i.acceptToken(e,1);break}else s=o=0;i.advance()}})}const wme=yS("script",Fpe,Xpe),Sme=yS("style",Zpe,Wpe),kme=yS("textarea",qpe,Ype),Cme=uc({"Text RawText IncompleteTag IncompleteCloseTag":T.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":T.angleBracket,TagName:T.tagName,"MismatchedCloseTag/TagName":[T.tagName,T.invalid],AttributeName:T.attributeName,"AttributeValue UnquotedAttributeValue":T.attributeValue,Is:T.definitionOperator,"EntityReference CharacterReference":T.character,Comment:T.blockComment,ProcessingInst:T.processingInstruction,DoctypeDecl:T.documentMeta}),Pme=Fl.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",stateData:",c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:Ome,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[Cme],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!b`!dpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYlWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`aP!b`!dp!_^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ebiSlWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0rXiSqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0mS1bP;=`<%l0m[1hP;=`<%l/^!V1vciSaP!b`!dpOq&Xqr1krs&}sv1kvw0mwx(tx!P1k!P!Q&X!Q!^1k!^!_*V!_!a&X!a#s1k#s$f&X$f;'S1k;'S;=`3R<%l?Ah1k?Ah?BY&X?BY?Mn1k?MnO&X!V3UP;=`<%l1k!_3[P;=`<%l-_!Z3hV!ahaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_4WiiSlWd!ROX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst>]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!V<QciSOp7Sqr;{rs7Sst0mtw;{wx7Sx!P;{!P!Q7S!Q!];{!]!^=]!^!a7S!a#s;{#s$f7S$f;'S;{;'S;=`>P<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[wme,Sme,kme,bme,yme,vme,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function d3(t,e){let n=Object.create(null);for(let r of t.getChildren(c3)){let i=r.getChild(nme),s=r.getChild(M0)||r.getChild(u3);i&&(n[e.read(i.from,i.to)]=s?s.type.id==M0?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return n}function Z2(t,e){let n=t.getChild(tme);return n?e.read(n.from,n.to):" "}function Hy(t,e,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=d3(t.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function h3(t=[],e=[]){let n=[],r=[],i=[],s=[];for(let a of t)(a.tag=="script"?n:a.tag=="style"?r:a.tag=="textarea"?i:s).push(a);let o=e.length?Object.create(null):null;for(let a of e)(o[a.name]||(o[a.name]=[])).push(a);return oL((a,l)=>{let c=a.type.id;if(c==rme)return Hy(a,l,n);if(c==ime)return Hy(a,l,r);if(c==sme)return Hy(a,l,i);if(c==l3&&s.length){let u=a.node,f=u.firstChild,d=f&&Z2(f,l),h;if(d){for(let g of s)if(g.tag==d&&(!g.attrs||g.attrs(h||(h=d3(f,l))))){let m=u.lastChild,v=m.type.id==ame?m.from:u.to;if(v>f.to)return{parser:g.parser,overlay:[{from:f.to,to:v}]}}}}if(o&&c==c3){let u=a.node,f;if(f=u.firstChild){let d=o[l.read(f.from,f.to)];if(d)for(let h of d){if(h.tagName&&h.tagName!=Z2(u.parent,l))continue;let g=u.lastChild;if(g.type.id==M0){let m=g.from+1,v=g.lastChild,y=g.to-(v&&v.isError?0:1);if(y>m)return{parser:h.parser,overlay:[{from:m,to:y}],bracketed:!0}}else if(g.type.id==u3)return{parser:h.parser,overlay:[{from:g.from,to:g.to}]}}}}return null})}const Tme=122,W2=1,Eme=123,Rme=124,p3=2,_me=125,$me=3,Ame=4,m3=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Qme=58,Ime=40,g3=95,Nme=91,Hh=45,jme=46,Mme=35,Dme=37,Lme=38,zme=92,Bme=10,Vme=42;function kf(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function vS(t){return t>=48&&t<=57}function q2(t){return vS(t)||t>=97&&t<=102||t>=65&&t<=70}const O3=(t,e,n)=>(r,i)=>{for(let s=!1,o=0,a=0;;a++){let{next:l}=r;if(kf(l)||l==Hh||l==g3||s&&vS(l))!s&&(l!=Hh||a>0)&&(s=!0),o===a&&l==Hh&&o++,r.advance();else if(l==zme&&r.peek(1)!=Bme){if(r.advance(),q2(r.next)){do r.advance();while(q2(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();s=!0}else{s&&r.acceptToken(o==2&&i.canShift(p3)?e:l==Ime?n:t);break}}},Fme=new Jn(O3(Eme,p3,Rme)),Xme=new Jn(O3(_me,$me,Ame)),Zme=new Jn(t=>{if(m3.includes(t.peek(-1))){let{next:e}=t;(kf(e)||e==g3||e==Mme||e==jme||e==Vme||e==Nme||e==Qme&&kf(t.peek(1))||e==Hh||e==Lme)&&t.acceptToken(Tme)}}),Wme=new Jn(t=>{if(!m3.includes(t.peek(-1))){let{next:e}=t;if(e==Dme&&(t.advance(),t.acceptToken(W2)),kf(e)){do t.advance();while(kf(t.next)||vS(t.next));t.acceptToken(W2)}}}),qme=uc({"AtKeyword import charset namespace keyframes media supports":T.definitionKeyword,"from to selector":T.keyword,NamespaceName:T.namespace,KeyframeName:T.labelName,KeyframeRangeName:T.operatorKeyword,TagName:T.tagName,ClassName:T.className,PseudoClassName:T.constant(T.className),IdName:T.labelName,"FeatureName PropertyName":T.propertyName,AttributeName:T.attributeName,NumberLiteral:T.number,KeywordQuery:T.keyword,UnaryQueryOp:T.operatorKeyword,"CallTag ValueName":T.atom,VariableName:T.variableName,Callee:T.operatorKeyword,Unit:T.unit,"UniversalSelector NestingSelector":T.definitionOperator,"MatchOp CompareOp":T.compareOperator,"ChildOp SiblingOp, LogicOp":T.logicOperator,BinOp:T.arithmeticOperator,Important:T.modifier,Comment:T.blockComment,ColorLiteral:T.color,"ParenthesizedContent StringLiteral":T.string,":":T.punctuation,"PseudoOp #":T.derefOperator,"; ,":T.separator,"( )":T.paren,"[ ]":T.squareBracket,"{ }":T.brace}),Yme={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},Ume={__proto__:null,or:98,and:98,not:106,only:106,layer:170},Hme={__proto__:null,selector:112,layer:166},Gme={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},Kme={__proto__:null,to:207},Jme=Fl.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-E8i-E8iOOQ['#Cs'#CsO-jQdO'#CtO.QQdO'#CzO.hQdO'#C}O/OQ!pO'#DPO1RQ!jO,5:jOOQO'#DU'#DUO*mQ`O'#DTO1cQ!nO'#FXO3`Q`O'#DVO3eQ`O'#DkOOQ['#FX'#FXO-`Q`O,5:pO3jQ!bO,5:rOOQS'#E['#E[O3rQ`O,5:tO3wQdO,5:tOOQO'#E_'#E_O4PQ`O,5:wO4UQhO,5:}O%_QdO'#DgOOQS,5;P,5;PO-eQ`O,5;PO4^QdO,5;PO4fQdO,5:gO4vQdO'#EtO5TQ`O,5;zO5TQ`O,5;zPOOO'#Ej'#EjP5`O&jO,58{POOO,58{,58{OOQP1G.n1G.nOOQP1G.q1G.qO*hQ`O1G.qO*mQ`O1G.qOOQP1G/v1G/vO5kQpO1G/xO5sQaO1G/{O6ZQaO1G/}O6qQaO1G0OO7XQaO,5;^OOQO-E8p-E8pOOQS1G.i1G.iO7cQ`O,5:fO7hQdO'#DoO7oQdO'#CrOOQP1G/x1G/xO&lQdO1G/xO7vQ!jO'#DZO8UQ!bO,59vO8^QhO,5:OOOQO'#F]'#F]O8XQ!bO,59zO'tQhO,59xO8fQhO'#EvO8sQ`O,5;{O9OQhO,59|O9uQhO'#DiOOQW,5:S,5:SOOQS1G0n1G0nOOQW,5:P,5:PO9|Q!fO'#FYOOQS'#FY'#FYOOQS'#Em'#EmO;^QdO,59`OOQ[,59`,59`O;tQdO,59fOOQ[,59f,59fO<[QdO,59iOOQ[,59i,59iOOQ[,59k,59kO&lQdO,59mO<rQhO'#EQOOQW'#EQ'#EQO=WQ`O1G0UO1[QhO1G0UOOQ[,59o,59oO'tQhO'#DXOOQ[,59q,59qO=]Q#tO,5:VOOQS1G0[1G0[OOQS1G0^1G0^OOQS1G0`1G0`O=hQ`O1G0`O=mQdO'#E`OOQS1G0c1G0cOOQS1G0i1G0iO=xQaO,5:RO-`Q`O1G0kOOQS1G0k1G0kO-eQ`O1G0kO>PQ!fO1G0ROOQO1G0R1G0ROOQO,5;`,5;`O>gQdO,5;`OOQO-E8r-E8rO>tQ`O1G1fPOOO-E8h-E8hPOOO1G.g1G.gOOQP7+$]7+$]OOQP7+%d7+%dO&lQdO7+%dOOQS1G0Q1G0QO?PQaO'#F_O?ZQ`O,5:ZO?`Q!fO'#ElO@^QdO'#FWO@hQ`O,59^O@mQ!bO7+%dO&lQdO1G/bO@uQhO1G/fOOQW1G/j1G/jOOQW1G/d1G/dOAWQhO,5;bOOQO-E8t-E8tOAfQhO'#DZOAtQhO'#F^OBPQ`O'#F^OBUQ`O,5:TOOQS-E8k-E8kOOQ[1G.z1G.zOOQ[1G/Q1G/QOOQ[1G/T1G/TOOQ[1G/X1G/XOBZQdO,5:lOOQS7+%p7+%pOB`Q`O7+%pOBeQhO'#DYOBmQ`O,59sO'tQhO,59sOOQ[1G/q1G/qOBuQ`O1G/qOOQS7+%z7+%zOBzQbO'#DPOOQO'#Eb'#EbOCYQ`O'#EaOOQO'#Ea'#EaOCeQ`O'#EwOCmQdO,5:zOOQS,5:z,5:zOOQ[1G/m1G/mOOQS7+&V7+&VO-`Q`O7+&VOCxQ!fO'#EsO&lQdO'#EsOEPQdO7+%mOOQO7+%m7+%mOOQO1G0z1G0zOEdQ!bO<<IOOElQdO'#EqOEvQ`O,5;yOOQP1G/u1G/uOOQS-E8j-E8jOFOQdO'#EpOFYQ`O,5;rOOQ]1G.x1G.xOOQP<<IO<<IOOFbQdO7+$|OOQO'#D]'#D]OFiQ!bO7+%QOFqQhO'#EoOF{Q`O,5;xO&lQdO,5;xOOQW1G/o1G/oOOQO'#ES'#ESOGTQ`O1G0WOOQS<<I[<<I[O&lQdO,59tOGnQhO1G/_OOQ[1G/_1G/_OGuQ`O1G/_OOQW-E8l-E8lOOQ[7+%]7+%]OOQO,5:{,5:{O=pQdO'#ExOCeQ`O,5;cOOQS,5;c,5;cOOQS-E8u-E8uOOQS1G0f1G0fOOQS<<Iq<<IqOG}Q!fO,5;_OOQS-E8q-E8qOOQO<<IX<<IXOOQPAN>jAN>jOIUQaO,5;]OOQO-E8o-E8oOI`QdO,5;[OOQO-E8n-E8nOOQW<<Hh<<HhOOQW<<Hl<<HlOIjQhO<<HlOI{QhO,5;ZOJWQ`O,5;ZOOQO-E8m-E8mOJ]QdO1G1dOBZQdO'#EuOJgQ`O7+%rOOQW7+%r7+%rOJoQ!bO1G/`OOQ[7+$y7+$yOJzQhO7+$yPKRQ`O'#EnOOQO,5;d,5;dOOQO-E8v-E8vOOQS1G0}1G0}OKWQ`OAN>WO&lQdO1G0uOK]Q`O7+'OOOQO,5;a,5;aOOQO-E8s-E8sOOQW<<I^<<I^OOQ[<<He<<HePOQW,5;Y,5;YOOQWG23rG23rOKeQdO7+&a",stateData:"Kx~O#sOS#tQQ~OW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#oRO~OQiOW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#ohO~O#m$SP~P!dO#tmO~O#ooO~O]qO`rOarOjsOmtO!juO!mwO#nvO~OpzO!^xO~P$SOc!QO#o|O#p}O~O#o!RO~O#o!TO~OW[OZ[O]TO`VOaVOjWOmXO!jYO!mZO#oRO~OS!]Oe!YO!V![O!Y!`O#q!XOp$TP~Ok$TP~P&POQ!jOe!cOm!dOp!eOr!mOt!mOz!kO!`!lO#o!bO#p!hO#}!fO~Ot!qO!`!lO#o!pO~Ot!sO#o!sO~OS!]Oe!YO!V![O!Y!`O#q!XO~Oe!vOpzO#Z!xO~O]YX`YX`!pXaYXjYXmYXpYX!^YX!jYX!mYX#nYX~O`!zO~Ok!{O#m$SXo$SX~O#m$SXo$SX~P!dO#u#OO#v#OO#w#QO~Oc#UO#o|O#p}O~OpzO!^xO~Oo$SP~P!dOe#`O~Oe#aO~Ol#bO!h#cO~O]qO`rOarOjsOmtO~Op!ia!^!ia!j!ia!m!ia#n!iad!ia~P*zOp!la!^!la!j!la!m!la#n!lad!la~P*zOR#gOS!]Oe!YOr#gOt#gO!V![O!Y!`O#q#dO#}!fO~O!R#iO!^#jOk$TXp$TX~Oe#mO~Ok#oOpzO~Oe!vO~O]#rO`#rOd#uOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl#wO~P&lO]#rO`#rOi#rOj#rOk#rOo#yO~P&lOP#zOSsXesXksXvsX!VsX!YsX!usX!wsX#qsX!TsXQsX]sX`sXdsXisXjsXmsXpsXrsXtsXzsX!`sX#osX#psX#}sXlsXosX!^sX!qsX#msX~Ov#{O!u#|O!w#}Ok$TP~P'tOe#aOS#{Xk#{Xv#{X!V#{X!Y#{X!u#{X!w#{X#q#{XQ#{X]#{X`#{Xd#{Xi#{Xj#{Xm#{Xp#{Xr#{Xt#{Xz#{X!`#{X#o#{X#p#{X#}#{Xl#{Xo#{X!^#{X!q#{X#m#{X~Oe$RO~Oe$TO~Ok$VOv#{O~Ok$WO~Ot$XO!`!lO~Op$YO~OpzO!R#iO~OpzO#Z$`O~O!q$bOk!oa#m!oao!oa~P&lOk#hX#m#hXo#hX~P!dOk!{O#m$Sao$Sa~O#u#OO#v#OO#w$hO~Ol$jO!h$kO~Op!ii!^!ii!j!ii!m!ii#n!iid!ii~P*zOp!ki!^!ki!j!ki!m!ki#n!kid!ki~P*zOp!li!^!li!j!li!m!li#n!lid!li~P*zOp#fa!^#fa~P$SOo$lO~Od$RP~P%_Od#zP~P&lO`!PXd}X!R}X!T!PX~O`$sO!T$tO~Od$uO!R#iO~Ok#jXp#jX!^#jX~P'tO!^#jOk$Tap$Ta~O!R#iOk!Uap!Ua!^!Uad!Ua`!Ua~OS!]Oe!YO!V![O!Y!`O#q$yO~Od$QP~P9dOv#{OQ#|X]#|X`#|Xd#|Xe#|Xi#|Xj#|Xk#|Xm#|Xp#|Xr#|Xt#|Xz#|X!`#|X#o#|X#p#|X#}#|Xl#|Xo#|X~O]#rO`#rOd%OOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl%PO~P&lO]#rO`#rOi#rOj#rOk#rOo%QO~P&lOe%SOS!tXk!tX!V!tX!Y!tX#q!tX~Ok%TO~Od%YOt%ZO!a%ZO~Ok%[O~Oo%cO#o%^O#}%]O~Od%dO~P$SOv#{O!^%hO!q%jOk!oi#m!oio!oi~P&lOk#ha#m#hao#ha~P!dOk!{O#m$Sio$Si~O!^%mOd$RX~P$SOd%oO~Ov#{OQ#`Xd#`Xe#`Xm#`Xp#`Xr#`Xt#`Xz#`X!^#`X!`#`X#o#`X#p#`X#}#`X~O!^%qOd#zX~P&lOd%sO~Ol%tOv#{O~OR#gOr#gOt#gO#q%vO#}!fO~O!R#iOk#jap#ja!^#ja~O`!PXd}X!R}X!^}X~O!R#iO!^%xOd$QX~O`%zO~Od%{O~O#o%|O~Ok&OO~O`&PO!R#iO~Od&ROk&QO~Od&UO~OP#zOpsX!^sXdsX~O#}%]Op#TX!^#TX~OpzO!^&WO~Oo&[O#o%^O#}%]O~Ov#{OQ#gXe#gXk#gXm#gXp#gXr#gXt#gXz#gX!^#gX!`#gX!q#gX#m#gX#o#gX#p#gX#}#gXo#gX~O!^%hO!q&`Ok!oq#m!oqo!oq~P&lOl&aOv#{O~Od#eX!^#eX~P%_O!^%mOd$Ra~Od#dX!^#dX~P&lO!^%qOd#za~Od&fO~P&lOd&gO!T&hO~Od#cX!^#cX~P9dO!^%xOd$Qa~O]&mOd&oO~OS#bae#ba!V#ba!Y#ba#q#ba~Od&qO~PG]Od&qOk&rO~Ov#{OQ#gae#gak#gam#gap#gar#gat#gaz#ga!^#ga!`#ga!q#ga#m#ga#o#ga#p#ga#}#gao#ga~Od#ea!^#ea~P$SOd#da!^#da~P&lOR#gOr#gOt#gO#q%vO#}%]O~O!R#iOd#ca!^#ca~O`&xO~O!^%xOd$Qi~P&lO]&mOd&|O~Ov#{Od|ik|i~Od&}O~PG]Ok'OO~Od'PO~O!^%xOd$Qq~Od#cq!^#cq~P&lO#s!a#t#}]#}v!m~",goto:"2h$UPPPPP$VP$YP$c$uP$cP%X$cPP%_PPP%e%o%oPPPPP%oPP%oP&]P%oP%o'W%oP't'w'}'}(^'}P'}P'}P'}'}P(m'}(yP(|PP)p)v$c)|$c*SP$cP$c$cP*Y*{+YP$YP+aP+dP$YP$YP$YP+j$YP+m+p+s+z$YP$YPP$YP,P,V,f,|-[-b-l-r-x.O.U.`.f.l.rPPPPPPPPPPP.x/R/w/z0|P1U1u2O2R2U2[RnQ_^OP`kz!{$dq[OPYZ`kuvwxz!v!{#`$d%mqSOPYZ`kuvwxz!v!{#`$d%mQpTR#RqQ!OVR#SrQ#S!QS$Q!i!jR$i#U!V!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'Q!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QU#g!Y$t&hU%`$Y%b&WR&V%_!V!iac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QR$S!kQ%W$RR&S%Xk!^]bf!Y![!g#i#j#m$P$R%X%xQ#e!YQ${#mQ%w$tQ&j%xR&w&hQ!ygQ#p!`Q$^!xR%f$`R#n!]!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QQ!qdR$X!rQ!PVR#TrQ#S!PR$i#TQ!SWR#VsQ!UXR#WtQ{UQ!wgQ#^yQ#o!_Q$U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[qme],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Q~'ah#s~!a`OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Qj)OUOy%Qz#]%Q#]#^)b#^;'S%Q;'S;=`%c<%lO%Qj)gU!a`Oy%Qz#a%Q#a#b)y#b;'S%Q;'S;=`%c<%lO%Qj*OU!a`Oy%Qz#d%Q#d#e*b#e;'S%Q;'S;=`%c<%lO%Qj*gU!a`Oy%Qz#c%Q#c#d*y#d;'S%Q;'S;=`%c<%lO%Qj+OU!a`Oy%Qz#f%Q#f#g+b#g;'S%Q;'S;=`%c<%lO%Qj+gU!a`Oy%Qz#h%Q#h#i+y#i;'S%Q;'S;=`%c<%lO%Qj,OU!a`Oy%Qz#T%Q#T#U,b#U;'S%Q;'S;=`%c<%lO%Qj,gU!a`Oy%Qz#b%Q#b#c,y#c;'S%Q;'S;=`%c<%lO%Qj-OU!a`Oy%Qz#h%Q#h#i-b#i;'S%Q;'S;=`%c<%lO%Qj-iS!qY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q~-xWOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c<%lO-u~.gOt~~.jRO;'S-u;'S;=`.s;=`O-u~.vXOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c;=`<%l-u<%lO-u~/fP;=`<%l-uj/nYjYOy%Qz!Q%Q!Q![0^![!c%Q!c!i0^!i#T%Q#T#Z0^#Z;'S%Q;'S;=`%c<%lO%Qj0cY!a`Oy%Qz!Q%Q!Q![1R![!c%Q!c!i1R!i#T%Q#T#Z1R#Z;'S%Q;'S;=`%c<%lO%Qj1WY!a`Oy%Qz!Q%Q!Q![1v![!c%Q!c!i1v!i#T%Q#T#Z1v#Z;'S%Q;'S;=`%c<%lO%Qj1}YrY!a`Oy%Qz!Q%Q!Q![2m![!c%Q!c!i2m!i#T%Q#T#Z2m#Z;'S%Q;'S;=`%c<%lO%Qj2tYrY!a`Oy%Qz!Q%Q!Q![3d![!c%Q!c!i3d!i#T%Q#T#Z3d#Z;'S%Q;'S;=`%c<%lO%Qj3iY!a`Oy%Qz!Q%Q!Q![4X![!c%Q!c!i4X!i#T%Q#T#Z4X#Z;'S%Q;'S;=`%c<%lO%Qj4`YrY!a`Oy%Qz!Q%Q!Q![5O![!c%Q!c!i5O!i#T%Q#T#Z5O#Z;'S%Q;'S;=`%c<%lO%Qj5TY!a`Oy%Qz!Q%Q!Q![5s![!c%Q!c!i5s!i#T%Q#T#Z5s#Z;'S%Q;'S;=`%c<%lO%Qj5zSrY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qd6ZUOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qd6tS!hS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qb7VSZQOy%Qz;'S%Q;'S;=`%c<%lO%Q~7fWOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z<%lO7c~8RRO;'S7c;'S;=`8[;=`O7c~8_XOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z;=`<%l7c<%lO7c~8}P;=`<%l7cj9VSeYOy%Qz;'S%Q;'S;=`%c<%lO%Q~9hOd~n9oUWQvWOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qj:YWvW!mQOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj:wU!a`Oy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Qj;bY!a`#}YOy%Qz!Q%Q!Q![;Z![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj<VY!a`Oy%Qz{%Q{|<u|}%Q}!O<u!O!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj<zU!a`Oy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj=eU!a`#}YOy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj>O[!a`#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj>yS!^YOy%Qz;'S%Q;'S;=`%c<%lO%Qj?[WvWOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj?yU]YOy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Q~@bTvWOy%Qz{@q{;'S%Q;'S;=`%c<%lO%Q~@xS!a`#t~Oy%Qz;'S%Q;'S;=`%c<%lO%QjAZ[#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%QjBUU`YOy%Qz![%Q![!]Bh!];'S%Q;'S;=`%c<%lO%QbBoSaQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjCQSkYOy%Qz;'S%Q;'S;=`%c<%lO%QhCcU!TWOy%Qz!_%Q!_!`Cu!`;'S%Q;'S;=`%c<%lO%QhC|S!TW!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QlDaS!TW!hSOy%Qz;'S%Q;'S;=`%c<%lO%QjDtV!jQ!TWOy%Qz!_%Q!_!`Cu!`!aEZ!a;'S%Q;'S;=`%c<%lO%QbEbS!jQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjEqYOy%Qz}%Q}!OFa!O!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjFfW!a`Oy%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[Zme,Wme,Fme,Xme,1,2,3,4,new xm("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},specialized:[{term:124,get:t=>Yme[t]||-1},{term:125,get:t=>Ume[t]||-1},{term:4,get:t=>Hme[t]||-1},{term:25,get:t=>Gme[t]||-1},{term:123,get:t=>Kme[t]||-1}],tokenPrec:1963});let Gy=null;function Ky(){if(!Gy&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let r in t)r!="cssText"&&r!="cssFloat"&&typeof t[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),n.has(r)||(e.push(r),n.add(r)));Gy=e.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return Gy||[]}const Y2=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),U2=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),ege=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),tge=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),ji=/^(\w[\w-]*|-\w[\w-]*|)$/,nge=/^-(-[\w-]*)?$/;function rge(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let r=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const H2=new sL,ige=["Declaration"];function sge(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function y3(t,e,n){if(e.to-e.from>4096){let r=H2.get(e);if(r)return r;let i=[],s=new Set,o=e.cursor(Ve.IncludeAnonymous);if(o.firstChild())do for(let a of y3(t,o.node,n))s.has(a.label)||(s.add(a.label),i.push(a));while(o.nextSibling());return H2.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var o;if(n(s)&&s.matchContext(ige)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=t.sliceString(s.from,s.to);i.has(a)||(i.add(a),r.push({label:a,type:"variable"}))}}),r}}const v3=t=>e=>{let{state:n,pos:r}=e,i=We(n).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Ky(),validFor:ji};if(i.name=="ValueName")return{from:i.from,options:U2,validFor:ji};if(i.name=="PseudoClassName")return{from:i.from,options:Y2,validFor:ji};if(t(i)||(e.explicit||s)&&rge(i,n.doc))return{from:t(i)||s?i.from:r,options:y3(n.doc,sge(i),t),validFor:nge};if(i.name=="TagName"){for(let{parent:l}=i;l;l=l.parent)if(l.name=="Block")return{from:i.from,options:Ky(),validFor:ji};return{from:i.from,options:ege,validFor:ji}}if(i.name=="AtKeyword")return{from:i.from,options:tge,validFor:ji};if(!e.explicit)return null;let o=i.resolve(r),a=o.childBefore(r);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:r,options:Y2,validFor:ji}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:r,options:U2,validFor:ji}:o.name=="Block"||o.name=="Styles"?{from:r,options:Ky(),validFor:ji}:null},x3=v3(t=>t.name=="VariableName"),Cf=Dl.define({name:"css",parser:Jme.configure({props:[dc.add({Declaration:qh()}),hc.add({"Block KeyframeList":hL})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function b3(){return new zl(Cf,Cf.data.of({autocomplete:x3}))}const oge=Object.freeze(Object.defineProperty({__proto__:null,css:b3,cssCompletionSource:x3,cssLanguage:Cf,defineCSSCompletionSource:v3},Symbol.toStringTag,{value:"Module"})),age=316,lge=317,G2=1,cge=2,uge=3,fge=4,dge=318,hge=320,pge=321,mge=5,gge=6,Oge=0,L0=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],w3=125,yge=59,z0=47,vge=42,xge=43,bge=45,wge=60,Sge=44,kge=63,Cge=46,Pge=91,Tge=new r3({start:!1,shift(t,e){return e==mge||e==gge||e==hge?t:e==pge},strict:!1}),Ege=new Jn((t,e)=>{let{next:n}=t;(n==w3||n==-1||e.context)&&t.acceptToken(dge)},{contextual:!0,fallback:!0}),Rge=new Jn((t,e)=>{let{next:n}=t,r;L0.indexOf(n)>-1||n==z0&&((r=t.peek(1))==z0||r==vge)||n!=w3&&n!=yge&&n!=-1&&!e.context&&t.acceptToken(age)},{contextual:!0}),_ge=new Jn((t,e)=>{t.next==Pge&&!e.context&&t.acceptToken(lge)},{contextual:!0}),$ge=new Jn((t,e)=>{let{next:n}=t;if(n==xge||n==bge){if(t.advance(),n==t.next){t.advance();let r=!e.context&&e.canShift(G2);t.acceptToken(r?G2:cge)}}else n==kge&&t.peek(1)==Cge&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(uge))},{contextual:!0});function Jy(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const Age=new Jn((t,e)=>{if(t.next!=wge||!e.dialectEnabled(Oge)||(t.advance(),t.next==z0))return;let n=0;for(;L0.indexOf(t.next)>-1;)t.advance(),n++;if(Jy(t.next,!0)){for(t.advance(),n++;Jy(t.next,!1);)t.advance(),n++;for(;L0.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==Sge)return;for(let r=0;;r++){if(r==7){if(!Jy(t.next,!0))return;break}if(t.next!="extends".charCodeAt(r))break;t.advance(),n++}}t.acceptToken(fge,-n)}),Qge=uc({"get set async static":T.modifier,"for while do if else switch try catch finally return throw break continue default case defer":T.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":T.operatorKeyword,"let var const using function class extends":T.definitionKeyword,"import export from":T.moduleKeyword,"with debugger new":T.keyword,TemplateString:T.special(T.string),super:T.atom,BooleanLiteral:T.bool,this:T.self,null:T.null,Star:T.modifier,VariableName:T.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":T.function(T.variableName),VariableDefinition:T.definition(T.variableName),Label:T.labelName,PropertyName:T.propertyName,PrivatePropertyName:T.special(T.propertyName),"CallExpression/MemberExpression/PropertyName":T.function(T.propertyName),"FunctionDeclaration/VariableDefinition":T.function(T.definition(T.variableName)),"ClassDeclaration/VariableDefinition":T.definition(T.className),"NewExpression/VariableName":T.className,PropertyDefinition:T.definition(T.propertyName),PrivatePropertyDefinition:T.definition(T.special(T.propertyName)),UpdateOp:T.updateOperator,"LineComment Hashbang":T.lineComment,BlockComment:T.blockComment,Number:T.number,String:T.string,Escape:T.escape,ArithOp:T.arithmeticOperator,LogicOp:T.logicOperator,BitOp:T.bitwiseOperator,CompareOp:T.compareOperator,RegExp:T.regexp,Equals:T.definitionOperator,Arrow:T.function(T.punctuation),": Spread":T.punctuation,"( )":T.paren,"[ ]":T.squareBracket,"{ }":T.brace,"InterpolationStart InterpolationEnd":T.special(T.brace),".":T.derefOperator,", ;":T.separator,"@":T.meta,TypeName:T.typeName,TypeDefinition:T.definition(T.typeName),"type enum interface implements namespace module declare":T.definitionKeyword,"abstract global Privacy readonly override":T.modifier,"is keyof unique infer asserts":T.operatorKeyword,JSXAttributeValue:T.attributeValue,JSXText:T.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":T.angleBracket,"JSXIdentifier JSXNameSpacedName":T.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":T.attributeName,"JSXBuiltin/JSXIdentifier":T.standard(T.tagName)}),Ige={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},Nge={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},jge={__proto__:null,"<":193},Mge=Fl.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FeOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Jv'#JvO%[QlO'#JvOOQO'#Jy'#JyOOQO'#Ih'#IhOCQQpO'#EgOOQ!0Lb'#Ef'#EfOOQ!0Lb'#J}'#J}OC|Q!0MSO'#EgODWQpO'#EWOOQO'#Jx'#JxODlQpO'#JyOEyQpO'#EWODWQpO'#EgPFWO&2DjO'#CbPOOO)CD})CD}OOOO'#I`'#I`OFcO#tO,59UOOQ!0Lh,59U,59UOOOO'#Ia'#IaOFqO&jO,59UOGPQ!L^O'#DcOOOO'#Ic'#IcOGWO#@ItO,59{OOQ!0Lf,59{,59{OGfQlO'#IdOGyQ`O'#JtOIxQ!fO'#JtO+}QlO'#JtOJPQ`O,5:ROJgQ`O'#EpOJtQ`O'#KTOKPQ`O'#KSOKPQ`O'#KSOKXQ`O,5;^OK^Q`O'#KROOQ!0Ln,5:^,5:^OKeQlO,5:^OMcQ!0MxO,5:fONSQ`O,5:nONmQ!0LrO'#KQONtQ`O'#KPO9eQ`O'#KPO! YQ`O'#KPO! bQ`O,5;]O! gQ`O'#KPO!#lQ!fO'#JsOOQ!0Lh'#Ci'#CiO%[QlO'#ESO!$[Q!fO,5:sOOQS'#Jz'#JzOOQO-E<j-E<jO9kQ`O,5=_O!$rQ`O,5=_O!$wQlO,5;ZO!&zQMhO'#EkO!(eQ`O,5;ZO!(jQlO'#DyO!(tQpO,5;dO!(|QpO,5;dO%[QlO,5;dOOQ['#FT'#FTOOQ['#FV'#FVO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eO%[QlO,5;eOOQ['#FZ'#FZO!)[QlO,5;tOOQ!0Lf,5;y,5;yOOQ!0Lf,5;z,5;zOOQ!0Lf,5;|,5;|O%[QlO'#IpO!+_Q!0LrO,5<iO%[QlO,5;eO!&zQMhO,5;eO!+|QMhO,5;eO!-nQMhO'#E^O%[QlO,5;wOOQ!0Lf,5;{,5;{O!-uQ,UO'#FjO!.rQ,UO'#KXO!.^Q,UO'#KXO!.yQ,UO'#KXOOQO'#KX'#KXO!/_Q,UO,5<SOOOW,5<`,5<`O!/pQlO'#FvOOOW'#Io'#IoO7VO7dO,5<QO!/wQ,UO'#FxOOQ!0Lf,5<Q,5<QO!0hQ$IUO'#CyOOQ!0Lh'#C}'#C}O!0{O#@ItO'#DRO!1iQMjO,5<eO!1pQ`O,5<hO!3YQ(CWO'#GXO!3jQ`O'#GYO!3oQ`O'#GYO!5_Q(CWO'#G^O!6dQpO'#GbOOQO'#Gn'#GnO!,TQMhO'#GmOOQO'#Gp'#GpO!,TQMhO'#GoO!7VQ$IUO'#JlOOQ!0Lh'#Jl'#JlO!7aQ`O'#JkO!7oQ`O'#JjO!7wQ`O'#CuOOQ!0Lh'#C{'#C{O!8YQ`O'#C}OOQ!0Lh'#DV'#DVOOQ!0Lh'#DX'#DXO!8_Q`O,5<eO1SQ`O'#DZO!,TQMhO'#GPO!,TQMhO'#GRO!8gQ`O'#GTO!8lQ`O'#GUO!3oQ`O'#G[O!,TQMhO'#GaO<]Q`O'#JkO!8qQ`O'#EqO!9`Q`O,5<gOOQ!0Lb'#Cr'#CrO!9hQ`O'#ErO!:bQpO'#EsOOQ!0Lb'#KR'#KRO!:iQ!0LrO'#KaO9uQ!0LrO,5=cO`QlO,5>tOOQ['#Jh'#JhOOQ[,5>u,5>uOOQ[-E<]-E<]O!<hQ!0MxO,5:bO!:]QpO,5:`O!?RQ!0MxO,5:jO%[QlO,5:jO!AiQ!0MxO,5:lOOQO,5@z,5@zO!BYQMhO,5=_O!BhQ!0LrO'#JiO9`Q`O'#JiO!ByQ!0LrO,59ZO!CUQpO,59ZO!C^QMhO,59ZO:dQMhO,59ZO!CiQ`O,5;ZO!CqQ`O'#HbO!DVQ`O'#KdO%[QlO,5;}O!:]QpO,5<PO!D_Q`O,5=zO!DdQ`O,5=zO!DiQ`O,5=zO!DwQ`O,5=zO9uQ!0LrO,5=zO<]Q`O,5=jOOQO'#Cy'#CyO!EOQpO,5=gO!EWQMhO,5=hO!EcQ`O,5=jO!EhQ!bO,5=mO!EpQ`O'#K`O?YQ`O'#HWO9kQ`O'#HYO!EuQ`O'#HYO:dQMhO'#H[O!EzQ`O'#H[OOQ[,5=p,5=pO!FPQ`O'#H]O!FbQ`O'#CoO!FgQ`O,59PO!FqQ`O,59PO!HvQlO,59POOQ[,59P,59PO!IWQ!0LrO,59PO%[QlO,59PO!KcQlO'#HeOOQ['#Hf'#HfOOQ['#Hg'#HgO`QlO,5=}O!KyQ`O,5=}O`QlO,5>TO`QlO,5>VO!LOQ`O,5>XO`QlO,5>ZO!LTQ`O,5>^O!LYQlO,5>dOOQ[,5>j,5>jO%[QlO,5>jO9uQ!0LrO,5>lOOQ[,5>n,5>nO#!dQ`O,5>nOOQ[,5>p,5>pO#!dQ`O,5>pOOQ[,5>r,5>rO##QQpO'#D_O%[QlO'#JvO##sQpO'#JvO##}QpO'#DmO#$`QpO'#DmO#&qQlO'#DmO#&xQ`O'#JuO#'QQ`O,5:WO#'VQ`O'#EtO#'eQ`O'#KUO#'mQ`O,5;_O#'rQpO'#DmO#(PQpO'#EVOOQ!0Lf,5:o,5:oO%[QlO,5:oO#(WQ`O,5:oO?YQ`O,5;YO!CUQpO,5;YO!C^QMhO,5;YO:dQMhO,5;YO#(`Q`O,5@bO#(eQ07dO,5:sOOQO-E<f-E<fO#)kQ!0MSO,5;RODWQpO,5:rO#)uQpO,5:rODWQpO,5;RO!ByQ!0LrO,5:rOOQ!0Lb'#Ej'#EjOOQO,5;R,5;RO%[QlO,5;RO#*SQ!0LrO,5;RO#*_Q!0LrO,5;RO!CUQpO,5:rOOQO,5;X,5;XO#*mQ!0LrO,5;RPOOO'#I^'#I^P#+RO&2DjO,58|POOO,58|,58|OOOO-E<^-E<^OOQ!0Lh1G.p1G.pOOOO-E<_-E<_OOOO,59},59}O#+^Q!bO,59}OOOO-E<a-E<aOOQ!0Lf1G/g1G/gO#+cQ!fO,5?OO+}QlO,5?OOOQO,5?U,5?UO#+mQlO'#IdOOQO-E<b-E<bO#+zQ`O,5@`O#,SQ!fO,5@`O#,ZQ`O,5@nOOQ!0Lf1G/m1G/mO%[QlO,5@oO#,cQ`O'#IjOOQO-E<h-E<hO#,ZQ`O,5@nOOQ!0Lb1G0x1G0xOOQ!0Ln1G/x1G/xOOQ!0Ln1G0Y1G0YO%[QlO,5@lO#,wQ!0LrO,5@lO#-YQ!0LrO,5@lO#-aQ`O,5@kO9eQ`O,5@kO#-iQ`O,5@kO#-wQ`O'#ImO#-aQ`O,5@kOOQ!0Lb1G0w1G0wO!(tQpO,5:uO!)PQpO,5:uOOQS,5:w,5:wO#.iQdO,5:wO#.qQMhO1G2yO9kQ`O1G2yOOQ!0Lf1G0u1G0uO#/PQ!0MxO1G0uO#0UQ!0MvO,5;VOOQ!0Lh'#GW'#GWO#0rQ!0MzO'#JlO!$wQlO1G0uO#2}Q!fO'#JwO%[QlO'#JwO#3XQ`O,5:eOOQ!0Lh'#D_'#D_OOQ!0Lf1G1O1G1OO%[QlO1G1OOOQ!0Lf1G1f1G1fO#3^Q`O1G1OO#5rQ!0MxO1G1PO#5yQ!0MxO1G1PO#8aQ!0MxO1G1PO#8hQ!0MxO1G1PO#;OQ!0MxO1G1PO#=fQ!0MxO1G1PO#=mQ!0MxO1G1PO#=tQ!0MxO1G1PO#@[Q!0MxO1G1PO#@cQ!0MxO1G1PO#BpQ?MtO'#CiO#DkQ?MtO1G1`O#DrQ?MtO'#JsO#EVQ!0MxO,5?[OOQ!0Lb-E<n-E<nO#GdQ!0MxO1G1PO#HaQ!0MzO1G1POOQ!0Lf1G1P1G1PO#IdQMjO'#J|O#InQ`O,5:xO#IsQ!0MxO1G1cO#JgQ,UO,5<WO#JoQ,UO,5<XO#JwQ,UO'#FoO#K`Q`O'#FnOOQO'#KY'#KYOOQO'#In'#InO#KeQ,UO1G1nOOQ!0Lf1G1n1G1nOOOW1G1y1G1yO#KvQ?MtO'#JrO#LQQ`O,5<bO!)[QlO,5<bOOOW-E<m-E<mOOQ!0Lf1G1l1G1lO#LVQpO'#KXOOQ!0Lf,5<d,5<dO#L_QpO,5<dO#LdQMhO'#DTOOOO'#Ib'#IbO#LkO#@ItO,59mOOQ!0Lh,59m,59mO%[QlO1G2PO!8lQ`O'#IrO#LvQ`O,5<zOOQ!0Lh,5<w,5<wO!,TQMhO'#IuO#MdQMjO,5=XO!,TQMhO'#IwO#NVQMjO,5=ZO!&zQMhO,5=]OOQO1G2S1G2SO#NaQ!dO'#CrO#NtQ(CWO'#ErO$ |QpO'#GbO$!dQ!dO,5<sO$!kQ`O'#K[O9eQ`O'#K[O$!yQ`O,5<uO$#aQ!dO'#C{O!,TQMhO,5<tO$#kQ`O'#GZO$$PQ`O,5<tO$$UQ!dO'#GWO$$cQ!dO'#K]O$$mQ`O'#K]O!&zQMhO'#K]O$$rQ`O,5<xO$$wQlO'#JvO$%RQpO'#GcO#$`QpO'#GcO$%dQ`O'#GgO!3oQ`O'#GkO$%iQ!0LrO'#ItO$%tQpO,5<|OOQ!0Lp,5<|,5<|O$%{QpO'#GcO$&YQpO'#GdO$&kQpO'#GdO$&pQMjO,5=XO$'QQMjO,5=ZOOQ!0Lh,5=^,5=^O!,TQMhO,5@VO!,TQMhO,5@VO$'bQ`O'#IyO$'vQ`O,5@UO$(OQ`O,59aOOQ!0Lh,59i,59iO$(TQ`O,5@VO$)TQ$IYO,59uOOQ!0Lh'#Jp'#JpO$)vQMjO,5<kO$*iQMjO,5<mO@zQ`O,5<oOOQ!0Lh,5<p,5<pO$*sQ`O,5<vO$*xQMjO,5<{O$+YQ`O'#KPO!$wQlO1G2RO$+_Q`O1G2RO9eQ`O'#KSO9eQ`O'#EtO%[QlO'#EtO9eQ`O'#I{O$+dQ!0LrO,5@{OOQ[1G2}1G2}OOQ[1G4`1G4`OOQ!0Lf1G/|1G/|OOQ!0Lf1G/z1G/zO$-fQ!0MxO1G0UOOQ[1G2y1G2yO!&zQMhO1G2yO%[QlO1G2yO#.tQ`O1G2yO$/jQMhO'#EkOOQ!0Lb,5@T,5@TO$/wQ!0LrO,5@TOOQ[1G.u1G.uO!ByQ!0LrO1G.uO!CUQpO1G.uO!C^QMhO1G.uO$0YQ`O1G0uO$0_Q`O'#CiO$0jQ`O'#KeO$0rQ`O,5=|O$0wQ`O'#KeO$0|Q`O'#KeO$1[Q`O'#JRO$1jQ`O,5AOO$1rQ!fO1G1iOOQ!0Lf1G1k1G1kO9kQ`O1G3fO@zQ`O1G3fO$1yQ`O1G3fO$2OQ`O1G3fO!DiQ`O1G3fO9uQ!0LrO1G3fOOQ[1G3f1G3fO!EcQ`O1G3UO!&zQMhO1G3RO$2TQ`O1G3ROOQ[1G3S1G3SO!&zQMhO1G3SO$2YQ`O1G3SO$2bQpO'#HQOOQ[1G3U1G3UO!6_QpO'#I}O!EhQ!bO1G3XOOQ[1G3X1G3XOOQ[,5=r,5=rO$2jQMhO,5=tO9kQ`O,5=tO$%dQ`O,5=vO9`Q`O,5=vO!CUQpO,5=vO!C^QMhO,5=vO:dQMhO,5=vO$2xQ`O'#KcO$3TQ`O,5=wOOQ[1G.k1G.kO$3YQ!0LrO1G.kO@zQ`O1G.kO$3eQ`O1G.kO9uQ!0LrO1G.kO$5mQ!fO,5AQO$5zQ`O,5AQO9eQ`O,5AQO$6VQlO,5>PO$6^Q`O,5>POOQ[1G3i1G3iO`QlO1G3iOOQ[1G3o1G3oOOQ[1G3q1G3qO?TQ`O1G3sO$6cQlO1G3uO$:gQlO'#HtOOQ[1G3x1G3xO$:tQ`O'#HzO?YQ`O'#H|OOQ[1G4O1G4OO$:|QlO1G4OO9uQ!0LrO1G4UOOQ[1G4W1G4WOOQ!0Lb'#G_'#G_O9uQ!0LrO1G4YO9uQ!0LrO1G4[O$?TQ`O,5@bO!)[QlO,5;`O9eQ`O,5;`O?YQ`O,5:XO!)[QlO,5:XO!CUQpO,5:XO$?YQ?MtO,5:XOOQO,5;`,5;`O$?dQpO'#IeO$?zQ`O,5@aOOQ!0Lf1G/r1G/rO$@SQpO'#IkO$@^Q`O,5@pOOQ!0Lb1G0y1G0yO#$`QpO,5:XOOQO'#Ig'#IgO$@fQpO,5:qOOQ!0Ln,5:q,5:qO#(ZQ`O1G0ZOOQ!0Lf1G0Z1G0ZO%[QlO1G0ZOOQ!0Lf1G0t1G0tO?YQ`O1G0tO!CUQpO1G0tO!C^QMhO1G0tOOQ!0Lb1G5|1G5|O!ByQ!0LrO1G0^OOQO1G0m1G0mO%[QlO1G0mO$@mQ!0LrO1G0mO$@xQ!0LrO1G0mO!CUQpO1G0^ODWQpO1G0^O$AWQ!0LrO1G0mOOQO1G0^1G0^O$AlQ!0MxO1G0mPOOO-E<[-E<[POOO1G.h1G.hOOOO1G/i1G/iO$AvQ!bO,5<iO$BOQ!fO1G4jOOQO1G4p1G4pO%[QlO,5?OO$BYQ`O1G5zO$BbQ`O1G6YO$BjQ!fO1G6ZO9eQ`O,5?UO$BtQ!0MxO1G6WO%[QlO1G6WO$CUQ!0LrO1G6WO$CgQ`O1G6VO$CgQ`O1G6VO9eQ`O1G6VO$CoQ`O,5?XO9eQ`O,5?XOOQO,5?X,5?XO$DTQ`O,5?XO$+YQ`O,5?XOOQO-E<k-E<kOOQS1G0a1G0aOOQS1G0c1G0cO#.lQ`O1G0cOOQ[7+(e7+(eO!&zQMhO7+(eO%[QlO7+(eO$DcQ`O7+(eO$DnQMhO7+(eO$D|Q!0MzO,5=XO$GXQ!0MzO,5=ZO$IdQ!0MzO,5=XO$KuQ!0MzO,5=ZO$NWQ!0MzO,59uO%!]Q!0MzO,5<kO%$hQ!0MzO,5<mO%&sQ!0MzO,5<{OOQ!0Lf7+&a7+&aO%)UQ!0MxO7+&aO%)xQlO'#IfO%*VQ`O,5@cO%*_Q!fO,5@cOOQ!0Lf1G0P1G0PO%*iQ`O7+&jOOQ!0Lf7+&j7+&jO%*nQ?MtO,5:fO%[QlO7+&zO%*xQ?MtO,5:bO%+VQ?MtO,5:jO%+aQ?MtO,5:lO%+kQMhO'#IiO%+uQ`O,5@hOOQ!0Lh1G0d1G0dOOQO1G1r1G1rOOQO1G1s1G1sO%+}Q!jO,5<ZO!)[QlO,5<YOOQO-E<l-E<lOOQ!0Lf7+'Y7+'YOOOW7+'e7+'eOOOW1G1|1G1|O%,YQ`O1G1|OOQ!0Lf1G2O1G2OOOOO,59o,59oO%,_Q!dO,59oOOOO-E<`-E<`OOQ!0Lh1G/X1G/XO%,fQ!0MxO7+'kOOQ!0Lh,5?^,5?^O%-YQMhO1G2fP%-aQ`O'#IrPOQ!0Lh-E<p-E<pO%-}QMjO,5?aOOQ!0Lh-E<s-E<sO%.pQMjO,5?cOOQ!0Lh-E<u-E<uO%.zQ!dO1G2wO%/RQ!dO'#CrO%/iQMhO'#KSO$$wQlO'#JvOOQ!0Lh1G2_1G2_O%/sQ`O'#IqO%0[Q`O,5@vO%0[Q`O,5@vO%0dQ`O,5@vO%0oQ`O,5@vOOQO1G2a1G2aO%0}QMjO1G2`O$+YQ`O'#K[O!,TQMhO1G2`O%1_Q(CWO'#IsO%1lQ`O,5@wO!&zQMhO,5@wO%1tQ!dO,5@wOOQ!0Lh1G2d1G2dO%4UQ!fO'#CiO%4`Q`O,5=POOQ!0Lb,5<},5<}O%4hQpO,5<}OOQ!0Lb,5=O,5=OOCwQ`O,5<}O%4sQpO,5<}OOQ!0Lb,5=R,5=RO$+YQ`O,5=VOOQO,5?`,5?`OOQO-E<r-E<rOOQ!0Lp1G2h1G2hO#$`QpO,5<}O$$wQlO,5=PO%5RQ`O,5=OO%5^QpO,5=OO!,TQMhO'#IuO%6WQMjO1G2sO!,TQMhO'#IwO%6yQMjO1G2uO%7TQMjO1G5qO%7_QMjO1G5qOOQO,5?e,5?eOOQO-E<w-E<wOOQO1G.{1G.{O!,TQMhO1G5qO!,TQMhO1G5qO!:]QpO,59wO%[QlO,59wOOQ!0Lh,5<j,5<jO%7lQ`O1G2ZO!,TQMhO1G2bO%7qQ!0MxO7+'mOOQ!0Lf7+'m7+'mO!$wQlO7+'mO%8eQ`O,5;`OOQ!0Lb,5?g,5?gOOQ!0Lb-E<y-E<yO%8jQ!dO'#K^O#(ZQ`O7+(eO4UQ!fO7+(eO$DfQ`O7+(eO%8tQ!0MvO'#CiO%9XQ!0MvO,5=SO%9lQ`O,5=SO%9tQ`O,5=SOOQ!0Lb1G5o1G5oOOQ[7+$a7+$aO!ByQ!0LrO7+$aO!CUQpO7+$aO!$wQlO7+&aO%9yQ`O'#JQO%:bQ`O,5APOOQO1G3h1G3hO9kQ`O,5APO%:bQ`O,5APO%:jQ`O,5APOOQO,5?m,5?mOOQO-E=P-E=POOQ!0Lf7+'T7+'TO%:oQ`O7+)QO9uQ!0LrO7+)QO9kQ`O7+)QO@zQ`O7+)QO%:tQ`O7+)QOOQ[7+)Q7+)QOOQ[7+(p7+(pO%:yQ!0MvO7+(mO!&zQMhO7+(mO!E^Q`O7+(nOOQ[7+(n7+(nO!&zQMhO7+(nO%;TQ`O'#KbO%;`Q`O,5=lOOQO,5?i,5?iOOQO-E<{-E<{OOQ[7+(s7+(sO%<rQpO'#HZOOQ[1G3`1G3`O!&zQMhO1G3`O%[QlO1G3`O%<yQ`O1G3`O%=UQMhO1G3`O9uQ!0LrO1G3bO$%dQ`O1G3bO9`Q`O1G3bO!CUQpO1G3bO!C^QMhO1G3bO%=dQ`O'#JPO%=xQ`O,5@}O%>QQpO,5@}OOQ!0Lb1G3c1G3cOOQ[7+$V7+$VO@zQ`O7+$VO9uQ!0LrO7+$VO%>]Q`O7+$VO%[QlO1G6lO%[QlO1G6mO%>bQ!0LrO1G6lO%>lQlO1G3kO%>sQ`O1G3kO%>xQlO1G3kOOQ[7+)T7+)TO9uQ!0LrO7+)_O`QlO7+)aOOQ['#Kh'#KhOOQ['#JS'#JSO%?PQlO,5>`OOQ[,5>`,5>`O%[QlO'#HuO%?^Q`O'#HwOOQ[,5>f,5>fO9eQ`O,5>fOOQ[,5>h,5>hOOQ[7+)j7+)jOOQ[7+)p7+)pOOQ[7+)t7+)tOOQ[7+)v7+)vO%?cQpO1G5|O%?}Q?MtO1G0zO%@XQ`O1G0zOOQO1G/s1G/sO%@dQ?MtO1G/sO?YQ`O1G/sO!)[QlO'#DmOOQO,5?P,5?POOQO-E<c-E<cOOQO,5?V,5?VOOQO-E<i-E<iO!CUQpO1G/sOOQO-E<e-E<eOOQ!0Ln1G0]1G0]OOQ!0Lf7+%u7+%uO#(ZQ`O7+%uOOQ!0Lf7+&`7+&`O?YQ`O7+&`O!CUQpO7+&`OOQO7+%x7+%xO$AlQ!0MxO7+&XOOQO7+&X7+&XO%[QlO7+&XO%@nQ!0LrO7+&XO!ByQ!0LrO7+%xO!CUQpO7+%xO%@yQ!0LrO7+&XO%AXQ!0MxO7++rO%[QlO7++rO%AiQ`O7++qO%AiQ`O7++qOOQO1G4s1G4sO9eQ`O1G4sO%AqQ`O1G4sOOQS7+%}7+%}O#(ZQ`O<<LPO4UQ!fO<<LPO%BPQ`O<<LPOOQ[<<LP<<LPO!&zQMhO<<LPO%[QlO<<LPO%BXQ`O<<LPO%BdQ!0MzO,5?aO%DoQ!0MzO,5?cO%FzQ!0MzO1G2`O%I]Q!0MzO1G2sO%KhQ!0MzO1G2uO%MsQ!fO,5?QO%[QlO,5?QOOQO-E<d-E<dO%M}Q`O1G5}OOQ!0Lf<<JU<<JUO%NVQ?MtO1G0uO&!^Q?MtO1G1PO&!eQ?MtO1G1PO&$fQ?MtO1G1PO&$mQ?MtO1G1PO&&nQ?MtO1G1PO&(oQ?MtO1G1PO&(vQ?MtO1G1PO&(}Q?MtO1G1PO&+OQ?MtO1G1PO&+VQ?MtO1G1PO&+^Q!0MxO<<JfO&-UQ?MtO1G1PO&.RQ?MvO1G1PO&/UQ?MvO'#JlO&1[Q?MtO1G1cO&1iQ?MtO1G0UO&1sQMjO,5?TOOQO-E<g-E<gO!)[QlO'#FqOOQO'#KZ'#KZOOQO1G1u1G1uO&1}Q`O1G1tO&2SQ?MtO,5?[OOOW7+'h7+'hOOOO1G/Z1G/ZO&2^Q!dO1G4xOOQ!0Lh7+(Q7+(QP!&zQMhO,5?^O!,TQMhO7+(cO&2eQ`O,5?]O9eQ`O,5?]O$+YQ`O,5?]OOQO-E<o-E<oO&2sQ`O1G6bO&2sQ`O1G6bO&2{Q`O1G6bO&3WQMjO7+'zO&3hQ!dO,5?_O&3rQ`O,5?_O!&zQMhO,5?_OOQO-E<q-E<qO&3wQ!dO1G6cO&4RQ`O1G6cO&4ZQ`O1G2kO!&zQMhO1G2kOOQ!0Lb1G2i1G2iOOQ!0Lb1G2j1G2jO%4hQpO1G2iO!CUQpO1G2iOCwQ`O1G2iOOQ!0Lb1G2q1G2qO&4`QpO1G2iO&4nQ`O1G2kO$+YQ`O1G2jOCwQ`O1G2jO$$wQlO1G2kO&4vQ`O1G2jO&5jQMjO,5?aOOQ!0Lh-E<t-E<tO&6]QMjO,5?cOOQ!0Lh-E<v-E<vO!,TQMhO7++]O&6gQMjO7++]O&6qQMjO7++]OOQ!0Lh1G/c1G/cO&7OQ`O1G/cOOQ!0Lh7+'u7+'uO&7TQMjO7+'|O&7eQ!0MxO<<KXOOQ!0Lf<<KX<<KXO&8XQ`O1G0zO!&zQMhO'#IzO&8^Q`O,5@xO&:`Q!fO<<LPO!&zQMhO1G2nO&:gQ!0LrO1G2nOOQ[<<G{<<G{O!ByQ!0LrO<<G{O&:xQ!0MxO<<I{OOQ!0Lf<<I{<<I{OOQO,5?l,5?lO&;lQ`O,5?lO&;qQ`O,5?lOOQO-E=O-E=OO&<PQ`O1G6kO&<PQ`O1G6kO9kQ`O1G6kO@zQ`O<<LlOOQ[<<Ll<<LlO&<XQ`O<<LlO9uQ!0LrO<<LlO9kQ`O<<LlOOQ[<<LX<<LXO%:yQ!0MvO<<LXOOQ[<<LY<<LYO!E^Q`O<<LYO&<^QpO'#I|O&<iQ`O,5@|O!)[QlO,5@|OOQ[1G3W1G3WOOQO'#JO'#JOO9uQ!0LrO'#JOO&<qQpO,5=uOOQ[,5=u,5=uO&<xQpO'#EgO&=PQpO'#GeO&=UQ`O7+(zO&=ZQ`O7+(zOOQ[7+(z7+(zO!&zQMhO7+(zO%[QlO7+(zO&=cQ`O7+(zOOQ[7+(|7+(|O9uQ!0LrO7+(|O$%dQ`O7+(|O9`Q`O7+(|O!CUQpO7+(|O&=nQ`O,5?kOOQO-E<}-E<}OOQO'#H^'#H^O&=yQ`O1G6iO9uQ!0LrO<<GqOOQ[<<Gq<<GqO@zQ`O<<GqO&>RQ`O7+,WO&>WQ`O7+,XO%[QlO7+,WO%[QlO7+,XOOQ[7+)V7+)VO&>]Q`O7+)VO&>bQlO7+)VO&>iQ`O7+)VOOQ[<<Ly<<LyOOQ[<<L{<<L{OOQ[-E=Q-E=QOOQ[1G3z1G3zO&>nQ`O,5>aOOQ[,5>c,5>cO&>sQ`O1G4QO9eQ`O7+&fO!)[QlO7+&fOOQO7+%_7+%_O&>xQ?MtO1G6ZO?YQ`O7+%_OOQ!0Lf<<Ia<<IaOOQ!0Lf<<Iz<<IzO?YQ`O<<IzOOQO<<Is<<IsO$AlQ!0MxO<<IsO%[QlO<<IsOOQO<<Id<<IdO!ByQ!0LrO<<IdO&?SQ!0LrO<<IsO&?_Q!0MxO<= ^O&?oQ`O<= ]OOQO7+*_7+*_O9eQ`O7+*_OOQ[ANAkANAkO&?wQ!fOANAkO!&zQMhOANAkO#(ZQ`OANAkO4UQ!fOANAkO&@OQ`OANAkO%[QlOANAkO&@WQ!0MzO7+'zO&BiQ!0MzO,5?aO&DtQ!0MzO,5?cO&GPQ!0MzO7+'|O&IbQ!fO1G4lO&IlQ?MtO7+&aO&KpQ?MvO,5=XO&MwQ?MvO,5=ZO&NXQ?MvO,5=XO&NiQ?MvO,5=ZO&NyQ?MvO,59uO'#PQ?MvO,5<kO'%SQ?MvO,5<mO''hQ?MvO,5<{O')^Q?MtO7+'kO')kQ?MtO7+'mO')xQ`O,5<]OOQO7+'`7+'`OOQ!0Lh7+*d7+*dO')}QMjO<<K}OOQO1G4w1G4wO'*UQ`O1G4wO'*aQ`O1G4wO'*oQ`O7++|O'*oQ`O7++|O!&zQMhO1G4yO'*wQ!dO1G4yO'+RQ`O7++}O'+ZQ`O7+(VO'+fQ!dO7+(VOOQ!0Lb7+(T7+(TOOQ!0Lb7+(U7+(UO!CUQpO7+(TOCwQ`O7+(TO'+pQ`O7+(VO!&zQMhO7+(VO$+YQ`O7+(UO'+uQ`O7+(VOCwQ`O7+(UO'+}QMjO<<NwO!,TQMhO<<NwOOQ!0Lh7+$}7+$}O',XQ!dO,5?fOOQO-E<x-E<xO',cQ!0MvO7+(YO!&zQMhO7+(YOOQ[AN=gAN=gO9kQ`O1G5WOOQO1G5W1G5WO',sQ`O1G5WO',xQ`O7+,VO',xQ`O7+,VO9uQ!0LrOANBWO@zQ`OANBWOOQ[ANBWANBWO'-QQ`OANBWOOQ[ANAsANAsOOQ[ANAtANAtO'-VQ`O,5?hOOQO-E<z-E<zO'-bQ?MtO1G6hOOQO,5?j,5?jOOQO-E<|-E<|OOQ[1G3a1G3aO'-lQ`O,5=POOQ[<<Lf<<LfO!&zQMhO<<LfO&=UQ`O<<LfO'-qQ`O<<LfO%[QlO<<LfOOQ[<<Lh<<LhO9uQ!0LrO<<LhO$%dQ`O<<LhO9`Q`O<<LhO'-yQpO1G5VO'.UQ`O7+,TOOQ[AN=]AN=]O9uQ!0LrOAN=]OOQ[<= r<= rOOQ[<= s<= sO'.^Q`O<= rO'.cQ`O<= sOOQ[<<Lq<<LqO'.hQ`O<<LqO'.mQlO<<LqOOQ[1G3{1G3{O?YQ`O7+)lO'.tQ`O<<JQO'/PQ?MtO<<JQOOQO<<Hy<<HyOOQ!0LfAN?fAN?fOOQOAN?_AN?_O$AlQ!0MxOAN?_OOQOAN?OAN?OO%[QlOAN?_OOQO<<My<<MyOOQ[G27VG27VO!&zQMhOG27VO#(ZQ`OG27VO'/ZQ!fOG27VO4UQ!fOG27VO'/bQ`OG27VO'/jQ?MtO<<JfO'/wQ?MvO1G2`O'1mQ?MvO,5?aO'3pQ?MvO,5?cO'5sQ?MvO1G2sO'7vQ?MvO1G2uO'9yQ?MtO<<KXO':WQ?MtO<<I{OOQO1G1w1G1wO!,TQMhOANAiOOQO7+*c7+*cO':eQ`O7+*cO':pQ`O<= hO':xQ!dO7+*eOOQ!0Lb<<Kq<<KqO$+YQ`O<<KqOCwQ`O<<KqO';SQ`O<<KqO!&zQMhO<<KqOOQ!0Lb<<Ko<<KoO!CUQpO<<KoO';_Q!dO<<KqOOQ!0Lb<<Kp<<KpO';iQ`O<<KqO!&zQMhO<<KqO$+YQ`O<<KpO';nQMjOANDcO';xQ!0MvO<<KtOOQO7+*r7+*rO9kQ`O7+*rO'<YQ`O<= qOOQ[G27rG27rO9uQ!0LrOG27rO@zQ`OG27rO!)[QlO1G5SO'<bQ`O7+,SO'<jQ`O1G2kO&=UQ`OANBQOOQ[ANBQANBQO!&zQMhOANBQO'<oQ`OANBQOOQ[ANBSANBSO9uQ!0LrOANBSO$%dQ`OANBSOOQO'#H_'#H_OOQO7+*q7+*qOOQ[G22wG22wOOQ[ANE^ANE^OOQ[ANE_ANE_OOQ[ANB]ANB]O'<wQ`OANB]OOQ[<<MW<<MWO!)[QlOAN?lOOQOG24yG24yO$AlQ!0MxOG24yO#(ZQ`OLD,qOOQ[LD,qLD,qO!&zQMhOLD,qO'<|Q!fOLD,qO'=TQ?MvO7+'zO'>yQ?MvO,5?aO'@|Q?MvO,5?cO'CPQ?MvO7+'|O'DuQMjOG27TOOQO<<M}<<M}OOQ!0LbANA]ANA]O$+YQ`OANA]OCwQ`OANA]O'EVQ!dOANA]OOQ!0LbANAZANAZO'E^Q`OANA]O!&zQMhOANA]O'EiQ!dOANA]OOQ!0LbANA[ANA[OOQO<<N^<<N^OOQ[LD-^LD-^O9uQ!0LrOLD-^O'EsQ?MtO7+*nOOQO'#Gf'#GfOOQ[G27lG27lO&=UQ`OG27lO!&zQMhOG27lOOQ[G27nG27nO9uQ!0LrOG27nOOQ[G27wG27wO'E}Q?MtOG25WOOQOLD*eLD*eOOQ[!$(!]!$(!]O#(ZQ`O!$(!]O!&zQMhO!$(!]O'FXQ!0MzOG27TOOQ!0LbG26wG26wO$+YQ`OG26wO'HjQ`OG26wOCwQ`OG26wO'HuQ!dOG26wO!&zQMhOG26wOOQ[!$(!x!$(!xOOQ[LD-WLD-WO&=UQ`OLD-WOOQ[LD-YLD-YOOQ[!)9Ew!)9EwO#(ZQ`O!)9EwOOQ!0LbLD,cLD,cO$+YQ`OLD,cOCwQ`OLD,cO'H|Q`OLD,cO'IXQ!dOLD,cOOQ[!$(!r!$(!rOOQ[!.K;c!.K;cO'I`Q?MvOG27TOOQ!0Lb!$( }!$( }O$+YQ`O!$( }OCwQ`O!$( }O'KUQ`O!$( }OOQ!0Lb!)9Ei!)9EiO$+YQ`O!)9EiOCwQ`O!)9EiOOQ!0Lb!.K;T!.K;TO$+YQ`O!.K;TOOQ!0Lb!4/0o!4/0oO!)[QlO'#DzO1PQ`O'#EXO'KaQ!fO'#JrO'KhQ!L^O'#DvO'KoQlO'#EOO'KvQ!fO'#CiO'N^Q!fO'#CiO!)[QlO'#EQO'NnQlO,5;ZO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO,5;eO!)[QlO'#IpO(!qQ`O,5<iO!)[QlO,5;eO(!yQMhO,5;eO($dQMhO,5;eO!)[QlO,5;wO!&zQMhO'#GmO(!yQMhO'#GmO!&zQMhO'#GoO(!yQMhO'#GoO1SQ`O'#DZO1SQ`O'#DZO!&zQMhO'#GPO(!yQMhO'#GPO!&zQMhO'#GRO(!yQMhO'#GRO!&zQMhO'#GaO(!yQMhO'#GaO!)[QlO,5:jO($kQpO'#D_O($uQpO'#JvO!)[QlO,5@oO'NnQlO1G0uO(%PQ?MtO'#CiO!)[QlO1G2PO!&zQMhO'#IuO(!yQMhO'#IuO!&zQMhO'#IwO(!yQMhO'#IwO(%ZQ!dO'#CrO!&zQMhO,5<tO(!yQMhO,5<tO'NnQlO1G2RO!)[QlO7+&zO!&zQMhO1G2`O(!yQMhO1G2`O!&zQMhO'#IuO(!yQMhO'#IuO!&zQMhO'#IwO(!yQMhO'#IwO!&zQMhO1G2bO(!yQMhO1G2bO'NnQlO7+'mO'NnQlO7+&aO!&zQMhOANAiO(!yQMhOANAiO(%nQ`O'#EoO(%sQ`O'#EoO(%{Q`O'#F]O(&QQ`O'#EyO(&VQ`O'#KTO(&bQ`O'#KRO(&mQ`O,5;ZO(&rQMjO,5<eO(&yQ`O'#GYO('OQ`O'#GYO('TQ`O,5<eO(']Q`O,5<gO('eQ`O,5;ZO('mQ?MtO1G1`O('tQ`O,5<tO('yQ`O,5<tO((OQ`O,5<vO((TQ`O,5<vO((YQ`O1G2RO((_Q`O1G0uO((dQMjO<<K}O((kQMjO<<K}O((rQMhO'#F|O9`Q`O'#F{OAuQ`O'#EnO!)[QlO,5;tO!3oQ`O'#GYO!3oQ`O'#GYO!3oQ`O'#G[O!3oQ`O'#G[O!,TQMhO7+(cO!,TQMhO7+(cO%.zQ!dO1G2wO%.zQ!dO1G2wO!&zQMhO,5=]O!&zQMhO,5=]",stateData:"()x~O'|OS'}OSTOS(ORQ~OPYOQYOSfOY!VOaqOdzOeyOl!POpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_XO!iuO!lZO!oYO!pYO!qYO!svO!uwO!xxO!|]O$W|O$niO%h}O%j!QO%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO%y!UO&W!WO&^!XO&`!YO&b!ZO&d![O&g!]O&m!^O&s!_O&u!`O&w!aO&y!bO&{!cO(TSO(VTO(YUO(aVO(o[O~OWtO~P`OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oa!wOs!nO!S!oO!b!yO!c!vO!d!vO!|<VO#T!pO#U!pO#V!xO#W!pO#X!pO#[!zO#]!zO(U!lO(VTO(YUO(e!mO(o!sO~O(O!{O~OP]XR]X[]Xa]Xj]Xr]X!Q]X!S]X!]]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X'z]X(a]X(r]X(y]X(z]X~O!g%RX~P(qO_!}O(V#PO(W!}O(X#PO~O_#QO(X#PO(Y#PO(Z#QO~Ox#SO!U#TO(b#TO(c#VO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T<ZO(VTO(YUO(aVO(o[O~O![#ZO!]#WO!Y(hP!Y(vP~P+}O!^#cO~P`OPYOQYOSfOd!jOe!iOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(VTO(YUO(aVO(o[O~Op#mO![#iO!|]O#i#lO#j#iO(T<[O!k(sP~P.iO!l#oO(T#nO~O!x#sO!|]O%h#tO~O#k#uO~O!g#vO#k#uO~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!]$_O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~Oa(fX'z(fX'w(fX!k(fX!Y(fX!_(fX%i(fX!g(fX~P1qO#S$dO#`$eO$Q$eOP(gXR(gX[(gXj(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX!_(gX%i(gX~Oa(gX'z(gX'w(gX!Y(gX!k(gXv(gX!g(gX~P4UO#`$eO~O$]$hO$_$gO$f$mO~OSfO!_$nO$i$oO$k$qO~Oh%VOj%dOk%dOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T$sO(VTO(YUO(a$uO(y$}O(z%POg(^P~Ol%[O~P7eO!l%eO~O!S%hO!_%iO(T%gO~O!g%mO~Oa%nO'z%nO~O!Q%rO~P%[O(U!lO~P%[O%n%vO~P%[Oh%VO!l%eO(T%gO(U!lO~Oe%}O!l%eO(T%gO~Oj$RO~O!_&PO(T%gO(U!lO(VTO(YUO`)WP~O!Q&SO!l&RO%j&VO&T&WO~P;SO!x#sO~O%s&YO!S)SX!_)SX(T)SX~O(T&ZO~Ol!PO!u&`O%j!QO%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO~Od&eOe&dO!x&bO%h&cO%{&aO~P<bOd&hOeyOl!PO!_&gO!u&`O!xxO!|]O%h}O%l!OO%m!OO%n!OO%q!RO%s!SO%v!TO%w!TO%y!UO~Ob&kO#`&nO%j&iO(U!lO~P=gO!l&oO!u&sO~O!l#oO~O!_XO~Oa%nO'x&{O'z%nO~Oa%nO'x'OO'z%nO~Oa%nO'x'QO'z%nO~O'w]X!Y]Xv]X!k]X&[]X!_]X%i]X!g]X~P(qO!b'_O!c'WO!d'WO(U!lO(VTO(YUO~Os'UO!S'TO!['XO(e'SO!^(iP!^(xP~P@nOn'bO!_'`O(T%gO~Oe'gO!l%eO(T%gO~O!Q&SO!l&RO~Os!nO!S!oO!|<VO#T!pO#U!pO#W!pO#X!pO(U!lO(VTO(YUO(e!mO(o!sO~O!b'mO!c'lO!d'lO#V!pO#['nO#]'nO~PBYOa%nOh%VO!g#vO!l%eO'z%nO(r'pO~O!p'tO#`'rO~PChOs!nO!S!oO(VTO(YUO(e!mO(o!sO~O!_XOs(mX!S(mX!b(mX!c(mX!d(mX!|(mX#T(mX#U(mX#V(mX#W(mX#X(mX#[(mX#](mX(U(mX(V(mX(Y(mX(e(mX(o(mX~O!c'lO!d'lO(U!lO~PDWO(P'xO(Q'xO(R'zO~O_!}O(V'|O(W!}O(X'|O~O_#QO(X'|O(Y'|O(Z#QO~Ov(OO~P%[Ox#SO!U#TO(b#TO(c(RO~O![(TO!Y'WX!Y'^X!]'WX!]'^X~P+}O!](VO!Y(hX~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!](VO!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~O!Y(hX~PHRO!Y([O~O!Y(uX!](uX!g(uX!k(uX(r(uX~O#`(uX#k#dX!^(uX~PJUO#`(]O!Y(wX!](wX~O!](^O!Y(vX~O!Y(aO~O#`$eO~PJUO!^(bO~P`OR#zO!Q#yO!S#{O!l#xO(aVOP!na[!naj!nar!na!]!na!p!na#R!na#n!na#o!na#p!na#q!na#r!na#s!na#t!na#u!na#v!na#x!na#z!na#{!na(r!na(y!na(z!na~Oa!na'z!na'w!na!Y!na!k!nav!na!_!na%i!na!g!na~PKlO!k(cO~O!g#vO#`(dO(r'pO!](tXa(tX'z(tX~O!k(tX~PNXO!S%hO!_%iO!|]O#i(iO#j(hO(T%gO~O!](jO!k(sX~O!k(lO~O!S%hO!_%iO#j(hO(T%gO~OP(gXR(gX[(gXj(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX~O!g#vO!k(gX~P! uOR(nO!Q(mO!l#xO#S$dO!|!{a!S!{a~O!x!{a%h!{a!_!{a#i!{a#j!{a(T!{a~P!#vO!x(rO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_XO!iuO!lZO!oYO!pYO!qYO!svO!u!gO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<sO!S${O!_$|O!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~O#k(xO~O![(zO!k(kP~P%[O(e(|O(o[O~O!S)OO!l#xO(e(|O(o[O~OP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_!eO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(T)]O(VTO(YUO(aVO(o[O~O!]$_Oa$qa'z$qa'w$qa!k$qa!Y$qa!_$qa%i$qa!g$qa~Ol)dO~P!&zOh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Og(pP~P!,TO!Q)iO!g)hO!_$^X$Z$^X$]$^X$_$^X$f$^X~O!g)hO!_({X$Z({X$]({X$_({X$f({X~O!Q)iO~P!.^O!Q)iO!_({X$Z({X$]({X$_({X$f({X~O!_)kO$Z)oO$])jO$_)jO$f)pO~O![)sO~P!)[O$]$hO$_$gO$f)wO~On$zX!Q$zX#S$zX'y$zX(y$zX(z$zX~OgmXg$zXnmX!]mX#`mX~P!0SOx)yO(b)zO(c)|O~On*VO!Q*OO'y*PO(y$}O(z%PO~Og)}O~P!1WOg*WO~Oh%VOr%XOs$tOt$tOz%YO|%ZO!O<sO!S*YO!_*ZO!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(VTO(YUO(a$uO(y$}O(z%PO~Op*`O}O(T&ZO~O!l+SO~O(T(vO~Op+WO!S%hO![#iO!_%iO!|]O#i#lO#j#iO(T%gO!k(sP~O!g#vO#k+XO~O!S%hOTX'z)TX~OP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO#z$WO#{$XO(aVO(r$YO(y#|O(z#}O~Oa!ja!]!ja'z!ja'w!ja!Y!ja!k!jav!ja!_!ja%i!ja!g!ja~P!:tOR#zO!Q#yO!S#{O!l#xO(aVOP!ra[!raj!rar!ra!]!ra!p!ra#R!ra#n!ra#o!ra#p!ra#q!ra#r!ra#s!ra#t!ra#u!ra#v!ra#x!ra#z!ra#{!ra(r!ra(y!ra(z!ra~Oa!ra'z!ra'w!ra!Y!ra!k!rav!ra!_!ra%i!ra!g!ra~P!=[OR#zO!Q#yO!S#{O!l#xO(aVOP!ta[!taj!tar!ta!]!ta!p!ta#R!ta#n!ta#o!ta#p!ta#q!ta#r!ta#s!ta#t!ta#u!ta#v!ta#x!ta#z!ta#{!ta(r!ta(y!ta(z!ta~Oa!ta'z!ta'w!ta!Y!ta!k!tav!ta!_!ta%i!ta!g!ta~P!?rOh%VOn+gO!_'`O%i+fO~O!g+iOa(]X!_(]X'z(]X!](]X~Oa%nO!_XO'z%nO~Oh%VO!l%eO~Oh%VO!l%eO(T%gO~O!g#vO#k(xO~Ob+tO%j+uO(T+qO(VTO(YUO!^)XP~O!]+vO`)WX~O[+zO~O`+{O~O!_&PO(T%gO(U!lO`)WP~O%j,OO~P;SOh%VO#`,SO~Oh%VOn,VO!_$|O~O!_,XO~O!Q,ZO!_XO~O%n%vO~O!x,`O~Oe,eO~Ob,fO(T#nO(VTO(YUO!^)VP~Oe%}O~O%j!QO(T&ZO~P=gO[,kO`,jO~OPYOQYOSfOdzOeyOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!iuO!lZO!oYO!pYO!qYO!svO!xxO!|]O$niO%h}O(VTO(YUO(aVO(o[O~O!_!eO!u!gO$W!kO(T!dO~P!FyO`,jOa%nO'z%nO~OPYOQYOSfOd!jOe!iOpkOrYOskOtkOzkO|YO!OYO!SWO!WkO!XkO!_!eO!iuO!lZO!oYO!pYO!qYO!svO!x!hO$W!kO$niO(T!dO(VTO(YUO(aVO(o[O~Oa,pOl!OO!uwO%l!OO%m!OO%n!OO~P!IcO!l&oO~O&^,vO~O!_,xO~O&o,zO&q,{OP&laQ&laS&laY&laa&lad&lae&lal&lap&lar&las&lat&laz&la|&la!O&la!S&la!W&la!X&la!_&la!i&la!l&la!o&la!p&la!q&la!s&la!u&la!x&la!|&la$W&la$n&la%h&la%j&la%l&la%m&la%n&la%q&la%s&la%v&la%w&la%y&la&W&la&^&la&`&la&b&la&d&la&g&la&m&la&s&la&u&la&w&la&y&la&{&la'w&la(T&la(V&la(Y&la(a&la(o&la!^&la&e&lab&la&j&la~O(T-QO~Oh!eX!]!RX!^!RX!g!RX!g!eX!l!eX#`!RX~O!]!eX!^!eX~P#!iO!g-VO#`-UOh(jX!]#hX!^#hX!g(jX!l(jX~O!](jX!^(jX~P##[Oh%VO!g-XO!l%eO!]!aX!^!aX~Os!nO!S!oO(VTO(YUO(e!mO~OP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_!eO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(VTO(YUO(aVO(o[O~O(T=QO~P#$qO!]-]O!^(iX~O!^-_O~O!g-VO#`-UO!]#hX!^#hX~O!]-`O!^(xX~O!^-bO~O!c-cO!d-cO(U!lO~P#$`O!^-fO~P'_On-iO!_'`O~O!Y-nO~Os!{a!b!{a!c!{a!d!{a#T!{a#U!{a#V!{a#W!{a#X!{a#[!{a#]!{a(U!{a(V!{a(Y!{a(e!{a(o!{a~P!#vO!p-sO#`-qO~PChO!c-uO!d-uO(U!lO~PDWOa%nO#`-qO'z%nO~Oa%nO!g#vO#`-qO'z%nO~Oa%nO!g#vO!p-sO#`-qO'z%nO(r'pO~O(P'xO(Q'xO(R-zO~Ov-{O~O!Y'Wa!]'Wa~P!:tO![.PO!Y'WX!]'WX~P%[O!](VO!Y(ha~O!Y(ha~PHRO!](^O!Y(va~O!S%hO![.TO!_%iO(T%gO!Y'^X!]'^X~O#`.VO!](ta!k(taa(ta'z(ta~O!g#vO~P#,wO!](jO!k(sa~O!S%hO!_%iO#j.ZO(T%gO~Op.`O!S%hO![.]O!_%iO!|]O#i._O#j.]O(T%gO!]'aX!k'aX~OR.dO!l#xO~Oh%VOn.gO!_'`O%i.fO~Oa#ci!]#ci'z#ci'w#ci!Y#ci!k#civ#ci!_#ci%i#ci!g#ci~P!:tOn>]O!Q*OO'y*PO(y$}O(z%PO~O#k#_aa#_a#`#_a'z#_a!]#_a!k#_a!_#_a!Y#_a~P#/sO#k(`XP(`XR(`X[(`Xa(`Xj(`Xr(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X'z(`X(a(`X(r(`X!k(`X!Y(`X'w(`Xv(`X!_(`X%i(`X!g(`X~P!6kO!].tO!k(kX~P!:tO!k.wO~O!Y.yO~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mia#mij#mir#mi!]#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#n#mi~P#3cO#n$OO~P#3cOP$[OR#zOr$aO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO[#mia#mij#mi!]#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#r#mi~P#6QO#r$QO~P#6QOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO(aVOa#mi!]#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#v#mi~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO(aVO(z#}Oa#mi!]#mi#z#mi#{#mi'z#mi(r#mi(y#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#x$UO~P#;VO#x#mi~P#;VO#v$SO~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO(aVO(y#|O(z#}Oa#mi!]#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#z#mi~P#={O#z$WO~P#={OP]XR]X[]Xj]Xr]X!Q]X!S]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X!]]X!^]X~O$O]X~P#@jOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO#x<eO#z<gO#{<hO(aVO(r$YO(y#|O(z#}O~O$O.{O~P#BwO#S$dO#`<nO$Q<nO$O(gX!^(gX~P! uOa'da!]'da'z'da'w'da!k'da!Y'dav'da!_'da%i'da!g'da~P!:tO[#mia#mij#mir#mi!]#mi#R#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO(y#mi(z#mi~P#EyOn>]O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P#EyO!]/POg(pX~P!1WOg/RO~Oa$Pi!]$Pi'z$Pi'w$Pi!Y$Pi!k$Piv$Pi!_$Pi%i$Pi!g$Pi~P!:tO$]/SO$_/SO~O$]/TO$_/TO~O!g)hO#`/UO!_$cX$Z$cX$]$cX$_$cX$f$cX~O![/VO~O!_)kO$Z/XO$])jO$_)jO$f/YO~O!]<iO!^(fX~P#BwO!^/ZO~O!g)hO$f({X~O$f/]O~Ov/^O~P!&zOx)yO(b)zO(c/aO~O!S/dO~O(y$}On%aa!Q%aa'y%aa(z%aa!]%aa#`%aa~Og%aa$O%aa~P#L{O(z%POn%ca!Q%ca'y%ca(y%ca!]%ca#`%ca~Og%ca$O%ca~P#MnO!]fX!gfX!kfX!k$zX(rfX~P!0SOp%WOPP~P!1uOr*sO!b*qO!c*kO!d*kO!l*bO#[*rO%`*mO(U!lO(VTO(YUO~Os<}O!S/nO![+[O!^*pO(e<|O!^(xP~P$ [O!k/oO~P#/sO!]/pO!g#vO(r'pO!k)OX~O!k/uO~OnoX!QoX'yoX(yoX(zoX~O!g#vO!koX~P$#OOp/wO!S%hO![*^O!_%iO(T%gO!k)OP~O#k/xO~O!Y$zX!]$zX!g%RX~P!0SO!]/yO!Y)PX~P#/sO!g/{O~O!Y/}O~OpkO(T0OO~P.iOh%VOr0TO!g#vO!l%eO(r'pO~O!g+iO~Oa%nO!]0XO'z%nO~O!^0ZO~P!5iO!c0[O!d0[O(U!lO~P#$`Os!nO!S0]O(VTO(YUO(e!mO~O#[0_O~Og%aa!]%aa#`%aa$O%aa~P!1WOg%ca!]%ca#`%ca$O%ca~P!1WOj%dOk%dOl%dO(T&ZOg'mX!]'mX~O!]*yOg(^a~Og0hO~On0jO#`0iOg(_a!](_a~OR0kO!Q0kO!S0lO#S$dOn}a'y}a(y}a(z}a!]}a#`}a~Og}a$O}a~P$(cO!Q*OO'y*POn$sa(y$sa(z$sa!]$sa#`$sa~Og$sa$O$sa~P$)_O!Q*OO'y*POn$ua(y$ua(z$ua!]$ua#`$ua~Og$ua$O$ua~P$*QO#k0oO~Og%Ta!]%Ta#`%Ta$O%Ta~P!1WO!g#vO~O#k0rO~O!]+^Oa)Ta'z)Ta~OR#zO!Q#yO!S#{O!l#xO(aVOP!ri[!rij!rir!ri!]!ri!p!ri#R!ri#n!ri#o!ri#p!ri#q!ri#r!ri#s!ri#t!ri#u!ri#v!ri#x!ri#z!ri#{!ri(r!ri(y!ri(z!ri~Oa!ri'z!ri'w!ri!Y!ri!k!riv!ri!_!ri%i!ri!g!ri~P$+oOh%VOr%XOs$tOt$tOz%YO|%ZO!O<sO!S${O!_$|O!i>VO!l$xO#j<yO$W%`O$t<uO$v<wO$y%aO(VTO(YUO(a$uO(y$}O(z%PO~Op0{O%]0|O(T0zO~P$.VO!g+iOa(]a!_(]a'z(]a!](]a~O#k1SO~O[]X!]fX!^fX~O!]1TO!^)XX~O!^1VO~O[1WO~Ob1YO(T+qO(VTO(YUO~O!_&PO(T%gO`'uX!]'uX~O!]+vO`)Wa~O!k1]O~P!:tO[1`O~O`1aO~O#`1fO~On1iO!_$|O~O(e(|O!^)UP~Oh%VOn1rO!_1oO%i1qO~O[1|O!]1zO!^)VX~O!^1}O~O`2POa%nO'z%nO~O(T#nO(VTO(YUO~O#S$dO#`$eO$Q$eOP(gXR(gX[(gXr(gX!Q(gX!S(gX!](gX!l(gX!p(gX#R(gX#n(gX#o(gX#p(gX#q(gX#r(gX#s(gX#t(gX#u(gX#v(gX#x(gX#z(gX#{(gX(a(gX(r(gX(y(gX(z(gX~Oj2SO&[2TOa(gX~P$3pOj2SO#`$eO&[2TO~Oa2VO~P%[Oa2XO~O&e2[OP&ciQ&ciS&ciY&cia&cid&cie&cil&cip&cir&cis&cit&ciz&ci|&ci!O&ci!S&ci!W&ci!X&ci!_&ci!i&ci!l&ci!o&ci!p&ci!q&ci!s&ci!u&ci!x&ci!|&ci$W&ci$n&ci%h&ci%j&ci%l&ci%m&ci%n&ci%q&ci%s&ci%v&ci%w&ci%y&ci&W&ci&^&ci&`&ci&b&ci&d&ci&g&ci&m&ci&s&ci&u&ci&w&ci&y&ci&{&ci'w&ci(T&ci(V&ci(Y&ci(a&ci(o&ci!^&cib&ci&j&ci~Ob2bO!^2`O&j2aO~P`O!_XO!l2dO~O&q,{OP&liQ&liS&liY&lia&lid&lie&lil&lip&lir&lis&lit&liz&li|&li!O&li!S&li!W&li!X&li!_&li!i&li!l&li!o&li!p&li!q&li!s&li!u&li!x&li!|&li$W&li$n&li%h&li%j&li%l&li%m&li%n&li%q&li%s&li%v&li%w&li%y&li&W&li&^&li&`&li&b&li&d&li&g&li&m&li&s&li&u&li&w&li&y&li&{&li'w&li(T&li(V&li(Y&li(a&li(o&li!^&li&e&lib&li&j&li~O!Y2jO~O!]!aa!^!aa~P#BwOs!nO!S!oO![2pO(e!mO!]'XX!^'XX~P@nO!]-]O!^(ia~O!]'_X!^'_X~P!9|O!]-`O!^(xa~O!^2wO~P'_Oa%nO#`3QO'z%nO~Oa%nO!g#vO#`3QO'z%nO~Oa%nO!g#vO!p3UO#`3QO'z%nO(r'pO~Oa%nO'z%nO~P!:tO!]$_Ov$qa~O!Y'Wi!]'Wi~P!:tO!](VO!Y(hi~O!](^O!Y(vi~O!Y(wi!](wi~P!:tO!](ti!k(tia(ti'z(ti~P!:tO#`3WO!](ti!k(tia(ti'z(ti~O!](jO!k(si~O!S%hO!_%iO!|]O#i3]O#j3[O(T%gO~O!S%hO!_%iO#j3[O(T%gO~On3dO!_'`O%i3cO~Oh%VOn3dO!_'`O%i3cO~O#k%aaP%aaR%aa[%aaa%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa'z%aa(a%aa(r%aa!k%aa!Y%aa'w%aav%aa!_%aa%i%aa!g%aa~P#L{O#k%caP%caR%ca[%caa%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca'z%ca(a%ca(r%ca!k%ca!Y%ca'w%cav%ca!_%ca%i%ca!g%ca~P#MnO#k%aaP%aaR%aa[%aaa%aaj%aar%aa!S%aa!]%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa'z%aa(a%aa(r%aa!k%aa!Y%aa'w%aa#`%aav%aa!_%aa%i%aa!g%aa~P#/sO#k%caP%caR%ca[%caa%caj%car%ca!S%ca!]%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca'z%ca(a%ca(r%ca!k%ca!Y%ca'w%ca#`%cav%ca!_%ca%i%ca!g%ca~P#/sO#k}aP}a[}aa}aj}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a'z}a(a}a(r}a!k}a!Y}a'w}av}a!_}a%i}a!g}a~P$(cO#k$saP$saR$sa[$saa$saj$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa'z$sa(a$sa(r$sa!k$sa!Y$sa'w$sav$sa!_$sa%i$sa!g$sa~P$)_O#k$uaP$uaR$ua[$uaa$uaj$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua'z$ua(a$ua(r$ua!k$ua!Y$ua'w$uav$ua!_$ua%i$ua!g$ua~P$*QO#k%TaP%TaR%Ta[%Taa%Taj%Tar%Ta!S%Ta!]%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta'z%Ta(a%Ta(r%Ta!k%Ta!Y%Ta'w%Ta#`%Tav%Ta!_%Ta%i%Ta!g%Ta~P#/sOa#cq!]#cq'z#cq'w#cq!Y#cq!k#cqv#cq!_#cq%i#cq!g#cq~P!:tO![3lO!]'YX!k'YX~P%[O!].tO!k(ka~O!].tO!k(ka~P!:tO!Y3oO~O$O!na!^!na~PKlO$O!ja!]!ja!^!ja~P#BwO$O!ra!^!ra~P!=[O$O!ta!^!ta~P!?rOg']X!]']X~P!,TO!]/POg(pa~OSfO!_4TO$d4UO~O!^4YO~Ov4ZO~P#/sOa$mq!]$mq'z$mq'w$mq!Y$mq!k$mqv$mq!_$mq%i$mq!g$mq~P!:tO!Y4]O~P!&zO!S4^O~O!Q*OO'y*PO(z%POn'ia(y'ia!]'ia#`'ia~Og'ia$O'ia~P%-fO!Q*OO'y*POn'ka(y'ka(z'ka!]'ka#`'ka~Og'ka$O'ka~P%.XO(r$YO~P#/sO!YfX!Y$zX!]fX!]$zX!g%RX#`fX~P!0SOp%WO(T=WO~P!1uOp4bO!S%hO![4aO!_%iO(T%gO!]'eX!k'eX~O!]/pO!k)Oa~O!]/pO!g#vO!k)Oa~O!]/pO!g#vO(r'pO!k)Oa~Og$|i!]$|i#`$|i$O$|i~P!1WO![4jO!Y'gX!]'gX~P!3tO!]/yO!Y)Pa~O!]/yO!Y)Pa~P#/sOP]XR]X[]Xj]Xr]X!Q]X!S]X!Y]X!]]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X~Oj%YX!g%YX~P%2OOj4oO!g#vO~Oh%VO!g#vO!l%eO~Oh%VOr4tO!l%eO(r'pO~Or4yO!g#vO(r'pO~Os!nO!S4zO(VTO(YUO(e!mO~O(y$}On%ai!Q%ai'y%ai(z%ai!]%ai#`%ai~Og%ai$O%ai~P%5oO(z%POn%ci!Q%ci'y%ci(y%ci!]%ci#`%ci~Og%ci$O%ci~P%6bOg(_i!](_i~P!1WO#`5QOg(_i!](_i~P!1WO!k5VO~Oa$oq!]$oq'z$oq'w$oq!Y$oq!k$oqv$oq!_$oq%i$oq!g$oq~P!:tO!Y5ZO~O!]5[O!_)QX~P#/sOa$zX!_$zX%^]X'z$zX!]$zX~P!0SO%^5_OaoX!_oX'zoX!]oX~P$#OOp5`O(T#nO~O%^5_O~Ob5fO%j5gO(T+qO(VTO(YUO!]'tX!^'tX~O!]1TO!^)Xa~O[5kO~O`5lO~O[5pO~Oa%nO'z%nO~P#/sO!]5uO#`5wO!^)UX~O!^5xO~Or6OOs!nO!S*iO!b!yO!c!vO!d!vO!|<VO#T!pO#U!pO#V!pO#W!pO#X!pO#[5}O#]!zO(U!lO(VTO(YUO(e!mO(o!sO~O!^5|O~P%;eOn6TO!_1oO%i6SO~Oh%VOn6TO!_1oO%i6SO~Ob6[O(T#nO(VTO(YUO!]'sX!^'sX~O!]1zO!^)Va~O(VTO(YUO(e6^O~O`6bO~Oj6eO&[6fO~PNXO!k6gO~P%[Oa6iO~Oa6iO~P%[Ob2bO!^6nO&j2aO~P`O!g6pO~O!g6rOh(ji!](ji!^(ji!g(ji!l(jir(ji(r(ji~O!]#hi!^#hi~P#BwO#`6sO!]#hi!^#hi~O!]!ai!^!ai~P#BwOa%nO#`6|O'z%nO~Oa%nO!g#vO#`6|O'z%nO~O!](tq!k(tqa(tq'z(tq~P!:tO!](jO!k(sq~O!S%hO!_%iO#j7TO(T%gO~O!_'`O%i7WO~On7[O!_'`O%i7WO~O#k'iaP'iaR'ia['iaa'iaj'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia'z'ia(a'ia(r'ia!k'ia!Y'ia'w'iav'ia!_'ia%i'ia!g'ia~P%-fO#k'kaP'kaR'ka['kaa'kaj'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka'z'ka(a'ka(r'ka!k'ka!Y'ka'w'kav'ka!_'ka%i'ka!g'ka~P%.XO#k$|iP$|iR$|i[$|ia$|ij$|ir$|i!S$|i!]$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i'z$|i(a$|i(r$|i!k$|i!Y$|i'w$|i#`$|iv$|i!_$|i%i$|i!g$|i~P#/sO#k%aiP%aiR%ai[%aia%aij%air%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai'z%ai(a%ai(r%ai!k%ai!Y%ai'w%aiv%ai!_%ai%i%ai!g%ai~P%5oO#k%ciP%ciR%ci[%cia%cij%cir%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci'z%ci(a%ci(r%ci!k%ci!Y%ci'w%civ%ci!_%ci%i%ci!g%ci~P%6bO!]'Ya!k'Ya~P!:tO!].tO!k(ki~O$O#ci!]#ci!^#ci~P#BwOP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mij#mir#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#n#mi~P%NdO#n<_O~P%NdOP$[OR#zOr<kO!Q#yO!S#{O!l#xO!p$[O#n<_O#o<`O#p<`O#q<`O(aVO[#mij#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#r#mi~P&!lO#r<aO~P&!lOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO(aVO#x#mi#z#mi#{#mi$O#mi(r#mi(y#mi(z#mi!]#mi!^#mi~O#v#mi~P&$tOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO(aVO(z#}O#z#mi#{#mi$O#mi(r#mi(y#mi!]#mi!^#mi~O#x<eO~P&&uO#x#mi~P&&uO#v<cO~P&$tOP$[OR#zO[<mOj<bOr<kO!Q#yO!S#{O!l#xO!p$[O#R<bO#n<_O#o<`O#p<`O#q<`O#r<aO#s<bO#t<bO#u<lO#v<cO#x<eO(aVO(y#|O(z#}O#{#mi$O#mi(r#mi!]#mi!^#mi~O#z#mi~P&)UO#z<gO~P&)UOa#|y!]#|y'z#|y'w#|y!Y#|y!k#|yv#|y!_#|y%i#|y!g#|y~P!:tO[#mij#mir#mi#R#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi$O#mi(r#mi!]#mi!^#mi~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O#n<_O#o<`O#p<`O#q<`O(aVO(y#mi(z#mi~P&,QOn>^O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P&,QO#S$dOP(`XR(`X[(`Xj(`Xn(`Xr(`X!Q(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X$O(`X'y(`X(a(`X(r(`X(y(`X(z(`X!](`X!^(`X~O$O$Pi!]$Pi!^$Pi~P#BwO$O!ri!^!ri~P$+oOg']a!]']a~P!1WO!^7nO~O!]'da!^'da~P#BwO!Y7oO~P#/sO!g#vO(r'pO!]'ea!k'ea~O!]/pO!k)Oi~O!]/pO!g#vO!k)Oi~Og$|q!]$|q#`$|q$O$|q~P!1WO!Y'ga!]'ga~P#/sO!g7vO~O!]/yO!Y)Pi~P#/sO!]/yO!Y)Pi~O!Y7yO~Oh%VOr8OO!l%eO(r'pO~Oj8QO!g#vO~Or8TO!g#vO(r'pO~O!Q*OO'y*PO(z%POn'ja(y'ja!]'ja#`'ja~Og'ja$O'ja~P&5RO!Q*OO'y*POn'la(y'la(z'la!]'la#`'la~Og'la$O'la~P&5tOg(_q!](_q~P!1WO#`8VOg(_q!](_q~P!1WO!Y8WO~Og%Oq!]%Oq#`%Oq$O%Oq~P!1WOa$oy!]$oy'z$oy'w$oy!Y$oy!k$oyv$oy!_$oy%i$oy!g$oy~P!:tO!g6rO~O!]5[O!_)Qa~O!_'`OP$TaR$Ta[$Taj$Tar$Ta!Q$Ta!S$Ta!]$Ta!l$Ta!p$Ta#R$Ta#n$Ta#o$Ta#p$Ta#q$Ta#r$Ta#s$Ta#t$Ta#u$Ta#v$Ta#x$Ta#z$Ta#{$Ta(a$Ta(r$Ta(y$Ta(z$Ta~O%i7WO~P&8fO%^8[Oa%[i!_%[i'z%[i!]%[i~Oa#cy!]#cy'z#cy'w#cy!Y#cy!k#cyv#cy!_#cy%i#cy!g#cy~P!:tO[8^O~Ob8`O(T+qO(VTO(YUO~O!]1TO!^)Xi~O`8dO~O(e(|O!]'pX!^'pX~O!]5uO!^)Ua~O!^8nO~P%;eO(o!sO~P$&YO#[8oO~O!_1oO~O!_1oO%i8qO~On8tO!_1oO%i8qO~O[8yO!]'sa!^'sa~O!]1zO!^)Vi~O!k8}O~O!k9OO~O!k9RO~O!k9RO~P%[Oa9TO~O!g9UO~O!k9VO~O!](wi!^(wi~P#BwOa%nO#`9_O'z%nO~O!](ty!k(tya(ty'z(ty~P!:tO!](jO!k(sy~O%i9bO~P&8fO!_'`O%i9bO~O#k$|qP$|qR$|q[$|qa$|qj$|qr$|q!S$|q!]$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q'z$|q(a$|q(r$|q!k$|q!Y$|q'w$|q#`$|qv$|q!_$|q%i$|q!g$|q~P#/sO#k'jaP'jaR'ja['jaa'jaj'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja'z'ja(a'ja(r'ja!k'ja!Y'ja'w'jav'ja!_'ja%i'ja!g'ja~P&5RO#k'laP'laR'la['laa'laj'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la'z'la(a'la(r'la!k'la!Y'la'w'lav'la!_'la%i'la!g'la~P&5tO#k%OqP%OqR%Oq[%Oqa%Oqj%Oqr%Oq!S%Oq!]%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq'z%Oq(a%Oq(r%Oq!k%Oq!Y%Oq'w%Oq#`%Oqv%Oq!_%Oq%i%Oq!g%Oq~P#/sO!]'Yi!k'Yi~P!:tO$O#cq!]#cq!^#cq~P#BwO(y$}OP%aaR%aa[%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa$O%aa(a%aa(r%aa!]%aa!^%aa~On%aa!Q%aa'y%aa(z%aa~P&IyO(z%POP%caR%ca[%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca$O%ca(a%ca(r%ca!]%ca!^%ca~On%ca!Q%ca'y%ca(y%ca~P&LQOn>^O!Q*OO'y*PO(z%PO~P&IyOn>^O!Q*OO'y*PO(y$}O~P&LQOR0kO!Q0kO!S0lO#S$dOP}a[}aj}an}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a$O}a'y}a(a}a(r}a(y}a(z}a!]}a!^}a~O!Q*OO'y*POP$saR$sa[$saj$san$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa$O$sa(a$sa(r$sa(y$sa(z$sa!]$sa!^$sa~O!Q*OO'y*POP$uaR$ua[$uaj$uan$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua$O$ua(a$ua(r$ua(y$ua(z$ua!]$ua!^$ua~On>^O!Q*OO'y*PO(y$}O(z%PO~OP%TaR%Ta[%Taj%Tar%Ta!S%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta$O%Ta(a%Ta(r%Ta!]%Ta!^%Ta~P''VO$O$mq!]$mq!^$mq~P#BwO$O$oq!]$oq!^$oq~P#BwO!^9oO~O$O9pO~P!1WO!g#vO!]'ei!k'ei~O!g#vO(r'pO!]'ei!k'ei~O!]/pO!k)Oq~O!Y'gi!]'gi~P#/sO!]/yO!Y)Pq~Or9wO!g#vO(r'pO~O[9yO!Y9xO~P#/sO!Y9xO~Oj:PO!g#vO~Og(_y!](_y~P!1WO!]'na!_'na~P#/sOa%[q!_%[q'z%[q!]%[q~P#/sO[:UO~O!]1TO!^)Xq~O`:YO~O#`:ZO!]'pa!^'pa~O!]5uO!^)Ui~P#BwO!S:]O~O!_1oO%i:`O~O(VTO(YUO(e:eO~O!]1zO!^)Vq~O!k:hO~O!k:iO~O!k:jO~O!k:jO~P%[O#`:mO!]#hy!^#hy~O!]#hy!^#hy~P#BwO%i:rO~P&8fO!_'`O%i:rO~O$O#|y!]#|y!^#|y~P#BwOP$|iR$|i[$|ij$|ir$|i!S$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i$O$|i(a$|i(r$|i!]$|i!^$|i~P''VO!Q*OO'y*PO(z%POP'iaR'ia['iaj'ian'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia$O'ia(a'ia(r'ia(y'ia!]'ia!^'ia~O!Q*OO'y*POP'kaR'ka['kaj'kan'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka$O'ka(a'ka(r'ka(y'ka(z'ka!]'ka!^'ka~O(y$}OP%aiR%ai[%aij%ain%air%ai!Q%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai$O%ai'y%ai(a%ai(r%ai(z%ai!]%ai!^%ai~O(z%POP%ciR%ci[%cij%cin%cir%ci!Q%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci$O%ci'y%ci(a%ci(r%ci(y%ci!]%ci!^%ci~O$O$oy!]$oy!^$oy~P#BwO$O#cy!]#cy!^#cy~P#BwO!g#vO!]'eq!k'eq~O!]/pO!k)Oy~O!Y'gq!]'gq~P#/sOr:|O!g#vO(r'pO~O[;QO!Y;PO~P#/sO!Y;PO~Og(_!R!](_!R~P!1WOa%[y!_%[y'z%[y!]%[y~P#/sO!]1TO!^)Xy~O!]5uO!^)Uq~O(T;XO~O!_1oO%i;[O~O!k;_O~O%i;dO~P&8fOP$|qR$|q[$|qj$|qr$|q!S$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q$O$|q(a$|q(r$|q!]$|q!^$|q~P''VO!Q*OO'y*PO(z%POP'jaR'ja['jaj'jan'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja$O'ja(a'ja(r'ja(y'ja!]'ja!^'ja~O!Q*OO'y*POP'laR'la['laj'lan'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la$O'la(a'la(r'la(y'la(z'la!]'la!^'la~OP%OqR%Oq[%Oqj%Oqr%Oq!S%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq$O%Oq(a%Oq(r%Oq!]%Oq!^%Oq~P''VOg%e!Z!]%e!Z#`%e!Z$O%e!Z~P!1WO!Y;hO~P#/sOr;iO!g#vO(r'pO~O[;kO!Y;hO~P#/sO!]'pq!^'pq~P#BwO!]#h!Z!^#h!Z~P#BwO#k%e!ZP%e!ZR%e!Z[%e!Za%e!Zj%e!Zr%e!Z!S%e!Z!]%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z'z%e!Z(a%e!Z(r%e!Z!k%e!Z!Y%e!Z'w%e!Z#`%e!Zv%e!Z!_%e!Z%i%e!Z!g%e!Z~P#/sOr;tO!g#vO(r'pO~O!Y;uO~P#/sOr;|O!g#vO(r'pO~O!Y;}O~P#/sOP%e!ZR%e!Z[%e!Zj%e!Zr%e!Z!S%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z$O%e!Z(a%e!Z(r%e!Z!]%e!Z!^%e!Z~P''VOr<QO!g#vO(r'pO~Ov(fX~P1qO!Q%rO~P!)[O(U!lO~P!)[O!YfX!]fX#`fX~P%2OOP]XR]X[]Xj]Xr]X!Q]X!S]X!]]X!]fX!l]X!p]X#R]X#S]X#`]X#`fX#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X~O!gfX!k]X!kfX(rfX~P'LTOP<UOQ<UOSfOd>ROe!iOpkOr<UOskOtkOzkO|<UO!O<UO!SWO!WkO!XkO!_XO!i<XO!lZO!o<UO!p<UO!q<UO!s<YO!u<]O!x!hO$W!kO$n>PO(T)]O(VTO(YUO(aVO(o[O~O!]<iO!^$qa~Oh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O<tO!S${O!_$|O!i>WO!l$xO#j<zO$W%`O$t<vO$v<xO$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Ol)dO~P(!yOr!eX(r!eX~P#!iOr(jX(r(jX~P##[O!^]X!^fX~P'LTO!YfX!Y$zX!]fX!]$zX#`fX~P!0SO#k<^O~O!g#vO#k<^O~O#`<nO~Oj<bO~O#`=OO!](wX!^(wX~O#`<nO!](uX!^(uX~O#k=PO~Og=RO~P!1WO#k=XO~O#k=YO~Og=RO(T&ZO~O!g#vO#k=ZO~O!g#vO#k=PO~O$O=[O~P#BwO#k=]O~O#k=^O~O#k=cO~O#k=dO~O#k=eO~O#k=fO~O$O=gO~P!1WO$O=hO~P!1WOl=sO~P7eOk#S#T#U#W#X#[#i#j#u$n$t$v$y%]%^%h%i%j%q%s%v%w%y%{~(OT#o!X'|(U#ps#n#qr!Q'}$]'}(T$_(e~",goto:"$9Y)]PPPPPP)^PP)aP)rP+W/]PPPP6mPP7TPP=QPPP@tPA^PA^PPPA^PCfPA^PA^PA^PCjPCoPD^PIWPPPI[PPPPI[L_PPPLeMVPI[PI[PP! eI[PPPI[PI[P!#lI[P!'S!(X!(bP!)U!)Y!)U!,gPPPPPPP!-W!(XPP!-h!/YP!2iI[I[!2n!5z!:h!:h!>gPPP!>oI[PPPPPPPPP!BOP!C]PPI[!DnPI[PI[I[I[I[I[PI[!FQP!I[P!LbP!Lf!Lp!Lt!LtP!IXP!Lx!LxP#!OP#!SI[PI[#!Y#%_CjA^PA^PA^A^P#&lA^A^#)OA^#+vA^#.SA^A^#.r#1W#1W#1]#1f#1W#1qPP#1WPA^#2ZA^#6YA^A^6mPPP#:_PPP#:x#:xP#:xP#;`#:xPP#;fP#;]P#;]#;y#;]#<e#<k#<n)aP#<q)aP#<z#<z#<zP)aP)aP)aP)aPP)aP#=Q#=TP#=T)aP#=XP#=[P)aP)aP)aP)aP)aP)a)aPP#=b#=h#=s#=y#>P#>V#>]#>k#>q#>{#?R#?]#?c#?s#?y#@k#@}#AT#AZ#Ai#BO#Cs#DR#DY#Et#FS#Gt#HS#HY#H`#Hf#Hp#Hv#H|#IW#Ij#IpPPPPPPPPPPP#IvPPPPPPP#Jk#Mx$ b$ i$ qPPP$']P$'f$*_$0x$0{$1O$1}$2Q$2X$2aP$2g$2jP$3W$3[$4S$5b$5g$5}PP$6S$6Y$6^$6a$6e$6i$7e$7|$8e$8i$8l$8o$8y$8|$9Q$9UR!|RoqOXst!Z#d%m&r&t&u&w,s,x2[2_Y!vQ'`-e1o5{Q%tvQ%|yQ&T|Q&j!VS'W!e-]Q'f!iS'l!r!yU*k$|*Z*oQ+o%}S+|&V&WQ,d&dQ-c'_Q-m'gQ-u'mQ0[*qQ1b,OQ1y,eR<{<Y%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_S#q]<V!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SU+P%]<s<tQ+t&PQ,f&gQ,m&oQ0x+gQ0}+iQ1Y+uQ2R,kQ3`.gQ5`0|Q5f1TQ6[1zQ7Y3dQ8`5gR9e7['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S!S!nQ!r!v!y!z$|'W'_'`'l'm'n*k*o*q*r-]-c-e-u0[0_1o5{5}%[$ti#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^Q&X|Q'U!eS'[%i-`Q+t&PQ,P&WQ,f&gQ0n+SQ1Y+uQ1_+{Q2Q,jQ2R,kQ5f1TQ5o1aQ6[1zQ6_1|Q6`2PQ8`5gQ8c5lQ8|6bQ:X8dQ:f8yQ;V:YR<}*ZrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R,h&k&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'b'r(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>R>S[#]WZ#W#Z'X(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ%wxQ%{yW&Q|&V&W,OQ&_!TQ'c!hQ'e!iQ(q#sS+n%|%}Q+r&PQ,_&bQ,c&dS-l'f'gQ.i(rQ1R+oQ1X+uQ1Z+vQ1^+zQ1t,`S1x,d,eQ2|-mQ5e1TQ5i1WQ5n1`Q6Z1yQ8_5gQ8b5kQ8f5pQ:T8^R;T:U!U$zi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y!^%yy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{Q+h%wQ,T&[Q,W&]Q,b&dQ.h(qQ1s,_U1w,c,d,eQ3e.iQ6U1tS6Y1x1yQ8x6Z#f>T#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^o>U<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hW%Ti%V*y>PS&[!Q&iQ&]!RQ&^!SU*}%[%d=sR,R&Y%]%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^T)z$u){V+P%]<s<tW'[!e%i*Z-`S(}#y#zQ+c%rQ+y&SS.b(m(nQ1j,XQ5T0kR8i5u'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S$i$^c#Y#e%q%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.|.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`<W=vT#TV#U'RkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ'Y!eR2q-]!W!nQ!e!r!v!y!z$|'W'_'`'l'm'n*Z*k*o*q*r-]-c-e-u0[0_1o5{5}R1l,ZnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&y!^Q'v!xS(s#u<^Q+l%zQ,]&_Q,^&aQ-j'dQ-w'oS.r(x=PS0q+X=ZQ1P+mQ1n,[Q2c,zQ2e,{Q2m-WQ2z-kQ2}-oS5Y0r=eQ5a1QS5d1S=fQ6t2oQ6x2{Q6}3SQ8]5bQ9Y6vQ9Z6yQ9^7OR:l9V$d$]c#Y#e%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`<W=vS(o#p'iQ)P#zS+b%q.|S.c(n(pR3^.d'QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SS#q]<VQ&t!XQ&u!YQ&w![Q&x!]R2Z,vQ'a!hQ+e%wQ-h'cS.e(q+hQ2x-gW3b.h.i0w0yQ6w2yW7U3_3a3e5^U9a7V7X7ZU:q9c9d9fS;b:p:sQ;p;cR;x;qU!wQ'`-eT5y1o5{!Q_OXZ`st!V!Z#d#h%e%m&i&k&r&t&u&w(j,s,x.[2[2_]!pQ!r'`-e1o5{T#q]<V%^{OPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_S(}#y#zS.b(m(n!s=l$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SU$fd)_,mS(p#p'iU*v%R(w4OU0m+O.n7gQ5^0xQ7V3`Q9d7YR:s9em!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}Q't!uS(f#g2US-s'k'wQ/s*]Q0R*jQ3U-vQ4f/tQ4r0TQ4s0UQ4x0^Q7r4`S7}4t4vS8R4y4{Q9r7sQ9v7yQ9{8OQ:Q8TS:{9w9xS;g:|;PS;s;h;iS;{;t;uS<P;|;}R<S<QQ#wbQ's!uS(e#g2US(g#m+WQ+Y%fQ+j%xQ+p&OU-r'k't'wQ.W(fU/r*]*`/wQ0S*jQ0V*lQ1O+kQ1u,aS3R-s-vQ3Z.`S4e/s/tQ4n0PS4q0R0^Q4u0WQ6W1vQ7P3US7q4`4bQ7u4fU7|4r4x4{Q8P4wQ8v6XS9q7r7sQ9u7yQ9}8RQ:O8SQ:c8wQ:y9rS:z9v9xQ;S:QQ;^:dS;f:{;PS;r;g;hS;z;s;uS<O;{;}Q<R<PQ<T<SQ=o=jQ={=tR=|=uV!wQ'`-e%^aOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_S#wz!j!r=i$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SR=o>R%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Q%fj!^%xy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{S&Oz!jQ+k%yQ,a&dW1v,b,c,d,eU6X1w1x1yS8w6Y6ZQ:d8x!r=j$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ=t>QR=u>R%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Y#bWZ#W#Z(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ,n&o!p=k$Z$n)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SR=n'XU']!e%i*ZR2s-`%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SQ,m&oQ0x+gQ3`.gQ7Y3dR9e7[!b$Tc#Y%q(S(Y(t(y)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<W!P<d)^)q-Z.|2k2n3p3y3z4P4X6u7b7k7l8k9X9g9m9n;W;`=v!f$Vc#Y%q(S(Y(t(y)W)X)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<W!T<f)^)q-Z.|2k2n3p3v3w3y3z4P4X6u7b7k7l8k9X9g9m9n;W;`=v!^$Zc#Y%q(S(Y(t(y)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:o<WQ4_/kz>S)^)q-Z.|2k2n3p4P4X6u7b7k7l8k9X9g9m9n;W;`=vQ>X>ZR>Y>['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>SS$oh$pR4U/U'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>ST$kf$qQ$ifS)j$l)nR)v$qT$jf$qT)l$l)n'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>ST$oh$pQ$rhR)u$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_!s>Q$Z$n'X)s-U-X/V2p4T5w6s:Z:m<U<X<Y<]<^<_<`<a<b<c<d<e<f<g<h<i<k<n<{=O=P=R=Z=[=e=f>S#glOPXZst!Z!`!o#S#d#o#{$n%m&k&n&o&r&t&u&w&{'T'b)O)s*i+]+g,p,s,x-i.g/V/n0]0l1r2S2T2V2X2[2_2a3d4T4z6T6e6f6i7[8t9T!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^Q+T%aQ/c*Oo4O<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!U$yi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>YQ*c$zU*l$|*Z*oQ+U%bQ0W*m#f=q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n=r<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hQ=w>TQ=x>UQ=y>VR=z>W!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^o4O<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=hnoOXst!Z#d%m&r&t&u&w,s,x2[2_S*f${*YQ-R'OQ-S'QR4i/y%[%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;k<l<m<o<p<q<r<u<v<w<x<y<z=S=T=U=V=X=Y=]=^=_=`=a=b=c=d=g=h>P>X>Y>]>^Q,U&]Q1h,WQ5s1gR8h5tV*n$|*Z*oU*n$|*Z*oT5z1o5{S0P*i/nQ4w0]T8S4z:]Q+j%xQ0V*lQ1O+kQ1u,aQ6W1vQ8v6XQ:c8wR;^:d!U%Oi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Yx*R$v)e*S*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>OS0`*t0a#f<o#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n<p<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!d=S(u)c*[*e.j.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[`=T3}7c7f7j9h:t:w;yS=_.l3iT=`7e9k!U%Qi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y|*T$v)e*U*t+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>OS0b*u0c#f<q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k<o<q<u<w<y=S=U=X=]=_=a=c=g>]>^n<r<l<m<p<r<v<x<z=T=V=Y=^=`=b=d=h!h=U(u)c*[*e.k.l.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[d=V3}7d7e7j9h9i:t:u:w;yS=a.m3jT=b7f9lrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q&f!UR,p&ornOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R&f!UQ,Y&^R1d,RsnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q1p,_S6R1s1tU8p6P6Q6US:_8r8sS;Y:^:aQ;m;ZR;w;nQ&m!VR,i&iR6_1|R:f8yW&Q|&V&W,OR1Z+vQ&r!WR,s&sR,y&xT2],x2_R,}&yQ,|&yR2f,}Q'y!{R-y'ySsOtQ#dXT%ps#dQ#OTR'{#OQ#RUR'}#RQ){$uR/`){Q#UVR(Q#UQ#XWU(W#X(X.QQ(X#YR.Q(YQ-^'YR2r-^Q.u(yS3m.u3nR3n.vQ-e'`R2v-eY!rQ'`-e1o5{R'j!rQ/Q)eR4S/QU#_W%h*YU(_#_(`.RQ(`#`R.R(ZQ-a']R2t-at`OXst!V!Z#d%m&i&k&r&t&u&w,s,x2[2_S#hZ%eU#r`#h.[R.[(jQ(k#jQ.X(gW.a(k.X3X7RQ3X.YR7R3YQ)n$lR/W)nQ$phR)t$pQ$`cU)a$`-|<jQ-|<WR<j)qQ/q*]W4c/q4d7t9sU4d/r/s/tS7t4e4fR9s7u$e*Q$v(u)c)e*[*e*t*u+Q+R+V.l.m.o.p.q/_/g/i/k/v/|0d0e0v1e3f3g3h3}4R4[4g4h4l4|5O5R5S5W5r7]7^7_7`7e7f7h7i7j7p7w7z8U8X8Z9h9i9j9t9|:R:S:t:u:v:w:x:};R;e;j;v;y=p=}>O>Z>[Q/z*eU4k/z4m7xQ4m/|R7x4lS*o$|*ZR0Y*ox*S$v)e*t*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>O!d.j(u)c*[*e.l.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/h*S.j7ca7c3}7e7f7j9h:t:w;yQ0a*tQ3i.lU4}0a3i9kR9k7e|*U$v)e*t*u+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>O!h.k(u)c*[*e.l.m.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/j*U.k7de7d3}7e7f7j9h9i:t:u:w;yQ0c*uQ3j.mU5P0c3j9lR9l7fQ*z%UR0g*zQ5]0vR8Y5]Q+_%kR0u+_Q5v1jS8j5v:[R:[8kQ,[&_R1m,[Q5{1oR8m5{Q1{,fS6]1{8zR8z6_Q1U+rW5h1U5j8a:VQ5j1XQ8a5iR:V8bQ+w&QR1[+wQ2_,xR6m2_YrOXst#dQ&v!ZQ+a%mQ,r&rQ,t&tQ,u&uQ,w&wQ2Y,sS2],x2_R6l2[Q%opQ&z!_Q&}!aQ'P!bQ'R!cQ'q!uQ+`%lQ+l%zQ,Q&XQ,h&mQ-P&|W-p'k's't'wQ-w'oQ0X*nQ1P+mQ1c,PS2O,i,lQ2g-OQ2h-RQ2i-SQ2}-oW3P-r-s-v-xQ5a1QQ5m1_Q5q1eQ6V1uQ6a2QQ6k2ZU6z3O3R3UQ6}3SQ8]5bQ8e5oQ8g5rQ8l5zQ8u6WQ8{6`S9[6{7PQ9^7OQ:W8cQ:b8vQ:g8|Q:n9]Q;U:XQ;]:cQ;a:oQ;l;VR;o;^Q%zyQ'd!iQ'o!uU+m%{%|%}Q-W'VU-k'e'f'gS-o'k'uQ0Q*jS1Q+n+oQ2o-YS2{-l-mQ3S-tS4p0R0UQ5b1RQ6v2uQ6y2|Q7O3TU7{4r4s4vQ9z7}R;O9{S$wi>PR*{%VU%Ui%V>PR0f*yQ$viS(u#v+iS)c$b$cQ)e$dQ*[$xS*e${*YQ*t%OQ*u%QQ+Q%^Q+R%_Q+V%cQ.l<oQ.m<qQ.o<uQ.p<wQ.q<yQ/_)yQ/g*RQ/i*TQ/k*VQ/v*aS/|*g/mQ0d*wQ0e*xl0v+f,V.f1i1q3c6S7W8q9b:`:r;[;dQ1e,SQ3f=SQ3g=UQ3h=XS3}<l<mQ4R/PS4[/d4^Q4g/xQ4h/yQ4l/{Q4|0`Q5O0bQ5R0iQ5S0jQ5W0oQ5r1fQ7]=]Q7^=_Q7_=aQ7`=cQ7e<pQ7f<rQ7h<vQ7i<xQ7j<zQ7p4_Q7w4jQ7z4oQ8U5QQ8X5[Q8Z5_Q9h=YQ9i=TQ9j=VQ9t7vQ9|8QQ:R8VQ:S8[Q:t=^Q:u=`Q:v=bQ:w=dQ:x9pQ:}9yQ;R:PQ;e=gQ;j;QQ;v;kQ;y=hQ=p>PQ=}>XQ>O>YQ>Z>]R>[>^Q+O%]Q.n<sR7g<tnpOXst!Z#d%m&r&t&u&w,s,x2[2_Q!fPS#fZ#oQ&|!`W'h!o*i0]4zQ(P#SQ)Q#{Q)r$nS,l&k&nQ,q&oQ-O&{S-T'T/nQ-g'bQ.x)OQ/[)sQ0s+]Q0y+gQ2W,pQ2y-iQ3a.gQ4W/VQ5U0lQ6Q1rQ6c2SQ6d2TQ6h2VQ6j2XQ6o2aQ7Z3dQ7m4TQ8s6TQ9P6eQ9Q6fQ9S6iQ9f7[Q:a8tR:k9T#[cOPXZst!Z!`!o#d#o#{%m&k&n&o&r&t&u&w&{'T'b)O*i+]+g,p,s,x-i.g/n0]0l1r2S2T2V2X2[2_2a3d4z6T6e6f6i7[8t9TQ#YWQ#eYQ%quQ%svS%uw!gS(S#W(VQ(Y#ZQ(t#uQ(y#xQ)R$OQ)S$PQ)T$QQ)U$RQ)V$SQ)W$TQ)X$UQ)Y$VQ)Z$WQ)[$XQ)^$ZQ)`$_Q)b$aQ)g$eW)q$n)s/V4TQ+d%tQ+x&RS-Z'X2pQ-x'rS-}(T.PQ.S(]Q.U(dQ.s(xQ.v(zQ.z<UQ.|<XQ.}<YQ/O<]Q/b)}Q0p+XQ2k-UQ2n-XQ3O-qQ3V.VQ3k.tQ3p<^Q3q<_Q3r<`Q3s<aQ3t<bQ3u<cQ3v<dQ3w<eQ3x<fQ3y<gQ3z<hQ3{.{Q3|<kQ4P<nQ4Q<{Q4X<iQ5X0rQ5c1SQ6u=OQ6{3QQ7Q3WQ7a3lQ7b=PQ7k=RQ7l=ZQ8k5wQ9X6sQ9]6|Q9g=[Q9m=eQ9n=fQ:o9_Q;W:ZQ;`:mQ<W#SR=v>SR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i<VR)f$dY!uQ'`-e1o5{Q'k!rS'u!v!yS'w!z5}S-t'l'mQ-v'nR3T-uT#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:Tge,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[Qge],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$i&j(Wp(Z!b'|0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(X#S$i&j'}0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$i&j(Wp(Z!b'}0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$i&j!p),Q(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(V':f$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$i&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$d`$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$d``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$d`$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(Z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$d`(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$i&j(Wp(Z!bOY%ZYZ&cZq%Zqr<Srs&}st%ZtuCruw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr(r<__WS$i&j(Wp(Z!bOY<SYZ&cZr<Srs=^sw<Swx@nx!^<S!^!_Bm!_#O<S#O#P>`#P#o<S#o#pBm#p;'S<S;'S;=`Cl<%lO<S(Q=g]WS$i&j(Z!bOY=^YZ&cZw=^wx>`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$i&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(Z!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$i&j(WpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(WpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Wp(Z!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l<S%9[C}i$i&j(o%1l(Wp(Z!bOY%ZYZ&cZr%Zrs&}st%ZtuCruw%Zwx(rx!Q%Z!Q![Cr![!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr%9[EoP;=`<%lCr07[FRk$i&j(Wp(Z!b$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr+dHRk$i&j(Wp(Z!b$]#tOY%ZYZ&cZr%Zrs&}st%ZtuGvuw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Gv![!^%Z!^!_*g!_!c%Z!c!}Gv!}#O%Z#O#P&c#P#R%Z#R#SGv#S#T%Z#T#oGv#o#p*g#p$g%Z$g;'SGv;'S;=`Iv<%lOGv+dIyP;=`<%lGv07[JPP;=`<%lEr(KWJ_`$i&j(Wp(Z!b#p(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWKl_$i&j$Q(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,#xLva(z+JY$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sv%ZvwM{wx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWNW`$i&j#z(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At! c_(Y';W$i&j(WpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b'l!!i_$i&j(WpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b&z!#mX$i&jOw!#hwx6cx!^!#h!^!_!$Y!_#o!#h#o#p!$Y#p;'S!#h;'S;=`!$r<%lO!#h`!$]TOw!$Ywx7]x;'S!$Y;'S;=`!$l<%lO!$Y`!$oP;=`<%l!$Y&z!$uP;=`<%l!#h'l!%R]$d`$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r!Q!&PZ(WpOY!%zYZ!$YZr!%zrs!$Ysw!%zwx!&rx#O!%z#O#P!$Y#P;'S!%z;'S;=`!']<%lO!%z!Q!&yU$d`(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r!Q!'`P;=`<%l!%z'l!'fP;=`<%l!!b/5|!'t_!l/.^$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&U!)O_!k!Lf$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z-!n!*[b$i&j(Wp(Z!b(U%&f#q(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!+d{!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW!+o`$i&j(Wp(Z!b#n(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;x!,|`$i&j(Wp(Z!br+4YOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,$U!.Z_!]+Jf$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!/ec$i&j(Wp(Z!b!Q.2^OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!0p!P!Q%Z!Q![!3Y![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!0ya$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!2O!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!2Z_![!L^$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!3eg$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!3Y![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S!3Y#S#X%Z#X#Y!4|#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!5Vg$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!6n|}%Z}!O!6n!O!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!6wc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!8_c$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!9uf$i&j(Wp(Z!b#o(ChOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcxz!;Zz{#-}{!P!;Z!P!Q#/d!Q!^!;Z!^!_#(i!_!`#7S!`!a#8i!a!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z?O!;fb$i&j(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z>^!<w`$i&j(Z!b!X7`OY!<nYZ&cZw!<nwx!=yx!P!<n!P!Q!Eq!Q!^!<n!^!_!Gr!_!}!<n!}#O!KS#O#P!Dy#P#o!<n#o#p!Gr#p;'S!<n;'S;=`!L]<%lO!<n<z!>Q^$i&j!X7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!?Td$i&j!X7`O!^&c!_#W&c#W#X!>|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!X7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!X7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c<z!C][$i&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#O!CW#O#P!DR#P#Q!=y#Q#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DWX$i&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DvP;=`<%l!CW<z!EOX$i&jOY!=yYZ&cZ!^!=y!^!_!@c!_#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!EnP;=`<%l!=y>^!Ezl$i&j(Z!b!X7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(Z!b!X7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(Z!b!X7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(Z!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$i&j(Z!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!<n#Q#o!KS#o#p!JU#p;'S!KS;'S;=`!LV<%lO!KS>^!LYP;=`<%l!KS>^!L`P;=`<%l!<n=l!Ll`$i&j(Wp!X7`OY!LcYZ&cZr!Lcrs!=ys!P!Lc!P!Q!Mn!Q!^!Lc!^!_# o!_!}!Lc!}#O#%P#O#P!Dy#P#o!Lc#o#p# o#p;'S!Lc;'S;=`#&Y<%lO!Lc=l!Mwl$i&j(Wp!X7`OY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#W(r#W#X!Mn#X#Z(r#Z#[!Mn#[#](r#]#^!Mn#^#a(r#a#b!Mn#b#g(r#g#h!Mn#h#i(r#i#j!Mn#j#k!Mn#k#m(r#m#n!Mn#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r8Q# vZ(Wp!X7`OY# oZr# ors!@cs!P# o!P!Q#!i!Q!}# o!}#O#$R#O#P!Bq#P;'S# o;'S;=`#$y<%lO# o8Q#!pe(Wp!X7`OY)rZr)rs#O)r#P#W)r#W#X#!i#X#Z)r#Z#[#!i#[#])r#]#^#!i#^#a)r#a#b#!i#b#g)r#g#h#!i#h#i)r#i#j#!i#j#k#!i#k#m)r#m#n#!i#n;'S)r;'S;=`*Z<%lO)r8Q#$WX(WpOY#$RZr#$Rrs!Ars#O#$R#O#P!B[#P#Q# o#Q;'S#$R;'S;=`#$s<%lO#$R8Q#$vP;=`<%l#$R8Q#$|P;=`<%l# o=l#%W^$i&j(WpOY#%PYZ&cZr#%Prs!CWs!^#%P!^!_#$R!_#O#%P#O#P!DR#P#Q!Lc#Q#o#%P#o#p#$R#p;'S#%P;'S;=`#&S<%lO#%P=l#&VP;=`<%l#%P=l#&]P;=`<%l!Lc?O#&kn$i&j(Wp(Z!b!X7`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#W%Z#W#X#&`#X#Z%Z#Z#[#&`#[#]%Z#]#^#&`#^#a%Z#a#b#&`#b#g%Z#g#h#&`#h#i%Z#i#j#&`#j#k#&`#k#m%Z#m#n#&`#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z9d#(r](Wp(Z!b!X7`OY#(iZr#(irs!Grsw#(iwx# ox!P#(i!P!Q#)k!Q!}#(i!}#O#+`#O#P!Bq#P;'S#(i;'S;=`#,`<%lO#(i9d#)th(Wp(Z!b!X7`OY*gZr*grs'}sw*gwx)rx#O*g#P#W*g#W#X#)k#X#Z*g#Z#[#)k#[#]*g#]#^#)k#^#a*g#a#b#)k#b#g*g#g#h#)k#h#i*g#i#j#)k#j#k#)k#k#m*g#m#n#)k#n;'S*g;'S;=`+Z<%lO*g9d#+gZ(Wp(Z!bOY#+`Zr#+`rs!JUsw#+`wx#$Rx#O#+`#O#P!B[#P#Q#(i#Q;'S#+`;'S;=`#,Y<%lO#+`9d#,]P;=`<%l#+`9d#,cP;=`<%l#(i?O#,o`$i&j(Wp(Z!bOY#,fYZ&cZr#,frs!KSsw#,fwx#%Px!^#,f!^!_#+`!_#O#,f#O#P!DR#P#Q!;Z#Q#o#,f#o#p#+`#p;'S#,f;'S;=`#-q<%lO#,f?O#-tP;=`<%l#,f?O#-zP;=`<%l!;Z07[#.[b$i&j(Wp(Z!b(O0/l!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z07[#/o_$i&j(Wp(Z!bT0/lOY#/dYZ&cZr#/drs#0nsw#/dwx#4Ox!^#/d!^!_#5}!_#O#/d#O#P#1p#P#o#/d#o#p#5}#p;'S#/d;'S;=`#6|<%lO#/d06j#0w]$i&j(Z!bT0/lOY#0nYZ&cZw#0nwx#1px!^#0n!^!_#3R!_#O#0n#O#P#1p#P#o#0n#o#p#3R#p;'S#0n;'S;=`#3x<%lO#0n05W#1wX$i&jT0/lOY#1pYZ&cZ!^#1p!^!_#2d!_#o#1p#o#p#2d#p;'S#1p;'S;=`#2{<%lO#1p0/l#2iST0/lOY#2dZ;'S#2d;'S;=`#2u<%lO#2d0/l#2xP;=`<%l#2d05W#3OP;=`<%l#1p01O#3YW(Z!bT0/lOY#3RZw#3Rwx#2dx#O#3R#O#P#2d#P;'S#3R;'S;=`#3r<%lO#3R01O#3uP;=`<%l#3R06j#3{P;=`<%l#0n05x#4X]$i&j(WpT0/lOY#4OYZ&cZr#4Ors#1ps!^#4O!^!_#5Q!_#O#4O#O#P#1p#P#o#4O#o#p#5Q#p;'S#4O;'S;=`#5w<%lO#4O00^#5XW(WpT0/lOY#5QZr#5Qrs#2ds#O#5Q#O#P#2d#P;'S#5Q;'S;=`#5q<%lO#5Q00^#5tP;=`<%l#5Q05x#5zP;=`<%l#4O01p#6WY(Wp(Z!bT0/lOY#5}Zr#5}rs#3Rsw#5}wx#5Qx#O#5}#O#P#2d#P;'S#5};'S;=`#6v<%lO#5}01p#6yP;=`<%l#5}07[#7PP;=`<%l#/d)3h#7ab$i&j$Q(Ch(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;ZAt#8vb$Z#t$i&j(Wp(Z!b!X7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z'Ad#:Zp$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#U%Z#U#V#?i#V#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#<jk$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!g$b$i&j$O)Lv(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#R-<U(Wp(Z!b$n7`OY*gZr*grs'}sw*gwx)rx!P*g!P!Q#MO!Q!^*g!^!_#Mt!_!`$ f!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#MXX$k&j(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El#M}Z#r(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#Np!`#O*g#P;'S*g;'S;=`+Z<%lO*g(El#NyX$Q(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El$ oX#s(Ch(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g*)x$!ga#`*!Y$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a$#l!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(K[$#w_#k(Cl$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x$%Vag!*r#s(Ch$f#|$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`$&[!`!a$'f!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$&g_#s(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$'qa#r(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`!a$(v!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$)R`#r(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(Kd$*`a(r(Ct$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!a%Z!a!b$+e!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$+p`$i&j#{(Ch(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`$,}_!|$Ip$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f$.X_!S0,v$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$/]Z$i&jO!^$0O!^!_$0f!_#i$0O#i#j$0k#j#l$0O#l#m$2^#m#o$0O#o#p$0f#p;'S$0O;'S;=`$4i<%lO$0O(n$0VT_#S$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$0kO_#S(n$0p[$i&jO!Q&c!Q![$1f![!^&c!_!c&c!c!i$1f!i#T&c#T#Z$1f#Z#o&c#o#p$3|#p;'S&c;'S;=`&w<%lO&c(n$1kZ$i&jO!Q&c!Q![$2^![!^&c!_!c&c!c!i$2^!i#T&c#T#Z$2^#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$2cZ$i&jO!Q&c!Q![$3U![!^&c!_!c&c!c!i$3U!i#T&c#T#Z$3U#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$3ZZ$i&jO!Q&c!Q![$0O![!^&c!_!c&c!c!i$0O!i#T&c#T#Z$0O#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$4PR!Q![$4Y!c!i$4Y#T#Z$4Y#S$4]S!Q![$4Y!c!i$4Y#T#Z$4Y#q#r$0f(n$4lP;=`<%l$0O#1[$4z_!Y#)l$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$6U`#x(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;p$7c_$i&j(Wp(Z!b(a+4QOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$8qk$i&j(Wp(Z!b(T,2j$_#t(e$I[OY%ZYZ&cZr%Zrs&}st%Ztu$8buw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$8b![!^%Z!^!_*g!_!c%Z!c!}$8b!}#O%Z#O#P&c#P#R%Z#R#S$8b#S#T%Z#T#o$8b#o#p*g#p$g%Z$g;'S$8b;'S;=`$<l<%lO$8b+d$:qk$i&j(Wp(Z!b$_#tOY%ZYZ&cZr%Zrs&}st%Ztu$:fuw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$:f![!^%Z!^!_*g!_!c%Z!c!}$:f!}#O%Z#O#P&c#P#R%Z#R#S$:f#S#T%Z#T#o$:f#o#p*g#p$g%Z$g;'S$:f;'S;=`$<f<%lO$:f+d$<iP;=`<%l$:f07[$<oP;=`<%l$8b#Jf$<{X!_#Hb(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g,#x$=sa(y+JY$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$+e#q;'S%Z;'S;=`+a<%lO%Z)>v$?V_!^(CdvBr$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!q7`$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$i&j(Wp(Z!b'|0/l$]#t(T,2j(e$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Rge,_ge,$ge,Age,2,3,4,5,6,7,8,9,10,11,12,13,14,Ege,new xm("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new xm("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:t=>Ige[t]||-1},{term:343,get:t=>Nge[t]||-1},{term:95,get:t=>jge[t]||-1}],tokenPrec:15201}),xS=[un("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),un("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),un("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),un("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),un("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),un(`try {
|
|
495
|
+
\${}
|
|
496
|
+
} catch (\${error}) {
|
|
497
|
+
\${}
|
|
498
|
+
}`,{label:"try",detail:"/ catch block",type:"keyword"}),un("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),un(`if (\${}) {
|
|
499
|
+
\${}
|
|
500
|
+
} else {
|
|
501
|
+
\${}
|
|
502
|
+
}`,{label:"if",detail:"/ else block",type:"keyword"}),un(`class \${name} {
|
|
503
|
+
constructor(\${params}) {
|
|
504
|
+
\${}
|
|
505
|
+
}
|
|
506
|
+
}`,{label:"class",detail:"definition",type:"keyword"}),un('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),un('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],S3=xS.concat([un("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),un("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),un("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),K2=new sL,k3=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Bc(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const Dge=["FunctionDeclaration"],Lge={FunctionDeclaration:Bc("function"),ClassDeclaration:Bc("class"),ClassExpression:()=>!0,EnumDeclaration:Bc("constant"),TypeAliasDeclaration:Bc("type"),NamespaceDeclaration:Bc("namespace"),VariableDefinition(t,e){t.matchContext(Dge)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function C3(t,e){let n=K2.get(e);if(n)return n;let r=[],i=!0;function s(o,a){let l=t.sliceString(o.from,o.to);r.push({label:l,type:a})}return e.cursor(Ve.IncludeAnonymous).iterate(o=>{if(i)i=!1;else if(o.name){let a=Lge[o.name];if(a&&a(o,s)||k3.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of C3(t,o.node))r.push(a);return!1}}),K2.set(e,r),r}const wm=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,bS=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function P3(t){let e=We(t.state).resolveInner(t.pos,-1);if(bS.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&wm.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)k3.has(i.name)&&(r=r.concat(C3(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:wm}}function ev(t,e,n){var r;let i=[];for(;;){let s=e.firstChild,o;if((s==null?void 0:s.name)=="VariableName")return i.push(t(s)),{path:i.reverse(),name:n};if((s==null?void 0:s.name)=="MemberExpression"&&((r=o=s.lastChild)===null||r===void 0?void 0:r.name)=="PropertyName")i.push(t(o)),e=s;else return null}}function T3(t){let e=r=>t.state.doc.sliceString(r.from,r.to),n=We(t.state).resolveInner(t.pos,-1);return n.name=="PropertyName"?ev(e,n.parent,e(n)):(n.name=="."||n.name=="?.")&&n.parent.name=="MemberExpression"?ev(e,n.parent,""):bS.indexOf(n.name)>-1?null:n.name=="VariableName"||n.to-n.from<20&&wm.test(e(n))?{path:[],name:e(n)}:n.name=="MemberExpression"?ev(e,n,""):t.explicit?{path:[],name:""}:null}function zge(t,e){let n=[],r=new Set;for(let i=0;;i++){for(let o of(Object.getOwnPropertyNames||Object.keys)(t)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(o)||r.has(o))continue;r.add(o);let a;try{a=t[o]}catch{continue}n.push({label:o,type:typeof a=="function"?/^[A-Z]/.test(o)?"class":e?"function":"method":e?"variable":"property",boost:-i})}let s=Object.getPrototypeOf(t);if(!s)return n;t=s}}function Bge(t){let e=new Map;return n=>{let r=T3(n);if(!r)return null;let i=t;for(let o of r.path)if(i=i[o],!i)return null;let s=e.get(i);return s||e.set(i,s=zge(i,!r.path.length)),{from:n.pos-r.name.length,options:s,validFor:wm}}}const pr=Dl.define({name:"javascript",parser:Mge.configure({props:[dc.add({IfStatement:qh({except:/^\s*({|else\b)/}),TryStatement:qh({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:due,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:fue({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":qh({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),hc.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":hL,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),E3={test:t=>/^JSX/.test(t.name),facet:$g({commentTokens:{block:{open:"{/*",close:"*/}"}}})},wS=pr.configure({dialect:"ts"},"typescript"),SS=pr.configure({dialect:"jsx",props:[z1.add(t=>t.isTop?[E3]:void 0)]}),kS=pr.configure({dialect:"jsx ts",props:[z1.add(t=>t.isTop?[E3]:void 0)]},"typescript");let R3=t=>({label:t,type:"keyword"});const _3="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(R3),Vge=_3.concat(["declare","implements","private","protected","public"].map(R3));function $3(t={}){let e=t.jsx?t.typescript?kS:SS:t.typescript?wS:pr,n=t.typescript?S3.concat(Vge):xS.concat(_3);return new zl(e,[pr.data.of({autocomplete:Nde(bS,v5(n))}),pr.data.of({autocomplete:P3}),t.jsx?A3:[]])}function Fge(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function J2(t,e,n=t.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const Xge=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),A3=re.inputHandler.of((t,e,n,r,i)=>{if((Xge?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!pr.isActiveAt(t.state,e,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange(l=>{var c;let{head:u}=l,f=We(o).resolveInner(u-1,-1),d;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(u-1,u)!=r||f.name=="JSXAttributeValue"&&f.to>u)){if(r==">"&&f.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:"</>"}};if(r=="/"&&f.name=="JSXStartCloseTag"){let h=f.parent,g=h.parent;if(g&&h.from==u-2&&((d=J2(o.doc,g.firstChild,u))||((c=g.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let m=`${d}>`;return{range:Z.cursor(u+m.length,-1),changes:{from:u,insert:m}}}}else if(r==">"){let h=Fge(f);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(d=J2(o.doc,h,u)))return{range:l,changes:{from:u,insert:`</${d}>`}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function Zge(t,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},t.getRules().forEach((n,r)=>{var i;!((i=n.meta.docs)===null||i===void 0)&&i.recommended&&(e.rules[r]=2)})),n=>{let{state:r}=n,i=[];for(let{from:s,to:o}of pr.findRegions(r)){let a=r.doc.lineAt(s),l={line:a.number-1,col:s-a.from,pos:s};for(let c of t.verify(r.sliceDoc(s,o),e))i.push(Wge(c,r.doc,l))}return i}}function eR(t,e,n,r){return n.line(t+r.line).from+e+(t==1?r.col-1:-1)}function Wge(t,e,n){let r=eR(t.line,t.column,e,n),i={from:r,to:t.endLine!=null&&t.endColumn!=1?eR(t.endLine,t.endColumn,e,n):r,message:t.message,source:t.ruleId?"eslint:"+t.ruleId:"eslint",severity:t.severity==1?"warning":"error"};if(t.fix){let{range:s,text:o}=t.fix,a=s[0]+n.pos-r,l=s[1]+n.pos-r;i.actions=[{name:"fix",apply(c,u){c.dispatch({changes:{from:u+a,to:u+l,insert:o},scrollIntoView:!0})}}]}return i}const dh=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:A3,completionPath:T3,esLint:Zge,javascript:$3,javascriptLanguage:pr,jsxLanguage:SS,localCompletionSource:P3,scopeCompletionSource:Bge,snippets:xS,tsxLanguage:kS,typescriptLanguage:wS,typescriptSnippets:S3},Symbol.toStringTag,{value:"Module"})),Vc=["_blank","_self","_top","_parent"],tv=["ascii","utf-8","utf-16","latin1","latin1"],nv=["get","post","put","delete"],rv=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Qn=["true","false"],de={},qge={a:{attrs:{href:null,ping:null,type:null,media:null,target:Vc,hreflang:null}},abbr:de,address:de,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:de,aside:de,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:de,base:{attrs:{href:null,target:Vc}},bdi:de,bdo:de,blockquote:{attrs:{cite:null}},body:de,br:de,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:rv,formmethod:nv,formnovalidate:["novalidate"],formtarget:Vc,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:de,center:de,cite:de,code:de,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:de,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:de,div:de,dl:de,dt:de,em:de,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:de,figure:de,footer:de,form:{attrs:{action:null,name:null,"accept-charset":tv,autocomplete:["on","off"],enctype:rv,method:nv,novalidate:["novalidate"],target:Vc}},h1:de,h2:de,h3:de,h4:de,h5:de,h6:de,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:de,hgroup:de,hr:de,html:{attrs:{manifest:null}},i:de,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:rv,formmethod:nv,formnovalidate:["novalidate"],formtarget:Vc,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:de,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:de,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:de,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:tv,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:de,noscript:de,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:de,param:{attrs:{name:null,value:null}},pre:de,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:de,rt:de,ruby:de,samp:de,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:tv}},section:de,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:de,source:{attrs:{src:null,type:null,media:null}},span:de,strong:de,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:de,summary:de,sup:de,table:de,tbody:de,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:de,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:de,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:de,time:{attrs:{datetime:null}},title:de,tr:de,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:de,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:de},Q3={accesskey:null,class:null,contenteditable:Qn,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Qn,autocorrect:Qn,autocapitalize:Qn,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Qn,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Qn,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Qn,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Qn,"aria-hidden":Qn,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Qn,"aria-multiselectable":Qn,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Qn,"aria-relevant":null,"aria-required":Qn,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},I3="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of I3)Q3[t]=null;class Pf{constructor(e,n){this.tags={...qge,...e},this.globalAttrs={...Q3,...n},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Pf.default=new Pf;function Xl(t,e,n=t.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,n)):""}function Zl(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function N3(t,e,n){let r=n.tags[Xl(t,Zl(e))];return(r==null?void 0:r.children)||n.allTags}function CS(t,e){let n=[];for(let r=Zl(e);r&&!r.type.isTop;r=Zl(r.parent)){let i=Xl(t,r);if(i&&r.lastChild.name=="CloseTag")break;i&&n.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&n.push(i)}return n}const j3=/^[:\-\.\w\u00b7-\uffff]*$/;function tR(t,e,n,r,i){let s=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",o=Zl(n,n.name=="StartTag"||n.name=="TagName");return{from:r,to:i,options:N3(t.doc,o,e).map(a=>({label:a,type:"type"})).concat(CS(t.doc,n).map((a,l)=>({label:"/"+a,apply:"/"+a+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function nR(t,e,n,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:CS(t.doc,e).map((s,o)=>({label:s,apply:s+i,type:"type",boost:99-o})),validFor:j3}}function Yge(t,e,n,r){let i=[],s=0;for(let o of N3(t.doc,n,e))i.push({label:"<"+o,type:"type"});for(let o of CS(t.doc,n))i.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Uge(t,e,n,r,i){let s=Zl(n),o=s?e.tags[Xl(t.doc,s)]:null,a=o&&o.attrs?Object.keys(o.attrs):[],l=o&&o.globalAttrs===!1?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:l.map(c=>({label:c,type:"property"})),validFor:j3}}function Hge(t,e,n,r,i){var s;let o=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),a=[],l;if(o){let c=t.sliceDoc(o.from,o.to),u=e.globalAttrs[c];if(!u){let f=Zl(n),d=f?e.tags[Xl(t.doc,f)]:null;u=(d==null?void 0:d.attrs)&&d.attrs[c]}if(u){let f=t.sliceDoc(r,i).toLowerCase(),d='"',h='"';/^['"]/.test(f)?(l=f[0]=='"'?/^[^"]*$/:/^[^']*$/,d="",h=t.sliceDoc(i,i+1)==f[0]?"":f[0],f=f.slice(1),r++):l=/^[^\s<>='"]*$/;for(let g of u)a.push({label:g,apply:d+g+h,type:"constant"})}}return{from:r,to:i,options:a,validFor:l}}function M3(t,e){let{state:n,pos:r}=e,i=We(n).resolveInner(r,-1),s=i.resolve(r);for(let o=r,a;s==i&&(a=i.childBefore(o));){let l=a.lastChild;if(!l||!l.type.isError||l.from<l.to)break;s=i=a,o=l.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?nR(n,i,i.from,r):tR(n,t,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?tR(n,t,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?nR(n,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?Uge(n,t,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?Hge(n,t,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?Yge(n,t,i,r):null}function D3(t){return M3(Pf.default,t)}function L3(t){let{extraTags:e,extraGlobalAttributes:n}=t,r=n||e?new Pf(e,n):Pf.default;return i=>M3(r,i)}const Gge=pr.parser.configure({top:"SingleExpression"}),z3=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:wS.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:SS.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:kS.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:Gge},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:pr.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:Cf.parser}],B3=[{name:"style",parser:Cf.parser.configure({top:"Styles"})}].concat(I3.map(t=>({name:t,parser:pr.parser}))),V3=Dl.define({name:"html",parser:Pme.configure({props:[dc.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,n;for(let r=t.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((n=e.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),hc.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),PL.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Pu=V3.configure({wrap:h3(z3,B3)});function F3(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=h3((t.nestedLanguages||[]).concat(z3),(t.nestedAttributes||[]).concat(B3)));let r=n?V3.configure({wrap:n,dialect:e}):e?Pu.configure({dialect:e}):Pu;return new zl(r,[Pu.data.of({autocomplete:L3(t)}),t.autoCloseTags!==!1?X3:[],$3().support,b3().support])}const rR=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),X3=re.inputHandler.of((t,e,n,r,i)=>{if(t.composing||t.state.readOnly||e!=n||r!=">"&&r!="/"||!Pu.isActiveAt(t.state,e,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange(l=>{var c,u,f;let d=o.doc.sliceString(l.from-1,l.to)==r,{head:h}=l,g=We(o).resolveInner(h,-1),m;if(d&&r==">"&&g.name=="EndTag"){let v=g.parent;if(((u=(c=v.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(m=Xl(o.doc,v.parent,h))&&!rR.has(m)){let y=h+(o.doc.sliceString(h,h+1)===">"?1:0),x=`</${m}>`;return{range:l,changes:{from:h,to:y,insert:x}}}}else if(d&&r=="/"&&g.name=="IncompleteCloseTag"){let v=g.parent;if(g.from==h-2&&((f=v.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(m=Xl(o.doc,v,h))&&!rR.has(m)){let y=h+(o.doc.sliceString(h,h+1)===">"?1:0),x=`${m}>`;return{range:Z.cursor(h+x.length,-1),changes:{from:h,to:y,insert:x}}}}return{range:l}});return a.changes.empty?!1:(t.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Kge=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:X3,html:F3,htmlCompletionSource:D3,htmlCompletionSourceWith:L3,htmlLanguage:Pu},Symbol.toStringTag,{value:"Module"})),Z3=$g({commentTokens:{block:{open:"<!--",close:"-->"}}}),W3=new Oe,q3=xpe.configure({props:[hc.add(t=>!t.is("Block")||t.is("Document")||B0(t)!=null||Jge(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),W3.add(B0),dc.add({Document:()=>null}),As.add({Document:Z3})]});function B0(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function Jge(t){return t.name=="OrderedList"||t.name=="BulletList"}function eOe(t,e){let n=t;for(;;){let r=n.nextSibling,i;if(!r||(i=B0(r.type))!=null&&i<=e)break;n=r}return n.to}const tOe=dL.of((t,e,n)=>{for(let r=We(t).resolveInner(n,-1);r&&!(r.from<e);r=r.parent){let i=r.type.prop(W3);if(i==null)continue;let s=eOe(r,i);if(s>n)return{from:n,to:s}}return null});function PS(t){return new Fn(Z3,t,[],"markdown")}const Y3=PS(q3),nOe=q3.configure([$pe,Qpe,Ape,Ipe,{props:[hc.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),Tf=PS(nOe);function rOe(t,e){return n=>{if(n&&t){let r=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?r=t(n):r=D.matchLanguageName(t,n,!0),r instanceof D)return r.support?r.support.language.parser:ia.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}class iv{constructor(e,n,r,i,s,o,a){this.node=e,this.from=n,this.to=r,this.spaceBefore=i,this.spaceAfter=s,this.type=o,this.item=a}blank(e,n=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;r.length<e;)r+=" ";return r}else{for(let i=this.to-this.from-r.length-this.spaceAfter.length;i>0;i--)r+=" ";return r+(n?this.spaceAfter:"")}}marker(e,n){let r=this.node.name=="OrderedList"?String(+H3(this.item,e)[2]+n):"";return this.spaceBefore+r+this.type+this.spaceAfter}}function U3(t,e){let n=[],r=[];for(let i=t;i;i=i.parent){if(i.name=="FencedCode")return r;(i.name=="ListItem"||i.name=="Blockquote")&&n.push(i)}for(let i=n.length-1;i>=0;i--){let s=n[i],o,a=e.lineAt(s.from),l=s.from-a.from;if(s.name=="Blockquote"&&(o=/^ *>( ?)/.exec(a.text.slice(l))))r.push(new iv(s,l,l+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let c=o[3],u=o[0].length;c.length>=4&&(c=c.slice(0,c.length-4),u-=4),r.push(new iv(s.parent,l,l+u,o[1],c,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let c=o[4],u=o[0].length;c.length>4&&(c=c.slice(0,c.length-4),u-=4);let f=o[2];o[3]&&(f+=o[3].replace(/[xX]/," ")),r.push(new iv(s.parent,l,l+u,o[1],c,f,s))}}return r}function H3(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function sv(t,e,n,r=0){for(let i=-1,s=t;;){if(s.name=="ListItem"){let a=H3(s,e),l=+a[2];if(i>=0){if(l!=i+1)return;n.push({from:s.from+a[1].length,to:s.from+a[0].length,insert:String(i+2+r)})}i=l}let o=s.nextSibling;if(!o)break;s=o}}function TS(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(fc)!=" ")return t;let r=Zr(t,4,n),i="";for(let s=r;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+t.slice(n)}const G3=(t={})=>({state:e,dispatch:n})=>{let r=We(e),{doc:i}=e,s=null,o=e.changeByRange(a=>{if(!a.empty||!Tf.isActiveAt(e,a.from,-1)&&!Tf.isActiveAt(e,a.from,1))return s={range:a};let l=a.from,c=i.lineAt(l),u=U3(r.resolveInner(l,-1),i);for(;u.length&&u[u.length-1].from>l-c.from;)u.pop();if(!u.length)return s={range:a};let f=u[u.length-1];if(f.to-f.spaceAfter.length>l-c.from)return s={range:a};let d=l>=f.to-f.spaceAfter.length&&!/\S/.test(c.text.slice(f.to));if(f.item&&d){let y=f.node.firstChild,x=f.node.getChild("ListItem","ListItem");if(y.to>=l||x&&x.to<l||c.from>0&&!/[^\s>]/.test(i.lineAt(c.from-1).text)||t.nonTightLists===!1){let b=u.length>1?u[u.length-2]:null,k,w="";b&&b.item?(k=c.from+b.from,w=b.marker(i,1)):k=c.from+(b?b.to:0);let S=[{from:k,to:l,insert:w}];return f.node.name=="OrderedList"&&sv(f.item,i,S,-2),b&&b.node.name=="OrderedList"&&sv(b.item,i,S),{range:Z.cursor(k+w.length),changes:S}}else{let b=sR(u,e,c);return{range:Z.cursor(l+b.length+1),changes:{from:c.from,insert:b+e.lineBreak}}}}if(f.node.name=="Blockquote"&&d&&c.from){let y=i.lineAt(c.from-1),x=/>\s*$/.exec(y.text);if(x&&x.index==f.from){let b=e.changes([{from:y.from+x.index,to:y.to},{from:c.from+f.from,to:c.to}]);return{range:a.map(b),changes:b}}}let h=[];f.node.name=="OrderedList"&&sv(f.item,i,h);let g=f.item&&f.item.from<c.from,m="";if(!g||/^[\s\d.)\-+*>]*/.exec(c.text)[0].length>=f.to)for(let y=0,x=u.length-1;y<=x;y++)m+=y==x&&!g?u[y].marker(i,1):u[y].blank(y<x?Zr(c.text,4,u[y+1].from)-m.length:null);let v=l;for(;v>c.from&&/\s/.test(c.text.charAt(v-c.from-1));)v--;return m=TS(m,e),iOe(f.node,e.doc)&&(m=sR(u,e,c)+e.lineBreak+m),h.push({from:v,to:l,insert:e.lineBreak+m}),{range:Z.cursor(v+m.length+1),changes:h}});return s?!1:(n(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},K3=G3();function iR(t){return t.name=="QuoteMark"||t.name=="ListMark"}function iOe(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,r=t.getChild("ListItem","ListItem");if(!r)return!1;let i=e.lineAt(n.to),s=e.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+(o?0:1)<s.number}function sR(t,e,n){let r="";for(let i=0,s=t.length-2;i<=s;i++)r+=t[i].blank(i<s?Zr(n.text,4,t[i+1].from)-r.length:null,i<s);return TS(r,e)}function sOe(t,e){let n=t.resolveInner(e,-1),r=e;iR(n)&&(r=n.from,n=n.parent);for(let i;i=n.childBefore(r);)if(iR(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")n=i.lastChild,r=n.to;else break;return n}const J3=({state:t,dispatch:e})=>{let n=We(t),r=null,i=t.changeByRange(s=>{let o=s.from,{doc:a}=t;if(s.empty&&Tf.isActiveAt(t,s.from)){let l=a.lineAt(o),c=U3(sOe(n,o),a);if(c.length){let u=c[c.length-1],f=u.to-u.spaceAfter.length+(u.spaceAfter?1:0);if(o-l.from>f&&!/\S/.test(l.text.slice(f,o-l.from)))return{range:Z.cursor(l.from+f),changes:{from:l.from+f,to:o}};if(o-l.from==f&&(!u.item||l.from<=u.item.from||!/\S/.test(l.text.slice(0,u.to)))){let d=l.from+u.from;if(u.item&&u.node.from<u.item.from&&/\S/.test(l.text.slice(u.from,u.to))){let h=u.blank(Zr(l.text,4,u.to)-Zr(l.text,4,u.from));return d==l.from&&(h=TS(h,t)),{range:Z.cursor(d+h.length),changes:{from:d,to:l.from+u.to,insert:h}}}if(d<o)return{range:Z.cursor(d),changes:{from:d,to:o}}}}}return r={range:s}});return r?!1:(e(t.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},e4=[{key:"Enter",run:K3},{key:"Backspace",run:J3}],t4=F3({matchClosingTags:!1});function n4(t={}){let{codeLanguages:e,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=Y3,completeHTMLTags:s=!0,pasteURLAsLink:o=!0,htmlTagLanguage:a=t4}=t;if(!(i instanceof zg))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=t.extensions?[t.extensions]:[],c=[a.support,tOe],u;o&&c.push(r4),n instanceof zl?(c.push(n.support),u=n.language):n&&(u=n);let f=e||u?rOe(e,u):void 0;l.push(wpe({codeParser:f,htmlParser:a.language.parser})),r&&c.push(os.high(xa.of(e4)));let d=PS(i.configure(l));return s&&c.push(d.data.of({autocomplete:oOe})),new zl(d,c)}function oOe(t){let{state:e,pos:n}=t,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(n-25,n));if(!r)return null;let i=We(e).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:n-r[0].length,to:n,options:aOe(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let ov=null;function aOe(){if(ov)return ov;let t=D3(new tS(Ae.create({extensions:t4}),0,!0));return ov=t?t.options:[]}const lOe=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,r4=re.domEventHandlers({paste:(t,e)=>{var n;let{main:r}=e.state.selection;if(r.empty)return!1;let i=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!Tf.isActiveAt(e.state,r.from,1)))return!1;let s=We(e.state),o=!1;return s.iterate({from:r.from,to:r.to,enter:a=>{(a.from>r.from||lOe.test(a.name))&&(o=!0)},leave:a=>{a.to<r.to&&(o=!0)}}),o?!1:(e.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),cOe=Object.freeze(Object.defineProperty({__proto__:null,commonmarkLanguage:Y3,deleteMarkupBackward:J3,insertNewlineContinueMarkup:K3,insertNewlineContinueMarkupCommand:G3,markdown:n4,markdownKeymap:e4,markdownLanguage:Tf,pasteURLAsLink:r4},Symbol.toStringTag,{value:"Module"}));function uOe(t){return t.replace(/[\n\r\t]+/g," ").trim()}function fOe({notePath:t,content:e,onChange:n,onSaveShortcut:r,className:i}){const s=O.useRef(null),[o,a]=O.useState(!1),l=O.useCallback((y,x)=>{const b=s.current;if(!b)return;const k=b.state.selection.main,w=k.from,S=k.to,C=w+((x==null?void 0:x.anchorOffset)??y.length),_=w+((x==null?void 0:x.headOffset)??(x==null?void 0:x.anchorOffset)??y.length);b.dispatch({changes:{from:w,to:S,insert:y},selection:Z.range(C,_),scrollIntoView:!0}),b.focus()},[]),c=O.useCallback((y,x=y)=>{const b=s.current;if(!b)return!1;const k=b.state.selection.main,w=b.state.sliceDoc(k.from,k.to),S=`${y}${w}${x}`,C=k.from+y.length,_=C+w.length;return b.dispatch({changes:{from:k.from,to:k.to,insert:S},selection:Z.range(C,_),scrollIntoView:!0}),b.focus(),!0},[]),u=O.useCallback(y=>{const x=s.current;if(!x)return!1;switch(y){case"bold":return c("**","**");case"italic":return c("*","*");case"strike":return c("~~","~~");case"inlineCode":return c("`","`");case"bulletList":return l("- "),!0;case"orderedList":return l("1. "),!0;case"link":{const b=x.state.selection.main,k=x.state.sliceDoc(b.from,b.to)||"link text",w=`[${k}](https://)`,S=1+k.length+2;return l(w,{anchorOffset:S,headOffset:S+8}),!0}default:return!1}},[l,c]),f=O.useCallback(async y=>{if(!y.type.startsWith("image/"))return;const b=(await new Promise((S,C)=>{const _=new FileReader;_.onload=()=>S(String(_.result||"")),_.onerror=()=>C(new Error("Failed to read image")),_.readAsDataURL(y)})).split(",")[1]||"";if(!b)throw new Error("Invalid image payload");const k=await sl.post("/api/notes/assets",{notePath:t,fileName:y.name,contentBase64:b}),w=uOe(y.name)||"image";l(``)},[t,l]),d=O.useCallback(async y=>{const x=Array.from(y).filter(b=>b.type.startsWith("image/"));if(x.length!==0){a(!0);try{for(const b of x)await f(b)}catch(b){console.error("Failed to upload image",b)}finally{a(!1)}}},[f]),h=O.useCallback(y=>{var b,k;!((k=(b=y.dataTransfer)==null?void 0:b.files)!=null&&k.length)||!Array.from(y.dataTransfer.files).some(w=>w.type.startsWith("image/"))||(y.preventDefault(),d(y.dataTransfer.files))},[d]),g=O.useCallback(y=>{var b,k;!((k=(b=y.clipboardData)==null?void 0:b.files)!=null&&k.length)||!Array.from(y.clipboardData.files).some(w=>w.type.startsWith("image/"))||(y.preventDefault(),d(y.clipboardData.files))},[d]),m=O.useMemo(()=>[n4(),xa.of([{key:"Mod-s",run:()=>(r(),!0)},{key:"Mod-b",run:()=>u("bold")},{key:"Mod-i",run:()=>u("italic")},{key:"Mod-k",run:()=>u("link")},{key:"Mod-[",run:H1},{key:"Mod-]",run:U1}])],[r,u]),v=O.useMemo(()=>[{key:"bold",label:"Bold",icon:uZ},{key:"italic",label:"Italic",icon:vZ},{key:"strike",label:"Strike",icon:RZ},{key:"inlineCode",label:"Code",icon:pZ},{key:"link",label:"Link",icon:Kb},{key:"bulletList",label:"Bullet List",icon:wZ},{key:"orderedList",label:"Numbered List",icon:xZ}],[]);return p.jsxs("div",{className:le("note-editor h-full flex flex-col",i),onDropCapture:h,onPasteCapture:g,children:[p.jsxs("div",{className:"note-editor-toolbar",children:[p.jsx("div",{className:"note-editor-toolbar-actions",children:v.map(y=>{const x=y.icon;return p.jsx(Se,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2",onClick:()=>u(y.key),title:y.label,children:p.jsx(x,{className:"h-4 w-4"})},y.key)})}),p.jsxs("span",{className:"note-editor-toolbar-hint",children:[p.jsx("kbd",{children:"Cmd/Ctrl+S"})," save, raw markdown mode"]})]}),p.jsx("div",{className:"note-editor-surface",children:p.jsx(fS,{value:e,theme:uS,height:"100%",extensions:m,onChange:n,onCreateEditor:y=>{s.current=y},basicSetup:{lineNumbers:!0,foldGutter:!0,highlightActiveLine:!0,highlightActiveLineGutter:!0,autocompletion:!0,bracketMatching:!0,closeBrackets:!0,syntaxHighlighting:!0},className:"note-editor-cm"})}),o&&p.jsx("div",{className:"note-editor-loading",children:"Uploading image..."})]})}function dOe(t){return t.split("/").map(e=>encodeURIComponent(e)).join("/")}function hOe({notePath:t,debounceMs:e=1200}){const[n,r]=O.useState("idle"),[i,s]=O.useState(null),[o,a]=O.useState(null),l=O.useRef(t),c=O.useRef(""),u=O.useRef(null),f=O.useRef(0);O.useEffect(()=>{l.current=t,c.current="",r("idle"),s(null),u.current&&(clearTimeout(u.current),u.current=null)},[t]);const d=O.useCallback(async v=>{const y=f.current+1;f.current=y,r("saving"),s(null);try{if(await sl.put(`/api/notes/files/${dOe(l.current)}`,{content:v}),f.current!==y)return;r("saved"),a(new Date)}catch(x){if(f.current!==y)return;r("error"),s(x instanceof Error?x.message:"Failed to save note")}},[]),h=O.useCallback(async v=>{u.current&&(clearTimeout(u.current),u.current=null);const y=v??c.current;typeof y=="string"&&(c.current=y,await d(y))},[d]),g=O.useCallback(v=>{c.current=v,r(y=>y==="saving"?y:"dirty"),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{u.current=null,d(v)},e)},[e,d]),m=O.useCallback(()=>{u.current&&(clearTimeout(u.current),u.current=null)},[]);return O.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]),{status:n,error:i,lastSavedAt:o,queueSave:g,saveNow:h,cancelQueuedSave:m}}function pOe({link:t,onClick:e,className:n}){const r=t.alias||t.target;return p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsxs("button",{onClick:()=>e(t.target),className:le("inline-flex items-center gap-0.5 px-1 py-0.5 rounded","text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300","bg-blue-50 dark:bg-blue-950 hover:bg-blue-100 dark:hover:bg-blue-900","transition-colors cursor-pointer",!t.exists&&"text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-950",!t.exists&&"hover:bg-red-100 dark:hover:bg-red-900",n),children:[t.exists?p.jsx(Kb,{className:"h-3 w-3"}):p.jsx(Or,{className:"h-3 w-3"}),p.jsx("span",{children:r})]})}),p.jsx(On,{side:"top",className:"text-xs",children:t.exists?t.indexed?p.jsxs("span",{children:["Open doc: ",t.target]}):p.jsxs("span",{children:["Doc exists but not indexed: ",t.target]}):p.jsxs("span",{children:["Doc not found: ",t.target]})})]})}function mOe(t){var s;const e=/\[\[([^\]|]+)(?:\|([^\]]+))?\]\]/g,n=[],r=[];let i;for(;(i=e.exec(t))!==null;){const o=i[1].trim(),a=(s=i[2])==null?void 0:s.trim(),l={target:o,alias:a,exists:!0,indexed:!0};n.push(l),r.push({start:i.index,end:i.index+i[0].length,link:l})}return{links:n,positions:r}}function gOe(t){const{links:e}=mOe(t),n=new Set(e.map(r=>r.target));return Array.from(n)}function OOe({backlinks:t,currentNote:e,onNavigate:n,isLoading:r=!1,className:i}){const[s,o]=O.useState(!1),a=Array.isArray(t)?t:[];return!r&&a.length===0?null:p.jsxs(bw,{open:s,onOpenChange:o,className:le("border-t",i),children:[p.jsxs(ww,{className:"w-full px-3 py-2 flex items-center justify-between text-sm bg-muted/30 hover:bg-muted/50 transition-colors",children:[p.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[p.jsx(Kb,{className:"h-4 w-4"}),p.jsx("span",{children:"Backlinks"}),p.jsxs("span",{className:"text-xs",children:["(",r?"...":a.length,")"]})]}),p.jsx(pa,{className:le("h-4 w-4 text-muted-foreground transition-transform",s&&"rotate-180")})]}),p.jsx(Sw,{children:p.jsx(sc,{className:"max-h-48",children:p.jsx("div",{className:"p-2 space-y-1",children:a.map((l,c)=>p.jsx(yOe,{backlink:l,onClick:()=>n(l.source)},`${l.source}-${c}`))})})})]})}function yOe({backlink:t,onClick:e}){const n=t.source.split("/").pop()||t.source,r=vOe(t.context);return p.jsxs("button",{onClick:e,className:le("w-full text-left p-2 rounded-md","hover:bg-accent transition-colors","group"),children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Sn,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}),p.jsx("span",{className:"font-medium text-sm truncate",children:n}),p.jsx(Fm,{className:"h-3 w-3 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity ml-auto"})]}),p.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2 ml-6",dangerouslySetInnerHTML:{__html:r}})]})}function vOe(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\[\[([^\]]+)\]\]/g,'<span class="text-blue-600 dark:text-blue-400 font-medium">[[$1]]</span>')}function xOe(t,e){return function({children:r}){var c;if(typeof r!="string")return p.jsx(p.Fragment,{children:r});const i=r,s=/\[\[([^\]|]+)(?:\|([^\]]+))?\]\]/g,o=[];let a=0,l;for(;(l=s.exec(i))!==null;){l.index>a&&o.push(i.slice(a,l.index));const u=l[1].trim(),f=(c=l[2])==null?void 0:c.trim(),d=t.get(u)||{target:u,alias:f,exists:!0,indexed:!0};o.push(p.jsx(pOe,{link:{...d,alias:f},onClick:e},l.index)),a=l.index+l[0].length}return a<i.length&&o.push(i.slice(a)),o.length>0?p.jsx(p.Fragment,{children:o}):p.jsx(p.Fragment,{children:i})}}function bOe({notePath:t,content:e,onClose:n,onNavigate:r,className:i}){const[s,o]=O.useState(!1),[a,l]=O.useState(e??""),{status:c,error:u,lastSavedAt:f,queueSave:d,saveNow:h,cancelQueuedSave:g}=hOe({notePath:t,debounceMs:1200}),[m,v]=O.useState([t]),[y,x]=O.useState(0),[b,k]=O.useState(new Map),[w,S]=O.useState([]),[C,_]=O.useState(!1),[I,E]=O.useState({});O.useEffect(()=>{l(e??""),o(!1)},[t,e]),O.useEffect(()=>{if(t!==m[y]){const P=m.slice(0,y+1);P.push(t),v(P),x(P.length-1)}},[t]),O.useEffect(()=>{if(!a||s)return;const P=gOe(a);P.length>0&&SOe(P).then(k),_(!0),kOe(t).then(S).finally(()=>_(!1))},[a,s,t]);const j=y>0,A=y<m.length-1,L=O.useCallback(()=>{if(j){const P=y-1;x(P),r(m[P])}},[j,y,m,r]),z=O.useCallback(()=>{if(A){const P=y+1;x(P),r(m[P])}},[A,y,m,r]),X=O.useCallback(P=>{const M=wOe(P);r(M)},[r]),W=O.useCallback(P=>{const M=P==="edit";M!==s&&(M||(g(),h(a)),o(M))},[g,a,s,h]),F=O.useCallback(P=>{l(P),d(P)},[d]),N=O.useCallback(()=>{h(a)},[a,h]),Q=O.useMemo(()=>{const P=xOe(b,X);return{p:({children:M,...$})=>p.jsx("p",{...$,className:"mb-4 leading-relaxed",children:oR(M,P)}),li:({children:M,...$})=>p.jsx("li",{...$,children:oR(M,P)}),h1:({children:M,...$})=>p.jsx("h1",{...$,className:"text-2xl font-bold mb-4 mt-6",children:M}),h2:({children:M,...$})=>p.jsx("h2",{...$,className:"text-xl font-bold mb-3 mt-5",children:M}),h3:({children:M,...$})=>p.jsx("h3",{...$,className:"text-lg font-semibold mb-2 mt-4",children:M}),h4:({children:M,...$})=>p.jsx("h4",{...$,className:"text-base font-semibold mb-2 mt-3",children:M}),ul:({children:M,...$})=>p.jsx("ul",{...$,className:"list-disc list-inside mb-4 space-y-1",children:M}),ol:({children:M,...$})=>p.jsx("ol",{...$,className:"list-decimal list-inside mb-4 space-y-1",children:M}),blockquote:({children:M,...$})=>p.jsx("blockquote",{...$,className:"border-l-4 border-muted-foreground/30 pl-4 italic my-4 text-muted-foreground",children:M}),code:({inline:M,className:$,children:R,...q})=>M?p.jsx("code",{...q,className:"bg-muted px-1.5 py-0.5 rounded text-sm font-mono",children:R}):p.jsx("code",{...q,className:le("block bg-muted p-4 rounded-md text-sm font-mono overflow-x-auto mb-4",$),children:R}),pre:({children:M,...$})=>p.jsx("pre",{...$,className:"mb-4",children:M}),a:({href:M,children:$,...R})=>p.jsx("a",{...R,href:M,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline",children:$}),hr:M=>p.jsx("hr",{...M,className:"my-6 border-muted-foreground/20"}),table:({children:M,...$})=>p.jsx("div",{className:"overflow-x-auto mb-4",children:p.jsx("table",{...$,className:"min-w-full border-collapse",children:M})}),th:({children:M,...$})=>p.jsx("th",{...$,className:"border border-muted-foreground/20 px-3 py-2 bg-muted text-left font-semibold",children:M}),td:({children:M,...$})=>p.jsx("td",{...$,className:"border border-muted-foreground/20 px-3 py-2",children:M})}},[b,X]);return p.jsxs("div",{className:le("flex flex-col h-full",i),children:[p.jsxs("div",{className:"border-b px-4 py-2 flex items-center justify-between bg-muted/5",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("div",{className:"flex items-center gap-0.5 mr-2",children:[p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Se,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:L,disabled:!j,children:p.jsx(cZ,{className:"h-4 w-4"})})}),p.jsx(On,{children:"Go back"})]}),p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Se,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:z,disabled:!A,children:p.jsx(Hb,{className:"h-4 w-4"})})}),p.jsx(On,{children:"Go forward"})]})]}),p.jsx(jw,{value:s?"edit":"view",onValueChange:W,children:p.jsxs(cg,{className:"h-7 p-0.5 mr-1",children:[p.jsx(Rl,{value:"view",className:"h-6 px-4 text-xs",children:"View"}),p.jsx(Rl,{value:"edit",className:"h-6 px-4 text-xs",children:"Edit"})]})}),p.jsx(Sn,{className:"h-4 w-4 text-blue-500"}),p.jsx("span",{className:"font-medium",children:t}),p.jsx(Ot,{variant:s?c==="error"?"destructive":c==="saving"?"info":c==="dirty"?"warning":"success":"success",className:"text-xs",children:s?c==="saving"?"Saving...":c==="dirty"?"Unsaved":c==="error"?"Save error":"Saved":"View mode"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[s&&p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Se,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:N,children:p.jsx(PZ,{className:"h-4 w-4"})})}),p.jsx(On,{children:"Save now (Cmd/Ctrl+S)"})]}),p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Se,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:n,children:p.jsx(zf,{className:"h-4 w-4"})})}),p.jsx(On,{children:"Close"})]})]})]}),s?p.jsx("div",{className:"flex-1 min-h-0",children:p.jsx(fOe,{notePath:t,content:a,onChange:F,onSaveShortcut:N,className:"h-full"},t)}):p.jsx(sc,{className:"flex-1",children:p.jsx("div",{className:"p-6 max-w-3xl mx-auto",children:a?p.jsx(cie,{remarkPlugins:[woe],components:Q,children:a}):p.jsxs("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:[p.jsx(Un,{className:"h-6 w-6 animate-spin mr-2"}),"Loading content..."]})})}),p.jsx(OOe,{backlinks:w,currentNote:t,onNavigate:r,isLoading:C}),p.jsxs("div",{className:"border-t px-4 py-2 flex items-center justify-between text-xs text-muted-foreground bg-muted/5",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[I.chunks&&p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(cA,{className:"h-3 w-3"}),I.chunks," chunks"]}),s&&u&&p.jsx("span",{className:"text-red-500",children:u})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[s&&f&&p.jsxs("span",{children:["Saved ",f.toLocaleTimeString()]}),I.lastIndexed&&p.jsxs("span",{children:["Indexed ",I.lastIndexed]})]})]})]})}function oR(t,e){return typeof t=="string"?p.jsx(e,{children:t}):Array.isArray(t)?t.map((n,r)=>typeof n=="string"?p.jsx(e,{children:n},r):n):t}function wOe(t){return t.endsWith(".md")?t:`${t}.md`}async function SOe(t){const e=new Map;try{const n=await fetch("/api/notes/links/check",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({targets:t})});if(n.ok){const r=await n.json();for(const[i,s]of Object.entries(r))e.set(i,s)}}catch(n){console.error("Failed to check wiki-link status:",n)}for(const n of t)e.has(n)||e.set(n,{target:n,exists:!0,indexed:!0});return e}async function kOe(t){try{const e=t.split("/").map(encodeURIComponent).join("/"),n=await fetch(`/api/notes/backlinks/${e}`);if(n.ok){const r=await n.json();return Array.isArray(r.backlinks)?r.backlinks:[]}}catch(e){console.error("Failed to fetch backlinks:",e)}return[]}var i4=t=>{var{theme:e,settings:n={},styles:r=[]}=t,i={".cm-gutters":{}},s={};n.background&&(s.backgroundColor=n.background),n.backgroundImage&&(s.backgroundImage=n.backgroundImage),n.foreground&&(s.color=n.foreground),n.fontSize&&(s.fontSize=n.fontSize),(n.background||n.foreground)&&(i["&"]=s),n.fontFamily&&(i["&.cm-editor .cm-scroller"]={fontFamily:n.fontFamily}),n.gutterBackground&&(i[".cm-gutters"].backgroundColor=n.gutterBackground),n.gutterForeground&&(i[".cm-gutters"].color=n.gutterForeground),n.gutterBorder&&(i[".cm-gutters"].borderRightColor=n.gutterBorder),n.caret&&(i[".cm-content"]={caretColor:n.caret},i[".cm-cursor, .cm-dropCursor"]={borderLeftColor:n.caret});var o={};n.gutterActiveForeground&&(o.color=n.gutterActiveForeground),n.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:n.lineHighlight},o.backgroundColor=n.lineHighlight),i[".cm-activeLineGutter"]=o,n.selection&&(i["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:n.selection+" !important"}),n.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:n.selectionMatch});var a=re.theme(i,{dark:e==="dark"}),l=pc.define(r),c=[a,Ig(l)];return c},COe={background:"#fff",foreground:"#24292e",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#6e7781"},POe=[{tag:[T.standard(T.tagName),T.tagName],color:"#116329"},{tag:[T.comment,T.bracket],color:"#6a737d"},{tag:[T.className,T.propertyName],color:"#6f42c1"},{tag:[T.variableName,T.attributeName,T.number,T.operator],color:"#005cc5"},{tag:[T.keyword,T.typeName,T.typeOperator,T.typeName],color:"#d73a49"},{tag:[T.string,T.meta,T.regexp],color:"#032f62"},{tag:[T.name,T.quote],color:"#22863a"},{tag:[T.heading,T.strong],color:"#24292e",fontWeight:"bold"},{tag:[T.emphasis],color:"#24292e",fontStyle:"italic"},{tag:[T.deleted],color:"#b31d28",backgroundColor:"ffeef0"},{tag:[T.atom,T.bool,T.special(T.variableName)],color:"#e36209"},{tag:[T.url,T.escape,T.regexp,T.link],color:"#032f62"},{tag:T.link,textDecoration:"underline"},{tag:T.strikethrough,textDecoration:"line-through"},{tag:T.invalid,color:"#cb2431"}],TOe=t=>{var{theme:e="light",settings:n={},styles:r=[]}={};return i4({theme:e,settings:Al({},COe,n),styles:[...POe,...r]})},EOe=TOe(),ROe={background:"#0d1117",foreground:"#c9d1d9",caret:"#c9d1d9",selection:"#003d73",selectionMatch:"#003d73",lineHighlight:"#36334280"},_Oe=[{tag:[T.standard(T.tagName),T.tagName],color:"#7ee787"},{tag:[T.comment,T.bracket],color:"#8b949e"},{tag:[T.className,T.propertyName],color:"#d2a8ff"},{tag:[T.variableName,T.attributeName,T.number,T.operator],color:"#79c0ff"},{tag:[T.keyword,T.typeName,T.typeOperator,T.typeName],color:"#ff7b72"},{tag:[T.string,T.meta,T.regexp],color:"#a5d6ff"},{tag:[T.name,T.quote],color:"#7ee787"},{tag:[T.heading,T.strong],color:"#d2a8ff",fontWeight:"bold"},{tag:[T.emphasis],color:"#d2a8ff",fontStyle:"italic"},{tag:[T.deleted],color:"#ffdcd7",backgroundColor:"ffeef0"},{tag:[T.atom,T.bool,T.special(T.variableName)],color:"#ffab70"},{tag:T.link,textDecoration:"underline"},{tag:T.strikethrough,textDecoration:"line-through"},{tag:T.invalid,color:"#f97583"}],$Oe=t=>{var{theme:e="dark",settings:n={},styles:r=[]}={};return i4({theme:e,settings:Al({},ROe,n),styles:[..._Oe,...r]})};$Oe();const AOe="modulepreload",QOe=function(t){return"/"+t},aR={},B=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=QOe(l),l in aR)return;aR[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":AOe,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((d,h)=>{f.addEventListener("load",d),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})};function U(t){return new zl(F1.define(t))}function Os(t){return B(()=>import("./index-VnBXaSng.js"),[]).then(e=>e.sql({dialect:e[t]}))}const av=[D.of({name:"C",extensions:["c","h","ino"],load(){return B(()=>import("./index-BR0D24wt.js"),[]).then(t=>t.cpp())}}),D.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return B(()=>import("./index-BR0D24wt.js"),[]).then(t=>t.cpp())}}),D.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Os("Cassandra")}}),D.of({name:"CSS",extensions:["css"],load(){return B(()=>Promise.resolve().then(()=>oge),void 0).then(t=>t.css())}}),D.of({name:"Go",extensions:["go"],load(){return B(()=>import("./index-BHi_kGSi.js"),[]).then(t=>t.go())}}),D.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return B(()=>Promise.resolve().then(()=>Kge),void 0).then(t=>t.html())}}),D.of({name:"Java",extensions:["java"],load(){return B(()=>import("./index-XEgqkWdk.js"),[]).then(t=>t.java())}}),D.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return B(()=>Promise.resolve().then(()=>dh),void 0).then(t=>t.javascript())}}),D.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return B(()=>import("./index-ChuKVzLw.js"),[]).then(t=>t.jinja())}}),D.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return B(()=>import("./index-BdLsiQv5.js"),[]).then(t=>t.json())}}),D.of({name:"JSX",extensions:["jsx"],load(){return B(()=>Promise.resolve().then(()=>dh),void 0).then(t=>t.javascript({jsx:!0}))}}),D.of({name:"LESS",extensions:["less"],load(){return B(()=>import("./index-MR5aWKcm.js"),[]).then(t=>t.less())}}),D.of({name:"Liquid",extensions:["liquid"],load(){return B(()=>import("./index-CV8De3J9.js"),[]).then(t=>t.liquid())}}),D.of({name:"MariaDB SQL",load(){return Os("MariaSQL")}}),D.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return B(()=>Promise.resolve().then(()=>cOe),void 0).then(t=>t.markdown())}}),D.of({name:"MS SQL",load(){return Os("MSSQL")}}),D.of({name:"MySQL",load(){return Os("MySQL")}}),D.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return B(()=>import("./index-zHvewZlp.js"),[]).then(t=>t.php())}}),D.of({name:"PLSQL",extensions:["pls"],load(){return Os("PLSQL")}}),D.of({name:"PostgreSQL",load(){return Os("PostgreSQL")}}),D.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return B(()=>import("./index-DR3bJemi.js"),[]).then(t=>t.python())}}),D.of({name:"Rust",extensions:["rs"],load(){return B(()=>import("./index-BNSDh5mD.js"),[]).then(t=>t.rust())}}),D.of({name:"Sass",extensions:["sass"],load(){return B(()=>import("./index-NbLWR4tH.js"),[]).then(t=>t.sass({indented:!0}))}}),D.of({name:"SCSS",extensions:["scss"],load(){return B(()=>import("./index-NbLWR4tH.js"),[]).then(t=>t.sass())}}),D.of({name:"SQL",extensions:["sql"],load(){return Os("StandardSQL")}}),D.of({name:"SQLite",load(){return Os("SQLite")}}),D.of({name:"TSX",extensions:["tsx"],load(){return B(()=>Promise.resolve().then(()=>dh),void 0).then(t=>t.javascript({jsx:!0,typescript:!0}))}}),D.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return B(()=>Promise.resolve().then(()=>dh),void 0).then(t=>t.javascript({typescript:!0}))}}),D.of({name:"WebAssembly",extensions:["wat","wast"],load(){return B(()=>import("./index-BMLAwwWL.js"),[]).then(t=>t.wast())}}),D.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return B(()=>import("./index-D90_xI0s.js"),[]).then(t=>t.xml())}}),D.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return B(()=>import("./index-MrhuDMHQ.js"),[]).then(t=>t.yaml())}}),D.of({name:"APL",extensions:["dyalog","apl"],load(){return B(()=>import("./apl-B4CMkyY2.js"),[]).then(t=>U(t.apl))}}),D.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return B(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(t=>U(t.asciiArmor))}}),D.of({name:"ASN.1",extensions:["asn","asn1"],load(){return B(()=>import("./asn1-EdZsLKOL.js"),[]).then(t=>U(t.asn1({})))}}),D.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return B(()=>import("./asterisk-B-8jnY81.js"),[]).then(t=>U(t.asterisk))}}),D.of({name:"Brainfuck",extensions:["b","bf"],load(){return B(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(t=>U(t.brainfuck))}}),D.of({name:"Cobol",extensions:["cob","cpy"],load(){return B(()=>import("./cobol-CWcv1MsR.js"),[]).then(t=>U(t.cobol))}}),D.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return B(()=>import("./clike-B9uivgTg.js"),[]).then(t=>U(t.csharp))}}),D.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return B(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>U(t.clojure))}}),D.of({name:"ClojureScript",extensions:["cljs"],load(){return B(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>U(t.clojure))}}),D.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return B(()=>import("./css-BnMrqG3P.js"),[]).then(t=>U(t.gss))}}),D.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return B(()=>import("./cmake-BQqOBYOt.js"),[]).then(t=>U(t.cmake))}}),D.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return B(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(t=>U(t.coffeeScript))}}),D.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return B(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(t=>U(t.commonLisp))}}),D.of({name:"Cypher",extensions:["cyp","cypher"],load(){return B(()=>import("./cypher-C_CwsFkJ.js"),[]).then(t=>U(t.cypher))}}),D.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return B(()=>import("./python-BuPzkPfP.js"),[]).then(t=>U(t.cython))}}),D.of({name:"Crystal",extensions:["cr"],load(){return B(()=>import("./crystal-SjHAIU92.js"),[]).then(t=>U(t.crystal))}}),D.of({name:"D",extensions:["d"],load(){return B(()=>import("./d-pRatUO7H.js"),[]).then(t=>U(t.d))}}),D.of({name:"Dart",extensions:["dart"],load(){return B(()=>import("./clike-B9uivgTg.js"),[]).then(t=>U(t.dart))}}),D.of({name:"diff",extensions:["diff","patch"],load(){return B(()=>import("./diff-DbItnlRl.js"),[]).then(t=>U(t.diff))}}),D.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return B(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([0,1])).then(t=>U(t.dockerFile))}}),D.of({name:"DTD",extensions:["dtd"],load(){return B(()=>import("./dtd-DF_7sFjM.js"),[]).then(t=>U(t.dtd))}}),D.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return B(()=>import("./dylan-DwRh75JA.js"),[]).then(t=>U(t.dylan))}}),D.of({name:"EBNF",load(){return B(()=>import("./ebnf-CDyGwa7X.js"),[]).then(t=>U(t.ebnf))}}),D.of({name:"ECL",extensions:["ecl"],load(){return B(()=>import("./ecl-Cabwm37j.js"),[]).then(t=>U(t.ecl))}}),D.of({name:"edn",extensions:["edn"],load(){return B(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>U(t.clojure))}}),D.of({name:"Eiffel",extensions:["e"],load(){return B(()=>import("./eiffel-CnydiIhH.js"),[]).then(t=>U(t.eiffel))}}),D.of({name:"Elm",extensions:["elm"],load(){return B(()=>import("./elm-vLlmbW-K.js"),[]).then(t=>U(t.elm))}}),D.of({name:"Erlang",extensions:["erl"],load(){return B(()=>import("./erlang-BNw1qcRV.js"),[]).then(t=>U(t.erlang))}}),D.of({name:"Esper",load(){return B(()=>import("./sql-D0XecflT.js"),[]).then(t=>U(t.esper))}}),D.of({name:"Factor",extensions:["factor"],load(){return B(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([2,1])).then(t=>U(t.factor))}}),D.of({name:"FCL",load(){return B(()=>import("./fcl-Kvtd6kyn.js"),[]).then(t=>U(t.fcl))}}),D.of({name:"Forth",extensions:["forth","fth","4th"],load(){return B(()=>import("./forth-Ffai-XNe.js"),[]).then(t=>U(t.forth))}}),D.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return B(()=>import("./fortran-DYz_wnZ1.js"),[]).then(t=>U(t.fortran))}}),D.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return B(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>U(t.fSharp))}}),D.of({name:"Gas",extensions:["s"],load(){return B(()=>import("./gas-Bneqetm1.js"),[]).then(t=>U(t.gas))}}),D.of({name:"Gherkin",extensions:["feature"],load(){return B(()=>import("./gherkin-heZmZLOM.js"),[]).then(t=>U(t.gherkin))}}),D.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return B(()=>import("./groovy-D9Dt4D0W.js"),[]).then(t=>U(t.groovy))}}),D.of({name:"Haskell",extensions:["hs"],load(){return B(()=>import("./haskell-BWDZoCOh.js"),[]).then(t=>U(t.haskell))}}),D.of({name:"Haxe",extensions:["hx"],load(){return B(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>U(t.haxe))}}),D.of({name:"HXML",extensions:["hxml"],load(){return B(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>U(t.hxml))}}),D.of({name:"HTTP",load(){return B(()=>import("./http-DBlCnlav.js"),[]).then(t=>U(t.http))}}),D.of({name:"IDL",extensions:["pro"],load(){return B(()=>import("./idl-BEugSyMb.js"),[]).then(t=>U(t.idl))}}),D.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return B(()=>import("./javascript-qCveANmP.js"),[]).then(t=>U(t.jsonld))}}),D.of({name:"Julia",extensions:["jl"],load(){return B(()=>import("./julia-DuME0IfC.js"),[]).then(t=>U(t.julia))}}),D.of({name:"Kotlin",extensions:["kt","kts"],load(){return B(()=>import("./clike-B9uivgTg.js"),[]).then(t=>U(t.kotlin))}}),D.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return B(()=>import("./livescript-BwQOo05w.js"),[]).then(t=>U(t.liveScript))}}),D.of({name:"Lua",extensions:["lua"],load(){return B(()=>import("./lua-BgMRiT3U.js"),[]).then(t=>U(t.lua))}}),D.of({name:"mIRC",extensions:["mrc"],load(){return B(()=>import("./mirc-CjQqDB4T.js"),[]).then(t=>U(t.mirc))}}),D.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return B(()=>import("./mathematica-DTrFuWx2.js"),[]).then(t=>U(t.mathematica))}}),D.of({name:"Modelica",extensions:["mo"],load(){return B(()=>import("./modelica-Dc1JOy9r.js"),[]).then(t=>U(t.modelica))}}),D.of({name:"MUMPS",extensions:["mps"],load(){return B(()=>import("./mumps-BT43cFF4.js"),[]).then(t=>U(t.mumps))}}),D.of({name:"Mbox",extensions:["mbox"],load(){return B(()=>import("./mbox-CNhZ1qSd.js"),[]).then(t=>U(t.mbox))}}),D.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return B(()=>import("./nginx-DdIZxoE0.js"),[]).then(t=>U(t.nginx))}}),D.of({name:"NSIS",extensions:["nsh","nsi"],load(){return B(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([3,1])).then(t=>U(t.nsis))}}),D.of({name:"NTriples",extensions:["nt","nq"],load(){return B(()=>import("./ntriples-BfvgReVJ.js"),[]).then(t=>U(t.ntriples))}}),D.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return B(()=>import("./clike-B9uivgTg.js"),[]).then(t=>U(t.objectiveC))}}),D.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return B(()=>import("./clike-B9uivgTg.js"),[]).then(t=>U(t.objectiveCpp))}}),D.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return B(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>U(t.oCaml))}}),D.of({name:"Octave",extensions:["m"],load(){return B(()=>import("./octave-Ck1zUtKM.js"),[]).then(t=>U(t.octave))}}),D.of({name:"Oz",extensions:["oz"],load(){return B(()=>import("./oz-BzwKVEFT.js"),[]).then(t=>U(t.oz))}}),D.of({name:"Pascal",extensions:["p","pas"],load(){return B(()=>import("./pascal--L3eBynH.js"),[]).then(t=>U(t.pascal))}}),D.of({name:"Perl",extensions:["pl","pm"],load(){return B(()=>import("./perl-CdXCOZ3F.js"),[]).then(t=>U(t.perl))}}),D.of({name:"Pig",extensions:["pig"],load(){return B(()=>import("./pig-CevX1Tat.js"),[]).then(t=>U(t.pig))}}),D.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return B(()=>import("./powershell-CFHJl5sT.js"),[]).then(t=>U(t.powerShell))}}),D.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return B(()=>import("./properties-C78fOPTZ.js"),[]).then(t=>U(t.properties))}}),D.of({name:"ProtoBuf",extensions:["proto"],load(){return B(()=>import("./protobuf-ChK-085T.js"),[]).then(t=>U(t.protobuf))}}),D.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return B(()=>import("./pug-DukmZTjD.js"),__vite__mapDeps([4,5])).then(t=>U(t.pug))}}),D.of({name:"Puppet",extensions:["pp"],load(){return B(()=>import("./puppet-DMA9R1ak.js"),[]).then(t=>U(t.puppet))}}),D.of({name:"Q",extensions:["q"],load(){return B(()=>import("./q-pXgVlZs6.js"),[]).then(t=>U(t.q))}}),D.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return B(()=>import("./r-DUYO_cvP.js"),[]).then(t=>U(t.r))}}),D.of({name:"RPM Changes",load(){return B(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>U(t.rpmChanges))}}),D.of({name:"RPM Spec",extensions:["spec"],load(){return B(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>U(t.rpmSpec))}}),D.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return B(()=>import("./ruby-B2Rjki9n.js"),[]).then(t=>U(t.ruby))}}),D.of({name:"SAS",extensions:["sas"],load(){return B(()=>import("./sas-B4kiWyti.js"),[]).then(t=>U(t.sas))}}),D.of({name:"Scala",extensions:["scala"],load(){return B(()=>import("./clike-B9uivgTg.js"),[]).then(t=>U(t.scala))}}),D.of({name:"Scheme",extensions:["scm","ss"],load(){return B(()=>import("./scheme-C41bIUwD.js"),[]).then(t=>U(t.scheme))}}),D.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return B(()=>import("./shell-CjFT_Tl9.js"),[]).then(t=>U(t.shell))}}),D.of({name:"Sieve",extensions:["siv","sieve"],load(){return B(()=>import("./sieve-C3Gn_uJK.js"),[]).then(t=>U(t.sieve))}}),D.of({name:"Smalltalk",extensions:["st"],load(){return B(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(t=>U(t.smalltalk))}}),D.of({name:"Solr",load(){return B(()=>import("./solr-DehyRSwq.js"),[]).then(t=>U(t.solr))}}),D.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return B(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>U(t.sml))}}),D.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return B(()=>import("./sparql-DkYu6x3z.js"),[]).then(t=>U(t.sparql))}}),D.of({name:"Spreadsheet",alias:["excel","formula"],load(){return B(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(t=>U(t.spreadsheet))}}),D.of({name:"Squirrel",extensions:["nut"],load(){return B(()=>import("./clike-B9uivgTg.js"),[]).then(t=>U(t.squirrel))}}),D.of({name:"Stylus",extensions:["styl"],load(){return B(()=>import("./stylus-B533Al4x.js"),[]).then(t=>U(t.stylus))}}),D.of({name:"Swift",extensions:["swift"],load(){return B(()=>import("./swift-BzpIVaGY.js"),[]).then(t=>U(t.swift))}}),D.of({name:"sTeX",load(){return B(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>U(t.stex))}}),D.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return B(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>U(t.stex))}}),D.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return B(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>U(t.verilog))}}),D.of({name:"Tcl",extensions:["tcl"],load(){return B(()=>import("./tcl-DVfN8rqt.js"),[]).then(t=>U(t.tcl))}}),D.of({name:"Textile",extensions:["textile"],load(){return B(()=>import("./textile-CnDTJFAw.js"),[]).then(t=>U(t.textile))}}),D.of({name:"TiddlyWiki",load(){return B(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(t=>U(t.tiddlyWiki))}}),D.of({name:"Tiki wiki",load(){return B(()=>import("./tiki-DGYXhP31.js"),[]).then(t=>U(t.tiki))}}),D.of({name:"TOML",extensions:["toml"],load(){return B(()=>import("./toml-Bm5Em-hy.js"),[]).then(t=>U(t.toml))}}),D.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return B(()=>import("./troff-wAsdV37c.js"),[]).then(t=>U(t.troff))}}),D.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return B(()=>import("./ttcn-CfJYG6tj.js"),[]).then(t=>U(t.ttcn))}}),D.of({name:"TTCN_CFG",extensions:["cfg"],load(){return B(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(t=>U(t.ttcnCfg))}}),D.of({name:"Turtle",extensions:["ttl"],load(){return B(()=>import("./turtle-B1tBg_DP.js"),[]).then(t=>U(t.turtle))}}),D.of({name:"Web IDL",extensions:["webidl"],load(){return B(()=>import("./webidl-ZXfAyPTL.js"),[]).then(t=>U(t.webIDL))}}),D.of({name:"VB.NET",extensions:["vb"],load(){return B(()=>import("./vb-CmGdzxic.js"),[]).then(t=>U(t.vb))}}),D.of({name:"VBScript",extensions:["vbs"],load(){return B(()=>import("./vbscript-BuJXcnF6.js"),[]).then(t=>U(t.vbScript))}}),D.of({name:"Velocity",extensions:["vtl"],load(){return B(()=>import("./velocity-D8B20fx6.js"),[]).then(t=>U(t.velocity))}}),D.of({name:"Verilog",extensions:["v"],load(){return B(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>U(t.verilog))}}),D.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return B(()=>import("./vhdl-lSbBsy5d.js"),[]).then(t=>U(t.vhdl))}}),D.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return B(()=>import("./xquery-CQfU5ijd.js"),[]).then(t=>U(t.xQuery))}}),D.of({name:"Yacas",extensions:["ys"],load(){return B(()=>import("./yacas-BJ4BC0dw.js"),[]).then(t=>U(t.yacas))}}),D.of({name:"Z80",extensions:["z80"],load(){return B(()=>import("./z80-Hz9HOZM7.js"),[]).then(t=>U(t.z80))}}),D.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return B(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>U(t.mscgen))}}),D.of({name:"Xù",extensions:["xu"],load(){return B(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>U(t.xu))}}),D.of({name:"MsGenny",extensions:["msgenny"],load(){return B(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>U(t.msgenny))}}),D.of({name:"Vue",extensions:["vue"],load(){return B(()=>import("./index-CpfmaE2d.js"),[]).then(t=>t.vue())}}),D.of({name:"Angular Template",load(){return B(()=>import("./index-BjnJos4J.js"),[]).then(t=>t.angular())}})];function IOe({symbols:t,currentLine:e,onSymbolClick:n,onLoadGraph:r,onNavigate:i,className:s}){const[o,a]=O.useState(null),[l,c]=O.useState(null),[u,f]=O.useState(!1),d=O.useCallback(async h=>{if(n(h),o===h.id){a(null),c(null);return}if(a(h.id),c(null),r){f(!0);try{const g=await r(h);c(g)}catch(g){console.error("Failed to load graph:",g)}finally{f(!1)}}},[o,n,r]);return t.length===0?p.jsx("div",{className:le("text-center py-4 text-sm text-muted-foreground",s),children:"No symbols found"}):p.jsx(sc,{className:le("max-h-[50vh]",s),children:p.jsx("div",{className:"py-1",children:t.map((h,g)=>p.jsx(NOe,{symbol:h,currentLine:e,isExpanded:o===h.id,graphData:o===h.id?l:null,isLoadingGraph:o===h.id&&u,onSymbolClick:d,onNavigate:i,depth:0},`${h.id}-${g}`))})})}function NOe({symbol:t,currentLine:e,isExpanded:n,graphData:r,isLoadingGraph:i,onSymbolClick:s,onNavigate:o,depth:a}){const l=e!==void 0&&e>=t.line&&(!t.endLine||e<=t.endLine),c=MOe(t.type),u=DOe(t.type),f=r&&(r.refs.length>0||r.callers.length>0||r.callees.length>0||r.hierarchy.extends.length>0||r.hierarchy.implements.length>0||r.hierarchy.extendedBy.length>0||r.hierarchy.implementedBy.length>0);return p.jsxs("div",{children:[p.jsxs("button",{onClick:()=>s(t),className:le("w-full flex items-center gap-1.5 px-2 py-1 text-left text-sm","hover:bg-accent/50 transition-colors",l&&"bg-accent",n&&"bg-muted/50"),style:{paddingLeft:`${a*12+8}px`},children:[n?p.jsx(pa,{className:"h-3 w-3 text-muted-foreground flex-shrink-0"}):p.jsx(Fm,{className:"h-3 w-3 text-muted-foreground flex-shrink-0"}),p.jsx(c,{className:le("h-4 w-4 flex-shrink-0",u)}),p.jsx("span",{className:"truncate font-mono text-xs",children:t.name}),p.jsxs("span",{className:"ml-auto text-xs text-muted-foreground flex-shrink-0",children:[":",t.line]})]}),n&&p.jsx("div",{className:"border-l border-muted ml-4 pl-2 py-1 text-xs font-mono bg-muted/20",children:i?p.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground py-1 px-2",children:[p.jsx(Un,{className:"h-3 w-3 animate-spin"}),p.jsx("span",{children:"loading..."})]}):f?p.jsx(jOe,{data:r,onNavigate:o}):p.jsx("div",{className:"text-muted-foreground py-1 px-2",children:"no graph data"})})]})}function jOe({data:t,onNavigate:e}){return p.jsxs("div",{className:"space-y-1",children:[t.refs.length>0&&p.jsx(vo,{label:"refs",items:t.refs.map(n=>({text:`${n.file}:${n.line}`,file:n.file,line:n.line,suffix:n.type})),onNavigate:e}),t.callers.length>0&&p.jsx(vo,{label:"callers",items:t.callers.map(n=>({text:n.name,file:n.file,line:n.line,suffix:`${lR(n.file)}:${n.line}`})),onNavigate:e}),t.callees.length>0&&p.jsx(vo,{label:"calls",items:t.callees.map(n=>({text:n.name,file:n.file,line:n.line,suffix:`${lR(n.file)}:${n.line}`})),onNavigate:e}),t.hierarchy.extends.length>0&&p.jsx(vo,{label:"extends",items:t.hierarchy.extends.map(n=>({text:n.name,file:n.file,line:n.line})),onNavigate:e}),t.hierarchy.implements.length>0&&p.jsx(vo,{label:"implements",items:t.hierarchy.implements.map(n=>({text:n.name,file:n.file,line:n.line})),onNavigate:e}),t.hierarchy.extendedBy.length>0&&p.jsx(vo,{label:"extended by",items:t.hierarchy.extendedBy.map(n=>({text:n.name,file:n.file,line:n.line})),onNavigate:e}),t.hierarchy.implementedBy.length>0&&p.jsx(vo,{label:"implemented by",items:t.hierarchy.implementedBy.map(n=>({text:n.name,file:n.file,line:n.line})),onNavigate:e})]})}function vo({label:t,items:e,onNavigate:n}){const i=e.slice(0,5),s=e.length-5;return p.jsxs("div",{className:"px-2",children:[p.jsxs("span",{className:"text-muted-foreground",children:[t,":"]}),i.map((o,a)=>p.jsxs("span",{children:[" ",n?p.jsx("button",{onClick:()=>n(o.file,o.line),className:"text-blue-500 hover:underline",children:o.text}):p.jsx("span",{children:o.text}),o.suffix&&p.jsxs("span",{className:"text-muted-foreground",children:[" (",o.suffix,")"]}),a<i.length-1&&p.jsx("span",{className:"text-muted-foreground",children:","})]},a)),s>0&&p.jsxs("span",{className:"text-muted-foreground",children:[" +",s," more"]})]})}function lR(t){const e=t.split("/");return e.length>2?`.../${e.slice(-2).join("/")}`:t}function MOe(t){switch(t){case"function":return dZ;case"class":return fZ;case"method":return du;case"interface":return mZ;case"type":return $Z;case"enum":return cA;case"variable":case"constant":return AZ;case"property":return du;default:return du}}function DOe(t){switch(t){case"function":return"text-purple-500";case"class":return"text-yellow-500";case"method":return"text-blue-500";case"interface":return"text-cyan-500";case"type":return"text-green-500";case"enum":return"text-orange-500";case"variable":case"constant":return"text-red-500";case"property":return"text-gray-500";default:return"text-muted-foreground"}}function LOe({symbols:t}){let e=0;function n(r){for(const i of r)e++,i.children&&n(i.children)}return n(t),e===0?null:p.jsxs("span",{className:"text-xs text-muted-foreground",children:[e," symbols"]})}const zOe={ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",php:"php",html:"html",css:"css",scss:"scss",less:"less",json:"json",yaml:"yaml",yml:"yaml",md:"markdown",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",dockerfile:"dockerfile",vue:"vue",svelte:"svelte"};function BOe(t){var n;const e=((n=t.split(".").pop())==null?void 0:n.toLowerCase())||"";return zOe[e]||"text"}function VOe({filePath:t,content:e,language:n,onClose:r,className:i}){const s=O.useRef(null),[o,a]=O.useState(()=>typeof document<"u"&&document.documentElement.classList.contains("dark")),[l,c]=O.useState([]),[u,f]=O.useState(!1),[d,h]=O.useState([]),[g,m]=O.useState(!1),[v,y]=O.useState(),x=O.useRef(null),{navigateToFile:b,setActiveTab:k}=Df(),w=n||BOe(t);O.useEffect(()=>{const A=document.documentElement,L=()=>{a(A.classList.contains("dark"))};L();const z=new MutationObserver(L);return z.observe(A,{attributes:!0,attributeFilter:["class"]}),()=>z.disconnect()},[]),O.useEffect(()=>{let A=!1;async function L(){f(!0);try{let z=D.matchFilename(av,t)||(n?D.matchLanguageName(av,n):null)||D.matchLanguageName(av,w);if(!z){c([]);return}const X=await z.load();A||c([X])}catch(z){A||(console.error("Failed to load language support:",z),c([]))}finally{A||f(!1)}}return L(),()=>{A=!0}},[w,t,n]);const S=O.useMemo(()=>[Ae.readOnly.of(!0),re.editable.of(!1),Ig(wL,{fallback:!0}),...l],[l]);O.useEffect(()=>{m(!0),FOe(t).then(A=>{h(A)}).finally(()=>m(!1))},[t]);const C=O.useCallback(A=>{const L=s.current;if(!L)return;const z=L.state.doc.lines,X=Math.max(1,Math.min(A,z)),W=L.state.doc.line(X).from;L.dispatch({selection:Z.cursor(W),effects:re.scrollIntoView(W,{y:"center"})})},[]),_=O.useCallback(A=>{y(A.line),C(A.line)},[C]),I=O.useCallback(async A=>{try{const L=new URLSearchParams({symbolId:A.id}),[z,X,W]=await Promise.all([sl.get(`/api/code/graph/refs?${L}`).catch(()=>null),sl.get(`/api/code/graph/calls?${L}`).catch(()=>null),sl.get(`/api/code/graph/hierarchy?${L}`).catch(()=>null)]);return{refs:((z==null?void 0:z.references)??[]).map(F=>({file:F.file,line:F.line,type:F.type})),callers:((X==null?void 0:X.callers)??[]).map(F=>{var N,Q;return{name:F.symbol.symbolName,file:((N=F.callSites[0])==null?void 0:N.file)??F.symbol.path,line:((Q=F.callSites[0])==null?void 0:Q.line)??1}}),callees:((X==null?void 0:X.callees)??[]).map(F=>{var N,Q;return{name:F.symbol.symbolName,file:((N=F.callSites[0])==null?void 0:N.file)??F.symbol.path,line:((Q=F.callSites[0])==null?void 0:Q.line)??1}}),hierarchy:{extends:((W==null?void 0:W.extends)??[]).map(F=>({name:F.symbolName,file:F.path,line:F.startLine})),implements:((W==null?void 0:W.implements)??[]).map(F=>({name:F.symbolName,file:F.path,line:F.startLine})),extendedBy:((W==null?void 0:W.extendedBy)??[]).map(F=>({name:F.symbolName,file:F.path,line:F.startLine})),implementedBy:((W==null?void 0:W.implementedBy)??[]).map(F=>({name:F.symbolName,file:F.path,line:F.startLine}))}}}catch(L){return console.error("Failed to load graph data:",L),null}},[]),E=O.useCallback(async(A,L)=>{if(A===t){y(L),C(L);return}k("code"),await b(A)},[t,b,C,k]),j=t.split("/").pop()||t;return O.useEffect(()=>{v&&C(v)},[v,C]),p.jsxs("div",{className:le("flex flex-col h-full bg-background",i),children:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b bg-muted/5",children:[p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p.jsx(sn,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),p.jsx("span",{className:"font-medium truncate",children:j}),p.jsx(Ot,{variant:"outline",className:"text-xs flex-shrink-0",children:w})]}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Se,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>window.open(`vscode://file/${t}`,"_blank"),children:p.jsx(gZ,{className:"h-4 w-4"})})}),p.jsx(On,{children:"Open in VS Code"})]}),p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Se,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:r,children:p.jsx(zf,{className:"h-4 w-4"})})}),p.jsx(On,{children:"Close"})]})]})]}),p.jsxs(bw,{className:"border-b",children:[p.jsxs(ww,{className:"w-full px-4 py-2 flex items-center justify-between hover:bg-muted/30 transition-colors",children:[p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx(bZ,{className:"h-4 w-4 text-muted-foreground"}),p.jsx("span",{className:"font-medium",children:"Symbols"}),g?p.jsx(Un,{className:"h-3 w-3 animate-spin text-muted-foreground"}):p.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",d.length,")"]})]}),p.jsx(pa,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsx(Sw,{children:p.jsx(IOe,{symbols:d,currentLine:v,onSymbolClick:_,onLoadGraph:I,onNavigate:E,className:"border-t"})})]}),p.jsx(sc,{className:"flex-1",ref:x,children:p.jsx("div",{className:"p-4",children:e?p.jsx("div",{className:"code-viewer code-viewer-cm text-sm font-mono",children:p.jsx(fS,{value:e,theme:o?uS:EOe,extensions:S,readOnly:!0,onCreateEditor:A=>{s.current=A},basicSetup:{lineNumbers:!0,foldGutter:!0,highlightActiveLine:!0,highlightActiveLineGutter:!0,searchKeymap:!0,history:!1,autocompletion:!1,syntaxHighlighting:!0}},`${t}:${o?"dark":"light"}`)}):p.jsxs("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:[p.jsx(Un,{className:"h-6 w-6 animate-spin mr-2"}),"Loading content..."]})})}),p.jsxs("div",{className:"border-t px-4 py-2 flex items-center justify-between text-xs text-muted-foreground bg-muted/5",children:[p.jsx(LOe,{symbols:d}),p.jsxs("div",{className:"flex items-center gap-4",children:[e&&p.jsxs("span",{children:[e.split(`
|
|
507
|
+
`).length," lines"]}),p.jsx(Ot,{variant:"success",className:"text-xs",children:"Up to date"})]})]})]})}async function FOe(t){try{const e=new URLSearchParams({name:"*",path:t,limit:"200"}),n=await sl.get(`/api/code/symbols?${e}`),r=new Set(["function","class","method","interface","type","enum","variable","constant","property"]);return(n.symbols||[]).filter(i=>r.has(i.type)).map(i=>({id:i.id,name:i.name,type:i.type,line:i.startLine,endLine:i.endLine})).sort((i,s)=>i.line-s.line)}catch(e){console.error("Failed to fetch symbols:",e)}return[]}function XOe(){const{selectedFile:t,selectedFileContent:e,clearSelection:n,activeTab:r,navigateToFile:i}=Df();return t?p.jsx("main",{className:"flex-1 flex flex-col overflow-hidden",children:p.jsx(Uu,{children:r==="notes"?p.jsx(bOe,{notePath:t,content:e,onClose:n,onNavigate:i}):p.jsx(VOe,{filePath:t,content:e,onClose:n})})}):p.jsx("main",{className:"flex-1 flex items-center justify-center bg-muted/5",children:p.jsxs("div",{className:"text-center text-muted-foreground",children:[p.jsx("div",{className:"text-6xl mb-4",children:r==="notes"?p.jsx(Sn,{className:"h-16 w-16 mx-auto opacity-20"}):p.jsx(sn,{className:"h-16 w-16 mx-auto opacity-20"})}),p.jsx("p",{className:"text-lg",children:"Select a file to view"}),p.jsxs("p",{className:"text-sm mt-1",children:["Or press"," ",p.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-xs",children:"Cmd+K"})," ","to search"]})]})})}async function ZOe(t){const e=await fetch(t);if(!e.ok){const n=await e.json().catch(()=>({message:"Request failed"}));throw new Error(n.message||`HTTP ${e.status}`)}return e.json()}const WOe=da((t,e)=>({status:null,isLoading:!1,error:null,isGitPanelOpen:!1,fetchStatus:async()=>{t({isLoading:!0,error:null});try{const n=await ZOe("/api/git/status");t({status:n,isLoading:!1})}catch(n){t({isLoading:!1,error:n instanceof Error?n.message:"Failed to fetch git status"})}},refresh:async()=>{await e().fetchStatus()},toggleGitPanel:()=>{t(n=>({isGitPanelOpen:!n.isGitPanelOpen}))},openGitPanel:()=>{t({isGitPanelOpen:!0})},closeGitPanel:()=>{t({isGitPanelOpen:!1})}}));function qOe(t){return t?t.uncommitted.staged.length+t.uncommitted.modified.length+t.uncommitted.untracked.length:0}function s4(t){return t?t.sync.notes.commitsBehind+t.sync.code.commitsBehind:0}function YOe(t){if(!t)return"unknown";const e=qOe(t),n=s4(t);return e>0?"uncommitted":n>0?"behind":"synced"}function UOe(){const{currentProject:t}=ha(),{isConnected:e,notesSyncProgress:n,codeSyncProgress:r}=Mf(),{status:i}=WOe(),s=YOe(i),o=s4(i),a=(n==null?void 0:n.status)==="syncing"||(n==null?void 0:n.status)==="paused",l=(r==null?void 0:r.status)==="syncing"||(r==null?void 0:r.status)==="paused",c=a?n:l?r:null;return t?p.jsxs("footer",{className:"border-t bg-muted/30 px-4 py-1.5 flex items-center justify-between text-xs",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(Wu,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:(i==null?void 0:i.branch)||"main"})]}),s==="synced"&&p.jsxs("div",{className:"flex items-center gap-1 text-green-600 dark:text-green-400",children:[p.jsx(Ki,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:"In sync"})]}),s==="behind"&&p.jsxs("div",{className:"flex items-center gap-1 text-yellow-600 dark:text-yellow-400",children:[p.jsx(Lf,{className:"h-3.5 w-3.5"}),p.jsxs("span",{children:[o," commits behind"]})]}),s==="uncommitted"&&p.jsxs("div",{className:"flex items-center gap-1 text-orange-600 dark:text-orange-400",children:[p.jsx(fA,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:"Uncommitted changes"})]})]}),c&&p.jsx("div",{className:"flex-1 max-w-xs mx-4",children:p.jsxs("div",{className:"flex items-center gap-2",children:[c.status==="paused"?p.jsx(Pp,{className:"h-3.5 w-3.5 text-yellow-500"}):p.jsx(ui,{className:"h-3.5 w-3.5 text-blue-500 animate-spin"}),c.target==="notes"?p.jsx(Sn,{className:"h-3.5 w-3.5 text-blue-500"}):p.jsx(sn,{className:"h-3.5 w-3.5 text-orange-500"}),p.jsx(Pw,{value:c.progress,className:"h-1.5 flex-1"}),p.jsx("span",{className:"text-muted-foreground w-16 text-right",children:c.status==="paused"?"Paused":`${c.progress}%`})]})}),p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(Sn,{className:"h-3.5 w-3.5"}),"247 docs"]}),p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(sn,{className:"h-3.5 w-3.5"}),"89 files"]})]}),p.jsx("div",{className:le("flex items-center gap-1",e?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:e?p.jsxs(p.Fragment,{children:[p.jsx(IZ,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:"Connected"})]}):p.jsxs(p.Fragment,{children:[p.jsx(QZ,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:"Disconnected"})]})})]})]}):null}function HOe({open:t,onOpenChange:e,onProjectOpened:n}){const r=ec(),{openProject:i,fetchCurrentProject:s}=ha(),[o,a]=O.useState(""),[l,c]=O.useState(null),[u,f]=O.useState(!1),[d,h]=O.useState(!1),[g,m]=O.useState(null),v=async w=>{h(!0),m(null);try{const S=await fetch("/api/project/open-config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({configPath:w})});if(!S.ok){const I=await S.json();throw new Error(I.message||"Failed to open project")}const C=await S.json();await s();const _=Sp(C.path,C.name);r(`/${_}`),a(""),c(null),n==null||n()}catch(S){m(S instanceof Error?S.message:"Failed to open project")}finally{h(!1)}},y=async()=>{try{const w=await fetch("/api/project/browse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"folder"})});if(!w.ok){m("Failed to open file picker");return}const S=await w.json();if(S.cancelled)return;S.path&&x(S.path)}catch{m("Failed to open file picker")}},x=async w=>{if(a(w),m(null),c(null),!w.trim())return;const S=w.endsWith("RAG.config.json")||w.endsWith("indexmcp.json")||w.endsWith(".indexmcp.json");f(!0);try{const C=S?w.replace(/[/\\]?(RAG\.config\.json|\.?indexmcp\.json)$/,""):w,_=await fetch(`/api/project/validate?path=${encodeURIComponent(C)}`);if(!_.ok){const E=await _.text();c({valid:!1,error:`Server error (${_.status}): ${E}`});return}const I=await _.json();c(I)}catch(C){console.error("Validation error:",C),c({valid:!1,error:C instanceof Error?C.message:"Failed to validate path"})}finally{f(!1)}},b=async()=>{if(!(!o.trim()||!(l!=null&&l.valid))){h(!0),m(null);try{if(o.endsWith("RAG.config.json")||o.endsWith("indexmcp.json")||o.endsWith(".indexmcp.json"))await v(o);else{await i(o);const S=Sp(l.path,l.name);r(`/${S}`),a(""),c(null),n==null||n()}}catch(w){m(w instanceof Error?w.message:"Failed to open project")}finally{h(!1)}}},k=()=>{a(""),c(null),m(null),e(!1)};return p.jsx(Hu,{open:t,onOpenChange:k,children:p.jsxs(Tl,{className:"sm:max-w-md",children:[p.jsxs(Uo,{children:[p.jsx(Go,{children:"Open Project"}),p.jsxs(Ko,{children:["Select or enter the path to"," ",p.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"RAG.config.json"})]})]}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-sm font-medium",children:"Config File Path"}),p.jsxs("div",{className:"relative",children:[p.jsx(OZ,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),p.jsx(Ge,{value:o,onChange:w=>x(w.target.value),placeholder:"/path/to/project/RAG.config.json",className:"pl-9",autoFocus:!0}),u&&p.jsx(Un,{className:"absolute right-3 top-3 h-4 w-4 animate-spin text-muted-foreground"})]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter full path to RAG.config.json or the project folder"})]}),p.jsxs(Se,{type:"button",variant:"outline",onClick:y,className:"w-full",children:[p.jsx(Gb,{className:"h-4 w-4 mr-2"}),"Browse..."]}),l&&p.jsx("div",{className:le("p-3 rounded-lg border",l.valid?"bg-green-500/10 border-green-500/20":"bg-destructive/10 border-destructive/20"),children:l.valid?p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx(Ki,{className:"h-5 w-5 text-green-500 flex-shrink-0"}),p.jsxs("div",{className:"space-y-1",children:[p.jsx("p",{className:"font-medium",children:l.name}),p.jsxs("div",{className:"flex flex-wrap gap-1",children:[l.hasVault&&p.jsx(Ot,{variant:"secondary",className:"text-xs",children:"Docs"}),l.hasCode&&p.jsx(Ot,{variant:"secondary",className:"text-xs",children:"Code"})]})]})]}):p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx(Or,{className:"h-5 w-5 text-destructive flex-shrink-0"}),p.jsxs("div",{children:[p.jsx("p",{className:"font-medium text-destructive",children:"Invalid project"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:l.error||"No RAG.config.json found"})]})]})}),g&&p.jsx("div",{className:"p-3 rounded-lg bg-destructive/10 border border-destructive/20",children:p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx(Or,{className:"h-5 w-5 text-destructive flex-shrink-0"}),p.jsxs("div",{children:[p.jsx("p",{className:"font-medium text-destructive",children:"Failed to open project"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:g})]})]})}),p.jsxs("p",{className:"text-xs text-muted-foreground",children:["Enter the path to"," ",p.jsx("code",{className:"bg-muted px-1 py-0.5 rounded",children:"RAG.config.json"})," ","file or the project folder containing it."]})]}),p.jsxs(Ho,{children:[p.jsx(Se,{variant:"outline",onClick:k,children:"Cancel"}),p.jsx(Se,{onClick:b,disabled:!(l!=null&&l.valid)||d,children:d?p.jsxs(p.Fragment,{children:[p.jsx(Un,{className:"h-4 w-4 mr-2 animate-spin"}),"Opening..."]}):"Open Project"})]})]})})}function GOe(){const t=ec(),{recentProjects:e,openProject:n,removeRecentProject:r,error:i,isLoading:s}=ha(),[o,a]=O.useState(!1),[l,c]=O.useState(null),u=async(f,d)=>{c(f);try{await n(f);const h=Sp(f,d);t(`/${h}`)}catch(h){console.error("Failed to open project:",h)}finally{c(null)}};return p.jsxs("div",{className:"container max-w-2xl mx-auto py-12 px-4",children:[p.jsxs("div",{className:"text-center mb-8",children:[p.jsx("h1",{className:"text-3xl font-bold mb-2",children:"RAG Dashboard"}),p.jsx("p",{className:"text-muted-foreground",children:"Manage and search your docs and code index"})]}),i&&p.jsxs("div",{className:"mb-6 p-4 rounded-lg bg-destructive/10 border border-destructive/20 flex items-start gap-3",children:[p.jsx(Or,{className:"h-5 w-5 text-destructive flex-shrink-0 mt-0.5"}),p.jsxs("div",{children:[p.jsx("p",{className:"font-medium text-destructive",children:"Failed to open project"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:i})]})]}),e.length>0&&p.jsxs("div",{className:"mb-8",children:[p.jsxs("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[p.jsx(Lf,{className:"h-5 w-5"}),"Recent Projects"]}),p.jsx("div",{className:"space-y-2",children:e.map(f=>p.jsx(KOe,{project:f,onOpen:()=>u(f.path,f.name),onRemove:r,isOpening:l===f.path},f.path))})]}),p.jsxs("div",{className:"flex flex-col items-center gap-4",children:[p.jsxs(Se,{size:"lg",onClick:()=>a(!0),disabled:s,className:"gap-2",children:[p.jsx(Gb,{className:"h-5 w-5"}),"Open Project"]}),p.jsxs("p",{className:"text-sm text-muted-foreground",children:["Select a folder containing ",p.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"RAG.config.json"})]})]}),e.length===0&&p.jsxs("div",{className:"text-center py-12",children:[p.jsx(kl,{className:"h-16 w-16 mx-auto text-muted-foreground/30 mb-4"}),p.jsx("h3",{className:"font-medium text-lg mb-2",children:"No recent projects"}),p.jsx("p",{className:"text-muted-foreground text-sm",children:"Open a project folder to get started"})]}),p.jsx(HOe,{open:o,onOpenChange:a,onProjectOpened:()=>a(!1)})]})}function KOe({project:t,onOpen:e,onRemove:n,isOpening:r}){return p.jsxs("div",{className:le("group flex items-center gap-3 p-3 rounded-lg border","hover:bg-accent/50 transition-colors cursor-pointer",r&&"opacity-70 pointer-events-none"),onClick:e,children:[p.jsx("div",{className:"flex-shrink-0",children:p.jsx(kl,{className:"h-8 w-8 text-primary/70"})}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:"font-medium truncate",children:t.name}),p.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.path})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:bW(t.lastOpened)}),p.jsx(Uu,{children:p.jsxs(Bn,{children:[p.jsx(Vn,{asChild:!0,children:p.jsx(Se,{variant:"ghost",size:"icon",className:"h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",onClick:i=>{i.stopPropagation(),n(t.path)},children:p.jsx(tw,{className:"h-4 w-4 text-muted-foreground hover:text-destructive"})})}),p.jsx(On,{children:"Remove from recent"})]})}),r?p.jsx("div",{className:"h-4 w-4 border-2 border-primary border-t-transparent rounded-full animate-spin"}):p.jsx(Hb,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})}function JOe(t){const e=eye(t),n=O.forwardRef((r,i)=>{const{children:s,...o}=r,a=O.Children.toArray(s),l=a.find(nye);if(l){const c=l.props.children,u=a.map(f=>f===l?O.Children.count(c)>1?O.Children.only(null):O.isValidElement(c)?c.props.children:null:f);return p.jsx(e,{...o,ref:i,children:O.isValidElement(c)?O.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function eye(t){const e=O.forwardRef((n,r)=>{const{children:i,...s}=n;if(O.isValidElement(i)){const o=iye(i),a=rye(s,i.props);return i.type!==O.Fragment&&(a.ref=r?kn(r,o):o),O.cloneElement(i,a)}return O.Children.count(i)>1?O.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var tye=Symbol("radix.slottable");function nye(t){return O.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===tye}function rye(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function iye(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var sye=[" ","Enter","ArrowUp","ArrowDown"],oye=[" ","Enter"],aa="Select",[Bg,Vg,aye]=$w(aa),[yc]=Cn(aa,[aye,oo]),Fg=oo(),[lye,co]=yc(aa),[cye,uye]=yc(aa),o4=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:f,disabled:d,required:h,form:g}=t,m=Fg(e),[v,y]=O.useState(null),[x,b]=O.useState(null),[k,w]=O.useState(!1),S=Wf(c),[C,_]=qs({prop:r,defaultProp:i??!1,onChange:s,caller:aa}),[I,E]=qs({prop:o,defaultProp:a,onChange:l,caller:aa}),j=O.useRef(null),A=v?g||!!v.closest("form"):!0,[L,z]=O.useState(new Set),X=Array.from(L).map(W=>W.props.value).join(";");return p.jsx(WA,{...m,children:p.jsxs(lye,{required:h,scope:e,trigger:v,onTriggerChange:y,valueNode:x,onValueNodeChange:b,valueNodeHasChildren:k,onValueNodeHasChildrenChange:w,contentId:Yt(),value:I,onValueChange:E,open:C,onOpenChange:_,dir:S,triggerPointerDownPosRef:j,disabled:d,children:[p.jsx(Bg.Provider,{scope:e,children:p.jsx(cye,{scope:t.__scopeSelect,onNativeOptionAdd:O.useCallback(W=>{z(F=>new Set(F).add(W))},[]),onNativeOptionRemove:O.useCallback(W=>{z(F=>{const N=new Set(F);return N.delete(W),N})},[]),children:n})}),A?p.jsxs(_4,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:f,value:I,onChange:W=>E(W.target.value),disabled:d,form:g,children:[I===void 0?p.jsx("option",{value:""}):null,Array.from(L)]},X):null]})})};o4.displayName=aa;var a4="SelectTrigger",l4=O.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...i}=t,s=Fg(n),o=co(a4,n),a=o.disabled||r,l=Pe(e,o.onTriggerChange),c=Vg(n),u=O.useRef("touch"),[f,d,h]=A4(m=>{const v=c().filter(b=>!b.disabled),y=v.find(b=>b.value===o.value),x=Q4(v,m,y);x!==void 0&&o.onValueChange(x.value)}),g=m=>{a||(o.onOpenChange(!0),h()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return p.jsx(Vf,{asChild:!0,...s,children:p.jsx(ue.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:a,"data-disabled":a?"":void 0,"data-placeholder":$4(o.value)?"":void 0,...i,ref:l,onClick:ne(i.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&g(m)}),onPointerDown:ne(i.onPointerDown,m=>{u.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:ne(i.onKeyDown,m=>{const v=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&d(m.key),!(v&&m.key===" ")&&sye.includes(m.key)&&(g(),m.preventDefault())})})})});l4.displayName=a4;var c4="SelectValue",u4=O.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:i,children:s,placeholder:o="",...a}=t,l=co(c4,n),{onValueNodeHasChildrenChange:c}=l,u=s!==void 0,f=Pe(e,l.onValueNodeChange);return _t(()=>{c(u)},[c,u]),p.jsx(ue.span,{...a,ref:f,style:{pointerEvents:"none"},children:$4(l.value)?p.jsx(p.Fragment,{children:o}):s})});u4.displayName=c4;var fye="SelectIcon",f4=O.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...i}=t;return p.jsx(ue.span,{"aria-hidden":!0,...i,ref:e,children:r||"▼"})});f4.displayName=fye;var dye="SelectPortal",d4=t=>p.jsx(Ff,{asChild:!0,...t});d4.displayName=dye;var la="SelectContent",h4=O.forwardRef((t,e)=>{const n=co(la,t.__scopeSelect),[r,i]=O.useState();if(_t(()=>{i(new DocumentFragment)},[]),!n.open){const s=r;return s?Gl.createPortal(p.jsx(p4,{scope:t.__scopeSelect,children:p.jsx(Bg.Slot,{scope:t.__scopeSelect,children:p.jsx("div",{children:t.children})})}),s):null}return p.jsx(m4,{...t,ref:e})});h4.displayName=la;var Ar=10,[p4,uo]=yc(la),hye="SelectContentImpl",pye=JOe("SelectContent.RemoveScroll"),m4=O.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:g,hideWhenDetached:m,avoidCollisions:v,...y}=t,x=co(la,n),[b,k]=O.useState(null),[w,S]=O.useState(null),C=Pe(e,Y=>k(Y)),[_,I]=O.useState(null),[E,j]=O.useState(null),A=Vg(n),[L,z]=O.useState(!1),X=O.useRef(!1);O.useEffect(()=>{if(b)return ng(b)},[b]),eg();const W=O.useCallback(Y=>{const[pe,...me]=A().map(je=>je.ref.current),[ye]=me.slice(-1),Ee=document.activeElement;for(const je of Y)if(je===Ee||(je==null||je.scrollIntoView({block:"nearest"}),je===pe&&w&&(w.scrollTop=0),je===ye&&w&&(w.scrollTop=w.scrollHeight),je==null||je.focus(),document.activeElement!==Ee))return},[A,w]),F=O.useCallback(()=>W([_,b]),[W,_,b]);O.useEffect(()=>{L&&F()},[L,F]);const{onOpenChange:N,triggerPointerDownPosRef:Q}=x;O.useEffect(()=>{if(b){let Y={x:0,y:0};const pe=ye=>{var Ee,je;Y={x:Math.abs(Math.round(ye.pageX)-(((Ee=Q.current)==null?void 0:Ee.x)??0)),y:Math.abs(Math.round(ye.pageY)-(((je=Q.current)==null?void 0:je.y)??0))}},me=ye=>{Y.x<=10&&Y.y<=10?ye.preventDefault():b.contains(ye.target)||N(!1),document.removeEventListener("pointermove",pe),Q.current=null};return Q.current!==null&&(document.addEventListener("pointermove",pe),document.addEventListener("pointerup",me,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",pe),document.removeEventListener("pointerup",me,{capture:!0})}}},[b,N,Q]),O.useEffect(()=>{const Y=()=>N(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[N]);const[P,M]=A4(Y=>{const pe=A().filter(Ee=>!Ee.disabled),me=pe.find(Ee=>Ee.ref.current===document.activeElement),ye=Q4(pe,Y,me);ye&&setTimeout(()=>ye.ref.current.focus())}),$=O.useCallback((Y,pe,me)=>{const ye=!X.current&&!me;(x.value!==void 0&&x.value===pe||ye)&&(I(Y),ye&&(X.current=!0))},[x.value]),R=O.useCallback(()=>b==null?void 0:b.focus(),[b]),q=O.useCallback((Y,pe,me)=>{const ye=!X.current&&!me;(x.value!==void 0&&x.value===pe||ye)&&j(Y)},[x.value]),H=r==="popper"?V0:g4,ie=H===V0?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:g,hideWhenDetached:m,avoidCollisions:v}:{};return p.jsx(p4,{scope:n,content:b,viewport:w,onViewportChange:S,itemRefCallback:$,selectedItem:_,onItemLeave:R,itemTextRefCallback:q,focusSelectedItem:F,selectedItemText:E,position:r,isPositioned:L,searchRef:P,children:p.jsx(Zf,{as:pye,allowPinchZoom:!0,children:p.jsx(Xf,{asChild:!0,trapped:x.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:ne(i,Y=>{var pe;(pe=x.trigger)==null||pe.focus({preventScroll:!0}),Y.preventDefault()}),children:p.jsx(nc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:p.jsx(H,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:Y=>Y.preventDefault(),...y,...ie,onPlaced:()=>z(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ne(y.onKeyDown,Y=>{const pe=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!pe&&Y.key.length===1&&M(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let ye=A().filter(Ee=>!Ee.disabled).map(Ee=>Ee.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const Ee=Y.target,je=ye.indexOf(Ee);ye=ye.slice(je+1)}setTimeout(()=>W(ye)),Y.preventDefault()}})})})})})})});m4.displayName=hye;var mye="SelectItemAlignedPosition",g4=O.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...i}=t,s=co(la,n),o=uo(la,n),[a,l]=O.useState(null),[c,u]=O.useState(null),f=Pe(e,C=>u(C)),d=Vg(n),h=O.useRef(!1),g=O.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:y,focusSelectedItem:x}=o,b=O.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&m&&v&&y){const C=s.trigger.getBoundingClientRect(),_=c.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),E=y.getBoundingClientRect();if(s.dir!=="rtl"){const Ee=E.left-_.left,je=I.left-Ee,kt=C.left-je,ln=C.width+kt,Gr=Math.max(ln,_.width),Sr=window.innerWidth-Ar,Kr=Ox(je,[Ar,Math.max(Ar,Sr-Gr)]);a.style.minWidth=ln+"px",a.style.left=Kr+"px"}else{const Ee=_.right-E.right,je=window.innerWidth-I.right-Ee,kt=window.innerWidth-C.right-je,ln=C.width+kt,Gr=Math.max(ln,_.width),Sr=window.innerWidth-Ar,Kr=Ox(je,[Ar,Math.max(Ar,Sr-Gr)]);a.style.minWidth=ln+"px",a.style.right=Kr+"px"}const j=d(),A=window.innerHeight-Ar*2,L=m.scrollHeight,z=window.getComputedStyle(c),X=parseInt(z.borderTopWidth,10),W=parseInt(z.paddingTop,10),F=parseInt(z.borderBottomWidth,10),N=parseInt(z.paddingBottom,10),Q=X+W+L+N+F,P=Math.min(v.offsetHeight*5,Q),M=window.getComputedStyle(m),$=parseInt(M.paddingTop,10),R=parseInt(M.paddingBottom,10),q=C.top+C.height/2-Ar,H=A-q,ie=v.offsetHeight/2,Y=v.offsetTop+ie,pe=X+W+Y,me=Q-pe;if(pe<=q){const Ee=j.length>0&&v===j[j.length-1].ref.current;a.style.bottom="0px";const je=c.clientHeight-m.offsetTop-m.offsetHeight,kt=Math.max(H,ie+(Ee?R:0)+je+F),ln=pe+kt;a.style.height=ln+"px"}else{const Ee=j.length>0&&v===j[0].ref.current;a.style.top="0px";const kt=Math.max(q,X+m.offsetTop+(Ee?$:0)+ie)+me;a.style.height=kt+"px",m.scrollTop=pe-q+m.offsetTop}a.style.margin=`${Ar}px 0`,a.style.minHeight=P+"px",a.style.maxHeight=A+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,a,c,m,v,y,s.dir,r]);_t(()=>b(),[b]);const[k,w]=O.useState();_t(()=>{c&&w(window.getComputedStyle(c).zIndex)},[c]);const S=O.useCallback(C=>{C&&g.current===!0&&(b(),x==null||x(),g.current=!1)},[b,x]);return p.jsx(Oye,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:S,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:p.jsx(ue.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});g4.displayName=mye;var gye="SelectPopperPosition",V0=O.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ar,...s}=t,o=Fg(n);return p.jsx(Um,{...o,...s,ref:e,align:r,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});V0.displayName=gye;var[Oye,ES]=yc(la,{}),F0="SelectViewport",O4=O.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:r,...i}=t,s=uo(F0,n),o=ES(F0,n),a=Pe(e,s.onViewportChange),l=O.useRef(0);return p.jsxs(p.Fragment,{children:[p.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}),p.jsx(Bg.Slot,{scope:n,children:p.jsx(ue.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ne(i.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&f){const h=Math.abs(l.current-u.scrollTop);if(h>0){const g=window.innerHeight-Ar*2,m=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),y=Math.max(m,v);if(y<g){const x=y+h,b=Math.min(g,x),k=x-b;f.style.height=b+"px",f.style.bottom==="0px"&&(u.scrollTop=k>0?k:0,f.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});O4.displayName=F0;var y4="SelectGroup",[yye,vye]=yc(y4),xye=O.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=Yt();return p.jsx(yye,{scope:n,id:i,children:p.jsx(ue.div,{role:"group","aria-labelledby":i,...r,ref:e})})});xye.displayName=y4;var v4="SelectLabel",x4=O.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=vye(v4,n);return p.jsx(ue.div,{id:i.id,...r,ref:e})});x4.displayName=v4;var Sm="SelectItem",[bye,b4]=yc(Sm),w4=O.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:s,...o}=t,a=co(Sm,n),l=uo(Sm,n),c=a.value===r,[u,f]=O.useState(s??""),[d,h]=O.useState(!1),g=Pe(e,x=>{var b;return(b=l.itemRefCallback)==null?void 0:b.call(l,x,r,i)}),m=Yt(),v=O.useRef("touch"),y=()=>{i||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(bye,{scope:n,value:r,disabled:i,textId:m,isSelected:c,onItemTextChange:O.useCallback(x=>{f(b=>b||((x==null?void 0:x.textContent)??"").trim())},[]),children:p.jsx(Bg.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:p.jsx(ue.div,{role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:g,onFocus:ne(o.onFocus,()=>h(!0)),onBlur:ne(o.onBlur,()=>h(!1)),onClick:ne(o.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:ne(o.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:ne(o.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:ne(o.onPointerMove,x=>{var b;v.current=x.pointerType,i?(b=l.onItemLeave)==null||b.call(l):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ne(o.onPointerLeave,x=>{var b;x.currentTarget===document.activeElement&&((b=l.onItemLeave)==null||b.call(l))}),onKeyDown:ne(o.onKeyDown,x=>{var k;((k=l.searchRef)==null?void 0:k.current)!==""&&x.key===" "||(oye.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});w4.displayName=Sm;var nu="SelectItemText",S4=O.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:i,...s}=t,o=co(nu,n),a=uo(nu,n),l=b4(nu,n),c=uye(nu,n),[u,f]=O.useState(null),d=Pe(e,y=>f(y),l.onItemTextChange,y=>{var x;return(x=a.itemTextRefCallback)==null?void 0:x.call(a,y,l.value,l.disabled)}),h=u==null?void 0:u.textContent,g=O.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=c;return _t(()=>(m(g),()=>v(g)),[m,v,g]),p.jsxs(p.Fragment,{children:[p.jsx(ue.span,{id:l.textId,...s,ref:d}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Gl.createPortal(s.children,o.valueNode):null]})});S4.displayName=nu;var k4="SelectItemIndicator",C4=O.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return b4(k4,n).isSelected?p.jsx(ue.span,{"aria-hidden":!0,...r,ref:e}):null});C4.displayName=k4;var X0="SelectScrollUpButton",P4=O.forwardRef((t,e)=>{const n=uo(X0,t.__scopeSelect),r=ES(X0,t.__scopeSelect),[i,s]=O.useState(!1),o=Pe(e,r.onScrollButtonChange);return _t(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;s(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?p.jsx(E4,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});P4.displayName=X0;var Z0="SelectScrollDownButton",T4=O.forwardRef((t,e)=>{const n=uo(Z0,t.__scopeSelect),r=ES(Z0,t.__scopeSelect),[i,s]=O.useState(!1),o=Pe(e,r.onScrollButtonChange);return _t(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?p.jsx(E4,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});T4.displayName=Z0;var E4=O.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=t,s=uo("SelectScrollButton",n),o=O.useRef(null),a=Vg(n),l=O.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return O.useEffect(()=>()=>l(),[l]),_t(()=>{var u;const c=a().find(f=>f.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),p.jsx(ue.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerDown:ne(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ne(i.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ne(i.onPointerLeave,()=>{l()})})}),wye="SelectSeparator",R4=O.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return p.jsx(ue.div,{"aria-hidden":!0,...r,ref:e})});R4.displayName=wye;var W0="SelectArrow",Sye=O.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=Fg(n),s=co(W0,n),o=uo(W0,n);return s.open&&o.position==="popper"?p.jsx(Hm,{...i,...r,ref:e}):null});Sye.displayName=W0;var kye="SelectBubbleInput",_4=O.forwardRef(({__scopeSelect:t,value:e,...n},r)=>{const i=O.useRef(null),s=Pe(r,i),o=uI(e);return O.useEffect(()=>{const a=i.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&u){const f=new Event("change",{bubbles:!0});u.call(a,e),a.dispatchEvent(f)}},[o,e]),p.jsx(ue.select,{...n,style:{...qA,...n.style},ref:s,defaultValue:e})});_4.displayName=kye;function $4(t){return t===""||t===void 0}function A4(t){const e=Wt(t),n=O.useRef(""),r=O.useRef(0),i=O.useCallback(o=>{const a=n.current+o;e(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),s=O.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return O.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,s]}function Q4(t,e,n){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let o=Cye(t,Math.max(s,0));i.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Cye(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var Pye=o4,I4=l4,Tye=u4,Eye=f4,Rye=d4,N4=h4,_ye=O4,j4=x4,M4=w4,$ye=S4,Aye=C4,D4=P4,L4=T4,z4=R4;const Eo=Pye,Ro=Tye,Ps=O.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(I4,{ref:r,className:le("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...n,children:[e,p.jsx(Eye,{asChild:!0,children:p.jsx(pa,{className:"h-4 w-4 opacity-50"})})]}));Ps.displayName=I4.displayName;const B4=O.forwardRef(({className:t,...e},n)=>p.jsx(D4,{ref:n,className:le("flex cursor-default items-center justify-center py-1",t),...e,children:p.jsx(hZ,{className:"h-4 w-4"})}));B4.displayName=D4.displayName;const V4=O.forwardRef(({className:t,...e},n)=>p.jsx(L4,{ref:n,className:le("flex cursor-default items-center justify-center py-1",t),...e,children:p.jsx(pa,{className:"h-4 w-4"})}));V4.displayName=L4.displayName;const Ts=O.forwardRef(({className:t,children:e,position:n="popper",...r},i)=>p.jsx(Rye,{children:p.jsxs(N4,{ref:i,className:le("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",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",t),position:n,...r,children:[p.jsx(B4,{}),p.jsx(_ye,{className:le("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),p.jsx(V4,{})]})}));Ts.displayName=N4.displayName;const Qye=O.forwardRef(({className:t,...e},n)=>p.jsx(j4,{ref:n,className:le("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));Qye.displayName=j4.displayName;const Bi=O.forwardRef(({className:t,children:e,...n},r)=>p.jsxs(M4,{ref:r,className:le("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(Aye,{children:p.jsx(sA,{className:"h-4 w-4"})})}),p.jsx($ye,{children:e})]}));Bi.displayName=M4.displayName;const Iye=O.forwardRef(({className:t,...e},n)=>p.jsx(z4,{ref:n,className:le("-mx-1 my-1 h-px bg-muted",t),...e}));Iye.displayName=z4.displayName;function F4({value:t,onChange:e,placeholder:n="Add path...",className:r,disabled:i,label:s}){const[o,a]=O.useState(""),l=d=>{const h=d.trim();h&&!t.includes(h)&&e([...t,h]),a("")},c=d=>{e(t.filter((h,g)=>g!==d))},u=d=>{d.key==="Enter"&&(d.preventDefault(),l(o))},f=async()=>{try{const d=await fetch("/api/project/browse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"folder"})});if(!d.ok)return;const h=await d.json();if(h.cancelled)return;h.path&&l(h.path)}catch(d){console.error("Failed to open folder picker:",d)}};return p.jsxs("div",{className:le("space-y-2",r),children:[t.length>0&&p.jsx("div",{className:"space-y-1",children:t.map((d,h)=>p.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50 border",children:[p.jsx(kl,{className:"h-4 w-4 text-muted-foreground shrink-0"}),p.jsx("span",{className:"flex-1 font-mono text-sm truncate",children:d}),!i&&p.jsx(Se,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 shrink-0",onClick:()=>c(h),children:p.jsx(zf,{className:"h-3 w-3"})})]},`${d}-${h}`))}),!i&&p.jsxs("div",{className:"flex gap-2",children:[p.jsxs("div",{className:"relative flex-1",children:[p.jsx(kl,{className:"absolute left-3 top-2.5 h-4 w-4 text-muted-foreground"}),p.jsx(Ge,{value:o,onChange:d=>a(d.target.value),onKeyDown:u,placeholder:n,className:"pl-9 h-9"})]}),p.jsx(Se,{type:"button",variant:"outline",size:"sm",onClick:f,className:"shrink-0 h-9",title:"Browse for folder",children:p.jsx(dA,{className:"h-4 w-4"})}),p.jsx(Se,{type:"button",variant:"outline",size:"sm",onClick:()=>l(o),disabled:!o.trim(),className:"shrink-0 h-9",children:p.jsx(Jb,{className:"h-4 w-4"})})]})]})}function Nye(){const{config:t,projectPath:e,updateConfig:n,errors:r,mode:i}=ma(),{s3AccessKeyId:s,s3SecretAccessKey:o,s3SessionToken:a,s3Region:l,s3Endpoint:c,setS3AccessKeyId:u,setS3SecretAccessKey:f,setS3SessionToken:d,setS3Region:h,setS3Endpoint:g}=jf(),[m,v]=O.useState(!1),[y,x]=O.useState(!1);if(!t)return null;const b=t.lancedb.dbPath.startsWith("s3://"),k=b?"s3":"local";return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"name",children:"Project Name"}),p.jsx(Ge,{id:"name",value:t.name||"",onChange:w=>n("name",w.target.value),placeholder:"My Notes Project"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Display name for your project"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{children:"Vault Paths"}),p.jsx(F4,{value:t.vaultPaths,onChange:w=>n("vaultPaths",w),placeholder:"./vault or /absolute/path"}),r.vaultPaths&&p.jsx("p",{className:"text-xs text-destructive",children:r.vaultPaths}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Paths to your markdown notes directories (relative or absolute)"})]}),p.jsxs("div",{className:"space-y-4 rounded-lg border p-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{children:"LanceDB Storage"}),p.jsxs(Eo,{value:k,onValueChange:w=>{w==="s3"&&!b&&n("lancedb",{...t.lancedb,dbPath:"s3://your-bucket/lancedb"}),w==="local"&&b&&n("lancedb",{...t.lancedb,dbPath:"./.lancedb"})},children:[p.jsx(Ps,{children:p.jsx(Ro,{})}),p.jsxs(Ts,{children:[p.jsx(Bi,{value:"local",children:"Local Filesystem"}),p.jsx(Bi,{value:"s3",children:"Amazon S3"})]})]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Switch between local storage and S3 bucket."})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs(Te,{htmlFor:"lancedbPath",className:"flex items-center gap-2",children:[b?p.jsx(lx,{className:"h-4 w-4"}):p.jsx(aA,{className:"h-4 w-4"}),b?"S3 Bucket Path":"LanceDB Path"]}),p.jsx(Ge,{id:"lancedbPath",value:t.lancedb.dbPath,onChange:w=>n("lancedb",{...t.lancedb,dbPath:w.target.value}),placeholder:b?"s3://your-bucket/path/to/lancedb":"./.lancedb"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:b?"Path to LanceDB dataset in S3.":"Local path for LanceDB files."})]}),b&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(lx,{className:"h-4 w-4"}),p.jsx("p",{className:"text-sm font-medium",children:"S3 Credentials"}),p.jsxs(Ot,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[p.jsx(Yc,{className:"h-3 w-3"}),"Stored locally"]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"s3AccessKeyId",children:"S3 Access Key ID"}),p.jsx(Ge,{id:"s3AccessKeyId",value:s||"",onChange:w=>u(w.target.value||null),placeholder:"AKIA..."})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"s3SecretAccessKey",children:"S3 Secret Access Key"}),p.jsxs("div",{className:"relative",children:[p.jsx(Ge,{id:"s3SecretAccessKey",type:m?"text":"password",value:o||"",onChange:w=>f(w.target.value||null),placeholder:"••••••••",className:"pr-10"}),p.jsx(Se,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3",onClick:()=>v(!m),children:m?p.jsx(kp,{className:"h-4 w-4"}):p.jsx(Cp,{className:"h-4 w-4"})})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"s3SessionToken",children:"S3 Session Token (optional)"}),p.jsxs("div",{className:"relative",children:[p.jsx(Ge,{id:"s3SessionToken",type:y?"text":"password",value:a||"",onChange:w=>d(w.target.value||null),placeholder:"Optional",className:"pr-10"}),p.jsx(Se,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3",onClick:()=>x(!y),children:y?p.jsx(kp,{className:"h-4 w-4"}):p.jsx(Cp,{className:"h-4 w-4"})})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"s3Region",children:"S3 Region (optional)"}),p.jsx(Ge,{id:"s3Region",value:l||"",onChange:w=>h(w.target.value||null),placeholder:"us-east-1"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"s3Endpoint",children:"S3 Endpoint (optional)"}),p.jsx(Ge,{id:"s3Endpoint",value:c||"",onChange:w=>g(w.target.value||null),placeholder:"https://s3.amazonaws.com"})]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"S3 credentials are stored in browser localStorage and sent as request headers. They are never saved into `RAG.config.json`."})]})]})]})}const jye=[{value:"wasm",label:"Local (WASM)",description:"Runs locally in browser - no API key required",icon:oA},{value:"voyage",label:"Voyage AI",description:"High-quality embeddings via Voyage AI API",icon:lx},{value:"ollama",label:"Ollama",description:"Self-hosted Ollama server",icon:Kk},{value:"localai",label:"LocalAI",description:"OpenAI-compatible local embeddings API",icon:Kk}],cR=[{value:"voyage-3",label:"voyage-3 (Recommended)",dimensions:1024},{value:"voyage-3-lite",label:"voyage-3-lite (Faster)",dimensions:512},{value:"voyage-code-3",label:"voyage-code-3 (Code-optimized)",dimensions:1024}],Mye=[{value:"none",label:"None"},{value:"wasm",label:"Local (WASM)"},{value:"voyage",label:"Voyage AI"},{value:"localai",label:"LocalAI"}],Dye=[{value:"rerank-2.5-lite",label:"rerank-2.5-lite (Recommended)"},{value:"rerank-2.5",label:"rerank-2.5 (Higher quality)"}],Lye={enabled:!1,provider:"none",topK:50,prerankThreshold:.3,maxDocumentLength:2e3,batchSize:100,wasmModel:"Xenova/ms-marco-MiniLM-L-6-v2",voyageModel:"rerank-2.5-lite",localaiBaseUrl:"http://localhost:8080",localaiRerankModel:"jina-reranker-v1-base-en"};function zye(){const{config:t,updateNestedConfig:e,errors:n}=ma(),{voyageApiKey:r,localaiApiKey:i,ollamaBaseUrl:s,setVoyageApiKey:o,setLocalaiApiKey:a,setOllamaBaseUrl:l}=jf(),[c,u]=O.useState(!1),[f,d]=O.useState(!1);if(!t)return null;const h=t.embedding.provider,g=t.reranking??Lye,m=v=>{e("reranking",{...g,...v})};return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{children:"Embedding Provider"}),p.jsxs(Eo,{value:h,onValueChange:v=>{e("embedding",{provider:v,dimensions:v==="wasm"?384:v==="voyage"?1024:768})},children:[p.jsx(Ps,{children:p.jsx(Ro,{})}),p.jsx(Ts,{children:jye.map(v=>p.jsx(Bi,{value:v.value,children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(v.icon,{className:"h-4 w-4"}),p.jsx("span",{children:v.label})]})},v.value))})]})]}),h==="voyage"&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Te,{htmlFor:"voyageApiKey",children:"Voyage API Key"}),p.jsxs(Ot,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[p.jsx(Yc,{className:"h-3 w-3"}),"Stored locally"]})]}),p.jsxs("div",{className:"relative",children:[p.jsx(Ge,{id:"voyageApiKey",type:c?"text":"password",value:r||"",onChange:v=>o(v.target.value||null),placeholder:"pa-...",className:"pr-10"}),p.jsx(Se,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3",onClick:()=>u(!c),children:c?p.jsx(kp,{className:"h-4 w-4"}):p.jsx(Cp,{className:"h-4 w-4"})})]}),n.voyageApiKey&&p.jsx("p",{className:"text-xs text-destructive",children:n.voyageApiKey}),p.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your API key from"," ",p.jsx("a",{href:"https://dash.voyageai.com/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"dash.voyageai.com"}),". Your API key is stored securely in your browser's localStorage, never saved to the project config file."]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"voyageModel",children:"Model"}),p.jsxs(Eo,{value:t.embedding.voyageModel||"voyage-3",onValueChange:v=>{const y=cR.find(x=>x.value===v);e("embedding",{voyageModel:v,dimensions:(y==null?void 0:y.dimensions)||1024})},children:[p.jsx(Ps,{id:"voyageModel",children:p.jsx(Ro,{})}),p.jsx(Ts,{children:cR.map(v=>p.jsx(Bi,{value:v.value,children:v.label},v.value))})]})]})]}),h==="ollama"&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Te,{htmlFor:"ollamaBaseUrl",children:"Ollama Base URL"}),p.jsxs(Ot,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[p.jsx(Yc,{className:"h-3 w-3"}),"Stored locally"]})]}),p.jsx(Ge,{id:"ollamaBaseUrl",value:s||"",onChange:v=>l(v.target.value||null),placeholder:"http://localhost:11434"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"URL of your Ollama server. Stored in your browser's localStorage."})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"ollamaModel",children:"Model Name"}),p.jsx(Ge,{id:"ollamaModel",value:t.embedding.model||"",onChange:v=>e("embedding",{model:v.target.value}),placeholder:"nomic-embed-text"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Embedding model to use (e.g., nomic-embed-text, mxbai-embed-large)"})]})]}),h==="localai"&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Te,{htmlFor:"localaiBaseUrl",children:"LocalAI Base URL"}),p.jsxs(Ot,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[p.jsx(Yc,{className:"h-3 w-3"}),"In project config"]})]}),p.jsx(Ge,{id:"localaiBaseUrl",value:t.embedding.localaiBaseUrl||"http://localhost:8080",onChange:v=>e("embedding",{localaiBaseUrl:v.target.value}),placeholder:"http://localhost:8080"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"URL of your LocalAI server (OpenAI-compatible API)."})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"localaiModel",children:"Model Name"}),p.jsx(Ge,{id:"localaiModel",value:t.embedding.localaiModel||"",onChange:v=>e("embedding",{localaiModel:v.target.value}),placeholder:"nomic-embed-text"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Te,{htmlFor:"localaiApiKey",children:"LocalAI API Key (Optional)"}),p.jsxs(Ot,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[p.jsx(Yc,{className:"h-3 w-3"}),"Stored locally"]})]}),p.jsxs("div",{className:"relative",children:[p.jsx(Ge,{id:"localaiApiKey",type:f?"text":"password",value:i||"",onChange:v=>a(v.target.value||null),placeholder:"sk-...",className:"pr-10"}),p.jsx(Se,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3",onClick:()=>d(!f),children:f?p.jsx(kp,{className:"h-4 w-4"}):p.jsx(Cp,{className:"h-4 w-4"})})]})]})]}),p.jsxs("div",{className:"border-t pt-6 space-y-4",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs(Te,{className:"flex items-center gap-2",children:[p.jsx(lA,{className:"h-4 w-4"}),"Reranking"]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Improve search quality by reranking vector search candidates"})]}),p.jsx(zo,{checked:g.enabled,onCheckedChange:v=>m({enabled:v,provider:v?g.provider==="none"?"wasm":g.provider:"none"})})]}),g.enabled&&p.jsxs("div",{className:"space-y-4 rounded-lg border p-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{children:"Reranking Provider"}),p.jsxs(Eo,{value:g.provider,onValueChange:v=>m({provider:v}),children:[p.jsx(Ps,{children:p.jsx(Ro,{})}),p.jsx(Ts,{children:Mye.map(v=>p.jsx(Bi,{value:v.value,children:v.label},v.value))})]})]}),p.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"rerankTopK",children:"Candidates to fetch (`topK`)"}),p.jsx(Ge,{id:"rerankTopK",type:"number",min:10,max:200,step:10,value:g.topK,onChange:v=>m({topK:Number(v.target.value||50)})})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"rerankThreshold",children:"Pre-rank threshold"}),p.jsx(Ge,{id:"rerankThreshold",type:"number",min:0,max:1,step:.05,value:g.prerankThreshold,onChange:v=>m({prerankThreshold:Number(v.target.value||.3)})})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"rerankMaxLength",children:"Max document length"}),p.jsx(Ge,{id:"rerankMaxLength",type:"number",min:500,max:5e3,step:500,value:g.maxDocumentLength,onChange:v=>m({maxDocumentLength:Number(v.target.value||2e3)})})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"rerankBatchSize",children:"Batch size"}),p.jsx(Ge,{id:"rerankBatchSize",type:"number",min:10,max:1e3,step:10,disabled:g.provider==="wasm",value:g.batchSize,onChange:v=>m({batchSize:Number(v.target.value||100)})})]})]}),g.provider==="wasm"&&p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"rerankWasmModel",children:"WASM Model"}),p.jsxs(Eo,{value:g.wasmModel||"Xenova/ms-marco-MiniLM-L-6-v2",onValueChange:v=>m({wasmModel:v}),children:[p.jsx(Ps,{id:"rerankWasmModel",children:p.jsx(Ro,{})}),p.jsx(Ts,{children:p.jsx(Bi,{value:"Xenova/ms-marco-MiniLM-L-6-v2",children:"Xenova/ms-marco-MiniLM-L-6-v2"})})]})]}),g.provider==="voyage"&&p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"rerankVoyageModel",children:"Voyage Rerank Model"}),p.jsxs(Eo,{value:g.voyageModel||"rerank-2.5-lite",onValueChange:v=>m({voyageModel:v}),children:[p.jsx(Ps,{id:"rerankVoyageModel",children:p.jsx(Ro,{})}),p.jsx(Ts,{children:Dye.map(v=>p.jsx(Bi,{value:v.value,children:v.label},v.value))})]}),n.voyageApiKey&&p.jsx("p",{className:"text-xs text-destructive",children:n.voyageApiKey}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Uses the same Voyage API key as embeddings."})]}),g.provider==="localai"&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"rerankLocalaiBaseUrl",children:"LocalAI Base URL"}),p.jsx(Ge,{id:"rerankLocalaiBaseUrl",value:g.localaiBaseUrl||"http://localhost:8080",onChange:v=>m({localaiBaseUrl:v.target.value}),placeholder:"http://localhost:8080"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"rerankLocalaiModel",children:"LocalAI Rerank Model"}),p.jsx(Ge,{id:"rerankLocalaiModel",value:g.localaiRerankModel||"",onChange:v=>m({localaiRerankModel:v.target.value}),placeholder:"jina-reranker-v1-base-en"})]})]})]})]})]})}function uR({value:t,onChange:e,placeholder:n="Add pattern...",suggestions:r=[],className:i,disabled:s}){const[o,a]=O.useState(""),l=d=>{const h=d.trim();h&&!t.includes(h)&&e([...t,h]),a("")},c=d=>{e(t.filter((h,g)=>g!==d))},u=d=>{d.key==="Enter"?(d.preventDefault(),l(o)):d.key==="Backspace"&&!o&&t.length>0&&c(t.length-1)},f=r.filter(d=>!t.includes(d)&&d.toLowerCase().includes(o.toLowerCase()));return p.jsxs("div",{className:le("space-y-2",i),children:[p.jsxs("div",{className:"flex flex-wrap gap-1.5 min-h-[32px] p-2 border rounded-md bg-background",children:[t.map((d,h)=>p.jsxs(Ot,{variant:"secondary",className:"gap-1 pr-1 font-mono text-xs",children:[d,!s&&p.jsx("button",{type:"button",onClick:()=>c(h),className:"ml-1 rounded-full hover:bg-muted p-0.5",children:p.jsx(zf,{className:"h-3 w-3"})})]},`${d}-${h}`)),!s&&p.jsx(Ge,{value:o,onChange:d=>a(d.target.value),onKeyDown:u,placeholder:t.length===0?n:"",className:"flex-1 min-w-[120px] border-0 h-6 p-0 focus-visible:ring-0 focus-visible:ring-offset-0 font-mono text-sm"})]}),!s&&f.length>0&&o&&p.jsx("div",{className:"flex flex-wrap gap-1",children:f.slice(0,5).map(d=>p.jsxs(Se,{type:"button",variant:"outline",size:"sm",className:"h-6 text-xs font-mono",onClick:()=>l(d),children:[p.jsx(Jb,{className:"h-3 w-3 mr-1"}),d]},d))}),!s&&t.length===0&&r.length>0&&!o&&p.jsxs("div",{className:"text-xs text-muted-foreground",children:["Suggestions:"," ",r.slice(0,3).map((d,h)=>p.jsxs("span",{children:[p.jsx("button",{type:"button",onClick:()=>l(d),className:"font-mono text-primary hover:underline",children:d}),h<2&&r.length>h+1&&", "]},d))]})]})}const Bye=["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py","**/*.go","**/*.rs","**/*.java","src/**/*"],Vye=["node_modules/**","dist/**","build/**",".git/**","**/*.test.ts","**/*.spec.ts","__tests__/**","vendor/**"];function Fye(){var i,s;const{config:t,updateNestedConfig:e,errors:n}=ma();if(!t)return null;const r=t.code.enabled;return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"space-y-4 rounded-lg border p-4",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs(Te,{className:"flex items-center gap-2",children:[p.jsx(sn,{className:"h-4 w-4"}),"Code Indexing"]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Index source code symbols for semantic search"})]}),p.jsx(zo,{checked:r,onCheckedChange:o=>e("code",{enabled:o})})]}),r&&p.jsxs("div",{className:"flex items-center justify-between border-t pt-4",children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs(Te,{className:"flex items-center gap-2",children:[p.jsx(Wu,{className:"h-4 w-4"}),"Code Graph"]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Build symbol relationships graph (imports, calls, references)"})]}),p.jsx(zo,{checked:((i=t.code.graph)==null?void 0:i.enabled)??!1,onCheckedChange:o=>e("code",{graph:{...t.code.graph,enabled:o}})})]}),r&&p.jsxs("div",{className:"flex items-center justify-between border-t pt-4",children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs(Te,{className:"flex items-center gap-2",children:[p.jsx(yZ,{className:"h-4 w-4"}),"Tree Index"]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Index file tree structure for context expansion"})]}),p.jsx(zo,{checked:((s=t.code.tree)==null?void 0:s.enabled)??!1,onCheckedChange:o=>e("code",{tree:{...t.code.tree,enabled:o}})})]})]}),r&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{children:"Code Paths"}),p.jsx(F4,{value:t.code.paths||[],onChange:o=>e("code",{paths:o}),placeholder:"./src or /absolute/path"}),n.codePaths&&p.jsx("p",{className:"text-xs text-destructive",children:n.codePaths}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Paths to your source code directories"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs(Te,{children:["Include Patterns"," ",p.jsx(Ot,{variant:"outline",className:"ml-1 text-[10px]",children:"Glob"})]}),p.jsx(uR,{value:t.code.include||[],onChange:o=>e("code",{include:o}),placeholder:"Add include pattern...",suggestions:Bye}),n.codeInclude&&p.jsx("p",{className:"text-xs text-destructive",children:n.codeInclude}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"File patterns to include in indexing"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs(Te,{children:["Exclude Patterns"," ",p.jsx(Ot,{variant:"outline",className:"ml-1 text-[10px]",children:"Glob"})]}),p.jsx(uR,{value:t.code.exclude||[],onChange:o=>e("code",{exclude:o}),placeholder:"Add exclude pattern...",suggestions:Vye}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"File patterns to exclude from indexing"})]})]}),!r&&p.jsxs("div",{className:"rounded-lg border border-dashed p-6 text-center text-muted-foreground",children:[p.jsx(sn,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),p.jsx("p",{className:"text-sm",children:"Enable code indexing to search through your source code"}),p.jsx("p",{className:"text-xs mt-1",children:"Supports TypeScript, JavaScript, Python, Go, Rust, and more"})]})]})}function Xye(){const{config:t,updateNestedConfig:e}=ma();if(!t)return null;const n=t.gitSync.enabled;return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs(Te,{htmlFor:"gitEnabled",className:"flex items-center gap-2",children:[p.jsx(Wu,{className:"h-4 w-4"}),"Git Sync"]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Sync index with git commits for incremental updates"})]}),p.jsx(zo,{checked:n,onCheckedChange:r=>e("gitSync",{enabled:r})})]}),n&&p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsxs(Te,{htmlFor:"autoSync",className:"flex items-center gap-2",children:[p.jsx(ui,{className:"h-4 w-4"}),"Auto-sync on Startup"]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Automatically sync index when project opens"})]}),p.jsx(zo,{checked:t.gitSync.autoSyncOnStartup,onCheckedChange:r=>e("gitSync",{autoSyncOnStartup:r})})]}),!n&&p.jsxs("div",{className:"rounded-lg border border-dashed p-6 text-center text-muted-foreground",children:[p.jsx(Wu,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),p.jsx("p",{className:"text-sm",children:"Git sync uses commit history for efficient incremental updates"}),p.jsx("p",{className:"text-xs mt-1",children:"Only changed files are re-indexed after each sync"})]})]})}function Zye(){const{config:t,createPath:e,setCreatePath:n,updateConfig:r,saveConfig:i,closeModal:s,errors:o,isSaving:a}=ma(),{openProject:l}=ha(),[c,u]=O.useState(null),[f,d]=O.useState(!1),[h,g]=O.useState(null),m=async()=>{try{const x=await fetch("/api/project/browse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"folder"})});if(!x.ok){u("Failed to open folder picker");return}const b=await x.json();if(b.cancelled)return;if(b.path&&(n(b.path),u(null),!(t!=null&&t.name))){const k=b.path.split("/").pop()||"";r("name",k)}}catch{u("Failed to open folder picker")}},v=async()=>{if(!e.trim()){u("Project path is required");return}u(null),await i()&&(d(!0),g(e))},y=async()=>{h&&(await l(h),s())};return f?p.jsxs(p.Fragment,{children:[p.jsxs(Uo,{children:[p.jsxs(Go,{className:"flex items-center gap-2",children:[p.jsx(Ki,{className:"h-5 w-5 text-green-500"}),"Project Created"]}),p.jsx(Ko,{children:"Your new project has been created successfully"})]}),p.jsxs("div",{className:"py-8 text-center space-y-4",children:[p.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-green-500/10",children:p.jsx(Ki,{className:"h-8 w-8 text-green-500"})}),p.jsxs("div",{children:[p.jsx("p",{className:"font-medium",children:(t==null?void 0:t.name)||"New Project"}),p.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:h})]}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"You can configure embedding, code indexing and other settings later in Project Settings."})]}),p.jsxs(Ho,{children:[p.jsx(Se,{variant:"outline",onClick:s,children:"Close"}),p.jsxs(Se,{onClick:y,children:[p.jsx(Eh,{className:"h-4 w-4 mr-2"}),"Open Project"]})]})]}):p.jsxs(p.Fragment,{children:[p.jsxs(Uo,{children:[p.jsxs(Go,{className:"flex items-center gap-2",children:[p.jsx(Eh,{className:"h-5 w-5"}),"Create New Project"]}),p.jsx(Ko,{children:"Choose a location and name for your project. Other settings can be configured later."})]}),p.jsxs("div",{className:"py-4 space-y-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"projectPath",children:"Project Directory"}),p.jsxs("div",{className:"flex gap-2",children:[p.jsxs("div",{className:"relative flex-1",children:[p.jsx(kl,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),p.jsx(Ge,{id:"projectPath",value:e,onChange:x=>{n(x.target.value),u(null)},placeholder:"/path/to/new/project",className:"pl-9",autoFocus:!0})]}),p.jsxs(Se,{type:"button",variant:"outline",onClick:m,className:"shrink-0",children:[p.jsx(dA,{className:"h-4 w-4 mr-2"}),"Browse"]})]}),c&&p.jsxs("p",{className:"text-xs text-destructive flex items-center gap-1",children:[p.jsx(Or,{className:"h-3 w-3"}),c]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Te,{htmlFor:"projectName",children:"Project Name"}),p.jsx(Ge,{id:"projectName",value:(t==null?void 0:t.name)||"",onChange:x=>r("name",x.target.value),placeholder:"My Notes"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional. Will use folder name if not specified."})]}),p.jsxs("div",{className:"rounded-lg border p-4 bg-muted/30",children:[p.jsx("p",{className:"text-sm font-medium mb-2",children:"The following will be created:"}),p.jsxs("ul",{className:"text-xs text-muted-foreground space-y-1 font-mono",children:[p.jsxs("li",{children:[e||"/path/to/project","/"]}),p.jsx("li",{className:"pl-4",children:"RAG.config.json"}),p.jsx("li",{className:"pl-4",children:"vault/"}),p.jsx("li",{className:"pl-4",children:".lancedb/"}),p.jsx("li",{className:"pl-4",children:".gitignore"})]})]}),p.jsxs("div",{className:"rounded-lg border p-4 bg-blue-500/5 border-blue-500/20",children:[p.jsx("p",{className:"text-sm text-muted-foreground",children:"Project will be created with default settings:"}),p.jsxs("ul",{className:"text-xs text-muted-foreground mt-2 space-y-1",children:[p.jsxs("li",{children:["• ",p.jsx("span",{className:"font-medium",children:"Embedding:"})," Local (WASM) — works offline"]}),p.jsxs("li",{children:["• ",p.jsx("span",{className:"font-medium",children:"Vault:"})," ./vault"]}),p.jsxs("li",{children:["• ",p.jsx("span",{className:"font-medium",children:"Index:"})," ./.lancedb"]})]}),p.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Configure embedding provider, code indexing and more in Settings after creation."})]}),o._general&&p.jsx("div",{className:"p-3 rounded-lg bg-destructive/10 border border-destructive/20",children:p.jsxs("p",{className:"text-sm text-destructive flex items-center gap-2",children:[p.jsx(Or,{className:"h-4 w-4"}),o._general]})})]}),p.jsxs(Ho,{children:[p.jsx(Se,{variant:"outline",onClick:s,children:"Cancel"}),p.jsx(Se,{onClick:v,disabled:a,children:a?p.jsxs(p.Fragment,{children:[p.jsx(Un,{className:"h-4 w-4 mr-2 animate-spin"}),"Creating..."]}):p.jsxs(p.Fragment,{children:[p.jsx(Eh,{className:"h-4 w-4 mr-2"}),"Create Project"]})})]})]})}const Wye=[{value:"general",label:"General",icon:Sn},{value:"embedding",label:"Embedding",icon:oA},{value:"code",label:"Code",icon:sn},{value:"gitSync",label:"Git Sync",icon:Wu}];function X4(){const{isOpen:t,mode:e,activeTab:n,setActiveTab:r,closeModal:i,config:s,isDirty:o,isLoading:a,isSaving:l,errors:c,saveConfig:u,resetConfig:f}=ma(),d=g=>{!g&&o&&!window.confirm("You have unsaved changes. Are you sure you want to close?")||g||i()},h=async()=>{await u()&&e==="edit"&&i()};return e==="create"?p.jsx(Hu,{open:t,onOpenChange:d,children:p.jsx(Tl,{className:"max-w-2xl min-h-[600px]",children:p.jsx(Zye,{})})}):p.jsx(Hu,{open:t,onOpenChange:d,children:p.jsxs(Tl,{className:"max-w-2xl min-h-[600px] max-h-[85vh] overflow-hidden flex flex-col",children:[p.jsxs(Uo,{children:[p.jsxs(Go,{className:"flex items-center gap-2",children:[p.jsx(uA,{className:"h-5 w-5"}),"Project Settings"]}),p.jsx(Ko,{children:"Configure your RAG project settings"})]}),a?p.jsx("div",{className:"flex items-center justify-center py-12",children:p.jsx(Un,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):c._general?p.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-4",children:[p.jsx(Or,{className:"h-12 w-12 text-destructive"}),p.jsx("p",{className:"text-destructive",children:c._general}),p.jsx(Se,{variant:"outline",onClick:i,children:"Close"})]}):s?p.jsxs(p.Fragment,{children:[p.jsxs(jw,{value:n,onValueChange:g=>r(g),className:"flex-1 overflow-hidden flex flex-col",children:[p.jsx(cg,{className:"grid w-full grid-cols-4",children:Wye.map(g=>p.jsxs(Rl,{value:g.value,className:"flex items-center gap-1.5",children:[p.jsx(g.icon,{className:"h-4 w-4"}),p.jsx("span",{className:"hidden sm:inline",children:g.label})]},g.value))}),p.jsxs("div",{className:"flex-1 overflow-y-auto py-4",children:[p.jsx(Qo,{value:"general",className:"mt-0",children:p.jsx(Nye,{})}),p.jsx(Qo,{value:"embedding",className:"mt-0",children:p.jsx(zye,{})}),p.jsx(Qo,{value:"code",className:"mt-0",children:p.jsx(Fye,{})}),p.jsx(Qo,{value:"gitSync",className:"mt-0",children:p.jsx(Xye,{})})]})]}),p.jsxs(Ho,{className:"gap-2 sm:gap-0",children:[o&&p.jsx(Se,{variant:"ghost",onClick:f,disabled:l,children:"Reset"}),p.jsx(Se,{variant:"outline",onClick:()=>d(!1),children:"Cancel"}),p.jsx(Se,{onClick:h,disabled:!o||l,children:l?p.jsxs(p.Fragment,{children:[p.jsx(Un,{className:"h-4 w-4 mr-2 animate-spin"}),"Saving..."]}):"Save Changes"})]})]}):null]})})}var fR=1,qye=.9,Yye=.8,Uye=.17,lv=.1,cv=.999,Hye=.9999,Gye=.99,Kye=/[\\\/_+.#"@\[\(\{&]/,Jye=/[\\\/_+.#"@\[\(\{&]/g,eve=/[\s-]/,Z4=/[\s-]/g;function q0(t,e,n,r,i,s,o){if(s===e.length)return i===t.length?fR:Gye;var a=`${i},${s}`;if(o[a]!==void 0)return o[a];for(var l=r.charAt(s),c=n.indexOf(l,i),u=0,f,d,h,g;c>=0;)f=q0(t,e,n,r,c+1,s+1,o),f>u&&(c===i?f*=fR:Kye.test(t.charAt(c-1))?(f*=Yye,h=t.slice(i,c-1).match(Jye),h&&i>0&&(f*=Math.pow(cv,h.length))):eve.test(t.charAt(c-1))?(f*=qye,g=t.slice(i,c-1).match(Z4),g&&i>0&&(f*=Math.pow(cv,g.length))):(f*=Uye,i>0&&(f*=Math.pow(cv,c-i))),t.charAt(c)!==e.charAt(s)&&(f*=Hye)),(f<lv&&n.charAt(c-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(c-1)!==r.charAt(s))&&(d=q0(t,e,n,r,c+1,s+2,o),d*lv>f&&(f=d*lv)),f>u&&(u=f),c=n.indexOf(l,c+1);return o[a]=u,u}function dR(t){return t.toLowerCase().replace(Z4," ")}function tve(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,q0(t,e,dR(t),dR(e),0,0,{})}var Fc='[cmdk-group=""]',uv='[cmdk-group-items=""]',nve='[cmdk-group-heading=""]',W4='[cmdk-item=""]',hR=`${W4}:not([aria-disabled="true"])`,Y0="cmdk-item-select",Ia="data-value",rve=(t,e,n)=>tve(t,e,n),q4=O.createContext(void 0),od=()=>O.useContext(q4),Y4=O.createContext(void 0),RS=()=>O.useContext(Y4),U4=O.createContext(void 0),H4=O.forwardRef((t,e)=>{let n=Na(()=>{var $,R;return{search:"",value:(R=($=t.value)!=null?$:t.defaultValue)!=null?R:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Na(()=>new Set),i=Na(()=>new Map),s=Na(()=>new Map),o=Na(()=>new Set),a=G4(t),{label:l,children:c,value:u,onValueChange:f,filter:d,shouldFilter:h,loop:g,disablePointerSelection:m=!1,vimBindings:v=!0,...y}=t,x=Yt(),b=Yt(),k=Yt(),w=O.useRef(null),S=pve();ca(()=>{if(u!==void 0){let $=u.trim();n.current.value=$,C.emit()}},[u]),ca(()=>{S(6,L)},[]);let C=O.useMemo(()=>({subscribe:$=>(o.current.add($),()=>o.current.delete($)),snapshot:()=>n.current,setState:($,R,q)=>{var H,ie,Y,pe;if(!Object.is(n.current[$],R)){if(n.current[$]=R,$==="search")A(),E(),S(1,j);else if($==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let me=document.getElementById(k);me?me.focus():(H=document.getElementById(x))==null||H.focus()}if(S(7,()=>{var me;n.current.selectedItemId=(me=z())==null?void 0:me.id,C.emit()}),q||S(5,L),((ie=a.current)==null?void 0:ie.value)!==void 0){let me=R??"";(pe=(Y=a.current).onValueChange)==null||pe.call(Y,me);return}}C.emit()}},emit:()=>{o.current.forEach($=>$())}}),[]),_=O.useMemo(()=>({value:($,R,q)=>{var H;R!==((H=s.current.get($))==null?void 0:H.value)&&(s.current.set($,{value:R,keywords:q}),n.current.filtered.items.set($,I(R,q)),S(2,()=>{E(),C.emit()}))},item:($,R)=>(r.current.add($),R&&(i.current.has(R)?i.current.get(R).add($):i.current.set(R,new Set([$]))),S(3,()=>{A(),E(),n.current.value||j(),C.emit()}),()=>{s.current.delete($),r.current.delete($),n.current.filtered.items.delete($);let q=z();S(4,()=>{A(),(q==null?void 0:q.getAttribute("id"))===$&&j(),C.emit()})}),group:$=>(i.current.has($)||i.current.set($,new Set),()=>{s.current.delete($),i.current.delete($)}),filter:()=>a.current.shouldFilter,label:l||t["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:x,inputId:k,labelId:b,listInnerRef:w}),[]);function I($,R){var q,H;let ie=(H=(q=a.current)==null?void 0:q.filter)!=null?H:rve;return $?ie($,n.current.search,R):0}function E(){if(!n.current.search||a.current.shouldFilter===!1)return;let $=n.current.filtered.items,R=[];n.current.filtered.groups.forEach(H=>{let ie=i.current.get(H),Y=0;ie.forEach(pe=>{let me=$.get(pe);Y=Math.max(me,Y)}),R.push([H,Y])});let q=w.current;X().sort((H,ie)=>{var Y,pe;let me=H.getAttribute("id"),ye=ie.getAttribute("id");return((Y=$.get(ye))!=null?Y:0)-((pe=$.get(me))!=null?pe:0)}).forEach(H=>{let ie=H.closest(uv);ie?ie.appendChild(H.parentElement===ie?H:H.closest(`${uv} > *`)):q.appendChild(H.parentElement===q?H:H.closest(`${uv} > *`))}),R.sort((H,ie)=>ie[1]-H[1]).forEach(H=>{var ie;let Y=(ie=w.current)==null?void 0:ie.querySelector(`${Fc}[${Ia}="${encodeURIComponent(H[0])}"]`);Y==null||Y.parentElement.appendChild(Y)})}function j(){let $=X().find(q=>q.getAttribute("aria-disabled")!=="true"),R=$==null?void 0:$.getAttribute(Ia);C.setState("value",R||void 0)}function A(){var $,R,q,H;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ie=0;for(let Y of r.current){let pe=(R=($=s.current.get(Y))==null?void 0:$.value)!=null?R:"",me=(H=(q=s.current.get(Y))==null?void 0:q.keywords)!=null?H:[],ye=I(pe,me);n.current.filtered.items.set(Y,ye),ye>0&&ie++}for(let[Y,pe]of i.current)for(let me of pe)if(n.current.filtered.items.get(me)>0){n.current.filtered.groups.add(Y);break}n.current.filtered.count=ie}function L(){var $,R,q;let H=z();H&&((($=H.parentElement)==null?void 0:$.firstChild)===H&&((q=(R=H.closest(Fc))==null?void 0:R.querySelector(nve))==null||q.scrollIntoView({block:"nearest"})),H.scrollIntoView({block:"nearest"}))}function z(){var $;return($=w.current)==null?void 0:$.querySelector(`${W4}[aria-selected="true"]`)}function X(){var $;return Array.from((($=w.current)==null?void 0:$.querySelectorAll(hR))||[])}function W($){let R=X()[$];R&&C.setState("value",R.getAttribute(Ia))}function F($){var R;let q=z(),H=X(),ie=H.findIndex(pe=>pe===q),Y=H[ie+$];(R=a.current)!=null&&R.loop&&(Y=ie+$<0?H[H.length-1]:ie+$===H.length?H[0]:H[ie+$]),Y&&C.setState("value",Y.getAttribute(Ia))}function N($){let R=z(),q=R==null?void 0:R.closest(Fc),H;for(;q&&!H;)q=$>0?dve(q,Fc):hve(q,Fc),H=q==null?void 0:q.querySelector(hR);H?C.setState("value",H.getAttribute(Ia)):F($)}let Q=()=>W(X().length-1),P=$=>{$.preventDefault(),$.metaKey?Q():$.altKey?N(1):F(1)},M=$=>{$.preventDefault(),$.metaKey?W(0):$.altKey?N(-1):F(-1)};return O.createElement(ue.div,{ref:e,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:$=>{var R;(R=y.onKeyDown)==null||R.call(y,$);let q=$.nativeEvent.isComposing||$.keyCode===229;if(!($.defaultPrevented||q))switch($.key){case"n":case"j":{v&&$.ctrlKey&&P($);break}case"ArrowDown":{P($);break}case"p":case"k":{v&&$.ctrlKey&&M($);break}case"ArrowUp":{M($);break}case"Home":{$.preventDefault(),W(0);break}case"End":{$.preventDefault(),Q();break}case"Enter":{$.preventDefault();let H=z();if(H){let ie=new Event(Y0);H.dispatchEvent(ie)}}}}},O.createElement("label",{"cmdk-label":"",htmlFor:_.inputId,id:_.labelId,style:gve},l),Xg(t,$=>O.createElement(Y4.Provider,{value:C},O.createElement(q4.Provider,{value:_},$))))}),ive=O.forwardRef((t,e)=>{var n,r;let i=Yt(),s=O.useRef(null),o=O.useContext(U4),a=od(),l=G4(t),c=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;ca(()=>{if(!c)return a.item(i,o==null?void 0:o.id)},[c]);let u=K4(i,s,[t.value,t.children,s],t.keywords),f=RS(),d=to(S=>S.value&&S.value===u.current),h=to(S=>c||a.filter()===!1?!0:S.search?S.filtered.items.get(i)>0:!0);O.useEffect(()=>{let S=s.current;if(!(!S||t.disabled))return S.addEventListener(Y0,g),()=>S.removeEventListener(Y0,g)},[h,t.onSelect,t.disabled]);function g(){var S,C;m(),(C=(S=l.current).onSelect)==null||C.call(S,u.current)}function m(){f.setState("value",u.current,!0)}if(!h)return null;let{disabled:v,value:y,onSelect:x,forceMount:b,keywords:k,...w}=t;return O.createElement(ue.div,{ref:kn(s,e),...w,id:i,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!d,"data-disabled":!!v,"data-selected":!!d,onPointerMove:v||a.getDisablePointerSelection()?void 0:m,onClick:v?void 0:g},t.children)}),sve=O.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:i,...s}=t,o=Yt(),a=O.useRef(null),l=O.useRef(null),c=Yt(),u=od(),f=to(h=>i||u.filter()===!1?!0:h.search?h.filtered.groups.has(o):!0);ca(()=>u.group(o),[]),K4(o,a,[t.value,t.heading,l]);let d=O.useMemo(()=>({id:o,forceMount:i}),[i]);return O.createElement(ue.div,{ref:kn(a,e),...s,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&O.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),Xg(t,h=>O.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},O.createElement(U4.Provider,{value:d},h))))}),ove=O.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,i=O.useRef(null),s=to(o=>!o.search);return!n&&!s?null:O.createElement(ue.div,{ref:kn(i,e),...r,"cmdk-separator":"",role:"separator"})}),ave=O.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,i=t.value!=null,s=RS(),o=to(c=>c.search),a=to(c=>c.selectedItemId),l=od();return O.useEffect(()=>{t.value!=null&&s.setState("search",t.value)},[t.value]),O.createElement(ue.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":a,id:l.inputId,type:"text",value:i?t.value:o,onChange:c=>{i||s.setState("search",c.target.value),n==null||n(c.target.value)}})}),lve=O.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...i}=t,s=O.useRef(null),o=O.useRef(null),a=to(c=>c.selectedItemId),l=od();return O.useEffect(()=>{if(o.current&&s.current){let c=o.current,u=s.current,f,d=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let h=c.offsetHeight;u.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return d.observe(c),()=>{cancelAnimationFrame(f),d.unobserve(c)}}},[]),O.createElement(ue.div,{ref:kn(s,e),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:l.listId},Xg(t,c=>O.createElement("div",{ref:kn(o,l.listInnerRef),"cmdk-list-sizer":""},c)))}),cve=O.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:s,container:o,...a}=t;return O.createElement(TQ,{open:n,onOpenChange:r},O.createElement(EQ,{container:o},O.createElement(gw,{"cmdk-overlay":"",className:i}),O.createElement(Ow,{"aria-label":t.label,"cmdk-dialog":"",className:s},O.createElement(H4,{ref:e,...a}))))}),uve=O.forwardRef((t,e)=>to(n=>n.filtered.count===0)?O.createElement(ue.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),fve=O.forwardRef((t,e)=>{let{progress:n,children:r,label:i="Loading...",...s}=t;return O.createElement(ue.div,{ref:e,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Xg(t,o=>O.createElement("div",{"aria-hidden":!0},o)))}),En=Object.assign(H4,{List:lve,Item:ive,Input:ave,Group:sve,Separator:ove,Dialog:cve,Empty:uve,Loading:fve});function dve(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function hve(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function G4(t){let e=O.useRef(t);return ca(()=>{e.current=t}),e}var ca=typeof window>"u"?O.useEffect:O.useLayoutEffect;function Na(t){let e=O.useRef();return e.current===void 0&&(e.current=t()),e}function to(t){let e=RS(),n=()=>t(e.snapshot());return O.useSyncExternalStore(e.subscribe,n,n)}function K4(t,e,n,r=[]){let i=O.useRef(),s=od();return ca(()=>{var o;let a=(()=>{var c;for(let u of n){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim():i.current}})(),l=r.map(c=>c.trim());s.value(t,a,l),(o=e.current)==null||o.setAttribute(Ia,a),i.current=a}),i}var pve=()=>{let[t,e]=O.useState(),n=Na(()=>new Map);return ca(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,i)=>{n.current.set(r,i),e({})}};function mve(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function Xg({asChild:t,children:e},n){return t&&O.isValidElement(e)?O.cloneElement(mve(e),{ref:e.ref},n(e.props.children)):n(e)}var gve={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const J4=O.forwardRef(({className:t,...e},n)=>p.jsx(En,{ref:n,className:le("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));J4.displayName=En.displayName;const Ove=({children:t,shouldFilter:e=!0,className:n,...r})=>p.jsx(Hu,{...r,children:p.jsx(Tl,{className:le("overflow-hidden p-0 shadow-lg max-w-lg",n),children:p.jsx(J4,{shouldFilter:e,className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t})})}),ez=O.forwardRef(({className:t,...e},n)=>p.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[p.jsx(ew,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),p.jsx(En.Input,{ref:n,className:le("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));ez.displayName=En.Input.displayName;const tz=O.forwardRef(({className:t,...e},n)=>p.jsx(En.List,{ref:n,className:le("overflow-y-auto overflow-x-hidden",t),...e}));tz.displayName=En.List.displayName;const yve=O.forwardRef((t,e)=>p.jsx(En.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));yve.displayName=En.Empty.displayName;const vve=O.forwardRef(({className:t,...e},n)=>p.jsx(En.Group,{ref:n,className:le("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));vve.displayName=En.Group.displayName;const xve=O.forwardRef(({className:t,...e},n)=>p.jsx(En.Separator,{ref:n,className:le("-mx-1 h-px bg-border",t),...e}));xve.displayName=En.Separator.displayName;const bve=O.forwardRef(({className:t,...e},n)=>p.jsx(En.Item,{ref:n,className:le("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",t),...e}));bve.displayName=En.Item.displayName;const wve={function:"fn",class:"C",method:"m",interface:"I",type:"T",variable:"v",constant:"c"};function Sve(t){return t.toFixed(2)}const kve=[{value:"hybrid",label:"Hybrid"},{value:"semantic",label:"Semantic"},{value:"text",label:"Text"},{value:"grep",label:"Grep"}];function Cve({scope:t,mode:e,onScopeChange:n,onModeChange:r}){const i=[{value:"notes",label:"Docs",icon:p.jsx(Sn,{className:"h-3 w-3"})},{value:"code",label:"Code",icon:p.jsx(sn,{className:"h-3 w-3"})}];return p.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b",children:[p.jsx("div",{className:"flex items-center gap-1",children:i.map(s=>p.jsxs("button",{onClick:()=>n(s.value),className:le("inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-xs font-medium transition-colors",t===s.value?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:[s.icon,s.label]},s.value))}),p.jsxs(Eo,{value:e,onValueChange:s=>r(s),children:[p.jsx(Ps,{className:"h-7 w-[100px] text-xs",children:p.jsx(Ro,{})}),p.jsx(Ts,{children:kve.map(s=>p.jsx(Bi,{value:s.value,className:"text-xs",children:s.label},s.value))})]})]})}function nz(){const{query:t,scope:e,mode:n,results:r,isSearching:i,isCommandPaletteOpen:s,setQuery:o,setScope:a,setMode:l,search:c,clearResults:u,resetResults:f,closeCommandPalette:d}=Ap(),{selectFile:h,setActiveTab:g}=Df(),[m,v]=O.useState(""),y=O.useCallback(E=>{f(),a(E),t.trim()&&setTimeout(()=>c(),0)},[a,t,c,f]),x=O.useCallback(E=>{f(),l(E),t.trim()&&setTimeout(()=>c(),0)},[l,t,c,f]),b=O.useMemo(()=>SW(()=>{c()},300),[c]),k=O.useCallback(E=>{v(E),o(E),E.trim()?b():u()},[o,b,u]),w=O.useCallback(E=>{h(E.path),g("notes"),d()},[h,g,d]),S=O.useCallback(E=>{h(E.path),g("code"),d()},[h,g,d]);O.useEffect(()=>{s||(v(""),o(""),u())},[s,o,u]);const C=r.notes.length>0||r.code.length>0,_=e==="all"||e==="notes",I=e==="all"||e==="code";return console.log("[CommandPalette] render:",{hasResults:C,showCode:I,codeLength:r.code.length,scope:e,isSearching:i}),p.jsxs(Ove,{open:s,onOpenChange:E=>!E&&d(),shouldFilter:!1,className:"max-w-[846px]",children:[p.jsx(ez,{placeholder:"Search docs, code, symbols...",value:m,onValueChange:k}),p.jsx(Cve,{scope:e,mode:n,onScopeChange:y,onModeChange:x}),p.jsxs(tz,{className:"min-h-[400px] p-4",children:[i&&!C&&p.jsxs("div",{className:"flex items-center justify-center py-16",children:[p.jsx(Un,{className:"h-6 w-6 animate-spin text-muted-foreground"}),p.jsx("span",{className:"ml-3 text-sm text-muted-foreground",children:"Searching..."})]}),!i&&!C&&p.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-muted-foreground",children:[p.jsx(ew,{className:"h-12 w-12 mb-4 opacity-40"}),p.jsx("p",{className:"text-sm",children:m.trim()?"No results found":"Start typing to search"})]}),C&&p.jsxs("div",{className:"space-y-6",children:[_&&r.notes.length>0&&p.jsxs("div",{children:[p.jsxs("h3",{className:"text-xs font-medium text-muted-foreground mb-3 flex items-center gap-2",children:[p.jsx(Sn,{className:"h-3.5 w-3.5"}),"Docs (",r.notes.length,")"]}),p.jsx("div",{className:"grid grid-cols-3 gap-3",children:r.notes.slice(0,12).map(E=>{var j;return p.jsxs("button",{onClick:()=>w(E),className:"group relative flex flex-col p-4 rounded-lg border bg-card hover:bg-accent hover:border-accent transition-colors text-left",children:[p.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p.jsx(Sn,{className:"h-4 w-4 text-blue-500 shrink-0"}),p.jsx("span",{className:"font-medium text-sm truncate",children:E.title||((j=E.path.split("/").pop())==null?void 0:j.replace(".md",""))})]}),p.jsx(Ot,{variant:"outline",className:"text-[10px] shrink-0 opacity-60 group-hover:opacity-100",children:Sve(E.score)})]}),E.section&&p.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground mb-2",children:[p.jsx(Hb,{className:"h-3 w-3"}),p.jsx("span",{className:"truncate",children:E.section})]}),E.content&&p.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:E.content.slice(0,120)})]},`${E.path}-${E.section}`)})})]}),I&&r.code.length>0&&p.jsxs("div",{children:[p.jsxs("h3",{className:"text-xs font-medium text-muted-foreground mb-3 flex items-center gap-2",children:[p.jsx(sn,{className:"h-3.5 w-3.5"}),"Code (",r.code.length,")"]}),p.jsx("div",{className:"grid grid-cols-3 gap-3",children:r.code.slice(0,12).map(E=>{var j;return p.jsxs("button",{onClick:()=>S(E),className:"group relative flex flex-col p-4 rounded-lg border bg-card hover:bg-accent hover:border-accent transition-colors text-left",children:[p.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p.jsx(sn,{className:"h-4 w-4 text-purple-500 shrink-0"}),p.jsx("span",{className:"font-mono font-medium text-sm truncate",children:E.name})]}),p.jsx(Ot,{variant:"secondary",className:"text-[10px] font-mono shrink-0",children:wve[E.type]||E.type})]}),p.jsxs("p",{className:"text-xs text-muted-foreground truncate mb-2",children:[wW(E.relativePath||E.path),E.startLine&&`:${E.startLine}`]}),(E.signature||E.content)&&p.jsx("p",{className:"text-xs text-muted-foreground font-mono line-clamp-2 bg-muted/50 rounded px-2 py-1",children:E.signature||((j=E.content)==null?void 0:j.slice(0,100))})]},E.id)})})]})]}),i&&C&&p.jsxs("div",{className:"flex items-center justify-center py-3 mt-4 border-t",children:[p.jsx(Un,{className:"h-3 w-3 animate-spin text-muted-foreground"}),p.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:"Updating..."})]})]})]})}function Pve(t){const e=Tve(t),n=O.forwardRef((r,i)=>{const{children:s,...o}=r,a=O.Children.toArray(s),l=a.find(Rve);if(l){const c=l.props.children,u=a.map(f=>f===l?O.Children.count(c)>1?O.Children.only(null):O.isValidElement(c)?c.props.children:null:f);return p.jsx(e,{...o,ref:i,children:O.isValidElement(c)?O.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function Tve(t){const e=O.forwardRef((n,r)=>{const{children:i,...s}=n;if(O.isValidElement(i)){const o=$ve(i),a=_ve(s,i.props);return i.type!==O.Fragment&&(a.ref=r?kn(r,o):o),O.cloneElement(i,a)}return O.Children.count(i)>1?O.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Eve=Symbol("radix.slottable");function Rve(t){return O.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Eve}function _ve(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function $ve(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var rz="Popover",[iz]=Cn(rz,[oo]),Zg=oo(),[Nxe,fo]=iz(rz),sz="PopoverAnchor",Ave=O.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=fo(sz,n),s=Zg(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=i;return O.useEffect(()=>(o(),()=>a()),[o,a]),p.jsx(Vf,{...s,...r,ref:e})});Ave.displayName=sz;var oz="PopoverTrigger",Qve=O.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=fo(oz,n),s=Zg(n),o=Pe(e,i.triggerRef),a=p.jsx(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":fz(i.open),...r,ref:o,onClick:ne(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?a:p.jsx(Vf,{asChild:!0,...s,children:a})});Qve.displayName=oz;var _S="PopoverPortal",[Ive,Nve]=iz(_S,{forceMount:void 0}),az=t=>{const{__scopePopover:e,forceMount:n,children:r,container:i}=t,s=fo(_S,e);return p.jsx(Ive,{scope:e,forceMount:n,children:p.jsx($t,{present:n||s.open,children:p.jsx(Ff,{asChild:!0,container:i,children:r})})})};az.displayName=_S;var Wl="PopoverContent",lz=O.forwardRef((t,e)=>{const n=Nve(Wl,t.__scopePopover),{forceMount:r=n.forceMount,...i}=t,s=fo(Wl,t.__scopePopover);return p.jsx($t,{present:r||s.open,children:s.modal?p.jsx(Mve,{...i,ref:e}):p.jsx(Dve,{...i,ref:e})})});lz.displayName=Wl;var jve=Pve("PopoverContent.RemoveScroll"),Mve=O.forwardRef((t,e)=>{const n=fo(Wl,t.__scopePopover),r=O.useRef(null),i=Pe(e,r),s=O.useRef(!1);return O.useEffect(()=>{const o=r.current;if(o)return ng(o)},[]),p.jsx(Zf,{as:jve,allowPinchZoom:!0,children:p.jsx(cz,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ne(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ne(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:ne(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),Dve=O.forwardRef((t,e)=>{const n=fo(Wl,t.__scopePopover),r=O.useRef(!1),i=O.useRef(!1);return p.jsx(cz,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),cz=O.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...f}=t,d=fo(Wl,n),h=Zg(n);return eg(),p.jsx(Xf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:p.jsx(nc,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>d.onOpenChange(!1),children:p.jsx(Um,{"data-state":fz(d.open),role:"dialog",id:d.contentId,...h,...f,ref:e,style:{...f.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)"}})})})}),uz="PopoverClose",Lve=O.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=fo(uz,n);return p.jsx(ue.button,{type:"button",...r,ref:e,onClick:ne(t.onClick,()=>i.onOpenChange(!1))})});Lve.displayName=uz;var zve="PopoverArrow",Bve=O.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Zg(n);return p.jsx(Hm,{...i,...r,ref:e})});Bve.displayName=zve;function fz(t){return t?"open":"closed"}var Vve=az,dz=lz;const Fve=O.forwardRef(({className:t,align:e="center",sideOffset:n=4,...r},i)=>p.jsx(Vve,{children:p.jsx(dz,{ref:i,align:e,sideOffset:n,className:le("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",t),...r})}));Fve.displayName=dz.displayName;var Xve=t=>{switch(t){case"success":return qve;case"info":return Uve;case"warning":return Yve;case"error":return Hve;default:return null}},Zve=Array(12).fill(0),Wve=({visible:t,className:e})=>ee.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},ee.createElement("div",{className:"sonner-spinner"},Zve.map((n,r)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),qve=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Yve=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Uve=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Hve=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Gve=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Kve=()=>{let[t,e]=ee.useState(document.hidden);return ee.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},U0=1,Jve=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,i=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:U0++,s=this.toasts.find(a=>a.id===i),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(a=>a.id===i?(this.publish({...a,...t,id:i,title:n}),{...a,...t,id:i,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),i=n!==void 0,s,o=r.then(async l=>{if(s=["resolve",l],ee.isValidElement(l))i=!1,this.create({id:n,type:"default",message:l});else if(txe(l)&&!l.ok){i=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:n,type:"error",message:c,description:u})}else if(e.success!==void 0){i=!1;let c=typeof e.success=="function"?await e.success(l):e.success,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(s=["reject",l],e.error!==void 0){i=!1;let c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;i&&(this.dismiss(n),n=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,c)=>o.then(()=>s[0]==="reject"?c(s[1]):l(s[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||U0++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},fn=new Jve,exe=(t,e)=>{let n=(e==null?void 0:e.id)||U0++;return fn.addToast({title:t,...e,id:n}),n},txe=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",nxe=exe,rxe=()=>fn.toasts,ixe=()=>fn.getActiveToasts();Object.assign(nxe,{success:fn.success,info:fn.info,warning:fn.warning,error:fn.error,custom:fn.custom,message:fn.message,promise:fn.promise,dismiss:fn.dismiss,loading:fn.loading},{getHistory:rxe,getToasts:ixe});function sxe(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}sxe(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
508
|
+
`);function hh(t){return t.label!==void 0}var oxe=3,axe="32px",lxe="16px",pR=4e3,cxe=356,uxe=14,fxe=20,dxe=200;function $r(...t){return t.filter(Boolean).join(" ")}function hxe(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var pxe=t=>{var e,n,r,i,s,o,a,l,c,u,f;let{invert:d,toast:h,unstyled:g,interacting:m,setHeights:v,visibleToasts:y,heights:x,index:b,toasts:k,expanded:w,removeToast:S,defaultRichColors:C,closeButton:_,style:I,cancelButtonStyle:E,actionButtonStyle:j,className:A="",descriptionClassName:L="",duration:z,position:X,gap:W,loadingIcon:F,expandByDefault:N,classNames:Q,icons:P,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:$}=t,[R,q]=ee.useState(null),[H,ie]=ee.useState(null),[Y,pe]=ee.useState(!1),[me,ye]=ee.useState(!1),[Ee,je]=ee.useState(!1),[kt,ln]=ee.useState(!1),[Gr,Sr]=ee.useState(!1),[Kr,ho]=ee.useState(0),[$i,vc]=ee.useState(0),po=ee.useRef(h.duration||z||pR),ad=ee.useRef(null),Ai=ee.useRef(null),Wg=b===0,qg=b+1<=y,V=h.type,te=h.dismissible!==!1,xe=h.className||"",_e=h.descriptionClassName||"",Be=ee.useMemo(()=>x.findIndex(be=>be.toastId===h.id)||0,[x,h.id]),Rn=ee.useMemo(()=>{var be;return(be=h.closeButton)!=null?be:_},[h.closeButton,_]),Jr=ee.useMemo(()=>h.duration||z||pR,[h.duration,z]),_n=ee.useRef(0),er=ee.useRef(0),as=ee.useRef(0),pt=ee.useRef(null),[ls,kr]=X.split("-"),$S=ee.useMemo(()=>x.reduce((be,Xe,rt)=>rt>=Be?be:be+Xe.height,0),[x,Be]),AS=Kve(),pz=h.invert||d,Yg=V==="loading";er.current=ee.useMemo(()=>Be*W+$S,[Be,$S]),ee.useEffect(()=>{po.current=Jr},[Jr]),ee.useEffect(()=>{pe(!0)},[]),ee.useEffect(()=>{let be=Ai.current;if(be){let Xe=be.getBoundingClientRect().height;return vc(Xe),v(rt=>[{toastId:h.id,height:Xe,position:h.position},...rt]),()=>v(rt=>rt.filter(Cr=>Cr.toastId!==h.id))}},[v,h.id]),ee.useLayoutEffect(()=>{if(!Y)return;let be=Ai.current,Xe=be.style.height;be.style.height="auto";let rt=be.getBoundingClientRect().height;be.style.height=Xe,vc(rt),v(Cr=>Cr.find(Pr=>Pr.toastId===h.id)?Cr.map(Pr=>Pr.toastId===h.id?{...Pr,height:rt}:Pr):[{toastId:h.id,height:rt,position:h.position},...Cr])},[Y,h.title,h.description,v,h.id]);let cs=ee.useCallback(()=>{ye(!0),ho(er.current),v(be=>be.filter(Xe=>Xe.toastId!==h.id)),setTimeout(()=>{S(h)},dxe)},[h,S,v,er]);ee.useEffect(()=>{if(h.promise&&V==="loading"||h.duration===1/0||h.type==="loading")return;let be;return w||m||$&&AS?(()=>{if(as.current<_n.current){let Xe=new Date().getTime()-_n.current;po.current=po.current-Xe}as.current=new Date().getTime()})():po.current!==1/0&&(_n.current=new Date().getTime(),be=setTimeout(()=>{var Xe;(Xe=h.onAutoClose)==null||Xe.call(h,h),cs()},po.current)),()=>clearTimeout(be)},[w,m,h,V,$,AS,cs]),ee.useEffect(()=>{h.delete&&cs()},[cs,h.delete]);function mz(){var be,Xe,rt;return P!=null&&P.loading?ee.createElement("div",{className:$r(Q==null?void 0:Q.loader,(be=h==null?void 0:h.classNames)==null?void 0:be.loader,"sonner-loader"),"data-visible":V==="loading"},P.loading):F?ee.createElement("div",{className:$r(Q==null?void 0:Q.loader,(Xe=h==null?void 0:h.classNames)==null?void 0:Xe.loader,"sonner-loader"),"data-visible":V==="loading"},F):ee.createElement(Wve,{className:$r(Q==null?void 0:Q.loader,(rt=h==null?void 0:h.classNames)==null?void 0:rt.loader),visible:V==="loading"})}return ee.createElement("li",{tabIndex:0,ref:Ai,className:$r(A,xe,Q==null?void 0:Q.toast,(e=h==null?void 0:h.classNames)==null?void 0:e.toast,Q==null?void 0:Q.default,Q==null?void 0:Q[V],(n=h==null?void 0:h.classNames)==null?void 0:n[V]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:C,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":Y,"data-promise":!!h.promise,"data-swiped":Gr,"data-removed":me,"data-visible":qg,"data-y-position":ls,"data-x-position":kr,"data-index":b,"data-front":Wg,"data-swiping":Ee,"data-dismissible":te,"data-type":V,"data-invert":pz,"data-swipe-out":kt,"data-swipe-direction":H,"data-expanded":!!(w||N&&Y),style:{"--index":b,"--toasts-before":b,"--z-index":k.length-b,"--offset":`${me?Kr:er.current}px`,"--initial-height":N?"auto":`${$i}px`,...I,...h.style},onDragEnd:()=>{je(!1),q(null),pt.current=null},onPointerDown:be=>{Yg||!te||(ad.current=new Date,ho(er.current),be.target.setPointerCapture(be.pointerId),be.target.tagName!=="BUTTON"&&(je(!0),pt.current={x:be.clientX,y:be.clientY}))},onPointerUp:()=>{var be,Xe,rt,Cr;if(kt||!te)return;pt.current=null;let Pr=Number(((be=Ai.current)==null?void 0:be.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),us=Number(((Xe=Ai.current)==null?void 0:Xe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),mo=new Date().getTime()-((rt=ad.current)==null?void 0:rt.getTime()),Tr=R==="x"?Pr:us,fs=Math.abs(Tr)/mo;if(Math.abs(Tr)>=fxe||fs>.11){ho(er.current),(Cr=h.onDismiss)==null||Cr.call(h,h),ie(R==="x"?Pr>0?"right":"left":us>0?"down":"up"),cs(),ln(!0),Sr(!1);return}je(!1),q(null)},onPointerMove:be=>{var Xe,rt,Cr,Pr;if(!pt.current||!te||((Xe=window.getSelection())==null?void 0:Xe.toString().length)>0)return;let us=be.clientY-pt.current.y,mo=be.clientX-pt.current.x,Tr=(rt=t.swipeDirections)!=null?rt:hxe(X);!R&&(Math.abs(mo)>1||Math.abs(us)>1)&&q(Math.abs(mo)>Math.abs(us)?"x":"y");let fs={x:0,y:0};R==="y"?(Tr.includes("top")||Tr.includes("bottom"))&&(Tr.includes("top")&&us<0||Tr.includes("bottom")&&us>0)&&(fs.y=us):R==="x"&&(Tr.includes("left")||Tr.includes("right"))&&(Tr.includes("left")&&mo<0||Tr.includes("right")&&mo>0)&&(fs.x=mo),(Math.abs(fs.x)>0||Math.abs(fs.y)>0)&&Sr(!0),(Cr=Ai.current)==null||Cr.style.setProperty("--swipe-amount-x",`${fs.x}px`),(Pr=Ai.current)==null||Pr.style.setProperty("--swipe-amount-y",`${fs.y}px`)}},Rn&&!h.jsx?ee.createElement("button",{"aria-label":M,"data-disabled":Yg,"data-close-button":!0,onClick:Yg||!te?()=>{}:()=>{var be;cs(),(be=h.onDismiss)==null||be.call(h,h)},className:$r(Q==null?void 0:Q.closeButton,(i=h==null?void 0:h.classNames)==null?void 0:i.closeButton)},(s=P==null?void 0:P.close)!=null?s:Gve):null,h.jsx||O.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:ee.createElement(ee.Fragment,null,V||h.icon||h.promise?ee.createElement("div",{"data-icon":"",className:$r(Q==null?void 0:Q.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||mz():null,h.type!=="loading"?h.icon||(P==null?void 0:P[V])||Xve(V):null):null,ee.createElement("div",{"data-content":"",className:$r(Q==null?void 0:Q.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},ee.createElement("div",{"data-title":"",className:$r(Q==null?void 0:Q.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?ee.createElement("div",{"data-description":"",className:$r(L,_e,Q==null?void 0:Q.description,(c=h==null?void 0:h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),O.isValidElement(h.cancel)?h.cancel:h.cancel&&hh(h.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||E,onClick:be=>{var Xe,rt;hh(h.cancel)&&te&&((rt=(Xe=h.cancel).onClick)==null||rt.call(Xe,be),cs())},className:$r(Q==null?void 0:Q.cancelButton,(u=h==null?void 0:h.classNames)==null?void 0:u.cancelButton)},h.cancel.label):null,O.isValidElement(h.action)?h.action:h.action&&hh(h.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||j,onClick:be=>{var Xe,rt;hh(h.action)&&((rt=(Xe=h.action).onClick)==null||rt.call(Xe,be),!be.defaultPrevented&&cs())},className:$r(Q==null?void 0:Q.actionButton,(f=h==null?void 0:h.classNames)==null?void 0:f.actionButton)},h.action.label):null))};function mR(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function mxe(t,e){let n={};return[t,e].forEach((r,i)=>{let s=i===1,o=s?"--mobile-offset":"--offset",a=s?lxe:axe;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var gxe=O.forwardRef(function(t,e){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:s,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:f,duration:d,style:h,visibleToasts:g=oxe,toastOptions:m,dir:v=mR(),gap:y=uxe,loadingIcon:x,icons:b,containerAriaLabel:k="Notifications",pauseWhenPageIsHidden:w}=t,[S,C]=ee.useState([]),_=ee.useMemo(()=>Array.from(new Set([r].concat(S.filter($=>$.position).map($=>$.position)))),[S,r]),[I,E]=ee.useState([]),[j,A]=ee.useState(!1),[L,z]=ee.useState(!1),[X,W]=ee.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=ee.useRef(null),N=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=ee.useRef(null),P=ee.useRef(!1),M=ee.useCallback($=>{C(R=>{var q;return(q=R.find(H=>H.id===$.id))!=null&&q.delete||fn.dismiss($.id),R.filter(({id:H})=>H!==$.id)})},[]);return ee.useEffect(()=>fn.subscribe($=>{if($.dismiss){C(R=>R.map(q=>q.id===$.id?{...q,delete:!0}:q));return}setTimeout(()=>{E$.flushSync(()=>{C(R=>{let q=R.findIndex(H=>H.id===$.id);return q!==-1?[...R.slice(0,q),{...R[q],...$},...R.slice(q+1)]:[$,...R]})})})}),[]),ee.useEffect(()=>{if(u!=="system"){W(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:R})=>{W(R?"dark":"light")})}catch{$.addListener(({matches:q})=>{try{W(q?"dark":"light")}catch(H){console.error(H)}})}},[u]),ee.useEffect(()=>{S.length<=1&&A(!1)},[S]),ee.useEffect(()=>{let $=R=>{var q,H;i.every(ie=>R[ie]||R.code===ie)&&(A(!0),(q=F.current)==null||q.focus()),R.code==="Escape"&&(document.activeElement===F.current||(H=F.current)!=null&&H.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[i]),ee.useEffect(()=>{if(F.current)return()=>{Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null,P.current=!1)}},[F.current]),ee.createElement("section",{ref:e,"aria-label":`${k} ${N}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map(($,R)=>{var q;let[H,ie]=$.split("-");return S.length?ee.createElement("ol",{key:$,dir:v==="auto"?mR():v,tabIndex:-1,ref:F,className:a,"data-sonner-toaster":!0,"data-theme":X,"data-y-position":H,"data-lifted":j&&S.length>1&&!s,"data-x-position":ie,style:{"--front-toast-height":`${((q=I[0])==null?void 0:q.height)||0}px`,"--width":`${cxe}px`,"--gap":`${y}px`,...h,...mxe(l,c)},onBlur:Y=>{P.current&&!Y.currentTarget.contains(Y.relatedTarget)&&(P.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||P.current||(P.current=!0,Q.current=Y.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{L||A(!1)},onDragEnd:()=>A(!1),onPointerDown:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||z(!0)},onPointerUp:()=>z(!1)},S.filter(Y=>!Y.position&&R===0||Y.position===$).map((Y,pe)=>{var me,ye;return ee.createElement(pxe,{key:Y.id,icons:b,index:pe,toast:Y,defaultRichColors:f,duration:(me=m==null?void 0:m.duration)!=null?me:d,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:g,closeButton:(ye=m==null?void 0:m.closeButton)!=null?ye:o,interacting:L,position:$,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:M,toasts:S.filter(Ee=>Ee.position==Y.position),heights:I.filter(Ee=>Ee.position==Y.position),setHeights:E,expandByDefault:s,gap:y,loadingIcon:x,expanded:j,pauseWhenPageIsHidden:w,swipeDirections:t.swipeDirections})})):null}))});const hz=({...t})=>{const n=typeof document<"u"&&document.documentElement.classList.contains("dark")?"dark":"light";return p.jsx(gxe,{theme:n,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};function Oxe(){return p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsx(AI,{}),p.jsx("main",{className:"flex-1 overflow-auto",children:p.jsx(GOe,{})}),p.jsx(nz,{}),p.jsx(X4,{}),p.jsx(hz,{})]})}function yxe(){const{currentProject:t,isLoading:e}=ha(),{connect:n,disconnect:r,checkSyncStatus:i}=Mf();return sZ(),O.useEffect(()=>{if(t)return n(),i(),()=>r()},[t,n,r,i]),e||!t?p.jsx("div",{className:"h-full flex items-center justify-center",children:p.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsx(AI,{}),p.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[p.jsx($J,{}),p.jsx(XOe,{})]}),p.jsx(UOe,{}),p.jsx(nz,{}),p.jsx(X4,{}),p.jsx(hz,{})]})}function vxe(){return p.jsx(Uu,{children:p.jsxs(LF,{children:[p.jsx(sx,{path:"/",element:p.jsx(Oxe,{})}),p.jsx(sx,{path:"/:projectSlug",element:p.jsx(yxe,{})})]})})}fv.createRoot(document.getElementById("root")).render(p.jsx(ee.StrictMode,{children:p.jsx(uX,{children:p.jsx(vxe,{})})}));export{r3 as C,Jn as E,Ve as I,Dl as L,sL as N,zl as a,Nde as b,qh as c,v5 as d,Fl as e,hc as f,We as g,xm as h,dc as i,due as j,fue as k,hL as l,un as m,re as n,Z as o,F3 as p,oL as q,v3 as r,uc as s,T as t,PL as u,pr as v};
|
|
509
|
+
//# sourceMappingURL=index-CM3gGvbH.js.map
|